sfc-utils 1.4.79 → 1.4.80
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/copy/sheets.js +3 -0
- package/package.json +1 -1
package/copy/sheets.js
CHANGED
|
@@ -168,7 +168,9 @@ const processSheetData = async (
|
|
|
168
168
|
var { values } = response.data;
|
|
169
169
|
var header = values.shift();
|
|
170
170
|
var swapIndexes = [];
|
|
171
|
+
console.log("Swap type:", typeof languageSwap);
|
|
171
172
|
if (languageSwap) {
|
|
173
|
+
console.log("Running swap logic");
|
|
172
174
|
for (var i = 0; i < header.length; i++) {
|
|
173
175
|
var lastIndex = header[i].lastIndexOf("_");
|
|
174
176
|
if (lastIndex > -1) {
|
|
@@ -195,6 +197,7 @@ const processSheetData = async (
|
|
|
195
197
|
if (swapIndexes.indexOf(i) > -1) {
|
|
196
198
|
// If we have a swap index, swap the value
|
|
197
199
|
// NOTE: This assumes the translation is ALWAYS one cell to the right
|
|
200
|
+
// If we ever want to have MULTIPLE translations for a single key, we'll need seek out the actual matching key
|
|
198
201
|
try {
|
|
199
202
|
if (row[i + 1]) {
|
|
200
203
|
value = row[i + 1];
|