MD Extensions Error Lines plural i18n placeholder $1 should be wrapped in <ph> element |
|||||
Issue descriptionhttps://chromium-review.googlesource.com/c/chromium/src/+/869890 updated an i18n message to be plural chrome/app/md_extensions_strings.grdp string IDS_MD_EXTENSIONS_ERROR_LINES_NOT_SHOWN "other {<$1 lines not shown>}}" Placeholder elements like $1 $2, should be wrapped in <ph> elements according to the docs [1] [2] [1] https://sites.google.com/a/chromium.org/dev/developers/design-documents/ui-localization#TOC-How-to-add-a-string [2] https://sites.google.com/a/chromium.org/dev/developers/tools-we-use-in-chromium/grit/grit-users-guide#Adding_Resources but the docs do not mention how/what to do with plurals. Should placeholder $1 $2 etc in plurals be wrapped in <ph> elements? I noticed that components/payments_strings.grdp <message name="IDS_PAYMENT_REQUEST_ORDER_SUMMARY_MORE_ITEMS" desc="The label in the Order Summary section of the Payment Sheet that indicates how many display items are hidden. [ICU Syntax]"> {MORE_ITEMS, plural, =1 {<ph name="ITEM_COUNT">#<ex>1</ex></ph> more item} other {<ph name="ITEM_COUNT">#<ex>2</ex></ph> more items}} </message> wrapped them. I also noticed how a translated plural message that did not wrap its placesholders $1 $2 $3, appeared (badly) in language=bn ./components/strings/components_strings_bn.xtb <translation id="262424810616849754">{COUNT,plural, =0{কিছুই নয়}=1{১টি অ্যাপ ($১)}=2{২টি অ্যাপ ($১, $২)}one{#টি অ্যাপ ($১, $২, $৩)}other{#টি অ্যাপ ($১, $২, $৩)}}</translation> Suggests to me that placeholders in plurals should be wrapped in <ph>. Thoughts?
,
Dec 17
,
Dec 17
,
Dec 21
Let me see if I can fix it for ya ...
,
Dec 21
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/28505695462e59443b9e46ba344a246cdf3b0d7e commit 28505695462e59443b9e46ba344a246cdf3b0d7e Author: Noel Gordon <noel@chromium.org> Date: Fri Dec 21 02:37:33 2018 Fix Extensions WebUI i18n message $1 placeholder Placeholders like $1 $2 etc must be wrapped in a <ph> element, per the chromium i18n docs [1][2]. [1] https://sites.google.com/a/chromium.org/dev/developers/design-documents/ui-localization#TOC-How-to-add-a-string [2] https://sites.google.com/a/chromium.org/dev/developers/tools-we-use-in-chromium/grit/grit-users-guide#Adding_Resources Bug: 915656 Change-Id: Ib978b04665d31d4b690dd7fa7c98aff1ffaa4481 Reviewed-on: https://chromium-review.googlesource.com/c/1388065 Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org> Commit-Queue: Noel Gordon <noel@chromium.org> Cr-Commit-Position: refs/heads/master@{#618436} [modify] https://crrev.com/28505695462e59443b9e46ba344a246cdf3b0d7e/chrome/app/md_extensions_strings.grdp
,
Dec 21
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by noel@chromium.org
, Dec 17