[Pkg-wmaker-commits] [wmtime] 06/101: wmtime - update localization

Doug Torrance dtorrance-guest at moszumanska.debian.org
Mon Aug 24 23:59:23 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmtime.

commit a429369a4eb923669f5c6abf0f25c9d918d874d6
Author: Doug Torrance <torrance at vandals.uidaho.edu>
Date:   Sun Oct 13 12:04:04 2013 -0500

    wmtime - update localization
    
    When non-Latin alphabet characters are encountered in weekday and month names, the English defaults are used.  This closes Debian bug #726125.
    
    Also, numbers are now printed when encountered in weekday and month names (e.g., Swahili).
---
 wmtime/wmtime.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/wmtime/wmtime.c b/wmtime/wmtime.c
index 85cfbba..6609b59 100644
--- a/wmtime/wmtime.c
+++ b/wmtime/wmtime.c
@@ -183,6 +183,7 @@ void get_lang(void)
 		do {
 			ret = iconv(icd, &inp, &insize, &outp, &outsize);
 		} while (outsize > 0 && ret > 0);
+		if (strstr(outbuf,"?") != NULL) return;
 		for (outp = outbuf, outsize = 0; *outp != 0 && outsize < 2;
 		    outp++, outsize++)
 			day_of_week[i][outsize] = toupper(*outp);
@@ -195,6 +196,7 @@ void get_lang(void)
 		do {
 			ret = iconv(icd, &inp, &insize, &outp, &outsize);
 		} while (outsize > 0 && ret > 0);
+		if (strstr(outbuf,"?") != NULL) return;
 		for (outp = outbuf, outsize = 0; *outp != 0 && outsize < 3;
 		    outp++, outsize++)
 			mon_of_year[i][outsize] = toupper(*outp);
@@ -413,7 +415,10 @@ void DrawDate(int wkday, int dom, int month) {
 
 	k = 5;
 	for (i=0; i<2; i++) {
-		copyXPMArea((*p-'A')*6, 74, 6, 9, k, 49);
+		if (*p < 'A') 
+			copyXPMArea((*p-'0')*6, 64, 6, 9, k, 49);
+		else
+			copyXPMArea((*p-'A')*6, 74, 6, 9, k, 49);
 		k += 6;
 		p++;
 	}
@@ -426,7 +431,10 @@ void DrawDate(int wkday, int dom, int month) {
 	copyXPMArea(61, 64, 4, 9, k, 49);
 	k += 4;
 	for (i=0; i<3; i++) {
-		copyXPMArea((*p-'A')*6, 74, 6, 9, k, 49);
+		if (*p < 'A') 
+			copyXPMArea((*p-'0')*6, 64, 6, 9, k, 49);
+		else
+			copyXPMArea((*p-'A')*6, 74, 6, 9, k, 49);
 		k += 6;
 		p++;
 	}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmtime.git



More information about the Pkg-wmaker-commits mailing list