Bug 292985 - Support for transforming PO and template file names
Summary: Support for transforming PO and template file names
Status: CONFIRMED
Alias: None
Product: lokalize
Classification: Applications
Component: project management (other bugs)
Version First Reported In: 1.3
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: Nick Shaforostoff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-31 17:44 UTC by Karl Ove Hufthammer
Modified: 2012-01-31 21:55 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karl Ove Hufthammer 2012-01-31 17:44:49 UTC
Version:           1.3 (KDE 4.7) (using KDE 4.7.4) 
OS:                Linux

This is a feature request. It would be nice if Lokalize could support patterns in the PO and template names in projects. Example:

In openSUSE templates are named application.pot, but the translation files are named application.languagecode.po, e.g., live-installer.nn.po. If I fill in the correct template folder, the templates are not matched with the translated files, giving duplicate entries for each application.

So the request is for some sort of pattern or ‘search-and-replace’ support in the file names used for template files, translation files, branch translation files and alternate translation files.

Reproducible: Always



Expected Results:  
No duplicate files shown when both a template and a translation file exists. Clicking on a template file when the translation doesn’t exist should open a new translation file with the correct (transformed) file name.

OS: Linux (x86_64) release 3.1.0-1.2-desktop
Compiler: gcc
Comment 1 Nick Shaforostoff 2012-01-31 21:24:51 UTC
ok, but the general folder hierarchy is the same:
templates/aaa.pot
LANG/aaa-LANG-po
right?
Comment 2 Karl Ove Hufthammer 2012-01-31 21:55:23 UTC
Actually, it’s a bit more complicated. Here’s the complete structure:

yast/50-pot/live-installer.pot → yast/nn/po/live-installer.nn.po
lcn/50-pot/bootloader.pot → lcn/nn/po/bootloader.nn.po
…

Basically, ‘50-pot’ in templates should be replaced by ‘langcode/po’ in the PO path, and ‘.pot’ with ‘.langcode.po’.

See https://svn.opensuse.org/svn/opensuse-i18n/trunk/

No, it’s not pretty, but that’s what we’re stuck with, and it would be nice if it was supported. :-/