From 8ed189803adf0e8cd47e7be0566b4ca94bd7448b Mon Sep 17 00:00:00 2001 From: Yorhel Date: Sat, 24 Oct 2009 10:56:35 +0200 Subject: lang.pl: Added 'stage' functionality --- util/lang.pl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'util/lang.pl') 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 $0 reorder ,,.. Re-orders the translation lines in lang.txt using the specified order. + +$0 stage + Puts all changes of 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'; -- cgit v1.2.3