Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added multiple directories support #291

Closed
wants to merge 8 commits into from

Conversation

EddyTrotin
Copy link

i18n now support multiple sources for translations.This feature is backward compatible, check README.md for details.
Concerning tests I add some issues with the global scope. In fact the files I added passes tests when ran alone but fails with the full test suit. That is why the Makefile test function now call mocha two times.

@coveralls
Copy link

coveralls commented Jan 6, 2017

Coverage Status

Coverage decreased (-1.3%) to 96.571% when pulling 5d943c1 on linagora:multiDirectories into 11d89da on mashpie:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.3%) to 96.571% when pulling 5d943c1 on linagora:multiDirectories into 11d89da on mashpie:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.3%) to 96.571% when pulling 5d943c1 on linagora:multiDirectories into 11d89da on mashpie:master.

@coveralls
Copy link

coveralls commented Jan 11, 2017

Coverage Status

Coverage increased (+0.2%) to 98.088% when pulling 026ead2 on linagora:multiDirectories into 11d89da on mashpie:master.

3 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 98.088% when pulling 026ead2 on linagora:multiDirectories into 11d89da on mashpie:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 98.088% when pulling 026ead2 on linagora:multiDirectories into 11d89da on mashpie:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 98.088% when pulling 026ead2 on linagora:multiDirectories into 11d89da on mashpie:master.

@mashpie
Copy link
Owner

mashpie commented Jan 11, 2017

Thanks a lot for this - will certainly merge soon. Just wanted to review a bit before

@pujiaxun
Copy link

Merge it please~~ Thank you ~~

@simonmilz
Copy link

"will certainly merge soon" they said...

@brydda
Copy link

brydda commented Jun 5, 2020

I really like the simplicity and ease of this package vs. others. However, I need multi-directory support.
Any chance of this work/pull or other support for placing translation files in multiple directories, being merged any time soon? Thanks @mashpie

@mashpie
Copy link
Owner

mashpie commented Jun 5, 2020

more than 3 years later I still consider merging... or well implementing similar. One concern with that PR is the multiple use of .configure(). Another are the conflicts with current code base. Still I see the need for supporting multidir setups.

Meanwhile you should be able to load any kind of "exotic" setup by using staticCatalog option (https://github.com/mashpie/i18n-node#some-words-on-staticcatalog-option) introduced with last release in 0.10.0.

@brydda
Copy link

brydda commented Jun 5, 2020

@mashpie Thank you for the quick response. I will use the static option for now and wait for multi-dir support.

Regarding the suggested implementation, since I spoke of simplicity in my previous post, I must admit that I found the suggested approach (current PR) more complicated than I expected. What I have in mind is just to add the ability to specify the directory parameter as an array, then treat the first directory element as input/output (for compatibility reasons) and all the rest as input only (extra search path). This would keep things both very simple and backward compatible and yet, allow one to add translation files from additional paths (e.g., for sub components).

Does the above make sense?

@mashpie mashpie added the project tracked in a project label Aug 18, 2020
@mashpie mashpie added this to To do in custom storage backend(s) via automation Aug 18, 2020
@mashpie
Copy link
Owner

mashpie commented Aug 18, 2020

well... although I can not merge directly - will keep as todo for refactored backend project

@mashpie mashpie closed this Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project tracked in a project
Projects
Development

Successfully merging this pull request may close these issues.

None yet

6 participants