Skip to content

Check `i18next` locale files for missing translations and common errors

Notifications You must be signed in to change notification settings

devoxa/i18next-test

Folders and files

NameName
Last commit message
Last commit date
Apr 22, 2025
Dec 5, 2024
Dec 5, 2024
Aug 5, 2023
Apr 30, 2021
Apr 30, 2021
Dec 21, 2024
Dec 5, 2024
Dec 21, 2024
Apr 23, 2025
Dec 21, 2024
Apr 23, 2025

Repository files navigation

i18next-test

Check i18next locale files for missing translations and common errors

Package Version Build Status Code Coverage

InstallationUsageContributorsLicense


Installation

yarn add @devoxa/i18next-test

Usage

i18next-test -c i18next-test.config.js
// i18next-test.config.js
module.exports = {
  // This is the default locale of your source files
  defaultLocale: 'en',

  // This is the path to your locale files on the file system, with the files named
  // following the `${localePath}/${locale}/${namespace}.json` pattern
  localePath: './public/locales',

  // This is the (unused) default namespace of your translations
  defaultNamespace: 'undefined',

  // (Optional) This is an array of regular expressions describing text that should not be in the
  // translations. It can be used for making sure that the overall voice of the translations
  // is consistent (e.g. that "sign in" is always used instead of "login").
  prohibitedText: [/\blog.?in\b/i],
}

Note that the configuration file has a similar structure to i18next-parser, so you can use a single file for both.

Contributors

Thanks goes to these wonderful people (emoji key):


David Reeß

💻 📖 ⚠️

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT

About

Check `i18next` locale files for missing translations and common errors

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published