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

Option to fill out only missing translations #3

Open
homoky opened this issue Jan 9, 2024 · 1 comment
Open

Option to fill out only missing translations #3

homoky opened this issue Jan 9, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@homoky
Copy link

homoky commented Jan 9, 2024

Hey,

thanks for the package in the first place, I just found it when I was writing exactly the same thing.

Do you considered argument / option to the command that would force to keep existing tranlastions? Our current setup is, that we have languages that have been translated by our clients and we would like to translate only new values of new keys, not to override existing translation.

@robisim74
Copy link
Owner

Hey @homoky,

the keys already translated are managed through the metadata file (which contain the paths of the keys): https://github.com/robisim74/gpt-translate-json?tab=readme-ov-file#add-translations

Since the keys to translate are decided based on those contained in the originalLang and the metadata file, what you need is to pre-populate the metadata files with the paths of the already existing keys.

An option to do this is possible (do you have time for a pr?) but you can also do it with a simple function to run the first time.

@robisim74 robisim74 added the enhancement New feature or request label Jan 9, 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

2 participants