[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40653] branches/soc-2011-tomato: Merging r40615 through r40652 from trunk into soc-2011-tomato

Sergey Sharybin g.ulairi at gmail.com
Wed Sep 28 12:45:40 CEST 2011


Revision: 40653
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40653
Author:   nazgul
Date:     2011-09-28 10:45:39 +0000 (Wed, 28 Sep 2011)
Log Message:
-----------
Merging r40615 through r40652 from trunk into soc-2011-tomato

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40615
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40652

Modified Paths:
--------------
    branches/soc-2011-tomato/build_files/scons/tools/Blender.py
    branches/soc-2011-tomato/intern/audaspace/intern/AUD_SequencerReader.cpp
    branches/soc-2011-tomato/po/POTFILES.in
    branches/soc-2011-tomato/po/update_mo.py
    branches/soc-2011-tomato/po/update_po.py
    branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_sequencer.py
    branches/soc-2011-tomato/source/blender/avi/intern/avirgb.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/boids.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/collision.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/constraint.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/displist.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/idcode.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/object.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/pointcache.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/sca.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/sequencer.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/text.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/writeffmpeg.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/BLI_args.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/BLI_dynstr.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/BLI_kdopbvh.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/bpath.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/math_base.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/path_util.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/storage.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/string.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/threads.c
    branches/soc-2011-tomato/source/blender/blenloader/intern/readblenentry.c
    branches/soc-2011-tomato/source/blender/collada/AnimationImporter.cpp
    branches/soc-2011-tomato/source/blender/collada/AnimationImporter.h
    branches/soc-2011-tomato/source/blender/editors/curve/editcurve.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_handlers.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_icons.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_regions.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_style.c
    branches/soc-2011-tomato/source/blender/editors/mesh/mesh_navmesh.c
    branches/soc-2011-tomato/source/blender/editors/object/object_bake.c
    branches/soc-2011-tomato/source/blender/editors/object/object_vgroup.c
    branches/soc-2011-tomato/source/blender/editors/physics/physics_fluid.c
    branches/soc-2011-tomato/source/blender/editors/screen/glutil.c
    branches/soc-2011-tomato/source/blender/editors/sculpt_paint/paint_image.c
    branches/soc-2011-tomato/source/blender/editors/space_file/filelist.c
    branches/soc-2011-tomato/source/blender/editors/space_logic/logic_window.c
    branches/soc-2011-tomato/source/blender/editors/space_node/node_edit.c
    branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_ops.c
    branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_select.c
    branches/soc-2011-tomato/source/blender/editors/space_view3d/drawobject.c
    branches/soc-2011-tomato/source/blender/editors/transform/transform_conversions.c
    branches/soc-2011-tomato/source/blender/editors/transform/transform_generics.c
    branches/soc-2011-tomato/source/blender/editors/transform/transform_input.c
    branches/soc-2011-tomato/source/blender/editors/transform/transform_snap.c
    branches/soc-2011-tomato/source/blender/gpu/intern/gpu_buffers.c
    branches/soc-2011-tomato/source/blender/imbuf/intern/bmp.c
    branches/soc-2011-tomato/source/blender/imbuf/intern/imageprocess.c
    branches/soc-2011-tomato/source/blender/imbuf/intern/indexer_dv.c
    branches/soc-2011-tomato/source/blender/imbuf/intern/jpeg.c
    branches/soc-2011-tomato/source/blender/imbuf/intern/targa.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_access.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_animation.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_define.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_fcurve.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_sequencer.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_text.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_explode.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_weightvg_util.c
    branches/soc-2011-tomato/source/blender/nodes/composite/nodes/node_composite_common.c
    branches/soc-2011-tomato/source/blender/python/generic/py_capi_utils.c
    branches/soc-2011-tomato/source/blender/python/intern/bpy_props.c
    branches/soc-2011-tomato/source/blender/python/intern/bpy_rna.c
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_cursors.c
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_operators.c
    branches/soc-2011-tomato/source/creator/CMakeLists.txt

Added Paths:
-----------
    branches/soc-2011-tomato/po/README.txt

Property Changed:
----------------
    branches/soc-2011-tomato/
    branches/soc-2011-tomato/po/ne.po
    branches/soc-2011-tomato/source/blender/editors/space_outliner/


Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-40614
   + /branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-40652

Modified: branches/soc-2011-tomato/build_files/scons/tools/Blender.py
===================================================================
--- branches/soc-2011-tomato/build_files/scons/tools/Blender.py	2011-09-28 10:05:56 UTC (rev 40652)
+++ branches/soc-2011-tomato/build_files/scons/tools/Blender.py	2011-09-28 10:45:39 UTC (rev 40653)
@@ -565,25 +565,26 @@
     cmd = 'cp %s/%s %s/%s.app/Contents/MacOS/%s'%(builddir, binary,installdir, binary, binary)
     commands.getoutput(cmd)
     cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/'%(installdir, binary, VERSION)
