mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-09-30 09:17:09 +08:00
Make collect-strings work with .ts files
The current collect-strings only scan .js file extension. This CL enables string collecting in .ts files. Bug: 1136655 Change-Id: Ia6b4aa364496a80288edad49a471017923f71f05 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2575514 Reviewed-by: Simon Zünd <szuend@chromium.org> Reviewed-by: Peter Marshall <petermarshall@chromium.org> Reviewed-by: Patrick Brosset <patrick.brosset@microsoft.com> Reviewed-by: Vidal Diazleal <vidorteg@microsoft.com> Commit-Queue: Christy Chen <chrche@microsoft.com>
This commit is contained in:
Vendored
+1
@@ -16,3 +16,4 @@ Local Modifications:
|
||||
4. Remove pruneObsoleteLhlMessages() and check collisions step
|
||||
5. Implement getToken() to avoid requiring the exportVars (liveUIStrings) due to ESM limitation in collectAllStringsInDir()
|
||||
6. Remove backtick for locked term after converting it to placeholder in ctc.json
|
||||
7. Enable the scanning of files with .ts extensions
|
||||
|
||||
Vendored
+1
-1
@@ -561,7 +561,7 @@ function collectAllStringsInDir(dir) {
|
||||
/** @type {Record<string, CtcMessage>} */
|
||||
const strings = {};
|
||||
|
||||
const globPattern = path.join(path.relative(SRC_ROOT, dir), '/**/*.js');
|
||||
const globPattern = path.join(path.relative(SRC_ROOT, dir), '/**/*.{js,ts}');
|
||||
const files = glob.sync(globPattern, {
|
||||
cwd: SRC_ROOT,
|
||||
ignore: ignoredPathComponents,
|
||||
|
||||
Reference in New Issue
Block a user