X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/b479b0c2b6b6d82942c0efbd4b0633e859a1ed41..69b586a8f4b1cffd01f92553a171552d399ef6a5:/script/locale/merge-from-translatewiki diff --git a/script/locale/merge-from-translatewiki b/script/locale/merge-from-translatewiki index afb3fca92..ab89b61d9 100644 --- a/script/locale/merge-from-translatewiki +++ b/script/locale/merge-from-translatewiki @@ -30,6 +30,9 @@ merge-from-translatewiki - Get new translations from L config/locales$ for i in $(ls *yml | grep -v en.yml); do perl ../../script/locale/diff --dump-flat $i > $i.0 ;done # Merge and find out what changed: + rails_port$ perl script/locale/merge-from-translatewiki --locales-dir config/locales + + # Or, more complexy: rails_port$ for i in $(svn st config/locales/ | egrep '^M|\\?' | awk '{print $2}' | grep 'yml$'); do rm -v $i; done && svn up config/locales && perl script/locale/merge-from-translatewiki --locales-dir config/locales && svn st config/locales # Diff: @@ -51,7 +54,7 @@ Print this help message. =item --locales-dir -The locales dir we'll merge stuff into. E.g. C. +The locales dir we'll merge stuff into. F by default. =item --only-new @@ -70,14 +73,14 @@ Getopt::Long::Parser->new( config => [ qw< bundling no_ignore_case no_require_order pass_through > ], )->getoptions( 'h|help' => \my $help, - 'locales-dir=s' => \my $locales_dir, + 'locales-dir=s' => \(my $locales_dir = 'config/locales'), 'only-new' => \my $only_new, ) or help(); # On --help help() if $help; -help() unless $locales_dir; +help() unless $locales_dir and -d $locales_dir; ### ### Main