bugGNU gettext - Bugs: bug #64333, "fr.po:3087: 'msgstr' is not...

 
 

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

bug #64333: "fr.po:3087: 'msgstr' is not a valid C format string, unlike 'msgid'" error when building fontforge

Submitter:  Sam James <thesamesam>
Submitted:  Wed 21 Jun 2023 08:18:43 PM UTC
   
 
Category:  Programmer tools Severity:  3 - Normal
Item Group:  None Status:  Answer Provided
Privacy:  Public Assigned to:  haible
Open/Closed:  Closed

Wed 21 Jun 2023 09:06:17 PM UTC, comment #2: 

Until the translators have fixed this, possible workarounds are:
- Mark the relevant messages in it.po and fr.po with '#, fuzzy', or
- Remove 'it' and 'fr' from the LINGUAS file.

Bruno Haible <haible>
Group administrator
Wed 21 Jun 2023 08:50:46 PM UTC, comment #1: 

The relevant lines of the it.po file are:

#, c-format
msgid ""
"Font %1$.40s in file %2$.40s has been changed.\n"
"Reverting the file will lose those changes.\n"
"Is that what you want?"
msgstr ""
"Il font %1$.40s nel file %2$.40hs è stato modificato.\n"
"Ripristinando il file perderai tutte le modifiche.\n"
"È quello che vuoi fare?"


#, c-format
msgid ""
"The glyph %1$.30s has a different number of contours in font %2$.30s than in "
"%3$.30s"
msgstr ""
"Il glifo %1$.30s ha un diverso numero di contorni nel font %2$.30hs rispetto "
"a %3$.30s"


#, c-format
msgid ""
"This font is based on the charset %1$.20s-%2$.20s-%3$d, but the best I've "
"been able to find is %1$.20s-%2$.20s-%4$d.\n"
"Shall I use that or let you search?"
msgstr ""
"Questo font è basato sulla codifica di caratteri %1$.20s-%2$.20hs-%3$d, ma "
"il migliore che io abbia trovato è %1$.20hs-%2$.20hs-%4$d.\n"
"Devo usare questo valore o preferisci cercare tu stesso?"


A directive %hs is invalid, according to the references of https://www.gnu.org/software/gettext/manual/html_node/c_002dformat.html .

This needs to be fixed by the translator.

The relevant lines of the fr.po file are:

#, c-format
msgid "%1$.80s at %2$d from %3$.90s%4$s"
msgstr "%1$.80s à %2$d de %3$.90hs%4$s"


#, c-format
msgid "%1$.80s at %2$d size %3$d from %4$.80s"
msgstr "%1$.80s (%2$d) taille %3$d de %4$.80hs"


Here too, a directive %hs is invalid, according to the references of https://www.gnu.org/software/gettext/manual/html_node/c_002dformat.html .

This needs to be fixed by the translator.

Older versions of msgfmt were more sloppy, thus allowing such mistakes to cause bugs at runtime.

Bruno Haible <haible>
Group administrator
Wed 21 Jun 2023 08:18:43 PM UTC, original submission:  

I get the following build failure for fontforge w/ gettext-0.22. I don't know if the .po file from the project is wrong or not, though.

```
[228/278] cd /var/tmp/portage/media-gfx/fontforge-20230101/work/fontforge-20230101_build/po && /usr/bin/msgfmt --check -o /var/tmp/portage/media-gfx/fontforge-20230101/work/fontforge-20230101_build/po/it.mo /var/tmp/portage/media-gfx/fontforge-20230101/work/fontforge-20230101/po/it.po
FAILED: po/it.mo /var/tmp/portage/media-gfx/fontforge-20230101/work/fontforge-20230101_build/po/it.mo
cd /var/tmp/portage/media-gfx/fontforge-20230101/work/fontforge-20230101_build/po && /usr/bin/msgfmt --check -o /var/tmp/portage/media-gfx/fontforge-20230101/work/fontforge-20230101_build/po/it.mo /var/tmp/portage/media-gfx/fontforge-20230101/work/fontforge-20230101/po/it.po
/var/tmp/portage/media-gfx/fontforge-20230101/work/fontforge-20230101/po/it.po:2305: 'msgstr' is not a valid C format string, unlike 'msgid'. Reason: In the directive number 2, the argument size specifier is invalid.
/var/tmp/portage/media-gfx/fontforge-20230101/work/fontforge-20230101/po/it.po:5837: 'msgstr' is not a valid C format string, unlike 'msgid'. Reason: In the directive number 2, the argument size specifier is invalid.
/var/tmp/portage/media-gfx/fontforge-20230101/work/fontforge-20230101/po/it.po:6237: 'msgstr' is not a valid C format string, unlike 'msgid'. Reason: In the directive number 2, the argument size specifier is invalid.
/usr/bin/msgfmt: found 3 fatal errors
[229/278] cd /var/tmp/portage/media-gfx/fontforge-20230101/work/fontforge-20230101_build/po && /usr/bin/msgfmt --check -o /var/tmp/portage/media-gfx/fontforge-20230101/work/fontforge-20230101_build/po/fr.mo /var/tmp/portage/media-gfx/fontforge-20230101/work/fontforge-20230101/po/fr.po
FAILED: po/fr.mo /var/tmp/portage/media-gfx/fontforge-20230101/work/fontforge-20230101_build/po/fr.mo
cd /var/tmp/portage/media-gfx/fontforge-20230101/work/fontforge-20230101_build/po && /usr/bin/msgfmt --check -o /var/tmp/portage/media-gfx/fontforge-20230101/work/fontforge-20230101_build/po/fr.mo /var/tmp/portage/media-gfx/fontforge-20230101/work/fontforge-20230101/po/fr.po
/var/tmp/portage/media-gfx/fontforge-20230101/work/fontforge-20230101/po/fr.po:294: 'msgstr' is not a valid C format string, unlike 'msgid'. Reason: In the directive number 3, the argument size specifier is invalid.
/var/tmp/portage/media-gfx/fontforge-20230101/work/fontforge-20230101/po/fr.po:305: 'msgstr' is not a valid C format string, unlike 'msgid'. Reason: In the directive number 4, the argument size specifier is invalid.
```

I've attached both it.po and fr.po. Originally reported downstream in Gentoo at https://bugs.gentoo.org/908868.

Sam James <thesamesam>

 

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

Attached Files
file #54854:  it.po added by thesamesam (173KiB - application/octet-stream)
file #54855:  fr.po added by thesamesam (696KiB - application/octet-stream)

 

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 thesamesam (Submitted the item)
  •  

    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.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-06-21 haible CategoryEnd-user / runtime Programmer tools
        StatusNone Answer Provided
        Assigned toNone haible
        Open/ClosedOpen Closed
    2023-06-21 thesamesam Attached File- Added it.po, #54854
        Attached File- Added fr.po, #54855

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code