{"id":18406410,"url":"https://github.com/defuncart/arb_generator","last_synced_at":"2025-04-07T08:32:24.876Z","repository":{"id":43010682,"uuid":"353963005","full_name":"defuncart/arb_generator","owner":"defuncart","description":"A dart tool which generates ARB files from CSV files.","archived":false,"fork":false,"pushed_at":"2024-10-20T10:14:19.000Z","size":433,"stargazers_count":4,"open_issues_count":3,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-22T15:22:57.496Z","etag":null,"topics":["arb","csv","dart","flutter","l10n","tool"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/defuncart.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,"governance":null}},"created_at":"2021-04-02T08:56:52.000Z","updated_at":"2024-10-20T10:14:03.000Z","dependencies_parsed_at":"2023-11-12T10:30:24.190Z","dependency_job_id":"69f27100-a5f8-4cd6-ab77-70972da9ea2a","html_url":"https://github.com/defuncart/arb_generator","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"fda107ade5d4c8e3011a9e1f1a0d6566fd48b1e5"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defuncart%2Farb_generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defuncart%2Farb_generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defuncart%2Farb_generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defuncart%2Farb_generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/defuncart","download_url":"https://codeload.github.com/defuncart/arb_generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247620416,"owners_count":20968208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","csv","dart","flutter","l10n","tool"],"created_at":"2024-11-06T03:08:55.309Z","updated_at":"2025-04-07T08:32:23.405Z","avatar_url":"https://github.com/defuncart.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# arb_generator\n\nA dart tool which generates ARB files from CSV files.\n\n## Getting Started\n\nA CSV file of the form\n\n|keys|description|en|de|\n|-|-|-|-|\n|myKey|The conventional newborn programmer greeting|Hello world!|Hallo Welt!|\n|welcome|A welcome message|Welcome {firstName}!|Willkommen {firstName}!|\n|numberMessages|An info message about new messages count|{count, plural, zero{You have no new messages} one{You have 1 new message} other{You have {count} new messages}}|{count, plural, zero{Du hast keine neue Nachrichten} one{Du hast eine neue Nachricht} other{Du hast {count} neue Nachrichten}}|\n|whoseBook|A message determine whose book it is|{sex, select, male{His book} female{Her book} other{Their book}}|{sex, select, male{Sein Buch} female{Ihr Buch} other{Ihr Buch}}|\n\nis generated into the following ARB file\n\n```json\n{\n  \"@@locale\": \"en\",\n  \"myKey\": \"Hello world!\",\n  \"@myKey\": {\n    \"description\": \"The conventional newborn programmer greeting\"\n  },\n  \"welcome\": \"Welcome {firstName}!\",\n  \"@welcome\": {\n    \"description\": \"A welcome message\"\n  },\n  \"numberMessages\": \"{count, plural, zero{You have no new messages} one{You have 1 new message} other{You have {count} new messages}}\",\n  \"@numberMessages\": {\n    \"description\": \"An info message about new messages count\"\n  },\n  \"whoseBook\": \"{sex, select, male{His book} female{Her book} other{Their book}}\",\n  \"@whoseBook\": {\n    \"description\": \"A message determine whose book it is\"\n  }\n}\n```\n\nThis ARB file can then be converted into localization delegates using [intl](https://docs.flutter.dev/development/accessibility-and-localization/internationalization) or [intl_utils](https://pub.dev/packages/intl_utils).\n\n### Add dependency\n\nFirstly, add the package as a dev dependency:\n\n```yaml   \ndev_dependencies: \n  arb_generator:\n```\n\n### Define Settings\n\nNext define arb_generator package settings in `pubspec.yaml`. Note that `input_filepath` is the only required parameter.\n\n```yaml\narb_generator:\n  input_filepath: \"assets_dev/test.csv\"\n  output_directory: \"lib/l10n\"\n  filename_prepend: \"intl_\"\n  csv_settings:\n    delimiter: \";\"\n    description_index: 1\n    base_index: 2\n```\n\n| Setting                         | Description                                                                   |\n| ------------------------------- | ------------------------------------------------------------------------------|\n| input_filepath                  | Required. A path to the input CSV file.                                       |\n| output_directory                | A directory to generate the output ARB file(s). Defaults to `lib/l10n`        |\n| filename_prepend                | Text to prepend to filename of generated files. Defaults to empty string.     |\n| csv_settings: delimiter         | A delimiter to separate columns in the input CSV file. Defaults to `,`.       |\n| csv_settings: description_index | The description column index. Defaults to `null`.                             |\n| csv_settings: base_index        | The column index of the base language in the input CSV file. Defaults to `1`. |\n\n### Run package\n\nEnsure that your current working directory is the project root and run the following command:\n\n```sh\ndart run arb_generator\n```\n\nARB files are then generated in `output_directory`.\n\n## Collaboration\n\nSpotted any issues? Please open [an issue on GitHub](https://github.com/defuncart/arb_generator/issues)! Would like to contribute a new feature? Fork the repo and submit a PR!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefuncart%2Farb_generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdefuncart%2Farb_generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefuncart%2Farb_generator/lists"}