Node Wrangler: do not add reroutes to unavailable outputs
[blender-addons.git] / ui_translate / __init__.py
blobbddcfb7289b7ee05c5484d0f1add9e63eb0307c0
1 # SPDX-FileCopyrightText: 2012-2023 Blender Foundation
3 # SPDX-License-Identifier: GPL-2.0-or-later
5 bl_info = {
6 "name": "Manage UI translations",
7 "author": "Bastien Montagne",
8 "version": (2, 0, 0),
9 "blender": (4, 0, 0),
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',
16 "category": "System",
20 from . import (
21 settings,
22 edit_translation,
23 update_repo,
24 update_addon,
25 update_ui,
27 if "bpy" in locals():
28 import importlib
29 importlib.reload(settings)
30 importlib.reload(edit_translation)
31 importlib.reload(update_repo)
32 importlib.reload(update_addon)
33 importlib.reload(update_ui)
35 import bpy
38 classes = settings.classes + edit_translation.classes + update_repo.classes + update_addon.classes + update_ui.classes
41 def register():
42 for cls in 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
52 import os
53 if os.path.isfile(pref.persistent_data_path):
54 pref._settings.load(pref.persistent_data_path, reset=True)
57 def unregister():
58 for cls in classes:
59 bpy.utils.unregister_class(cls)
61 del bpy.types.WindowManager.i18n_update_settings