New issue
Advanced search Search tips

Issue 915649 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 17
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

Pin Dialog Attempts Left i18n message $1 placeholder should be wrapped in a <ph> element

Project Member Reported by noel@chromium.org, Dec 17

Issue description

https://codereview.chromium.org/2094333002 added an i18n message string

./chrome/app/chromeos_strings.grdp
 string IDS_REQUEST_PIN_DIALOG_ATTEMPTS_LEFT
   "Attempts left: $1"

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

along with and <ex> element giving an example.

  <ph name="NUMBER_ATTEMPTS">$1<ex>3</ex></ph>

When this is not done, applications can fail to work when reading the i18n translated strings, sadly.

Can we please fix?
 
Cc: rdevlin....@chromium.org
Labels: bad-i18n-placeholders
Status: Started (was: Untriaged)
Project Member

Comment 4 by bugdroid1@chromium.org, Dec 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e083cd567da76cff0ea11837e05c7b30bdfe2b13

commit e083cd567da76cff0ea11837e05c7b30bdfe2b13
Author: Igor <igorcov@chromium.org>
Date: Mon Dec 17 23:47:36 2018

Fix PIN dialog i18n message placeholder

The placeholder, $1 from "Attempts left: $1" must be wrapped in a
<ph> placeholder element per the Chrome i18n docs:

https://sites.google.com/a/chromium.org/dev/developers/design-documents/ui-localization#TOC-How-to-add-a-string
https://sites.google.com/a/chromium.org/dev/developers/tools-we-use-in-chromium/grit/grit-users-guide#Adding_Resources

BUG= chromium:915649 
TEST=none

Change-Id: Ie81b8bd63729a6af39ee65e09b0d639382cce33b
Reviewed-on: https://chromium-review.googlesource.com/c/1380532
Commit-Queue: Noel Gordon <noel@chromium.org>
Reviewed-by: Noel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#617291}
[modify] https://crrev.com/e083cd567da76cff0ea11837e05c7b30bdfe2b13/chrome/app/chromeos_strings.grdp

Status: Fixed (was: Started)
And thanks for landing that fix so quickly Igor.

Sign in to add a comment