aadnk commited on
Commit
ba1ed2f
1 Parent(s): 8f5637c

Fix detection of JP/ZH when calculating max line length

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -118,7 +118,7 @@ class UI:
118
  return source, sourceName
119
 
120
  def getMaxLineWidth(language: str) -> int:
121
- if (language == "ja" or language == "zh"):
122
  # Chinese characters and kana are wider, so limit line length to 40 characters
123
  return 40
124
  else:
 
118
  return source, sourceName
119
 
120
  def getMaxLineWidth(language: str) -> int:
121
+ if (language and language.lower() in ["japanese", "ja", "chinese", "zh"]):
122
  # Chinese characters and kana are wider, so limit line length to 40 characters
123
  return 40
124
  else: