From 20652ce40ef1d33a21a80a70d08c7deff348d665 Mon Sep 17 00:00:00 2001 From: Damien Picard Date: Sun, 28 Aug 2022 14:55:23 +0200 Subject: Sun Position: fix translations --- sun_position/properties.py | 1 + sun_position/translations.py | 37 ++++++++++++++++++++++++++++++++++--- sun_position/ui_sun.py | 8 ++++---- 3 files changed, 39 insertions(+), 7 deletions(-) diff --git a/sun_position/properties.py b/sun_position/properties.py index ac791d43..af2734a4 100644 --- a/sun_position/properties.py +++ b/sun_position/properties.py @@ -174,6 +174,7 @@ class SunPosProperties(PropertyGroup): update=sun_update) bind_to_sun: BoolProperty( + name="Bind Texture to Sun", description="If true, Environment texture moves with sun", default=False, update=sun_update) diff --git a/sun_position/translations.py b/sun_position/translations.py index 173c8366..c50b797c 100644 --- a/sun_position/translations.py +++ b/sun_position/translations.py @@ -105,7 +105,8 @@ translations_tuple = ( ), (("*", "Sun Position"), (("bpy.types.Scene.sun_pos_properties", - "bpy.types.SUNPOS_PT_Panel"), + "bpy.types.SUNPOS_PT_Panel", + "Add-on Sun Position info: name"), ()), ("fr_FR", "Position du Soleil", (False, ())), @@ -122,6 +123,12 @@ translations_tuple = ( ("fr_FR", "Préréglages de position du Soleil", (False, ())), ), + (("Operator", "Sync Sun to Texture"), + (("bpy.types.WORLD_OT_sunpos_show_hdr",), + ()), + ("fr_FR", "Synchroniser Soleil et texture", + (False, ())), + ), (("*", "UTC zone"), (("bpy.types.SunPosProperties.UTC_zone",), ()), @@ -134,6 +141,13 @@ translations_tuple = ( ("fr_FR", "Fuseau horaire : différence avec Greenwich, Angleterre, en heures", (False, ())), ), + (("*", "Bind Texture to Sun"), + (("bpy.types.SunPosProperties.bind_to_sun", + "scripts/addons/sun_position/ui_sun.py:119"), + ()), + ("fr_FR", "Lier la texture au Soleil", + (False, ())), + ), (("*", "If true, Environment texture moves with sun"), (("bpy.types.SunPosProperties.bind_to_sun",), ()), @@ -185,7 +199,6 @@ translations_tuple = ( (("*", "Name of texture to use. World nodes must be enabled and color set to Environment Texture"), (("bpy.types.SunPosProperties.hdr_texture",), ()), - # TODO ("fr_FR", "Nom de la texture à utiliser. Les nœuds de shader du monde doivent être activés, et la couleur utiliser une texture d’environnement", (False, ())), ), @@ -377,7 +390,7 @@ translations_tuple = ( (False, ())), ), (("*", "Show options or labels:"), - (("scripts/addons/sun_position/properties.py:241",), + (("scripts/addons/sun_position/properties.py:242",), ()), ("fr_FR", "Afficher les options et étiquettes :", (False, ())), @@ -419,6 +432,12 @@ translations_tuple = ( ("fr_FR", "Veuillez sélectionner le monde dans le panneau Monde", (False, ())), ), + (("*", "Release binding"), + (("scripts/addons/sun_position/ui_sun.py:116",), + ()), + ("fr_FR", "Annuler le lien", + (False, ())), + ), (("*", "Azimuth:"), (("scripts/addons/sun_position/ui_sun.py:205",), ()), @@ -450,6 +469,18 @@ translations_tuple = ( ("fr_FR", "Veuillez activer Utiliser nœuds dans le panneau Monde", (False, ())), ), + (("*", "World > Sun Position"), + (("Add-on Sun Position info: location",), + ()), + ("fr_FR", "Monde > Position du Soleil", + (False, ())), + ), + (("*", "Show sun position with objects and/or sky texture"), + (("Add-on Sun Position info: description",), + ()), + ("fr_FR", "Afficher la position du Soleil avec des objets ou une texture de ciel", + (False, ())), + ), ) translations_dict = {} diff --git a/sun_position/ui_sun.py b/sun_position/ui_sun.py index 05f0dcab..c6eebc33 100644 --- a/sun_position/ui_sun.py +++ b/sun_position/ui_sun.py @@ -112,11 +112,11 @@ class SUNPOS_PT_Panel(bpy.types.Panel): col = flow.column(align=True) if sp.bind_to_sun: - prop_text="Release binding" + col.prop(sp, "bind_to_sun", toggle=True, icon="CONSTRAINT", + text="Release binding") else: - prop_text="Bind Texture to Sun " - col.prop(sp, "bind_to_sun", toggle=True, icon="CONSTRAINT", - text=prop_text) + col.prop(sp, "bind_to_sun", toggle=True, icon="CONSTRAINT", + text="Bind Texture to Sun") row = col.row(align=True) row.enabled = not sp.bind_to_sun -- cgit v1.2.3