Skip to content
This repository has been archived by the owner on May 2, 2022. It is now read-only.

Sync missing translation keys in app/locales/*.json files to a Google Sheet #481

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
avoid rate limit
  • Loading branch information
michaelmcmillan committed Mar 29, 2020
commit e2def1ed76a3329d639d3e538b44b9aae07645e5
4 changes: 4 additions & 0 deletions ops/lost-in-translation.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ for (const locale of allLocales) {
const addedRows = await addUniqueRowsToGoogleSheet(sheet, rows);
console.log(`Added ${addedRows.length} of ${rows.length} missing translations to the ${locale} sheet.`);
}

// Avoid getting rate limited by Google's API by waiting 100 seconds between each sheet.
console.log('Waiting a 100 seconds before processing the next sheet.');
await new Promise(resolve => setTimeout(resolve, 100*1000));
}

})();