From 9d3abb4601d64aa0ae6b763e9a7975921991a873 Mon Sep 17 00:00:00 2001 From: zlomzlom <64724986+zlomzlom@users.noreply.github.com> Date: Mon, 22 Dec 2025 14:19:27 +0000 Subject: [PATCH 01/11] Make message boxes translatable app.cpp -- Make message box translatable subtitle.cpp -- Make message boxes translatable timecode.cpp -- Make message box translatable --- src/command/app.cpp | 2 +- src/command/subtitle.cpp | 4 ++-- src/command/timecode.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/command/app.cpp b/src/command/app.cpp index 144f88f9f7..be13d4d22c 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/subtitle.cpp b/src/command/subtitle.cpp index 37a1b018c0..041d4bcf09 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..dbe15135c9 100644 --- a/src/command/timecode.cpp +++ b/src/command/timecode.cpp @@ -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); } } }; From 5118325978a5c3dedaccf741a52f7f007b597dd3 Mon Sep 17 00:00:00 2001 From: zlomzlom <64724986+zlomzlom@users.noreply.github.com> Date: Mon, 22 Dec 2025 14:21:28 +0000 Subject: [PATCH 02/11] Make more strings translatable and fix some dialog_fonts_collector.cpp -- Make "Zip Archives" string translatable dialog_kara_timing_copy.cpp -- Change window title and remove dot in checkbox dialog_search_replace.cpp -- Make message box title translatable dialog_shift_times.cpp -- Make "shift amount" plural dialog_video_details.cpp -- Change singular "1 frame" to "1 frame (%s)" (to avoid having similar translations for dialog_shift_times and dialog_video_details) main.cpp -- Make message boxes translatable video_controller.cpp -- Make log errors translatable video_display.cpp -- Make log errors translatable --- src/dialog_fonts_collector.cpp | 2 +- src/dialog_kara_timing_copy.cpp | 4 ++-- src/dialog_search_replace.cpp | 2 +- src/dialog_shift_times.cpp | 2 +- src/dialog_video_details.cpp | 2 +- src/main.cpp | 10 +++++----- src/video_controller.cpp | 10 +++++----- src/video_display.cpp | 16 ++++++---------- 8 files changed, 22 insertions(+), 26 deletions(-) diff --git a/src/dialog_fonts_collector.cpp b/src/dialog_fonts_collector.cpp index acff8a04c4..42bebe3809 100644 --- a/src/dialog_fonts_collector.cpp +++ b/src/dialog_fonts_collector.cpp @@ -343,7 +343,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 e2abbc5f2c..f94a268469 100644 --- a/src/dialog_kara_timing_copy.cpp +++ b/src/dialog_kara_timing_copy.cpp @@ -382,7 +382,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)); @@ -399,7 +399,7 @@ DialogKanjiTimer::DialogKanjiTimer(agi::Context *c) display = new KaraokeLineMatchDisplay(this); //Checkbox - Interpolate = new wxCheckBox(this,-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 91d569f210..77f23a0d09 100644 --- a/src/dialog_shift_times.cpp +++ b/src/dialog_shift_times.cpp @@ -92,7 +92,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(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 84dab54623..81fe19114e 100644 --- a/src/dialog_video_details.cpp +++ b/src/dialog_video_details.cpp @@ -59,7 +59,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 0131470347..b2b6de55aa 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 6c4427eaf9..5de7994225 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.\nError message reported: %s", + err.GetMessage())); } diff --git a/src/video_display.cpp b/src/video_display.cpp index 62b6be1e3b..3bd2e57da6 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(); } From f775ba74f14a2e79417ea27457d8eae8677c0f85 Mon Sep 17 00:00:00 2001 From: zlomzlom <64724986+zlomzlom@users.noreply.github.com> Date: Mon, 22 Dec 2025 14:22:01 +0000 Subject: [PATCH 03/11] Regenerate pot file --- po/aegisub.pot | 135 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 106 insertions(+), 29 deletions(-) diff --git a/po/aegisub.pot b/po/aegisub.pot index e13b27b613..adf025f333 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: 2025-12-21 07:07-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,7 +266,7 @@ 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." @@ -362,6 +362,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 "" @@ -879,7 +889,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 "" @@ -1742,6 +1752,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 "" @@ -2014,6 +2041,10 @@ msgstr "" msgid "Save a VFR timecodes v2 file" msgstr "" +#: ../src/command/timecode.cpp:103 +msgid "Error saving timecodes" +msgstr "" + #: ../src/command/tool.cpp:56 msgid "&Export Subtitles..." msgstr "" @@ -3149,11 +3180,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 +3408,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 +3424,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 +3465,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 +3486,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 +3922,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" @@ -4840,7 +4862,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 +5123,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 +5152,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 "" @@ -6034,19 +6075,19 @@ msgstr "" 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 +6500,42 @@ 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.\n" +"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 "" From f9b0b800fa3b39260bc395374b86116c2c95a49b Mon Sep 17 00:00:00 2001 From: zlomzlom <64724986+zlomzlom@users.noreply.github.com> Date: Tue, 23 Dec 2025 01:13:54 +0000 Subject: [PATCH 04/11] Fix mistake --- src/dialog_shift_times.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dialog_shift_times.cpp b/src/dialog_shift_times.cpp index 77f23a0d09..e611698f7d 100644 --- a/src/dialog_shift_times.cpp +++ b/src/dialog_shift_times.cpp @@ -92,7 +92,7 @@ static wxString get_history_string(json::Object &obj) { auto shift_amount = to_wx(obj["amount"]); if (!obj["is by time"]) - shift_amount = fmt_plural(shift_amount, "1 frame", "%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"); From cdf64e88cd9b3cee1160ad3cce967bb75b4a45ca Mon Sep 17 00:00:00 2001 From: zlomzlom <64724986+zlomzlom@users.noreply.github.com> Date: Wed, 24 Dec 2025 11:16:22 +0000 Subject: [PATCH 05/11] Make file type translatable Missed a "Text files" string in save file selector --- src/command/keyframe.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command/keyframe.cpp b/src/command/keyframe.cpp index 8647e4ffd4..f07e35d2c5 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()); From 2300c38f554e6e51e43dbc4e86c14c49bf11ccba Mon Sep 17 00:00:00 2001 From: zlomzlom <64724986+zlomzlom@users.noreply.github.com> Date: Wed, 24 Dec 2025 11:19:20 +0000 Subject: [PATCH 06/11] Make strings translatable video_controller.cpp -- Remove line breaker auto4_lua.cpp -- Make warning/error logs translatable --- src/auto4_lua.cpp | 12 ++++++------ src/video_controller.cpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/auto4_lua.cpp b/src/auto4_lua.cpp index aea118911f..caaa3b1104 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/video_controller.cpp b/src/video_controller.cpp index 5de7994225..d82202618e 100644 --- a/src/video_controller.cpp +++ b/src/video_controller.cpp @@ -231,6 +231,6 @@ void VideoController::OnVideoError(VideoProviderErrorEvent const& err) { void VideoController::OnSubtitlesError(SubtitlesProviderErrorEvent const& err) { wxLogError( - fmt_tl("Failed rendering subtitles.\nError message reported: %s", + fmt_tl("Failed rendering subtitles. Error message reported: %s", err.GetMessage())); } From f6afd0da1d65a0e3e65605b65782ca0e19fd0d25 Mon Sep 17 00:00:00 2001 From: zlomzlom <64724986+zlomzlom@users.noreply.github.com> Date: Wed, 24 Dec 2025 11:19:59 +0000 Subject: [PATCH 07/11] Regenerate pot file --- po/aegisub.pot | 70 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 54 insertions(+), 16 deletions(-) diff --git a/po/aegisub.pot b/po/aegisub.pot index adf025f333..84d76f91d1 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-21 07:07-0100\n" +"POT-Creation-Date: 2025-12-24 09:57-0100\n" "PO-Revision-Date: 2005-2014-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -272,6 +272,42 @@ msgid "" "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" @@ -1549,6 +1585,10 @@ msgstr "" msgid "Save keyframes file" msgstr "" +#: ../src/command/keyframe.cpp:97 +msgid "Text files" +msgstr "" + #: ../src/command/recent.cpp:43 ../src/command/recent.cpp:53 msgid "Open recent audio" msgstr "" @@ -2796,7 +2836,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 "" @@ -2881,7 +2921,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 "" @@ -4345,11 +4385,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 "" @@ -6041,37 +6081,37 @@ 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 "" @@ -6509,9 +6549,7 @@ msgstr "" #: ../src/video_controller.cpp:234 #, c-format -msgid "" -"Failed rendering subtitles.\n" -"Error message reported: %s" +msgid "Failed rendering subtitles. Error message reported: %s" msgstr "" #: ../src/video_display.cpp:193 From 298899e6007454255c7979ba267f268b9c5b098a Mon Sep 17 00:00:00 2001 From: zlomzlom <64724986+zlomzlom@users.noreply.github.com> Date: Wed, 24 Dec 2025 11:35:33 +0000 Subject: [PATCH 08/11] Change file type name .......sorry --- src/command/keyframe.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command/keyframe.cpp b/src/command/keyframe.cpp index f07e35d2c5..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", from_wx(_("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()); From 70d58998050d626ae497a52f297d5e10e5e8e2f9 Mon Sep 17 00:00:00 2001 From: zlomzlom <64724986+zlomzlom@users.noreply.github.com> Date: Wed, 24 Dec 2025 11:35:53 +0000 Subject: [PATCH 09/11] Regenerate pot file --- po/aegisub.pot | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/po/aegisub.pot b/po/aegisub.pot index 84d76f91d1..7bebef10e8 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-24 09:57-0100\n" +"POT-Creation-Date: 2025-12-24 10:28-0100\n" "PO-Revision-Date: 2005-2014-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1585,8 +1585,9 @@ msgstr "" msgid "Save keyframes file" msgstr "" -#: ../src/command/keyframe.cpp:97 -msgid "Text files" +#: ../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 @@ -2065,10 +2066,6 @@ msgstr "" msgid "Open a VFR timecodes v1 or v2 file" msgstr "" -#: ../src/command/timecode.cpp:73 ../src/command/timecode.cpp:93 -msgid "Text Files" -msgstr "" - #: ../src/command/timecode.cpp:83 msgid "Save Timecodes File..." msgstr "" From 3f44caffcf1034ad66ac252b1ec98b94ad257040 Mon Sep 17 00:00:00 2001 From: zlomzlom <64724986+zlomzlom@users.noreply.github.com> Date: Fri, 2 Jan 2026 08:16:57 +0000 Subject: [PATCH 10/11] Make titles in file selectors not capitalized Because otherwise they're grabbing translations from STR_DISP --- src/command/audio.cpp | 2 +- src/command/timecode.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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/timecode.cpp b/src/command/timecode.cpp index dbe15135c9..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 { From 3766eb10f5dfba442244a50e117d99cd3da324e5 Mon Sep 17 00:00:00 2001 From: zlomzlom <64724986+zlomzlom@users.noreply.github.com> Date: Fri, 2 Jan 2026 08:17:30 +0000 Subject: [PATCH 11/11] Regenerate pot file --- po/aegisub.pot | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/po/aegisub.pot b/po/aegisub.pot index 7bebef10e8..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-24 10:28-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" @@ -518,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 "" @@ -534,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 "" @@ -2058,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 "" @@ -2066,11 +2070,15 @@ msgstr "" msgid "Open a VFR timecodes v1 or v2 file" msgstr "" +#: ../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 "" @@ -2078,6 +2086,10 @@ 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 ""