[Bf-blender-cvs] [39fc9aa10db] soc-2020-info-editor: Translation: convert print to clog
Mateusz GrzeliÅski
noreply at git.blender.org
Sat Jul 11 10:43:40 CEST 2020
Commit: 39fc9aa10dbd6ecfd209f500b795a63631fd575d
Author: Mateusz Grzeliński
Date: Fri Jul 10 11:13:03 2020 +0200
Branches: soc-2020-info-editor
https://developer.blender.org/rB39fc9aa10dbd6ecfd209f500b795a63631fd575d
Translation: convert print to clog
For now, I did not add log to msgfmt as it is standalone executable
===================================================================
M source/blender/blentranslation/CMakeLists.txt
M source/blender/blentranslation/intern/blt_lang.c
===================================================================
diff --git a/source/blender/blentranslation/CMakeLists.txt b/source/blender/blentranslation/CMakeLists.txt
index 70e68ca06d7..f65ecaff8f6 100644
--- a/source/blender/blentranslation/CMakeLists.txt
+++ b/source/blender/blentranslation/CMakeLists.txt
@@ -26,6 +26,7 @@ set(INC
../makesdna
../makesrna
../../../intern/guardedalloc
+ ../../../intern/clog
../../../intern/locale
)
diff --git a/source/blender/blentranslation/intern/blt_lang.c b/source/blender/blentranslation/intern/blt_lang.c
index bcbffe56636..f4969cc5e9d 100644
--- a/source/blender/blentranslation/intern/blt_lang.c
+++ b/source/blender/blentranslation/intern/blt_lang.c
@@ -47,6 +47,9 @@
#include "DNA_userdef_types.h"
#include "MEM_guardedalloc.h"
+#include "CLG_log.h"
+
+static CLG_LogRef LOG = {"blt"};
/* Cached IME support flags */
static bool ime_is_lang_supported = false;
@@ -225,7 +228,7 @@ void BLT_lang_init(void)
old_locale = BLI_strdup(old_locale);
if (setlocale(LC_ALL, lang) == NULL) {
setenv("LANG", "C", 1);
- printf("Warning: Falling back to the standard locale (\"C\")\n");
+ CLOG_WARN(&LOG, "Falling back to the standard locale (\"C\")");
}
setlocale(LC_ALL, old_locale);
MEM_freeN(old_locale);
@@ -238,7 +241,7 @@ void BLT_lang_init(void)
fill_locales();
}
else {
- printf("%s: 'locale' data path for translations not found, continuing\n", __func__);
+ CLOG_STR_WARN(&LOG, "'locale' data path for translations not found, continuing");
}
#else
#endif
More information about the Bf-blender-cvs
mailing list