{"id":32269547,"url":"https://github.com/gocal/gsheet_to_arb","last_synced_at":"2026-02-23T11:03:30.535Z","repository":{"id":49588505,"uuid":"157870521","full_name":"gocal/gsheet_to_arb","owner":"gocal","description":"Import translations (ARB/Dart) from Google Sheets","archived":false,"fork":false,"pushed_at":"2021-06-13T09:00:50.000Z","size":460,"stargazers_count":32,"open_issues_count":9,"forks_count":30,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-11-27T16:59:46.567Z","etag":null,"topics":["arb","arb-files","dart","flutter","google-sheets","google-spreadsheet","gsheet","yaml"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/gsheet_to_arb","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gocal.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-16T13:22:09.000Z","updated_at":"2025-05-09T02:04:17.000Z","dependencies_parsed_at":"2022-09-13T09:12:38.699Z","dependency_job_id":null,"html_url":"https://github.com/gocal/gsheet_to_arb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gocal/gsheet_to_arb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocal%2Fgsheet_to_arb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocal%2Fgsheet_to_arb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocal%2Fgsheet_to_arb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocal%2Fgsheet_to_arb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gocal","download_url":"https://codeload.github.com/gocal/gsheet_to_arb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocal%2Fgsheet_to_arb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29741258,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arb","arb-files","dart","flutter","google-sheets","google-spreadsheet","gsheet","yaml"],"created_at":"2025-10-22T22:27:08.685Z","updated_at":"2026-02-23T11:03:30.525Z","avatar_url":"https://github.com/gocal.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Import translations from Google Sheets \n\n[![pub package](https://img.shields.io/pub/v/gsheet_to_arb.svg)](https://pub.dartlang.org/packages/gsheet_to_arb)\n\n\n- Import [Application Resource Bundle](https://github.com/googlei18n/app-resource-bundle/wiki/ApplicationResourceBundleSpecification) (ARB) from Google Sheets\n- automatically create Dart [intl](https://pub.dev/packages/intl) classes\n- group translations by categories (context) \n- supports placeholders and plurals\n\n## Usage\n\n### Import Translation files from the Google Sheet\n\n1. [Setup](#setup) plugin configuration yaml file (you only need to do it once.)\n\n2. Import ARB and Dart source files from the Google Sheet\n\n    ```\n    pub run gsheet_to_arb:import\n    ```\n    or for flutter\n\n    ```\n    flutter pub run gsheet_to_arb:import\n    ```\n\n ![](doc/gsheet.png) \n\n\n## Setup\n\n### 1. Create translation spreadsheet based on the [template](https://docs.google.com/spreadsheets/d/1CwFRjtiCmCl8yvP55yBT70h-Yt00CcigD816hsGo7KU/edit?usp=sharing)\n\n\n- Copy the template to your Drive account - `File -\u003e Make a copy`\n\n- Save `DOCUMENT_ID` of your spreadsheet *https://docs.google.com/spreadsheets/d/DOCUMENT_ID/edit#gid=0*\n\n- For more details about spreasheet structure see [Spreadsheet format](#Spreadsheet-format) section\n\n### 2. Create [Google Sheets API credentials](doc/Authentication.md) either by using Client or Server authentication.\n\n### 3. Configure your Dart project\n\n1. Add gsheet_to_arb dev dependency to the pubspec.yaml\n    ```yaml\n    dev_dependencies:\n      gsheet_to_arb: ^0.1.8\n    ```\n\n2. Updated dependencies\n    ```pub update```\n\n3. Create plugin configuration\n    ```yaml\n    pub run gsheet_to_arb:import --create-config\n    ```\n- It will add plugin configuration to the `pubspec.yaml` file and create `gsheet_to_arb.yaml` authentication file for the gsheet credentials\n\n4. Update plugin configuration created in ```pubspec.yaml``` e.g.\n    ```yaml\n    gsheet_to_arb: \n        arb_file_prefix: 'intl' # suffix of the created arb files e.g. intl_en.arb\n        localization_file_name: 'l10n' # Genrated intl dart file name e.g. L10n.dart\n        output_directory: 'lib/l10n' # where all the dart and arb data are stored\n        add_context_prefix: false # should add category prefix to the keys e.g. common_app_title\n        gsheet: \n            auth_file: './gsheet_to_arb.yaml' # file with the gsheet authentication configuration\n            category_prefix: \"# \" \n            document_id: 'TODO'\n            sheet_id: '0'\n            columns: # This is an optional setting, if unused will fallback to default values\n                key: 0 # The column where the key for the translation is, defaults to 0\n                description: 1 # The column where the description is, defaults to 1\n                first_language_key: 2 # The first column for the language copy, assumes that all other columns after this one also contains a language translation, defaults to 2\n            rows: # This is an optional setting, if unused will fallback to default values\n                header_row: 0 # The header row containing the title for each column, such as language codes, defaults to 0\n                first_translation_row: 1 # The first row containing transaltions that should be parsed, assumes that all rows after this one also should be parsed, defaults 1\n    ```\n\n5. Update gsheet authentication configuration created in ```gsheet_to_arb.yaml```\n- either add client\n    ```yaml\n    oauth_client_id: \n        client_id: \"TODO\"\n        client_secret: \"TODO\"\n    ```\n- or server credentials\n    ```yaml\n    service_account_key: \n        client_id: \"TODO\"\n        client_email: \"TODO\"\n        private_key: \"TODO\"\n    ```\n---   \n\n## Spreadsheet format\n\n### Rows\n\n- the first row is reserved for the header section and contains label of the related columns\n- other rows\n    - if rows start with the `category_prefix` value (`# ` default) all the following rows will use the category as a context (see: ARB context, and `add_context_prefix` parameter)\n    - empty rows are ignored\n    - rows with an empty key column are ignored\n\n### Columns\n\n- the first column `key` contains either key name or category prefix\n- the second column `description` contains item description\n- all the following column (language codes e.g. `en`, `pl` etc.) contains traslation files\n- will start parsing from the first language column and stop parsing on the last column or the first empty column, which ever comes first\n\n### Values\n- Placeholder \n    - simply add `{placeholder_name}` to the translation\n\n- Plurals\n    - plurals are identified by the key metadata - if key ends with one of the following\n        - zero, one, two, few, many, other - it's considered as a plural\n        - plural use special placeholder `{count}` to mark value provied as a translation parameter\n\n## TODO\n- support placeholder parameter types (e.g. int, date, text, double) - {items, int}\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgocal%2Fgsheet_to_arb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgocal%2Fgsheet_to_arb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgocal%2Fgsheet_to_arb/lists"}