rich_i18n_cli 0.1.2 copy "rich_i18n_cli: ^0.1.2" to clipboard
rich_i18n_cli: ^0.1.2 copied to clipboard

A CLI tool for verifying rich i18n text in ARB translation files and generating error reports.

rich_i18n_cli #

package badge pub points pub likes codecov ci badge license pub publisher

A CLI tool for verifying rich i18n text in ARB translation files and generating error reports.

Installation #

dart pub global activate rich_i18n_cli

Usage #

# verify rich i18n using l10n.yaml configuration file and saving report to "text_rich_i18n_styled_error" file
rich_i18n_cli verify

# verify rich i18n using arb-dir directory and saving report to "text_rich_i18n_styled_error" file
rich_i18n_cli verify --arb-dir my_arb_dir

# verify rich i18n using arb-dir directory and saving report to "report.txt" file
rich_i18n_cli verify --arb-dir my_arb_dir --output report.txt

# more info about usage
rich_i18n_cli verify --help

verify #

output #

The verify command generates a report file containing statistics and errors for each ARB file analyzed. The report structure includes:

  • validKeys: Number of translation keys that passed validation
  • invalidKeys: Number of translation keys with errors
  • errors: Object mapping translation keys to their error messages

Example #

Given an ARB file (arb/en.arb):

{
    "title": "Hello <b>World</b>!",
    "description": "Malformed <b>text", // tag is not closed
    "body": "Unrecognized <foo>tag</foo>" // foo is not a valid tag in rich_text
}

The generated report will be:

{
  "./arb/en.arb": {
    "validKeys": 1,
    "invalidKeys": 2,
    "errors": {
      "description": "Invalid XML tag: Expected </b>, but found </root>",
      "body": "Unrecognized tag: foo"
    }
  }
}
0
likes
160
points
146
downloads

Publisher

verified publishermattiapispisa.it

Weekly Downloads

A CLI tool for verifying rich i18n text in ARB translation files and generating error reports.

Homepage
Repository (GitHub)
View/report issues

Topics

#i18n #l10n #arb #rich-text

Documentation

API reference

License

MIT (license)

Dependencies

args, cli_completion, mason_logger, path, pub_updater, rich_i18n, yaml

More

Packages that depend on rich_i18n_cli