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

Rework to translations #218

Open
doug0102 opened this issue Jan 17, 2024 · 0 comments
Open

Rework to translations #218

doug0102 opened this issue Jan 17, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@doug0102
Copy link
Collaborator

Currently the translations for each language live in one file. As the app grows this file will become really big, ugly, and hard to maintain. Look into the following options and come up with a potential solution/implementation.

Option 1. Look into setting up something where each component has an associated language file. We could use the pre-commit hook to run a script that combines all these files into one big file like we have now. There is the chance of having non-unique names so we may need to do something like add a prefix to the json object to force a unique structure... maybe use the angular component selector since those are supposed to be unique and we shouldn't have duplicates anywhere in the project. With this approach we won't have to change anything relating to how the translations are loaded.

Option 2. Another thing to look into would be on-demand loading of the json language files. Currently the translations for the entire app are immediately downloaded even though we may only need a small fraction of what's in there. It would be a lot more efficient if we could figure out how to load/cache the translations for specific components only when we need them. This is a big change to how everything is setup now so it would be a lot of work.

@doug0102 doug0102 added the enhancement New feature or request label Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant