Summary: | Alternate translations path relativeness | ||
---|---|---|---|
Product: | [Applications] lokalize | Reporter: | Karl Ove Hufthammer <karl> |
Component: | general | Assignee: | Nick Shaforostoff <shafff> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version First Reported In: | 1.5 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/lokalize/ab20f9318e59d463cfd0213fa49409bc6ef92ed6 | Version Fixed In: | |
Sentry Crash Report: |
Description
Karl Ove Hufthammer
2013-03-17 18:04:47 UTC
Note that this is on KDE 4.10, not 4.9 (the version dropdown didn’t have 4.10 as an option). Git commit c8b6a9f49f6678887a5c2d7a1080981b1655e40d by Nick Shaforostoff. Committed on 18/03/2013 at 01:37. Pushed by shaforo into branch 'KDE/4.10'. print a warn message if alttrans file was not found i cannot repro the bug, however i have added a debug message that can be seen if you run lokalize from konsole M +2 -0 src/alttransview.cpp http://commits.kde.org/lokalize/c8b6a9f49f6678887a5c2d7a1080981b1655e40d I get this debug message: alt trans file doesn't exist: "" This bug is still present in Lokalize 1.5 from KDE 4.13.1. When I open a file which should have an alternate translation file, I get this debug message: alt trans file doesn't exist: "" I think I have found what the problem is. Changing your patch like this: - qWarning()<<"alt trans file doesn't exist:"<<info.canonicalFilePath(); + qWarning()<<"alt trans file doesn't exist:"<<Project::instance()->altTransDir()+'/'+relPath; (since canonicalFilePath() returns an empty string if the file isn’t found) it turns out that Lokalize is looking the wrong folder. Example: I have the following: Root folder: /home/huftis/utvikling/skolelinux/i18n/kde4/summit/nn/summit/messages Template folder: /home/huftis/utvikling/skolelinux/i18n/kde4/summit/templates/summit/messages The “What’s this?” help for the alternative translation folder says that it should have a similar structure as the root folder. So I set it to Alt trans. folder: /home/huftis/utvikling/skolelinux/i18n/kde4/summit/nb/summit/messages In other words, both the root, template and alternative translations folders are identical except the language code (= ‘templates’ for the template folder). But the console message says that Lokalize looks into /home/huftis/utvikling/skolelinux/i18n/kde4/summit/nb/summit/messages/./summit/messages/kdelibs/kdelibs4.po Change the folder for alternative translations to /home/huftis/utvikling/skolelinux/i18n/kde4/summit/nb fixes things. But I don’t understand how (and why) Lokalize decides to use a path relative to /home/huftis/utvikling/skolelinux/i18n/kde4/summit/‘??’, instead of relative to the root folder, which would be the natural choice (and which is used for the templates settings). Git commit ab20f9318e59d463cfd0213fa49409bc6ef92ed6 by Adrián Chaves. Committed on 19/10/2019 at 14:24. Pushed by adrianchavesfernandez into branch 'master'. Fix alternative translation path building Test Plan: Tested manually Differential Revision: https://phabricator.kde.org/D24296 M +1 -1 src/alttransview.cpp https://commits.kde.org/lokalize/ab20f9318e59d463cfd0213fa49409bc6ef92ed6 |