Commit 6c93ef31 authored by Mandy Chen's avatar Mandy Chen Committed by Commit Bot

DevTools: Localize geolocations

The city names in settings are not localized because the localization
parser doesn't know about them. Modify the parser to recognize these
strings.

Bug: 941561
Change-Id: If1974dd471b3d646c900dea6932f427a273c19f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1769300Reviewed-by: default avatarErik Luo <luoe@chromium.org>
Commit-Queue: Mandy Chen <mandy.chen@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#695189}
parent 7eadc531
...@@ -120,18 +120,30 @@ ...@@ -120,18 +120,30 @@
<message name="IDS_DEVTOOLS_526d688f37a86d3c3f27d0c5016eb71d" desc="Text of orientation reset button in Sensors View of the Device Toolbar"> <message name="IDS_DEVTOOLS_526d688f37a86d3c3f27d0c5016eb71d" desc="Text of orientation reset button in Sensors View of the Device Toolbar">
Reset Reset
</message> </message>
<message name="IDS_DEVTOOLS_5466ee572bcbc75830d044e66ab429bc" desc="City name in Geolocations Settings">
Shanghai
</message>
<message name="IDS_DEVTOOLS_58cc7602635a11277aa7531e14b32c97" desc="Text in Sensors View of the Device Toolbar"> <message name="IDS_DEVTOOLS_58cc7602635a11277aa7531e14b32c97" desc="Text in Sensors View of the Device Toolbar">
Portrait upside down Portrait upside down
</message> </message>
<message name="IDS_DEVTOOLS_59c06928c1dcdb1a687bf21d73e53a09" desc="Text in Device Mode Toolbar of the Device Toolbar"> <message name="IDS_DEVTOOLS_59c06928c1dcdb1a687bf21d73e53a09" desc="Text in Device Mode Toolbar of the Device Toolbar">
Show device frame Show device frame
</message> </message>
<message name="IDS_DEVTOOLS_59ead8d1e124ccfb79f3ace06f43e703" desc="City name in Geolocations Settings">
London
</message>
<message name="IDS_DEVTOOLS_5b4f1c0e2bd8bc1ba726cd51dd70c1a6" desc="City name in Geolocations Settings">
Mountain View
</message>
<message name="IDS_DEVTOOLS_614103b76fd0d9de068d69034fb6f987" desc="Text in Device Mode View of the Device Toolbar"> <message name="IDS_DEVTOOLS_614103b76fd0d9de068d69034fb6f987" desc="Text in Device Mode View of the Device Toolbar">
(<ph name="THIS__MODEL_DEVICE___TITLE">$1s<ex>iPhone X</ex></ph>) (<ph name="THIS__MODEL_DEVICE___TITLE">$1s<ex>iPhone X</ex></ph>)
</message> </message>
<message name="IDS_DEVTOOLS_6149711fb8edc5e2adeea7aa63ee11ff" desc="Text in Device Mode Toolbar of the Device Toolbar"> <message name="IDS_DEVTOOLS_6149711fb8edc5e2adeea7aa63ee11ff" desc="Text in Device Mode Toolbar of the Device Toolbar">
150% 150%
</message> </message>
<message name="IDS_DEVTOOLS_62413a57c5e3dc51177995fa175d3286" desc="City name in Geolocations Settings">
Tokyo
</message>
<message name="IDS_DEVTOOLS_62759e0d418d7391bf2d54e70cbcc05d" desc="Text in Device Mode Toolbar of the Device Toolbar"> <message name="IDS_DEVTOOLS_62759e0d418d7391bf2d54e70cbcc05d" desc="Text in Device Mode Toolbar of the Device Toolbar">
Remove device type Remove device type
</message> </message>
...@@ -171,9 +183,15 @@ ...@@ -171,9 +183,15 @@
<message name="IDS_DEVTOOLS_7b4b2de0aae3a60aa3cf502a19f9c748" desc="Error message in the Devices settings pane that declares that the device name input must not be empty"> <message name="IDS_DEVTOOLS_7b4b2de0aae3a60aa3cf502a19f9c748" desc="Error message in the Devices settings pane that declares that the device name input must not be empty">
Device name cannot be empty. Device name cannot be empty.
</message> </message>
<message name="IDS_DEVTOOLS_7e35e74e610188414ad24235dd787c78" desc="City name in Geolocations Settings">
Moscow
</message>
<message name="IDS_DEVTOOLS_7f163d0494446906a484df67e90c1d6b" desc="Text in Device Mode Toolbar of the Device Toolbar"> <message name="IDS_DEVTOOLS_7f163d0494446906a484df67e90c1d6b" desc="Text in Device Mode Toolbar of the Device Toolbar">
Hide device frame Hide device frame
</message> </message>
<message name="IDS_DEVTOOLS_7fc2515293d99e95b1745e81d6abbdf4" desc="City name in Geolocations Settings">
São Paulo
</message>
<message name="IDS_DEVTOOLS_815dff01257e5ef182b25d4c1ef0a7a0" desc="Text in Device Mode Toolbar of the Device Toolbar"> <message name="IDS_DEVTOOLS_815dff01257e5ef182b25d4c1ef0a7a0" desc="Text in Device Mode Toolbar of the Device Toolbar">
Landscape Landscape
</message> </message>
...@@ -195,6 +213,9 @@ ...@@ -195,6 +213,9 @@
<message name="IDS_DEVTOOLS_8d7b5211545faceef57a041ee56a2f5e" desc="Title of an action in the emulation tool to capture full height screenshot"> <message name="IDS_DEVTOOLS_8d7b5211545faceef57a041ee56a2f5e" desc="Title of an action in the emulation tool to capture full height screenshot">
Capture full size screenshot Capture full size screenshot
</message> </message>
<message name="IDS_DEVTOOLS_8ebaad59980c95ade797c903761fa815" desc="City name in Geolocations Settings">
Mumbai
</message>
<message name="IDS_DEVTOOLS_901bc0a4714ff81c24943a50e620de71" desc="Text in Devices Settings Tab of the Device Toolbar"> <message name="IDS_DEVTOOLS_901bc0a4714ff81c24943a50e620de71" desc="Text in Devices Settings Tab of the Device Toolbar">
User agent string User agent string
</message> </message>
...@@ -312,6 +333,9 @@ ...@@ -312,6 +333,9 @@
<message name="IDS_DEVTOOLS_eccbc87e4b5ce2fe28308fd9f2a7baf3" desc="Text in Device Mode Toolbar of the Device Toolbar"> <message name="IDS_DEVTOOLS_eccbc87e4b5ce2fe28308fd9f2a7baf3" desc="Text in Device Mode Toolbar of the Device Toolbar">
3 3
</message> </message>
<message name="IDS_DEVTOOLS_ee1611b61f5688e70c12b40684dbb395" desc="City name in Geolocations Settings">
Berlin
</message>
<message name="IDS_DEVTOOLS_ee1cab1975e28575b1631ee8fc4ea749" desc="Title of an action in the emulation tool to capture node screenshot"> <message name="IDS_DEVTOOLS_ee1cab1975e28575b1631ee8fc4ea749" desc="Title of an action in the emulation tool to capture node screenshot">
Capture node screenshot Capture node screenshot
</message> </message>
...@@ -330,6 +354,9 @@ ...@@ -330,6 +354,9 @@
<message name="IDS_DEVTOOLS_f2a72a44f7b7d30829c0405ed2385345" desc="Text in Device Mode View of the Device Toolbar"> <message name="IDS_DEVTOOLS_f2a72a44f7b7d30829c0405ed2385345" desc="Text in Device Mode View of the Device Toolbar">
Mobile S Mobile S
</message> </message>
<message name="IDS_DEVTOOLS_f4334fdfa1c728eae375fe781e2e2d9d" desc="City name in Geolocations Settings">
San Francisco
</message>
<message name="IDS_DEVTOOLS_f819de81247be4a5428dc0e169de28b8" desc="Text in Device Mode Toolbar of the Device Toolbar"> <message name="IDS_DEVTOOLS_f819de81247be4a5428dc0e169de28b8" desc="Text in Device Mode Toolbar of the Device Toolbar">
75% 75%
</message> </message>
......
...@@ -115,6 +115,11 @@ function parseLocalizableStringFromModuleJson(fileContent, filePath) { ...@@ -115,6 +115,11 @@ function parseLocalizableStringFromModuleJson(fileContent, filePath) {
if (option.text !== undefined) if (option.text !== undefined)
addString(option.text, option.text, filePath); addString(option.text, option.text, filePath);
} }
} else if (key === 'defaultValue' && Array.isArray(extension[key])) {
for (const defaultVal of extension[key]) {
if (defaultVal.title)
addString(defaultVal.title, defaultVal.title, filePath);
}
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment