Push Changes after external Update

Hi Folks,

I have the intention to translate an existing open source project. So far, i made some changes and pushed them to my personal github repository.

There is now an update of the open source project that I would like to install. So here is my Question.
Is it possible to only push my translation changes to the new updated project and keep the changes to the new version after the update?

Best Regards

Do I understand correctly that you want to have both the new version and your translations? In that case the Git way to do it will be to merge the upstream update into the branch containing your translation work.

Here’s an introduction to how branching and merging works:
https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging

I want to merge the new version and my translation.
But the updated version will be in the original language.
I wonder if the merging process will be intelligent enough, so that the update will not overwrite my translations.

Best Regards

Unfortunately it’s impossible to say for sure without knowing your code, but likely the merge will report conflicts where both versions were changed. In case of doubt you can always merge on a new branch, and if you don’t like the result you can easily discard or adjust that without affecting anything else.

However, your question sounds a bit like the translation was done right in the code. That’s usually not a good idea exactly because of the kind of conflicts you’re worried about. Many programming languages offer some mechanism to load texts from data files depending on the configured language, so I recommend you look into that. The keyword to look for (in addition to “translation”) is “localization”.

1 Like

Thanks for your advice!

I have already tried to implement a localization logic, but failed at the time of execution in the html file. Some content is accessed via preloader classes that overwrite the translation that has been carried out. But that’s a different topic.

Best Regards

1 Like