Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ def get_lang_description_from_mapping_name(string_to_check):
|
|
12 |
return "Generic Latin Script"
|
13 |
|
14 |
if len(string_to_check)<2:
|
15 |
-
return None
|
16 |
|
17 |
try:
|
18 |
description = None
|
@@ -36,7 +36,10 @@ def get_lang_description_from_mapping_name(string_to_check):
|
|
36 |
substrings = string_to_check.split("-")
|
37 |
substrings = substrings[:-1] # remove the last one
|
38 |
string_to_check = "-".join(substrings)
|
39 |
-
|
|
|
|
|
|
|
40 |
else:
|
41 |
print("*****")
|
42 |
print(e)
|
|
|
12 |
return "Generic Latin Script"
|
13 |
|
14 |
if len(string_to_check)<2:
|
15 |
+
return None
|
16 |
|
17 |
try:
|
18 |
description = None
|
|
|
36 |
substrings = string_to_check.split("-")
|
37 |
substrings = substrings[:-1] # remove the last one
|
38 |
string_to_check = "-".join(substrings)
|
39 |
+
desc = get_lang_description_from_mapping_name(string_to_check)
|
40 |
+
if substrings[-1] == "red":
|
41 |
+
desc = desc + " (reduced)"
|
42 |
+
return desc
|
43 |
else:
|
44 |
print("*****")
|
45 |
print(e)
|