All Projects → pixari → Vue I18n Extract

pixari / Vue I18n Extract

Licence: mit
Manage vue-i18n localization with static analysis

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to Vue I18n Extract

Weblate
Web based localization tool with tight version control integration.
Stars: ✭ 2,719 (+2110.57%)
Mutual labels:  hacktoberfest, i18n, internationalization
Eo Locale
🌏Internationalize js apps 👔Elegant lightweight library based on Internationalization API
Stars: ✭ 290 (+135.77%)
Mutual labels:  hacktoberfest, i18n, internationalization
Svelte I18n
Internationalization library for Svelte
Stars: ✭ 433 (+252.03%)
Mutual labels:  hacktoberfest, i18n, internationalization
Gatsby Starter Prismic I18n
Based on gatsby-starter-prismic with Internationalization (i18n) support
Stars: ✭ 77 (-37.4%)
Mutual labels:  i18n, internationalization
Angular I18next
angular v2.0+ integration with i18next v8.4+
Stars: ✭ 69 (-43.9%)
Mutual labels:  i18n, internationalization
Translala
Translation Toolbox for your Laravel/Symfony project (translate, stats, commons and dead translations reports, coverage, CI process)
Stars: ✭ 70 (-43.09%)
Mutual labels:  hacktoberfest, i18n
React Intl Hooks
React hooks for internationalization without the hassle ⚛️🌍
Stars: ✭ 64 (-47.97%)
Mutual labels:  i18n, internationalization
Babel Plugin I18next Extract
Babel plugin that statically extracts i18next and react-i18next translation keys.
Stars: ✭ 93 (-24.39%)
Mutual labels:  i18n, internationalization
Nativescript Localize
Internationalization plugin for NativeScript using native capabilities of each platform
Stars: ✭ 78 (-36.59%)
Mutual labels:  i18n, internationalization
Ajv I18n
Internationalised error messages for Ajv JSON-Schema validator
Stars: ✭ 98 (-20.33%)
Mutual labels:  i18n, internationalization
Pseudo Localization
Dynamic pseudo-localization in the browser and nodejs
Stars: ✭ 109 (-11.38%)
Mutual labels:  i18n, internationalization
Ifme
Free, open source mental health communication web app to share experiences with loved ones
Stars: ✭ 1,147 (+832.52%)
Mutual labels:  hacktoberfest, i18n
Locale2
💪 Try as hard as possible to detect the client's language tag ("locale") in node or the browser. Browserify and Webpack friendly!
Stars: ✭ 65 (-47.15%)
Mutual labels:  i18n, internationalization
Transloco
🚀 😍 The internationalization (i18n) library for Angular
Stars: ✭ 1,185 (+863.41%)
Mutual labels:  i18n, internationalization
Redux React I18n
An i18n solution for React/Redux and React Native projects
Stars: ✭ 64 (-47.97%)
Mutual labels:  i18n, internationalization
Keys Translations Manager
KTM, a locale management web app built on MERN stack, lets you manage and control locales in one place. It's particularly useful for someone who needs to manage multiple internationalization/localization projects.
Stars: ✭ 81 (-34.15%)
Mutual labels:  i18n, internationalization
Eslint Plugin I18n Json
Fully extendable eslint plugin for JSON i18n translation files.
Stars: ✭ 101 (-17.89%)
Mutual labels:  i18n, internationalization
Traduora
Ever® Traduora - Open-Source Translation Management Platform
Stars: ✭ 1,580 (+1184.55%)
Mutual labels:  internationalization, i18n
React Native Localize
🌍 A toolbox for your React Native app localization
Stars: ✭ 1,682 (+1267.48%)
Mutual labels:  i18n, internationalization
Texterify
The localization management system.
Stars: ✭ 37 (-69.92%)
Mutual labels:  i18n, internationalization


vue-i18n-logo

Analyse all the vue-i18n language files and placeholders of your project.

NPM Version Downloads Known Vulnerabilities Maintainability Tests

📗 Table of Contents

  1. Installation
  2. Introduction
  3. How to use it?
  4. Contribution
  5. Core Team
  6. License

Installation

Install with yarn:

yarn add vue-i18n-extract --dev

Install with npm:

