summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter von Kaehne <refdoc@gmx.net>2015-07-29 15:31:21 +0000
committerPeter von Kaehne <refdoc@gmx.net>2015-07-29 15:31:21 +0000
commitedc069db942f0834d21398c7b82870aeb9910d87 (patch)
tree4d7e40a33fd33b55127c963800b8857c34841973
parentae23223242e0147e32ae0e5bad97110beaa3755f (diff)
downloadsword-tools-edc069db942f0834d21398c7b82870aeb9910d87.tar.gz
fixed bug with language argument
git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@499 07627401-56e2-0310-80f4-f8cd0041bdcd
-rwxr-xr-xmodules/conf/confmaker.pl10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/conf/confmaker.pl b/modules/conf/confmaker.pl
index 1f4710c..a9e5a15 100755
--- a/modules/conf/confmaker.pl
+++ b/modules/conf/confmaker.pl
@@ -101,19 +101,19 @@ my $doc_lang = @elements[0]->getAttribute('xml:lang');
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);
}