Skip to content

Commit 95cea7c

Browse files
authored
Make message boxes translatable
app.cpp -- Make message box translatable subtitle.cpp -- Make message boxes translatable timecode.cpp -- Make message box translatable
1 parent 345f8ca commit 95cea7c

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/command/app.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ struct app_language final : public Command {
164164
OPT_SET("App/Language")->SetString(new_language);
165165

166166
// Ask to restart program
167-
int result = wxMessageBox("Aegisub needs to be restarted so that the new language can be applied. Restart now?", "Restart Aegisub?", wxYES_NO | wxICON_QUESTION | wxCENTER);
167+
int result = wxMessageBox(_("Aegisub needs to be restarted so that the new language can be applied. Restart now?"), _("Restart Aegisub?"), wxYES_NO | wxICON_QUESTION | wxCENTER);
168168
if (result == wxYES) {
169169
// Restart Aegisub
170170
if (c->frame->Close()) {

src/command/subtitle.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,10 +354,10 @@ static void save_subtitles(agi::Context *c, agi::fs::path filename) {
354354
c->subsController->Save(filename);
355355
}
356356
catch (const agi::Exception& err) {
357-
wxMessageBox(to_wx(err.GetMessage()), "Error", wxOK | wxICON_ERROR | wxCENTER, c->parent);
357+
wxMessageBox(to_wx(err.GetMessage()), _("Error"), wxOK | wxICON_ERROR | wxCENTER, c->parent);
358358
}
359359
catch (...) {
360-
wxMessageBox("Unknown error", "Error", wxOK | wxICON_ERROR | wxCENTER, c->parent);
360+
wxMessageBox(_("Unknown error"), _("Error"), wxOK | wxICON_ERROR | wxCENTER, c->parent);
361361
}
362362
}
363363

src/command/timecode.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ struct timecode_open final : public Command {
7070
STR_HELP("Open a VFR timecodes v1 or v2 file")
7171

7272
void operator()(agi::Context *c) override {
73-
auto str = from_wx(_("All Supported Formats") + " (*.txt)|*.txt|" + _("All Files") + " (*.*)|*.*");
73+
auto str = from_wx(_("Text Files") + " (*.txt)|*.txt|" + _("All Files") + " (*.*)|*.*");
7474
auto filename = OpenFileSelector(_("Open Timecodes File"), "Path/Last/Timecodes", "", "", str, c->parent);
7575
if (!filename.empty())
7676
c->project->LoadTimecodes(filename);
@@ -90,7 +90,7 @@ struct timecode_save final : public Command {
9090
}
9191

9292
void operator()(agi::Context *c) override {
93-
auto str = from_wx(_("All Supported Formats") + " (*.txt)|*.txt|" + _("All Files") + " (*.*)|*.*");
93+
auto str = from_wx(_("Text Files") + " (*.txt)|*.txt|" + _("All Files") + " (*.*)|*.*");
9494
auto filename = SaveFileSelector(_("Save Timecodes File"), "Path/Last/Timecodes", "", "", str, c->parent);
9595
if (filename.empty()) return;
9696

@@ -100,7 +100,7 @@ struct timecode_save final : public Command {
100100
config::mru->Add("Timecodes", filename);
101101
}
102102
catch (agi::Exception const& err) {
103-
wxMessageBox(to_wx(err.GetMessage()), "Error saving timecodes", wxOK | wxICON_ERROR | wxCENTER, c->parent);
103+
wxMessageBox(to_wx(err.GetMessage()), _("Error saving timecodes"), wxOK | wxICON_ERROR | wxCENTER, c->parent);
104104
}
105105
}
106106
};

0 commit comments

Comments
 (0)