mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 10:01:15 +00:00
i18n: Make VisualScript node caption & text translatable
This commit is contained in:
parent
822728220b
commit
9b373642a5
5 changed files with 74 additions and 64 deletions
|
|
@ -68,7 +68,7 @@ PropertyInfo VisualScriptYield::get_output_value_port_info(int p_idx) const {
|
|||
}
|
||||
|
||||
String VisualScriptYield::get_caption() const {
|
||||
return yield_mode == YIELD_RETURN ? "Yield" : "Wait";
|
||||
return yield_mode == YIELD_RETURN ? TTR("Yield") : TTR("Wait");
|
||||
}
|
||||
|
||||
String VisualScriptYield::get_text() const {
|
||||
|
|
@ -77,13 +77,13 @@ String VisualScriptYield::get_text() const {
|
|||
return "";
|
||||
break;
|
||||
case YIELD_FRAME:
|
||||
return "Next Frame";
|
||||
return TTR("Next Frame");
|
||||
break;
|
||||
case YIELD_PHYSICS_FRAME:
|
||||
return "Next Physics Frame";
|
||||
return TTR("Next Physics Frame");
|
||||
break;
|
||||
case YIELD_WAIT:
|
||||
return rtos(wait_time) + " sec(s)";
|
||||
return vformat(TTR("%s sec(s)"), rtos(wait_time));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -336,12 +336,12 @@ PropertyInfo VisualScriptYieldSignal::get_output_value_port_info(int p_idx) cons
|
|||
|
||||
String VisualScriptYieldSignal::get_caption() const {
|
||||
static const char *cname[3] = {
|
||||
"WaitSignal",
|
||||
"WaitNodeSignal",
|
||||
"WaitInstanceSigna;",
|
||||
TTRC("WaitSignal"),
|
||||
TTRC("WaitNodeSignal"),
|
||||
TTRC("WaitInstanceSignal"),
|
||||
};
|
||||
|
||||
return cname[call_mode];
|
||||
return TTRGET(cname[call_mode]);
|
||||
}
|
||||
|
||||
String VisualScriptYieldSignal::get_text() const {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue