wxWidgets/version-script.in
Vadim Zeitlin d178223745 Add AddAvailableCatalog() and use it in AddStdCatalog()
The new function only returns true if the catalog could be really
loaded and not if it is considered not to be needed because the message
ID language (which is typically "en-US") happens to be present in the
preferred UI languages list (which seems to always include "en-US" in at
least Western European MSW).

This allows to distinguish, albeit in a rather awkward (but
backwards-compatible) way between having a translation for the given
language and not needed such translation.

It is still not clear if it is really correct to return "en-US" from the
list of preferred languages even if the user has never intentionally
configured the OS to indicate that English is acceptable, but at least
now we can work around this issue and use AddAvailableCatalog() in
AddStdCatalog() to make sure we only skip loading unversioned wxstd.mo
if the versioned wxstd-x.y.mo file is really found instead of never
doing it, as was the case until now (see #23886).

Also add GetBestAvailableTranslation() helper which seems more useful
than the existing GetBestTranslation() one and is similarly related to
it.

See #18227, #23930.

(cherry picked from commit 94b1a17aeb12a1ec723a255089be16cd31a268a2)
2023-10-06 15:42:15 +02:00

64 lines
1.9 KiB
Plaintext

#
# Notes:
#
# Remove all of the tags below except for the last one when creating new
# development branch.
#
# Once a symbol has been included in a stable release of wxWidgets its version
# cannot be changed.
#
# With each new release a section should be added containing any new symbols,
# for example:
#
# # public symbols added in release @WX_VERSION_TAG@.2 (please keep in alphabetical order):
# @WX_VERSION_TAG@.2 {
# extern "C++"
# "wxChoice::GetCurrentSelection()";
# };
# };
#
# If a symbols should have been added in this way, but is forgotten then it
# cannot be added in the next release. This is because it has already been
# released with the generic branch version due to the final wildcard below,
# and once released its version cannot be changed.
# When adding a new section here, don't forget to modify the version in
# build/bakefiles/version.bkl to indicate that new APIs have been added and
# rebake!
# public symbols added in 3.2.3 (please keep in alphabetical order):
@WX_VERSION_TAG@.3 {
extern "C++" {
"wxGLCanvasEGL::CreateWaylandSubsurface";
"wxGLCanvasEGL::DestroyWaylandSubsurface";
"wxTranslations::AddAvailableCatalog";
"wxTranslations::GetBestAvailableTranslation";
"wxUILocale::GetMonthName";
"wxUILocale::GetWeekDayName";
};
};
# public symbols added in 3.2.2 (please keep in alphabetical order):
@WX_VERSION_TAG@.2 {
extern "C++" {
"wxUILocale::GetSystemLocaleId";
"wxWithImages::GetImageLogicalSize";
"wxWithImages::GetImageBitmapFor";
};
};
# public symbols added in 3.2.1
@WX_VERSION_TAG@.1 {
extern "C++" {
"wxApp::GTKAllowDiagnosticsControl()";
"wxFileDialog::AddShortcut(const wxString&, int)";
};
};
# symbols available since the beginning of this branch are only given
# generic branch tag (don't remove this!):
@WX_VERSION_TAG@ {
*;
};