shopify-accelerate-app 1.0.58 → 1.0.60
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
|
@@ -283,7 +283,7 @@ export const generateLiquidFiles = (final?: boolean, cssOutput?: string) => {
|
|
|
283
283
|
}, {});
|
|
284
284
|
}
|
|
285
285
|
if (typeof input === "string") {
|
|
286
|
-
return `{{ '${prevKey}' | t }}`;
|
|
286
|
+
return `{{ '${prevKey}' | t | json }}`;
|
|
287
287
|
}
|
|
288
288
|
};
|
|
289
289
|
|
|
@@ -300,7 +300,7 @@ export const generateLiquidFiles = (final?: boolean, cssOutput?: string) => {
|
|
|
300
300
|
`;
|
|
301
301
|
|
|
302
302
|
const translationTypes = `export type Translations = ${JSON.stringify(mergedTranslations, undefined, 2)
|
|
303
|
-
.replace(/(\s+)([^\n:]*):\s+([^\n{]*?),?\n/gi, "$1$
|
|
303
|
+
.replace(/(\s+)([^\n:]*):\s+([^\n{]*?),?\n/gi, "\n$1$2: `$3`;\n")
|
|
304
304
|
.replace(/"/gi, "")
|
|
305
305
|
.replace(/,/gi, ";")
|
|
306
306
|
.replace(/`/gi, '"')
|
|
@@ -317,8 +317,11 @@ declare global {
|
|
|
317
317
|
path.join(process.cwd(), extension_path, "locales", "en.default.json"),
|
|
318
318
|
JSON.stringify(mergedTranslations, undefined, 2)
|
|
319
319
|
);
|
|
320
|
-
writeCompareFile(
|
|
321
|
-
|
|
320
|
+
writeCompareFile(
|
|
321
|
+
path.join(process.cwd(), extension_path, "snippets", "translations.liquid"),
|
|
322
|
+
translationsJs.replace(/"\{\{/gi, "{{").replace(/}}"/gi, "}}")
|
|
323
|
+
);
|
|
324
|
+
writeCompareFile(path.join(folders.snippets, "translations.liquid"), translationsJs.replace(/"\{\{/gi, "{{").replace(/}}"/gi, "}}"));
|
|
322
325
|
writeCompareFile(path.join(folders.types, "translations.ts"), translationTypes);
|
|
323
326
|
|
|
324
327
|
const dynamicJsImports = [];
|