From 5d7e003b29cf9b57168e459469e13468a49c3da6 Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Tue, 27 Dec 2022 10:58:01 +0800 Subject: Prepare for moving editor and classref translations to godot-editor-l10n repo - Separate editor interface and property translations. - Add property translation in TranslationServer. - The split and merge of the POT/PO/Makefiles and extract scripts is done directly in godot-editor-l10n, the files will be removed in the next commit. - Remove the hardcoded "to_include" lists from the SCsub, we'll only commit the files which are ready to inclue. --- editor/SCsub | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'editor/SCsub') diff --git a/editor/SCsub b/editor/SCsub index 32ad88add5..dddec55ed6 100644 --- a/editor/SCsub +++ b/editor/SCsub @@ -75,10 +75,7 @@ if env.editor_build: # Generated with `make include-list` for each resource. # Editor translations - to_include = ( - "ar,bg,ca,cs,de,el,eo,es_AR,es,fi,fr,gl,he,hu,id,it,ja,ko,lv,ms,nb,nl,pl,pt_BR,pt,ro,ru,sk,sv,th,tr,uk,vi,zh_CN,zh_TW" - ).split(",") - tlist = [env.Dir("#editor/translations").abspath + "/" + f + ".po" for f in to_include] + tlist = glob.glob(env.Dir("#editor/translations/editor").abspath + "/*.po") env.Depends("#editor/editor_translations.gen.h", tlist) env.CommandNoCache( "#editor/editor_translations.gen.h", @@ -86,9 +83,17 @@ if env.editor_build: env.Run(editor_builders.make_editor_translations_header, "Generating editor translations header."), ) + # Property translations + tlist = glob.glob(env.Dir("#editor/translations/properties").abspath + "/*.po") + env.Depends("#editor/property_translations.gen.h", tlist) + env.CommandNoCache( + "#editor/property_translations.gen.h", + tlist, + env.Run(editor_builders.make_property_translations_header, "Generating property translations header."), + ) + # Documentation translations - to_include = "de,es,fr,ja,zh_CN".split(",") - tlist = [env.Dir("#doc/translations").abspath + "/" + f + ".po" for f in to_include] + tlist = glob.glob(env.Dir("#doc/translations").abspath + "/*.po") env.Depends("#editor/doc_translations.gen.h", tlist) env.CommandNoCache( "#editor/doc_translations.gen.h", -- cgit v1.2.3