Author: cazfi
Date: Tue Apr  7 05:23:57 2015
New Revision: 28737

URL: http://svn.gna.org/viewcvs/freeciv?rev=28737&view=rev
Log:
Qualified string "None"

See patch #5880

Modified:
    branches/S2_5/client/gui-gtk-2.0/helpdlg.c
    branches/S2_5/client/gui-gtk-3.0/helpdlg.c
    branches/S2_5/client/gui-qt/plrdlg.cpp
    branches/S2_5/client/gui-qt/repodlgs.cpp
    branches/S2_5/client/gui-sdl/citydlg.c
    branches/S2_5/client/gui-sdl/gui_tilespec.c
    branches/S2_5/client/gui-sdl/helpdlg.c
    branches/S2_5/client/gui-sdl/mapview.c
    branches/S2_5/client/gui-xaw/helpdlg.c
    branches/S2_5/common/tech.c
    branches/S2_5/server/settings.h
    branches/S2_5/tools/civmanual.c

Modified: branches/S2_5/client/gui-gtk-2.0/helpdlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-gtk-2.0/helpdlg.c?rev=28737&r1=28736&r2=28737&view=diff
==============================================================================
--- branches/S2_5/client/gui-gtk-2.0/helpdlg.c  (original)
+++ branches/S2_5/client/gui-gtk-2.0/helpdlg.c  Tue Apr  7 05:23:57 2015
@@ -134,7 +134,7 @@
   N_("Bonus (F/P/T):"), NULL };
 
 
-#define REQ_LABEL_NONE _("None")
+#define REQ_LABEL_NONE _("?tech:None")
 #define REQ_LABEL_NEVER _("(Never)")
 
 static void create_help_dialog(void);
@@ -321,7 +321,7 @@
      below, depending on which i18n is done elsewhere.
   */
   if (strcmp(s, REQ_LABEL_NEVER) != 0
-      && strcmp(s, REQ_LABEL_NONE) != 0
+      && strcmp(s, skip_intl_qualifier_prefix(REQ_LABEL_NONE)) != 0
       && strcmp(s, advance_name_translation(advance_by_number(A_NONE))) != 0)
     select_help_item_string(s, type);
 }
@@ -750,7 +750,7 @@
   create_help_page(HELP_IMPROVEMENT);
 
   if (imp  &&  !is_great_wonder(imp)) {
-    const char *req = REQ_LABEL_NONE;
+    const char *req = skip_intl_qualifier_prefix(REQ_LABEL_NONE);
     char req_buf[512];
 
     sprintf(buf, "%d", impr_build_shield_cost(imp));
@@ -797,7 +797,7 @@
 
   create_help_page(HELP_WONDER);
 
-  if (imp  &&  is_great_wonder(imp)) {
+  if (imp && is_great_wonder(imp)) {
     int i;
     char req_buf[512];
 
@@ -827,12 +827,11 @@
       gtk_label_set_text(GTK_LABEL(help_wlabel[5]), REQ_LABEL_NEVER);
     }
 /*    create_tech_tree(help_improvement_tree, 0, imp->tech_req, 3);*/
-  }
-  else {
+  } else {
     /* can't find wonder */
     gtk_label_set_text(GTK_LABEL(help_wlabel[1]), "0");
     gtk_label_set_text(GTK_LABEL(help_wlabel[3]), REQ_LABEL_NEVER);
-    gtk_label_set_text(GTK_LABEL(help_wlabel[5]), REQ_LABEL_NONE);
+    gtk_label_set_text(GTK_LABEL(help_wlabel[5]), 
skip_intl_qualifier_prefix(REQ_LABEL_NONE));
 /*    create_tech_tree(help_improvement_tree, 0, advance_count(), 3); */
   }
   gtk_widget_show(help_wtable);
@@ -879,7 +878,7 @@
     }
 /*    create_tech_tree(help_improvement_tree, 0, 
advance_number(utype->require_advance), 3);*/
     if (U_NOT_OBSOLETED == utype->obsoleted_by) {
-      gtk_label_set_text(GTK_LABEL(help_ulabel[4][4]), REQ_LABEL_NONE);
+      gtk_label_set_text(GTK_LABEL(help_ulabel[4][4]), 
skip_intl_qualifier_prefix(REQ_LABEL_NONE));
     } else {
       gtk_label_set_text(GTK_LABEL(help_ulabel[4][4]),
                         utype_name_translation(utype->obsoleted_by));
@@ -913,7 +912,7 @@
 
     gtk_label_set_text(GTK_LABEL(help_ulabel[4][1]), REQ_LABEL_NEVER);
 /*    create_tech_tree(help_improvement_tree, 0, A_LAST, 3);*/
-    gtk_label_set_text(GTK_LABEL(help_ulabel[4][4]), REQ_LABEL_NONE);
+    gtk_label_set_text(GTK_LABEL(help_ulabel[4][4]), 
skip_intl_qualifier_prefix(REQ_LABEL_NONE));
 
     gtk_text_buffer_set_text(help_text, buf, -1);
     gtk_widget_show(help_text_sw);
@@ -1266,7 +1265,7 @@
       }
       if (!bonus) {
         /* TRANS: No output bonus from a road */
-        bonus = _("None");
+        bonus = Q_("?bonus:None");
       }
       gtk_label_set_text(GTK_LABEL(help_rlabel[3]), bonus);
     }

Modified: branches/S2_5/client/gui-gtk-3.0/helpdlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-gtk-3.0/helpdlg.c?rev=28737&r1=28736&r2=28737&view=diff
==============================================================================
--- branches/S2_5/client/gui-gtk-3.0/helpdlg.c  (original)
+++ branches/S2_5/client/gui-gtk-3.0/helpdlg.c  Tue Apr  7 05:23:57 2015
@@ -134,7 +134,7 @@
   N_("Bonus (F/P/T):"), NULL };
 
 
-#define REQ_LABEL_NONE _("None")
+#define REQ_LABEL_NONE _("?tech:None")
 #define REQ_LABEL_NEVER _("(Never)")
 
 static void create_help_dialog(void);
@@ -321,7 +321,7 @@
      below, depending on which i18n is done elsewhere.
   */
   if (strcmp(s, REQ_LABEL_NEVER) != 0
-      && strcmp(s, REQ_LABEL_NONE) != 0
+      && strcmp(s, skip_intl_qualifier_prefix(REQ_LABEL_NONE)) != 0
       && strcmp(s, advance_name_translation(advance_by_number(A_NONE))) != 0)
     select_help_item_string(s, type);
 }
@@ -761,7 +761,7 @@
   create_help_page(HELP_IMPROVEMENT);
 
   if (imp  &&  !is_great_wonder(imp)) {
-    const char *req = REQ_LABEL_NONE;
+    const char *req = skip_intl_qualifier_prefix(REQ_LABEL_NONE);
     char req_buf[512];
 
     sprintf(buf, "%d", impr_build_shield_cost(imp));
@@ -815,7 +815,7 @@
 
   create_help_page(HELP_WONDER);
 
-  if (imp  &&  is_great_wonder(imp)) {
+  if (imp && is_great_wonder(imp)) {
     int i;
     char req_buf[512];
 
@@ -845,12 +845,11 @@
       gtk_label_set_text(GTK_LABEL(help_wlabel[5]), REQ_LABEL_NEVER);
     }
 /*    create_tech_tree(help_improvement_tree, 0, imp->tech_req, 3);*/
-  }
-  else {
+  } else {
     /* can't find wonder */
     gtk_label_set_text(GTK_LABEL(help_wlabel[1]), "0");
     gtk_label_set_text(GTK_LABEL(help_wlabel[3]), REQ_LABEL_NEVER);
-    gtk_label_set_text(GTK_LABEL(help_wlabel[5]), REQ_LABEL_NONE);
+    gtk_label_set_text(GTK_LABEL(help_wlabel[5]), 
skip_intl_qualifier_prefix(REQ_LABEL_NONE));
 /*    create_tech_tree(help_improvement_tree, 0, advance_count(), 3); */
   }
     if (get_building_sprite(tileset, imp)) {
@@ -906,7 +905,7 @@
     }
 /*    create_tech_tree(help_improvement_tree, 0, 
advance_number(utype->require_advance), 3);*/
     if (U_NOT_OBSOLETED == utype->obsoleted_by) {
-      gtk_label_set_text(GTK_LABEL(help_ulabel[4][4]), REQ_LABEL_NONE);
+      gtk_label_set_text(GTK_LABEL(help_ulabel[4][4]), 
skip_intl_qualifier_prefix(REQ_LABEL_NONE));
     } else {
       gtk_label_set_text(GTK_LABEL(help_ulabel[4][4]),
                         utype_name_translation(utype->obsoleted_by));
@@ -935,7 +934,7 @@
 
     gtk_label_set_text(GTK_LABEL(help_ulabel[4][1]), REQ_LABEL_NEVER);
 /*    create_tech_tree(help_improvement_tree, 0, A_LAST, 3);*/
-    gtk_label_set_text(GTK_LABEL(help_ulabel[4][4]), REQ_LABEL_NONE);
+    gtk_label_set_text(GTK_LABEL(help_ulabel[4][4]), 
skip_intl_qualifier_prefix(REQ_LABEL_NONE));
 
     gtk_text_buffer_set_text(help_text, buf, -1);
     gtk_widget_show(help_text_sw);
@@ -1291,7 +1290,7 @@
       }
       if (!bonus) {
         /* TRANS: No output bonus from a road */
-        bonus = _("None");
+        bonus = Q_("?bonus:None");
       }
       gtk_label_set_text(GTK_LABEL(help_rlabel[3]), bonus);
     }

