[Patches] [PATCH] Bug 7346 Prevent installing language without .po files
koha-patchbot at kohaaloha.com
koha-patchbot at kohaaloha.com
Tue Dec 13 22:05:20 NZDT 2011
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= <f.demians at tamil.fr>
Date: Sun, 11 Dec 2011 11:52:23 +0100
Subject: [PATCH] Bug 7346 Prevent installing language without .po files
---
misc/translator/translate | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/misc/translator/translate b/misc/translator/translate
index ebd5ce5..90f2950 100755
--- a/misc/translator/translate
+++ b/misc/translator/translate
@@ -49,6 +49,10 @@ my ($cmd, $lang) = @ARGV;
$cmd = lc $cmd;
if ( $cmd =~ /create|install|update/ ) {
my $installer = LangInstaller->new( $lang, $pref );
+ if ( $cmd !~ /create/ && $lang && not $lang ~~ $installer->{langs} ) {
+ print "Unsupported language: $lang\n";
+ exit;
+ }
if ( $all ) {
usage() if $cmd eq 'create';
for my $lang ( @{$installer->{langs}} ) {
--
1.7.8
More information about the Patches
mailing list