Commit Graph
10 Commits
Author SHA1 Message Date
Peter Marshall faaef4e3e9 [l10n] Add docs for i18nLazyString
Also remove old docs that are no longer relevant for V2.
Update links in the README to the new files.

Bug: 1136655
Change-Id: Iec0277912eb24d1a2bff00792cb616c06156fab8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2764221
Auto-Submit: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2021-03-17 06:49:45 +00:00
Peter Marshall e65a75f4e9 [l10n] Update the docs for writing UI string descriptions
Add some more detail and examples, re-order to make location look less
important. Explain why some things are necessary.

Bug: 1163928
Change-Id: Iaa34477097210672462f4b3df8d018c050e6cc9a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2735674
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
2021-03-08 07:09:54 +00:00
Vidal Guillermo Diazleal Ortega b57e5df914 [Loc] Removing Localization V1 remnants.
Hi everyone,

Our plan for implementing Localization V2 considers 3 phases:

Infrastructure, Migration & Cleaning

This CL is part of the Cleaning phase, it's goal is to remove any
non-standard usage of V1 APIs (outside of the devtools_ui_strings.grd)
I'm splittling these changes into small pieces following this heuristic:
- make sense when logically grouped.
- keep them as small as possible
- can be atomically reverted.

I'll follow up with other changes removing usage on presubmit, scripts
and build.gn files (if any).

Bug: 1136655
Change-Id: I735dc8ba1045ed4afff7deb1a43cf02a7ab55865
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2733640
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-03-04 22:26:24 +00:00
Simon Zünd f34bb6c20d [l10n] Introduce i18n.i18n.lockedString
R=petermarshall@chromium.org

Bug: chromium:1180760
Change-Id: Ie2174bd3d16ef9f73c1197a62d64e8b668811cb6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2731571
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-03-03 13:22:19 +00:00
Peter Marshall 3ec813d57b [l10n] Update plural forms, fix some errors
- Clean up identical strings that had identical descriptions.
- Move whole plural text inside plural switches
- Add some notes to docs for plurals
- Use '=1' instead of 'one' for plurals because the linter for our
internal process requires this.


Bug: 1163928
Change-Id: Idba5a22424816225e4c8b0d465ec970a5b0f6e02
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2728075
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
2021-03-02 08:34:56 +00:00
Peter Marshall a99c96c041 [l10n] Use ICU plural in Changes drawer
Update documentation for V2 to include an example of this, too.

After: https://imgur.com/a/S0DadTT

Bug: 1163928
Change-Id: I2fa7599abbed945982378f382ed83f5ca46aee61
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2726564
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-03-01 12:23:28 +00:00
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