bugPSPP - Bugs: bug #62251, Strings containing „%.*s”...

 
 

bug #62251: Strings containing „%.*s” cannot be reordered

Submitter:  None
Submitted:  Sat 02 Apr 2022 02:43:17 PM UTC
   
 
Category:  Internationalization/Localization Severity:  5 - Average
Status:  Invalid Assigned to:  None
Open/Closed:  Closed Release:  None
Effort:  0.00
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 04 Apr 2022 03:28:06 PM UTC, comment #1: 

When the conversion string has a "*", each "*" needs to have a numbered position as well.  The manpage for printf explains it this way:


       The overall syntax of a conversion specification is:

           %[$][flags][width][.precision][length modifier]conversion

       The arguments must correspond properly (after type promotion) with the conver‐
       sion specifier.  By default, the arguments are used in the order given,  where
       each  '*'  (see Field width and Precision below) and each conversion specifier
       asks for the next argument (and it is an error if  insufficiently  many  argu‐
       ments are given).  One can also specify explicitly which argument is taken, at
       each place where an argument is required, by writing "%m$" instead of '%'  and
       "*m$"  instead of '*', where the decimal integer m denotes the position in the
       argument list of the desired argument, indexed starting from 1.  Thus,

           printf("%*d", width, num);

       and

           printf("%2$*1$d", width, num);

Ben Pfaff <blp>
Group administrator
Sat 02 Apr 2022 02:43:17 PM UTC, original submission:  

Several strings contain „%.*s” arguments, and these cannot be reordered the usual way, as msgfmt complains about „%$1.*s”. with this message:

'msgstr' is not a valid C format string, unlike 'msgid'. Reason: The string refers to arguments both through absolute argument numbers and through unnumbered argument specifications.

All the other variables were numbered just fine.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by blp (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-04-04 blp StatusNone Invalid
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code