summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-03-25 09:10:24 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-03-25 09:10:24 +0200
commit14faad5c70dd50eb9cf235cef4d5ffe4415da67c (patch)
treeb17632b3ebe295bb06d4c088f5e605eb916aa145 /src
parente544bc24b2552d826ee3d732dee59ea90e9b7e5f (diff)
Lang: Fixed plural and multiline strings
IssueID #192
Diffstat (limited to 'src')
-rw-r--r--src/lang.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lang.c b/src/lang.c
index 983ae3c5..5399d97b 100644
--- a/src/lang.c
+++ b/src/lang.c
@@ -71,8 +71,13 @@ static void load_Lang_(iLang *d, const char *id) {
71 while (*++ptr) {} 71 while (*++ptr) {}
72 msg.id.end = ptr; 72 msg.id.end = ptr;
73 msg.str.start = ++ptr; 73 msg.str.start = ++ptr;
74 while (*++ptr) {} 74 if (*ptr) { /* not empty */
75 msg.str.end = ptr; 75 while (*++ptr) {}
76 msg.str.end = ptr;
77 }
78 else {
79 msg.str = msg.id; /* not translated */
80 }
76 /* Allocate the string. The data has already been sorted. */ 81 /* Allocate the string. The data has already been sorted. */
77 printf("ID:%s\n", msg.id.start); 82 printf("ID:%s\n", msg.id.start);
78 pushBack_Array(&d->messages->values, &msg); 83 pushBack_Array(&d->messages->values, &msg);