Bug#762266: "(null)" gets displayed instead of date on screen unlocking dialog

Mike Gabriel mike.gabriel at das-netzwerkteam.de
Mon Oct 27 12:29:38 UTC 2014


Control: reassign -1 src:glib-2.0
Control: retitle -1 For locale th_TH, %x gets rendered in en_US fashion
Control: severity -1 important

Hi Nachanon, dear glib-2.0 maintainers,

@Nachanon: thanks for your testing...

@glib-2.0 maintainers: We encountered a bug in mate-screensaver that  
finally might boil down to the way how the GDateTime handles th_TH  
date strings in glib-2.0. Please see below for further explanations  
and possibly review the bug history. THANKS!

@glib-2.0 maintainers: I'm not sure about the severity this bug should  
be set to. I guess, i18n and localization fixes have a high prio by  
the release team, thus settings this to "important". Feel free to  
downgrade if you are of a different opinion.

On  Mo 27 Okt 2014 13:10:19 CET, Nachanon Vetjasit wrote:

> Hello Mike,
>
>> 1.
>> What does (run from the cmdline) give:
>>
>>    $ date +%x
>>
>>    $ date +%X
>
> It seems that %x and %X are printed properly using `date` command in my
> locale settings. (th_TH manner):
>
> $ date +%x
> 27/10/2557
> $ date +%X
> 15:36:56
> $ locale
> LANG=th_TH
> LANGUAGE=
> LC_CTYPE=th_TH
> LC_NUMERIC=th_TH
> LC_TIME=th_TH
> LC_COLLATE=th_TH
> LC_MONETARY=th_TH
> LC_MESSAGES=en_US
> LC_PAPER=th_TH
> LC_NAME=th_TH
> LC_ADDRESS=th_TH
> LC_TELEPHONE=th_TH
> LC_MEASUREMENT=th_TH
> LC_IDENTIFICATION=th_TH
> LC_ALL=
> $
>
> However, this might be more complicated that %x and %X in
> g_date_time_format() seems to works when run in isolated case.
> Nevertheless, %x works in not-so-correct fashion, as it printed
> mm/dd/yy (en_US) rather than dd/mm/yy (th_TH).
>
> I tested with this snippet, which adapted from  
> mate-sceensaver_1.8.0-5~bpo70+1
> source package's `src/gs-lock-plug.c` function `date_time_update`:
>
> #include <glib/gstdio.h>
> #include <glib/gprintf.h>
>
> int main() {
> 	GDateTime *datetime;
> 	gchar *time;
> 	gchar *date;
> 	gchar *str;
>
> 	datetime=g_date_time_new_now_local();
> 	time=g_date_time_format(datetime, "%X");
> 	date=g_date_time_format(datetime, "%x");
>
> 	str = g_strdup_printf("<span size=\"xx-large\"
> weight=\"ultrabold\">%s</span>", time);
> 	g_printf("%s\n",str);
> 	g_free(str);
>
> 	str=g_strdup_printf("<span size=\"large\">%s</span>", date);
> 	g_printf("%s\n",str);
> 	g_free(str);
>
> 	g_free(time);
> 	g_free(date);
> 	g_date_time_unref(datetime);
>
> 	return 0;
> }
>
> Which outputs:
>
> $ ./glibtest
> <span size="xx-large" weight="ultrabold">18:30:11</span>
> <span size="large">10/27/14</span>
> $
>
> Notice that the date is printed in mm/dd/yy (en_US) fashion, even when I run
> it using "LC_ALL=th_TH ./glibtest".
> But the time is in the correct HH:mm:ss 24-hours (th_TH) fashion.
>
> Regards,
> Nachanon

This really smells like this needs to be further processed by the  
maintainers of Debian package glib2.0.

Can you please test with LC_TIME=th_TH and  
LANG=th_TH.<your-common-encoding>, as well, and report back to the bug?

Anyway, reassinging this bug to the glib-2.0 src:package...

Mike

-- 

DAS-NETZWERKTEAM
mike gabriel, herweg 7, 24357 fleckeby
fon: +49 (1520) 1976 148

GnuPG Key ID 0x25771B31
mail: mike.gabriel at das-netzwerkteam.de, http://das-netzwerkteam.de

freeBusy:
https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: Digitale PGP-Signatur
URL: <http://lists.alioth.debian.org/pipermail/pkg-mate-team/attachments/20141027/d229a393/attachment.sig>


More information about the pkg-mate-team mailing list