gsheet_to_arb 0.0.2+1 copy "gsheet_to_arb: ^0.0.2+1" to clipboard
gsheet_to_arb: ^0.0.2+1 copied to clipboard

outdated

Imports Application Resource Bundle (ARB) from Google Sheets documents

GSheet to ARB #

Imports Application Resource Bundle (ARB) from Google Sheets

Setup #

Google Sheet API key #

  1. Create a new project in 'Google Cloud Platform' console (you can use existing one)
  2. Select "ENABLE APIS AND SERVICES" button and make sure "Google Sheets API" is enabled
  3. Open "Credentials" tab of the project
  4. Create credentials -> Create OAuth client ID -> Other
    • you may need to configure consent screen
  5. Save your client_id and client_secret

Create Google Sheet from the template #

  1. Open sample Google spreadsheet available at:

  2. Copy sample to your Drive account

    • File -> Make a copy
  3. Save document_id of the Google spreadsheet

Configure your Dart project #

  1. Add gsheet_to_arb dev dependency to the pubspec.yaml

    dev_dependencies:
      gsheet_to_arb: ^0.0.2
    
  2. pub update

  3. Create plugin configuration e.g. gsheet_to_arb.yaml

    gsheet_to_arb:
      gsheet:
        client_id: '<google_api_client_id>'
        client_secret: '<google_api_secret>'
        document_id: '<google_sheet_id>'
    

You shouldn't share API secrets in VCSs, so add it to the .gitingore list

Import ARB files from the Google Sheet #

  1. 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 --output-dir=lib/src/i18n
    
  2. Click on the link displayed in the console

    Please go to the following URL and grant Google Spreasheet access:
      => https://accounts.google.com/o/oauth2/auth?response_type=code&...
    
  3. Log-in to the Google Account

Create Google Sheet template from existing ARB file #

Not implemented yet.

14
likes
0
pub points
29%
popularity

Publisher

verified publisherallbright.io

Imports Application Resource Bundle (ARB) from Google Sheets documents

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

analyzer, args, dart_style, googleapis, googleapis_auth, intl, path, petitparser

More

Packages that depend on gsheet_to_arb