mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-09-28 13:13:37 +08:00
[ComponentServer] load locale from sharedResourcesBase
The locale is considered a shared resource, so when we load it we should use the sharedResourcesBase argument that can be supplied when instantiating the server. Bug: none Change-Id: Ic89b27bcd12b514e3efbef20a550062fcd871680 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3109847 Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
This commit is contained in:
committed by
Devtools-frontend LUCI CQ
parent
49556e02b5
commit
2ef4d05706
@@ -294,7 +294,8 @@ async function requestHandler(request, response) {
|
||||
let fullPath = path.join(componentDocsBaseFolder, filePath);
|
||||
if (fullPath.endsWith(path.join('locales', 'en-US.json'))) {
|
||||
// Rewrite this path so we can load up the locale in the component-docs
|
||||
fullPath = path.join(componentDocsBaseFolder, 'front_end', 'core', 'i18n', 'locales', 'en-US.json');
|
||||
fullPath =
|
||||
path.join(componentDocsBaseFolder, sharedResourcesBase, 'front_end', 'core', 'i18n', 'locales', 'en-US.json');
|
||||
}
|
||||
|
||||
if (!fullPath.startsWith(devtoolsRootFolder) && !fileIsInTestFolder) {
|
||||
|
||||
Reference in New Issue
Block a user