mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-28 23:15:52 +00:00
Add overloaded translate() that takes CharPointer_UTF8
This commit is contained in:
@@ -150,26 +150,12 @@ LocalisedStrings* LocalisedStrings::getCurrentMappings()
|
||||
return currentMappings;
|
||||
}
|
||||
|
||||
String LocalisedStrings::translateWithCurrentMappings (const String& text)
|
||||
{
|
||||
return beast::translate (text);
|
||||
}
|
||||
String LocalisedStrings::translateWithCurrentMappings (const String& text) { return beast::translate (text); }
|
||||
String LocalisedStrings::translateWithCurrentMappings (const char* text) { return beast::translate (text); }
|
||||
|
||||
String LocalisedStrings::translateWithCurrentMappings (const char* 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) { return beast::translate (text, text); }
|
||||
String translate (const char* text) { return beast::translate (String (text)); }
|
||||
String translate (CharPointer_UTF8 text) { return beast::translate (String (text)); }
|
||||
|
||||
String translate (const String& text, const String& resultIfNotFound)
|
||||
{
|
||||
|
||||
@@ -65,12 +65,12 @@
|
||||
printSomething (TRANS("hello"));
|
||||
@endcode
|
||||
|
||||
This macro is used in the Beast classes themselves, so your application has a chance to
|
||||
intercept and translate any internal Beast 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
|
||||
This macro is used in the Juce classes themselves, so your application has a chance to
|
||||
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 Juce source
|
||||
code).
|
||||
*/
|
||||
class BEAST_API LocalisedStrings : LeakChecked <LocalisedStrings>
|
||||
class BEAST_API LocalisedStrings : LeakChecked <LocalisedStrings>
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
@@ -208,6 +208,11 @@ String translate (const String& 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.
|
||||
@see LocalisedStrings
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user