Dependencies:
sudo apt-get install ruby rails
Use:
curl -L http://git.io/locale_merge.rb | ruby - en.yml pt.yml > new-pt.yml
Installation:
sudo gem install yamldiff
Use:
$ yamldiff new-pt.yml pt.yml
Missing key: taginfo.project
Missing key: taginfo.projects
Missing key: taginfo.comparison
$ yamldiff -i new-pt.yml en.yml
Let's illustrate the translation from English to Portuguese.
1. Satisfies the initial dependencies on Ubuntu (preferably):
$ sudo apt-get install ruby rails
2. Generate the a new pt.yml
file with keys updated:
$ curl -L http://git.io/locale_merge.rb | ruby - en.yml pt.yml > new-pt.yml
$ cp pt.yml old-pt.yml # creates a backup file
$ cp new-pt.yml pt.yml # replaces the working version to git
3. Install the Yamldiff fork that I did:
$ bundle
$ gem build yamldiff.gemspec
$ sudo gem install yamldiff-VERSION.gem
Where VERSION is something as 0.0.10. See ls *.gem
or version.rb.
4. Use the yamldiff
with the new file generated in step 2:
$ yamldiff pt.yml old-pt.yml # what was missing in the old file
Missing key: taginfo.project
Missing key: taginfo.projects
Missing key: taginfo.comparison
Missing key: help.keyboard.projects_page
Missing key: help.keyboard.compare_page
$ yamldiff -i en.yml pt.yml # keys untranslated in the new file
pages.key.filter.label
pages.key.overview.objects_last_edited_by
pages.key.other_keys_used.to_count_tooltip
pages.key.other_keys_used.other_key_tooltip
pages.key.other_keys_used.from_count_tooltip
$ yamldiff new-pt.yml pt.yml # follow your changes
Key content differs: osm.nodes
Diff:
-Pontos
+Ponto
But the colored git diff
line by line yet is very useful!