summaryrefslogtreecommitdiffstats
path: root/l10n/l10n.pl
diff options
context:
space:
mode:
authorJan-Christoph Borchardt <JanCBorchardt@fsfe.org>2011-07-27 12:05:41 +0200
committerJan-Christoph Borchardt <JanCBorchardt@fsfe.org>2011-07-27 12:05:41 +0200
commit7e11bf280de45e523560c12abc264bcf302b8833 (patch)
tree466d2cbadb3c5b518435c3c3c67db1ac3e15e0e9 /l10n/l10n.pl
parent59e55b711b36a41c4e4c621b5a46f9d601e15c38 (diff)
downloadnextcloud-server-7e11bf280de45e523560c12abc264bcf302b8833.tar.gz
nextcloud-server-7e11bf280de45e523560c12abc264bcf302b8833.zip
updated localization script and removed duplicate strings
Diffstat (limited to 'l10n/l10n.pl')
-rw-r--r--l10n/l10n.pl12
1 files changed, 4 insertions, 8 deletions
diff --git a/l10n/l10n.pl b/l10n/l10n.pl
index 0ad33d2116b..b993727e8f1 100644
--- a/l10n/l10n.pl
+++ b/l10n/l10n.pl
@@ -3,6 +3,7 @@ use strict;
use Locale::PO;
use Cwd;
use Data::Dumper;
+use File::Path;
sub crawl{
my( $dir ) = @_;
@@ -28,7 +29,7 @@ sub crawl{
my $task = shift( @ARGV );
my $place = '..';
-die( "Usuage: l10n.pl task\ntask: read, write\n") unless $task && $place;
+die( "Usage: l10n.pl task\ntask: read, write\n" ) unless $task && $place;
# Our current position
my $whereami = cwd();
@@ -38,6 +39,7 @@ die( "Program must be executed in a l10n-folder called 'l10n'" ) unless $wheream
my @dirs = crawl( $place );
# Languages
+rmtree( 'templates' );
mkdir( 'templates' ) unless -d 'templates';
my @languages = ();
@@ -55,13 +57,7 @@ if( $task eq 'read' ){
my $app = pop( @temp );
chdir( $dir );
my $output = "${whereami}/templates/$app.pot";
-
- if( -e $output ){
- `xgettext --files-from=xgettextfiles --join-existing --output="$output" --keyword=t`
- }
- else{
- `xgettext --files-from=xgettextfiles --output="$output" --keyword=t`
- }
+ `xgettext --files-from=xgettextfiles --output="$output" --keyword=t`;
chdir( $whereami );
}
}