Revert "Fix Localized Strings in JSON Files (Mediaserver)"
This reverts commit 7f2d99238c.
This commit is contained in:
@@ -696,17 +696,15 @@ class platform(Platformtools):
|
||||
c["value"] = dict_values[c["id"]]
|
||||
|
||||
# Translation
|
||||
string_id = re.findall(r'\$ADDON\[[^\d]+(\d+)]', c['label'], flags=re.DOTALL)
|
||||
if c['label'].startswith('$') and len(string_id) > 0:
|
||||
c['label'] = str(config.get_localized_string(string_id[0]))
|
||||
if c['label'].startswith('@') and unicode(c['label'][1:]).isnumeric():
|
||||
c['label'] = str(config.get_localized_string(c['label'][1:]))
|
||||
if c["label"].endswith(":"): c["label"] = c["label"][:-1]
|
||||
|
||||
if c['type'] == 'list':
|
||||
lvalues = []
|
||||
for li in c['lvalues']:
|
||||
string_id = re.findall(r'\$ADDON\[[^\d]+(\d+)]', li, flags=re.DOTALL)
|
||||
if li.startswith('$') and len(string_id) > 0:
|
||||
lvalues.append(str(config.get_localized_string(string_id[0])))
|
||||
if li.startswith('@') and unicode(li[1:]).isnumeric():
|
||||
lvalues.append(str(config.get_localized_string(li[1:])))
|
||||
else:
|
||||
lvalues.append(li)
|
||||
c['lvalues'] = lvalues
|
||||
|
||||
Reference in New Issue
Block a user