Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2001:
[Freeciv-Dev] Re: Nonformat string marked as c-format
Home

[Freeciv-Dev] Re: Nonformat string marked as c-format

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: sigra@xxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Nonformat string marked as c-format
From: Gaute B Strokkenes <gs234@xxxxxxxxx>
Date: Sun, 08 Jul 2001 15:54:53 +0200

On Thu, 5 Jul 2001, sigra@xxxxxxx wrote:
> Thursday 05 July 2001 11:55 skrev Christian Knoke:
>> Am Donnerstag,  5. Juli 2001 11:47 schrieben Sie:
>> > from the freeciv.pot:
>> >
>> > #: server/stdinhand.c:549 , c-format msgid "" "A Diplomat or Spy
>> > #acting against a city which has one or more defending "
>> > #"Diplomats or Spies has a diplchance (percent) chance to defeat
>> > #each such " "defender.  Also, the chance of a Spy returning from
>> > #a successful mission is " "diplchance percent.  (Diplomats never
>> > #return.)  Also, a basic chance of " "success for Diplomats and
>> > #Spies.  Defending Spys are generally twice as " "capable as
>> > #Diplomats, veteran units 50% more capable than non-veteran
>> > #ones." msgstr ""
>> >
>> >
>> > Why is it marked as c-format when no substitutions should be
>> > done? It bothers msgfmt -c. Not only for sv.po.
>>
>> I guess, the reason is that the percent sign isn't doubled.
> 
> That is most likely the actual reason but it is still not a valid
> reason. It shouldn't be marked as c-format.

Please try the following patch.  If you can find any other strings
that are marked as c-format but should not be, please point them out
(file name and line number will do).

I'll see if I can convince the gettext maintainer to make an excpetion
for percent signs followed by a space.  It seems to me to be a pretty
common case, and it's meaningless in a printf-like format string
anyway.

--- stdinhand.c.orig    Sun Jul  8 15:36:27 2001
+++ stdinhand.c Sun Jul  8 15:37:01 2001
@@ -546,6 +546,7 @@
     SSET_RULES_FLEXIBLE, SSET_TO_CLIENT,
     GAME_MIN_DIPLCHANCE, GAME_MAX_DIPLCHANCE, GAME_DEFAULT_DIPLCHANCE,
     N_("Chance in diplomat/spy contests"),
+    /* xgettext:no-c-format */
     N_("A Diplomat or Spy acting against a city which has one or more "
        "defending Diplomats or Spies has a diplchance (percent) chance to "
        "defeat each such defender.  Also, the chance of a Spy returning "

-- 
Big Gaute                               http://www.srcf.ucam.org/~gs234/
Where's my SOCIAL WORKER?


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