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

... for better scaling (and more variety).

Index: server/report.c
===================================================================
--- server/report.c     (revision 14347)
+++ server/report.c     (working copy)
@@ -158,25 +158,38 @@
          ((const struct player_score_entry *)a)->value);
 }
 
+/* prime number of entries makes for better scaling */
 static const char *greatness[] = {
-  /* TRANS: <1>: The <ranking> Poles */
+  /* TRANS: <#>: The <ranking> Poles */
+  N_("%2d: The Supreme %s"),
+  /* TRANS: <#>: The <ranking> Poles */
   N_("%2d: The Magnificent %s"),
-  /* TRANS: <2>: The <ranking> Poles */
+  /* TRANS: <#>: The <ranking> Poles */
   N_("%2d: The Great %s"),
-  /* TRANS: <3>: The <ranking> Poles */
+  /* TRANS: <#>: The <ranking> Poles */
   N_("%2d: The Glorious %s"),
-  /* TRANS: <4>: The <ranking> Poles */
+  /* TRANS: <#>: The <ranking> Poles */
   N_("%2d: The Excellent %s"),
-  /* TRANS: <5>: The <ranking> Poles */
+  /* TRANS: <#>: The <ranking> Poles */
+  N_("%2d: The Eminent %s"),
+  /* TRANS: <#>: The <ranking> Poles */
+  N_("%2d: The Distinguished %s"),
+  /* TRANS: <#>: The <ranking> Poles */
   N_("%2d: The Average %s"),
-  /* TRANS: <6>: The <ranking> Poles */
+  /* TRANS: <#>: The <ranking> Poles */
   N_("%2d: The Mediocre %s"),
-  /* TRANS: <7>: The <ranking> Poles */
+  /* TRANS: <#>: The <ranking> Poles */
+  N_("%2d: The Ordinary %s"),
+  /* TRANS: <#>: The <ranking> Poles */
   N_("%2d: The Pathetic %s"),
-  /* TRANS: <8>: The <ranking> Poles */
+  /* TRANS: <#>: The <ranking> Poles */
   N_("%2d: The Useless %s"),
-  /* TRANS: <9>: The <ranking> Poles */
+  /* TRANS: <#>: The <ranking> Poles */
+  N_("%2d: The Valueless %s"),
+  /* TRANS: <#>: The <ranking> Poles */
   N_("%2d: The Worthless %s"),
+  /* TRANS: <#>: The <ranking> Poles */
+  N_("%2d: The Wretched %s"),
 };
 
 /**************************************************************************
@@ -219,18 +232,14 @@
   qsort(size, j, sizeof(size[0]), secompare);
   buffer[0] = '\0';
   for (i = 0; i < j; i++) {
-    if (i == 0 || size[i].value < size[i - 1].value) {
-      if (i >= sizeof(greatness)) {
-        rank = sizeof(greatness) - 1;
-      } else if (j >= sizeof(greatness)) {
-        rank = i;
-      } else {
-        rank = (i * sizeof(greatness)) / j;
-      }
+    if (i >= sizeof(greatness)) {
+      rank = sizeof(greatness) - 1;
+    } else if (i > 0 && size[i].value < size[i - 1].value) {
+      rank = (i * sizeof(greatness)) / j;
     }
     cat_snprintf(buffer, sizeof(buffer),
                 _(greatness[rank]),
-                rank + 1,
+                i + 1,
                 nation_plural_for_player(size[i].player));
     mystrlcat(buffer, "\n", sizeof(buffer));
   }
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to