Spaces:
Runtime error
Runtime error
Fix detection of JP/ZH when calculating max line length
Browse files
app.py
CHANGED
@@ -118,7 +118,7 @@ class UI:
|
|
118 |
return source, sourceName
|
119 |
|
120 |
def getMaxLineWidth(language: str) -> int:
|
121 |
-
if (language
|
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:
|