gsheet_to_arb 0.1.1 copy "gsheet_to_arb: ^0.1.1" to clipboard
gsheet_to_arb: ^0.1.1 copied to clipboard

outdated

Imports Application Resource Bundle (ARB) from Google Sheets documents

GSheet to ARB - Import ARB Translation files from Google Sheet #

pub package

Imports Application Resource Bundle (ARB) from Google Sheets

https://github.com/googlei18n/app-resource-bundle/wiki/ApplicationResourceBundleSpecification

Usage #

Import ARB files from the Google Sheet #

  1. Setup plugin configuration yaml file - you only need to do it once.

  2. 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
    

Setup #

1. Copy Google Sheet template #

  1. Copy sample Google spreadsheet template available at:

  2. Copy sample to your Drive account

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

2. Authenticate #

Create Google Sheets API credentials either by using Client or Server authentication.

3. Configure your Dart project #

  1. Add gsheet_to_arb dev dependency to the pubspec.yaml

    dev_dependencies:
      gsheet_to_arb: ^0.1.0
    
  2. Updated dependencies pub update

  3. Create plugin configuration

    pub run gsheet_to_arb:import --create-config
    

    It will create gsheet_to_arb.yaml file in the root directory

  4. 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"
    

TODO #

  • Support ARB plurals