Bug 266761 - "Molar mass calculator" widget is not translated
Summary: "Molar mass calculator" widget is not translated
Status: RESOLVED FIXED
Alias: None
Product: kalzium
Classification: Unclassified
Component: Calculator (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Kalzium Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-20 22:15 UTC by Alexander Potashev
Modified: 2011-07-22 13:22 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Potashev 2011-02-20 22:15:30 UTC
Version:           unspecified (using KDE 4.6.0) 
OS:                Linux

The majority of the strings in the widget "Molar mass calculator" and in its configuration dialog are not translated (there are in English). For example:
- "Molecule:"
- " u" (the unit of atomic mass)

I use Russian localization, the file plasma_applet_Molmasscalculator.po is totally translated (though there are only 9 strings!), the file plasma_applet_Molmasscalculator.mo is here (in /usr/share/locale/ru/LC_MESSAGES/).

Reproducible: Always
Comment 1 Etienne 2011-02-20 23:13:40 UTC
SVN commit 1221880 by erebetez:

also extract the ui settings file from the molmass calculator.
CCBUG:266761

 M  +1 -0      Messages.sh  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1221880
Comment 2 Etienne 2011-02-20 23:20:18 UTC
Thanks Alexander.

I can also reproduce it in german. (With kalzium from trunk. But I have the
current i18n packages from arch, kde 4.6.0)
The .desktop file was updated a couple of times since 4.6.0 was realesed
(russian -> 1221574).
Comment 3 Alexander Potashev 2011-02-21 13:30:51 UTC
@Etienne: Please, backport the fix for Messages.sh to 4.6.
Comment 4 Burkhard Lück 2011-02-21 15:46:44 UTC
@Etienne: 
The applet tries to load the translation catalog plasma_applet_molmassCalculator via K_EXPORT_PLASMA_APPLET ( molmassCalculator, ..., but the messages are extracted to plasma_applet_Molmasscalculator.pot.
To get the applet translated, either 
1) use K_EXPORT_PLASMA_APPLET ( Molmasscalculator, ...
or
2) change extraction to 
$XGETTEXT *.cpp -o $podir/plasma_applet_Molmasscalculator.pot

In the latter case you have to mail kde-i18n-doc, the translation team has to rename all existing translations accordingly.
Comment 5 Etienne 2011-02-21 19:34:56 UTC
SVN commit 1222094 by erebetez:

Fixing applet translation by correcting the case (typo) in the K_EXPORT_PLASMA_APPLET macro.
Thanks Burkhard Lueck for the hint.
CCBUG: 266761

 M  +1 -1      Molmasscalculator.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1222094
Comment 6 Alexander Potashev 2011-02-22 21:36:15 UTC
I expect " u" (the unit of atomic mass) and "K" to be still untranslatable.
Comment 7 Etienne 2011-02-22 22:48:57 UTC
SVN commit 1222340 by erebetez:

Fixing visible strings that where not in an i18n function.
CCBUG: 266761

 M  +3 -3      plasmoid/applet/psePlasmoid/Periodictable.cpp  
 M  +5 -5      src/elementdataviewer.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1222340
Comment 8 Burkhard Lück 2011-02-23 09:22:59 UTC
The applet has is still some untranslatable strings in the settings.

Fix number 1:

Index: psePlasmoid/Messages.sh
===================================================================
--- psePlasmoid/Messages.sh      (Revision 1221463)
+++ psePlasmoid/Messages.sh      (Arbeitskopie)
@@ -1,2 +1,3 @@
 #! /usr/bin/env bash
+$EXTRACTRC *.ui >> rc.cpp
 $XGETTEXT *.cpp -o $podir/plasma_applet_Molmasscalculator.pot

Fix number 2:
The catalog kalzium has to be loaded to get "Classic Periodic Table", "Long Periodic Table", "Short Periodic Table", "DZ Periodic Table" translated.

@Etienne:
Please use locale x-test to check if your application is properly translatable:
http://techbase.kde.org/Development/Tutorials/Localization/Building_KDE's_l10n_Module
Comment 9 Burkhard Lück 2011-07-22 13:21:59 UTC
Git commit d65458976e8e06285e3277878766e84a03afba3e by Burkhard Lück.
Committed on 22/07/2011 at 15:20.
Pushed by lueck into branch '4.7'.

load kalzium catalog to display the translated periodic table names in the listbox
BUG:266761
(cherry picked from commit 71f3eeca0f1bd1c3fc1075b15759b161a5c4f686)

M  +1    -0    plasmoid/applet/psePlasmoid/Molmasscalculator.cpp

http://commits.kde.org/kalzium/d65458976e8e06285e3277878766e84a03afba3e
Comment 10 Burkhard Lück 2011-07-22 13:22:00 UTC
Git commit 71f3eeca0f1bd1c3fc1075b15759b161a5c4f686 by Burkhard Lück.
Committed on 22/07/2011 at 15:20.
Pushed by lueck into branch 'master'.

load kalzium catalog to display the translated periodic table names in the listbox
CCBUG:266761

M  +1    -0    plasmoid/applet/psePlasmoid/Molmasscalculator.cpp

http://commits.kde.org/kalzium/71f3eeca0f1bd1c3fc1075b15759b161a5c4f686