Add prefixes to msgids for paper sizes

This commit is contained in:
Matthias Clasen
2006-04-25 03:44:57 +00:00
parent eee5ae7568
commit 8b51038be3
6 changed files with 365 additions and 166 deletions

View File

@ -1,3 +1,14 @@
2006-04-24 Matthias Clasen <mclasen@redhat.com>
* gtk/paper_names.c: Declare PaperInfo here.
* gtk/gen-paper-names.c: Add a prefix to gettext msgids.
* gtk/paper_names_offsets.c: Regenerated.
* gtk/gtkpapersize.c (gtk_paper_size_get_display_name):
Use g_strip_context() to strip the prefix.
2006-04-24 Matthias Clasen <mclasen@redhat.com> 2006-04-24 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfontbutton.c: Small doc fixes. * gtk/gtkfontbutton.c: Small doc fixes.

View File

@ -1,3 +1,14 @@
2006-04-24 Matthias Clasen <mclasen@redhat.com>
* gtk/paper_names.c: Declare PaperInfo here.
* gtk/gen-paper-names.c: Add a prefix to gettext msgids.
* gtk/paper_names_offsets.c: Regenerated.
* gtk/gtkpapersize.c (gtk_paper_size_get_display_name):
Use g_strip_context() to strip the prefix.
2006-04-24 Matthias Clasen <mclasen@redhat.com> 2006-04-24 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfontbutton.c: Small doc fixes. * gtk/gtkfontbutton.c: Small doc fixes.

View File

@ -180,7 +180,8 @@ main (int argc, char *argv[])
printf ("#if 0\n"); printf ("#if 0\n");
for (i = 0; i < n_infos; i++) for (i = 0; i < n_infos; i++)
printf ("N_(\"%s\")\n", standard_names[i].display_name); printf ("/* translators, strip everything up to the first | */\n"
"N_(\"paper size|%s\")\n", standard_names[i].display_name);
printf ("#endif\n\n"); printf ("#endif\n\n");
/* write strings */ /* write strings */

View File

