shopify-accelerate-app 1.0.53 → 1.0.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -292,17 +292,14 @@ export const generateLiquidFiles = (final?: boolean, cssOutput?: string) => {
|
|
|
292
292
|
encoding: "utf-8",
|
|
293
293
|
}) ?? "{}"
|
|
294
294
|
);
|
|
295
|
+
const mergedTranslations = mergeLocales(translations, defaultSourceTranslations);
|
|
295
296
|
|
|
296
297
|
const translationsJs = `<script>
|
|
297
|
-
window.
|
|
298
|
-
mergeLocales(transformTranslations(translations), transformTranslations(defaultSourceTranslations)),
|
|
299
|
-
undefined,
|
|
300
|
-
2
|
|
301
|
-
)};
|
|
298
|
+
window._listify_translations = ${JSON.stringify(transformTranslations(mergedTranslations), undefined, 2)};
|
|
302
299
|
</script>
|
|
303
300
|
`;
|
|
304
301
|
|
|
305
|
-
const translationTypes = `export type Translations = ${JSON.stringify(
|
|
302
|
+
const translationTypes = `export type Translations = ${JSON.stringify(mergedTranslations, undefined, 2)
|
|
306
303
|
.replace(/(\s+)([^\n:]*):([^\n{]*?),?\n/gi, "$1/* $3 */\n$1$2: string;\n")
|
|
307
304
|
.replace(/"/gi, "")
|
|
308
305
|
.replace(/,/gi, ";")
|
|
@@ -310,14 +307,14 @@ export const generateLiquidFiles = (final?: boolean, cssOutput?: string) => {
|
|
|
310
307
|
.replace(/\n\n/gi, "\n")};
|
|
311
308
|
declare global {
|
|
312
309
|
interface Window {
|
|
313
|
-
|
|
310
|
+
_listify_translations?: Translations;
|
|
314
311
|
}
|
|
315
312
|
}
|
|
316
313
|
`;
|
|
317
314
|
|
|
318
315
|
writeCompareFile(
|
|
319
316
|
path.join(process.cwd(), extension_path, "locales", "en.default.json"),
|
|
320
|
-
JSON.stringify(
|
|
317
|
+
JSON.stringify(mergedTranslations, undefined, 2)
|
|
321
318
|
);
|
|
322
319
|
writeCompareFile(path.join(process.cwd(), extension_path, "snippets", "translations.liquid"), translationsJs);
|
|
323
320
|
writeCompareFile(path.join(folders.snippets, "translations.liquid"), translationsJs);
|