From c7af20f127c4a67c9d65e10b637cfb0434ec72a4 Mon Sep 17 00:00:00 2001 From: serso Date: Sun, 8 Feb 2015 18:03:56 +0100 Subject: [PATCH] Translations and release notes fragment --- .../ChooseThemeReleaseNoteFragment.java | 18 ++++++++++++++++++ .../calculator/wizard/CalculatorWizards.java | 10 +++++++++- .../calculator/wizard/WizardActivity.java | 2 +- .../layout/cpp_wizard_step_choose_theme.xml | 1 + .../src/main/res/values-el/text_wizard.xml | 4 ---- android-app/src/main/res/values-ru/strings.xml | 8 ++++++-- android-app/src/main/res/values/strings.xml | 9 ++------- 7 files changed, 37 insertions(+), 15 deletions(-) create mode 100644 android-app/src/main/java/org/solovyev/android/calculator/release/ChooseThemeReleaseNoteFragment.java diff --git a/android-app/src/main/java/org/solovyev/android/calculator/release/ChooseThemeReleaseNoteFragment.java b/android-app/src/main/java/org/solovyev/android/calculator/release/ChooseThemeReleaseNoteFragment.java new file mode 100644 index 00000000..51aa99a9 --- /dev/null +++ b/android-app/src/main/java/org/solovyev/android/calculator/release/ChooseThemeReleaseNoteFragment.java @@ -0,0 +1,18 @@ +package org.solovyev.android.calculator.release; + +import android.os.Bundle; +import android.view.View; +import android.widget.TextView; +import org.solovyev.android.calculator.R; +import org.solovyev.android.calculator.wizard.ChooseThemeWizardStep; + +public class ChooseThemeReleaseNoteFragment extends ChooseThemeWizardStep { + + @Override + public void onViewCreated(View root, Bundle savedInstanceState) { + super.onViewCreated(root, savedInstanceState); + + final TextView title = (TextView) root.findViewById(R.id.wizard_theme_title); + title.setText(R.string.release_notes_choose_theme); + } +} diff --git a/android-app/src/main/java/org/solovyev/android/calculator/wizard/CalculatorWizards.java b/android-app/src/main/java/org/solovyev/android/calculator/wizard/CalculatorWizards.java index 84d9cc93..86156d76 100644 --- a/android-app/src/main/java/org/solovyev/android/calculator/wizard/CalculatorWizards.java +++ b/android-app/src/main/java/org/solovyev/android/calculator/wizard/CalculatorWizards.java @@ -3,6 +3,8 @@ package org.solovyev.android.calculator.wizard; import android.app.Activity; import android.content.Context; import android.os.Bundle; +import android.support.v4.app.Fragment; +import org.solovyev.android.calculator.release.ChooseThemeReleaseNoteFragment; import org.solovyev.android.calculator.release.ReleaseNoteStep; import org.solovyev.android.calculator.release.ReleaseNotes; import org.solovyev.android.wizard.*; @@ -88,7 +90,13 @@ public class CalculatorWizards implements Wizards { for (Integer version : versions) { switch (version) { case 136: - wizardSteps.add(CalculatorWizardStep.choose_theme); + wizardSteps.add(new ReleaseNoteStep(version) { + @Nonnull + @Override + public Class getFragmentClass() { + return ChooseThemeReleaseNoteFragment.class; + } + }); break; default: wizardSteps.add(new ReleaseNoteStep(version)); diff --git a/android-app/src/main/java/org/solovyev/android/calculator/wizard/WizardActivity.java b/android-app/src/main/java/org/solovyev/android/calculator/wizard/WizardActivity.java index 5a3c9f1c..3d55222d 100644 --- a/android-app/src/main/java/org/solovyev/android/calculator/wizard/WizardActivity.java +++ b/android-app/src/main/java/org/solovyev/android/calculator/wizard/WizardActivity.java @@ -114,7 +114,7 @@ public class WizardActivity extends BaseActivity implements WizardsAware { final AlertDialog.Builder b = new AlertDialog.Builder(this); b.setTitle(getString(R.string.wizard_finish_confirmation_title)). - setMessage(R.string.acl_wizard_finish_confirmation). + setMessage(R.string.cpp_wizard_finish_confirmation). setNegativeButton(R.string.c_no, dialogListener). setPositiveButton(R.string.c_yes, dialogListener). setOnCancelListener(dialogListener); diff --git a/android-app/src/main/res/layout/cpp_wizard_step_choose_theme.xml b/android-app/src/main/res/layout/cpp_wizard_step_choose_theme.xml index 798aa352..6febe723 100644 --- a/android-app/src/main/res/layout/cpp_wizard_step_choose_theme.xml +++ b/android-app/src/main/res/layout/cpp_wizard_step_choose_theme.xml @@ -30,6 +30,7 @@ - Επόμενο - Πίσω - Τέλος - Έναρξη οδηγού Optimized Μεγάλα κουμπιά Απλό diff --git a/android-app/src/main/res/values-ru/strings.xml b/android-app/src/main/res/values-ru/strings.xml index 808e4532..bc88d3c4 100644 --- a/android-app/src/main/res/values-ru/strings.xml +++ b/android-app/src/main/res/values-ru/strings.xml @@ -3,16 +3,20 @@ Вы действительно хотите завершить визард? Далее Назад - Завершить + Готово Начать визард Отчистить Вся история будет отчищена Отчистить историю? Начать визард Пропустить - Закончить + Готово Далее Назад Приложение настроено и готово к использованию. Закончить? + Новое в версии %1$s + Хотите попробовать новые темы в стиле Material? Выберите их из списка: + Выберите тему + \ No newline at end of file diff --git a/android-app/src/main/res/values/strings.xml b/android-app/src/main/res/values/strings.xml index 85481516..7ecd2bcb 100644 --- a/android-app/src/main/res/values/strings.xml +++ b/android-app/src/main/res/values/strings.xml @@ -1,19 +1,14 @@ - Do you really want to finish wizard? Finish? Next Back - Finish + Done Start wizard Clear history? All history will be cleared. Clear - Start wizard - Next - Back - The app is set up and ready to use. Skip - Finish New in %1$s version + Do you want to try new Material themes? Choose them from the list: \ No newline at end of file