Ticket #148 (assigned defect)

Opened 3 years ago

Last modified 5 weeks ago

msgctxt support

Reported by: andreaspauley@… Owned by: Vaclav Slavik
Priority: blocker Milestone: 1.5
Component: File formats Version: 1.4.2
Keywords: msgctxt ui Cc: andreaspauley@…, vslavik, intersol@…, tiber@…, riot69@…, pknbe@…, sflaniga@…
Platform: any

Description (last modified by Vaclav Slavik) (diff)

poEdit currently removes msgctxt lines from po files when saving the file (tested in poEdit 1.3.4).

I think it is critical that poEdit keeps the msgctxt information (as a starting point for msgctxt support).

A lesser priority (but also important) would be to edit msgctxt.

msgctxt was introduced in gettext 0.15

Some localization projects have already started using this.
As an example, the KDE project are replacing their own msgid comments (_:) with msgctxt.

Relevant info from the gettext info page:

It is also possible to have entries with a context specifier. They

look like this:

WHITE-SPACE
# TRANSLATOR-COMMENTS
#. EXTRACTED-COMMENTS
#: REFERENCE...
#, FLAG...
#| msgctxt PREVIOUS-CONTEXT
#| msgid PREVIOUS-UNTRANSLATED-STRING
msgctxt CONTEXT
msgid UNTRANSLATED-STRING
msgstr TRANSLATED-STRING

The context serves to disambiguate messages with the same

UNTRANSLATED-STRING. It is possible to have several entries with the
same UNTRANSLATED-STRING in a PO file, provided that they each have a
different CONTEXT. Note that an empty CONTEXT string and an absent
`msgctxt' line do not mean the same thing.

(Imported from SourceForge.net tracker item  #1680554)

Attachments

Change History

  Changed 3 years ago by intersol@…

I think is this must.

Does this means that we are not going to see the duplicate message id message if we have different id?

  Changed 3 years ago by stikonas@…

Changing msgctxt will break some translations. Context messages should be changed only by developers.

  Changed 3 years ago by tiber@…

I second this. POEdit should really take care of msgctxt's. They should not be editable, because they are part of the msgid somehow, but they should be shown to the translator and they should be included in the generared mo-File (In the mo-File a msgid becomes (msgctx + "\004" + msgid)).

  Changed 3 years ago by Vaclav Slavik

msgctxt parsing is fixed in SVN, will be in 1.3.8. No UI yet, leaving the bug open for that.

  Changed 2 years ago by riot69@…

GNOME is also going to drop its own msgid comments (context|) in favor of msgctxt[1]. Evolution (GNOME's mail application) has recently done this[2] to have less error-prone pot files, and other modules will follow soon.
I'm not a coder so I can't help here, but this should have a higher priority for poedit (also with regard to KAider[3] and gtranslator[4] both supporting msgctxt) if you don't want to lose ground.

[1]  http://live.gnome.org/GnomeGoals/MsgctxtMigration
[2]  http://mail.gnome.org/archives/gnome-i18n/2008-August/msg00036.html
[3]  http://lists.kde.org/?l=kde-i18n-doc&m=118236379821754&w=2 and according to #kde-i18n on freenode
[4]  http://mail.gnome.org/archives/gnome-i18n/2008-January/msg00238.html

  Changed 21 months ago by pknbe@…

  • cc pknbe@… added
  • platform set to any

Any news on this? More and more GNOME modules are being migrated to use msgctxt, not all of them are listed on [1] though (see the link above). Recently, GTK+ has been completed with the total number of 247 migrated strings now using the context information that Poedit can't display, unfortunately.

As has been implied above, I consider it a major drawback to Poedit use, in comparison to other widely used editors. Please consider raising the priority. Thank you!

follow-up: ↓ 8   Changed 17 months ago by Janis

Please, consider this feature! Yii framework requires context for messages too.

in reply to: ↑ 7   Changed 17 months ago by Vaclav Slavik

  • description modified (diff)

Replying to Janis:

Please, consider this feature! Yii framework requires context for messages too.

If finishing this wouldn't be planed, this ticket would already be closed (I'd expect this to be quite obvious, but that's just me). Please consider not polluting the tracker with useless comments that add nothing to the discussion (unlike, say, a patch implementing the feature...).

  Changed 16 months ago by sflaniga@…

  • cc sflaniga@… added

  Changed 15 months ago by Vaclav Slavik

  • keywords msgctxt ui added
  • priority changed from normal to high
  • version set to 1.4.2
  • milestone set to 1.5

  Changed 15 months ago by Vaclav Slavik

  • cc stikonas@… removed

  Changed 4 months ago by Vaclav Slavik

  • priority changed from high to blocker
  • component set to File formats

Add/Change #148 (msgctxt support)

Author


E-mail address and user name can be saved in the Preferences.


Change Properties
<Author field>
Action
as assigned
as The resolution will be set. Next status will be 'closed'
to The owner will change from vslavik. Next status will be 'assigned'
The owner will change from vslavik to anonymous. Next status will be 'accepted'
 
Note: See TracTickets for help on using tickets.