added localized strings
This commit is contained in:
@@ -27,7 +27,7 @@ def context():
|
||||
_context = ""
|
||||
|
||||
if config.is_xbmc():
|
||||
_context = [{"title": "Configurar AutoPlay",
|
||||
_context = [{"title": config.get_localized_string(60071),
|
||||
"action": "autoplay_config",
|
||||
"channel": "autoplay"}]
|
||||
return _context
|
||||
@@ -60,7 +60,7 @@ def show_option(channel, itemlist, text_color='yellow', thumbnail=None, fanart=N
|
||||
'servidores y calidades favoritas. '
|
||||
itemlist.append(
|
||||
Item(channel=__channel__,
|
||||
title="Configurar AutoPlay",
|
||||
title=config.get_localized_string(60071),
|
||||
action="autoplay_config",
|
||||
text_color=text_color,
|
||||
thumbnail=thumbnail,
|
||||
@@ -176,7 +176,7 @@ def start(itemlist, item):
|
||||
if 'context' not in item:
|
||||
item.context = list()
|
||||
if not filter(lambda x: x['action'] == 'autoplay_config', context):
|
||||
item.context.append({"title": "Configurar AutoPlay",
|
||||
item.context.append({"title": config.get_localized_string(60071),
|
||||
"action": "autoplay_config",
|
||||
"channel": "autoplay",
|
||||
"from_channel": channel_id})
|
||||
@@ -330,20 +330,19 @@ def start(itemlist, item):
|
||||
# Si se han alcanzado el numero maximo de intentos de este servidor
|
||||
# preguntar si queremos seguir probando o lo ignoramos
|
||||
if max_intentos_servers[videoitem.server.lower()] == 0:
|
||||
text = "Parece que los enlaces de %s no estan funcionando." % videoitem.server.upper()
|
||||
text = config.get_localized_string(60072) % videoitem.server.upper()
|
||||
if not platformtools.dialog_yesno("AutoPlay", text,
|
||||
"¿Desea ignorar todos los enlaces de este servidor?"):
|
||||
config.get_localized_string(60073)):
|
||||
max_intentos_servers[videoitem.server.lower()] = max_intentos
|
||||
|
||||
# Si no quedan elementos en la lista se informa
|
||||
if autoplay_elem == autoplay_list[-1]:
|
||||
platformtools.dialog_notification('AutoPlay', 'No hubo enlaces funcionales')
|
||||
platformtools.dialog_notification('AutoPlay', config.get_localized_string(60072))
|
||||
|
||||
else:
|
||||
platformtools.dialog_notification('AutoPlay No Fue Posible', 'No Hubo Coincidencias')
|
||||
platformtools.dialog_notification(config.get_localized_string(60074), config.get_localized_string(60075))
|
||||
if new_options:
|
||||
platformtools.dialog_notification("AutoPlay", "Nueva Calidad/Servidor disponible en la "
|
||||
"configuracion", sound=False)
|
||||
platformtools.dialog_notification("AutoPlay", config.get_localized_string(60076), sound=False)
|
||||
|
||||
# Restaura si es necesario el valor previo de "Accion y Player Mode" en preferencias
|
||||
if user_config_setting_action != 2:
|
||||
@@ -415,8 +414,8 @@ def init(channel, list_servers, list_quality, reset=False):
|
||||
result, json_data = jsontools.update_node(autoplay_node, 'autoplay', 'AUTOPLAY')
|
||||
|
||||
if not result:
|
||||
heading = "Error al iniciar AutoPlay"
|
||||
msj = "Consulte su log para obtener mas información."
|
||||
heading = config.get_localized_string(60077)
|
||||
msj = config.get_localized_string(60078)
|
||||
icon = 1
|
||||
|
||||
platformtools.dialog_notification(heading, msj, icon, sound=False)
|
||||
@@ -482,7 +481,7 @@ def autoplay_config(item):
|
||||
|
||||
allow_option = True
|
||||
|
||||
active_settings = {"id": "active", "label": "AutoPlay (activar/desactivar la auto-reproduccion)",
|
||||
active_settings = {"id": "active", "label": config.get_localized_string(60079),
|
||||
"color": "0xffffff99", "type": "bool", "default": False, "enabled": allow_option,
|
||||
"visible": allow_option}
|
||||
list_controls.append(active_settings)
|
||||
@@ -493,7 +492,7 @@ def autoplay_config(item):
|
||||
if not status_language:
|
||||
status_language = 0
|
||||
|
||||
set_language = {"id": "language", "label": "Idioma para AutoPlay (Opcional)", "color": "0xffffff99",
|
||||
set_language = {"id": "language", "label": config.get_localized_string(60080), "color": "0xffffff99",
|
||||
"type": "list", "default": 0, "enabled": "eq(-1,true)", "visible": True,
|
||||
"lvalues": get_languages(item.from_channel)}
|
||||
|
||||
@@ -513,7 +512,7 @@ def autoplay_config(item):
|
||||
else:
|
||||
enabled = "eq(-3,true)"
|
||||
|
||||
custom_servers_settings = {"id": "custom_servers", "label": " Servidores favoritos", "color": "0xff66ffcc",
|
||||
custom_servers_settings = {"id": "custom_servers", "label": config.get_localized_string(60081), "color": "0xff66ffcc",
|
||||
"type": "bool", "default": False, "enabled": enabled, "visible": True}
|
||||
list_controls.append(custom_servers_settings)
|
||||
if dict_values['active'] and enabled:
|
||||
@@ -526,7 +525,7 @@ def autoplay_config(item):
|
||||
default = num - 1
|
||||
if default > len(server_list) - 1:
|
||||
default = 0
|
||||
set_servers = {"id": "server_%s" % num, "label": u" \u2665 Servidor Favorito %s" % num,
|
||||
set_servers = {"id": "server_%s" % num, "label": u" \u2665" + config.get_localized_string(60082) % num,
|
||||
"color": "0xfffcab14", "type": "list", "default": default,
|
||||
"enabled": "eq(-%s,true)+eq(-%s,true)" % (pos1, num), "visible": True,
|
||||
"lvalues": server_list}
|
||||
@@ -544,7 +543,7 @@ def autoplay_config(item):
|
||||
else:
|
||||
enabled = "eq(-7,true)"
|
||||
|
||||
custom_quality_settings = {"id": "custom_quality", "label": " Calidades Favoritas", "color": "0xff66ffcc",
|
||||
custom_quality_settings = {"id": "custom_quality", "label": config.get_localized_string(60083), "color": "0xff66ffcc",
|
||||
"type": "bool", "default": False, "enabled": enabled, "visible": True}
|
||||
list_controls.append(custom_quality_settings)
|
||||
if dict_values['active'] and enabled:
|
||||
@@ -570,15 +569,15 @@ def autoplay_config(item):
|
||||
# Plan B
|
||||
dict_values['plan_b'] = settings_node.get('plan_b', False)
|
||||
enabled = "eq(-4,true)|eq(-8,true)"
|
||||
plan_b = {"id": "plan_b", "label": " Plan B (Si fallan los favoritos prueba otros enlaces)",
|
||||
plan_b = {"id": "plan_b", "label": config.get_localized_string(70172),
|
||||
"color": "0xffffff99",
|
||||
"type": "bool", "default": False, "enabled": enabled, "visible": True}
|
||||
list_controls.append(plan_b)
|
||||
|
||||
|
||||
# Seccion Prioridades
|
||||
priority_list = ["Servidor y Calidad", "Calidad y Servidor"]
|
||||
set_priority = {"id": "priority", "label": " Prioridad (Indica el orden para Auto-Reproducir)",
|
||||
priority_list = [config.get_localized_string(70174), config.get_localized_string(70175)]
|
||||
set_priority = {"id": "priority", "label": config.get_localized_string(60085),
|
||||
"color": "0xffffff99", "type": "list", "default": 0,
|
||||
"enabled": True, "visible": "eq(-5,true)+eq(-9,true)+eq(-12,true)", "lvalues": priority_list}
|
||||
list_controls.append(set_priority)
|
||||
@@ -681,7 +680,7 @@ def reset(item, dict):
|
||||
list_quality = channel.list_quality
|
||||
|
||||
init(channel_name, list_servers, list_quality, reset=True)
|
||||
platformtools.dialog_notification('AutoPlay', '%s: Los datos fueron reiniciados' % item.category)
|
||||
platformtools.dialog_notification('AutoPlay', config.get_localized_string(70523) % item.category)
|
||||
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user