[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS/main/translations.c (translate_st
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/XS/main/translations.c (translate_string): if ENABLE_NLS is not set, remove completly the code calling functions in include fils included only if ENABLE_NLS is set. |
Date: |
Mon, 16 Dec 2024 11:21:41 -0500 |
This is an automated email from the git hooks/post-receive script.
pertusus pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 2adaf2a51f * tp/Texinfo/XS/main/translations.c (translate_string): if
ENABLE_NLS is not set, remove completly the code calling functions in include
fils included only if ENABLE_NLS is set.
2adaf2a51f is described below
commit 2adaf2a51fbda5964f3742a392b5c41c299ec21f
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Mon Dec 16 17:21:34 2024 +0100
* tp/Texinfo/XS/main/translations.c (translate_string): if ENABLE_NLS
is not set, remove completly the code calling functions in include
fils included only if ENABLE_NLS is set.
* tp/Texinfo/XS/main/translations.c
(configure_output_strings_translations): unindent cpp directives for
consistency.
---
ChangeLog | 10 ++++++++++
tp/Texinfo/XS/main/translations.c | 21 +++++++++++----------
2 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c597f028e5..141977ad30 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-12-16 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/main/translations.c (translate_string): if ENABLE_NLS
+ is not set, remove completly the code calling functions in include
+ fils included only if ENABLE_NLS is set.
+
+ * tp/Texinfo/XS/main/translations.c
+ (configure_output_strings_translations): unindent cpp directives for
+ consistency.
+
2024-12-15 Patrice Dumas <pertusus@free.fr>
* tp/texi2any.pl (set_subdir_directories): correct first directory.
diff --git a/tp/Texinfo/XS/main/translations.c
b/tp/Texinfo/XS/main/translations.c
index e538d9dc5c..4a904e1fff 100644
--- a/tp/Texinfo/XS/main/translations.c
+++ b/tp/Texinfo/XS/main/translations.c
@@ -78,14 +78,14 @@ configure_output_strings_translations (const char
*localesdir,
use_external_translate_string = use_external_translate_string_in;
else
{
- #ifndef USE_LIBINTL_PERL_IN_XS
+#ifndef USE_LIBINTL_PERL_IN_XS
use_external_translate_string = 0;
- #else
+#else
use_external_translate_string = 1;
- #endif
+#endif
}
- #ifdef ENABLE_NLS
+#ifdef ENABLE_NLS
textdomain_directory = bindtextdomain (strings_textdomain, localesdir);
if (!textdomain_directory)
@@ -93,7 +93,7 @@ configure_output_strings_translations (const char *localesdir,
fprintf (stderr, "bindtextdomain: error setting %s to `%s': %s\n",
strings_textdomain, localesdir, strerror (errno));
}
- #endif
+#endif
}
void
@@ -211,7 +211,7 @@ translate_string (const char *string, const char *in_lang,
else
return call_translations_translate_string (string, in_lang,
translation_context);
-#endif
+#else
if (use_external_translate_string > 0)
return call_translations_translate_string (string, in_lang,
translation_context);
@@ -232,7 +232,7 @@ translate_string (const char *string, const char *in_lang,
and (b) this could interfere with the LC_CTYPE setting in XSParagraph.
*/
-#ifndef _WIN32
+# ifndef _WIN32
/* In
https://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html
Note: The variable LANGUAGE is ignored if the locale is set to āCā. In
@@ -258,7 +258,7 @@ translate_string (const char *string, const char *in_lang,
switch_messages_locale ();
-#endif
+# endif
saved_LANGUAGE = getenv ("LANGUAGE");
@@ -332,7 +332,7 @@ translate_string (const char *string, const char *in_lang,
free (language_locales.text);
-#ifndef _WIN32
+# ifndef _WIN32
if (saved_LANG)
{
setenv ("LANG", saved_LANG, 1);
@@ -356,11 +356,12 @@ translate_string (const char *string, const char *in_lang,
}
else
setlocale (LC_MESSAGES, "");
-#endif
+# endif
call_sync_locale ();
return translated_string;
+#endif
}
char *
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS/main/translations.c (translate_string): if ENABLE_NLS is not set, remove completly the code calling functions in include fils included only if ENABLE_NLS is set.,
Patrice Dumas <=