Commit Graph
5 Commits
Author SHA1 Message Date
Peter Marshall a9ac1bee7a [l10n] Rename the bundled i18n to i18n-bundle for clarity
There's a lot of i18n.js files in the repo and it's a bit hard to keep
track.

Bug: 1136655
Change-Id: I7c6343fee15ecf9fb2a2ce71f43f05ff48714b89
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2659336
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-02-09 11:37:00 +00:00
Peter Marshall bc1350dbe0 [l10n] Update i18n build script
Import rollup explicitly to get the CJS version as rollup has changed.

Hard-code the correct paths for input/output of the script as these
have changed too.

Run the script to get the new bundled i18n.

Also-by: tvanderlippe@chromium.org
Bug: 941561
Change-Id: Id37ec2e643d6d703328381fd07541c66790088fc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2655250
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
2021-01-28 12:33:37 +00:00
vidorteg 8bce4b0b83 Enable ModuleUIStrings as a fallback in i18n
Root cause:
i18n is designed to work with strings that are declared in a UIStrings
object on the SAME file where they are being used. To my best knowledge
this is done to improve performance when searching for a translation,
but in Devtools there are strings that live in module.json files and
are exposed to i18n via a ModuleUIStrings.js file.

Fix:
There is already a mechanism for this kind of templating in the i18n
library which exposes a small subset of translations that match a
specific pattern, the fix is to change this pattern to match
ModuleUIStrings and to also include this as part of the translation
resolution.
Change-Id: If44a84a9b5892558bf832e6d08ea36d1a8f4ddd1
Bug: 1136655
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2459638
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-10-09 01:57:37 +00:00
vidorteg 3e2942e2b8 Removing i18n-bundle.js generation on build time.
This PR removes the i18n-bundle.js bundle generation, instead the file
is generated beforehand and checked in so it can be consumed like any
other module.

Bug: 1127204
Change-Id: I79e8369269d0cd1885d6d9fc2346dddf3af1a5a4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2411415
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2020-09-17 17:07:18 +00:00
vidorteg ee1553b7cb Localization: Bundling third_party/i18n
This CL is part of the Infrastucture phase, it:
- Generates a bundle of the third_party/i18n/i18n/js library
using buildi18nBundle script.
- Creates a target to generate the bundle on build time.

Change-Id: Ibacda39751422f5cf8622d318ebf7f153740a7dd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2238616
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2020-07-06 17:40:31 +00:00