fix a small bug , and update language-packs
authorXiao Xiangquan <xiaoxiangquan@gmail.com>
Tue, 16 Aug 2011 16:58:35 +0000 (16:58 +0000)
committerXiao Xiangquan <xiaoxiangquan@gmail.com>
Tue, 16 Aug 2011 16:58:35 +0000 (16:58 +0000)
po/POTFILES.in
release/scripts/modules/rna_prop_ui.py
release/scripts/startup/bl_operators/wm.py
source/blender/blenfont/BLF_api.h
source/blender/blenfont/intern/blf.c
source/blender/windowmanager/intern/wm_files.c

index 78930165ec8635b49f6e1caed87f2562751b88db..833d53ca79ddc2b33f95333515ae0561fb37b173 100755 (executable)
@@ -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
index 388ae2b0e131f7e5a4c37984f5f17de02a2fa25c..2d779f2ddda4ee624b24cf460939e61eb0e87965 100644 (file)
@@ -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
index 4d0c143eab5524bec03815eb4894b4dc51b9489d..f63fc50b254f8a93dbf47b2beb69d2ec60033b45 100644 (file)
@@ -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
index 6f6003fa6701052e1e01d149003378c6c4e68aa0..a324d983bb42764f521885a736b0e64fa62f8eb5 100644 (file)
@@ -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);
index 82094fdecdd5b5de7bde3d788998fbceda2ba5ff..52597a282ebcab12dd723f79816bd60aedf307f5 100644 (file)
 #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)
index ce959a7e8706b01b7e9e1c8175c60c2d60f6b8fa..4c1f44eedc4348fc09fcb34ea18d323e4c77b27b 100644 (file)
@@ -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