Modified: branches/S2_5/client/gui-qt/plrdlg.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-qt/plrdlg.cpp?rev=28737&r1=28736&r2=28737&view=diff
==============================================================================
--- branches/S2_5/client/gui-qt/plrdlg.cpp      (original)
+++ branches/S2_5/client/gui-qt/plrdlg.cpp      Tue Apr  7 05:23:57 2015
@@ -488,13 +488,13 @@
       }
       if (a == 0) {
         techs_known = techs_known + QString("<i>") + sp
-                      + QString(_("None")) + QString("</i>");
+                      + QString(Q_("?tech:None")) + QString("</i>");
       } else {
         techs_known.replace(techs_known.lastIndexOf(","), 1, ".");
       }
       if (b == 0) {
         techs_unknown = techs_unknown + QString("<i>") + sp
-                        + QString(_("None")) + QString("</i>");
+                        + QString(Q_("?tech:None")) + QString("</i>");
       } else {
         techs_unknown.replace(techs_unknown.lastIndexOf(","), 1, ".");
       }

Modified: branches/S2_5/client/gui-qt/repodlgs.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-qt/repodlgs.cpp?rev=28737&r1=28736&r2=28737&view=diff
==============================================================================
--- branches/S2_5/client/gui-qt/repodlgs.cpp    (original)
+++ branches/S2_5/client/gui-qt/repodlgs.cpp    Tue Apr  7 05:23:57 2015
@@ -353,7 +353,7 @@
   qres = research->tech_goal;
 
   if (qres == A_UNSET) {
-    goal_combo->insertItem(0, _("None"), A_UNSET);
+    goal_combo->insertItem(0, Q_("?tech:None"), A_UNSET);
     goal_combo->setCurrentIndex(0);
   } else {
     for (int i = 0; i < goal_combo->count(); i++) {

Modified: branches/S2_5/client/gui-sdl/citydlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-sdl/citydlg.c?rev=28737&r1=28736&r2=28737&view=diff
==============================================================================
--- branches/S2_5/client/gui-sdl/citydlg.c      (original)
+++ branches/S2_5/client/gui-sdl/citydlg.c      Tue Apr  7 05:23:57 2015
@@ -712,7 +712,7 @@
                 (vetname != NULL ? vetname : ""),
                 unit_activity_text(pUnit),
                 pUnit->hp, pUType->hp,
-                pHome_City ? pHome_City->name : _("None"));
+                pHome_City ? pHome_City->name : Q_("?homecity:None"));
 
     if (pCityDlg->page == SUPPORTED_UNITS_PAGE) {
       int pCity_near_dist;

Modified: branches/S2_5/client/gui-sdl/gui_tilespec.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-sdl/gui_tilespec.c?rev=28737&r1=28736&r2=28737&view=diff
==============================================================================
--- branches/S2_5/client/gui-sdl/gui_tilespec.c (original)
+++ branches/S2_5/client/gui-sdl/gui_tilespec.c Tue Apr  7 05:23:57 2015
@@ -368,10 +368,10 @@
   SDL_Color bg_color = {255, 255, 255, 136};
 
   SDL_Surface *pSurf;
-  SDL_String16 *pStr = create_str16_from_char(_("None"), adj_font(10));
-  
+  SDL_String16 *pStr = create_str16_from_char(Q_("?tech:None"), adj_font(10));
+
   pStr->style |= (TTF_STYLE_BOLD | SF_CENTER);
-    
+
   /* create icons */
   pSurf = create_surf_alpha(adj_size(50), adj_size(50), SDL_SWSURFACE);
   SDL_FillRect(pSurf, NULL, map_rgba(pSurf->format, bg_color));

Modified: branches/S2_5/client/gui-sdl/helpdlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-sdl/helpdlg.c?rev=28737&r1=28736&r2=28737&view=diff
==============================================================================
--- branches/S2_5/client/gui-sdl/helpdlg.c      (original)
+++ branches/S2_5/client/gui-sdl/helpdlg.c      Tue Apr  7 05:23:57 2015
@@ -371,9 +371,9 @@
   DownAdd(pRequirementLabel, pDock);
   pDock = pRequirementLabel;
 
-  if (!(requirement_vector_size(&pImpr_type->reqs) > 0)) {
+  if (requirement_vector_size(&pImpr_type->reqs) == 0) {
     pRequirementLabel2 = create_iconlabel_from_chars(NULL, pWindow->dst,
-                                                     _("None"),
+                                                     Q_("?req:None"),
                                                      adj_font(12), 0);
     pRequirementLabel2->ID = ID_LABEL;
   } else {
@@ -803,10 +803,10 @@
   DownAdd(pRequirementLabel, pDock);
   pDock = pRequirementLabel;
 
-  if(A_NEVER == pUnitType->require_advance ||
-     advance_by_number(A_NONE) == pUnitType->require_advance) {
+  if (A_NEVER == pUnitType->require_advance
+     || advance_by_number(A_NONE) == pUnitType->require_advance) {
     pRequirementLabel2 = create_iconlabel_from_chars(NULL, pWindow->dst,
-                                                     _("None"), adj_font(12), 
0);
+                                                     Q_("?tech:None"), 
adj_font(12), 0);
     pRequirementLabel2->ID = ID_LABEL;
   } else {
     pRequirementLabel2 = create_iconlabel_from_chars(NULL, pWindow->dst,
@@ -832,7 +832,7 @@
 
   if (pUnitType->obsoleted_by == U_NOT_OBSOLETED) {
     pObsoleteByLabel2 = create_iconlabel_from_chars(NULL, pWindow->dst,
-                                                    _("None"),
+                                                    Q_("?utype:None"),
                                                     adj_font(12), 0);
     pObsoleteByLabel2->ID = ID_LABEL;
   } else {

Modified: branches/S2_5/client/gui-sdl/mapview.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-sdl/mapview.c?rev=28737&r1=28736&r2=28737&view=diff
==============================================================================
--- branches/S2_5/client/gui-sdl/mapview.c      (original)
+++ branches/S2_5/client/gui-sdl/mapview.c      Tue Apr  7 05:23:57 2015
@@ -314,8 +314,8 @@
                                     
government_name_for_player(client.conn.playing));
   } else {
     fc_snprintf(cBuf, sizeof(cBuf), "%s (%s)\n%s", _("Revolution"), 
"Ctrl+Shift+R",
-                                    _("None"));
-  }        
+                                    Q_("?gov:None"));
+  }
   copy_chars_to_string16(pBuf->info_label, cBuf);
       
   widget_redraw(pBuf);
@@ -331,7 +331,7 @@
   if (NULL == client.conn.playing) {
     /* TRANS: Research report action */
     fc_snprintf(cBuf, sizeof(cBuf), "%s (%s)\n%s (%d/%d)", _("Research"), "F6",
-                                    _("None"), 0, 0);
+                Q_("?tech:None"), 0, 0);
   } else if (A_UNSET != player_research_get(client.conn.playing)->researching) 
{
     /* TRANS: Research report action */
     fc_snprintf(cBuf, sizeof(cBuf), "%s (%s)\n%s (%d/%d)", _("Research"), "F6",
@@ -783,7 +783,7 @@
                       (vetname != NULL ? vetname : ""),
                       unit_activity_text(aunit),
                       aunit->hp, pUType->hp,
-                      pHome_City ? city_name(pHome_City) : _("None"));
+                      pHome_City ? city_name(pHome_City) : 
Q_("?homecity:None"));
 
          pBuf_Surf = create_surf(tileset_full_tile_width(tileset),
                                   tileset_full_tile_height(tileset), 
SDL_SWSURFACE);

Modified: branches/S2_5/client/gui-xaw/helpdlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-xaw/helpdlg.c?rev=28737&r1=28736&r2=28737&view=diff
==============================================================================
--- branches/S2_5/client/gui-xaw/helpdlg.c      (original)
+++ branches/S2_5/client/gui-xaw/helpdlg.c      Tue Apr  7 05:23:57 2015
@@ -822,7 +822,7 @@
     /* can't find wonder */
     xaw_set_label(help_improvement_cost_data, "0 ");
     xaw_set_label(help_improvement_req_data, _("(Never)"));
-    xaw_set_label(help_wonder_obsolete_data, _("None"));
+    xaw_set_label(help_wonder_obsolete_data, Q_("?tech:None"));
     create_tech_tree(help_tech_tree, 0, advance_count(), 3); 
   }
   set_title_topic(pitem);
