Skip to content

i18n_yml_dir#777

Merged
justin808 merged 7 commits intoshakacode:masterfrom
danijel:i18n_yml_dir
Mar 30, 2017
Merged

i18n_yml_dir#777
justin808 merged 7 commits intoshakacode:masterfrom
danijel:i18n_yml_dir

Conversation

@danijel
Copy link
Copy Markdown
Contributor

@danijel danijel commented Mar 29, 2017

The purpose of this PR is to add option to specify directory from where to load locale files for auto generating translations.js and default.js.

I have a rather big rails app and I don't want all the locales from rails i18n load path in my translations.js, for example I don't want rails_admin or kaminari, or other rails views stuff in there.


This change is Reviewable

danijel added 3 commits March 29, 2017 13:58
LocalesToJs uses all locales on rails i18n load path when generating js files,
so all the locales from config/locales and in gems are included,
using config.i18n_yml_dir option enables only locales from specified
dir to be inluded in translations.js and default.js
@coveralls
Copy link
Copy Markdown

coveralls commented Mar 29, 2017

Coverage Status

Coverage increased (+0.01%) to 97.911% when pulling 29d1df5 on danijel:i18n_yml_dir into cca1351 on shakacode:master.

@justin808
Copy link
Copy Markdown
Member

@JasonYCHuang can you please review this one.

@justin808
Copy link
Copy Markdown
Member

@danijel Looks great. Couple small comments.


Reviewed 8 of 8 files at r1.
Review status: all files reviewed at latest revision, 3 unresolved discussions.


CHANGELOG.md, line 7 at r1 (raw file):

## [Unreleased]
*Please add entries here for your pull requests.*

Please don't remove this placeholder.


docs/basics/i18n.md, line 29 at r1 (raw file):
Add comment line per next comment:

Indicate what the default directory is.


lib/generators/react_on_rails/templates/base/base/config/initializers/react_on_rails.rb.tt, line 70 at r1 (raw file):

  #
  # Replace the following line to the location where you keep your client i18n yml files
  # that will source for automatic generation on translations.js & default.js

Indicate what the default directory is.


Comments from Reviewable

@danijel
Copy link
Copy Markdown
Contributor Author

danijel commented Mar 29, 2017

@justin808 Thanks for quick review.
Unreleased placeholder returned and added line about what gets loaded by default without this option.

@coveralls
Copy link
Copy Markdown

coveralls commented Mar 29, 2017

Coverage Status

Coverage increased (+0.01%) to 97.911% when pulling d30ca6b on danijel:i18n_yml_dir into cca1351 on shakacode:master.

@justin808
Copy link
Copy Markdown
Member

tiny comment


Reviewed 3 of 3 files at r2.
Review status: all files reviewed at latest revision, 4 unresolved discussions.


CHANGELOG.md, line 8 at r2 (raw file):

## [Unreleased]
*Please add entries here for your pull requests.*
Add option to specify i18n_yml_dir in order to include only subset of locale files when generating translations.js & default.js for react-intl

Please format like the others. and blank line after placeholder.


Comments from Reviewable

@danijel
Copy link
Copy Markdown
Contributor Author

danijel commented Mar 30, 2017

@justin808 ok now?

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.01%) to 97.911% when pulling 256ad29 on danijel:i18n_yml_dir into cca1351 on shakacode:master.

1 similar comment
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.01%) to 97.911% when pulling 256ad29 on danijel:i18n_yml_dir into cca1351 on shakacode:master.

@justin808
Copy link
Copy Markdown
Member

one comment


Reviewed 1 of 1 files at r3.
Review status: all files reviewed at latest revision, 5 unresolved discussions.


CHANGELOG.md, line 10 at r3 (raw file):

### Added
- Add option to specify i18n_yml_dir in order to include only subset of locale files when generating translations.js & default.js for react-intl

missing the PR and author.

See formatting of other entries.


Comments from Reviewable

@danijel
Copy link
Copy Markdown
Contributor Author

danijel commented Mar 30, 2017

@justin808 added

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.01%) to 97.911% when pulling 8499818 on danijel:i18n_yml_dir into cca1351 on shakacode:master.

1 similar comment
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.01%) to 97.911% when pulling 8499818 on danijel:i18n_yml_dir into cca1351 on shakacode:master.

@justin808
Copy link
Copy Markdown
Member

Review status: 7 of 8 files reviewed at latest revision, 6 unresolved discussions.


CHANGELOG.md, line 10 at r4 (raw file):

### Added
- Add option to specify i18n_yml_dir in order to include only subset of locale files when generating translations.js & default.js for react-intl

period.

:-)


Comments from Reviewable

@justin808
Copy link
Copy Markdown
Member

Reviewed 1 of 1 files at r4.
Review status: all files reviewed at latest revision, 6 unresolved discussions.


Comments from Reviewable

@danijel
Copy link
Copy Markdown
Contributor Author

danijel commented Mar 30, 2017

@justin808 added, damn, what's wrong with me :-)

@coveralls
Copy link
Copy Markdown

coveralls commented Mar 30, 2017

Coverage Status

Coverage increased (+0.01%) to 97.911% when pulling 76be2ba on danijel:i18n_yml_dir into cca1351 on shakacode:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants