Another fix for r54414 (cleaner to "import" pgettext once at top of files, also now using usual '_' shortcut).

This commit is contained in:
Bastien Montagne
2013-02-10 09:09:26 +00:00
parent 5d4df1a999
commit c0fa16f2c9
10 changed files with 38 additions and 35 deletions

View File

@@ -20,6 +20,8 @@
import bpy
from bpy.types import Header, Menu, Panel
_ = bpy.app.translations.pgettext
class TEXT_HT_header(Header):
bl_space_type = 'TEXT_EDITOR'
@@ -71,9 +73,8 @@ class TEXT_HT_header(Header):
row = layout.row()
if text.filepath:
pgettext = bpy.app.translations.pgettext
if text.is_dirty:
row.label(text=pgettext("File: *%r (unsaved)") %
row.label(text=_("File: *%r (unsaved)") %
text.filepath, translate=False)
else:
row.label(text=pgettext("File: %r") %