Add more imported translations

This commit is contained in:
serso 2016-02-26 19:47:01 +01:00
parent 1325bc7b13
commit 9761b6e31c
23 changed files with 194 additions and 51 deletions

View File

@ -30,18 +30,16 @@ import android.view.View;
import android.widget.AdapterView;
import android.widget.FrameLayout;
import android.widget.Spinner;
import org.solovyev.android.Views;
import org.solovyev.android.calculator.App;
import org.solovyev.android.calculator.Preferences;
import org.solovyev.android.calculator.R;
import org.solovyev.android.calculator.keyboard.BaseKeyboardUi;
import javax.annotation.Nonnull;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Nonnull;
public class ChooseThemeWizardStep extends WizardFragment implements AdapterView.OnItemSelectedListener {
@Nonnull
@ -61,8 +59,8 @@ public class ChooseThemeWizardStep extends WizardFragment implements AdapterView
final Preferences.Gui.Theme theme = Preferences.Gui.getTheme(App.getPreferences());
final Spinner spinner = (Spinner) root.findViewById(R.id.wizard_theme_spinner);
themes.clear();
themes.add(new ThemeUi(Preferences.Gui.Theme.material_theme, R.string.p_material_theme));
themes.add(new ThemeUi(Preferences.Gui.Theme.material_light_theme, R.string.p_material_light_theme));
themes.add(new ThemeUi(Preferences.Gui.Theme.material_theme, R.string.cpp_theme_dark));
themes.add(new ThemeUi(Preferences.Gui.Theme.material_light_theme, R.string.cpp_theme_light));
themes.add(new ThemeUi(Preferences.Gui.Theme.metro_blue_theme, R.string.p_metro_blue_theme));
themes.add(new ThemeUi(Preferences.Gui.Theme.metro_green_theme, R.string.p_metro_green_theme));
themes.add(new ThemeUi(Preferences.Gui.Theme.metro_purple_theme, R.string.p_metro_purple_theme));

View File

@ -2,8 +2,15 @@
<resources>
<string name="cpp_prefs_vibrate_on_keypress">الاهتزاز عند اللمس</string>
<string name="cpp_prefs_auto_rotate_screen">التدوير التلقائي للشاشة</string>
<string name="cpp_prefs_language">اللغة</string>
<string name="cpp_prefs_theme">المظهر</string>
<string name="cpp_language">اللغة</string>
<string name="cpp_theme">المظهر</string>
<string name="cpp_theme_light">فاتح</string>
<string name="cpp_theme_dark">داكن</string>
<string name="cpp_prefs_keep_screen_on">البقاء في الوضع النشط</string>
<string name="cpp_permission_overlay">الظهور أمام التطبيقات الأخرى</string>
<string name="cpp_yes">نعم</string>
<string name="cpp_no">لا</string>
<string name="cpp_create">إنشاء</string>
<string name="cpp_close">إغلاق</string>
<string name="cpp_switch">تبديل</string>
</resources>

View File

@ -2,8 +2,15 @@
<resources>
<string name="cpp_prefs_vibrate_on_keypress">Při dotyku vibrovat</string>
<string name="cpp_prefs_auto_rotate_screen">Autom. otočení obrazovky</string>
<string name="cpp_prefs_language">Jazyk</string>
<string name="cpp_prefs_theme">Motiv</string>
<string name="cpp_language">Jazyk</string>
<string name="cpp_theme">Motiv</string>
<string name="cpp_theme_light">Světlý</string>
<string name="cpp_theme_dark">Tmavý</string>
<string name="cpp_prefs_keep_screen_on">Nevypínat obrazovku</string>
<string name="cpp_permission_overlay">Vykreslení přes další aplikace</string>
<string name="cpp_yes">Ano</string>
<string name="cpp_no">Ne</string>
<string name="cpp_create">Vytvořit</string>
<string name="cpp_close">Zavřít</string>
<string name="cpp_switch">Přepnout</string>
</resources>

View File

@ -2,8 +2,15 @@
<resources>
<string name="cpp_prefs_vibrate_on_keypress">Bei Berührung vibrieren</string>
<string name="cpp_prefs_auto_rotate_screen">Display automatisch drehen</string>
<string name="cpp_prefs_language">Sprache</string>
<string name="cpp_prefs_theme">Design</string>
<string name="cpp_language">Sprache</string>
<string name="cpp_theme">Design</string>
<string name="cpp_theme_light">Hell</string>
<string name="cpp_theme_dark">Dunkel</string>
<string name="cpp_prefs_keep_screen_on">Aktiv lassen</string>
<string name="cpp_permission_overlay">Über anderen Apps einblenden</string>
<string name="cpp_yes">Ja</string>
<string name="cpp_no">Nein</string>
<string name="cpp_create">Erstellen</string>
<string name="cpp_close">Schließen</string>
<string name="cpp_switch">Wechseln</string>
</resources>

View File

@ -2,8 +2,15 @@
<resources>
<string name="cpp_prefs_vibrate_on_keypress">Vibrar al tocar</string>
<string name="cpp_prefs_auto_rotate_screen">Girar pantalla automáticamente</string>
<string name="cpp_prefs_language">Idioma</string>
<string name="cpp_prefs_theme">Tema</string>
<string name="cpp_language">Idioma</string>
<string name="cpp_theme">Tema</string>
<string name="cpp_theme_light">Claro</string>
<string name="cpp_theme_dark">Oscuro</string>
<string name="cpp_prefs_keep_screen_on">Pantalla activa</string>
<string name="cpp_permission_overlay">Escribir sobre otras aplicaciones</string>
<string name="cpp_yes"></string>
<string name="cpp_no">No</string>
<string name="cpp_create">Crear</string>
<string name="cpp_close">Cerrar</string>
<string name="cpp_switch">Cambiar</string>
</resources>

View File

@ -2,8 +2,15 @@
<resources>
<string name="cpp_prefs_vibrate_on_keypress">Käytä värinää kosketettaessa</string>
<string name="cpp_prefs_auto_rotate_screen">Näytön automaattinen kierto</string>
<string name="cpp_prefs_language">Kieli</string>
<string name="cpp_prefs_theme">Teema</string>
<string name="cpp_language">Kieli</string>
<string name="cpp_theme">Teema</string>
<string name="cpp_theme_light">Vaalea</string>
<string name="cpp_theme_dark">Tumma</string>
<string name="cpp_prefs_keep_screen_on">Pysy käynnissä</string>
<string name="cpp_permission_overlay">Piirrä muihin sovelluksiin</string>
<string name="cpp_yes">Kyllä</string>
<string name="cpp_no">Ei</string>
<string name="cpp_create">Luo</string>
<string name="cpp_close">Sulje</string>
<string name="cpp_switch">Vaihda</string>
</resources>

View File

@ -2,8 +2,15 @@
<resources>
<string name="cpp_prefs_vibrate_on_keypress">Vibrer au toucher</string>
<string name="cpp_prefs_auto_rotate_screen">Rotation auto de l\&apos;écran</string>
<string name="cpp_prefs_language">Langue</string>
<string name="cpp_prefs_theme">Thème</string>
<string name="cpp_language">Langue</string>
<string name="cpp_theme">Thème</string>
<string name="cpp_theme_light">Clair</string>
<string name="cpp_theme_dark">Foncé</string>
<string name="cpp_prefs_keep_screen_on">Rester activé</string>
<string name="cpp_permission_overlay">Se superposer aux autres applis</string>
<string name="cpp_yes">Oui</string>
<string name="cpp_no">Non</string>
<string name="cpp_create">Créer</string>
<string name="cpp_close">Fermer</string>
<string name="cpp_switch">Changer</string>
</resources>

View File

@ -2,8 +2,15 @@
<resources>
<string name="cpp_prefs_vibrate_on_keypress">Vibra alla pressione</string>
<string name="cpp_prefs_auto_rotate_screen">Rotazione automatica</string>
<string name="cpp_prefs_language">Lingua</string>
<string name="cpp_prefs_theme">Tema</string>
<string name="cpp_language">Lingua</string>
<string name="cpp_theme">Tema</string>
<string name="cpp_theme_light">Chiaro</string>
<string name="cpp_theme_dark">Scuro</string>
<string name="cpp_prefs_keep_screen_on">Rimani attivo</string>
<string name="cpp_permission_overlay">Spostamento su altre app</string>
<string name="cpp_yes"></string>
<string name="cpp_no">No</string>
<string name="cpp_create">Crea</string>
<string name="cpp_close">Chiudi</string>
<string name="cpp_switch">Cambia</string>
</resources>

View File

@ -2,8 +2,15 @@
<resources>
<string name="cpp_prefs_vibrate_on_keypress">タッチ操作バイブ</string>
<string name="cpp_prefs_auto_rotate_screen">画面の自動回転</string>
<string name="cpp_prefs_language">言語</string>
<string name="cpp_prefs_theme">テーマ</string>
<string name="cpp_language">言語</string>
<string name="cpp_theme">テーマ</string>
<string name="cpp_theme_light">ライト</string>
<string name="cpp_theme_dark">ダーク</string>
<string name="cpp_prefs_keep_screen_on">スリープモードにしない</string>
<string name="cpp_permission_overlay">他のアプリの上に重ねて描画</string>
<string name="cpp_yes">はい</string>
<string name="cpp_no">いいえ</string>
<string name="cpp_create">作成</string>
<string name="cpp_close">閉じる</string>
<string name="cpp_switch">切り替え</string>
</resources>

View File

@ -2,8 +2,15 @@
<resources>
<string name="cpp_prefs_vibrate_on_keypress">Trillen bij aanraking</string>
<string name="cpp_prefs_auto_rotate_screen">Scherm autom. draaien</string>
<string name="cpp_prefs_language">Taal</string>
<string name="cpp_prefs_theme">Thema</string>
<string name="cpp_language">Taal</string>
<string name="cpp_theme">Thema</string>
<string name="cpp_theme_light">Licht</string>
<string name="cpp_theme_dark">Donker</string>
<string name="cpp_prefs_keep_screen_on">Stand-by</string>
<string name="cpp_permission_overlay">Over andere apps tekenen</string>
<string name="cpp_yes">Ja</string>
<string name="cpp_no">Nee</string>
<string name="cpp_create">Aanmaken</string>
<string name="cpp_close">Sluiten</string>
<string name="cpp_switch">Overschakelen</string>
</resources>

View File

@ -2,8 +2,15 @@
<resources>
<string name="cpp_prefs_vibrate_on_keypress">Wibracje przy dotknięciu</string>
<string name="cpp_prefs_auto_rotate_screen">Autoobracanie ekranu</string>
<string name="cpp_prefs_language">Język</string>
<string name="cpp_prefs_theme">Motyw</string>
<string name="cpp_language">Język</string>
<string name="cpp_theme">Motyw</string>
<string name="cpp_theme_light">Jasny</string>
<string name="cpp_theme_dark">Ciemny</string>
<string name="cpp_prefs_keep_screen_on">Pozostaw ekran włączony</string>
<string name="cpp_permission_overlay">Wyświetlanie nad innymi aplikacjami</string>
<string name="cpp_yes">Tak</string>
<string name="cpp_no">Nie</string>
<string name="cpp_create">Utwórz</string>
<string name="cpp_close">Zamknij</string>
<string name="cpp_switch">Przełącz</string>
</resources>

View File

@ -2,8 +2,15 @@
<resources>
<string name="cpp_prefs_vibrate_on_keypress">Vibrar ao tocar</string>
<string name="cpp_prefs_auto_rotate_screen">Girar tela</string>
<string name="cpp_prefs_language">Idioma</string>
<string name="cpp_prefs_theme">Tema</string>
<string name="cpp_language">Idioma</string>
<string name="cpp_theme">Tema</string>
<string name="cpp_theme_light">Claro</string>
<string name="cpp_theme_dark">Escuro</string>
<string name="cpp_prefs_keep_screen_on">Permanecer ativo</string>
<string name="cpp_permission_overlay">Sobrepor a outros apps</string>
<string name="cpp_yes">Sim</string>
<string name="cpp_no">Não</string>
<string name="cpp_create">Criar</string>
<string name="cpp_close">Fechar</string>
<string name="cpp_switch">Alternar</string>
</resources>

View File

@ -2,8 +2,15 @@
<resources>
<string name="cpp_prefs_vibrate_on_keypress">Vibrar ao tocar</string>
<string name="cpp_prefs_auto_rotate_screen">Rodar ecrã automaticamente</string>
<string name="cpp_prefs_language">Idioma</string>
<string name="cpp_prefs_theme">Tema</string>
<string name="cpp_language">Idioma</string>
<string name="cpp_theme">Tema</string>
<string name="cpp_theme_light">Claro</string>
<string name="cpp_theme_dark">Escuro</string>
<string name="cpp_prefs_keep_screen_on">Manter ativo</string>
<string name="cpp_permission_overlay">Sobrepor a outras aplicações</string>
<string name="cpp_yes">Sim</string>
<string name="cpp_no">Não</string>
<string name="cpp_create">Criar</string>
<string name="cpp_close">Fechar</string>
<string name="cpp_switch">Alternar</string>
</resources>

View File

@ -2,8 +2,15 @@
<resources>
<string name="cpp_prefs_vibrate_on_keypress">Виброотклик</string>
<string name="cpp_prefs_auto_rotate_screen">Автоповорот экрана</string>
<string name="cpp_prefs_language">Язык</string>
<string name="cpp_prefs_theme">Тема</string>
<string name="cpp_language">Язык</string>
<string name="cpp_theme">Тема</string>
<string name="cpp_theme_light">Светлая</string>
<string name="cpp_theme_dark">Темная</string>
<string name="cpp_prefs_keep_screen_on">Не выключать экран</string>
<string name="cpp_permission_overlay">Наложение поверх других окон</string>
<string name="cpp_yes">Да</string>
<string name="cpp_no">Нет</string>
<string name="cpp_create">Создать</string>
<string name="cpp_close">Закрыть</string>
<string name="cpp_switch">Сменить аккаунт</string>
</resources>

View File

@ -2,8 +2,15 @@
<resources>
<string name="cpp_prefs_vibrate_on_keypress">Dokunulduğunda titreşim</string>
<string name="cpp_prefs_auto_rotate_screen">Ekranı otomatik döndür</string>
<string name="cpp_prefs_language">Dil</string>
<string name="cpp_prefs_theme">Tema</string>
<string name="cpp_language">Dil</string>
<string name="cpp_theme">Tema</string>
<string name="cpp_theme_light">ık Renkli</string>
<string name="cpp_theme_dark">Koyu Renkli</string>
<string name="cpp_prefs_keep_screen_on">Uyanık kal</string>
<string name="cpp_permission_overlay">Diğer uygl. üzerinde görüntüle</string>
<string name="cpp_yes">Evet</string>
<string name="cpp_no">Hayır</string>
<string name="cpp_create">Oluştur</string>
<string name="cpp_close">Kapat</string>
<string name="cpp_switch">Değiştir</string>
</resources>

View File

@ -2,8 +2,15 @@
<resources>
<string name="cpp_prefs_vibrate_on_keypress">Rung khi chạm</string>
<string name="cpp_prefs_auto_rotate_screen">Tự động xoay màn hình</string>
<string name="cpp_prefs_language">Ngôn ngữ</string>
<string name="cpp_prefs_theme">Chủ đề</string>
<string name="cpp_language">Ngôn ngữ</string>
<string name="cpp_theme">Chủ đề</string>
<string name="cpp_theme_light">Sáng</string>
<string name="cpp_theme_dark">Tối</string>
<string name="cpp_prefs_keep_screen_on">Không khóa màn hình</string>
<string name="cpp_permission_overlay">Vẽ lên trên ứng dụng khác</string>
<string name="cpp_yes"></string>
<string name="cpp_no">Không</string>
<string name="cpp_create">Tạo</string>
<string name="cpp_close">Đóng</string>
<string name="cpp_switch">Chuyển đổi</string>
</resources>

View File

@ -2,8 +2,15 @@
<resources>
<string name="cpp_prefs_vibrate_on_keypress">触摸时振动</string>
<string name="cpp_prefs_auto_rotate_screen">自动旋转屏幕</string>
<string name="cpp_prefs_language">语言</string>
<string name="cpp_prefs_theme">主题背景</string>
<string name="cpp_language">语言</string>
<string name="cpp_theme">主题背景</string>
<string name="cpp_theme_light">浅色</string>
<string name="cpp_theme_dark">深色</string>
<string name="cpp_prefs_keep_screen_on">不锁定屏幕</string>
<string name="cpp_permission_overlay">在其他应用的上层显示</string>
<string name="cpp_yes"></string>
<string name="cpp_no"></string>
<string name="cpp_create">创建</string>
<string name="cpp_close">关闭</string>
<string name="cpp_switch">切换</string>
</resources>

View File

@ -2,8 +2,15 @@
<resources>
<string name="cpp_prefs_vibrate_on_keypress">觸控時震動</string>
<string name="cpp_prefs_auto_rotate_screen">自動旋轉螢幕</string>
<string name="cpp_prefs_language">語言</string>
<string name="cpp_prefs_theme">主題</string>
<string name="cpp_language">語言</string>
<string name="cpp_theme">主題</string>
<string name="cpp_theme_light">淺色</string>
<string name="cpp_theme_dark">深色</string>
<string name="cpp_prefs_keep_screen_on">螢幕不休眠</string>
<string name="cpp_permission_overlay">在其他應用程式上層繪製內容</string>
<string name="cpp_yes"></string>
<string name="cpp_no"></string>
<string name="cpp_create">建立</string>
<string name="cpp_close">關閉</string>
<string name="cpp_switch">切換</string>
</resources>

View File

@ -22,8 +22,8 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<string-array name="p_theme_names">
<item>@string/p_material_theme</item>
<item>@string/p_material_light_theme</item>
<item>@string/cpp_theme_dark</item>
<item>@string/cpp_theme_light</item>
<item>@string/p_metro_blue_theme</item>
<item>@string/p_metro_green_theme</item>
<item>@string/p_metro_purple_theme</item>
@ -38,8 +38,8 @@
<string-array name="p_simple_theme_names">
<item>@string/p_use_app_theme</item>
<item>@string/p_material_theme</item>
<item>@string/p_material_light_theme</item>
<item>@string/cpp_theme_dark</item>
<item>@string/cpp_theme_light</item>
<item>@string/p_metro_blue_theme</item>
</string-array>
<string-array name="p_simple_theme_values" translatable="false">

View File

@ -2,8 +2,15 @@
<resources>
<string name="cpp_prefs_vibrate_on_keypress">Vibrate on touch</string>
<string name="cpp_prefs_auto_rotate_screen">Auto-rotate screen</string>
<string name="cpp_prefs_language">Language</string>
<string name="cpp_prefs_theme">Theme</string>
<string name="cpp_language">Language</string>
<string name="cpp_theme">Theme</string>
<string name="cpp_theme_light">Light</string>
<string name="cpp_theme_dark">Dark</string>
<string name="cpp_prefs_keep_screen_on">Stay awake</string>
<string name="cpp_permission_overlay">Draw over other apps</string>
<string name="cpp_yes">Yes</string>
<string name="cpp_no">No</string>
<string name="cpp_create">Create</string>
<string name="cpp_close">Close</string>
<string name="cpp_switch">Switch</string>
</resources>

View File

@ -27,7 +27,7 @@
<org.solovyev.android.material.preferences.ListPreference
a:key="gui.language"
a:title="@string/cpp_prefs_language"
a:title="@string/cpp_language"
m:materialColor="@color/material_text_selector" />
<android.preference.CheckBoxPreference
@ -51,7 +51,7 @@
a:entries="@array/p_theme_names"
a:entryValues="@array/p_theme_values"
a:key="@string/p_calc_theme_key"
a:title="@string/cpp_prefs_theme" />
a:title="@string/cpp_theme" />
<ListPreference
a:entries="@array/p_layout_names"

View File

@ -5,5 +5,6 @@ dependencies {
compile 'commons-cli:commons-cli:1.3'
compile 'org.apache.httpcomponents:httpclient:4.5.1'
compile 'org.json:json:20151123'
compile('org.simpleframework:simple-xml:2.7.1')
compile 'org.simpleframework:simple-xml:2.7.1'
compile 'commons-cli:commons-cli:1.3.1'
}

View File

@ -1,5 +1,6 @@
package org.solovyev.android.translations;
import org.apache.commons.cli.*;
import org.apache.http.util.TextUtils;
import java.io.File;
@ -19,8 +20,18 @@ public class Android {
}
public static void main(String... args) throws Exception {
final Options options = new Options();
options.addOption(Option.builder("as").longOpt("aosp-settings").hasArg().desc("Local location of aosp/platform/packages/apps/settings").required().build());
final CommandLineParser parser = new DefaultParser();
final CommandLine commandLine = parser.parse(options, args);
final File aospSettings = new File(commandLine.getOptionValue("as"));
if (!aospSettings.exists() || !aospSettings.isDirectory()) {
throw new IllegalArgumentException(aospSettings + " doesn't exist or not a directory");
}
final File inDir =
new File("/home/serso/projects/java/aosp/platform/packages-apps-settings/res");
new File(aospSettings, "res");
final File outDir = new File("build/translations/res");
Utils.delete(outDir);
outDir.mkdirs();
@ -28,10 +39,17 @@ public class Android {
final List<TranslationLink> translationLinks = new ArrayList<>();
translationLinks.add(new TranslationLink("haptic_feedback_enable_title", "cpp_prefs_vibrate_on_keypress"));
translationLinks.add(new TranslationLink("accelerometer_title", "cpp_prefs_auto_rotate_screen"));
translationLinks.add(new TranslationLink("phone_language", "cpp_prefs_language"));
translationLinks.add(new TranslationLink("night_mode_title", "cpp_prefs_theme"));
translationLinks.add(new TranslationLink("phone_language", "cpp_language"));
translationLinks.add(new TranslationLink("night_mode_title", "cpp_theme"));
translationLinks.add(new TranslationLink("night_mode_no", "cpp_theme_light"));
translationLinks.add(new TranslationLink("night_mode_yes", "cpp_theme_dark"));
translationLinks.add(new TranslationLink("keep_screen_on", "cpp_prefs_keep_screen_on"));
translationLinks.add(new TranslationLink("draw_overlay", "cpp_permission_overlay"));
translationLinks.add(new TranslationLink("yes", "cpp_yes"));
translationLinks.add(new TranslationLink("no", "cpp_no"));
translationLinks.add(new TranslationLink("create", "cpp_create"));
translationLinks.add(new TranslationLink("dlg_close", "cpp_close"));
translationLinks.add(new TranslationLink("dlg_switch", "cpp_switch"));
List<String> languageLocales = new ArrayList<>(Utils.languageLocales);
languageLocales.add("");