diff options
| author | SkyJJ <jjchai01@hotmail.com> | 2020-07-16 10:52:06 +0200 |
|---|---|---|
| committer | SkyJJ <jjchai01@hotmail.com> | 2020-08-19 03:01:51 +0200 |
| commit | c0d837a2ea9ca888f673485c4b9d8d9ae1936375 (patch) | |
| tree | cf83368d74441ebc422952e60eafdc92fce2f203 /core/ustring.h | |
| parent | f568cede8d8a4a3f7051afd2ae8502deb09bc157 (diff) | |
| download | redot-engine-c0d837a2ea9ca888f673485c4b9d8d9ae1936375.tar.gz | |
Added plurals and context support to Translation
Diffstat (limited to 'core/ustring.h')
| -rw-r--r-- | core/ustring.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/ustring.h b/core/ustring.h index d37346fbd6..a82a42c81f 100644 --- a/core/ustring.h +++ b/core/ustring.h @@ -410,8 +410,10 @@ _FORCE_INLINE_ bool is_str_less(const L *l_ptr, const R *r_ptr) { // and doc translate for the class reference (DTR). #ifdef TOOLS_ENABLED // Gets parsed. -String TTR(const String &); -String DTR(const String &); +String TTR(const String &p_text, const String &p_context = ""); +String TTRN(const String &p_text, const String &p_text_plural, int p_n, const String &p_context = ""); +String DTR(const String &p_text, const String &p_context = ""); +String DTRN(const String &p_text, const String &p_text_plural, int p_n, const String &p_context = ""); // Use for C strings. #define TTRC(m_value) (m_value) // Use to avoid parsing (for use later with C strings). @@ -425,7 +427,8 @@ String DTR(const String &); #endif // Runtime translate for the public node API. -String RTR(const String &); +String RTR(const String &p_text, const String &p_context = ""); +String RTRN(const String &p_text, const String &p_text_plural, int p_n, const String &p_context = ""); bool is_symbol(CharType c); bool select_word(const String &p_s, int p_col, int &r_beg, int &r_end); |
