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:
=item --locales-dir
-The locales dir we'll merge stuff into. E.g. C<config/locales>.
+The locales dir we'll merge stuff into. F<config/locales> by default.
=item --only-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