M
M
Maxim2013-06-18 17:01:11
git
Maxim, 2013-06-18 17:01:11

Merging two files?

The situation is this:
I have 2 translation files from the add-on of an older and a newer version. Russian language in the old version and English in the new one
The file is just an array of the form

'short_name'						=> 'Краткое название',
  'new'								=> 'Новое',
  'manual'							=> 'Руководство',
  'from'								=> 'из',
  'to'								=> 'в',
  'advanced'							=> 'Дополнительно',

How can I make one language file with the latest version and at the same time, if there is a translation into Russian, leave Russian, and if some new variable appeared in the new version, it would be in the new file in English
I am looking for some kind of software for comparison files on a poppy
But I want to try to do it more with git

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
AgentSIB, 2013-06-18
@AgentSIB

Upload the old untranslated version, commit. From here you make 2 branches (translate, source) - put the old translation (translate) in the first one, commit. In the second, a new untranslated file (source) and merge. There will most likely be conflicts.
For manual comparison:
Any IDE in principle can compare. In general, try meld, a very handy utility for comparison. And in the git, always keep the latest version of the translation and the original.
For automatic comparison:
Read about console diff. Personally, I would write a script for such a task using diff and grep. On an output would receive new lines which did not exist yet.

K
kolegich, 2013-06-18
@kolegich

I did such a thing with Idea, just clicked "Compare with clipboard". If you want a git, just commit the old file, replace it with a new one and see diff, return the old ones, add new ones, I would do this if the lines didn’t change places.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question