locale-guard v1.3.0 minor
Checks translation files on every pull request and in git hooks: missing keys, broken placeholders
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.--stagedchecks a commit before it is made,--basecompares with a branch,--alllists every issue, and--outputwrites 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-tagsreads ICU tags such as<b>as plain text, for projects that format messages with intl-messageformat'signoreTagoption.keys-as-textreads an empty base value as its key, for projects whose keys are the base text.
Changed
- Updated
@intlify/message-compilerto 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
- source code
- homepage
- license: MIT