cdleong commited on
Commit
bc0875e
1 Parent(s): f6ae8b8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
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
- return get_lang_description_from_mapping_name(string_to_check)
 
 
 
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)