[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>
diff --git a/scripts/component_server/server.js b/scripts/component_server/server.js
index d1a3e1f..706f7b2 100644
--- a/scripts/component_server/server.js
+++ b/scripts/component_server/server.js
@@ -294,7 +294,8 @@
     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) {