summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/new-locale.pl19
1 files changed, 19 insertions, 0 deletions
diff --git a/contrib/new-locale.pl b/contrib/new-locale.pl
new file mode 100755
index 000000000..a2feb3dda
--- /dev/null
+++ b/contrib/new-locale.pl
@@ -0,0 +1,19 @@
+#!/usr/bin/perl -w
+
+use File::Find;
+use File::Copy::Recursive qw(dircopy);
+
+($ARGV[0] && $ARGV[0] =~ /\w\w(-\w\w)?/) || usage();
+
+sub process {
+ if ($_ eq 'en' && $File::Find::name !~ /\/data\//) {
+ dircopy($_, $ARGV[0]);
+ }
+}
+
+find(\&process, ".");
+
+sub usage {
+ print "Usage: new-locale.pl <lang code>\n";
+ print " e.g.: new-locale.pl fr\n";
+}