summaryrefslogtreecommitdiffstats
path: root/core/object.h
diff options
context:
space:
mode:
authorSkyJJ <jjchai01@hotmail.com>2020-07-16 10:52:06 +0200
committerSkyJJ <jjchai01@hotmail.com>2020-08-19 03:01:51 +0200
commitc0d837a2ea9ca888f673485c4b9d8d9ae1936375 (patch)
treecf83368d74441ebc422952e60eafdc92fce2f203 /core/object.h
parentf568cede8d8a4a3f7051afd2ae8502deb09bc157 (diff)
downloadredot-engine-c0d837a2ea9ca888f673485c4b9d8d9ae1936375.tar.gz
Added plurals and context support to Translation
Diffstat (limited to 'core/object.h')
-rw-r--r--core/object.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/object.h b/core/object.h
index d9847d10aa..b4e6fe0fa6 100644
--- a/core/object.h
+++ b/core/object.h
@@ -719,7 +719,9 @@ public:
virtual void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const;
- StringName tr(const StringName &p_message) const; // translate message (internationalization)
+ StringName tr(const StringName &p_message, const StringName &p_context = "") const; // translate message (internationalization)
+ ////I'm returning as String here because when I test the API, if I return StringName, I need to wrap it with String() to use format string, which is inconvenient.
+ String tr_n(const StringName &p_message, const StringName &p_message_plural, int p_n, const StringName &p_context = "") const;
bool _is_queued_for_deletion = false; // set to true by SceneTree::queue_delete()
bool is_queued_for_deletion() const;