Re: Simple patch for status.c
- From: Marcel Telka <marcel telka sk>
- To: gnome-i18n gnome org
- Cc: carlos gnome-db org
- Subject: Re: Simple patch for status.c
- Date: Thu, 25 Apr 2002 14:36:25 +0200
On Thu, Apr 25, 2002 at 01:09:21PM +0200, Marcel Telka wrote:
> Hi.
>
> Please consider applying attached patch to the status pages generator.
>
> This patch adds number of untranslated messages into separate locale
> status pages for modules w/o .po file (or w/ errors). This kind of
> information on status pages could be usefull for others too (I think).
I see there is slightly invalid "Total" line in locale stats. Here is
second revision of my patch :-).
>
> ... just my 2 cents
>
> Thanks.
--
+-------------------------------------------+
| Marcel Telka e-mail: marcel@telka.sk |
| homepage: http://telka.sk/ |
| jabber: marcel@jabber.sk |
+-------------------------------------------+
--- status.c.orig Thu Apr 25 13:13:20 2002
+++ status.c Thu Apr 25 14:28:58 2002
@@ -794,15 +794,17 @@
ptrns = g_hash_table_lookup (pcmp->translations, llocale->data);
if ( ptrns == NULL) /* We don't have a translation */
{
- temp = g_strdup_printf ("\t<td align=right>N/A</td>\n"\
- "\t<td align=right>N/A</td>\n"\
- "\t<td align=right>N/A</td>\n");
+ temp = g_strdup_printf ("\t<td align=right>0</td>\n"\
+ "\t<td align=right>0</td>\n"\
+ "\t<td align=right>%d</td>\n", pcmp->nstrings);
temp_info = g_strdup_printf ("\t<td align=right><a href=\"po/%s.%s.pot\">N/A</a></td>\n",
pcmp->name, pcmp->branch);
temp = g_strconcat (temp, temp_info, NULL);
total[g_list_position (prelease->locales, llocale)] += pcmp->nstrings;
+
+ total_untrans[g_list_position (prelease->locales, llocale)] += pcmp->nstrings;
}
else
{ /* We have a translation for this locale */
@@ -810,14 +812,16 @@
/* But if the translation is faulty... */
if ((ptrns->translated == -1) && (ptrns->fuzzy == -1) && (ptrns->untranslated == -1)) {
- temp = g_strdup_printf ("\t<td bgcolor='#d06060' align=right>Error</td>\n"\
- "\t<td bgcolor='#d06060' align=right>Error</td>\n"\
- "\t<td bgcolor='#d06060' align=right>Error</td>\n");
+ temp = g_strdup_printf ("\t<td bgcolor='#d06060' align=right>0</td>\n"\
+ "\t<td bgcolor='#d06060' align=right>0</td>\n"\
+ "\t<td bgcolor='#d06060' align=right>%d</td>\n", pcmp->nstrings);
temp_info = g_strdup_printf ("\t<td bgcolor='#d06060' align=right><a href=\"po/%s.%s.%s.po\">Error</a></td>\n",
pcmp->name, pcmp->branch, ptrns->locale);
temp = g_strconcat (temp, temp_info, NULL);
total[g_list_position (prelease->locales, llocale)] += pcmp->nstrings;
+ total_untrans[g_list_position (prelease->locales, llocale)] += pcmp->nstrings;
+
} else {
gfloat stats;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]