Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2005:
[Freeciv-Dev] Re: (PR#11758) civmanual bugs
Home

[Freeciv-Dev] Re: (PR#11758) civmanual bugs

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] Re: (PR#11758) civmanual bugs
From: "Christian Knoke" <chrisk@xxxxxxxxx>
Date: Sun, 2 Jan 2005 11:15:55 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=11758 >

On Sun, Jan 02, 2005 at 02:35:30AM -0800, Christian Knoke wrote:
> On Sat, Jan 01, 2005 at 05:24:38PM -0800, Jason Short wrote:
> > 
> > > Small bugs are in civmanual:
> > > 
> > > The categories and levels are not i18n'd.
> > > 
> > > In manual2 (improvements) and manual5 (wonders) the decriptions are
> > > doubled: 1 german, 1 english
> > 
> > This patch fixes those problems.  It should work for both branches. 
> > There may be other problems; it's hard to see since not all strings are
> > translated.
> 
> Besides the diff format problem, your patch works good.
> 
> Here is another (additional) patch, which fixes i18n for 2 headlines and
> adds the word 'Freeciv' to the version string for 2 other headlines.

Even more. In manual3.html the second table texts aren't i18n'd.

So I have combined Jason's and my recent patch with these into
manual-3.diff, attached.

Note, this is against S2_0, and should be done before string freeze.


Christian

-- 
Christian Knoke            * * *            http://cknoke.de
* * * * * * * * *  Ceterum censeo Microsoft esse dividendum.

--- manual/civmanual.c.orig     2005-01-02 20:12:46.000000000 +0100
+++ manual/civmanual.c  2005-01-02 20:11:47.000000000 +0100
@@ -126,7 +126,7 @@
 
     switch (manuals) {
     case MANUAL_SETTINGS:
-      fprintf(doc, "<h1>Freeciv %s server options</h1>\n\n", VERSION_STRING);
+      fprintf(doc, _("<h1>Freeciv %s server options</h1>\n\n"), 
VERSION_STRING);
       for (i = 0; settings[i].name; i++) {
        struct settings_s *op = &settings[i];
        static struct astring abuf = ASTRING_INIT;
@@ -142,9 +142,9 @@
          fprintf(doc, "<pre>%s</pre>\n\n", abuf.str);
        }
        fprintf(doc, "<p class=\"misc\">");
-       fprintf(doc, _("Level: %s.<br>"), sset_level_names[op->level]);
+       fprintf(doc, _("Level: %s.<br>"), _(sset_level_names[op->level]));
        fprintf(doc, _("Category: %s.<br>"),
-               sset_category_names[op->category]);
+               _(sset_category_names[op->category]));
        if (op->to_client == SSET_SERVER_ONLY) {
          fprintf(doc, _("Can only be used in server console. "));
        }
@@ -187,7 +187,7 @@
       break;
 
     case MANUAL_COMMANDS:
-      fprintf(doc, "<h1>Freeciv %s server commands</h1>\n\n",
+      fprintf(doc, _("<h1>Freeciv %s server commands</h1>\n\n"),
              VERSION_STRING);
       for (i = 0; i < CMD_NUM; i++) {
        const struct command *cmd = &commands[i];
@@ -262,14 +262,14 @@
        fprintf(doc, "<td>%s</td></tr>\n\n",
                get_terrain_name(ptype->transform_result));
       } terrain_type_iterate_end;
-      fprintf(doc, "</table><br><br><br><table border=1>");
-      fprintf(doc, "<caption>Time to perform action</caption>");
-      fprintf(doc, "<tr><th>Terrain</th>\n");
-      fprintf(doc, "<th>Road</th><th>Irrigation</th>\n");
-      fprintf(doc, "<th>Mining</th><th>Rail</th>\n");
-      fprintf(doc, "<th>Airbase</th><th>Fortress</th>\n");
-      fprintf(doc, "<th>Clean pollution</th><th>Clean fallout</th>\n");
-      fprintf(doc, "<th>Transform</th></tr>\n");
+      fprintf(doc, _("</table><br><br><br><table border=1>"));
+      fprintf(doc, _("<caption>Time to perform action</caption>"));
+      fprintf(doc, _("<tr><th>Terrain</th>\n"));
+      fprintf(doc, _("<th>Road</th><th>Irrigation</th>\n"));
+      fprintf(doc, _("<th>Mining</th><th>Rail</th>\n"));
+      fprintf(doc, _("<th>Airbase</th><th>Fortress</th>\n"));
+      fprintf(doc, _("<th>Clean pollution</th><th>Clean fallout</th>\n"));
+      fprintf(doc, _("<th>Transform</th></tr>\n"));
       terrain_type_iterate(id) {
        const char *name = get_terrain_name(id);
        struct tile_type *ptype = get_tile_type(id);
@@ -295,7 +295,7 @@
       break;
 
     case MANUAL_BUILDINGS:
-      fprintf(doc, _("<h1>Buildings help for %s</h1>\n\n"), VERSION_STRING);
+      fprintf(doc, _("<h1>Freeciv %s buildings help</h1>\n\n"), 
VERSION_STRING);
       impr_type_iterate(id) {
        struct impr_type *pimpr = get_improvement_type(id);
        char buf[64000];
@@ -304,7 +304,7 @@
          continue;
        }
 
-       helptext_building(buf, sizeof(buf), id, (char *)pimpr->helptext);
+       helptext_building(buf, sizeof(buf), id, NULL);
        fprintf(doc, "%s%s%s\n\n", SECTION_BEGIN, get_improvement_name(id),
                SECTION_END);
        fprintf(doc, "<table>\n");
@@ -324,7 +324,7 @@
       break;
 
     case MANUAL_WONDERS:
-      fprintf(doc, _("<h1>Wonder help for %s</h1>\n\n"), VERSION_STRING);
+      fprintf(doc, _("<h1>Freeciv %s wonders help</h1>\n\n"), VERSION_STRING);
       impr_type_iterate(id) {
        struct impr_type *pimpr = get_improvement_type(id);
        char buf[64000];
@@ -333,7 +333,7 @@
          continue;
        }
 
-       helptext_building(buf, sizeof(buf), id, (char *)pimpr->helptext);
+       helptext_building(buf, sizeof(buf), id, NULL);
        fprintf(doc, "%s%s%s\n\n", SECTION_BEGIN, get_improvement_name(id),
                SECTION_END);
        fprintf(doc, "<table>\n");

[Prev in Thread] Current Thread [Next in Thread]