i18n-js 3.9.2 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/CODEOWNERS +4 -0
- data/.github/FUNDING.yml +1 -1
- data/.github/ISSUE_TEMPLATE/bug_report.md +41 -0
- data/.github/ISSUE_TEMPLATE/config.yml +5 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +23 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +38 -0
- data/.github/dependabot.yml +15 -0
- data/.github/workflows/ruby-tests.yml +52 -0
- data/.gitignore +11 -7
- data/.rubocop.yml +16 -0
- data/CHANGELOG.md +12 -571
- data/CODE_OF_CONDUCT.md +74 -0
- data/CONTRIBUTING.md +79 -0
- data/Gemfile +3 -0
- data/LICENSE.md +20 -0
- data/README.md +180 -1003
- data/Rakefile +10 -20
- data/exe/i18n +5 -0
- data/i18n-js.gemspec +48 -29
- data/images/i18njs-check.gif +0 -0
- data/lib/guard/i18n-js/templates/Guardfile +10 -0
- data/lib/guard/i18n-js/version.rb +13 -0
- data/lib/guard/i18n-js.rb +78 -0
- data/lib/i18n-js/cli/check_command.rb +157 -0
- data/lib/i18n-js/cli/command.rb +69 -0
- data/lib/i18n-js/cli/export_command.rb +81 -0
- data/lib/i18n-js/cli/init_command.rb +52 -0
- data/lib/i18n-js/cli/ui.rb +64 -0
- data/lib/i18n-js/cli/version_command.rb +18 -0
- data/lib/i18n-js/cli.rb +55 -0
- data/lib/i18n-js/listen.rb +81 -0
- data/lib/i18n-js/schema.rb +104 -0
- data/lib/i18n-js/version.rb +5 -0
- data/lib/i18n-js.rb +73 -1
- metadata +127 -198
- data/.editorconfig +0 -24
- data/.github/workflows/tests.yaml +0 -106
- data/.npmignore +0 -27
- data/Appraisals +0 -52
- data/app/assets/javascripts/i18n/filtered.js.erb +0 -23
- data/app/assets/javascripts/i18n/shims.js +0 -240
- data/app/assets/javascripts/i18n/translations.js +0 -3
- data/app/assets/javascripts/i18n.js +0 -1095
- data/gemfiles/i18n_0_6.gemfile +0 -7
- data/gemfiles/i18n_0_7.gemfile +0 -7
- data/gemfiles/i18n_0_8.gemfile +0 -7
- data/gemfiles/i18n_0_9.gemfile +0 -7
- data/gemfiles/i18n_1_0.gemfile +0 -7
- data/gemfiles/i18n_1_1.gemfile +0 -7
- data/gemfiles/i18n_1_10.gemfile +0 -7
- data/gemfiles/i18n_1_2.gemfile +0 -7
- data/gemfiles/i18n_1_3.gemfile +0 -7
- data/gemfiles/i18n_1_4.gemfile +0 -7
- data/gemfiles/i18n_1_5.gemfile +0 -7
- data/gemfiles/i18n_1_6.gemfile +0 -7
- data/gemfiles/i18n_1_7.gemfile +0 -7
- data/gemfiles/i18n_1_8.gemfile +0 -7
- data/gemfiles/i18n_1_9.gemfile +0 -7
- data/lib/i18n/js/dependencies.rb +0 -67
- data/lib/i18n/js/engine.rb +0 -87
- data/lib/i18n/js/fallback_locales.rb +0 -70
- data/lib/i18n/js/formatters/base.rb +0 -25
- data/lib/i18n/js/formatters/js.rb +0 -39
- data/lib/i18n/js/formatters/json.rb +0 -13
- data/lib/i18n/js/middleware.rb +0 -82
- data/lib/i18n/js/private/config_store.rb +0 -31
- data/lib/i18n/js/private/hash_with_symbol_keys.rb +0 -36
- data/lib/i18n/js/segment.rb +0 -81
- data/lib/i18n/js/utils.rb +0 -91
- data/lib/i18n/js/version.rb +0 -7
- data/lib/i18n/js.rb +0 -274
- data/lib/rails/generators/i18n/js/config/config_generator.rb +0 -19
- data/lib/rails/generators/i18n/js/config/templates/i18n-js.yml +0 -27
- data/lib/tasks/export.rake +0 -8
- data/package.json +0 -25
- data/spec/fixtures/custom_path.yml +0 -5
- data/spec/fixtures/default.yml +0 -5
- data/spec/fixtures/erb.yml +0 -5
- data/spec/fixtures/except_condition.yml +0 -7
- data/spec/fixtures/js_available_locales_custom.yml +0 -1
- data/spec/fixtures/js_export_dir_custom.yml +0 -7
- data/spec/fixtures/js_export_dir_none.yml +0 -6
- data/spec/fixtures/js_extend_parent.yml +0 -6
- data/spec/fixtures/js_extend_segment.yml +0 -6
- data/spec/fixtures/js_file_per_locale.yml +0 -7
- data/spec/fixtures/js_file_per_locale_with_fallbacks_as_default_locale_symbol.yml +0 -4
- data/spec/fixtures/js_file_per_locale_with_fallbacks_as_hash.yml +0 -6
- data/spec/fixtures/js_file_per_locale_with_fallbacks_as_locale.yml +0 -4
- data/spec/fixtures/js_file_per_locale_with_fallbacks_as_locale_without_fallback_translations.yml +0 -4
- data/spec/fixtures/js_file_per_locale_with_fallbacks_enabled.yml +0 -4
- data/spec/fixtures/js_file_per_locale_without_fallbacks.yml +0 -4
- data/spec/fixtures/js_file_with_namespace_prefix_and_pretty_print.yml +0 -9
- data/spec/fixtures/js_sort_translation_keys_false.yml +0 -6
- data/spec/fixtures/js_sort_translation_keys_true.yml +0 -6
- data/spec/fixtures/json_only.yml +0 -18
- data/spec/fixtures/locales.yml +0 -133
- data/spec/fixtures/merge_plurals.yml +0 -6
- data/spec/fixtures/merge_plurals_with_no_overrides.yml +0 -4
- data/spec/fixtures/merge_plurals_with_partial_overrides.yml +0 -4
- data/spec/fixtures/millions.yml +0 -4
- data/spec/fixtures/multiple_conditions.yml +0 -7
- data/spec/fixtures/multiple_conditions_per_locale.yml +0 -7
- data/spec/fixtures/multiple_files.yml +0 -7
- data/spec/fixtures/no_config.yml +0 -2
- data/spec/fixtures/no_scope.yml +0 -4
- data/spec/fixtures/simple_scope.yml +0 -5
- data/spec/js/currency.spec.js +0 -62
- data/spec/js/current_locale.spec.js +0 -19
- data/spec/js/dates.spec.js +0 -276
- data/spec/js/defaults.spec.js +0 -31
- data/spec/js/extend.spec.js +0 -110
- data/spec/js/interpolation.spec.js +0 -124
- data/spec/js/jasmine/MIT.LICENSE +0 -20
- data/spec/js/jasmine/jasmine-html.js +0 -190
- data/spec/js/jasmine/jasmine.css +0 -166
- data/spec/js/jasmine/jasmine.js +0 -2476
- data/spec/js/jasmine/jasmine_favicon.png +0 -0
- data/spec/js/json_parsable.spec.js +0 -14
- data/spec/js/locales.spec.js +0 -31
- data/spec/js/localization.spec.js +0 -78
- data/spec/js/numbers.spec.js +0 -174
- data/spec/js/placeholder.spec.js +0 -24
- data/spec/js/pluralization.spec.js +0 -228
- data/spec/js/prepare_options.spec.js +0 -41
- data/spec/js/require.js +0 -2083
- data/spec/js/specs.html +0 -49
- data/spec/js/specs_requirejs.html +0 -72
- data/spec/js/translate.spec.js +0 -304
- data/spec/js/translations.js +0 -188
- data/spec/js/utility_functions.spec.js +0 -20
- data/spec/ruby/i18n/js/fallback_locales_spec.rb +0 -84
- data/spec/ruby/i18n/js/segment_spec.rb +0 -286
- data/spec/ruby/i18n/js/utils_spec.rb +0 -138
- data/spec/ruby/i18n/js_spec.rb +0 -797
- data/spec/spec_helper.rb +0 -80
- data/yarn.lock +0 -138
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
# Contributing to i18n-js
|
2
|
+
|
3
|
+
👍🎉 First off, thanks for taking the time to contribute! 🎉👍
|
4
|
+
|
5
|
+
The following is a set of guidelines for contributing to this project. These are
|
6
|
+
mostly guidelines, not rules. Use your best judgment, and feel free to propose
|
7
|
+
changes to this document in a pull request.
|
8
|
+
|
9
|
+
## Code of Conduct
|
10
|
+
|
11
|
+
Everyone interacting in this project's codebases, issue trackers, chat rooms and
|
12
|
+
mailing lists is expected to follow the [code of conduct](https://github.com/fnando/i18n-js/blob/main/CODE_OF_CONDUCT.md).
|
13
|
+
|
14
|
+
## Reporting bugs
|
15
|
+
|
16
|
+
This section guides you through submitting a bug report. Following these
|
17
|
+
guidelines helps maintainers and the community understand your report, reproduce
|
18
|
+
the behavior, and find related reports.
|
19
|
+
|
20
|
+
- Before creating bug reports, please check the open issues; somebody may
|
21
|
+
already have submitted something similar, and you may not need to create a new
|
22
|
+
one.
|
23
|
+
- When you are creating a bug report, please include as many details as
|
24
|
+
possible, with an example reproducing the issue.
|
25
|
+
|
26
|
+
## Contributing with code
|
27
|
+
|
28
|
+
Before making any radicals changes, please make sure you discuss your intention
|
29
|
+
by [opening an issue on Github](https://github.com/fnando/i18n-js/issues).
|
30
|
+
|
31
|
+
When you're ready to make your pull request, follow checklist below to make sure
|
32
|
+
your contribution is according to how this project works.
|
33
|
+
|
34
|
+
1. [Fork](https://help.github.com/forking/) i18n-js
|
35
|
+
2. Create a topic branch - `git checkout -b my_branch`
|
36
|
+
3. Make your changes using [descriptive commit messages](#commit-messages)
|
37
|
+
4. Update CHANGELOG.md describing your changes by adding an entry to the
|
38
|
+
"Unreleased" section. If this section is not available, create one right
|
39
|
+
before the last version.
|
40
|
+
5. Push to your branch - `git push origin my_branch`
|
41
|
+
6. [Create a pull request](https://help.github.com/articles/creating-a-pull-request)
|
42
|
+
7. That's it!
|
43
|
+
|
44
|
+
## Styleguides
|
45
|
+
|
46
|
+
### Commit messages
|
47
|
+
|
48
|
+
- Use the present tense ("Add feature" not "Added feature")
|
49
|
+
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
|
50
|
+
- Limit the first line to 72 characters or less
|
51
|
+
- Reference issues and pull requests liberally after the first line
|
52
|
+
|
53
|
+
### Changelog
|
54
|
+
|
55
|
+
- Add a message describing your changes to the "Unreleased" section. The
|
56
|
+
changelog message should follow the same style as the commit message.
|
57
|
+
- Prefix your message with one of the following:
|
58
|
+
- `[Added]` for new features.
|
59
|
+
- `[Changed]` for changes in existing functionality.
|
60
|
+
- `[Deprecated]` for soon-to-be removed features.
|
61
|
+
- `[Removed]` for now removed features.
|
62
|
+
- `[Fixed]` for any bug fixes.
|
63
|
+
- `[Security]` in case of vulnerabilities.
|
64
|
+
|
65
|
+
### Ruby code
|
66
|
+
|
67
|
+
- This project uses [Rubocop](https://rubocop.org) to enforce code style. Before
|
68
|
+
submitting your changes, make sure your tests are passing and code conforms to
|
69
|
+
the expected style by running `rake`.
|
70
|
+
- Do not change the library version. This will be done by the maintainer
|
71
|
+
whenever a new version is about to be released.
|
72
|
+
|
73
|
+
### JavaScript code
|
74
|
+
|
75
|
+
- This project uses [ESLint](https://eslint.org) to enforce code style. Before
|
76
|
+
submitting your changes, make sure your tests are passing and code conforms to
|
77
|
+
the expected style by running `yarn test:ci`.
|
78
|
+
- Do not change the library version. This will be done by the maintainer
|
79
|
+
whenever a new version is about to be released.
|
data/Gemfile
CHANGED
data/LICENSE.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2021 Nando Vieira
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
7
|
+
the Software without restriction, including without limitation the rights to
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
10
|
+
subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|