@@ -867,7 +867,7 @@
     }
     create_tech_tree(help_tech_tree, 0, 
advance_number(punittype->require_advance), 3);
     if (U_NOT_OBSOLETED == punittype->obsoleted_by) {
-      xaw_set_label(help_wonder_obsolete_data, _("None"));
+      xaw_set_label(help_wonder_obsolete_data, Q_("?tech:None"));
     } else {
       xaw_set_label(help_wonder_obsolete_data,
                    utype_name_translation(punittype->obsoleted_by));
@@ -886,7 +886,7 @@
     xaw_set_label(help_unit_visrange_data, "0 ");
     xaw_set_label(help_improvement_req_data, _("(Never)"));
     create_tech_tree(help_tech_tree, 0, advance_count(), 3);
-    xaw_set_label(help_wonder_obsolete_data, _("None"));
+    xaw_set_label(help_wonder_obsolete_data, Q_("?tech:None"));
     XtVaSetValues(help_text, XtNstring, pitem->text, NULL);
   }
   xaw_set_bitmap(help_unit_tile, create_overlay_unit(punittype));

Modified: branches/S2_5/common/tech.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/common/tech.c?rev=28737&r1=28736&r2=28737&view=diff
==============================================================================
--- branches/S2_5/common/tech.c (original)
+++ branches/S2_5/common/tech.c Tue Apr  7 05:23:57 2015
@@ -1110,7 +1110,7 @@
 ****************************************************************************/
 const char *advance_rule_name(const struct advance *padvance)
 {
-  return rule_name(&padvance->name);
+  return skip_intl_qualifier_prefix(rule_name(&padvance->name));
 }
 
 /**************************************************************************
@@ -1214,10 +1214,10 @@
 
   /* Initialize dummy tech A_NONE */
   /* TRANS: "None" tech */
