summaryrefslogtreecommitdiffstats
path: root/extensions/extensions_strings.grd
diff options
context:
space:
mode:
authorjshin <jshin@chromium.org>2015-08-07 03:11:09 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-07 10:11:42 +0000
commit8b581d8b638951f98c0fb0c0116ac18b355b825e (patch)
tree58623cbfa64540aca8cb288b29bf8a0efbb2327b /extensions/extensions_strings.grd
parent3bc71b8291a88cc35c21d05d9fb99787cccfddf5 (diff)
downloadchromium_src-8b581d8b638951f98c0fb0c0116ac18b355b825e.zip
chromium_src-8b581d8b638951f98c0fb0c0116ac18b355b825e.tar.gz
chromium_src-8b581d8b638951f98c0fb0c0116ac18b355b825e.tar.bz2
Add ICU message format support
Adopt and customize a ICU message format wrapper used at Google to meet Chromium's need. This will enable formatting of 'complex messages' requiring plural and/or selector (e.g. gender or 'single vs multiple') support with more than one parameters. Besides, l10n_util::GetPluralStringF* is rewritten to use this API. I'm also planning to use this API to add a similar support to Chromium's JavaScript-based UI and extensions. References: MessageFormat specs: http://icu-project.org/apiref/icu4j/com/ibm/icu/text/MessageFormat.html http://icu-project.org/apiref/icu4c/classicu_1_1DecimalFormat.html#details Examples: http://userguide.icu-project.org/formatparse/messages message_formatter_unittest.cc go/plurals inside Google. BUG=481734 TEST=base_unittests --gtest_filter="MessageFormat*" Review URL: https://codereview.chromium.org/1140153005 Cr-Commit-Position: refs/heads/master@{#342327}
Diffstat (limited to 'extensions/extensions_strings.grd')
-rw-r--r--extensions/extensions_strings.grd32
1 files changed, 15 insertions, 17 deletions
diff --git a/extensions/extensions_strings.grd b/extensions/extensions_strings.grd
index dd407b0..3e602b0 100644
--- a/extensions/extensions_strings.grd
+++ b/extensions/extensions_strings.grd
@@ -365,23 +365,21 @@
<message name="IDS_DEVICE_NAME_WITH_UNKNOWN_PRODUCT_UNKNOWN_VENDOR_SERIAL" desc="String describing a device by its serial number when only numeric vendor and product IDs are available.">
Unknown product <ph name="PRODUCT_ID">$1<ex>1234</ex></ph> from vendor <ph name="VENDOR_ID">$2<ex>abcd</ex></ph> (serial number <ph name="SERIAL_NUMBER">$3<ex>00001</ex></ph>)
</message>
- <message name="IDS_DEVICE_PERMISSIONS_PROMPT_MULTIPLE" desc="Instructions asking the user to select one or more devices for use with an app.">
- The application "<ph name="APP_NAME">$1<ex>Chrome Dev Editor</ex></ph>" is requesting access to one or more of your devices.
- </message>
- <message name="IDS_DEVICE_PERMISSIONS_PROMPT_SINGLE" desc="Instructions asking the user to select one device for use with an app.">
- The application "<ph name="APP_NAME">$1<ex>Chrome Dev Editor</ex></ph>" is requesting access to one of your devices.
- </message>
- <message name="IDS_HID_DEVICE_PERMISSIONS_PROMPT_TITLE_MULTIPLE" desc="Title of the HID device selection dialog when the app will accept one or more selected devices.">
- Select HID devices
- </message>
- <message name="IDS_HID_DEVICE_PERMISSIONS_PROMPT_TITLE_SINGLE" desc="Title of the HID device selection dialog when the app wants only one device selected.">
- Select a HID device
- </message>
- <message name="IDS_USB_DEVICE_PERMISSIONS_PROMPT_TITLE_MULTIPLE" desc="Title of the USB device selection dialog when the app will accept one or more selected devices.">
- Select USB devices
- </message>
- <message name="IDS_USB_DEVICE_PERMISSIONS_PROMPT_TITLE_SINGLE" desc="Title of the USB device selection dialog when the app wants only one device selected.">
- Select a USB device
+ <message name="IDS_DEVICE_PERMISSIONS_PROMPT" desc="Instructions asking the user to select one or more devices for use with an app. [ICU Syntax]">
+ {0, select,
+ single {The application "<ph name="APP_NAME">{1}<ex>Chrome Dev Editor</ex></ph>" is requesting access to one of your devices.}
+ multiple {The application "<ph name="APP_NAME">{1}<ex>Chrome Dev Editor</ex></ph>" is requesting access to one or more of your devices.}
+ other {UNUSED}}
+ </message>
+ <message name="IDS_HID_DEVICE_PERMISSIONS_PROMPT_TITLE" desc="Title of the HID device selection dialog when the app will accept one or more selected devices. [ICU Syntax]">
+ {1, select,
+ single {Select a HID device} multiple {Select HID devices}
+ other {UNUSED}}
+ </message>
+ <message name="IDS_USB_DEVICE_PERMISSIONS_PROMPT_TITLE" desc="Title of the USB device selection dialog when the app will accept one or more selected devices. [ICU Syntax]">
+ {1, select,
+ single {Select a USB device} multiple {Select USB devices}
+ other {UNUSED}}
</message>
<message name="IDS_EXTENSION_PROMPT_WARNING_NETWORKING_CONFIG" desc="Permission string for Networking Config API.">
Configure network connections