mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
Fix conflicts and hu translations
This commit is contained in:
@@ -23,3 +23,4 @@ job:build:
|
||||
- output/release/device/n0100/epsilon.bin
|
||||
- omega-auto-increment/version.txt
|
||||
name: artifact:build:simulator
|
||||
|
||||
|
||||
1
apps/external/Makefile
vendored
1
apps/external/Makefile
vendored
@@ -27,6 +27,7 @@ i18n_files += $(addprefix apps/external/,\
|
||||
base.fr.i18n\
|
||||
base.pt.i18n\
|
||||
base.hu.i18n\
|
||||
base.universal.i18n\
|
||||
)
|
||||
|
||||
$(eval $(call depends_on_image,apps/external/app.cpp,apps/external/external_icon.png))
|
||||
|
||||
4
apps/external/archive.cpp
vendored
4
apps/external/archive.cpp
vendored
@@ -118,7 +118,7 @@ size_t numberOfFiles() {
|
||||
#else
|
||||
|
||||
bool fileAtIndex(size_t index, File &entry) {
|
||||
entry.name = "App";
|
||||
entry.name = "No apps installed ";
|
||||
entry.data = NULL;
|
||||
entry.dataLength = 0;
|
||||
entry.isExecutable = true;
|
||||
@@ -137,7 +137,7 @@ int indexFromName(const char *name) {
|
||||
}
|
||||
|
||||
size_t numberOfFiles() {
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
5
apps/external/base.de.i18n
vendored
5
apps/external/base.de.i18n
vendored
@@ -2,3 +2,8 @@ ExternalApp = "External"
|
||||
ExternalAppCapital = "EXTERNAL"
|
||||
ExternalAppApiMismatch = "API mismatch"
|
||||
ExternalAppExecError = "Cannot execute file"
|
||||
ExternalNotCompatible = "External ist nicht kompatibel"
|
||||
WithSimulator = "mit dem Simulator"
|
||||
WithN0100 = "mit n0100"
|
||||
GetMoreAppsAt = "Weitere Apps erhalten Sie auf"
|
||||
NoAppsInstalled = "Keine Apps installiert"
|
||||
|
||||
5
apps/external/base.en.i18n
vendored
5
apps/external/base.en.i18n
vendored
@@ -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"
|
||||
|
||||
5
apps/external/base.es.i18n
vendored
5
apps/external/base.es.i18n
vendored
@@ -2,3 +2,8 @@ ExternalApp = "External"
|
||||
ExternalAppCapital = "EXTERNAL"
|
||||
ExternalAppApiMismatch = "API mismatch"
|
||||
ExternalAppExecError = "Cannot execute file"
|
||||
ExternalNotCompatible = "Externo no es compatible"
|
||||
WithSimulator = "con el simulador"
|
||||
WithN0100 = "con n0100"
|
||||
GetMoreAppsAt = "Obtenga más aplicaciones en"
|
||||
NoAppsInstalled = "No hay aplicaciones instaladas"
|
||||
|
||||
5
apps/external/base.fr.i18n
vendored
5
apps/external/base.fr.i18n
vendored
@@ -2,3 +2,8 @@ ExternalApp = "External"
|
||||
ExternalAppCapital = "EXTERNAL"
|
||||
ExternalAppApiMismatch = "API mismatch"
|
||||
ExternalAppExecError = "Cannot execute file"
|
||||
ExternalNotCompatible = "External n'est pas compatible"
|
||||
WithSimulator = "avec le simulateur"
|
||||
WithN0100 = "avec n0100"
|
||||
GetMoreAppsAt = "Télécharge d'autres apps sur"
|
||||
NoAppsInstalled = "Aucune applications installées"
|
||||
|
||||
5
apps/external/base.hu.i18n
vendored
5
apps/external/base.hu.i18n
vendored
@@ -2,3 +2,8 @@ ExternalApp = "Külsö"
|
||||
ExternalAppCapital = "KÜLSö"
|
||||
ExternalAppApiMismatch = "API eltérés"
|
||||
ExternalAppExecError = "A fájl nem futtatható"
|
||||
ExternalNotCompatible = "External is not compatible"
|
||||
WithSimulator = "with the simulator"
|
||||
WithN0100 = "with n0100"
|
||||
GetMoreAppsAt = "Get more apps at"
|
||||
NoAppsInstalled = "No apps installed"
|
||||
|
||||
5
apps/external/base.pt.i18n
vendored
5
apps/external/base.pt.i18n
vendored
@@ -2,3 +2,8 @@ ExternalApp = "External"
|
||||
ExternalAppCapital = "EXTERNAL"
|
||||
ExternalAppApiMismatch = "API mismatch"
|
||||
ExternalAppExecError = "Cannot execute file"
|
||||
ExternalNotCompatible = "Externo no es compatiblee"
|
||||
WithSimulator = "con el simulador"
|
||||
WithN0100 = "con n0100"
|
||||
GetMoreAppsAt = "Obtenga más aplicaciones en"
|
||||
NoAppsInstalled = "No hay aplicaciones instaladas"
|
||||
|
||||
1
apps/external/base.universal.i18n
vendored
Normal file
1
apps/external/base.universal.i18n
vendored
Normal file
@@ -0,0 +1 @@
|
||||
URL = "zardam.github.io/nw-external-apps/"
|
||||
63
apps/external/main_controller.cpp
vendored
63
apps/external/main_controller.cpp
vendored
@@ -4,6 +4,8 @@
|
||||
#include <assert.h>
|
||||
#include "archive.h"
|
||||
#include "app.h"
|
||||
#include <kandinsky/palette.h>
|
||||
#include <ion/include/ion.h>
|
||||
|
||||
using namespace Poincare;
|
||||
|
||||
@@ -30,7 +32,7 @@ void MainController::didBecomeFirstResponder() {
|
||||
}
|
||||
|
||||
bool MainController::handleEvent(Ion::Events::Event event) {
|
||||
if (numberOfRows() > 0 && (event == Ion::Events::OK || event == Ion::Events::EXE)) {
|
||||
if ((event == Ion::Events::OK || event == Ion::Events::EXE) && ((selectedRow() < k_numberOfCells - 2) && numberOfFiles() > 0)) {
|
||||
uint32_t res = executeFile(m_cells[selectedRow()].text(), ((App *)m_app)->heap(), ((App *)m_app)->heapSize());
|
||||
((App*)m_app)->redraw();
|
||||
switch(res) {
|
||||
@@ -82,15 +84,66 @@ int MainController::typeAtLocation(int i, int j) {
|
||||
|
||||
void MainController::willDisplayCellForIndex(HighlightCell * cell, int index) {
|
||||
PointerTextTableCell * myTextCell = (PointerTextTableCell *)cell;
|
||||
myTextCell->setHighlighted(myTextCell->isHighlighted());
|
||||
struct File f;
|
||||
if(fileAtIndex(index, f)) {
|
||||
myTextCell->setText(f.name);
|
||||
myTextCell->setTextColor(f.isExecutable ? KDColorBlack : Palette::GreyDark);
|
||||
#ifdef DEVICE
|
||||
if(Ion::fccId() == "2ALWP-N0100"){
|
||||
if(index == 0){
|
||||
myTextCell->setText(I18n::translate(I18n::Message::ExternalNotCompatible));
|
||||
myTextCell->setTextColor(Palette::Red);
|
||||
} else {
|
||||
myTextCell->setText(I18n::translate(I18n::Message::WithN0100));
|
||||
myTextCell->setTextColor(Palette::Red);
|
||||
}
|
||||
}else{
|
||||
if(index == k_numberOfCells-1){
|
||||
myTextCell->setText(I18n::translate(I18n::Message::URL));
|
||||
myTextCell->setTextColor(Palette::AccentText);
|
||||
return;
|
||||
}
|
||||
if(index == k_numberOfCells-2){
|
||||
myTextCell->setText(I18n::translate(I18n::Message::GetMoreAppsAt));
|
||||
myTextCell->setTextColor(Palette::AccentText);
|
||||
return;
|
||||
}
|
||||
if(index == 0 && numberOfFiles() == 0){
|
||||
myTextCell->setText(I18n::translate(I18n::Message::NoAppsInstalled));
|
||||
myTextCell->setTextColor(Palette::Red);
|
||||
}
|
||||
if(numberOfFiles() > 0){
|
||||
if(fileAtIndex(index, f)) {
|
||||
myTextCell->setText(f.name);
|
||||
myTextCell->setTextColor(f.isExecutable ? Palette::PrimaryText : Palette::Palette::SecondaryText);
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
if(index == 0){
|
||||
myTextCell->setText(I18n::translate(I18n::Message::ExternalNotCompatible));
|
||||
myTextCell->setTextColor(Palette::Red);
|
||||
} else {
|
||||
myTextCell->setText(I18n::translate(I18n::Message::WithSimulator));
|
||||
myTextCell->setTextColor(Palette::Red);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void MainController::viewWillAppear() {
|
||||
int count = numberOfFiles();
|
||||
int count;
|
||||
#ifdef DEVICE
|
||||
if(Ion::fccId() == "2ALWP-N0100"){
|
||||
count = 2;
|
||||
}else {
|
||||
if(numberOfFiles() > 0){
|
||||
count = numberOfFiles()+2;
|
||||
} else {
|
||||
count = 3;
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
count = 2;
|
||||
#endif
|
||||
k_numberOfCells = count <= k_maxNumberOfCells ? count : k_maxNumberOfCells;
|
||||
m_selectableTableView.reloadData();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user