diff --git a/po/aegisub.pot b/po/aegisub.pot index e13b27b613..6ee2cff25c 100644 --- a/po/aegisub.pot +++ b/po/aegisub.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Aegisub 3.2.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-12-01 20:46+0100\n" +"POT-Creation-Date: 2026-01-02 06:38-0100\n" "PO-Revision-Date: 2005-2014-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -254,11 +254,11 @@ msgid "" "%s" msgstr "" -#: ../src/auto4_lua.cpp:458 +#: ../src/auto4_lua.cpp:460 msgid "Could not initialize Lua state" msgstr "" -#: ../src/auto4_lua.cpp:541 +#: ../src/auto4_lua.cpp:543 #, c-format msgid "" "Error initialising Lua script \"%s\":\n" @@ -266,12 +266,48 @@ msgid "" "%s" msgstr "" -#: ../src/auto4_lua.cpp:551 +#: ../src/auto4_lua.cpp:553 msgid "" "Attempted to load an Automation 3 script as an Automation 4 Lua script. " "Automation 3 is no longer supported." msgstr "" +#: ../src/auto4_lua.cpp:827 +#, c-format +msgid "" +"Runtime error in Lua macro validation function:\n" +"%s" +msgstr "" + +#: ../src/auto4_lua.cpp:881 +#, c-format +msgid "Active row %d is out of bounds (must be 1-%u)" +msgstr "" + +#: ../src/auto4_lua.cpp:897 +#, c-format +msgid "Selected row %d is out of bounds (must be 1-%u)" +msgstr "" + +#: ../src/auto4_lua.cpp:903 +#, c-format +msgid "Selected row %d is not a dialogue line" +msgstr "" + +#: ../src/auto4_lua.cpp:969 +#, c-format +msgid "" +"Runtime error in Lua macro IsActive function:\n" +"%s" +msgstr "" + +#: ../src/auto4_lua.cpp:1075 +#, c-format +msgid "" +"Runtime error in Lua config dialog function:\n" +"%s" +msgstr "" + #: ../src/charset_detect.cpp:50 msgid "" "Aegisub could not narrow down the character set to a single one.\n" @@ -362,6 +398,16 @@ msgstr "" msgid "Select Aegisub interface language" msgstr "" +#: ../src/command/app.cpp:167 +msgid "" +"Aegisub needs to be restarted so that the new language can be applied. " +"Restart now?" +msgstr "" + +#: ../src/command/app.cpp:167 +msgid "Restart Aegisub?" +msgstr "" + #: ../src/command/app.cpp:180 msgid "&Log window" msgstr "" @@ -472,7 +518,7 @@ msgstr "" msgid "&Open Audio File..." msgstr "" -#: ../src/command/audio.cpp:78 ../src/command/audio.cpp:85 +#: ../src/command/audio.cpp:78 msgid "Open Audio File" msgstr "" @@ -488,6 +534,10 @@ msgstr "" msgid "Video Formats" msgstr "" +#: ../src/command/audio.cpp:85 +msgid "Open audio file" +msgstr "" + #: ../src/command/audio.cpp:93 ../src/command/audio.cpp:94 msgid "Open 2h30 Blank Audio" msgstr "" @@ -879,7 +929,7 @@ msgstr "" msgid "Font Face..." msgstr "" -#: ../src/command/edit.cpp:488 ../src/preferences_base.cpp:250 +#: ../src/command/edit.cpp:488 ../src/preferences_base.cpp:274 msgid "Font Face" msgstr "" @@ -1539,6 +1589,11 @@ msgstr "" msgid "Save keyframes file" msgstr "" +#: ../src/command/keyframe.cpp:97 ../src/command/timecode.cpp:73 +#: ../src/command/timecode.cpp:93 +msgid "Text Files" +msgstr "" + #: ../src/command/recent.cpp:43 ../src/command/recent.cpp:53 msgid "Open recent audio" msgstr "" @@ -1742,6 +1797,23 @@ msgstr "" msgid "Save subtitles file" msgstr "" +#: ../src/command/subtitle.cpp:357 ../src/command/subtitle.cpp:360 +#: ../src/dialog_fonts_collector.cpp:310 ../src/dialog_fonts_collector.cpp:315 +#: ../src/dialog_fonts_collector.cpp:320 ../src/dialog_kara_timing_copy.cpp:489 +#: ../src/dialog_kara_timing_copy.cpp:491 +#: ../src/dialog_kara_timing_copy.cpp:541 ../src/dialog_search_replace.cpp:143 +#: ../src/dialog_spellchecker.cpp:143 ../src/dialog_spellchecker.cpp:149 +#: ../src/dialog_style_manager.cpp:682 ../src/dialog_style_manager.cpp:688 +#: ../src/dialog_style_manager.cpp:691 ../src/main.cpp:194 +#: ../src/preferences.cpp:272 ../src/preferences.cpp:464 +msgid "Error" +msgstr "" + +#: ../src/command/subtitle.cpp:360 ../src/dialog_export.cpp:208 +#: ../src/dialog_style_manager.cpp:691 ../src/project.cpp:142 +msgid "Unknown error" +msgstr "" + #: ../src/command/subtitle.cpp:367 msgid "&Save Subtitles" msgstr "" @@ -1990,7 +2062,7 @@ msgstr "" msgid "Open Timecodes File..." msgstr "" -#: ../src/command/timecode.cpp:69 ../src/command/timecode.cpp:74 +#: ../src/command/timecode.cpp:69 msgid "Open Timecodes File" msgstr "" @@ -1998,15 +2070,15 @@ msgstr "" msgid "Open a VFR timecodes v1 or v2 file" msgstr "" -#: ../src/command/timecode.cpp:73 ../src/command/timecode.cpp:93 -msgid "Text Files" +#: ../src/command/timecode.cpp:74 +msgid "Open timecodes file" msgstr "" #: ../src/command/timecode.cpp:83 msgid "Save Timecodes File..." msgstr "" -#: ../src/command/timecode.cpp:84 ../src/command/timecode.cpp:94 +#: ../src/command/timecode.cpp:84 msgid "Save Timecodes File" msgstr "" @@ -2014,6 +2086,14 @@ msgstr "" msgid "Save a VFR timecodes v2 file" msgstr "" +#: ../src/command/timecode.cpp:94 +msgid "Save timecodes file" +msgstr "" + +#: ../src/command/timecode.cpp:103 +msgid "Error saving timecodes" +msgstr "" + #: ../src/command/tool.cpp:56 msgid "&Export Subtitles..." msgstr "" @@ -2765,7 +2845,7 @@ msgid "E&xtract" msgstr "" #: ../src/dialog_attachments.cpp:79 ../src/dialog_style_manager.cpp:204 -#: ../src/preferences.cpp:613 +#: ../src/preferences.cpp:612 msgid "&Delete" msgstr "" @@ -2850,7 +2930,7 @@ msgstr "" msgid "Filename" msgstr "" -#: ../src/dialog_automation.cpp:136 ../src/preferences.cpp:633 +#: ../src/dialog_automation.cpp:136 ../src/preferences.cpp:632 msgid "Description" msgstr "" @@ -3149,11 +3229,6 @@ msgstr "" msgid "Error exporting subtitles" msgstr "" -#: ../src/dialog_export.cpp:208 ../src/dialog_style_manager.cpp:691 -#: ../src/project.cpp:142 -msgid "Unknown error" -msgstr "" - #: ../src/dialog_export_ebu3264.cpp:83 msgid "EBU STL export" msgstr "" @@ -3382,16 +3457,6 @@ msgstr "" msgid "&Start!" msgstr "" -#: ../src/dialog_fonts_collector.cpp:310 ../src/dialog_fonts_collector.cpp:315 -#: ../src/dialog_fonts_collector.cpp:320 ../src/dialog_kara_timing_copy.cpp:489 -#: ../src/dialog_kara_timing_copy.cpp:491 -#: ../src/dialog_kara_timing_copy.cpp:541 ../src/dialog_spellchecker.cpp:143 -#: ../src/dialog_spellchecker.cpp:149 ../src/dialog_style_manager.cpp:682 -#: ../src/dialog_style_manager.cpp:688 ../src/dialog_style_manager.cpp:691 -#: ../src/preferences.cpp:272 ../src/preferences.cpp:464 -msgid "Error" -msgstr "" - #: ../src/dialog_fonts_collector.cpp:310 msgid "Invalid destination." msgstr "" @@ -3408,6 +3473,10 @@ msgstr "" msgid "Select archive file name" msgstr "" +#: ../src/dialog_fonts_collector.cpp:346 +msgid "Zip Archives" +msgstr "" + #: ../src/dialog_fonts_collector.cpp:350 msgid "Select folder to save fonts on" msgstr "" @@ -3445,7 +3514,7 @@ msgid "Dest: " msgstr "" #: ../src/dialog_kara_timing_copy.cpp:385 -msgid "Kanji timing" +msgid "Kanji timer" msgstr "" #: ../src/dialog_kara_timing_copy.cpp:390 ../src/dialog_paste_over.cpp:73 @@ -3466,7 +3535,7 @@ msgid "Commands" msgstr "" #: ../src/dialog_kara_timing_copy.cpp:402 -msgid "Attempt to &interpolate kanji." +msgid "Attempt to &interpolate kanji" msgstr "" #: ../src/dialog_kara_timing_copy.cpp:409 @@ -3902,8 +3971,10 @@ msgstr "" #: ../src/dialog_shift_times.cpp:95 #, c-format -msgid "%s frames" -msgstr "" +msgid "1 frame" +msgid_plural "%s frames" +msgstr[0] "" +msgstr[1] "" #: ../src/dialog_shift_times.cpp:97 msgid "backward" @@ -4323,11 +4394,11 @@ msgstr "" msgid "Sort styles alphabetically" msgstr "" -#: ../src/dialog_style_manager.cpp:201 ../src/preferences.cpp:611 +#: ../src/dialog_style_manager.cpp:201 ../src/preferences.cpp:610 msgid "&New" msgstr "" -#: ../src/dialog_style_manager.cpp:202 ../src/preferences.cpp:612 +#: ../src/dialog_style_manager.cpp:202 ../src/preferences.cpp:611 msgid "&Edit" msgstr "" @@ -4840,7 +4911,7 @@ msgstr "" #: ../src/dialog_video_details.cpp:62 #, c-format -msgid "1 frame" +msgid "1 frame (%s)" msgid_plural "%d frames (%s)" msgstr[0] "" msgstr[1] "" @@ -5101,6 +5172,13 @@ msgstr "" msgid "Invalid command name for hotkey" msgstr "" +#: ../src/main.cpp:194 +#, c-format +msgid "" +"Configuration file is invalid. Error reported:\n" +"%s" +msgstr "" + #: ../src/main.cpp:258 #, c-format msgid "" @@ -5123,6 +5201,18 @@ msgid "" "do it manually via the Help menu." msgstr "" +#: ../src/main.cpp:291 +msgid "Error saving config file" +msgstr "" + +#: ../src/main.cpp:307 ../src/main.cpp:311 ../src/main.cpp:316 +msgid "Fatal error while initializing" +msgstr "" + +#: ../src/main.cpp:316 +msgid "Unhandled exception" +msgstr "" + #: ../src/main.cpp:402 ../src/main.cpp:405 msgid "Program error" msgstr "" @@ -6000,53 +6090,53 @@ msgstr "" msgid "Enable unsafe seeking" msgstr "" -#: ../src/preferences.cpp:605 +#: ../src/preferences.cpp:604 msgid "Hotkeys" msgstr "" -#: ../src/preferences.cpp:609 +#: ../src/preferences.cpp:608 msgid "Search" msgstr "" -#: ../src/preferences.cpp:625 ../src/preferences.cpp:628 +#: ../src/preferences.cpp:624 ../src/preferences.cpp:627 msgid "Hotkey" msgstr "" -#: ../src/preferences.cpp:626 ../src/preferences.cpp:631 +#: ../src/preferences.cpp:625 ../src/preferences.cpp:630 msgid "Command" msgstr "" -#: ../src/preferences.cpp:705 +#: ../src/preferences.cpp:704 msgid "" "Are you sure that you want to restore the defaults? All your settings will " "be overridden." msgstr "" -#: ../src/preferences.cpp:705 +#: ../src/preferences.cpp:704 msgid "Restore defaults?" msgstr "" -#: ../src/preferences.cpp:723 +#: ../src/preferences.cpp:722 msgid "Preferences" msgstr "" -#: ../src/preferences.cpp:751 +#: ../src/preferences.cpp:750 msgid "&Restore Defaults" msgstr "" -#: ../src/preferences_base.cpp:62 +#: ../src/preferences_base.cpp:77 msgid "Please choose the folder:" msgstr "" -#: ../src/preferences_base.cpp:208 +#: ../src/preferences_base.cpp:232 msgid "Browse..." msgstr "" -#: ../src/preferences_base.cpp:243 +#: ../src/preferences_base.cpp:267 msgid "Choose..." msgstr "" -#: ../src/preferences_base.cpp:251 +#: ../src/preferences_base.cpp:275 msgid "Font Size" msgstr "" @@ -6459,6 +6549,40 @@ msgstr "" msgid "Time of this frame relative to start and end of current subs" msgstr "" +#: ../src/video_controller.cpp:228 +#, c-format +msgid "" +"Failed seeking video. The video file may be corrupt or incomplete.\n" +"Error message reported: %s" +msgstr "" + +#: ../src/video_controller.cpp:234 +#, c-format +msgid "Failed rendering subtitles. Error message reported: %s" +msgstr "" + +#: ../src/video_display.cpp:193 +#, c-format +msgid "" +"Failed to initialize video display. Closing other running programs and " +"updating your video card drivers may fix this.\n" +"Error message reported: %s" +msgstr "" + +#: ../src/video_display.cpp:200 +#, c-format +msgid "" +"Could not upload video frame to graphics card.\n" +"Error message reported: %s" +msgstr "" + +#: ../src/video_display.cpp:245 +#, c-format +msgid "" +"An error occurred trying to render the video frame on the screen.\n" +"Error message reported: %s" +msgstr "" + #: ../src/video_provider_manager.cpp:78 msgid "file not found." msgstr "" diff --git a/src/auto4_lua.cpp b/src/auto4_lua.cpp index 4173076ae3..6595b7b050 100644 --- a/src/auto4_lua.cpp +++ b/src/auto4_lua.cpp @@ -824,7 +824,7 @@ namespace { subsobj->ProcessingComplete(); if (err) { - wxLogWarning("Runtime error in Lua macro validation function:\n%s", get_wxstring(L, -1)); + wxLogWarning(fmt_tl("Runtime error in Lua macro validation function:\n%s", get_wxstring(L, -1))); lua_pop(L, 2); return false; } @@ -878,7 +878,7 @@ namespace { if (lua_isnumber(L, -1)) { active_idx = lua_tointeger(L, -1); if (active_idx < 1 || active_idx > (int)lines.size()) { - wxLogError("Active row %d is out of bounds (must be 1-%u)", active_idx, lines.size()); + wxLogError(fmt_tl("Active row %d is out of bounds (must be 1-%u)", active_idx, lines.size())); active_idx = original_active; } } @@ -894,13 +894,13 @@ namespace { return; int cur = lua_tointeger(L, -1); if (cur < 1 || cur > (int)lines.size()) { - wxLogError("Selected row %d is out of bounds (must be 1-%u)", cur, lines.size()); + wxLogError(fmt_tl("Selected row %d is out of bounds (must be 1-%u)", cur, lines.size())); throw LuaForEachBreak(); } AssEntry *curline = lines[cur - 1]; if (typeid(*curline) != typeid(AssDialogue)) { - wxLogError("Selected row %d is not a dialogue line", cur); + wxLogError(fmt_tl("Selected row %d is not a dialogue line", cur)); throw LuaForEachBreak(); } @@ -966,7 +966,7 @@ namespace { bool result = false; if (err) - wxLogWarning("Runtime error in Lua macro IsActive function:\n%s", get_wxstring(L, -1)); + wxLogWarning(fmt_tl("Runtime error in Lua macro IsActive function:\n%s", get_wxstring(L, -1))); else result = !!lua_toboolean(L, -1); @@ -1072,7 +1072,7 @@ namespace { subsobj->ProcessingComplete(); if (err) { - wxLogWarning("Runtime error in Lua config dialog function:\n%s", get_wxstring(L, -1)); + wxLogWarning(fmt_tl("Runtime error in Lua config dialog function:\n%s", get_wxstring(L, -1))); lua_pop(L, 1); // remove error message } else { // Create config dialogue from table on top of stack diff --git a/src/command/app.cpp b/src/command/app.cpp index d509dc9313..40911692b3 100644 --- a/src/command/app.cpp +++ b/src/command/app.cpp @@ -164,7 +164,7 @@ struct app_language final : public Command { OPT_SET("App/Language")->SetString(new_language); // Ask to restart program - 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); + 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); if (result == wxYES) { // Restart Aegisub if (c->frame->Close()) { diff --git a/src/command/audio.cpp b/src/command/audio.cpp index 1d51dc02e0..cf9a7a2100 100644 --- a/src/command/audio.cpp +++ b/src/command/audio.cpp @@ -82,7 +82,7 @@ struct audio_open final : public Command { auto str = from_wx(_("Audio Formats") + " (*.aac,*.ac3,*.ape,*.dts,*.eac3,*.flac,*.m4a,*.mka,*.mp3,*.mp4,*.ogg,*.opus,*.w64,*.wav,*.wma)|*.aac;*.ac3;*.ape;*.dts;*.eac3;*.flac;*.m4a;*.mka;*.mp3;*.mp4;*.ogg;*.opus;*.w64;*.wav;*.wma|" + _("Video Formats") + " (*.asf,*.avi,*.avs,*.d2v,*.m2ts,*.m4v,*.mkv,*.mov,*.mp4,*.mpeg,*.mpg,*.ogm,*.webm,*.wmv,*.ts)|*.asf;*.avi;*.avs;*.d2v;*.m2ts;*.m4v;*.mkv;*.mov;*.mp4;*.mpeg;*.mpg;*.ogm;*.webm;*.wmv;*.ts|" + _("All Files") + " (*.*)|*.*"); - auto filename = OpenFileSelector(_("Open Audio File"), "Path/Last/Audio", "", "", str, c->parent); + auto filename = OpenFileSelector(_("Open audio file"), "Path/Last/Audio", "", "", str, c->parent); if (!filename.empty()) c->project->LoadAudio(filename); } diff --git a/src/command/keyframe.cpp b/src/command/keyframe.cpp index 8647e4ffd4..f9c2f74ed9 100644 --- a/src/command/keyframe.cpp +++ b/src/command/keyframe.cpp @@ -94,7 +94,7 @@ struct keyframe_save final : public Command { } void operator()(agi::Context *c) override { - auto filename = SaveFileSelector(_("Save keyframes file"), "Path/Last/Keyframes", "", "*.key.txt", "Text files (*.txt)|*.txt", c->parent); + auto filename = SaveFileSelector(_("Save keyframes file"), "Path/Last/Keyframes", "", "*.key.txt", from_wx(_("Text Files") + " (*.txt)|*.txt"), c->parent); if (filename.empty()) return; agi::keyframe::Save(filename, c->project->Keyframes()); diff --git a/src/command/subtitle.cpp b/src/command/subtitle.cpp index e62b646156..2207059139 100644 --- a/src/command/subtitle.cpp +++ b/src/command/subtitle.cpp @@ -354,10 +354,10 @@ static void save_subtitles(agi::Context *c, agi::fs::path filename) { c->subsController->Save(filename); } catch (const agi::Exception& err) { - wxMessageBox(to_wx(err.GetMessage()), "Error", wxOK | wxICON_ERROR | wxCENTER, c->parent); + wxMessageBox(to_wx(err.GetMessage()), _("Error"), wxOK | wxICON_ERROR | wxCENTER, c->parent); } catch (...) { - wxMessageBox("Unknown error", "Error", wxOK | wxICON_ERROR | wxCENTER, c->parent); + wxMessageBox(_("Unknown error"), _("Error"), wxOK | wxICON_ERROR | wxCENTER, c->parent); } } diff --git a/src/command/timecode.cpp b/src/command/timecode.cpp index 9687d0e56d..c3b6169a36 100644 --- a/src/command/timecode.cpp +++ b/src/command/timecode.cpp @@ -71,7 +71,7 @@ struct timecode_open final : public Command { void operator()(agi::Context *c) override { auto str = from_wx(_("Text Files") + " (*.txt)|*.txt|" + _("All Files") + " (*.*)|*.*"); - auto filename = OpenFileSelector(_("Open Timecodes File"), "Path/Last/Timecodes", "", "", str, c->parent); + auto filename = OpenFileSelector(_("Open timecodes file"), "Path/Last/Timecodes", "", "", str, c->parent); if (!filename.empty()) c->project->LoadTimecodes(filename); } @@ -91,7 +91,7 @@ struct timecode_save final : public Command { void operator()(agi::Context *c) override { auto str = from_wx(_("Text Files") + " (*.txt)|*.txt|" + _("All Files") + " (*.*)|*.*"); - auto filename = SaveFileSelector(_("Save Timecodes File"), "Path/Last/Timecodes", "", "", str, c->parent); + auto filename = SaveFileSelector(_("Save timecodes file"), "Path/Last/Timecodes", "", "", str, c->parent); if (filename.empty()) return; try { @@ -100,7 +100,7 @@ struct timecode_save final : public Command { config::mru->Add("Timecodes", filename); } catch (agi::Exception const& err) { - wxMessageBox(to_wx(err.GetMessage()), "Error saving timecodes", wxOK | wxICON_ERROR | wxCENTER, c->parent); + wxMessageBox(to_wx(err.GetMessage()), _("Error saving timecodes"), wxOK | wxICON_ERROR | wxCENTER, c->parent); } } }; diff --git a/src/dialog_fonts_collector.cpp b/src/dialog_fonts_collector.cpp index 882881e13e..4b2f39fac1 100644 --- a/src/dialog_fonts_collector.cpp +++ b/src/dialog_fonts_collector.cpp @@ -345,7 +345,7 @@ void DialogFontsCollector::OnBrowse(wxCommandEvent &) { _("Select archive file name"), dest_ctrl->GetValue(), wxFileName(dest_ctrl->GetValue()).GetFullName(), - ".zip", "Zip Archives (*.zip)|*.zip", + ".zip", _("Zip Archives") + " (*.zip)|*.zip", wxFD_SAVE|wxFD_OVERWRITE_PROMPT); } else diff --git a/src/dialog_kara_timing_copy.cpp b/src/dialog_kara_timing_copy.cpp index c565451786..c974700641 100644 --- a/src/dialog_kara_timing_copy.cpp +++ b/src/dialog_kara_timing_copy.cpp @@ -383,7 +383,7 @@ class DialogKanjiTimer final : public wxDialog { }; DialogKanjiTimer::DialogKanjiTimer(agi::Context *c) -: wxDialog(c->parent, -1, _("Kanji timing")) +: wxDialog(c->parent, -1, _("Kanji timer")) , subs(c->ass.get()) { SetIcons(GETICONS(kara_timing_copier)); @@ -405,7 +405,7 @@ DialogKanjiTimer::DialogKanjiTimer(agi::Context *c) display = new KaraokeLineMatchDisplay(DisplayBox); //Checkbox - Interpolate = new wxCheckBox(DisplayBox,-1,_("Attempt to &interpolate kanji."),wxDefaultPosition,wxDefaultSize,wxALIGN_LEFT); + Interpolate = new wxCheckBox(this,-1,_("Attempt to &interpolate kanji"),wxDefaultPosition,wxDefaultSize,wxALIGN_LEFT); Interpolate->SetValue(OPT_GET("Tool/Kanji Timer/Interpolation")->GetBool()); wxArrayString styles = to_wx(subs->GetStyles()); diff --git a/src/dialog_search_replace.cpp b/src/dialog_search_replace.cpp index 3436971f1a..ca83480aef 100644 --- a/src/dialog_search_replace.cpp +++ b/src/dialog_search_replace.cpp @@ -140,7 +140,7 @@ void DialogSearchReplace::FindReplace(bool (SearchReplaceEngine::*f ((*c->search).*func)(); } catch (std::exception const& e) { - wxMessageBox(to_wx(e.what()), "Error", wxOK | wxICON_ERROR | wxCENTER, this); + wxMessageBox(to_wx(e.what()), _("Error"), wxOK | wxICON_ERROR | wxCENTER, this); return; } diff --git a/src/dialog_shift_times.cpp b/src/dialog_shift_times.cpp index 0bba5a95fb..886ec0c0af 100644 --- a/src/dialog_shift_times.cpp +++ b/src/dialog_shift_times.cpp @@ -93,7 +93,7 @@ static wxString get_history_string(json::Object &obj) { auto shift_amount = to_wx(obj["amount"]); if (!obj["is by time"]) - shift_amount = fmt_tl("%s frames", shift_amount); + shift_amount = fmt_plural(wxAtoi(shift_amount), "1 frame", "%s frames", shift_amount); wxString shift_direction = obj["is backward"] ? _("backward") : _("forward"); diff --git a/src/dialog_video_details.cpp b/src/dialog_video_details.cpp index f1fd147e88..178142003e 100644 --- a/src/dialog_video_details.cpp +++ b/src/dialog_video_details.cpp @@ -63,7 +63,7 @@ void ShowVideoDetailsDialog(agi::Context *c) { make_field(_("File name:"), c->project->VideoName().wstring()); make_field(_("FPS:"), fmt_wx("%.3f", fps.FPS())); make_field(_("Resolution:"), fmt_wx("%dx%d (%d:%d)", width, height, ar.numerator(), ar.denominator())); - make_field(_("Length:"), fmt_plural(framecount, "1 frame", "%d frames (%s)", + make_field(_("Length:"), fmt_plural(framecount, "1 frame (%s)", "%d frames (%s)", framecount, agi::Time(fps.TimeAtFrame(framecount - 1)).GetAssFormatted(true))); make_field(_("Decoder:"), to_wx(provider->GetDecoderName())); diff --git a/src/main.cpp b/src/main.cpp index 3cd545b924..2affaa7a82 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -191,7 +191,7 @@ bool AegisubApp::OnInit() { config::opt->ConfigUser(); } catch (agi::Exception const& err) { - wxMessageBox("Configuration file is invalid. Error reported:\n" + to_wx(err.GetMessage()), "Error"); + wxMessageBox(fmt_tl("Configuration file is invalid. Error reported:\n%s", err.GetMessage()), _("Error")); } #ifdef _WIN32 @@ -288,7 +288,7 @@ bool AegisubApp::OnInit() { config::opt->Flush(); } catch (agi::fs::FileSystemError const& e) { - wxMessageBox(to_wx(e.GetMessage()), "Error saving config file", wxOK | wxICON_ERROR | wxCENTER); + wxMessageBox(to_wx(e.GetMessage()), _("Error saving config file"), wxOK | wxICON_ERROR | wxCENTER); } #endif } @@ -304,16 +304,16 @@ bool AegisubApp::OnInit() { OpenFiles(wxArrayStringsAdapter(args.size() - 1, &args[1])); } catch (agi::Exception const& e) { - wxMessageBox(to_wx(e.GetMessage()), "Fatal error while initializing"); + wxMessageBox(to_wx(e.GetMessage()), _("Fatal error while initializing")); return false; } catch (std::exception const& e) { - wxMessageBox(to_wx(e.what()), "Fatal error while initializing"); + wxMessageBox(to_wx(e.what()), _("Fatal error while initializing")); return false; } #ifndef _DEBUG catch (...) { - wxMessageBox("Unhandled exception","Fatal error while initializing"); + wxMessageBox(_("Unhandled exception"), _("Fatal error while initializing")); return false; } #endif diff --git a/src/video_controller.cpp b/src/video_controller.cpp index 6aff6eef68..10a7103328 100644 --- a/src/video_controller.cpp +++ b/src/video_controller.cpp @@ -33,6 +33,7 @@ #include "ass_file.h" #include "audio_controller.h" #include "compat.h" +#include "format.h" #include "include/aegisub/context.h" #include "options.h" #include "project.h" @@ -224,13 +225,12 @@ int VideoController::FrameAtTime(int time, agi::vfr::Time type) const { void VideoController::OnVideoError(VideoProviderErrorEvent const& err) { wxLogError( - "Failed seeking video. The video file may be corrupt or incomplete.\n" - "Error message reported: %s", - to_wx(err.GetMessage())); + fmt_tl("Failed seeking video. The video file may be corrupt or incomplete.\nError message reported: %s", + err.GetMessage())); } void VideoController::OnSubtitlesError(SubtitlesProviderErrorEvent const& err) { wxLogError( - "Failed rendering subtitles. Error message reported: %s", - to_wx(err.GetMessage())); + fmt_tl("Failed rendering subtitles. Error message reported: %s", + err.GetMessage())); } diff --git a/src/video_display.cpp b/src/video_display.cpp index 832ef49687..e3f8f07949 100644 --- a/src/video_display.cpp +++ b/src/video_display.cpp @@ -190,18 +190,15 @@ void VideoDisplay::Render() try { } catch (const VideoOutInitException& err) { wxLogError( - "Failed to initialize video display. Closing other running " - "programs and updating your video card drivers may fix this.\n" - "Error message reported: %s", - err.GetMessage()); + fmt_tl("Failed to initialize video display. Closing other running programs and updating your video card drivers may fix this.\nError message reported: %s", + err.GetMessage())); con->project->CloseVideo(); return; } catch (const VideoOutRenderException& err) { wxLogError( - "Could not upload video frame to graphics card.\n" - "Error message reported: %s", - err.GetMessage()); + fmt_tl("Could not upload video frame to graphics card.\nError message reported: %s", + err.GetMessage())); return; } @@ -245,9 +242,8 @@ void VideoDisplay::Render() try { } catch (const agi::Exception &err) { wxLogError( - "An error occurred trying to render the video frame on the screen.\n" - "Error message reported: %s", - err.GetMessage()); + fmt_tl("An error occurred trying to render the video frame on the screen.\nError message reported: %s", + err.GetMessage())); con->project->CloseVideo(); }