summaryrefslogtreecommitdiffstats
path: root/scene/main/node.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/main/node.h')
-rw-r--r--scene/main/node.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/scene/main/node.h b/scene/main/node.h
index dc65513fca..799478fa35 100644
--- a/scene/main/node.h
+++ b/scene/main/node.h
@@ -255,6 +255,9 @@ private:
mutable bool is_auto_translating = true;
mutable bool is_auto_translate_dirty = true;
+ mutable bool is_translation_domain_inherited = true;
+ mutable bool is_translation_domain_dirty = true;
+
mutable NodePath *path_cache = nullptr;
} data;
@@ -281,6 +284,7 @@ private:
void _propagate_physics_interpolation_reset_requested(bool p_requested);
void _propagate_process_owner(Node *p_owner, int p_pause_notification, int p_enabled_notification);
void _propagate_groups_dirty();
+ void _propagate_translation_domain_dirty();
Array _get_node_and_resource(const NodePath &p_path);
void _duplicate_properties(const Node *p_root, const Node *p_original, Node *p_copy, int p_flags) const;
@@ -735,8 +739,17 @@ public:
AutoTranslateMode get_auto_translate_mode() const;
bool can_auto_translate() const;
- _FORCE_INLINE_ String atr(const String p_message, const StringName p_context = "") const { return can_auto_translate() ? tr(p_message, p_context) : p_message; }
- _FORCE_INLINE_ String atr_n(const String p_message, const StringName &p_message_plural, int p_n, const StringName p_context = "") const { return can_auto_translate() ? tr_n(p_message, p_message_plural, p_n, p_context) : p_message; }
+ virtual StringName get_translation_domain() const override;
+ virtual void set_translation_domain(const StringName &p_domain) override;
+ void set_translation_domain_inherited();
+
+ _FORCE_INLINE_ String atr(const String &p_message, const StringName &p_context = "") const { return can_auto_translate() ? tr(p_message, p_context) : p_message; }
+ _FORCE_INLINE_ String atr_n(const String &p_message, const StringName &p_message_plural, int p_n, const StringName &p_context = "") const {
+ if (can_auto_translate()) {
+ return tr_n(p_message, p_message_plural, p_n, p_context);
+ }
+ return p_n == 1 ? p_message : String(p_message_plural);
+ }
/* THREADING */
@@ -789,6 +802,7 @@ public:
virtual Error connect(const StringName &p_signal, const Callable &p_callable, uint32_t p_flags = 0) override;
virtual void disconnect(const StringName &p_signal, const Callable &p_callable) override;
virtual bool is_connected(const StringName &p_signal, const Callable &p_callable) const override;
+ virtual bool has_connections(const StringName &p_signal) const override;
#endif
Node();
~Node();