You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
i18n: Fix extract.py support for new TTRC
Also make compatible with Python 3.
This commit is contained in:
@@ -415,16 +415,16 @@ _FORCE_INLINE_ bool is_str_less(const L *l_ptr, const R *r_ptr) {
|
|||||||
|
|
||||||
//gets parsed
|
//gets parsed
|
||||||
String TTR(const String &);
|
String TTR(const String &);
|
||||||
//use for c strings
|
//use for C strings
|
||||||
#define TTRC(m_value) m_value
|
#define TTRC(m_value) (m_value)
|
||||||
//use to avoid parsing (for use later with C strings)
|
//use to avoid parsing (for use later with C strings)
|
||||||
#define TTRGET(m_value) TTR(m_value)
|
#define TTRGET(m_value) TTR(m_value)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define TTR(m_val) (String())
|
#define TTR(m_value) (String())
|
||||||
#define TTRCDEF(m_value) (m_value)
|
|
||||||
#define TTRC(m_value) (m_value)
|
#define TTRC(m_value) (m_value)
|
||||||
|
#define TTRGET(m_value) (m_value)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -6385,7 +6385,7 @@ EditorNode::EditorNode() {
|
|||||||
execute_outputs = memnew(RichTextLabel);
|
execute_outputs = memnew(RichTextLabel);
|
||||||
execute_output_dialog = memnew(AcceptDialog);
|
execute_output_dialog = memnew(AcceptDialog);
|
||||||
execute_output_dialog->add_child(execute_outputs);
|
execute_output_dialog->add_child(execute_outputs);
|
||||||
execute_output_dialog->set_title(TTR(""));
|
execute_output_dialog->set_title("");
|
||||||
gui_base->add_child(execute_output_dialog);
|
gui_base->add_child(execute_output_dialog);
|
||||||
|
|
||||||
EditorFileSystem::get_singleton()->connect("sources_changed", this, "_sources_changed");
|
EditorFileSystem::get_singleton()->connect("sources_changed", this, "_sources_changed");
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ LANGS = $(POFILES:%.po=%)
|
|||||||
all: update merge
|
all: update merge
|
||||||
|
|
||||||
update:
|
update:
|
||||||
@cd ../..; python2 editor/translations/extract.py
|
@cd ../..; python3 editor/translations/extract.py
|
||||||
|
|
||||||
merge:
|
merge:
|
||||||
@for po in $(POFILES); do \
|
@for po in $(POFILES); do \
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ def process_file(f, fname):
|
|||||||
idx += 1
|
idx += 1
|
||||||
pos = 0
|
pos = 0
|
||||||
continue
|
continue
|
||||||
pos += 5
|
pos += len(patterns[idx])
|
||||||
|
|
||||||
msg = ""
|
msg = ""
|
||||||
while (pos < len(l) and (l[pos] != '"' or l[pos - 1] == '\\')):
|
while (pos < len(l) and (l[pos] != '"' or l[pos - 1] == '\\')):
|
||||||
@@ -101,10 +101,10 @@ def process_file(f, fname):
|
|||||||
print("Updating the editor.pot template...")
|
print("Updating the editor.pot template...")
|
||||||
|
|
||||||
for fname in matches:
|
for fname in matches:
|
||||||
with open(fname, "rb") as f:
|
with open(fname, "r") as f:
|
||||||
process_file(f, fname)
|
process_file(f, fname)
|
||||||
|
|
||||||
with open("editor.pot", "wb") as f:
|
with open("editor.pot", "w") as f:
|
||||||
f.write(main_po)
|
f.write(main_po)
|
||||||
|
|
||||||
if (os.name == "posix"):
|
if (os.name == "posix"):
|
||||||
|
|||||||
Reference in New Issue
Block a user