From 2fe72022e3abdad27c02a3dce0b51803d538a7b4 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 9 Dec 2014 12:51:56 +0000 Subject: [PATCH] Update wxGetTranslation() documentation. Document "i18n" trace mask. Correct warning about [not] using wxT(). See #16714. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78258 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- interface/wx/translation.h | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/interface/wx/translation.h b/interface/wx/translation.h index accfc49c70..3bfbccd2c9 100644 --- a/interface/wx/translation.h +++ b/interface/wx/translation.h @@ -508,22 +508,26 @@ public: /** This function returns the translation of @a string in the current - @c locale(). If the string is not found in any of the loaded message - catalogs (see @ref overview_i18n), the original string is returned. In - debug build, an error message is logged -- this should help to find the - strings which were not yet translated. If @a domain is specified then only - that domain/catalog is searched for a matching string. As this function is - used very often, an alternative (and also common in Unix world) syntax is - provided: the _() macro is defined to do the same thing as - wxGetTranslation(). + @c locale(). + + If the string is not found in any of the loaded message catalogs (see @ref + overview_i18n), the original string is returned. If you enable logging of + trace messages with "i18n" mask (using wxLog::AddTraceMask()) and debug + logging is enabled (see @ref overview_debugging), a message is also logged + in this case -- which helps to find the strings which were not yet + translated. + + If @a domain is specified then only that domain/catalog is searched for a + matching string. As this function is used very often, an alternative (and + also common in Unix world) syntax is provided: the _() macro is defined to + do the same thing as wxGetTranslation(). This function is thread-safe. - @note This function is not suitable for literal strings in Unicode builds - since the literal strings must be enclosed in wxT() macro which makes - them unrecognised by @c xgettext, and so they are not extracted to - the message catalog. Instead, use the _() and wxPLURAL() macro for - all literal strings. + @note This function is not suitable for literal strings using wxT() macro + since this macro is not recognised by @c xgettext, and so such + strings are not extracted to the message catalog. Instead, use the + _() and wxPLURAL() macro for all literal strings. @see wxGetTranslation(const wxString&, const wxString&, unsigned, const wxString&)