File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 117117 "zh_TW" : "Godot Engine %s 正體中文 (台灣) 文件" ,
118118}
119119
120+ # RTD normalized their language codes to ll-cc (e.g. zh-cn),
121+ # but Sphinx did not and still uses ll_CC (e.g. zh_CN).
122+ # `language` is the Sphinx configuration so it needs to be converted back.
120123language = os .getenv ("READTHEDOCS_LANGUAGE" , "en" )
124+ if "-" in language :
125+ (lang_name , lang_country ) = language .split ("-" )
126+ language = lang_name + "_" + lang_country .upper ()
127+
121128if not language in supported_languages .keys ():
122129 print ("Unknown language: " + language )
123130 print ("Supported languages: " + ", " .join (supported_languages .keys ()))
127134 language = "en"
128135
129136is_i18n = tags .has ("i18n" ) # noqa: F821
137+ print ("Build language: {}, i18n tag: {}" .format (language , is_i18n ))
130138
131139exclude_patterns = ["_build" ]
132140
You can’t perform that action at this time.
0 commit comments