Bug #647378 “Provide the location of the original string” : Bugs : intltool (original) (raw)
Provide the location of the original string
Bug #647378 reported byLukas Sommer on 2010-09-25
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.)