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:
-rwxr-xr-xpo/POTFILES.in2
-rw-r--r--release/scripts/modules/rna_prop_ui.py6
-rw-r--r--release/scripts/startup/bl_operators/wm.py3
-rw-r--r--source/blender/blenfont/BLF_api.h2
-rw-r--r--source/blender/blenfont/intern/blf.c10
-rw-r--r--source/blender/windowmanager/intern/wm_files.c5
6 files changed, 22 insertions, 6 deletions
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 78930165ec8..833d53ca79d 100755
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,3 +1,5 @@
+release/scripts/modules/rna_prop_ui.py
+
release/scripts/startup/bl_operators/animsys_update.py
release/scripts/startup/bl_operators/object.py
release/scripts/startup/bl_operators/object_align.py
diff --git a/release/scripts/modules/rna_prop_ui.py b/release/scripts/modules/rna_prop_ui.py
index 388ae2b0e13..2d779f2ddda 100644
--- a/release/scripts/modules/rna_prop_ui.py
+++ b/release/scripts/modules/rna_prop_ui.py
@@ -19,7 +19,7 @@
# <pep8 compliant>
import bpy
-
+from blf import gettext as _
def rna_idprop_ui_get(item, create=True):
try:
@@ -145,7 +145,7 @@ def draw(layout, context, context_member, property_type, use_edit=True):
if use_edit:
row = split.row(align=True)
- prop = row.operator("wm.properties_edit", text="edit")
+ prop = row.operator("wm.properties_edit", text=_("edit"))
assign_props(prop, val_draw, key)
prop = row.operator("wm.properties_remove", text="", icon='ZOOMOUT')
@@ -157,7 +157,7 @@ class PropertyPanel():
The subclass should have its own poll function
and the variable '_context_path' MUST be set.
"""
- bl_label = "Custom Properties"
+ bl_label = _("Custom Properties")
bl_options = {'DEFAULT_CLOSED'}
@classmethod
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 4d0c143eab5..f63fc50b254 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -798,6 +798,7 @@ class WM_OT_properties_edit(bpy.types.Operator):
'''Internal use (edit a property data_path)'''
bl_idname = "wm.properties_edit"
bl_label = _("Edit Property")
+ __doc__ = _("Internal use (edit a property data_path)")
bl_options = {'REGISTER'} # only because invoke_props_popup requires.
data_path = rna_path
@@ -882,6 +883,7 @@ class WM_OT_properties_add(bpy.types.Operator):
'''Internal use (edit a property data_path)'''
bl_idname = "wm.properties_add"
bl_label = _("Add Property")
+ __doc__ = _("Internal use (edit a property data_path)")
data_path = rna_path
@@ -920,6 +922,7 @@ class WM_OT_properties_remove(bpy.types.Operator):
'''Internal use (edit a property data_path)'''
bl_idname = "wm.properties_remove"
bl_label = _("Remove Property")
+ __doc__ = _("Internal use (edit a property data_path)")
data_path = rna_path
property = rna_property
diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h
index 6f6003fa670..a324d983bb4 100644
--- a/source/blender/blenfont/BLF_api.h
+++ b/source/blender/blenfont/BLF_api.h
@@ -42,7 +42,7 @@ void BLF_exit(void);
void BLF_cache_clear(void);
-char* BLF_gettext(const char *msgid);
+const char* BLF_gettext(const char *msgid);
int BLF_load(const char *name);
int BLF_load_mem(const char *name, unsigned char *mem, int mem_size);
diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c
index 82094fdecdd..52597a282eb 100644
--- a/source/blender/blenfont/intern/blf.c
+++ b/source/blender/blenfont/intern/blf.c
@@ -34,7 +34,11 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+
+#ifdef INTERNATIONAL
#include <libintl.h>
+#endif
+
#include <math.h>
#include <ft2build.h>
@@ -300,11 +304,15 @@ void BLF_enable(int fontid, int option)
font->flags |= option;
}
-char* BLF_gettext(const char *msgid)
+const char* BLF_gettext(const char *msgid)
{
+#ifdef INTERNATIONAL
if( msgid!=NULL && strlen(msgid)>0 )
return gettext( msgid );
return "";
+#else
+ return msgid;
+#endif
}
void BLF_disable(int fontid, int option)
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index ce959a7e870..4c1f44eedc4 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -498,7 +498,10 @@ int WM_read_homefile(bContext *C, ReportList *reports, short from_memory, ListBa
return TRUE;
}
-/* split from the old WM_read_homefile */
+/* split from the old WM_read_homefile, as the locale setting should
+ * be called after loading user preference, while the
+ * WM_read_homefile_proc may need i18n support. So we split them, and
+ * insert locale setting steps */
int WM_read_homefile_proc(bContext *C, ListBase *wmbase)
{
/* prevent buggy files that had G_FILE_RELATIVE_REMAP written out by mistake. Screws up autosaves otherwise