Skip to content

Use relative paths in extracted pot file? #58

@Daniel15

Description

@Daniel15

I'm extracting strings from both C# code (using GetText.NET extractor) and GNOME Blueprint files (which use regular gettext), then using msgcat to combine them into one .pot file. I'm running a command like this to extract the C# strings:

GetText.Extractor -u -as '_' -t /tmp/csharpmessages.pot 

Which results in strings like these:

#: ../../home/daniel/src/WebCamControl/src/WebCamControl.Gtk/MiniWindow.cs:82
msgid ""
"No saved preset. Use the 'Save Preset' menu option or press Ctrl+S to save "
"one."
msgstr ""

#: ../../home/daniel/src/WebCamControl/src/WebCamControl.Gtk/MiniWindow.cs:77
#, csharp-format
msgid "Apply preset \"{0}\""
msgstr ""

...

I'm running GetText.Extractor from the /home/daniel/src/WebCamControl/ directory.

Is there a way to make the paths relative to the current directory rather than the target directory? I'd like the paths to just be src/WebCamControl.Gtk/MiniWindow.cs rather than ../../home/daniel/src/WebCamControl/src/WebCamControl.Gtk/MiniWindow.cs, which would be consistent with how xgettext does it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions