1 # SPDX-FileCopyrightText: 2012-2023 Blender Foundation
3 # SPDX-License-Identifier: GPL-2.0-or-later
6 "name": "Manage UI translations",
7 "author": "Bastien Montagne",
10 "location": "Main \"File\" menu, text editor, any UI control",
11 "description": "Allows managing UI translations directly from Blender "
12 "(update main .po files, update scripts' translations, etc.)",
13 "warning": "Still in development, not all features are fully implemented yet!",
14 "doc_url": "https://developer.blender.org/docs/handbook/translating/translator_guide/",
15 "support": 'OFFICIAL',
29 importlib
.reload(settings
)
30 importlib
.reload(edit_translation
)
31 importlib
.reload(update_repo
)
32 importlib
.reload(update_addon
)
33 importlib
.reload(update_ui
)
38 classes
= settings
.classes
+ edit_translation
.classes
+ update_repo
.classes
+ update_addon
.classes
+ update_ui
.classes
43 bpy
.utils
.register_class(cls
)
45 bpy
.types
.WindowManager
.i18n_update_settings
= \
46 bpy
.props
.PointerProperty(type=update_ui
.I18nUpdateTranslationSettings
)
48 # Init addon's preferences (unfortunately, as we are using an external storage for the properties,
49 # the load/save user preferences process has no effect on them :( ).
50 if __name__
in bpy
.context
.preferences
.addons
:
51 pref
= bpy
.context
.preferences
.addons
[__name__
].preferences
53 if os
.path
.isfile(pref
.persistent_data_path
):
54 pref
._settings
.load(pref
.persistent_data_path
, reset
=True)
59 bpy
.utils
.unregister_class(cls
)
61 del bpy
.types
.WindowManager
.i18n_update_settings