Skip to content

Commit

Permalink
Added translations to Spanish and Portuguese
Browse files Browse the repository at this point in the history
  • Loading branch information
jeisfeld committed Jul 30, 2020
1 parent 634c14f commit 1736c6a
Show file tree
Hide file tree
Showing 12 changed files with 432 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package de.jeisfeld.lifx.app;

import java.util.Locale;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
Expand All @@ -14,6 +12,8 @@
import android.os.LocaleList;
import android.util.Log;

import java.util.Locale;

import de.jeisfeld.lifx.app.alarms.AlarmReceiver;
import de.jeisfeld.lifx.app.util.PreferenceUtil;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
Expand Down Expand Up @@ -75,7 +75,7 @@ public static Context getAppContext() {
* Get a resource string.
*
* @param resourceId the id of the resource.
* @param args arguments for the formatting
* @param args arguments for the formatting
* @return the value of the String resource.
*/
public static String getResourceString(final int resourceId, final Object... args) {
Expand Down Expand Up @@ -138,6 +138,8 @@ private static Locale getApplicationLocale() {
return Locale.GERMAN;
case 3: // MAGIC_NUMBER
return new Locale("es");
case 4: // MAGIC_NUMBER
return new Locale("pt");
default:
return Application.DEFAULT_LOCALE;
}
Expand Down
2 changes: 1 addition & 1 deletion LifxTools/app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<string name="notification_channel_animation">LIFX-Animationen</string>
<string name="notification_title_animation">LIFX Animation</string>
<string name="notification_text_animation_running">Animation läuft für %1$s</string>
<string name="notification_channel_alarm">LIFX-Alarm</string>
<string name="notification_channel_alarm">LIFX-Alarme</string>
<string name="notification_channel_alarm_execution">LIFX-Alarm-Ausführung</string>
<string name="notification_title_alarm">LIFX-Alarm</string>
<string name="notification_title_alarm_execution">LIFX-Alarm %1$s</string>
Expand Down
4 changes: 2 additions & 2 deletions LifxTools/app/src/main/res/values-de/strings_dialog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<string name="title_dialog_import">Import der Einstellungen</string>
<string name="message_dialog_import_missing_file">Die Einstellungen können nicht importiert werden, da keine Einstellungsdatei im Verzeichnis %1$s gefunden wurde.</string>
<string name="message_dialog_import_overwrite">Dies wird alle vorhandenen Einstellungen (Geräte, gespeicherte Farben, Alarme) löschen und durch die importierten Einstellungen ersetzen. Wollen Sie fortfahren?</string>
<string name="title_dialog_delete_stored_settings">Gespeicherte Einstellungen</string>
<string name="title_dialog_delete_stored_settings">Gespeicherte Einstellungen löschen</string>
<string name="message_dialog_delete_stored_settings">Wollen Sie gespeicherten Einstellungen vom %1$s wirklich löschen?</string>

<string name="button_save">Speichern</string>
Expand All @@ -48,7 +48,7 @@

<string name="label_alarm_active">Aktiv</string>
<string name="label_alarm_time">Zeit</string>
<string name="label_alarm_week_days">Wiederholung</string>
<string name="label_alarm_week_days">Wiederholen</string>
<string name="text_monday">Mo</string>
<string name="text_tuesday">Di</string>
<string name="text_wednesday">Mi</string>
Expand Down
6 changes: 4 additions & 2 deletions LifxTools/app/src/main/res/values-de/strings_preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
<item>Systemsprache</item>
<item>English</item>
<item>Deutsch</item>
<item>Español</item>
<item>Português</item>
</string-array>
<string-array name="pref_list_titles_power_duration">
<item>Sofort - angeschaltet lassen</item>
Expand Down Expand Up @@ -47,7 +49,7 @@
</string-array>
<string-array name="pref_list_titles_night_mode">
<item>System</item>
<item>Aus</item>
<item>An</item>
<item>Hell</item>
<item>Dunkel</item>
</string-array>
</resources>
36 changes: 36 additions & 0 deletions LifxTools/app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<resources>
<string name="app_name">LifxTools</string>
<string name="navigation_drawer_open">Barra de navegación abierta</string>
<string name="navigation_drawer_close">Cerrar barra de navegación</string>
<string name="nav_header_title">LIFX Tools</string>
<string name="nav_header_subtitle">[email protected]</string>
<string name="nav_header_desc">Título de navegación</string>
<string name="action_refresh">Actualizar</string>

<string name="menu_home">Inicio</string>
<string name="menu_stored_colors">Colores almacenados</string>
<string name="menu_manage_devices">Administrar dispositivos</string>
<string name="menu_alarms">Alarmas</string>
<string name="menu_alarm_configuration">Configuración de alarma</string>
<string name="menu_alarm_step_configuration">Configuración de paso de alarma</string>
<string name="menu_general_settings">Configuración general</string>
<string name="menu_settings">Configuraciones</string>

<string name="message_searching_devices">Buscar dispositivos LIFX&#8230;</string>
<string name="message_no_devices_found">No se encontraron dispositivos.</string>

<string name="color_off">APAGADA</string>
<string name="default_alarm_name">Alarma %1$d</string>
<string name="alarm_stopsequence_name">%1$s (Secuencia de parada)</string>

<string name="notification_channel_animation">Animaciones LIFX</string>
<string name="notification_title_animation">Animación LIFX</string>
<string name="notification_text_animation_running">Animación corriendo por %1$s</string>
<string name="notification_channel_alarm">Alarmas LIFX</string>
<string name="notification_channel_alarm_execution">Ejecución de alarma LIFX</string>
<string name="notification_title_alarm">Alarme LIFX</string>
<string name="notification_title_alarm_execution">Alarme LIFX %1$s</string>
<string name="notification_text_alarm">%2$s: %1$s\n</string>
<string name="notification_text_no_alarm">No más alarmas</string>
<string name="notification_alarm_action_stop">Detener</string>
</resources>
112 changes: 112 additions & 0 deletions LifxTools/app/src/main/res/values-es/strings_dialog.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="title_dialog_confirmation">Confirmación</string>
<string name="title_dialog_select_light">Selecciona la luz</string>
<string name="title_dialog_select_color">Selecciona el color</string>
<string name="title_dialog_save_color">Guardar el color</string>
<string name="title_dialog_image">Adaptar imagen</string>
<string name="title_dialog_animation">Configuraciones de animación</string>
<string name="title_dialog_alarm_time">Establecer hora de alarma</string>
<string name="title_dialog_copy_alarm">Copiar alarma</string>
<string name="title_dialog_change_alarm_name">Cambiar nombre de alarma</string>
<string name="title_dialog_change_color_name">Cambiar nombre de color</string>
<string name="title_dialog_select_date_for_import">Seleccione la fecha de configuración para importar</string>
<string name="message_dialog_new_alarm_name">Nuevo nombre de alarma:</string>
<string name="message_dialog_new_color_name">Nuevo nombre de color:</string>

<string name="title_dialog_alarm_step_delay">Retraso del paso de alarma</string>
<string name="message_dialog_alarm_step_delay">Configure el retraso del paso de alarma después del inicio de la alarma</string>
<string name="title_dialog_alarm_step_duration">Duración del paso de alarma</string>
<string name="message_dialog_alarm_step_duration">Configure la duración del paso de alarma.</string>

<string name="title_no_stored_colors">No hay colores almacenados</string>
<string name="message_no_stored_colors">No hay colores almacenados. Debe almacenar colores antes de poder usarlos para alarmas.</string>
<string name="title_did_not_save_empty_name">Nombre perdido</string>
<string name="message_did_not_save_empty_name">No se guardó: el nombre estaba vacío.</string>

<string name="title_dialog_export">Exportación de configuraciones</string>
<string name="message_dialog_export_overwrite">El archivo de exportación %1$s ya existe. ¿Quieres sobreescribirlo?</string>
<string name="title_dialog_import">Importación de configuraciones</string>
<string name="message_dialog_import_missing_file">La configuración no se puede importar porque no se encontró ningún archivo de configuración en %1$s</string>
<string name="message_dialog_import_overwrite">Esto eliminará todas las configuraciones existentes (dispositivos, colores almacenados, alarmas) y las reemplazará por las importadas. ¿Quieres continuar?</string>
<string name="title_dialog_delete_stored_settings">Eliminar configuraciones almacenadas</string>
<string name="message_dialog_delete_stored_settings">¿Realmente desea eliminar la configuración almacenada de %1$s?</string>

<string name="button_save">Guardar</string>
<string name="button_ok">OK</string>
<string name="button_start">Inicio</string>
<string name="button_cancel">Cancelar</string>
<string name="button_delete">Eliminar</string>
<string name="button_rename">Cambiar nombre</string>
<string name="button_copy">Crear copia</string>
<string name="button_add_alarm">Agregar alarma</string>
<string name="button_overwrite">Sobrescribir</string>
<string name="button_import">Importar</string>

<string name="list_entry_ringtone">Tono de llamada</string>
<string name="title_dialog_ringtone">Seleccione un tono de llamada para la alarma</string>

<string name="label_alarm_active">Activo</string>
<string name="label_alarm_time">Tiempo</string>
<string name="label_alarm_week_days">Repetir</string>
<string name="text_monday">L</string>
<string name="text_tuesday">M</string>
<string name="text_wednesday">X</string>
<string name="text_thursday">J</string>
<string name="text_friday">V</string>
<string name="text_saturday">S</string>
<string name="text_sunday">D</string>
<string name="label_alarm_step_start">Inicio</string>
<string name="label_alarm_step_end">Fin</string>
<string name="hint_select_stored_color">(Seleccionar color almacenado)</string>

<string name="label_animation_type">Tipo</string>
<string name="label_animation_duration">Duración</string>
<string name="hint_animation_duration">(segundos)</string>
<string name="label_animation_radius">Radio</string>
<string name="label_animation_stretch">Extensión</string>
<string name="label_animation_direction">Dirección</string>
<string name="label_animation_colors">Colores</string>
<string name="label_animation_color_regex">Colores (RegEx)</string>
<string name="label_animation_adjust_brightness">Ajustar el brillo</string>

<string name="label_minutes">Minutos</string>
<string name="label_seconds">Segundos</string>

<string-array name="values_multizone_animation_direction">
<item>adelante</item>
<item>hacia atrás</item>
<item>hacia fuera</item>
<item>hacia adentro</item>
</string-array>
<string-array name="values_tilechain_animation_type">
<item>Moverse</item>
<item>Transición de imagen</item>
</string-array>
<string-array name="values_tilechain_animation_direction">
<item>hacia fuera</item>
<item>hacia adentro</item>
</string-array>

<string name="message_confirm_delete_light">¿Desea eliminar el dispositivo «%1$s» de la aplicación? (Se volverá a crear si se detecta en la LAN).</string>
<string name="message_dialog_save_color_name">Por favor, introduzca un nombre para el color.</string>
<string name="message_confirm_delete_color">¿Desea eliminar el color «%1$s» de la aplicación?</string>
<string name="message_confirm_delete_alarm">¿Desea eliminar la alarma «%1$s» de la aplicación?</string>
<string name="message_confirm_delete_alarm_stopsequence">¿Desea eliminar la secuencia de detención de la alarma «%1$s» de la aplicación?</string>
<string name="message_confirm_delete_alarm_step">¿Quiere eliminar el paso de alarma?</string>
<string name="message_no_device_with_stored_colors">No hay dispositivos LIFX con colores almacenados disponibles.</string>

<string name="toast_saved_color">Se guardó el color «%1$s»</string>
<string name="toast_connection_failed">La conexión a %1$s falló.</string>
<string name="toast_settings_exported">Todas las configuraciones se han exportado al archivo %1$s</string>
<string name="toast_settings_export_canceled">La exportación de configuraciones fue cancelada</string>
<string name="toast_settings_import_canceled">La importación de configuraciones fue cancelada</string>
<string name="toast_settings_import_failed">Error al importar la configuración: %1$s</string>
<string name="toast_settings_imported">Todas las configuraciones han sido importadas</string>

<string name="toast_alarmtype_standard">La alarma termina automáticamente</string>
<string name="toast_alarmtype_stopmanual">La alarma espera la parada manual</string>
<string name="toast_alarmtype_cyclic">La alarma se ejecuta cíclicamente hasta que se detiene manualmente.</string>
<string name="toast_alarmtype_stopsequence">Configuración de la secuencia de detención que se ejecuta después de detener la alarma.</string>

</resources>
55 changes: 55 additions & 0 deletions LifxTools/app/src/main/res/values-es/strings_preferences.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Titles and defaults of preferences -->
<string name="pref_title_language">Idioma</string>
<string name="pref_title_power_duration">Duración encender/apagar</string>
<string name="pref_title_color_duration">Duración del cambio de color</string>
<string name="pref_title_refresh_period">Periodo de actualización</string>
<string name="pref_title_use_wakelock">Mantente despierto en la animación</string>
<string name="pref_title_night_mode">Modo oscuro</string>
<string name="pref_title_dummy_export">Exportar todas las configuraciones</string>
<string name="pref_title_dummy_import">Importar todas las configuraciones</string>

<!-- Arrays for list preferences -->
<string-array name="pref_list_titles_language">
<item>Idioma del sistema</item>
<item>English</item>
<item>Deutsch</item>
<item>Español</item>
<item>Português</item>
</string-array>
<string-array name="pref_list_titles_power_duration">
<item>Inmediato - mantener la luz encendida</item>
<item>&#188; segundo</item>
<item>&#189; segundo</item>
<item>1 segundo</item>
<item>2 segundos</item>
<item>5 segundos</item>
</string-array>
<string-array name="pref_list_titles_color_duration">
<item>Inmediato</item>
<item>&#188; segundo</item>
<item>&#189; segundo</item>
<item>1 segundo</item>
<item>2 segundos</item>
<item>5 segundos</item>
<item>15 segundos</item>
<item>30 segundos</item>
<item>1 minuto</item>
</string-array>
<string-array name="pref_list_titles_refresh_period">
<item>Solo al inicio</item>
<item>&#188; segundo</item>
<item>&#189; segundo</item>
<item>1 segundo</item>
<item>2 segundos</item>
<item>5 segundos</item>
<item>15 segundos</item>
<item>30 segundos</item>
</string-array>
<string-array name="pref_list_titles_night_mode">
<item>Seguir sistema</item>
<item>Brillante</item>
<item>Oscuro</item>
</string-array>
</resources>
36 changes: 36 additions & 0 deletions LifxTools/app/src/main/res/values-pt/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<resources>
<string name="app_name">LifxTools</string>
<string name="navigation_drawer_open">Abrir barra de navegação</string>
<string name="navigation_drawer_close">Fechar barra de navegação</string>
<string name="nav_header_title">LIFX Tools</string>
<string name="nav_header_subtitle">[email protected]</string>
<string name="nav_header_desc">Título da Navegação</string>
<string name="action_refresh">Atualizar</string>

<string name="menu_home">Home</string>
<string name="menu_stored_colors">Cores armazenadas</string>
<string name="menu_manage_devices">Gerenciar dispositivos</string>
<string name="menu_alarms">Alarmes</string>
<string name="menu_alarm_configuration">Configuração de alarme</string>
<string name="menu_alarm_step_configuration">Configuração da etapa de alarme</string>
<string name="menu_general_settings">Configurações Gerais</string>
<string name="menu_settings">Configurações</string>

<string name="message_searching_devices">Procurando dispositivos LIFX&#8230;</string>
<string name="message_no_devices_found">Nenhum dispositivo encontrado.</string>

<string name="color_off">FORA</string>
<string name="default_alarm_name">Alarme %1$d</string>
<string name="alarm_stopsequence_name">%1$s (Sequência de parada)</string>

<string name="notification_channel_animation">Animações LIFX</string>
<string name="notification_title_animation">Animação LIFX</string>
<string name="notification_text_animation_running">Animação em execução por %1$s</string>
<string name="notification_channel_alarm">Alarmes LIFX</string>
<string name="notification_channel_alarm_execution">Execução de alarme LIFX</string>
<string name="notification_title_alarm">Alarme LIFX</string>
<string name="notification_title_alarm_execution">Alarme LIFX %1$s</string>
<string name="notification_text_alarm">%2$s: %1$s\n</string>
<string name="notification_text_no_alarm">Sem mais alarmes</string>
<string name="notification_alarm_action_stop">Pare</string>
</resources>
Loading

0 comments on commit 1736c6a

Please sign in to comment.