@el-j/google-sheet-translations 2.1.0 → 2.1.1

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/dist/esm/index.js CHANGED
@@ -394,11 +394,8 @@ function convertToDataJsonFormat(translationObj, locales) {
394
394
  projectData[sheetTitle] = {};
395
395
  for (const locale of locales) {
396
396
  if (translationObj?.[locale]?.[sheetTitle]) {
397
- projectData[sheetTitle][locale] = {};
398
397
  const translations = translationObj[locale][sheetTitle];
399
- for (const key of Object.keys(translations)) {
400
- projectData[sheetTitle][locale][key] = translations[key];
401
- }
398
+ projectData[sheetTitle][locale] = { ...translations };
402
399
  console.log(
403
400
  `Found ${Object.keys(translations).length} keys for locale ${locale} in sheet ${sheetTitle}`
404
401
  );
package/dist/index.js CHANGED
@@ -459,11 +459,8 @@ function convertToDataJsonFormat(translationObj, locales) {
459
459
  projectData[sheetTitle] = {};
460
460
  for (const locale of locales) {
461
461
  if (translationObj?.[locale]?.[sheetTitle]) {
462
- projectData[sheetTitle][locale] = {};
463
462
  const translations = translationObj[locale][sheetTitle];
464
- for (const key of Object.keys(translations)) {
465
- projectData[sheetTitle][locale][key] = translations[key];
466
- }
463
+ projectData[sheetTitle][locale] = { ...translations };
467
464
  console.log(
468
465
  `Found ${Object.keys(translations).length} keys for locale ${locale} in sheet ${sheetTitle}`
469
466
  );
@@ -1 +1 @@
1
- {"version":3,"file":"convertToDataJsonFormat.d.ts","sourceRoot":"","sources":["../../../src/utils/dataConverter/convertToDataJsonFormat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAoB,MAAM,aAAa,CAAC;AAErE;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACtC,cAAc,EAAE,eAAe,EAC/B,OAAO,EAAE,MAAM,EAAE,GACf,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAuD3B;AAED,eAAe,uBAAuB,CAAC"}
1
+ {"version":3,"file":"convertToDataJsonFormat.d.ts","sourceRoot":"","sources":["../../../src/utils/dataConverter/convertToDataJsonFormat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAoB,MAAM,aAAa,CAAC;AAErE;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACtC,cAAc,EAAE,eAAe,EAC/B,OAAO,EAAE,MAAM,EAAE,GACf,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAmD3B;AAED,eAAe,uBAAuB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@el-j/google-sheet-translations",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "A package to manage translations stored in Google Spreadsheets",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/esm/index.js",