Merge branch 'master' into dev

This commit is contained in:
ITotalJustice
2025-05-24 23:40:52 +01:00
21 changed files with 4287 additions and 2619 deletions

View File

@@ -1673,7 +1673,7 @@ void App::DisplayInstallOptions(bool left_side) {
App::GetApp()->m_skip_ticket.Set(enable);
}));
options->Add(std::make_shared<ui::SidebarEntryBool>("skip NCA hash verify"_i18n, App::GetApp()->m_skip_nca_hash_verify.Get(), [](bool& enable){
options->Add(std::make_shared<ui::SidebarEntryBool>("Skip NCA hash verify"_i18n, App::GetApp()->m_skip_nca_hash_verify.Get(), [](bool& enable){
App::GetApp()->m_skip_nca_hash_verify.Set(enable);
}));

View File

@@ -369,7 +369,7 @@ void Dump(std::shared_ptr<BaseSource> source, const std::vector<fs::FsPath>& pat
App::PushErrorBox(rc, "Dump failed!"_i18n);
if (R_SUCCEEDED(rc)) {
App::Notify("Dump successfull!");
App::Notify("Dump successfull!"_i18n);
log_write("dump successfull!!!\n");
}

View File

@@ -984,7 +984,7 @@ auto install_forwader_internal(ui::ProgressBox* pbox, OwoConfig& config, NcmStor
// remove old id for forwarders.
const auto rc = nsDeleteApplicationCompletely(old_tid);
if (R_FAILED(rc) && rc != 0x410) { // not found
App::Notify("Failed to remove old forwarder, please manually remove it!");
App::Notify("Failed to remove old forwarder, please manually remove it!"_i18n);
}
// remove previous application record

View File

@@ -984,7 +984,7 @@ void FsView::InstallFiles() {
} else {
R_TRY(yati::InstallFromFile(pbox, GetNewPath(e)));
}
App::Notify("Installed " + e.GetName());
App::Notify("Installed "_i18n + e.GetName());
}
R_SUCCEED();
@@ -1077,7 +1077,7 @@ void FsView::UnzipFiles(fs::FsPath dir_path) {
R_SUCCEED();
}, [this](Result rc){
App::PushErrorBox(rc, "Failed to, TODO: add message here"_i18n);
App::PushErrorBox(rc, "Extract failed!"_i18n);
if (R_SUCCEEDED(rc)) {
App::Notify("Extract success!");
@@ -1209,7 +1209,7 @@ void FsView::ZipFiles(fs::FsPath zip_out) {
R_SUCCEED();
}, [this](Result rc){
App::PushErrorBox(rc, "Failed to, TODO: add message here"_i18n);
App::PushErrorBox(rc, "Compress failed!"_i18n);
if (R_SUCCEEDED(rc)) {
App::Notify("Compress success!");
@@ -1225,7 +1225,7 @@ void FsView::UploadFiles() {
const auto network_locations = location::Load();
if (network_locations.empty()) {
App::Notify("No upload locations set!");
App::Notify("No upload locations set!"_i18n);
return;
}
@@ -1313,8 +1313,11 @@ void FsView::UploadFiles() {
m_menu->ResetSelection();
if (R_SUCCEEDED(rc)) {
App::Notify("Upload successfull!");
App::Notify("Upload successfull!"_i18n);
log_write("Upload successfull!!!\n");
} else {
App::Notify("Upload failed!"_i18n);
log_write("Upload failed!!!\n");
}
}));
}

View File

@@ -240,7 +240,7 @@ Result Notify(Result rc, const std::string& error_message) {
i18n::get(error_message)
));
} else {
App::Notify("Success");
App::Notify("Success"_i18n);
}
return rc;
@@ -796,7 +796,7 @@ Menu::Menu() : grid::Menu{"Games"_i18n} {
}
if (meta_entries.empty()) {
App::Notify("No meta entries found...\n");
App::Notify("No meta entries found...\n"_i18n);
return;
}
@@ -808,7 +808,7 @@ Menu::Menu() : grid::Menu{"Games"_i18n} {
}
App::Push(std::make_shared<PopupList>(
"Entries", items, [this, meta_entries](auto op_index){
"Entries"_i18n, items, [this, meta_entries](auto op_index){
#if 0
if (op_index) {
const auto& e = meta_entries[*op_index];
@@ -889,7 +889,7 @@ Menu::~Menu() {
void Menu::Update(Controller* controller, TouchInfo* touch) {
if (m_dirty) {
App::Notify("Updating application record list");
App::Notify("Updating application record list"_i18n);
SortAndFindLastFile(true);
}
@@ -1101,13 +1101,13 @@ void Menu::DeleteGames() {
R_SUCCEED();
}, [this](Result rc){
App::PushErrorBox(rc, "Delete failed"_i18n);
App::PushErrorBox(rc, "Delete failed!"_i18n);
ClearSelection();
m_dirty = true;
if (R_SUCCEEDED(rc)) {
App::Notify("Delete successfull!");
App::Notify("Delete successfull!"_i18n);
}
}));
}

View File

@@ -442,12 +442,12 @@ void Menu::Draw(NVGcontext* vg, Theme* theme) {
const auto size_sd_gb = (double)m_size_free_sd / 0x40000000;
const auto size_nand_gb = (double)m_size_free_nand / 0x40000000;
gfx::drawTextArgs(vg, 490, 135, 23.f, NVG_ALIGN_LEFT | NVG_ALIGN_TOP, theme->GetColour(ThemeEntryID_TEXT), "System memory %.1f GB", size_nand_gb);
gfx::drawTextArgs(vg, 490, 135, 23.f, NVG_ALIGN_LEFT | NVG_ALIGN_TOP, theme->GetColour(ThemeEntryID_TEXT), "System memory %.1f GB"_i18n.c_str(), size_nand_gb);
gfx::drawRect(vg, 480, 170, STORAGE_BAR_W, STORAGE_BAR_H, theme->GetColour(ThemeEntryID_TEXT));
gfx::drawRect(vg, 480 + 1, 170 + 1, STORAGE_BAR_W - 2, STORAGE_BAR_H - 2, theme->GetColour(ThemeEntryID_BACKGROUND));
gfx::drawRect(vg, 480 + 2, 170 + 2, STORAGE_BAR_W - (((double)m_size_free_nand / (double)m_size_total_nand) * STORAGE_BAR_W) - 4, STORAGE_BAR_H - 4, theme->GetColour(ThemeEntryID_TEXT));
gfx::drawTextArgs(vg, 870, 135, 23.f, NVG_ALIGN_LEFT | NVG_ALIGN_TOP, theme->GetColour(ThemeEntryID_TEXT), "microSD card %.1f GB", size_sd_gb);
gfx::drawTextArgs(vg, 870, 135, 23.f, NVG_ALIGN_LEFT | NVG_ALIGN_TOP, theme->GetColour(ThemeEntryID_TEXT), "microSD card %.1f GB"_i18n.c_str(), size_sd_gb);
gfx::drawRect(vg, 860, 170, STORAGE_BAR_W, STORAGE_BAR_H, theme->GetColour(ThemeEntryID_TEXT));
gfx::drawRect(vg, 860 + 1, 170 + 1, STORAGE_BAR_W - 2, STORAGE_BAR_H - 2, theme->GetColour(ThemeEntryID_BACKGROUND));
gfx::drawRect(vg, 860 + 2, 170 + 2, STORAGE_BAR_W - (((double)m_size_free_sd / (double)m_size_total_sd) * STORAGE_BAR_W) - 4, STORAGE_BAR_H - 4, theme->GetColour(ThemeEntryID_TEXT));
@@ -485,7 +485,7 @@ void Menu::Draw(NVGcontext* vg, Theme* theme) {
colour = ThemeEntryID_TEXT_INFO;
}
gfx::drawTextArgs(vg, x + 15, y + (h / 2.f), 23.f, NVG_ALIGN_LEFT | NVG_ALIGN_MIDDLE, theme->GetColour(colour), "%s", g_option_list[i]);
gfx::drawTextArgs(vg, x + 15, y + (h / 2.f), 23.f, NVG_ALIGN_LEFT | NVG_ALIGN_MIDDLE, theme->GetColour(colour), "%s", i18n::get(g_option_list[i]).c_str());
});
}

View File

@@ -149,11 +149,11 @@ auto ProgressBox::Draw(NVGcontext* vg, Theme* theme) -> void {
char time_str[64];
if (hours) {
std::snprintf(time_str, sizeof(time_str), "%zu hours %zu minutes remaining", hours, minutes);
std::snprintf(time_str, sizeof(time_str), "%zu hours %zu minutes remaining"_i18n.c_str(), hours, minutes);
} else if (minutes) {
std::snprintf(time_str, sizeof(time_str), "%zu minutes %zu seconds remaining", minutes, seconds);
std::snprintf(time_str, sizeof(time_str), "%zu minutes %zu seconds remaining"_i18n.c_str(), minutes, seconds);
} else {
std::snprintf(time_str, sizeof(time_str), "%zu seconds remaining", seconds);
std::snprintf(time_str, sizeof(time_str), "%zu seconds remaining"_i18n.c_str(), seconds);
}
gfx::drawTextArgs(vg, center_x, prog_bar.y + prog_bar.h + 30, 18, NVG_ALIGN_CENTER | NVG_ALIGN_TOP, theme->GetColour(ThemeEntryID_TEXT), "%s (%s)", time_str, speed_str);