diff options
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 11 | ||||
-rw-r--r-- | gtk/gen-paper-names.c | 3 | ||||
-rw-r--r-- | gtk/gtkpapersize.c | 7 | ||||
-rw-r--r-- | gtk/paper_names.c | 7 | ||||
-rw-r--r-- | gtk/paper_names_offsets.c | 492 |
6 files changed, 365 insertions, 166 deletions
@@ -1,4 +1,15 @@ 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> * gtk/gtkfontbutton.c: Small doc fixes. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 2a9fac02c0..02e2e18534 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,4 +1,15 @@ 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> * gtk/gtkfontbutton.c: Small doc fixes. diff --git a/gtk/gen-paper-names.c b/gtk/gen-paper-names.c index ef9aebfb35..d71d805c36 100644 --- a/gtk/gen-paper-names.c +++ b/gtk/gen-paper-names.c @@ -180,7 +180,8 @@ main (int argc, char *argv[]) printf ("#if 0\n"); 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"); /* write strings */ diff --git a/gtk/gtkpapersize.c b/gtk/gtkpapersize.c index f97d33bb8f..c11a822fb9 100644 --- a/gtk/gtkpapersize.c +++ b/gtk/gtkpapersize.c @@ -462,10 +462,15 @@ gtk_paper_size_get_name (GtkPaperSize *size) G_CONST_RETURN gchar * gtk_paper_size_get_display_name (GtkPaperSize *size) { + const gchar *display_name; + if (size->display_name) return size->display_name; + 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)); } /** diff --git a/gtk/paper_names.c b/gtk/paper_names.c index c2850d30d7..9fcf65d896 100644 --- a/gtk/paper_names.c +++ b/gtk/paper_names.c @@ -6,6 +6,13 @@ * 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[] = { /* sorted by name, remember to sort when changing */ {"asme_f", "28x40in", N_("asme_f")}, /* f 5 e1 */ diff --git a/gtk/paper_names_offsets.c b/gtk/paper_names_offsets.c index de6ba27b91..03f9f439cb 100644 --- a/gtk/paper_names_offsets.c +++ b/gtk/paper_names_offsets.c @@ -1,170 +1,334 @@ /* Generated by gen-paper-names */ #if 0 -N_("asme_f") -N_("A0x2") -N_("A0") -N_("A0x3") -N_("A1") -N_("A10") -N_("A1x3") -N_("A1x4") -N_("A2") -N_("A2x3") -N_("A2x4") -N_("A2x5") -N_("A3") -N_("A3 Extra") -N_("A3x3") -N_("A3x4") -N_("A3x5") -N_("A3x6") -N_("A3x7") -N_("A4") -N_("A4 Extra") -N_("A4 Tab") -N_("A4x3") -N_("A4x4") -N_("A4x5") -N_("A4x6") -N_("A4x7") -N_("A4x8") -N_("A4x9") -N_("A5") -N_("A5 Extra") -N_("A6") -N_("A7") -N_("A8") -N_("A9") -N_("B0") -N_("B1") -N_("B10") -N_("B2") -N_("B3") -N_("B4") -N_("B5") -N_("B5 Extra") -N_("B6") -N_("B6/C4") -N_("B7") -N_("B8") -N_("B9") -N_("C0") -N_("C1") -N_("C10") -N_("C2") -N_("C3") -N_("C4") -N_("C5") -N_("C6") -N_("C6/C5") -N_("C7") -N_("C7/C6") -N_("C8") -N_("C9") -N_("DL Envelope") -N_("RA0") -N_("RA1") -N_("RA2") -N_("SRA0") -N_("SRA1") -N_("SRA2") -N_("JB0") -N_("JB1") -N_("JB10") -N_("JB2") -N_("JB3") -N_("JB4") -N_("JB5") -N_("JB6") -N_("JB7") -N_("JB8") -N_("JB9") -N_("jis exec") -N_("Choukei 2 Envelope") -N_("Choukei 3 Envelope") -N_("Choukei 4 Envelope") -N_("hagaki (postcard)") -N_("kahu Envelope") -N_("kaku2 Envelope") -N_("oufuku (reply postcard)") -N_("you4 Envelope") -N_("10x11") -N_("10x13") -N_("10x14") -N_("10x15") -N_("10x15") -N_("11x12") -N_("11x15") -N_("12x19") -N_("5x7") -N_("6x9 Envelope") -N_("7x9 Envelope") -N_("9x11 Envelope") -N_("a2 Envelope") -N_("Arch A") -N_("Arch B") -N_("Arch C") -N_("Arch D") -N_("Arch E") -N_("b-plus") -N_("c") -N_("c5 Envelope") -N_("d") -N_("e") -N_("edp") -N_("European edp") -N_("Executive") -N_("f") -N_("FanFold European") -N_("FanFold US") -N_("FanFold German Legal") -N_("Government Legal") -N_("Government Letter") -N_("Index 3x5") -N_("Index 4x6 (postcard)") -N_("Index 4x6 ext") -N_("Index 5x8") -N_("Invoice") -N_("Tabloid") -N_("US Legal") -N_("US Legal Extra") -N_("US Letter") -N_("US Letter Extra") -N_("US Letter Plus") -N_("Monarch Envelope") -N_("#10 Envelope") -N_("#11 Eenvelope") -N_("#12 Envelope") -N_("#14 Envelope") -N_("#9 Envelope") -N_("Personal Envelope") -N_("Quarto") -N_("Super A") -N_("Super B") -N_("Wide Format") -N_("Dai-pa-kai") -N_("Folio") -N_("Folio sp") -N_("Invite Envelope") -N_("Italian Envelope") -N_("juuro-ku-kai") -N_("pa-kai") -N_("Postfix Envelope") -N_("Small Photo") -N_("prc1 Envelope") -N_("prc10 Envelope") -N_("prc 16k") -N_("prc2 Envelope") -N_("prc3 Envelope") -N_("prc 32k") -N_("prc4 Envelope") -N_("prc5 Envelope") -N_("prc6 Envelope") -N_("prc7 Envelope") -N_("prc8 Envelope") -N_("ROC 16k") -N_("ROC 8k") +/* translators, strip everything up to the first | */ +N_("paper size|asme_f") +/* translators, strip everything up to the first | */ +N_("paper size|A0x2") +/* translators, strip everything up to the first | */ +N_("paper size|A0") +/* translators, strip everything up to the first | */ +N_("paper size|A0x3") +/* translators, strip everything up to the first | */ +N_("paper size|A1") +/* translators, strip everything up to the first | */ +N_("paper size|A10") +/* translators, strip everything up to the first | */ +N_("paper size|A1x3") +/* translators, strip everything up to the first | */ +N_("paper size|A1x4") +/* translators, strip everything up to the first | */ +N_("paper size|A2") +/* translators, strip everything up to the first | */ +N_("paper size|A2x3") +/* translators, strip everything up to the first | */ +N_("paper size|A2x4") +/* translators, strip everything up to the first | */ +N_("paper size|A2x5") +/* translators, strip everything up to the first | */ +N_("paper size|A3") +/* translators, strip everything up to the first | */ +N_("paper size|A3 Extra") +/* translators, strip everything up to the first | */ +N_("paper size|A3x3") +/* translators, strip everything up to the first | */ +N_("paper size|A3x4") +/* translators, strip everything up to the first | */ +N_("paper size|A3x5") +/* translators, strip everything up to the first | */ +N_("paper size|A3x6") +/* translators, strip everything up to the first | */ +N_("paper size|A3x7") +/* translators, strip everything up to the first | */ +N_("paper size|A4") +/* translators, strip everything up to the first | */ +N_("paper size|A4 Extra") +/* translators, strip everything up to the first | */ +N_("paper size|A4 Tab") +/* translators, strip everything up to the first | */ +N_("paper size|A4x3") +/* translators, strip everything up to the first | */ +N_("paper size|A4x4") +/* translators, strip everything up to the first | */ +N_("paper size|A4x5") +/* translators, strip everything up to the first | */ +N_("paper size|A4x6") +/* translators, strip everything up to the first | */ +N_("paper size|A4x7") +/* translators, strip everything up to the first | */ +N_("paper size|A4x8") +/* translators, strip everything up to the first | */ +N_("paper size|A4x9") +/* translators, strip everything up to the first | */ +N_("paper size|A5") +/* translators, strip everything up to the first | */ +N_("paper size|A5 Extra") +/* translators, strip everything up to the first | */ +N_("paper size|A6") +/* translators, strip everything up to the first | */ +N_("paper size|A7") +/* translators, strip everything up to the first | */ +N_("paper size|A8") +/* translators, strip everything up to the first | */ +N_("paper size|A9") +/* translators, strip everything up to the first | */ +N_("paper size|B0") +/* translators, strip everything up to the first | */ +N_("paper size|B1") +/* translators, strip everything up to the first | */ +N_("paper size|B10") +/* translators, strip everything up to the first | */ +N_("paper size|B2") +/* translators, strip everything up to the first | */ +N_("paper size|B3") +/* translators, strip everything up to the first | */ +N_("paper size|B4") +/* translators, strip everything up to the first | */ +N_("paper size|B5") +/* translators, strip everything up to the first | */ +N_("paper size|B5 Extra") +/* translators, strip everything up to the first | */ +N_("paper size|B6") +/* translators, strip everything up to the first | */ +N_("paper size|B6/C4") +/* translators, strip everything up to the first | */ +N_("paper size|B7") +/* translators, strip everything up to the first | */ +N_("paper size|B8") +/* translators, strip everything up to the first | */ +N_("paper size|B9") +/* translators, strip everything up to the first | */ +N_("paper size|C0") +/* translators, strip everything up to the first | */ +N_("paper size|C1") +/* translators, strip everything up to the first | */ +N_("paper size|C10") +/* translators, strip everything up to the first | */ +N_("paper size|C2") +/* translators, strip everything up to the first | */ +N_("paper size|C3") +/* translators, strip everything up to the first | */ +N_("paper size|C4") +/* translators, strip everything up to the first | */ +N_("paper size|C5") +/* translators, strip everything up to the first | */ +N_("paper size|C6") +/* translators, strip everything up to the first | */ +N_("paper size|C6/C5") +/* translators, strip everything up to the first | */ +N_("paper size|C7") +/* translators, strip everything up to the first | */ +N_("paper size|C7/C6") +/* translators, strip everything up to the first | */ +N_("paper size|C8") +/* translators, strip everything up to the first | */ +N_("paper size|C9") +/* translators, strip everything up to the first | */ +N_("paper size|DL Envelope") +/* translators, strip everything up to the first | */ +N_("paper size|RA0") +/* translators, strip everything up to the first | */ +N_("paper size|RA1") +/* translators, strip everything up to the first | */ +N_("paper size|RA2") +/* translators, strip everything up to the first | */ +N_("paper size|SRA0") +/* translators, strip everything up to the first | */ +N_("paper size|SRA1") +/* translators, strip everything up to the first | */ +N_("paper size|SRA2") +/* translators, strip everything up to the first | */ +N_("paper size|JB0") +/* translators, strip everything up to the first | */ +N_("paper size|JB1") +/* translators, strip everything up to the first | */ +N_("paper size|JB10") +/* translators, strip everything up to the first | */ +N_("paper size|JB2") +/* translators, strip everything up to the first | */ +N_("paper size|JB3") +/* translators, strip everything up to the first | */ +N_("paper size|JB4") +/* translators, strip everything up to the first | */ +N_("paper size|JB5") +/* translators, strip everything up to the first | */ +N_("paper size|JB6") +/* translators, strip everything up to the first | */ +N_("paper size|JB7") +/* translators, strip everything up to the first | */ +N_("paper size|JB8") +/* translators, strip everything up to the first | */ +N_("paper size|JB9") +/* translators, strip everything up to the first | */ +N_("paper size|jis exec") +/* translators, strip everything up to the first | */ +N_("paper size|Choukei 2 Envelope") +/* translators, strip everything up to the first | */ +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 const char paper_names[] = |