[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdeutils/kcalc
From:       Lukáš Tinkl <lukas () kde ! org>
Date:       2005-02-06 16:28:40
Message-ID: 20050206162840.37C951BBFA () office ! kde ! org
[Download RAW message or body]

CVS commit by lukas: 

show the constants' names translated


  M +22 -22    kcalc_const_menu.cpp   1.9
  M +1 -1      kcalc_const_menu.h   1.4


--- kdeutils/kcalc/kcalc_const_menu.cpp  #1.8:1.9
@@ -27,21 +27,21 @@
 
 const struct science_constant KCalcConstMenu::Constants[] = {
-  {QString::fromUtf8("π"), i18n("Pi"), "", "3.14159265358979323846264338327950288", \
                Mathematics},
-  {"e", i18n("Euler Number"), "", "2.71828182845904523536028747135266249", \
                Mathematics},
-  {"c", i18n("Light Speed"), "", "2.99792458e8", Electromagnetic},
-  {"h", i18n("Planck's Constant"), "", "6.6260693e-34", Nuclear},
-  {"G", i18n("Constant of Gravitation"), "", "6.6742e-11", Gravitation},
-  {"g", i18n("Earth Acceleration"), "", "9.80665", Gravitation},
-  {"e", i18n("Elementary Charge"), "", "1.60217653e-19", Electromagnetic},
-  {"Z_0", i18n("Impedance of Vacuum"), "", "376.730313461", Electromagnetic},
-  {QString::fromUtf8("α"), i18n("Fine-Structure Constant"), "", "7.297352568e-3", \
                Nuclear},
-  {"e", i18n("Elementary Charge"), "", "1.60217653e-19", Nuclear},
-  {"_0", i18n("Permeability of Vacuum"), "", "1.2566370614e-6", Electromagnetic},
-  {QString::fromUtf8("ε")+"_0", i18n("Permittivity of vacuum"), "", \
                "8.854187817e-12", Electromagnetic},
-  {"k", i18n("Boltzmann Constant"), "", "1.3806505e-23", Thermodynamics},
-  {"1u", i18n("Atomic Mass Unit"), "", "1.66053886e-27", Thermodynamics},
-  {"R", i18n("Molar Gas Constant"), "", "8.314472", Thermodynamics},
-  {QString::fromUtf8("σ"), i18n("Stefan-Boltzmann Constant"), "", "8.314472", \
                Thermodynamics},
-  {"N_A", i18n("Avogadro's Number"), "", "6.0221415e23", Thermodynamics}
+  {QString::fromUtf8("π"), I18N_NOOP("Pi"), "", \
"3.14159265358979323846264338327950288", Mathematics}, +  {"e", I18N_NOOP("Euler \
Number"), "", "2.71828182845904523536028747135266249", Mathematics}, +  {"c", \
I18N_NOOP("Light Speed"), "", "2.99792458e8", Electromagnetic}, +  {"h", \
I18N_NOOP("Planck's Constant"), "", "6.6260693e-34", Nuclear}, +  {"G", \
I18N_NOOP("Constant of Gravitation"), "", "6.6742e-11", Gravitation}, +  {"g", \
I18N_NOOP("Earth Acceleration"), "", "9.80665", Gravitation}, +  {"e", \
I18N_NOOP("Elementary Charge"), "", "1.60217653e-19", Electromagnetic}, +  {"Z_0", \
I18N_NOOP("Impedance of Vacuum"), "", "376.730313461", Electromagnetic}, +  \
{QString::fromUtf8("α"), I18N_NOOP("Fine-Structure Constant"), "", "7.297352568e-3", \
Nuclear}, +  {"e", I18N_NOOP("Elementary Charge"), "", "1.60217653e-19", Nuclear},
+  {"_0", I18N_NOOP("Permeability of Vacuum"), "", "1.2566370614e-6", \
Electromagnetic}, +  {QString::fromUtf8("ε")+"_0", I18N_NOOP("Permittivity of \
vacuum"), "", "8.854187817e-12", Electromagnetic}, +  {"k", I18N_NOOP("Boltzmann \
Constant"), "", "1.3806505e-23", Thermodynamics}, +  {"1u", I18N_NOOP("Atomic Mass \
Unit"), "", "1.66053886e-27", Thermodynamics}, +  {"R", I18N_NOOP("Molar Gas \
Constant"), "", "8.314472", Thermodynamics}, +  {QString::fromUtf8("σ"), \
I18N_NOOP("Stefan-Boltzmann Constant"), "", "8.314472", Thermodynamics}, +  {"N_A", \
I18N_NOOP("Avogadro's Number"), "", "6.0221415e23", Thermodynamics}  };
 
@@ -72,17 +72,17 @@ KCalcConstMenu::KCalcConstMenu(QWidget *
       {
       case Mathematics:
-        math_menu->insertItem(Constants[i].name, i);
+        math_menu->insertItem(i18n(Constants[i].name), i);
         break;
       case Electromagnetic:
-        em_menu->insertItem(Constants[i].name, i);
+        em_menu->insertItem(i18n(Constants[i].name), i);
         break;
       case Nuclear:
-        nuclear_menu->insertItem(Constants[i].name, i);
+        nuclear_menu->insertItem(i18n(Constants[i].name), i);
         break;
       case Thermodynamics:
-        thermo_menu->insertItem(Constants[i].name, i);
+        thermo_menu->insertItem(i18n(Constants[i].name), i);
         break;
       case Gravitation:
-        gravitation_menu->insertItem(Constants[i].name, i);
+        gravitation_menu->insertItem(i18n(Constants[i].name), i);
         break;
       }

--- kdeutils/kcalc/kcalc_const_menu.h  #1.3:1.4
@@ -31,5 +31,5 @@ typedef enum {Mathematics, Electromagnet
 struct science_constant{
   QString label;
-  QString name;
+  const char * name;
   QString whatsthis;
   QString value;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic