Provide the location of the original string
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.
2.) You call "intltool-extract --quiet --type=gettext/ini RELATIVEPATH/
Actual result:
char *s = N_("KStreamRipp
char *s = N_("Recorder for Internet radios");
char *s = N_("Splits a stream in its tracks!");
Expected result:
// i18n: file: RELATIVEPATH/
char *s = N_("KStreamRipp
// i18n: file: RELATIVEPATH/
char *s = N_("Recorder for Internet radios");
// i18n: file: RELATIVEPATH/
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/
#: 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.)
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.