locale-guard v1.3.0 minor

by Mohamed Almearag ·

The Locale Guard comment on a pull request: a key missing in Arabic and German, a broken placeholder and a broken linked message in Arabic.

Checks translation files on every pull request and in git hooks: missing keys, broken placeholders

#typescript #cli #devtools #mit #ai-assisted

Changelog

Locale Guard checks translation files on every pull request: missing keys, broken placeholders, plural forms and untranslated text, for vue-i18n, Nuxt, next-intl, react-intl, i18next and Rails. The same checks now run on your machine and in git hooks with locale-guard-cli.

- uses: Mohamed-Almarag/locale-guard@v1
  with:
    files: locales/{locale}.json
    format: vue-i18n
npx locale-guard-cli

Set format to your library: vue-i18n, @nuxtjs/i18n, next-intl, react-intl, react-i18next or json. Rails I18n uses json.

See the README for every setting, the CLI and git hooks, and a weekly full report.

Added
  • locale-guard-cli, a CLI on npm that runs the same checks on your machine and in git hooks. By default it reports only the issues added since the last commit. --staged checks a commit before it is made, --base compares with a branch, --all lists every issue, and --output writes the report as Markdown, the same as the pull request comment. It reads .localeguard.yml, and the settings that choose what to check can be given as options too.
  • ignore-tags reads ICU tags such as <b> as plain text, for projects that format messages with intl-messageformat's ignoreTag option.
  • keys-as-text reads an empty base value as its key, for projects whose keys are the base text.
Changed
  • Updated @intlify/message-compiler to 11.4.16, and the build to rollup 4.64.10.
Fixed
  • A comment section longer than the comment limit was left out whole, so a pull request that added a locale to a project with 350 keys or more got a comment with no issue in it. The section now shows the rows that fit, and errors come first.
  • When the job summary reaches its size limit, its last line tells you to run the CLI to list every issue.

Links

← Back to the feed