Commit Graph
4 Commits
Author SHA1 Message Date
vidorteg 6d2775c5ef Modifying scripts for i18nString localization call
Modifying some scripts that verify the shape of localization calls
to work with the i18nString shorthand:

const i18nString = i18.i18n.getLocalizedString.bind(undefined, str_);

Bug: 1136655
Change-Id: I09a961136dd89e8af11ab33f413f315e61184078
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2469903
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Christy Chen <chrche@microsoft.com>
2020-10-14 21:12:22 +00:00
Christy Chen 1148dc0fda Remove backtick for lock terms in en-US.ctc.json files
In Lighthouse project, backtick is being used to indicate something that should not be localized.
(See 'inline code block' section in https://github.com/GoogleChrome/lighthouse/tree/master/lighthouse-core/lib/i18n)

We can adopt this with minor modification. When the lighthouse report is being rendered, the backtick in message will be converted to a special html tag and used to style the code snippets. Since we don't want to do special styling for locked terms, backtick can be removed after the term being converted to placeholder in en-US.ctc.json, then locale.json would have the term that is not translated and without the backtick .

For example
Before change: https://imgur.com/a/WqbVbXC
After change: https://imgur.com/a/EZjl6Gg

Note: There is no escape character for using backticks as part of the string, it can only be used for locked terms.

DISABLE_THIRD_PARTY_CHECK=Need to also update README that is in different folder
Bug: 1136655
Change-Id: I68ea305962beec4115d0a50f24e34546b92cadf7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2463990
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2020-10-13 19:24:29 +00:00
Christy Chen f4b361b2ea [Loc] Update Documentation
Update the reference of Common.i18 to i18n.i18n in the docs.

Bug: 941561
Change-Id: I434378d9e1c51003a751edd42c4c3b73f6341a36
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2405626
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Christy Chen <chrche@microsoft.com>
2020-09-11 06:57:41 +00:00
Christy Chen 3fa95bc487 [Loc] Update localization documentation
Add some FAQs for Loc V2.

Bug: 941561
Change-Id: I23ce46bc01d567f20764c7de8ccd5d7583e017b0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2238608
Reviewed-by: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Christy Chen <chrche@microsoft.com>
2020-06-12 00:16:15 +00:00