[sword-svn] r499 - trunk/modules/conf

refdoc at crosswire.org refdoc at crosswire.org
Wed Jul 29 08:31:21 MST 2015


Author: refdoc
Date: 2015-07-29 08:31:21 -0700 (Wed, 29 Jul 2015)
New Revision: 499

Modified:
   trunk/modules/conf/confmaker.pl
Log:
fixed bug with language argument


Modified: trunk/modules/conf/confmaker.pl
===================================================================
--- trunk/modules/conf/confmaker.pl	2015-07-20 06:24:12 UTC (rev 498)
+++ trunk/modules/conf/confmaker.pl	2015-07-29 15:31:21 UTC (rev 499)
@@ -101,19 +101,19 @@
 my $doc_lang_name=I18N::LangTags::List::name($doc_lang);
 
 
-if ((length($language)==0) && (length($doc_lang_name)==0)) {
+if ((length($language)==0) && (length($doc_lang)==0)) {
    print STDERR $language."\n", $doc_lang."\n", $doc_lang_name."\n";
    print STDERR "The language is undefined and no language was given on the commandline !\n";
    exit;
    }
 
-if ((length($language)>0) && (length($doc_lang_name)>0)) {
-   print STDERR "The language given on the commandline and the language of the document appear not to agree with each other !\n";
+if (((length($language)>0) && (length($doc_lang)>0)) && ($language ne $doc_lang)){
+   print STDERR "The language ($language) given on the commandline and the language of the document ($doc_lang_name) appear not to agree with each other !\n";
    exit;
    }
 
-if ((length($language)>0) && (length($doc_lang_name)==0)) {
-   $doc_lang_name = $language;
+if ((length($language)>0) && (length($doc_lang)==0)) {
+   $doc_lang_name = I18N::LangTags::List::name($language);
    }
 
 




More information about the sword-cvs mailing list