diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/space_text.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_text.py | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/release/scripts/startup/bl_ui/space_text.py b/release/scripts/startup/bl_ui/space_text.py index 12e07c19ca1..03baf8f34ca 100644 --- a/release/scripts/startup/bl_ui/space_text.py +++ b/release/scripts/startup/bl_ui/space_text.py @@ -19,6 +19,7 @@ # <pep8-80 compliant> import bpy from bpy.types import Header, Menu, Panel +from blf import gettext as _ class TEXT_HT_header(Header): @@ -66,19 +67,19 @@ class TEXT_HT_header(Header): row = layout.row() if text.filepath: if text.is_dirty: - row.label(text="File: *%r (unsaved)" % text.filepath) + row.label(text=_("File")+": *%r " % text.filepath+_("(unsaved)")) else: - row.label(text="File: %r" % text.filepath) + row.label(text=_("File")+": %r" % text.filepath) else: - row.label(text="Text: External" + row.label(text=_("Text: External") if text.library - else "Text: Internal") + else _("Text: Internal")) class TEXT_PT_properties(Panel): bl_space_type = 'TEXT_EDITOR' bl_region_type = 'UI' - bl_label = "Properties" + bl_label = _("Properties") def draw(self, context): layout = self.layout @@ -109,7 +110,7 @@ class TEXT_PT_properties(Panel): class TEXT_PT_find(Panel): bl_space_type = 'TEXT_EDITOR' bl_region_type = 'UI' - bl_label = "Find" + bl_label = _("Find") def draw(self, context): layout = self.layout @@ -136,12 +137,12 @@ class TEXT_PT_find(Panel): # settings layout.prop(st, "use_match_case") row = layout.row() - row.prop(st, "use_find_wrap", text="Wrap") - row.prop(st, "use_find_all", text="All") + row.prop(st, "use_find_wrap", text=_("Wrap")) + row.prop(st, "use_find_all", text=_("All")) class TEXT_MT_view(Menu): - bl_label = "View" + bl_label = _("View") def draw(self, context): layout = self.layout @@ -156,15 +157,15 @@ class TEXT_MT_view(Menu): layout.separator() layout.operator("text.move", - text="Top of File", + text=_("Top of File"), ).type = 'FILE_TOP' layout.operator("text.move", - text="Bottom of File", + text=_("Bottom of File"), ).type = 'FILE_BOTTOM' class TEXT_MT_text(Menu): - bl_label = "Text" + bl_label = _("Text") def draw(self, context): layout = self.layout @@ -192,7 +193,7 @@ class TEXT_MT_text(Menu): class TEXT_MT_templates(Menu): - bl_label = "Templates" + bl_label = _("Templates") def draw(self, context): self.path_menu(bpy.utils.script_paths("templates"), @@ -202,7 +203,7 @@ class TEXT_MT_templates(Menu): class TEXT_MT_edit_select(Menu): - bl_label = "Select" + bl_label = _("Select") def draw(self, context): layout = self.layout @@ -212,7 +213,7 @@ class TEXT_MT_edit_select(Menu): class TEXT_MT_edit_markers(Menu): - bl_label = "Markers" + bl_label = _("Markers") def draw(self, context): layout = self.layout @@ -223,7 +224,7 @@ class TEXT_MT_edit_markers(Menu): class TEXT_MT_format(Menu): - bl_label = "Format" + bl_label = _("Format") def draw(self, context): layout = self.layout @@ -242,21 +243,21 @@ class TEXT_MT_format(Menu): class TEXT_MT_edit_to3d(Menu): - bl_label = "Text To 3D Object" + bl_label = _("Text To 3D Object") def draw(self, context): layout = self.layout layout.operator("text.to_3d_object", - text="One Object", + text=_("One Object"), ).split_lines = False layout.operator("text.to_3d_object", - text="One Object Per Line", + text=_("One Object Per Line"), ).split_lines = True class TEXT_MT_edit(Menu): - bl_label = "Edit" + bl_label = _("Edit") @classmethod def poll(cls, context): @@ -282,7 +283,7 @@ class TEXT_MT_edit(Menu): layout.separator() layout.operator("text.jump") - layout.operator("text.properties", text="Find...") + layout.operator("text.properties", text=_("Find...")) layout.separator() |