From 71ad0cce74922df4d6b82b573282b11779054e1c Mon Sep 17 00:00:00 2001 From: redgl0w Date: Fri, 10 Jan 2020 07:55:58 +0100 Subject: [PATCH] Added translations (without translating) --- apps/external/Makefile | 1 + apps/external/base.de.i18n | 5 +++++ apps/external/base.en.i18n | 5 +++++ apps/external/base.es.i18n | 5 +++++ apps/external/base.fr.i18n | 5 +++++ apps/external/base.pt.i18n | 5 +++++ apps/external/base.universal.i18n | 1 + apps/external/main_controller.cpp | 14 +++++++------- 8 files changed, 34 insertions(+), 7 deletions(-) create mode 100644 apps/external/base.universal.i18n diff --git a/apps/external/Makefile b/apps/external/Makefile index f2680b165..61fbefd14 100644 --- a/apps/external/Makefile +++ b/apps/external/Makefile @@ -26,6 +26,7 @@ i18n_files += $(addprefix apps/external/,\ base.es.i18n\ base.fr.i18n\ base.pt.i18n\ + base.universal.i18n\ ) $(eval $(call depends_on_image,apps/external/app.cpp,apps/external/external_icon.png)) diff --git a/apps/external/base.de.i18n b/apps/external/base.de.i18n index 6072a563a..49b8a2173 100644 --- a/apps/external/base.de.i18n +++ b/apps/external/base.de.i18n @@ -2,3 +2,8 @@ ExternalApp = "External" ExternalAppCapital = "EXTERNAL" ExternalAppApiMismatch = "API mismatch" ExternalAppExecError = "Cannot execute file" +ExternalNotCompatible = "External is not compatible" +WithSimulator = "with the simulator" +WithN0100 = "with n0100" +GetMoreAppsAt = "Get more apps at" +NoAppsInstalled = "No apps installed" diff --git a/apps/external/base.en.i18n b/apps/external/base.en.i18n index 6072a563a..49b8a2173 100644 --- a/apps/external/base.en.i18n +++ b/apps/external/base.en.i18n @@ -2,3 +2,8 @@ ExternalApp = "External" ExternalAppCapital = "EXTERNAL" ExternalAppApiMismatch = "API mismatch" ExternalAppExecError = "Cannot execute file" +ExternalNotCompatible = "External is not compatible" +WithSimulator = "with the simulator" +WithN0100 = "with n0100" +GetMoreAppsAt = "Get more apps at" +NoAppsInstalled = "No apps installed" diff --git a/apps/external/base.es.i18n b/apps/external/base.es.i18n index 6072a563a..49b8a2173 100644 --- a/apps/external/base.es.i18n +++ b/apps/external/base.es.i18n @@ -2,3 +2,8 @@ ExternalApp = "External" ExternalAppCapital = "EXTERNAL" ExternalAppApiMismatch = "API mismatch" ExternalAppExecError = "Cannot execute file" +ExternalNotCompatible = "External is not compatible" +WithSimulator = "with the simulator" +WithN0100 = "with n0100" +GetMoreAppsAt = "Get more apps at" +NoAppsInstalled = "No apps installed" diff --git a/apps/external/base.fr.i18n b/apps/external/base.fr.i18n index 6072a563a..49b8a2173 100644 --- a/apps/external/base.fr.i18n +++ b/apps/external/base.fr.i18n @@ -2,3 +2,8 @@ ExternalApp = "External" ExternalAppCapital = "EXTERNAL" ExternalAppApiMismatch = "API mismatch" ExternalAppExecError = "Cannot execute file" +ExternalNotCompatible = "External is not compatible" +WithSimulator = "with the simulator" +WithN0100 = "with n0100" +GetMoreAppsAt = "Get more apps at" +NoAppsInstalled = "No apps installed" diff --git a/apps/external/base.pt.i18n b/apps/external/base.pt.i18n index 6072a563a..49b8a2173 100644 --- a/apps/external/base.pt.i18n +++ b/apps/external/base.pt.i18n @@ -2,3 +2,8 @@ ExternalApp = "External" ExternalAppCapital = "EXTERNAL" ExternalAppApiMismatch = "API mismatch" ExternalAppExecError = "Cannot execute file" +ExternalNotCompatible = "External is not compatible" +WithSimulator = "with the simulator" +WithN0100 = "with n0100" +GetMoreAppsAt = "Get more apps at" +NoAppsInstalled = "No apps installed" diff --git a/apps/external/base.universal.i18n b/apps/external/base.universal.i18n new file mode 100644 index 000000000..bd64604ea --- /dev/null +++ b/apps/external/base.universal.i18n @@ -0,0 +1 @@ +URL = "zardam.github.io/nw-external-apps/" \ No newline at end of file diff --git a/apps/external/main_controller.cpp b/apps/external/main_controller.cpp index bd341058d..b2b1d06df 100644 --- a/apps/external/main_controller.cpp +++ b/apps/external/main_controller.cpp @@ -89,25 +89,25 @@ void MainController::willDisplayCellForIndex(HighlightCell * cell, int index) { #ifdef DEVICE if(Ion::fccId() == "2ALWP-N0100"){ if(index == 0){ - myTextCell->setText("External is not compatible"); + myTextCell->setText(I18n::translate(I18n::Message::ExternalNotCompatible)); myTextCell->setTextColor(Palette::Red); } else { - myTextCell->setText("with n0100"); + myTextCell->setText(I18n::translate(I18n::Message::WithN0100)); myTextCell->setTextColor(Palette::Red); } }else{ if(index == k_numberOfCells-1){ - myTextCell->setText("zardam.github.io/nw-external-apps/"); + myTextCell->setText(I18n::translate(I18n::Message::URL)); myTextCell->setTextColor(Palette::AccentText); return; } if(index == k_numberOfCells-2){ - myTextCell->setText("Get more apps at"); + myTextCell->setText(I18n::translate(I18n::Message::GetMoreAppsAt)); myTextCell->setTextColor(Palette::AccentText); return; } if(index == 0 && numberOfFiles() == 0){ - myTextCell->setText("No apps installed"); + myTextCell->setText(I18n::translate(I18n::Message::NoAppsInstalled)); myTextCell->setTextColor(Palette::Red); } if(numberOfFiles() > 0){ @@ -119,10 +119,10 @@ void MainController::willDisplayCellForIndex(HighlightCell * cell, int index) { } #else if(index == 0){ - myTextCell->setText("External is not compatible"); + myTextCell->setText(I18n::translate(I18n::Message::ExternalNotCompatible)); myTextCell->setTextColor(Palette::Red); } else { - myTextCell->setText("with the simulator"); + myTextCell->setText(I18n::translate(I18n::Message::WithSimulator)); myTextCell->setTextColor(Palette::Red); } #endif