Skip to content

Commit

Permalink
Update build process to detect empty locale components
Browse files Browse the repository at this point in the history
  • Loading branch information
ricktu288 committed Dec 12, 2024
1 parent e2131d2 commit 488f2fa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/buildScenes.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ langs.forEach((lang) => {
// Load the strings from /locales/{lang}/gallery.json if it exists.
const galleryStringsPath = path.join(__dirname, `../locales/${lang}/gallery.json`);
if (fs.existsSync(galleryStringsPath)) {
const galleryStrings = JSON.parse(fs.readFileSync(galleryStringsPath).toString()).galleryData;
const galleryData = JSON.parse(fs.readFileSync(galleryStringsPath).toString());
if (!galleryData.galleryData) {
return;
}
const galleryStrings = galleryData.galleryData;
// Extract the strings from the galleryStrings object.
sceneIDs.forEach((id) => {
if (galleryStrings[sceneIDToCamelCase[id]]) {
Expand Down

0 comments on commit 488f2fa

Please sign in to comment.