This is only a read-only copy of the old bug tracker. See the support page.

Ticket #148 (closed defect: fixed)

Opened 7 years ago

Last modified 23 months ago

msgctxt support

Reported by: andreaspauley@… Owned by: Vaclav Slavik
Priority: blocker Milestone: 1.5
Component: File formats Version: 1.4.5
Keywords: msgctxt ui Cc: andreaspauley@…, vslavik, intersol@…, tiber@…, riot69@…, pknbe@…, sflaniga@…, skaurus@…
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 7 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 7 years ago by stikonas@…

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

  Changed 7 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 7 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 6 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 6 years 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 5 years ago by Janis

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

in reply to: ↑ 7   Changed 5 years 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 5 years ago by sflaniga@…

  • cc sflaniga@… added

  Changed 5 years 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 5 years ago by Vaclav Slavik

  • cc stikonas@… removed

  Changed 4 years ago by Vaclav Slavik

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

  Changed 3 years ago by podarok@…

This is must fix issue!
Drupal 7 use msgctxt and many translators use poedit as main instrument for translation
But when removing msgctxt - string very often are broken with wrong translations 8(((

  Changed 3 years ago by anonymous

  • version changed from 1.4.2 to 1.4.5

follow-up: ↓ 16   Changed 3 years ago by Michael

There is really a strong need for fixing that issue. I ran across that problem when creating .po/.mo files for a Wordpress translation. Msgctxt not being included by poEdit kills the use of comments for translators in Wordpress theme and plugin files.

Perhaps my post in the Wordpress.org forums will help you if you encounter problems with poEdit and Wordpress:  http://wordpress.org/support/topic/need-help-translate-custom-post-types-label?replies=11#post-2272256 It took me some hours to find out that the problem was actually that missing feature of poEdit.

in reply to: ↑ 15   Changed 3 years ago by Vaclav Slavik

Replying to Michael:

There is really a strong need for fixing that issue.

What value does this "me too" post add to this ticket, exactly? Yes, I am aware of the bug, yes, it will be fixed. Sadly, resources are limited. The more help I get, the faster it will be done.

  Changed 3 years ago by skaurus@…

  • cc skaurus@… added

  Changed 2 years ago by mick@…

OMG. 5-year old bug. 9 months since "it will be fixed".

Guys, how can we help you moving forward? Donation? Buy you a beer?

Do you realize that your product is a major drive in a commercial WordPress? space? Why don't you help yourself by monetazing it?

Thank a lot anyway!

  Changed 2 years ago by anonymous

Useless non-technical "OMG!!! WTF?!? I want this too!!!" comments that waste everybody's time certainly don't help anybody and don't motivate developers either. Please refrain from it.

  Changed 23 months ago by Václav Slavík

  • status changed from assigned to closed
  • resolution set to fixed

Show message context in the UI.

Fixes #148.

Changeset: 6c68959e72ab975a5b32193efe0b45dc65df07eb

  Changed 23 months ago by anonymous

Yay! Thanks!

Do you have any timelines of next release with this feature included?

  Changed 23 months ago by Vaclav Slavik

Today.

Poedit uses Sparkle and WinSparkle, so you get notified of a new version (and of course, Linux distros are even better at this).

  Changed 23 months ago by Václav Slavík

Show message context in the UI.

Fixes #148.

Changeset: 6c68959e72ab975a5b32193efe0b45dc65df07eb

Note: See TracTickets for help on using tickets.