bugGNU gettext - Bugs: bug #50455, gcc-internal-format: allow %s to...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #50455: gcc-internal-format: allow %s to be translated as %qs

Submitter:  Roland Illig <rillig>
Submitted:  Sat 04 Mar 2017 10:41:53 AM UTC
Votes: 1
 
Category:  Translator tools Severity:  3 - Normal
Item Group:  None Status:  Works For Me
Privacy:  Public Assigned to:  haible
Open/Closed:  Closed

Tue 17 Jun 2025 10:03:15 PM UTC, comment #2: 

This works for me (no complaint from 'msgfmt -c') if the message is marked with

#, gcc-internal-format

Whereas if it is marked with

#, c-format

msgfmt produces an error, because the letter 'q' is not valid in C format strings.

The script that adds the flags to gcc.pot is gcc's "exgettext" script, together with 'xgettext'. If there's a bug there, you'll need to report it in the gcc.gnu.org bug tracker.

Bruno Haible <haible>
Group administrator
Sat 05 Feb 2022 06:37:23 PM UTC, comment #1: 

Note that now that GCC has switched from -Wno-error=format-diag to -Werror=format-diag, the old form is becoming increasingly rare.

Eric Gallager <egallager>
Sat 04 Mar 2017 10:41:53 AM UTC, original submission:  

The current GCC still has several diagnostics that don't use %qs but stick to the old %<%s%> or even '%s'.

As a translator, I nevertheless want to use the short form %qs.

msgid "cannot open '%s'"
msgstr "%qs kann nicht geƶffnet werden"

The above should be valid. Currently the Gettext tools complain about mismatching conversion specifiers.

Roland Illig <rillig>

 

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

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 haible (Posted a comment)
  • -email is unavailable- added by egallager (Posted a comment)
  • -email is unavailable- added by egallager (Voted in favor of this item)
  • -email is unavailable- added by rillig (Submitted the item)
  •  

    There is 1 vote 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.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2025-06-17 haible StatusNone Works For Me
        Assigned toNone haible
        Open/ClosedOpen Closed
    2021-08-07 egallager Carbon-Copy- Added egallager

    Back to the top

    Powered by Savane 3.15-e6e5.
    Corresponding source code