[Bf-blender-cvs] [3666ee9] master: More from T47045: Add i18n translations to render status from compo.

Bastien Montagne noreply at git.blender.org
Tue Dec 29 12:43:41 CET 2015


Commit: 3666ee91326323b7599f5283bd3dd9614f495bc5
Author: Bastien Montagne
Date:   Tue Dec 29 12:42:12 2015 +0100
Branches: master
https://developer.blender.org/rB3666ee91326323b7599f5283bd3dd9614f495bc5

More from T47045: Add i18n translations to render status from compo.

Also fix inconsistency for freestyle translation - we use IFACE_ everywhere
(TIP_ may be more suited, but let's be consistent first!).

===================================================================

M	source/blender/compositor/CMakeLists.txt
M	source/blender/compositor/SConscript
M	source/blender/compositor/intern/COM_ExecutionGroup.cpp
M	source/blender/compositor/intern/COM_ExecutionSystem.cpp
M	source/blender/compositor/intern/COM_compositor.cpp
M	source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp

===================================================================

diff --git a/source/blender/compositor/CMakeLists.txt b/source/blender/compositor/CMakeLists.txt
index 972db6b..9ecbab4 100644
--- a/source/blender/compositor/CMakeLists.txt
+++ b/source/blender/compositor/CMakeLists.txt
@@ -30,6 +30,7 @@ set(INC
 	operations
 	../blenkernel
 	../blenlib
+	../blentranslation
 	../imbuf
 	../makesdna
 	../makesrna
@@ -551,6 +552,10 @@ data_to_c(${CMAKE_CURRENT_SOURCE_DIR}/operations/COM_OpenCLKernels.cl
 
 add_definitions(-DCL_USE_DEPRECATED_OPENCL_1_1_APIS)
 
+if(WITH_INTERNATIONAL)
+	add_definitions(-DWITH_INTERNATIONAL)
+endif()
+
 if(WITH_CYCLES AND WITH_CYCLES_DEBUG)
 	add_definitions(-DWITH_CYCLES_DEBUG)
 endif()
diff --git a/source/blender/compositor/SConscript b/source/blender/compositor/SConscript
index b3fe494..ee91c47 100644
--- a/source/blender/compositor/SConscript
+++ b/source/blender/compositor/SConscript
@@ -40,6 +40,7 @@ incs = [
     '#/extern/clew/include',
     '../blenkernel',
     '../blenlib',
+    '../blentranslation',
     '../imbuf',
     '../makesdna',
     '../makesrna',
@@ -59,6 +60,9 @@ incs = [
 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
     incs.append(env['BF_PTHREADS_INC'])
 
+if env['WITH_BF_INTERNATIONAL']:
+    defs.append('WITH_INTERNATIONAL')
+
 if env['WITH_BF_CYCLES'] and env['WITH_BF_CYCLES_DEBUG']:
     defs.append('WITH_CYCLES_DEBUG')
 
diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.cpp b/source/blender/compositor/intern/COM_ExecutionGroup.cpp
index 184c381..e5c2b8a 100644
--- a/source/blender/compositor/intern/COM_ExecutionGroup.cpp
+++ b/source/blender/compositor/intern/COM_ExecutionGroup.cpp
@@ -40,6 +40,7 @@
 #include "MEM_guardedalloc.h"
 #include "BLI_math.h"
 #include "BLI_string.h"
+#include "BLT_translation.h"
 #include "PIL_time.h"
 #include "WM_api.h"
 #include "WM_types.h"
@@ -402,7 +403,7 @@ void ExecutionGroup::finalizeChunkExecution(int chunkNumber, MemoryBuffer **memo
 		this->m_bTree->progress(this->m_bTree->prh, progress);
 
 		char buf[128];
-		BLI_snprintf(buf, sizeof(buf), "Compositing | Tile %u-%u",
+		BLI_snprintf(buf, sizeof(buf), IFACE_("Compositing | Tile %u-%u"),
 		             this->m_chunksFinished,
 		             this->m_numberOfChunks);
 		this->m_bTree->stats_draw(this->m_bTree->sdh, buf);
diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.cpp b/source/blender/compositor/intern/COM_ExecutionSystem.cpp
index 143528e..2b34a5f 100644
--- a/source/blender/compositor/intern/COM_ExecutionSystem.cpp
+++ b/source/blender/compositor/intern/COM_ExecutionSystem.cpp
@@ -28,6 +28,8 @@ extern "C" {
 #include "BKE_node.h"
 }
 
+#include "BLT_translation.h"
+
 #include "COM_Converter.h"
 #include "COM_NodeOperationBuilder.h"
 #include "COM_NodeOperation.h"
@@ -76,7 +78,7 @@ ExecutionSystem::ExecutionSystem(RenderData *rd, Scene *scene, bNodeTree *editin
 	                         viewer_border->xmin < viewer_border->xmax &&
 	                         viewer_border->ymin < viewer_border->ymax;
 
-	editingtree->stats_draw(editingtree->sdh, "Compositing | Determining resolution");
+	editingtree->stats_draw(editingtree->sdh, IFACE_("Compositing | Determining resolution"));
 
 	for (index = 0; index < this->m_groups.size(); index++) {
 		resolution[0] = 0;
@@ -127,7 +129,7 @@ void ExecutionSystem::set_operations(const Operations &operations, const Groups
 void ExecutionSystem::execute()
 {
 	const bNodeTree *editingtree = this->m_context.getbNodeTree();
-	editingtree->stats_draw(editingtree->sdh, (char *)"Compositing | Initializing execution");
+	editingtree->stats_draw(editingtree->sdh, IFACE_("Compositing | Initializing execution"));
 
 	DebugInfo::execute_started(this);
 	
@@ -183,7 +185,7 @@ void ExecutionSystem::execute()
 	WorkScheduler::finish();
 	WorkScheduler::stop();
 
-	editingtree->stats_draw(editingtree->sdh, (char *)"Compositing | Deinitializing execution");
+	editingtree->stats_draw(editingtree->sdh, IFACE_("Compositing | Deinitializing execution"));
 	for (index = 0; index < this->m_operations.size(); index++) {
 		NodeOperation *operation = this->m_operations[index];
 		operation->deinitExecution();
diff --git a/source/blender/compositor/intern/COM_compositor.cpp b/source/blender/compositor/intern/COM_compositor.cpp
index 397540e..d41bc96 100644
--- a/source/blender/compositor/intern/COM_compositor.cpp
+++ b/source/blender/compositor/intern/COM_compositor.cpp
@@ -25,6 +25,9 @@ extern "C" {
 #include "BKE_node.h"
 #include "BLI_threads.h"
 }
+
+#include "BLT_translation.h"
+
 #include "BKE_scene.h"
 
 #include "COM_compositor.h"
@@ -76,7 +79,7 @@ void COM_execute(RenderData *rd, Scene *scene, bNodeTree *editingtree, int rende
 
 	/* set progress bar to 0% and status to init compositing */
 	editingtree->progress(editingtree->prh, 0.0);
-	editingtree->stats_draw(editingtree->sdh, (char *)"Compositing");
+	editingtree->stats_draw(editingtree->sdh, IFACE_("Compositing"));
 
 	bool twopass = (editingtree->flag & NTREE_TWO_PASS) > 0 && !rendering;
 	/* initialize execution system */
diff --git a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
index 85c654e..dc88f69 100644
--- a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
+++ b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
@@ -286,7 +286,7 @@ static bool test_edge_type_conditions(struct edge_type_condition *conditions,
 static void prepare(Render *re, SceneRenderLayer *srl)
 {
 	// load mesh
-	re->i.infostr = TIP_("Freestyle: Mesh loading");
+	re->i.infostr = IFACE_("Freestyle: Mesh loading");
 	re->stats_draw(re->sdh, &re->i);
 	re->i.infostr = NULL;
 	if (controller->LoadMesh(re, srl)) // returns if scene cannot be loaded or if empty
@@ -469,7 +469,7 @@ static void prepare(Render *re, SceneRenderLayer *srl)
 		return;
 
 	// compute view map
-	re->i.infostr = TIP_("Freestyle: View map creation");
+	re->i.infostr = IFACE_("Freestyle: View map creation");
 	re->stats_draw(re->sdh, &re->i);
 	re->i.infostr = NULL;
 	controller->ComputeViewMap();
@@ -624,7 +624,7 @@ Render *FRS_do_stroke_rendering(Render *re, SceneRenderLayer *srl, int render)
 		// render and composite Freestyle result
 		if (controller->_ViewMap) {
 			// render strokes
-			re->i.infostr = TIP_("Freestyle: Stroke rendering");
+			re->i.infostr = IFACE_("Freestyle: Stroke rendering");
 			re->stats_draw(re->sdh, &re->i);
 			re->i.infostr = NULL;
 			g_freestyle.scene = re->scene;




More information about the Bf-blender-cvs mailing list