el-j/Fetch Google Sheet Translations

Fetch translations from Google Sheets and write locale JSON files, locales.ts index, and languageData.json snapshot.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
google-client-emailGoogle service-account client e-mail (GOOGLE_CLIENT_EMAIL). Required when using classic service-account key authentication. Omit when using Workload Identity Federation (WIF) — use google-github-actions/auth before this action instead. no""
google-private-keyGoogle service-account private key (GOOGLE_PRIVATE_KEY). Required when using classic service-account key authentication. Omit when using Workload Identity Federation (WIF) — use google-github-actions/auth before this action instead. no""
google-spreadsheet-idID of the Google Spreadsheet (GOOGLE_SPREADSHEET_ID). If omitted and auto-create is true, a new spreadsheet is created automatically.no""
sheet-titlesComma-separated list of sheet tab names to process (e.g. "landingPage,about"). The "i18n" sheet is always included automatically. yes
row-limitMaximum number of rows to read per sheetno100
wait-secondsSeconds to wait between consecutive Google Sheets write API calls (proactive throttle) and as the base back-off delay when retrying rate-limited calls (HTTP 429/503). Increase this value if you hit quota errors during sync or fresh-push with many keys. no1
translations-output-dirDirectory to write per-locale JSON translation filesnotranslations
locales-output-pathFile path for the generated locales.ts indexnosrc/i18n/locales.ts
data-json-pathFile path for the languageData.json snapshotnosrc/lib/languageData.json
sync-local-changesPush local changes from languageData.json back to the spreadsheet before fetching. Set to "false" to disable. notrue
auto-translateAutomatically add GOOGLETRANSLATE formulas for missing locale columns when new keys are pushed to the spreadsheet. Set to "true" to enable. nofalse
overrideWhen "true" and auto-translate is also "true", existing translations in other language columns are overwritten with GOOGLETRANSLATE formulas whenever a key is pushed. When "false" (the default) only empty cells receive a formula – existing translations are preserved. nofalse
clean-pushWhen "true", ALL keys from the local languageData.json are pushed to the spreadsheet – including keys that already exist there – and the file-timestamp guard is bypassed. Existing cell values are updated with the local value when they differ; whether other language columns receive GOOGLETRANSLATE formulas depends on the auto-translate and override flags. Useful when the file has been copied from another project and the spreadsheet needs a complete refresh. Default: "false". nofalse
auto-createAutomatically create a new Google Spreadsheet when no spreadsheet ID is provided. Requires google-client-email and google-private-key. notrue
spreadsheet-titleTitle for the auto-created spreadsheetnogoogle-sheet-translations
source-localeSource locale for GOOGLETRANSLATE formulas in the auto-created spreadsheetnoen
target-localesComma-separated target locales for auto-translation (e.g. "de,fr,es")node,fr,es,it,pt,ja,zh
node-versionDEPRECATED – no longer used. The action always runs on Node 20.no20
package-versionDEPRECATED – no longer used. The bundled package version is fixed at release time.nolatest
drive-folder-idGoogle Drive folder ID to scan for spreadsheets and/or images. When set, the action automatically discovers all Google Spreadsheet files inside the folder (and sub-folders) and fetches translations from each one. no
scan-for-spreadsheetsScan the drive-folder-id for Google Spreadsheet files automatically. Set to "false" to disable auto-discovery (useful when you supply spreadsheet-ids explicitly). notrue
spreadsheet-idsComma-separated list of additional spreadsheet IDs to fetch translations from, in addition to (or instead of) Drive folder auto-discovery. Example: "1abc…,1def…" no
sync-imagesWhen "true", downloads image assets from the Drive folder to the local path specified by image-output-path. Requires drive-folder-id. nofalse
image-output-pathLocal directory to download Drive images intono./public/remote-images
namedescription
translations-dirAbsolute path of the directory containing locale JSON files
locales-fileAbsolute path of the generated locales.ts file
data-json-fileAbsolute path of the languageData.json snapshot