npm install --save-dev vue-i18n-extract

Introduction

Vue I18n is a plugin for Vue.js which makes the internationalization and localization very easy.

However, managing and maintaining all the language files and the vue-i18n keys inside a project could be very demanding and vue-i18n-extract solves this problem.

Vue-i18n-extract performs a static analysis on a Vue.js project (which uses vue-i18n) and reports the following information:

  • list of all the unused vue-i18n keys (entries found in the language files but not used in the project)
  • list of all the missing keys (entries found in the project but not in the language files)

Optionally you can decide to show the output in the console or in a json file.

The missing keys can also be automatically added to the given language files.

How to use it?

Without config

yarn run vue-i18n-extract report -v <vueFiles> -l --languageFiles <languageFiles>

or

npm run vue-i18n-extract report -v <vueFiles> -l --languageFiles <languageFiles>

Required options

-v, --vueFiles <vueFiles>,
The Vue.js file(s) you want to extract i18n strings from. It can be a path to a folder or to a file. It accepts glob patterns. (ex. *, ?, (pattern|pattern|pattern)

-l, --languageFiles <languageFiles>,
The language file(s) you want to compare your Vue.js file(s) to. It can be a path to a folder or to a file. It accepts glob patterns (ex. *, ?, (pattern|pattern|pattern)

Options

-o, --output <output>
Use if you want to create a json file out of your report. (ex. -o output.json)

-a, --add,
Use if you want to add missing keys into your json language files.,

-d, --dynamic,
Use if you want to ignore dynamic keys false-positive. Use it 2 times to get dynamic keys report.',

-ci,
The process will exit with exitCode=1 if at least one translation-key is missing (useful especially if it is part of a CI pipeline).',

Examples

npm run vue-i18n-extract.js report -v './demo/vue-files/**/*.?(js|vue)' -l './demo/lang/**/*.?(json|yaml|yml)'

With Config

With config file

Create an empty config file:

yarn run vue-i18n-extract init

Open the config file:

vue-i18n-extract.config.js

Edit the file and change the values:

module.exports = {
  vueFilesPath: './', // The Vue.js file(s) you want to extract i18n strings from. It can be a path to a folder or to a file. It accepts glob patterns. (ex. *, ?, (pattern|pattern|pattern)
  languageFilesPath: './', // The language file(s) you want to compare your Vue.js file(s) to. It can be a path to a folder or to a file. It accepts glob patterns (ex. *, ?, (pattern|pattern|pattern)
  options: {
    output: false, // false | string => Use if you want to create a json file out of your report. (ex. output.json)
    add: false, // false | true => Use if you want to add missing keys into your json language files.
    dynamic: false, // false | 'ignore' | 'report' => 'ignore' if you want to ignore dynamic keys false-positive. 'report' to get dynamic keys report.
  }
};

Run the program:

yarn run vue-i18n-extract use-config

Contribution

We are very happy to get any kind of contribution to this project and we would like to make contributions to this project as easy and transparent as possible.

When contributing to this repository, please first discuss the changes you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we do have a code of conduct, please follow it in all of your interactions with the project.

You can use the GitHub repository page for the following contributions:

  • Reporting a bug
  • Discussing the current state of the code
  • Submitting a fix
  • Proposing new features
  • Becoming a maintainer

We use Github Flow, so all code changes happen through pull requests.

Pull requests are the best way to propose changes to the codebase. We actively welcome your pull requests.

Instructions for contributing:

  1. Fork the repo and create your branch from master.
  2. If you've added code that should be tested, add tests.
  3. If you've changed APIs, update the documentation.
  4. Ensure the test suite passes.
  5. Make sure your code lints.
  6. Issue that pull request!

Any contributions that you make will be under the MIT Software License

In short, when you submit the code changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern.

🐛 Report bugs using Github's issues

We use GitHub issues to track public bugs. Report a bug by opening a new issue.

Great Bug Reports tend to have:

  • A quick summary and/or background
  • Steps to reproduce
  • What you expected would happen
  • What actually happens

Core Team


Jamie Spittal

Raffaele Pizzari

License

By contributing, you agree that your contributions will be licensed under its [MIT](http://opensource.org/licenses/MIT) License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].