Bug 267309 - Translation of Add in time adjust tool does not come from right .mo file
Summary: Translation of Add in time adjust tool does not come from right .mo file
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Usability-i18n (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-28 14:57 UTC by Freek de Kruijf
Modified: 2021-12-30 16:09 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.2.0


Attachments
timeadjust window with wrong translation (60.91 KB, image/png)
2011-02-28 14:57 UTC, Freek de Kruijf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Freek de Kruijf 2011-02-28 14:57:21 UTC
Created attachment 57573 [details]
timeadjust window with wrong translation

Version:           1.7.0 (using KDE 4.5.5) 
OS:                Linux

There is string "Add" in kipiplugin_timeadjust.pot. In the Dutch translation this is translated to "Bijtellen". However, as can be seen in the attached picture, in the red ellips, the used translation is "Toevoegen". However "Toevoegen" is not in the file /usr/share/locale/nl/LC_MESSAGES/kipiplugin_timeadjust.mo

prompt:~> strings -3 /usr/share/locale/nl/LC_MESSAGES/kipiplugin_timeadjust.mo | grep Add -B1 -A1
A Kipi plugin for adjusting the timestamp of picture files
Add
Adjust
prompt:~> strings -3 /usr/share/locale/nl/LC_MESSAGES/kipiplugin_timeadjust.mo | grep Toevoegen -B1 -A1
prompt:~> strings -3 /usr/share/locale/nl/LC_MESSAGES/kipiplugin_timeadjust.mo | grep Bijtellen -B1 -A1
Een KIPI-plugin voor het aanpassen van datums en tijden van afbeeldingsbestanden
Bijtellen
Bijstellen
freek@eik113:~>

Reproducible: Didn't try

Steps to Reproduce:
Just open timeadjust in digikam with the Dutch locale.

Actual Results:  
See picture

Expected Results:  
Instead of "Toepassen", "Bijtellen" shoeld be shown.
Comment 2 Alexander Potashev 2011-03-06 13:25:44 UTC
The solution is to add a context string (use i18nc() instead of i18n()).
Comment 3 Frederik Schwarzer 2011-03-06 17:10:12 UTC
As I understand it, the problem is, that Gettext finds the exact same string in some underlying layer like KDELibs that is already loaded and just reuses the translation.

So yes, adding a context helps here.
Comment 4 Freek de Kruijf 2011-09-21 11:55:41 UTC
Has the context been added? If so, please change the status to FIXED.
Comment 5 caulier.gilles 2011-09-21 12:02:41 UTC
Freek,

Nothing changed yet. Look link to source code at #1

Solution is very easy (see #2)

Fell free to patch code in git master...

Gilles Caulier
Comment 6 caulier.gilles 2011-09-21 13:12:23 UTC
Git commit aafe602bf0b27ef2c4c7eed1b01bb0530accde24 by Gilles Caulier.
Committed on 21/09/2011 at 15:11.
Pushed by cgilles into branch 'master'.

add contect info for tanslators
BUGS: 267309

M  +4    -4    timeadjust/timeadjustdialog.cpp

http://commits.kde.org/kipi-plugins/aafe602bf0b27ef2c4c7eed1b01bb0530accde24
Comment 7 Freek de Kruijf 2012-06-27 10:27:18 UTC
Many thanks for your work.