-#    print cmd
     commands.getoutput(cmd)
     cmd = installdir + '/%s.app/Contents/MacOS/%s'%(binary,VERSION)
-    cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/datafiles'%(installdir, binary, VERSION)
-    commands.getoutput(cmd)
-    cmd = 'cp -R %s/release/bin/.blender/locale %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
-    commands.getoutput(cmd)
-    cmd = 'cp -R %s/release/bin/.blender/fonts %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
-    commands.getoutput(cmd)
-    cmd = 'cp %s/release/bin/%s/.Blanguages %s/%s.app/Contents/Resources/'%(bldroot,VERSION,installdir,binary)
-    commands.getoutput(cmd)
+
+    # blenderplayer doesn't need all the files
+    if binary == 'blender':
+        cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/datafiles'%(installdir, binary, VERSION)
+        commands.getoutput(cmd)
+        cmd = 'cp -R %s/release/bin/.blender/locale %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
+        commands.getoutput(cmd)
+        cmd = 'cp -R %s/release/bin/.blender/fonts %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
+        commands.getoutput(cmd)
+        cmd = 'cp %s/release/bin/%s/.Blanguages %s/%s.app/Contents/Resources/'%(bldroot,VERSION,installdir,binary)
+        commands.getoutput(cmd)
+        cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION)
+        commands.getoutput(cmd)
+
     if env['WITH_OSX_STATICPYTHON']:
         cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/python/'%(installdir,binary, VERSION)
         commands.getoutput(cmd)
         cmd = 'unzip -q %s/release/%s -d %s/%s.app/Contents/MacOS/%s/python/'%(libdir,python_zip,installdir,binary,VERSION)
-        commands.getoutput(cmd) 
-
-    if binary == 'blender':#not copy everything for blenderplayer
-        cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION)
         commands.getoutput(cmd)
 
     cmd = 'chmod +x  %s/%s.app/Contents/MacOS/%s'%(installdir,binary, binary)

Modified: branches/soc-2011-tomato/intern/audaspace/intern/AUD_SequencerReader.cpp
===================================================================
--- branches/soc-2011-tomato/intern/audaspace/intern/AUD_SequencerReader.cpp	2011-09-28 10:05:56 UTC (rev 40652)
+++ branches/soc-2011-tomato/intern/audaspace/intern/AUD_SequencerReader.cpp	2011-09-28 10:45:39 UTC (rev 40653)
@@ -132,8 +132,14 @@
 
 		while(eit != m_factory->m_entries.end())
 		{
-			handle = new AUD_SequencerHandle(*eit, m_device);
-			handles.push_front(handle);
+			try
+			{
+				handle = new AUD_SequencerHandle(*eit, m_device);
+				handles.push_front(handle);
+			}
+			catch(AUD_Exception&)
+			{
+			}
 			eit++;
 		}
 

Modified: branches/soc-2011-tomato/po/POTFILES.in
===================================================================
--- branches/soc-2011-tomato/po/POTFILES.in	2011-09-28 10:05:56 UTC (rev 40652)
+++ branches/soc-2011-tomato/po/POTFILES.in	2011-09-28 10:45:39 UTC (rev 40653)
@@ -1,6 +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
 release/scripts/startup/bl_operators/object_quick_effects.py