-  name_set(&advances[A_NONE].name, NULL, N_("None"));
+  name_set(&advances[A_NONE].name, NULL, N_("?tech:None"));
 
   /* Initialize dummy tech A_UNSET */
-  name_set(&advances[A_UNSET].name, NULL, N_("None"));
+  name_set(&advances[A_UNSET].name, NULL, N_("?tech:None"));
 
   /* Initialize dummy tech A_FUTURE */
   name_set(&advances[A_FUTURE].name, NULL, N_("Future Tech."));

Modified: branches/S2_5/server/settings.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/settings.h?rev=28737&r1=28736&r2=28737&view=diff
==============================================================================
--- branches/S2_5/server/settings.h     (original)
+++ branches/S2_5/server/settings.h     Tue Apr  7 05:23:57 2015
@@ -56,7 +56,7 @@
 /* Levels allow options to be subdivided and thus easier to navigate */
 #define SPECENUM_NAME sset_level
 #define SPECENUM_VALUE0     SSET_NONE
-#define SPECENUM_VALUE0NAME N_("None")
+#define SPECENUM_VALUE0NAME N_("?ssetlevel:None")
 #define SPECENUM_VALUE1     SSET_ALL
 #define SPECENUM_VALUE1NAME N_("All")
 #define SPECENUM_VALUE2     SSET_VITAL

Modified: branches/S2_5/tools/civmanual.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/tools/civmanual.c?rev=28737&r1=28736&r2=28737&view=diff
==============================================================================
--- branches/S2_5/tools/civmanual.c     (original)
+++ branches/S2_5/tools/civmanual.c     Tue Apr  7 05:23:57 2015
@@ -441,20 +441,21 @@
 
         requirement_vector_iterate(&pimprove->reqs, req) {
           char text[512], text2[512];
+
           fc_snprintf(text2, sizeof(text2),
                       /* TRANS: improvement requires a feature to be absent. */
                       req->negated ? _("no %s") : "%s",
                       VUT_NONE != req->source.kind
                       ? universal_name_translation(&req->source,
                                                    text, sizeof(text))
-                      : _("None"));
+                      : Q_("?req:None"));
           fprintf(doc, "%s<br/>", text2);
         } requirement_vector_iterate_end;
 
         fprintf(doc, "<em>%s</em></td>\n",
                 valid_advance(pimprove->obsolete_by)
                 ? advance_name_translation(pimprove->obsolete_by)
-                : _("None"));
+                : Q_("?tech:None"));
         fprintf(doc, "<td>%s</td>\n</tr>\n\n", buf);
       } improvement_iterate_end;
       break;


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to