bugGNU gettext - Bugs: bug #48872, msgfmt.exe doesn't show format...

 
 

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

bug #48872: msgfmt.exe doesn't show format specification error in msgstr[0]

Submitted by:  None
Submitted on:  Tue 23 Aug 2016 04:08:25 PM UTC  
 
Category: Translator toolsSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Sun 28 Aug 2016 05:06:14 PM UTC, comment #1:

To clarify: the submitter originally posted this as a Poedit bug (see https://groups.google.com/forum/#!msg/poedit/vlEQ55jdabo/zGAwYanLBQAJ).

It’s fine that msgfmt -c doesn’t complain about the lack of {selnum} in msgstr[0] (singular). That’s of course desirable, because some languages strongly prefer to express “1 something” without using the “1” number.

What isn’t fine is that it doesn’t complain about other errors such as the above example {selnum123}, which are unrelated to this singular special case. The error given (lack of selnum) for msgstr[1] is misleading, but if you use “{selnum} {selnum123} of {maxnum}" instead, you get the expected "a format specification for argument 'selnum123' doesn't exist in 'msgid_plural’”… That’s something that should be reported for singular translations & msgid as well.

Vaclav Slavik <vslavik>
Tue 23 Aug 2016 04:08:25 PM UTC, original submission:

I have following code in test.po file:

========================================================
#: test.py:8
#, python-brace-format
msgid "[{selnum} of {maxnum} object selected]"
msgid_plural "[{selnum} of {maxnum} objects selected]"
msgstr[0] "[{selnum123} von {maxnum} Objekt selektiert]"
msgstr[1] "[{selnus} von {maxnum} Objekten selektiert]"
========================================================

{selnum123} in msgstr[0] shows no format specification error from 'msgfmt.exe' if you run with option '--check'.

The same problem, if:
msgstr[0] "[{selnum} {selnum123} von {maxnum} Objekt selektiert]"

If you use a wrong specification in msgstr[1] its raise an error properly. Also if you work without plural.

Anonymous

 

Attached Files
file #38330:  test.po added by None (681B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by haible (Updated the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 27 Nov 2016 12:17:53 PM UTChaibleCategoryNone=>Translator tools
    Tue 23 Aug 2016 04:08:25 PM UTCNoneAttached File-=>Added test.po, #38330

    Back to the top


    Powered by Savane 3.1-cleanup1