[Bf-blender-cvs] [07726ef1b60] master: Cleanup: move public doc-strings into headers for 'blentranslation'

Campbell Barton noreply at git.blender.org
Wed Dec 8 11:05:40 CET 2021


Commit: 07726ef1b609d4420ad09fb1c7273667c00b1383
Author: Campbell Barton
Date:   Wed Dec 8 17:54:22 2021 +1100
Branches: master
https://developer.blender.org/rB07726ef1b609d4420ad09fb1c7273667c00b1383

Cleanup: move public doc-strings into headers for 'blentranslation'

Ref T92709

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

M	source/blender/blentranslation/BLT_lang.h
M	source/blender/blentranslation/BLT_translation.h
M	source/blender/blentranslation/intern/blt_lang.c

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

diff --git a/source/blender/blentranslation/BLT_lang.h b/source/blender/blentranslation/BLT_lang.h
index dcd4de10416..1a0981613a1 100644
--- a/source/blender/blentranslation/BLT_lang.h
+++ b/source/blender/blentranslation/BLT_lang.h
@@ -46,6 +46,15 @@ const char *BLT_lang_get(void);
  * Non-null elements are always MEM_mallocN'ed, it's the caller's responsibility to free them.
  * NOTE: Always available, even in non-WITH_INTERNATIONAL builds.
  */
+/**
+ * Get locale's elements (if relevant pointer is not NULL and element actually exists, e.g.
+ * if there is no variant,
+ * *variant and *language_variant will always be NULL).
+ * Non-null elements are always MEM_mallocN'ed, it's the caller's responsibility to free them.
+ *
+ * \note Keep that one always available, you never know,
+ * may become useful even in no #WITH_INTERNATIONAL context.
+ */
 void BLT_lang_locale_explode(const char *locale,
                              char **language,
                              char **country,
diff --git a/source/blender/blentranslation/BLT_translation.h b/source/blender/blentranslation/BLT_translation.h
index 341e648443e..21296143226 100644
--- a/source/blender/blentranslation/BLT_translation.h
+++ b/source/blender/blentranslation/BLT_translation.h
@@ -44,6 +44,11 @@ const char *BLT_translate_do_iface(const char *msgctxt, const char *msgid);
 const char *BLT_translate_do_tooltip(const char *msgctxt, const char *msgid);
 const char *BLT_translate_do_new_dataname(const char *msgctxt, const char *msgid);
 
+/**
+ * Note that "lang" here is the _output_ display language. We used to restrict
+ * IME for keyboard _input_ language because our multilingual font was only used
+ * when some output languages were selected. That font is used all the time now.
+ */
 bool BLT_lang_is_ime_supported(void);
 
 /* The "translation-marker" macro. */
diff --git a/source/blender/blentranslation/intern/blt_lang.c b/source/blender/blentranslation/intern/blt_lang.c
index 91e8a81aec0..01f7574bd34 100644
--- a/source/blender/blentranslation/intern/blt_lang.c
+++ b/source/blender/blentranslation/intern/blt_lang.c
@@ -282,7 +282,6 @@ void BLT_lang_set(const char *str)
   IMB_thumb_clear_translations();
 }
 
-/* Get the current locale (short code, e.g. es_ES). */
 const char *BLT_lang_get(void)
 {
 #ifdef WITH_INTERNATIONAL
@@ -303,15 +302,6 @@ const char *BLT_lang_get(void)
 #undef LOCALE
 #undef ULANGUAGE
 
-/**
- * Get locale's elements (if relevant pointer is not NULL and element actually exists, e.g.
- * if there is no variant,
- * *variant and *language_variant will always be NULL).
- * Non-null elements are always MEM_mallocN'ed, it's the caller's responsibility to free them.
- *
- * \note Keep that one always available, you never know,
- * may become useful even in no #WITH_INTERNATIONAL context.
- */
 void BLT_lang_locale_explode(const char *locale,
                              char **language,
                              char **country,
@@ -372,9 +362,6 @@ void BLT_lang_locale_explode(const char *locale,
   }
 }
 
-/* Note that "lang" here is the _output_ display language. We used to restrict
- * IME for keyboard _input_ language because our multilingual font was only used
- * when some output languages were selected. That font is used all the time now. */
 bool BLT_lang_is_ime_supported(void)
 {
 #ifdef WITH_INPUT_IME



More information about the Bf-blender-cvs mailing list