Skip to content

Commit

Permalink
Language lookup fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kthoden committed Dec 18, 2019
1 parent 6471b50 commit bdc88ff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/eoatex2imxml.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8; mode: python -*-
# Time-stamp: <2019-12-17 16:52:20 (kthoden)>
# Time-stamp: <2019-12-18 11:16:11 (kthoden)>

"""
Converts Latex files into a customized DocBook XML file.
Expand Down Expand Up @@ -1161,9 +1161,9 @@ def insert_bibliographies(
citations_json
)

if not language:
logging.warning("Missing a language. Falling back to English.")
language = "en"
# if not language:
# logging.warning("Missing a language. Falling back to English.")
# language = "en"

logging.info( "keywords:" )
logging.info( keyword_to_print_bibl_el.keys() )
Expand Down
5 changes: 4 additions & 1 deletion src/utils/bib2html.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,10 @@ def main(

translations = {"de" : "german", "en" : "english", "it" : "italian", "fr" : "french"}

language_translated = translations[language]
if language in translations.values():
language_translated = language
else:
language_translated = translations[language]

if not temp_dir.exists():
os.makedirs( temp_dir )
Expand Down

0 comments on commit bdc88ff

Please sign in to comment.