Imports Application Resource Bundle (ARB) from Google Sheets
https://github.com/googlei18n/app-resource-bundle/wiki/ApplicationResourceBundleSpecification
-
Setup plugin configuration
-
To import ARB files from Google Sheet run the
gsheet_to_arb:import
program.pub run gsheet_to_arb:import --config gsheet_to_arb.yaml
-
Optionally generate Dart classes from the ARB files using
gsheet_to_arb:arb_to_dart
program.pub run gsheet_to_arb:arb_to_dart --config gsheet_to_arb.yaml
-
Open sample Google spreadsheet template available at:
-
Copy sample to your Drive account
- File -> Make a copy
-
Save
DOCUMENT_ID
of the Google spreadsheet
Create Google Sheets API credentials either by using Client or Server authentication.
-
Add gsheet_to_arb dev dependency to the pubspec.yaml
dev_dependencies: gsheet_to_arb: ^0.0.8
-
Updated dependencies
pub update
-
Create plugin configuration
pub run gsheet_to_arb:import --create-config gsheet_to_arb.yaml
-
Update plugin configuration
gsheet_to_arb.yaml
e.g.gsheet_to_arb: arb_file_prefix: 'intl' output_directory: 'lib/src/i18n' gsheet: document_id: '<DOCUMENT_ID>' sheet_id: '0' auth: service_account_key_path: "~/.ssh/gsheet-to-arb-server-config.json"
- Support ARB plurals