-
Notifications
You must be signed in to change notification settings - Fork 5
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
Allow splitting translations #52
Conversation
I guess you could say this is a "prototype"
I'll try to review this tonight |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't read everything as I had limited time, just some comments so far from glancing over it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good to me, thanks for the contribution! Could you add some tests? I think we can merge right away once this is done.
Changed `NestedTranslation` from `type` to `interface`.
@KnorpelSenf I've changed the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs of it are in a good shape already!
I quickly glanced over the code but @KnorpelSenf looked into that far more deeply than I did. So I cant say much about it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Thanks for merging the pull-request, are there any details on when the new version will be released? |
@rojvv said he wanted to do it “later” … I believe that means it'll happen today at some point. If that doesn't happen, feel free to ping me again |
Alright, no worries if it takes a couple of days. |
Available in 1.1.0. |
Apologies for the inconvenience. 1.1.2 should work. |
Works as expected, thanks! |
Closes #51
As explained in the issue referenced above, sometimes it becomes too difficult to maintain translation files for a project and currently the library does not allow files to be split into different directories or files.
This pull-request implements this feature by walking every
.ftl
file in the locales directory, reading it, and merging it with any other translation it finds for that locale. This might not be the best way of implementing this feature... but it works. It also works with the standard translation layout currently implemented, which means users can use both types of layouts at once.As of writing this, I haven't discovered anything that would be broken by this pull-request, please do let me know if it does in fact cause breaking changes or if any issues were discovered.