Copied: branches/soc-2011-tomato/po/README.txt (from rev 40652, trunk/blender/po/README.txt)
===================================================================
--- branches/soc-2011-tomato/po/README.txt	                        (rev 0)
+++ branches/soc-2011-tomato/po/README.txt	2011-09-28 10:45:39 UTC (rev 40653)
@@ -0,0 +1,61 @@
+Blender translation HOWTO
+=========================
+
+I'll try briefly explain how translation works and how to update translation files.
+
+1. How it works
+---------------
+
+This folder contains source files for translation system. This source files have
+got .po extension and they've got pretty simple syntax:
+
+msgid "some message id"
+msgstr "translation for this message"
+
+This means when string "some message id" is used as operator name, tooltip, menu
+and so it'll be displayed on the screen as "translation for this message".
+Pretty simple.
+
+This source files are pre-compiled into ../relese/dbin/.blender/locale/<language>/LC_MESSAGES/blender.mo,
+so they aren't getting compiled every time Blender is compiling to same some time and prevent
+failure on systems which doesn't have needed tools for compiling .po files.
+
+2. How to update translations
+-----------------------------
+
+It's also pretty simple. If you can find string you want to translate in <language>.po
+file as msgid, just write correct msgstr string for it. If msgid is marked as fuzzy,
+i.e.
+
+#, fuzzy
+msgid "some message id"
+msgstr "translation for this message"
+
+it means translation used to exist for this message, but message was changed, so translation
+also have to be updated (it's easier to make new translation based on previos translation).
+When translation was updated, remove line with '#, fuzzy' and it'll work.
+
+If there's no message in .po file you want to translate, probably .po file should be updated.
+Use the following steps for this:
+- With newly compiled blender run `blender --background --python update_msg.py` to update
+  messages.txt file (this file contains strings collected automatically from RNA system and
+  python UI scripts)
+- Run update_pot.py script which will update blender.pot file. This file contains all
+  strings which should be transated.
+- Run update_po.py script to merge all .po files with blender.pot (so all .po files
+  will contain all msgid-s declared in blender.pot) or update_po.py <language> to
+  update only needed .po file(s) to save time when you're busy with translation.
+  But before ocmmit all .po files better be updated.
+
+When you've finished with translation, you should re-compile .po file into .mo file.
+It's also pretty simple: just run update_mo.py script to recompile all languages or
+just update_mo.py <language> to re-compile only needed language(s).
+
+NOTE: msgfmt, msgmerge and xgettext tools should be available in your PATH.
+
+This steps to update template, translation files and compile them can be made in "batch" mode
+using GNUMakefile:
+
+make -f GNUMakefile translations
+
+NOTE: Blender has to be compiled using GNUMakefile first.


Property changes on: branches/soc-2011-tomato/po/ne.po
___________________________________________________________________
Deleted: svn:executable
   - *

Modified: branches/soc-2011-tomato/po/update_mo.py
===================================================================
--- branches/soc-2011-tomato/po/update_mo.py	2011-09-28 10:05:56 UTC (rev 40652)
+++ branches/soc-2011-tomato/po/update_mo.py	2011-09-28 10:45:39 UTC (rev 40653)
@@ -25,6 +25,7 @@
 
 import subprocess
 import os
+import sys
 
 CURRENT_DIR = os.path.dirname(__file__)
 SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.join(CURRENT_DIR, "..")))
@@ -33,21 +34,33 @@
 DOMAIN = "blender"
 
 
+def process_po(po):
+    lang = os.path.basename(po)[:-3]
+
+    # show stats
+    cmd = ("msgfmt",
+        "--statistics",
+        os.path.join(CURRENT_DIR, "%s.po" % lang),
+        "-o",
+        os.path.join(LOCALE_DIR, lang, "LC_MESSAGES", "%s.mo" % DOMAIN),
+        )
+
+    print(" ".join(cmd))
+    process = subprocess.Popen(cmd)
+    process.wait()
+
+
 def main():
-    for po in os.listdir(CURRENT_DIR):
-        if po.endswith(".po"):
-            lang = po[:-3]
-            # show stats
-            cmd = ("msgfmt",
-                "--statistics",
-                os.path.join(CURRENT_DIR, "%s.po" % lang),
-                "-o",
-                os.path.join(LOCALE_DIR, lang, "LC_MESSAGES", "%s.mo" % DOMAIN),
-                )
+    if len(sys.argv) > 1:
+        for lang in sys.argv[1:]:
+            po = os.path.join(CURRENT_DIR, lang + '.po')
 
-            print(" ".join(cmd))
-            process = subprocess.Popen(cmd)
-            process.wait()
+            if os.path.exists(po):
+                process_po(po)
+    else:
+        for po in os.listdir(CURRENT_DIR):
+            if po.endswith(".po"):
+                process_po(po)
 
 if __name__ == "__main__":
     print("\n\n *** Running %r *** \n" % __file__)

Modified: branches/soc-2011-tomato/po/update_po.py
===================================================================
--- branches/soc-2011-tomato/po/update_po.py	2011-09-28 10:05:56 UTC (rev 40652)
+++ branches/soc-2011-tomato/po/update_po.py	2011-09-28 10:45:39 UTC (rev 40653)
@@ -25,29 +25,41 @@
 
 import subprocess
 import os
+import sys
 
 CURRENT_DIR = os.path.dirname(__file__)
 DOMAIN = "blender"
 
 
+def process_po(po):
+    lang = os.path.basename(po)[:-3]
+
+    # update po file
+    cmd = ("msgmerge",
+           "--update",
+           "--lang=%s" % lang,
+           os.path.join(CURRENT_DIR, "%s.po" % lang),
+           os.path.join(CURRENT_DIR, "%s.pot" % DOMAIN),
+           )
+
+    print(" ".join(cmd))
+    process = subprocess.Popen(cmd)
+    process.wait()
+
+
 def main():
-    for po in os.listdir(CURRENT_DIR):
-        if po.endswith(".po"):
-            lang = po[:-3]
+    if len(sys.argv) > 1:
+        for lang in sys.argv[1:]:
+            po = os.path.join(CURRENT_DIR, lang + '.po')
 
-            # update po file
-            cmd = ("msgmerge",
-                   "--update",
-                   "--lang=%s" % lang,
-                   os.path.join(CURRENT_DIR, "%s.po" % lang),
-                   os.path.join(CURRENT_DIR, "%s.pot" % DOMAIN),
-                   )

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list