bugGNU gettext - Bugs: bug #55811, msgen generates blank msgstr[0] if...

 
 

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

bug #55811: msgen generates blank msgstr[0] if "nplurals=1; plural=0"

Submitter:  UTUMI Hirosi <utuhiro>
Submitted:  Sat 02 Mar 2019 05:48:10 PM UTC
   
 
Category:  Translator tools Severity:  3 - Normal
Item Group:  None Status:  Not a Bug
Privacy:  Public Assigned to:  haible
Open/Closed:  Closed

Tue 05 Mar 2019 02:12:51 PM UTC, comment #3: 


> The bug is a bug.

It's not a bug, because you are not giving to msgen the input that it expects to get (according to the documentation).

> I don't know why you want to know it.

I asked because I want to understand what is the best way to improve the gettext tools.

The suggestion you made would be implementable for Japanese, but not for other locales such as Russian or Polish.

> I use it for automatic translation. Write msgstr messages to a HTML file -> Translate it by Google Translate -> Copy the translated texts and paste them to a text file -> Convert it to a PO file.

There are surely ways to do this without 'msgen'.

Using automatic translation as a first step towards a good translation is an interesting approach. Unfortunately it does not make sense for the GNU gettext tools to support this, because the Google Translation services are not free (1. they are cloud services, 2. the user needs to pay for them, see https://cloud.google.com/translate/pricing ), and I am not aware of free translation services of reasonable quality.

Bruno Haible <haible>
Group administrator
Tue 05 Mar 2019 11:20:27 AM UTC, comment #2: 


> I don't see what you would want to do with that result.


I don't know why you want to know it. The bug is a bug. msgen doesn't write English messages to msgstr[0] in some locales. That's all.

I wrote a tool to do that for me. I use it for automatic translation.
Write msgstr messages to a HTML file -> Translate it by Google Translate -> Copy the translated texts and paste them to a text file -> Convert it to a PO file.

I found msgen and tested it for the tool. msgen didn't work properly in Japanese locale.

Anyway, I don't need msgen now. Thanks.

UTUMI Hirosi <utuhiro>
Sun 03 Mar 2019 06:18:15 PM UTC, comment #1: 

The documentation https://www.gnu.org/software/gettext/manual/html_node/msgen-Invocation.html says "The msgen program creates an English translation catalog. The input file is the last created English PO file, or a PO Template file (generally created by xgettext)."

You are invoking msgen with an argument that is a Japanese PO file, neither an English PO file nor a PO Template file.

What are you trying to do? If you want a PO file that contains

nplurals=1

but also

msgid "Delete this photo from camera?"
msgid_plural "Delete these %d photos from camera?"
msgstr[0] "Delete these %d photos from camera?"

then that PO file is neither Japanese nor English. I don't see what you would want to do with that result.

Bruno Haible <haible>
Group administrator
Sat 02 Mar 2019 05:48:10 PM UTC, original submission:  

$ wget https://l10n.gnome.org/POT/shotwell.master/shotwell.master.pot
$ msginit -l ja -i shotwell.master.pot -o shotwell.master.ja.po
$ msgen shotwell.master.ja.po -o shotwell.master.ja.po.en

Open shotwell.master.ja.po.en.

> #: src/camera/ImportPage.vala:1764
> #, c-format
> msgid "Delete this photo from camera?"
> msgid_plural "Delete these %d photos from camera?"
> msgstr[0] ""


msgstr[0] should be "Delete these %d photos from camera?" in this case.

UTUMI Hirosi <utuhiro>

 

(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)
  •  

    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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-03-03 haible StatusNone Not a Bug
        Assigned toNone haible
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code