{"id":15538161,"url":"https://github.com/lsaudon/l10nization_cli","last_synced_at":"2025-04-23T15:24:10.577Z","repository":{"id":65850243,"uuid":"600032141","full_name":"lsaudon/l10nization_cli","owner":"lsaudon","description":"A Command-Line Interface to find unused l10n translations from an arb file.","archived":false,"fork":false,"pushed_at":"2024-12-18T20:51:39.000Z","size":341,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-22T07:07:34.904Z","etag":null,"topics":["dart","flutter","hacktoberfest","intl","l10n","localization"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/l10nization_cli","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/lsaudon.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,"roadmap":null,"authors":null}},"created_at":"2023-02-10T12:36:27.000Z","updated_at":"2024-12-18T20:51:42.000Z","dependencies_parsed_at":"2024-01-23T22:30:22.253Z","dependency_job_id":null,"html_url":"https://github.com/lsaudon/l10nization_cli","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsaudon%2Fl10nization_cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsaudon%2Fl10nization_cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsaudon%2Fl10nization_cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsaudon%2Fl10nization_cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lsaudon","download_url":"https://codeload.github.com/lsaudon/l10nization_cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250458326,"owners_count":21433852,"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":["dart","flutter","hacktoberfest","intl","l10n","localization"],"created_at":"2024-10-02T12:02:14.995Z","updated_at":"2025-04-23T15:24:10.558Z","avatar_url":"https://github.com/lsaudon.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"## L10nization_cli\n\n[![Pub Version][pub_version_badge]][pub_package_link]\n[![Pub Points][pub_points_badge]][pub_points_link]\n[![License: MIT][license_badge]][license_link]\n\nA Command-Line Interface to find unused l10n translations from an arb file.\n\n---\n\n## Getting Started 🚀\n\nIf the CLI application is available on [pub](https://pub.dev), activate globally via:\n\n```sh\ndart pub global activate l10nization_cli\n```\n\n## Usage\n\n```sh\n# Check unused translations\nl10nization check-unused \u003cfolder-of-app\u003e\n```\n\n### Cases considered\n\n```dart\nreturn Text(context.l10n.hello);\n```\n\n```dart\nfinal l10n = AppLocalizations.of(context);\nreturn Text(l10n.a);\n```\n\n```dart\nfinal l10n = context.l10n;\nreturn Text(l10n.a);\n```\n\n```dart\nreturn Text(AppLocalizations.of(context).a);\n```\n\n```dart\nclass MyWidget extends StatelessWidget {\n  const MyWidget({\n    required this.l10n,\n    super.key,\n  });\n\n  final AppLocalizations l10n;\n\n  @override\n  Widget build(BuildContext context) {\n    return Text(l10n.helloMoon);\n  }\n}\n```\n\n```dart\nabstract class MySuperWidget extends StatelessWidget {\n  const MySuperWidget({\n    required this.l10n,\n    super.key,\n  });\n\n  final AppLocalizations l10n;\n}\n\nclass MyWidget extends MySuperWidget {\n  const MyWidget({\n    required super.l10n,\n    super.key,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return Text(l10n.helloMoon);\n  }\n}\n```\n\n```dart\nextension AppLocalizationsExtension on AppLocalizations {\n  String byKey(final String value) {\n    switch (value) {\n      case 'helloMars':\n        return helloMars;\n      default:\n        throw Exception();\n    }\n  }\n}\n```\n\n```dart\nString function(AppLocalizations l10n) {\n  return l10n.helloMoon;\n}\n```\n\n```dart\nString function(AppLocalizations l10n) =\u003e l10n.helloMoon;\n```\n\n```dart\nfinal l10n = context.l10n;\nreturn Text(l10n.a(b));\n```\n\n```dart\nreturn Text(context.l10n.a(b));\n```\n\n## Running locally\n\n```sh\ndart pub global activate --source=path . \u0026\u0026 l10nization check-unused example\n```\n\n## Running Tests with coverage 🧪\n\nTo run all unit tests use the following command:\n\n```sh\ndart pub global activate coverage\ndart test --coverage=coverage\ndart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info\n```\n\nTo view the generated coverage report you can use [lcov](https://github.com/linux-test-project/lcov).\n\n```sh\n# Generate Coverage Report\ngenhtml coverage/lcov.info -o coverage/\n\n# Open Coverage Report\nopen coverage/index.html\n```\n\n## Build version\n\n```sh\ndart run build_runner build -d\n```\n\n---\n\nGenerated by the [Very Good CLI][very_good_cli_link] 🤖\n\n[license_badge]: https://img.shields.io/github/license/lsaudon/l10nization_cli\n[license_link]: https://img.shields.io/github/license/lsaudon/l10nization_cli\n[very_good_cli_link]: https://github.com/VeryGoodOpenSource/very_good_cli\n[pub_points_badge]: https://img.shields.io/pub/points/l10nization_cli\n[pub_version_badge]: https://img.shields.io/pub/v/l10nization_cli\n[pub_package_link]: https://pub.dev/packages/l10nization_cli\n[pub_points_link]: https://pub.dev/packages/l10nization_cli/score\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flsaudon%2Fl10nization_cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flsaudon%2Fl10nization_cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flsaudon%2Fl10nization_cli/lists"}