Commit Graph
4 Commits
Author SHA1 Message Date
Tim van der Lippe ba26b2b503 Run ESLint on the scripts directory
We weren't running ESLint on this directory and, as it turns out, there
are quite a few linter errors in this folder.

R=jacktfranklin@chromium.org

Change-Id: Ic6cb9f6ad4858f69114e0c433a954041215b49e2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2096705
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-03-11 14:47:51 +00:00
vidorteg 7a077810bd Updating paths on generate_devtools_ui_strings.js
Localization scripts got moved from localization_utils to
localization/utils, this script needs to be updated to reflect the
change.

Change-Id: I0a942d928687e3df767e508b25a286be026f0dcb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1959090
Reviewed-by: Mandy Chen <mandy.chen@microsoft.com>
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
2019-12-10 00:11:50 +00:00
Lorne Mitchell 0a1c649850 DevTools: Updated the generate_devtools_ui_strings.js/.py scripts to reference the new repo location.
Bug: 941561
Change-Id: I80d8f3a2a6fe3662985c257786e9a7cecfa5a53b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1888518
Reviewed-by: Mike Jackson <mjackson@microsoft.com>
Reviewed-by: Vidal Diazleal <vidorteg@microsoft.com>
Commit-Queue: Lorne Mitchell <lomitch@microsoft.com>
2019-10-30 15:15:34 +00:00
Mandy Chen e64996c39e DevTools: Add scripts to generate id mapping for localizable strings
The backend changes[1] for localizing devtools leverage the existing
webui functionalities, which consume a list of id mappings from the id
of a string used in the frontend (i.e. the English string) to the IDS_
key of the string in the corresponding grdp file. Example:

const LocalizedString kLocalizedStrings[] = {
  ...
  {"Editable", IDS_DEVTOOLS_2c09e798bf8c5a82d211331c82893a0f},
  ...
}

This patch adds scripts that generate the structure. The output will be
two files, devtools_ui_strings_map.h and .cc, under
<generated files root directory>/chrome/browser/ui/webui
(e.g. D:/chromium/src/out/Release/gen/chrome/browser/ui/webui).

The design is to create a build step that calls generate_devtools_ui_strings.py,
which then calls generate_devtools_ui_strings.js. Integration into the build
system will come as a another patch, because it depends on the first set of
changes[2].

Example arguments to generate_devtools_ui_strings.js to generate output
files (invoke under '--root_gen_dir', e.g. D:/chromium/src/out/release/gen
in the example below):

['D:/chromium/src/third_party/node/win/node.exe',
'D:/chromium/src/third_party/blink/renderer/devtools/scripts/build/generate_devtools_ui_strings.js',
'--root_gen_dir', 'D:/chromium/src/out/release/gen',
'--output_header', 'chrome/browser/ui/webui/devtools_ui_strings_map.h',
'--output_cc', 'chrome/browser/ui/webui/devtools_ui_strings_map.cc']

[1]: https://crrev.com/c/1672628
[2]: https://crrev.com/c/1628927

Bug: 941561
Change-Id: Ic03dae24cd074219790c6eec5df3183c24bf15a0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1671848
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Mandy Chen <mandy.chen@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#699370}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3927e5494ba1866261dc577d8f93660fd9f04b5d
2019-09-24 16:12:59 +00:00