@ -462,10 +462,15 @@ gtk_paper_size_get_name (GtkPaperSize *size)
G_CONST_RETURN gchar * G_CONST_RETURN gchar *
gtk_paper_size_get_display_name (GtkPaperSize *size) gtk_paper_size_get_display_name (GtkPaperSize *size)
{ {
const gchar *display_name;
if (size->display_name) if (size->display_name)
return size->display_name; return size->display_name;
g_assert (size->info != NULL); g_assert (size->info != NULL);
return gettext (paper_names + size->info->display_name);
display_name = paper_names + size->info->display_name;
return g_strip_context (display_name, gettext (display_name));
} }
/** /**

View File

@ -6,6 +6,13 @@
* The PPD names come from the PPD specification. * The PPD names come from the PPD specification.
*/ */
typedef struct {
const gchar *name;
const gchar *size;
const gchar *display_name;
const gchar *ppd_name;
} PaperInfo;
static const PaperInfo standard_names[] = { static const PaperInfo standard_names[] = {
/* sorted by name, remember to sort when changing */ /* sorted by name, remember to sort when changing */
{"asme_f", "28x40in", N_("asme_f")}, /* f 5 e1 */ {"asme_f", "28x40in", N_("asme_f")}, /* f 5 e1 */

View File

@ -1,170 +1,334 @@
/* Generated by gen-paper-names */ /* Generated by gen-paper-names */
#if 0 #if 0
N_("asme_f") /* translators, strip everything up to the first | */
N_("A0x2") N_("paper size|asme_f")
N_("A0") /* translators, strip everything up to the first | */
N_("A0x3") N_("paper size|A0x2")
N_("A1") /* translators, strip everything up to the first | */
N_("A10") N_("paper size|A0")
N_("A1x3") /* translators, strip everything up to the first | */
N_("A1x4") N_("paper size|A0x3")
N_("A2") /* translators, strip everything up to the first | */
N_("A2x3") N_("paper size|A1")
N_("A2x4") /* translators, strip everything up to the first | */
N_("A2x5") N_("paper size|A10")
N_("A3") /* translators, strip everything up to the first | */
N_("A3 Extra") N_("paper size|A1x3")
N_("A3x3") /* translators, strip everything up to the first | */
N_("A3x4") N_("paper size|A1x4")
N_("A3x5") /* translators, strip everything up to the first | */
N_("A3x6") N_("paper size|A2")
N_("A3x7") /* translators, strip everything up to the first | */
N_("A4") N_("paper size|A2x3")
N_("A4 Extra") /* translators, strip everything up to the first | */
N_("A4 Tab") N_("paper size|A2x4")
N_("A4x3") /* translators, strip everything up to the first | */
N_("A4x4") N_("paper size|A2x5")
N_("A4x5") /* translators, strip everything up to the first | */
N_("A4x6") N_("paper size|A3")
N_("A4x7") /* translators, strip everything up to the first | */
N_("A4x8") N_("paper size|A3 Extra")
N_("A4x9") /* translators, strip everything up to the first | */
N_("A5") N_("paper size|A3x3")
N_("A5 Extra") /* translators, strip everything up to the first | */
N_("A6") N_("paper size|A3x4")
N_("A7") /* translators, strip everything up to the first | */
N_("A8") N_("paper size|A3x5")
N_("A9") /* translators, strip everything up to the first | */
N_("B0") N_("paper size|A3x6")
N_("B1") /* translators, strip everything up to the first | */
N_("B10") N_("paper size|A3x7")
N_("B2") /* translators, strip everything up to the first | */
N_("B3") N_("paper size|A4")
N_("B4") /* translators, strip everything up to the first | */
N_("B5") N_("paper size|A4 Extra")
N_("B5 Extra") /* translators, strip everything up to the first | */
N_("B6") N_("paper size|A4 Tab")
N_("B6/C4") /* translators, strip everything up to the first | */
N_("B7") N_("paper size|A4x3")
N_("B8") /* translators, strip everything up to the first | */
N_("B9") N_("paper size|A4x4")
N_("C0") /* translators, strip everything up to the first | */
N_("C1") N_("paper size|A4x5")
N_("C10") /* translators, strip everything up to the first | */
N_("C2") N_("paper size|A4x6")
N_("C3") /* translators, strip everything up to the first | */
N_("C4") N_("paper size|A4x7")
N_("C5") /* translators, strip everything up to the first | */
N_("C6") N_("paper size|A4x8")
N_("C6/C5") /* translators, strip everything up to the first | */
N_("C7") N_("paper size|A4x9")
N_("C7/C6") /* translators, strip everything up to the first | */
N_("C8") N_("paper size|A5")
N_("C9") /* translators, strip everything up to the first | */
N_("DL Envelope") N_("paper size|A5 Extra")
N_("RA0") /* translators, strip everything up to the first | */
N_("RA1") N_("paper size|A6")
N_("RA2") /* translators, strip everything up to the first | */
N_("SRA0") N_("paper size|A7")
N_("SRA1") /* translators, strip everything up to the first | */
N_("SRA2") N_("paper size|A8")
N_("JB0") /* translators, strip everything up to the first | */
N_("JB1") N_("paper size|A9")
N_("JB10") /* translators, strip everything up to the first | */
N_("JB2") N_("paper size|B0")
N_("JB3") /* translators, strip everything up to the first | */
N_("JB4") N_("paper size|B1")
N_("JB5") /* translators, strip everything up to the first | */
N_("JB6") N_("paper size|B10")
N_("JB7") /* translators, strip everything up to the first | */
N_("JB8") N_("paper size|B2")
N_("JB9") /* translators, strip everything up to the first | */
N_("jis exec") N_("paper size|B3")
N_("Choukei 2 Envelope") /* translators, strip everything up to the first | */
N_("Choukei 3 Envelope") N_("paper size|B4")
N_("Choukei 4 Envelope") /* translators, strip everything up to the first | */
N_("hagaki (postcard)") N_("paper size|B5")
N_("kahu Envelope") /* translators, strip everything up to the first | */
N_("kaku2 Envelope") N_("paper size|B5 Extra")
N_("oufuku (reply postcard)") /* translators, strip everything up to the first | */
N_("you4 Envelope") N_("paper size|B6")
N_("10x11") /* translators, strip everything up to the first | */
N_("10x13") N_("paper size|B6/C4")
N_("10x14") /* translators, strip everything up to the first | */
N_("10x15") N_("paper size|B7")
N_("10x15") /* translators, strip everything up to the first | */
N_("11x12") N_("paper size|B8")
N_("11x15") /* translators, strip everything up to the first | */
N_("12x19") N_("paper size|B9")
N_("5x7") /* translators, strip everything up to the first | */
N_("6x9 Envelope") N_("paper size|C0")
N_("7x9 Envelope") /* translators, strip everything up to the first | */
N_("9x11 Envelope") N_("paper size|C1")
N_("a2 Envelope") /* translators, strip everything up to the first | */
N_("Arch A") N_("paper size|C10")
N_("Arch B") /* translators, strip everything up to the first | */
N_("Arch C") N_("paper size|C2")
N_("Arch D") /* translators, strip everything up to the first | */
N_("Arch E") N_("paper size|C3")
N_("b-plus") /* translators, strip everything up to the first | */
N_("c") N_("paper size|C4")
N_("c5 Envelope") /* translators, strip everything up to the first | */
N_("d") N_("paper size|C5")
N_("e") /* translators, strip everything up to the first | */
N_("edp") N_("paper size|C6")
N_("European edp") /* translators, strip everything up to the first | */
N_("Executive") N_("paper size|C6/C5")
N_("f") /* translators, strip everything up to the first | */
N_("FanFold European") N_("paper size|C7")
N_("FanFold US") /* translators, strip everything up to the first | */
N_("FanFold German Legal") N_("paper size|C7/C6")
N_("Government Legal") /* translators, strip everything up to the first | */
N_("Government Letter") N_("paper size|C8")
N_("Index 3x5") /* translators, strip everything up to the first | */
N_("Index 4x6 (postcard)") N_("paper size|C9")
N_("Index 4x6 ext") /* translators, strip everything up to the first | */
N_("Index 5x8") N_("paper size|DL Envelope")
N_("Invoice") /* translators, strip everything up to the first | */
N_("Tabloid") N_("paper size|RA0")
N_("US Legal") /* translators, strip everything up to the first | */
N_("US Legal Extra") N_("paper size|RA1")
N_("US Letter") /* translators, strip everything up to the first | */
N_("US Letter Extra") N_("paper size|RA2")
N_("US Letter Plus") /* translators, strip everything up to the first | */
N_("Monarch Envelope") N_("paper size|SRA0")
N_("#10 Envelope") /* translators, strip everything up to the first | */
N_("#11 Eenvelope") N_("paper size|SRA1")
N_("#12 Envelope") /* translators, strip everything up to the first | */
N_("#14 Envelope") N_("paper size|SRA2")
N_("#9 Envelope") /* translators, strip everything up to the first | */
N_("Personal Envelope") N_("paper size|JB0")
N_("Quarto") /* translators, strip everything up to the first | */
N_("Super A") N_("paper size|JB1")
N_("Super B") /* translators, strip everything up to the first | */
N_("Wide Format") N_("paper size|JB10")
N_("Dai-pa-kai") /* translators, strip everything up to the first | */
N_("Folio") N_("paper size|JB2")
N_("Folio sp") /* translators, strip everything up to the first | */
N_("Invite Envelope") N_("paper size|JB3")
N_("Italian Envelope") /* translators, strip everything up to the first | */
N_("juuro-ku-kai") N_("paper size|JB4")
N_("pa-kai") /* translators, strip everything up to the first | */
N_("Postfix Envelope") N_("paper size|JB5")
N_("Small Photo") /* translators, strip everything up to the first | */
N_("prc1 Envelope") N_("paper size|JB6")
N_("prc10 Envelope") /* translators, strip everything up to the first | */
N_("prc 16k") N_("paper size|JB7")
N_("prc2 Envelope") /* translators, strip everything up to the first | */
N_("prc3 Envelope") N_("paper size|JB8")
N_("prc 32k") /* translators, strip everything up to the first | */
N_("prc4 Envelope") N_("paper size|JB9")
N_("prc5 Envelope") /* translators, strip everything up to the first | */
N_("prc6 Envelope") N_("paper size|jis exec")
N_("prc7 Envelope") /* translators, strip everything up to the first | */
N_("prc8 Envelope") N_("paper size|Choukei 2 Envelope")
N_("ROC 16k") /* translators, strip everything up to the first | */
N_("ROC 8k") N_("paper size|Choukei 3 Envelope")
/* translators, strip everything up to the first | */
N_("paper size|Choukei 4 Envelope")
/* translators, strip everything up to the first | */
N_("paper size|hagaki (postcard)")
/* translators, strip everything up to the first | */
N_("paper size|kahu Envelope")
/* translators, strip everything up to the first | */
N_("paper size|kaku2 Envelope")
/* translators, strip everything up to the first | */
N_("paper size|oufuku (reply postcard)")
/* translators, strip everything up to the first | */
N_("paper size|you4 Envelope")
/* translators, strip everything up to the first | */
N_("paper size|10x11")
/* translators, strip everything up to the first | */
N_("paper size|10x13")
/* translators, strip everything up to the first | */
N_("paper size|10x14")
/* translators, strip everything up to the first | */
N_("paper size|10x15")
/* translators, strip everything up to the first | */
N_("paper size|10x15")
/* translators, strip everything up to the first | */
N_("paper size|11x12")
/* translators, strip everything up to the first | */
N_("paper size|11x15")
/* translators, strip everything up to the first | */
N_("paper size|12x19")
/* translators, strip everything up to the first | */
N_("paper size|5x7")
/* translators, strip everything up to the first | */
N_("paper size|6x9 Envelope")
/* translators, strip everything up to the first | */
N_("paper size|7x9 Envelope")
/* translators, strip everything up to the first | */
N_("paper size|9x11 Envelope")
/* translators, strip everything up to the first | */
N_("paper size|a2 Envelope")
/* translators, strip everything up to the first | */
N_("paper size|Arch A")
/* translators, strip everything up to the first | */
N_("paper size|Arch B")
/* translators, strip everything up to the first | */
N_("paper size|Arch C")
/* translators, strip everything up to the first | */
N_("paper size|Arch D")
/* translators, strip everything up to the first | */
N_("paper size|Arch E")
/* translators, strip everything up to the first | */
N_("paper size|b-plus")
/* translators, strip everything up to the first | */
N_("paper size|c")
/* translators, strip everything up to the first | */
N_("paper size|c5 Envelope")
/* translators, strip everything up to the first | */
N_("paper size|d")
/* translators, strip everything up to the first | */
N_("paper size|e")
/* translators, strip everything up to the first | */
N_("paper size|edp")
/* translators, strip everything up to the first | */
N_("paper size|European edp")
/* translators, strip everything up to the first | */
N_("paper size|Executive")
/* translators, strip everything up to the first | */
N_("paper size|f")
/* translators, strip everything up to the first | */
N_("paper size|FanFold European")
/* translators, strip everything up to the first | */
N_("paper size|FanFold US")
/* translators, strip everything up to the first | */
N_("paper size|FanFold German Legal")
/* translators, strip everything up to the first | */
N_("paper size|Government Legal")
/* translators, strip everything up to the first | */
N_("paper size|Government Letter")
/* translators, strip everything up to the first | */
N_("paper size|Index 3x5")
/* translators, strip everything up to the first | */
N_("paper size|Index 4x6 (postcard)")
/* translators, strip everything up to the first | */
N_("paper size|Index 4x6 ext")
/* translators, strip everything up to the first | */
N_("paper size|Index 5x8")
/* translators, strip everything up to the first | */
N_("paper size|Invoice")
/* translators, strip everything up to the first | */
N_("paper size|Tabloid")
/* translators, strip everything up to the first | */
N_("paper size|US Legal")
/* translators, strip everything up to the first | */
N_("paper size|US Legal Extra")
/* translators, strip everything up to the first | */
N_("paper size|US Letter")
/* translators, strip everything up to the first | */
N_("paper size|US Letter Extra")
/* translators, strip everything up to the first | */
N_("paper size|US Letter Plus")
/* translators, strip everything up to the first | */
N_("paper size|Monarch Envelope")
/* translators, strip everything up to the first | */
N_("paper size|#10 Envelope")
/* translators, strip everything up to the first | */
N_("paper size|#11 Eenvelope")
/* translators, strip everything up to the first | */
N_("paper size|#12 Envelope")
/* translators, strip everything up to the first | */
N_("paper size|#14 Envelope")
/* translators, strip everything up to the first | */
N_("paper size|#9 Envelope")
/* translators, strip everything up to the first | */
N_("paper size|Personal Envelope")
/* translators, strip everything up to the first | */
N_("paper size|Quarto")
/* translators, strip everything up to the first | */
N_("paper size|Super A")
/* translators, strip everything up to the first | */
N_("paper size|Super B")
/* translators, strip everything up to the first | */
N_("paper size|Wide Format")
/* translators, strip everything up to the first | */
N_("paper size|Dai-pa-kai")
/* translators, strip everything up to the first | */
N_("paper size|Folio")
/* translators, strip everything up to the first | */
N_("paper size|Folio sp")
/* translators, strip everything up to the first | */
N_("paper size|Invite Envelope")
/* translators, strip everything up to the first | */
N_("paper size|Italian Envelope")
/* translators, strip everything up to the first | */
N_("paper size|juuro-ku-kai")
/* translators, strip everything up to the first | */
N_("paper size|pa-kai")
/* translators, strip everything up to the first | */
N_("paper size|Postfix Envelope")
/* translators, strip everything up to the first | */
N_("paper size|Small Photo")
/* translators, strip everything up to the first | */
N_("paper size|prc1 Envelope")
/* translators, strip everything up to the first | */
N_("paper size|prc10 Envelope")
/* translators, strip everything up to the first | */
N_("paper size|prc 16k")
/* translators, strip everything up to the first | */
N_("paper size|prc2 Envelope")
/* translators, strip everything up to the first | */
N_("paper size|prc3 Envelope")
/* translators, strip everything up to the first | */
N_("paper size|prc 32k")
/* translators, strip everything up to the first | */
N_("paper size|prc4 Envelope")
/* translators, strip everything up to the first | */
N_("paper size|prc5 Envelope")
/* translators, strip everything up to the first | */
N_("paper size|prc6 Envelope")
/* translators, strip everything up to the first | */
N_("paper size|prc7 Envelope")
/* translators, strip everything up to the first | */
N_("paper size|prc8 Envelope")
/* translators, strip everything up to the first | */
N_("paper size|ROC 16k")
/* translators, strip everything up to the first | */
N_("paper size|ROC 8k")
#endif #endif
const char paper_names[] = const char paper_names[] =