[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Wed, 25 Oct 2023 17:27:02 -0400 (EDT) |
branch: master
commit df5168d58b2697321b5be2aca2007d9ae76a9ee3
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Wed Oct 25 23:25:16 2023 +0200
* tp/Texinfo/XS/main/translations.c: add missing includes.
---
ChangeLog | 8 ++++++--
tp/Texinfo/XS/main/translations.c | 14 +++++++++-----
2 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index dfff655341..71ee03feb1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2023-10-25 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/main/translations.c: add missing includes.
+
2023-10-25 Gavin Smith <gavinsmith0123@gmail.com>
Use enum symbols for end-of-sentence status
@@ -52,7 +56,7 @@
Use "%s" to print a string with fprintf in case the string contains
conversion specifications.
-2023-10-26 Patrice Dumas <pertusus@free.fr>
+2023-10-25 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Config.pm (register_XS_document_main_configuration):
rename Texinfo::Config set_document_main_configuration as
@@ -71,7 +75,7 @@
* tp/Texinfo/XS/structuring_transfo/StructuringTransfo.xs: minonr
change in syntax.
-2023-10-26 Patrice Dumas <pertusus@free.fr>
+2023-10-25 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Common.pm (import, copy_treeNonXS, copy_contentsNonXS),
tp/Texinfo/Structuring.pm (import),
diff --git a/tp/Texinfo/XS/main/translations.c
b/tp/Texinfo/XS/main/translations.c
index b3b185c6ac..32723a95db 100644
--- a/tp/Texinfo/XS/main/translations.c
+++ b/tp/Texinfo/XS/main/translations.c
@@ -28,12 +28,15 @@
#include <libintl.h>
#endif
-#include "api.h"
+#include "options_types.h"
+#include "tree_types.h"
+#include "command_ids.h"
+#include "text.h"
#include "utils.h"
#include "tree.h"
-#include "text.h"
#include "errors.h"
#include "debug.h"
+#include "api.h"
#include "document.h"
#include "convert_to_texinfo.h"
#include "translations.h"
@@ -160,9 +163,9 @@ translate_string (OPTIONS *options, char * string,
if ((!lang) && options && options->documentlanguage)
lang = options->documentlanguage;
-
if (!lang)
lang = "en";
+
if (strlen (lang) == 0)
{
fprintf (stderr, "For string '%s'\n", string);
@@ -320,8 +323,9 @@ translate_string (OPTIONS *options, char * string,
translated_string = strdup (gettext (string));
/*
- fprintf (stderr, "TRANSLATED(%s): '%s' '%s'\n", language_locales.text,
- string, translated_string);
+ fprintf (stderr, "TRANSLATED(%s): '%s' (%s) '%s'\n", language_locales.text,
+ string, translation_context, translated_string);
+
*/
if (saved_LANGUAGE)