[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: -make gettext compatible
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: -make gettext compatible |
Date: |
Wed, 04 Aug 2021 18:34:27 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new 8a8cb1d2 -make gettext compatible
8a8cb1d2 is described below
commit 8a8cb1d2f988f31325226ed94a0f805eaa47c9ab
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Aug 4 18:34:25 2021 +0200
-make gettext compatible
---
src/json/i18n.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/json/i18n.c b/src/json/i18n.c
index 1d3076e2..f927a71e 100644
--- a/src/json/i18n.c
+++ b/src/json/i18n.c
@@ -80,7 +80,9 @@ TALER_JSON_check_i18n (const json_t *i18n)
if (! json_is_string (member))
return false;
/* Field name must be either of format "en_UK"
- or just "en"; we do not care about capitalization */
+ or just "en"; we do not care about capitalization;
+ for syntax, see GNU Gettext manual, including
+ appendix A for rare language codes. */
switch (strlen (field))
{
case 0:
@@ -107,6 +109,20 @@ TALER_JSON_check_i18n (const json_t *i18n)
if (! isalpha (field[4]))
return false;
break;
+ case 6:
+ if (! isalpha (field[0]))
+ return false;
+ if (! isalpha (field[1]))
+ return false;
+ if ('_' != field[2])
+ return false;
+ if (! isalpha (field[3]))
+ return false;
+ if (! isalpha (field[4]))
+ return false;
+ if (! isalpha (field[5]))
+ return false;
+ break;
default:
return false;
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: -make gettext compatible,
gnunet <=