perf(multilingual-support): Multi-language Support#445
Closed
djurnamn wants to merge 10 commits into5e-bits:mainfrom
djurnamn:multilingual-support
Closed
perf(multilingual-support): Multi-language Support#445djurnamn wants to merge 10 commits into5e-bits:mainfrom djurnamn:multilingual-support
djurnamn wants to merge 10 commits into5e-bits:mainfrom
djurnamn:multilingual-support
Conversation
added 7 commits
February 23, 2022 15:37
Author
|
I did some more experimenting on this. It's not super pretty, but it seems to do the trick. The easiest way to test it is to:
I'll try to do some refactoring and documentation on this when I have more time (as it's not super straight forward). But feel free to test it out and let me know what you think! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this do?
This is another approach to adding multilingual support to 5e-database. It allows us to parse the source data and separate it into what should be translatable (locale) and what shouldn't be (templates). It also allows us to build the source data back together with an altered locale file, resulting in a translated version of the database. Please see the readme for more information!
How was it tested?
I have manually tested to take the original data apart and put it back together again using the scripts. The result almost perfectly replicates the original data. There's just one instance of a comma separated list in the original data where the
andis second to last instead of last, which is the (otherwise reliable) pattern I've set up. I also wasn't able to perfectly replicate the json formatting options of the original data, so I made some changes to the source data (mainly indentation and newlines) to be able to compare the results more reliably.Is there a Github issue this is resolving?
#81
I did have a look at the proof of concept that @carloslancha made a while back (#158). That helped me get started!
Did you update the docs in the API? Please link an associated PR if applicable.
I've added a readme in the subfolder. But this is pretty self-contained and non-intrusive. It doesn't affect how the API works.
Here's a fun image for your troubles