summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-10-24 10:56:35 +0200
committerYorhel <git@yorhel.nl>2009-10-24 10:56:35 +0200
commit8ed189803adf0e8cd47e7be0566b4ca94bd7448b (patch)
tree4326de1fcddec3d2d25587f60a876eea52ba027b /util
parent246dbbdad9aab4d59c2a1d70e0936452d1df9bca (diff)
lang.pl: Added 'stage' functionality
Diffstat (limited to 'util')
-rwxr-xr-xutil/lang.pl15
1 files changed, 15 insertions, 0 deletions
diff --git a/util/lang.pl b/util/lang.pl
index 28950f0f..087dea2e 100755
--- a/util/lang.pl
+++ b/util/lang.pl
@@ -35,6 +35,9 @@ $0 merge <lang> <file>
$0 reorder <lang1>,<lang2>,..
Re-orders the translation lines in lang.txt using the specified order.
+
+$0 stage <lang>
+ Puts all changes of <lang> into the git index, and leaves everything else untouched.
__
exit;
}
@@ -142,6 +145,17 @@ sub reorder {
}
+sub stage {
+ my $lang = shift;
+ chdir "$ROOT/data";
+ rename 'lang.txt', '.lang.txt.tmp' or die $!;
+ `git checkout lang.txt`;
+ merge $lang, '.lang.txt.tmp';
+ `git add lang.txt`;
+ rename '.lang.txt.tmp', 'lang.txt';
+}
+
+
usage if !@ARGV;
my $act = shift;
stats if $act eq 'stats';
@@ -149,4 +163,5 @@ add @ARGV if $act eq 'add';
only @ARGV if $act eq 'only';
merge @ARGV if $act eq 'merge';
reorder @ARGV if $act eq 'reorder';
+stage @ARGV if $act eq 'stage';