Skip to content

Commit

Permalink
Translations: Use wxTranslations::AddStdCatalog for wxWidgets transla…
Browse files Browse the repository at this point in the history
…tions.

Instead of 'guessing', how the wxWidgets message catalogs are called.
  • Loading branch information
daute committed Jan 19, 2025
1 parent d200d33 commit e1477dd
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,13 +310,11 @@ bool MyApp::OnInit() {
}
}
wxTranslations::Get()->AddCatalog(wxS("wxMaxima"));
/* wxWidgets introduced version suffixes to gettext catalogs, see:
* https://github.com/wxWidgets/wxWidgets/commit/ded4da5 */
/* so try to load a catalog with this suffix */
wxTranslations::Get()->AddCatalog("wxstd-"
wxSTRINGIZE(wxMAJOR_VERSION) "."
wxSTRINGIZE(wxMINOR_VERSION));
wxTranslations::Get()->AddCatalog(wxS("wxstd"));
/* Add standard wxWidgets catalogs ("wxstd" and possible port-specific catalogs). */
/* returns false, if no suitable catalog was found, in this case log that. */
if (wxTranslations::Get()->AddStdCatalog() == false) {
wxLogMessage("Translations: no standard wxWidgets catalogs were found");
}
}

bool exitAfterEval = false;
Expand Down

0 comments on commit e1477dd

Please sign in to comment.