merge-from-translatewiki --locales-dir=config/locales
# Diff the existing files:
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:
merge-from-translatewiki --locales-dir=config/locales
# Diff the existing files:
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:
- 'locales-dir=s' => \my $locales_dir,
+ 'locales-dir=s' => \(my $locales_dir = 'config/locales'),
+ 'only-new' => \my $only_new,
my $expanded = expand_hash($translatewiki_translations{$translatewiki_lang});
my $out = +{ $rails_lang => $expanded };
spit_out($out_file, $out);
my $expanded = expand_hash($translatewiki_translations{$translatewiki_lang});
my $out = +{ $rails_lang => $expanded };
spit_out($out_file, $out);
- } elsif (ref $my_translations{$translatewiki_lang} eq 'HASH') {
- say STDERR "$rails_lang has existing translations. Merging";
+ } elsif (ref $my_translations{$translatewiki_lang} eq 'HASH' and not $only_new) {
+ say STDERR "$rails_lang has existing translations. Merging the old translation with the new Translatewiki one";
exists $en{ $me_k . '.few' } or
exists $en{ $me_k . '.other' } or
exists $en{ $me_k . '.two' })) {
exists $en{ $me_k . '.few' } or
exists $en{ $me_k . '.other' } or
exists $en{ $me_k . '.two' })) {
my $expanded = expand_hash( \%new );
my $out = +{ $rails_lang => $expanded };
spit_out($out_file, $out);
my $expanded = expand_hash( \%new );
my $out = +{ $rails_lang => $expanded };
spit_out($out_file, $out);