i18n: Add support for translating the class reference
- Parse `.po` files from `doc/translations/*.po` like already done with `editor/translations/*.po`. - Add logic to register a doc translation mapping in `TranslationServer` and `EditorSettings`. - Add `DTR()` to lookup the doc translation mapping (similar to `TTR()`). Strings are automatically dedented and stripped of whitespace to ensure that they would match the translation catalog. - Use `DTR()` to translate relevant strings in `EditorHelp`, `EditorInspector`, `CreateDialog`, `ConnectionsDialog`. - Small simplification to `TranslationLoaderPO`, the path argument was not really meaningful.
This commit is contained in:
@ -37,7 +37,7 @@
|
||||
|
||||
class TranslationLoaderPO : public ResourceFormatLoader {
|
||||
public:
|
||||
static RES load_translation(FileAccess *f, Error *r_error, const String &p_path = String());
|
||||
static RES load_translation(FileAccess *f, Error *r_error = NULL);
|
||||
virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL, bool p_use_sub_threads = false, float *r_progress = nullptr);
|
||||
virtual void get_recognized_extensions(List<String> *p_extensions) const;
|
||||
virtual bool handles_type(const String &p_type) const;
|
||||
|
||||
Reference in New Issue
Block a user