Provide the location of the original string

Bug #647378 reported by Lukas Sommer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
intltool
Triaged
Wishlist
Unassigned

Bug Description

Please provide the location of the original string (file name and line number) as extra information for the translation process. This will make it easier for translators and developers to find the original occurrence of a specific string.

Example:

1.) You are using the attached kstreamripper.desktop as template.

2.) You call "intltool-extract --quiet --type=gettext/ini RELATIVEPATH/kstreamripper.desktop"

Actual result:

char *s = N_("KStreamRipper");
char *s = N_("Recorder for Internet radios");
char *s = N_("Splits a stream in its tracks!");

Expected result:

// i18n: file: RELATIVEPATH/kstreamripper.desktop:24
char *s = N_("KStreamRipper");
// i18n: file: RELATIVEPATH/kstreamripper.desktop:25
char *s = N_("Recorder for Internet radios");
// i18n: file: RELATIVEPATH/kstreamripper.desktop:26
char *s = N_("Splits a stream in its tracks!");

Additional information:

xgettext will process these special comments and add them (as comment) to the .pot file. So you get

#. i18n: file: RELATIVEPATH/kstreamripper.desktop:24
#: rc.cpp:548
msgid "KStreamRipper"
msgstr ""

So you have the original file location available when working with the .pot file. (Also good GUI programs for translation will interpretate this as additional file location.)

Revision history for this message
Lukas Sommer (sommerluk) wrote :
Revision history for this message
Данило Шеган (danilo) wrote :

Ideally, intltool would just deal with PO files directly and insert line numbers as it sees them into appropriate place for that ("#:" comments). Also, we should start moving more and more of this functionality upstream to GNU gettext so we have less need for special handling that intltool does.

Changed in intltool:
status: New → Triaged
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.