Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2013-02-09 22:26:40 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2013-02-09 22:26:40 +0400
commit82c86af7f7b37e940748e99efe3b19fd5b92d6ca (patch)
tree76699950d46a3084077ed71f3a95c2169d36d761 /release/scripts/startup/bl_ui/space_text.py
parent1083a069004490b0ed8679679adb2a7ea881ba62 (diff)
Bunch of fixes for py ui messages (all those using 'formating' were not translated previously, now they use bpy.app.translations.pgettext). Also pleas avoid complex py statements in 'text' values (like 'text="foo" if cond else "bar"'), thes make message extraction script fails!
And another "final point in UI message" removal!
Diffstat (limited to 'release/scripts/startup/bl_ui/space_text.py')
-rw-r--r--release/scripts/startup/bl_ui/space_text.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/release/scripts/startup/bl_ui/space_text.py b/release/scripts/startup/bl_ui/space_text.py
index 65ec945c7da..d976475c29e 100644
--- a/release/scripts/startup/bl_ui/space_text.py
+++ b/release/scripts/startup/bl_ui/space_text.py
@@ -71,16 +71,15 @@ class TEXT_HT_header(Header):
row = layout.row()
if text.filepath:
+ pgettext = bpy.app.translations.pgettext
if text.is_dirty:
- row.label(text="File" + ": *%r " %
- text.filepath + "(unsaved)")
+ row.label(text=pgettext("File: *%r (unsaved)") % text.filepath, translate=False)
else:
- row.label(text="File" + ": %r" %
- text.filepath)
+ row.label(text=pgettext("File: %r") % text.filepath, translate=False)
+ elif text.library:
+ row.label(text="Text: External")
else:
- row.label(text="Text: External"
- if text.library
- else "Text: Internal")
+ row.label(text="Text: Internal")
class TEXT_PT_properties(Panel):