From 82c86af7f7b37e940748e99efe3b19fd5b92d6ca Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Sat, 9 Feb 2013 18:26:40 +0000 Subject: 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! --- release/scripts/startup/bl_ui/space_text.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'release/scripts/startup/bl_ui/space_text.py') 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): -- cgit v1.2.3