From ae523fc94a8764c047b8361dd471738ce9ca8d5e Mon Sep 17 00:00:00 2001 From: angedam Date: Sat, 23 Jun 2018 17:16:54 +0200 Subject: [PATCH] fix translation --- plugin.video.alfa/channels/downloads.py | 60 +++++++++---------- plugin.video.alfa/core/downloader.py | 6 +- .../resources/language/English/strings.po | 53 ++++++++++++++-- .../resources/language/Italian/strings.po | 50 +++++++++++++++- .../language/Spanish (Argentina)/strings.po | 48 +++++++++++++++ .../language/Spanish (Mexico)/strings.po | 48 +++++++++++++++ .../resources/language/Spanish/strings.po | 48 +++++++++++++++ 7 files changed, 274 insertions(+), 39 deletions(-) diff --git a/plugin.video.alfa/channels/downloads.py b/plugin.video.alfa/channels/downloads.py index 98c2836b..0623ec4a 100755 --- a/plugin.video.alfa/channels/downloads.py +++ b/plugin.video.alfa/channels/downloads.py @@ -89,40 +89,40 @@ def mainlist(item): # Si hay alguno completado if 2 in estados: - itemlist.insert(0, Item(channel=item.channel, action="clean_ready", title="Eliminar descargas completadas", + itemlist.insert(0, Item(channel=item.channel, action="clean_ready", title=config.get_localized_string(70218), contentType=item.contentType, contentChannel=item.contentChannel, contentSerieName=item.contentSerieName, text_color="sandybrown")) # Si hay alguno con error if 3 in estados: - itemlist.insert(0, Item(channel=item.channel, action="restart_error", title="Reiniciar descargas con error", + itemlist.insert(0, Item(channel=item.channel, action="restart_error", title=config.get_localized_string(70219), contentType=item.contentType, contentChannel=item.contentChannel, contentSerieName=item.contentSerieName, text_color="orange")) # Si hay alguno pendiente if 1 in estados or 0 in estados: - itemlist.insert(0, Item(channel=item.channel, action="download_all", title="Descargar todo", + itemlist.insert(0, Item(channel=item.channel, action="download_all", title=config.get_localized_string(70220), contentType=item.contentType, contentChannel=item.contentChannel, contentSerieName=item.contentSerieName, text_color="green")) if len(itemlist): - itemlist.insert(0, Item(channel=item.channel, action="clean_all", title="Eliminar todo", + itemlist.insert(0, Item(channel=item.channel, action="clean_all", title=config.get_localized_string(70221), contentType=item.contentType, contentChannel=item.contentChannel, contentSerieName=item.contentSerieName, text_color="red")) if not item.contentType == "tvshow" and config.get_setting("browser", "downloads") == True: - itemlist.insert(0, Item(channel=item.channel, action="browser", title="Ver archivos descargados", + itemlist.insert(0, Item(channel=item.channel, action="browser", title=config.get_localized_string(70222), url=DOWNLOAD_PATH, text_color="yellow")) if not item.contentType == "tvshow": - itemlist.insert(0, Item(channel=item.channel, action="settings", title="Configuración descargas...", + itemlist.insert(0, Item(channel=item.channel, action="settings", title=config.get_localized_string(70223), text_color="blue")) return itemlist def settings(item): - ret = platformtools.show_channel_settings(caption="configuración -- Descargas") + ret = platformtools.show_channel_settings(caption=config.get_localized_string(70224)) platformtools.itemlist_refresh() return ret @@ -211,7 +211,7 @@ def menu(item): else: servidor = "Auto" # Opciones disponibles para el menu - op = ["Descargar", "Eliminar de la lista", "Reiniciar descarga y eliminar datos", + op = [config.get_localized_string(70225), config.get_localized_string(70226), config.get_localized_string(70227), "Modificar servidor: %s" % (servidor.capitalize())] opciones = [] @@ -237,7 +237,7 @@ def menu(item): opciones.append(op[1]) # Eliminar de la lista # Mostramos el dialogo - seleccion = platformtools.dialog_select("Elige una opción", opciones) + seleccion = platformtools.dialog_select(config.get_localized_string(30163), opciones) # -1 es cancelar if seleccion == -1: return @@ -289,12 +289,12 @@ def move_to_libray(item): if config.get_setting("library_add", "downloads") == True: if filetools.isfile(final_path): if item.contentType == "movie" and item.infoLabels["tmdb_id"]: - library_item = Item(title="Descargado: %s" % item.downloadFilename, channel="downloads", + library_item = Item(title=config.get_localized_string(70228) % item.downloadFilename, channel="downloads", action="findvideos", infoLabels=item.infoLabels, url=final_path) videolibrarytools.save_movie(library_item) elif item.contentType == "episode" and item.infoLabels["tmdb_id"]: - library_item = Item(title="Descargado: %s" % item.downloadFilename, channel="downloads", + library_item = Item(title=config.get_localized_string(70228) % item.downloadFilename, channel="downloads", action="findvideos", infoLabels=item.infoLabels, url=final_path) tvshow = Item(channel="downloads", contentType="tvshow", infoLabels={"tmdb_id": item.infoLabels["tmdb_id"]}) @@ -511,11 +511,11 @@ def download_from_server(item): logger.info(item.tostring()) unsupported_servers = ["torrent"] - progreso = platformtools.dialog_progress("Descargas", "Probando con: %s" % item.server) + progreso = platformtools.dialog_progress(config.get_localized_string(30101), config.get_localized_string(70178) % item.server) channel = __import__('channels.%s' % item.contentChannel, None, None, ["channels.%s" % item.contentChannel]) if hasattr(channel, "play") and not item.play_menu: - progreso.update(50, "Probando con: %s" % item.server, "Conectando con %s..." % item.contentChannel) + progreso.update(50, config.get_localized_string(70178) % item.server, config.get_localized_string(60003) % item.contentChannel) try: itemlist = getattr(channel, "play")(item.clone(channel=item.contentChannel, action=item.contentAction)) except: @@ -578,10 +578,10 @@ def download_from_best_server(item): result = {"downloadStatus": STATUS_CODES.error} - progreso = platformtools.dialog_progress("Descargas", "Obteniendo lista de servidores disponibles...") + progreso = platformtools.dialog_progress(config.get_localized_string(30101), config.get_localized_string(70179)) channel = __import__('channels.%s' % item.contentChannel, None, None, ["channels.%s" % item.contentChannel]) - progreso.update(50, "Obteniendo lista de servidores disponibles:", "Conectando con %s..." % item.contentChannel) + progreso.update(50, config.get_localized_string(70184), config.get_localized_string(70180) % item.contentChannel) if hasattr(channel, item.contentAction): play_items = getattr(channel, item.contentAction)( @@ -591,8 +591,8 @@ def download_from_best_server(item): play_items = filter(lambda x: x.action == "play" and not "trailer" in x.title.lower(), play_items) - progreso.update(100, "Obteniendo lista de servidores disponibles", "Servidores disponibles: %s" % len(play_items), - "Identificando servidores...") + progreso.update(100, config.get_localized_string(70183), config.get_localized_string(70181) % len(play_items), + config.get_localized_string(70182)) if config.get_setting("server_reorder", "downloads") == 1: play_items.sort(key=sort_method) @@ -625,9 +625,9 @@ def select_server(item): logger.info( "contentAction: %s | contentChannel: %s | url: %s" % (item.contentAction, item.contentChannel, item.url)) - progreso = platformtools.dialog_progress("Descargas", "Obteniendo lista de servidores disponibles...") + progreso = platformtools.dialog_progress(config.get_localized_string(30101), config.get_localized_string(70179)) channel = __import__('channels.%s' % item.contentChannel, None, None, ["channels.%s" % item.contentChannel]) - progreso.update(50, "Obteniendo lista de servidores disponibles:", "Conectando con %s..." % item.contentChannel) + progreso.update(50, config.get_localized_string(70184), config.get_localized_string(70180) % item.contentChannel) if hasattr(channel, item.contentAction): play_items = getattr(channel, item.contentAction)( @@ -637,14 +637,14 @@ def select_server(item): play_items = filter(lambda x: x.action == "play" and not "trailer" in x.title.lower(), play_items) - progreso.update(100, "Obteniendo lista de servidores disponibles", "Servidores disponibles: %s" % len(play_items), - "Identificando servidores...") + progreso.update(100, config.get_localized_string(70183), config.get_localized_string(70181) % len(play_items), + config.get_localized_string(70182)) for x, i in enumerate(play_items): if not i.server and hasattr(channel, "play"): play_items[x] = getattr(channel, "play")(i) - seleccion = platformtools.dialog_select("Selecciona el servidor", ["Auto"] + [s.title for s in play_items]) + seleccion = platformtools.dialog_select(config.get_localized_string(70192), ["Auto"] + [s.title for s in play_items]) if seleccion > 1: update_json(item.path, { "downloadServer": {"url": play_items[seleccion - 1].url, "server": play_items[seleccion - 1].server}}) @@ -795,7 +795,7 @@ def save_download_video(item): write_json(item) - if not platformtools.dialog_yesno(config.get_localized_string(30101), "¿Iniciar la descarga ahora?"): + if not platformtools.dialog_yesno(config.get_localized_string(30101), config.get_localized_string(70189)): platformtools.dialog_ok(config.get_localized_string(30101), item.contentTitle, config.get_localized_string(30109)) else: @@ -806,7 +806,7 @@ def save_download_movie(item): logger.info("contentAction: %s | contentChannel: %s | contentTitle: %s" % ( item.contentAction, item.contentChannel, item.contentTitle)) - progreso = platformtools.dialog_progress("Descargas", "Obteniendo datos de la pelicula") + progreso = platformtools.dialog_progress(config.get_localized_string(30101), config.get_localized_string(70191)) set_movie_title(item) @@ -815,7 +815,7 @@ def save_download_movie(item): progreso.close() return save_download_video(item) - progreso.update(0, "Añadiendo pelicula...") + progreso.update(0, config.get_localized_string(60062)) item.downloadFilename = filetools.validate_path("%s [%s]" % (item.contentTitle.strip(), item.contentChannel)) @@ -823,7 +823,7 @@ def save_download_movie(item): progreso.close() - if not platformtools.dialog_yesno(config.get_localized_string(30101), "¿Iniciar la descarga ahora?"): + if not platformtools.dialog_yesno(config.get_localized_string(30101), config.get_localized_string(70189)): platformtools.dialog_ok(config.get_localized_string(30101), item.contentTitle, config.get_localized_string(30109)) else: @@ -834,17 +834,17 @@ def save_download_tvshow(item): logger.info("contentAction: %s | contentChannel: %s | contentType: %s | contentSerieName: %s" % ( item.contentAction, item.contentChannel, item.contentType, item.contentSerieName)) - progreso = platformtools.dialog_progress("Descargas", "Obteniendo datos de la serie") + progreso = platformtools.dialog_progress(config.get_localized_string(30101), config.get_localized_string(70188)) scraper.find_and_set_infoLabels(item) item.downloadFilename = filetools.validate_path("%s [%s]" % (item.contentSerieName, item.contentChannel)) - progreso.update(0, "Obteniendo episodios...", "conectando con %s..." % item.contentChannel) + progreso.update(0, config.get_localized_string(70186), config.get_localized_string(70187) % item.contentChannel) episodes = get_episodes(item) - progreso.update(0, "Añadiendo capitulos...", " ") + progreso.update(0, config.get_localized_string(70190), " ") for x, i in enumerate(episodes): progreso.update(x * 100 / len(episodes), @@ -852,7 +852,7 @@ def save_download_tvshow(item): write_json(i) progreso.close() - if not platformtools.dialog_yesno(config.get_localized_string(30101), "¿Iniciar la descarga ahora?"): + if not platformtools.dialog_yesno(config.get_localized_string(30101), config.get_localized_string(70189)): platformtools.dialog_ok(config.get_localized_string(30101), str(len(episodes)) + " capitulos de: " + item.contentSerieName, config.get_localized_string(30109)) diff --git a/plugin.video.alfa/core/downloader.py b/plugin.video.alfa/core/downloader.py index 6efb1554..243b69ac 100644 --- a/plugin.video.alfa/core/downloader.py +++ b/plugin.video.alfa/core/downloader.py @@ -29,7 +29,7 @@ import urlparse from threading import Thread, Lock from core import filetools -from platformcode import logger +from platformcode import logger, config class Downloader: @@ -89,9 +89,9 @@ class Downloader: return os.path.abspath(filetools.join(self._path, self._filename)) # Funciones - def start_dialog(self, title="Descargando..."): + def start_dialog(self, title=config.get_localized_string(60200)): from platformcode import platformtools - progreso = platformtools.dialog_progress(title, "Iniciando descarga...") + progreso = platformtools.dialog_progress(title, config.get_localized_string(60201)) self.start() while self.state == self.states.downloading and not progreso.iscanceled(): time.sleep(0.1) diff --git a/plugin.video.alfa/resources/language/English/strings.po b/plugin.video.alfa/resources/language/English/strings.po index b9b03abd..0954984c 100644 --- a/plugin.video.alfa/resources/language/English/strings.po +++ b/plugin.video.alfa/resources/language/English/strings.po @@ -299,7 +299,6 @@ msgstr "" msgctxt "#30984" msgid "Popular" - msgstr "" msgctxt "#30985" @@ -3054,10 +3053,6 @@ msgctxt "#70080" msgid "Do you want Alfa to auto-configure Kodi's video library?" msgstr "" -msgctxt "#70081" -msgid "If you choose 'No' you can do it later from 'Configuration > Preferences > Paths'." -msgstr "" - msgctxt "#70082" msgid "Global Search" msgstr "" @@ -3598,3 +3593,51 @@ msgctxt "#70216" msgid "Back" msgstr "" +msgctxt "#70217" +msgid "downloads" +msgstr "" + +msgctxt "#70218" +msgid "Delete complete downloads" +msgstr "" + +msgctxt "#70219" +msgid "Restart download with error" +msgstr "" + +msgctxt "#70220" +msgid "Download all" +msgstr "" + +msgctxt "#70221" +msgid "Delete all" +msgstr "" + +msgctxt "#70222" +msgid "View downloaded files" +msgstr "" + +msgctxt "#70223" +msgid "Settings downloads..." +msgstr "" + +msgctxt "#70224" +msgid "settings -- Downloads" +msgstr "" + +msgctxt "#70225" +msgid "Download" +msgstr "" + +msgctxt "#70226" +msgid "Remove from the list" +msgstr "" + +msgctxt "#70227" +msgid "Restart download and delete data" +msgstr "" + +msgctxt "#70228" +msgid "Downloaded: %s" +msgstr "" + diff --git a/plugin.video.alfa/resources/language/Italian/strings.po b/plugin.video.alfa/resources/language/Italian/strings.po index 536722dd..561b6b54 100644 --- a/plugin.video.alfa/resources/language/Italian/strings.po +++ b/plugin.video.alfa/resources/language/Italian/strings.po @@ -463,7 +463,7 @@ msgstr "Attendere prego" msgctxt "#59990" msgid "Channels included in the search" -msgstr "Canali inclusi nella ricerca" +msgstr "Sto cercando nei canali:" msgctxt "#59991" msgid "All" @@ -3581,4 +3581,52 @@ msgctxt "#70216" msgid "Back" msgstr "Indietro" +msgctxt "#70217" +msgid "downloads" +msgstr "downloads" + +msgctxt "#70218" +msgid "Delete complete downloads" +msgstr "Elimina i downloads completati" + +msgctxt "#70219" +msgid "Restart download with error" +msgstr "Reinizia i download con errori" + +msgctxt "#70220" +msgid "Download all" +msgstr "Scarica tutti" + +msgctxt "#70221" +msgid "Delete all" +msgstr "Elimina tutto" + +msgctxt "#70222" +msgid "View downloaded files" +msgstr "Vedi i files scaricati" + +msgctxt "#70223" +msgid "Settings downloads..." +msgstr "Configurazione downloads..." + +msgctxt "#70224" +msgid "settings -- Downloads" +msgstr "configurazione -- Download" + +msgctxt "#70225" +msgid "Download" +msgstr "Scarica" + +msgctxt "#70226" +msgid "Remove from the list" +msgstr "Elimina dalla lista" + +msgctxt "#70227" +msgid "Restart download and delete data" +msgstr "Reinizia il download ed elimina dati" + +msgctxt "#70228" +msgid "Downloaded: %s" +msgstr "Scaricato: %s" + diff --git a/plugin.video.alfa/resources/language/Spanish (Argentina)/strings.po b/plugin.video.alfa/resources/language/Spanish (Argentina)/strings.po index 9a97e639..99d927de 100644 --- a/plugin.video.alfa/resources/language/Spanish (Argentina)/strings.po +++ b/plugin.video.alfa/resources/language/Spanish (Argentina)/strings.po @@ -3569,6 +3569,54 @@ msgctxt "#70216" msgid "Back" msgstr "Atrás" +msgctxt "#70217" +msgid "downloads" +msgstr "descargas" + +msgctxt "#70218" +msgid "Delete complete downloads" +msgstr "Eliminar descargas completadas" + +msgctxt "#70219" +msgid "Restart download with error" +msgstr "Reiniciar descargas con error" + +msgctxt "#70220" +msgid "Download all" +msgstr "Descargar todo" + +msgctxt "#70221" +msgid "Delete all" +msgstr "Eliminar todo" + +msgctxt "#70222" +msgid "View downloaded files" +msgstr "Ver archivos descargados" + +msgctxt "#70223" +msgid "Settings downloads..." +msgstr "Configuración descargas..." + +msgctxt "#70224" +msgid "settings -- Downloads" +msgstr "configuración -- Descargas" + +msgctxt "#70225" +msgid "Download" +msgstr "Descargar" + +msgctxt "#70226" +msgid "Remove from the list" +msgstr "Eliminar de la lista" + +msgctxt "#70227" +msgid "Restart download and delete data" +msgstr "Reiniciar descarga y eliminar datos" + +msgctxt "#70228" +msgid "Downloaded: %s" +msgstr "Descargado: %s" + diff --git a/plugin.video.alfa/resources/language/Spanish (Mexico)/strings.po b/plugin.video.alfa/resources/language/Spanish (Mexico)/strings.po index 9a97e639..99d927de 100644 --- a/plugin.video.alfa/resources/language/Spanish (Mexico)/strings.po +++ b/plugin.video.alfa/resources/language/Spanish (Mexico)/strings.po @@ -3569,6 +3569,54 @@ msgctxt "#70216" msgid "Back" msgstr "Atrás" +msgctxt "#70217" +msgid "downloads" +msgstr "descargas" + +msgctxt "#70218" +msgid "Delete complete downloads" +msgstr "Eliminar descargas completadas" + +msgctxt "#70219" +msgid "Restart download with error" +msgstr "Reiniciar descargas con error" + +msgctxt "#70220" +msgid "Download all" +msgstr "Descargar todo" + +msgctxt "#70221" +msgid "Delete all" +msgstr "Eliminar todo" + +msgctxt "#70222" +msgid "View downloaded files" +msgstr "Ver archivos descargados" + +msgctxt "#70223" +msgid "Settings downloads..." +msgstr "Configuración descargas..." + +msgctxt "#70224" +msgid "settings -- Downloads" +msgstr "configuración -- Descargas" + +msgctxt "#70225" +msgid "Download" +msgstr "Descargar" + +msgctxt "#70226" +msgid "Remove from the list" +msgstr "Eliminar de la lista" + +msgctxt "#70227" +msgid "Restart download and delete data" +msgstr "Reiniciar descarga y eliminar datos" + +msgctxt "#70228" +msgid "Downloaded: %s" +msgstr "Descargado: %s" + diff --git a/plugin.video.alfa/resources/language/Spanish/strings.po b/plugin.video.alfa/resources/language/Spanish/strings.po index 9a97e639..99d927de 100644 --- a/plugin.video.alfa/resources/language/Spanish/strings.po +++ b/plugin.video.alfa/resources/language/Spanish/strings.po @@ -3569,6 +3569,54 @@ msgctxt "#70216" msgid "Back" msgstr "Atrás" +msgctxt "#70217" +msgid "downloads" +msgstr "descargas" + +msgctxt "#70218" +msgid "Delete complete downloads" +msgstr "Eliminar descargas completadas" + +msgctxt "#70219" +msgid "Restart download with error" +msgstr "Reiniciar descargas con error" + +msgctxt "#70220" +msgid "Download all" +msgstr "Descargar todo" + +msgctxt "#70221" +msgid "Delete all" +msgstr "Eliminar todo" + +msgctxt "#70222" +msgid "View downloaded files" +msgstr "Ver archivos descargados" + +msgctxt "#70223" +msgid "Settings downloads..." +msgstr "Configuración descargas..." + +msgctxt "#70224" +msgid "settings -- Downloads" +msgstr "configuración -- Descargas" + +msgctxt "#70225" +msgid "Download" +msgstr "Descargar" + +msgctxt "#70226" +msgid "Remove from the list" +msgstr "Eliminar de la lista" + +msgctxt "#70227" +msgid "Restart download and delete data" +msgstr "Reiniciar descarga y eliminar datos" + +msgctxt "#70228" +msgid "Downloaded: %s" +msgstr "Descargado: %s" +