Replace AddCatalog() overload with defaulted argument
There is no need to have 2 overloads of this function when we could have just a single one with a default parameter value.
This commit is contained in:
@@ -141,8 +141,8 @@ public:
|
|||||||
|
|
||||||
// add catalog with given domain name and language, looking it up via
|
// add catalog with given domain name and language, looking it up via
|
||||||
// wxTranslationsLoader
|
// wxTranslationsLoader
|
||||||
bool AddCatalog(const wxString& domain);
|
bool AddCatalog(const wxString& domain,
|
||||||
bool AddCatalog(const wxString& domain, wxLanguage msgIdLanguage);
|
wxLanguage msgIdLanguage = wxLANGUAGE_ENGLISH_US);
|
||||||
#if !wxUSE_UNICODE
|
#if !wxUSE_UNICODE
|
||||||
bool AddCatalog(const wxString& domain,
|
bool AddCatalog(const wxString& domain,
|
||||||
wxLanguage msgIdLanguage,
|
wxLanguage msgIdLanguage,
|
||||||
|
@@ -157,21 +157,11 @@ public:
|
|||||||
All loaded catalogs will be used for message lookup by GetString() for
|
All loaded catalogs will be used for message lookup by GetString() for
|
||||||
the current locale.
|
the current locale.
|
||||||
|
|
||||||
In this overload, @c msgid strings are assumed
|
Bu default, i.e. if @a msgIdLanguage is not given, @c msgid strings are assumed
|
||||||
to be in English and written only using 7-bit ASCII characters.
|
to be in English and written only using 7-bit ASCII characters.
|
||||||
If you have to deal with non-English strings or 8-bit characters in the
|
If you have to deal with non-English strings or 8-bit characters in the
|
||||||
source code, see the instructions in @ref overview_nonenglish.
|
source code, see the instructions in @ref overview_nonenglish.
|
||||||
|
|
||||||
@return
|
|
||||||
@true if catalog was successfully loaded, @false otherwise (which might
|
|
||||||
mean that the catalog is not found or that it isn't in the correct format).
|
|
||||||
*/
|
|
||||||
bool AddCatalog(const wxString& domain);
|
|
||||||
|
|
||||||
/**
|
|
||||||
Same as AddCatalog(const wxString&), but takes an additional argument,
|
|
||||||
@a msgIdLanguage.
|
|
||||||
|
|
||||||
@param domain
|
@param domain
|
||||||
The catalog domain to add.
|
The catalog domain to add.
|
||||||
|
|
||||||
@@ -186,7 +176,8 @@ public:
|
|||||||
@true if catalog was successfully loaded, @false otherwise (which might
|
@true if catalog was successfully loaded, @false otherwise (which might
|
||||||
mean that the catalog is not found or that it isn't in the correct format).
|
mean that the catalog is not found or that it isn't in the correct format).
|
||||||
*/
|
*/
|
||||||
bool AddCatalog(const wxString& domain, wxLanguage msgIdLanguage);
|
bool AddCatalog(const wxString& domain,
|
||||||
|
wxLanguage msgIdLanguage = wxLANGUAGE_ENGLISH_US);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Same as AddCatalog(const wxString&, wxLanguage), but takes two
|
Same as AddCatalog(const wxString&, wxLanguage), but takes two
|
||||||
|
@@ -1485,12 +1485,6 @@ bool wxTranslations::AddStdCatalog()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool wxTranslations::AddCatalog(const wxString& domain)
|
|
||||||
{
|
|
||||||
return AddCatalog(domain, wxLANGUAGE_ENGLISH_US);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if !wxUSE_UNICODE
|
#if !wxUSE_UNICODE
|
||||||
bool wxTranslations::AddCatalog(const wxString& domain,
|
bool wxTranslations::AddCatalog(const wxString& domain,
|
||||||
wxLanguage msgIdLanguage,
|
wxLanguage msgIdLanguage,
|
||||||
|
Reference in New Issue
Block a user