Comment 2 for bug 912008

Revision history for this message
Byrial Jensen (byrial-t) wrote : Re: [Bug 912008] Re: Wish: View source function

Hi,

Kenneth

Ad 1) Traditionally you use environment variables VISUAL and EDITOR to
indicate your prefered editor to other programs. See for instance this
documented on this Ubuntu help page:
https://help.ubuntu.com/community/EnvironmentVariables#Preferred_application_variables

However that way you don't know how to position the editor on a certain
line.

So instead I imagine that the user simply make a command string with
placeholders for file name and line number in poproofread's
configuration. It could for instance be

   "kate -l %l %f"

for a KDE user, or

   "gedit %f +%l"

for a GNOME user if the placeholders are %f and %l.

Ad 2) I imagined that the first time you use the view source function
for a given po file, poproofread would ask the user where the source is
located. The user should then give the directory that the source
references in the po file are relative to. Thus it would be the
responsibility of the user to provide the right source tree.

If you wish, you could also add support for a URL for the location of
the source, and it that case launche a webbrowser instead of an editor.