mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-03 17:35:51 +00:00
Add overloaded translate() that takes CharPointer_UTF8
This commit is contained in:
@@ -150,26 +150,12 @@ LocalisedStrings* LocalisedStrings::getCurrentMappings()
|
|||||||
return currentMappings;
|
return currentMappings;
|
||||||
}
|
}
|
||||||
|
|
||||||
String LocalisedStrings::translateWithCurrentMappings (const String& text)
|
String LocalisedStrings::translateWithCurrentMappings (const String& text) { return beast::translate (text); }
|
||||||
{
|
String LocalisedStrings::translateWithCurrentMappings (const char* text) { return beast::translate (text); }
|
||||||
return beast::translate (text);
|
|
||||||
}
|
|
||||||
|
|
||||||
String LocalisedStrings::translateWithCurrentMappings (const char* text)
|
String translate (const String& text) { return beast::translate (text, text); }
|
||||||
{
|
String translate (const char* text) { return beast::translate (String (text)); }
|
||||||
return beast::translate (String (text));
|
String translate (CharPointer_UTF8 text) { return beast::translate (String (text)); }
|
||||||
}
|
|
||||||
|
|
||||||
String translate (const String& text)
|
|
||||||
{
|
|
||||||
return translate (text, text);
|
|
||||||
}
|
|
||||||
|
|
||||||
String translate (const char* const literal)
|
|
||||||
{
|
|
||||||
const String text (literal);
|
|
||||||
return translate (text, text);
|
|
||||||
}
|
|
||||||
|
|
||||||
String translate (const String& text, const String& resultIfNotFound)
|
String translate (const String& text, const String& resultIfNotFound)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -65,12 +65,12 @@
|
|||||||
printSomething (TRANS("hello"));
|
printSomething (TRANS("hello"));
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
This macro is used in the Beast classes themselves, so your application has a chance to
|
This macro is used in the Juce classes themselves, so your application has a chance to
|
||||||
intercept and translate any internal Beast text strings that might be shown. (You can easily
|
intercept and translate any internal Juce text strings that might be shown. (You can easily
|
||||||
get a list of all the messages by searching for the TRANS() macro in the Beast source
|
get a list of all the messages by searching for the TRANS() macro in the Juce source
|
||||||
code).
|
code).
|
||||||
*/
|
*/
|
||||||
class BEAST_API LocalisedStrings : LeakChecked <LocalisedStrings>
|
class BEAST_API LocalisedStrings : LeakChecked <LocalisedStrings>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
@@ -208,6 +208,11 @@ String translate (const String& stringLiteral);
|
|||||||
*/
|
*/
|
||||||
String translate (const char* stringLiteral);
|
String translate (const char* stringLiteral);
|
||||||
|
|
||||||
|
/** Uses the LocalisedStrings class to translate the given string literal.
|
||||||
|
@see LocalisedStrings
|
||||||
|
*/
|
||||||
|
String translate (CharPointer_UTF8 stringLiteral);
|
||||||
|
|
||||||
/** Uses the LocalisedStrings class to translate the given string literal.
|
/** Uses the LocalisedStrings class to translate the given string literal.
|
||||||
@see LocalisedStrings
|
@see LocalisedStrings
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user