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

List:       kde-i18n-doc
Subject:    [kstars/KDE/4.12] kstars: i18n fixes
From:       Pino Toscano <pino () kde ! org>
Date:       2014-01-05 11:51:02
Message-ID: E1VzmEQ-0008GA-97 () scm ! kde ! org
[Download RAW message or body]

Git commit edeed74632e8f93d24e1cc866c7b5026251bfcfd by Pino Toscano.
Committed on 05/01/2014 at 11:50.
Pushed by pino into branch 'KDE/4.12'.

i18n fixes

- fix string puzzles
- properly use i18np for plural forms
- extract untranslatable user-visible strings
- do not extract placeholder message which will be replaced by plural
  form
- do not extract "localhost" or paths
- do not pass i18n strings as configuration keys for the "do not show
  again" feature of dialogs

CCMAIL: kde-i18n-doc@kde.org

M  +25   -23   kstars/ekos/align.cpp
M  +1    -4    kstars/ekos/capture.cpp
M  +1    -1    kstars/ekos/capture.ui
M  +1    -1    kstars/ekos/opsekos.ui
M  +5    -5    kstars/indi/opsindi.ui
M  +4    -4    kstars/kstarsdcop.cpp

http://commits.kde.org/kstars/edeed74632e8f93d24e1cc866c7b5026251bfcfd

diff --git a/kstars/ekos/align.cpp b/kstars/ekos/align.cpp
index 67333c3..18eb866 100644
--- a/kstars/ekos/align.cpp
+++ b/kstars/ekos/align.cpp
@@ -343,10 +343,10 @@ void Align::verifyIndexFiles()
     {
         if (missingIndexes == 1)
             KMessageBox::information(0, i18n("Index file %1 is missing. \
Astrometry.net would not be able to adequately solve plates until you install the \
                missing index files. Download the index files from \
                http://www.astrometry.net",
-                                             startIndex), i18n("Missing index \
files"), i18n("Do not show again")); +                                             \
startIndex), i18n("Missing index files"), "ekos_missingindexes");  else
             KMessageBox::information(0, i18n("Index files %1 to %2 are missing. \
Astrometry.net would not be able to adequately solve plates until you install the \
                missing index files. Download the index files from \
                http://www.astrometry.net",
-                                             startIndex, lastIndex), i18n("Missing \
index files"), i18n("Do not show again")); +                                          \
startIndex, lastIndex), i18n("Missing index files"), "ekos_missingindexes");  
     }
 }
@@ -820,7 +820,6 @@ void Align::executePolarAlign()
 void Align::measureAzError()
 {
     static double initRA=0, initDEC=0, finalRA=0, finalDEC=0;
-    QString meridianOrient = (hemisphereCombo->currentIndex() == 0) ? \
i18n("southern") : i18n("northern");  
     switch (azStage)
     {
@@ -828,9 +827,11 @@ void Align::measureAzError()
 
         // Display message box confirming user point scope near meridian and south
 
-        if (KMessageBox::warningContinueCancel( 0, i18n("Point the telescope at the \
%1 meridian. Press continue when ready.", meridianOrient) +        if \
(KMessageBox::warningContinueCancel( 0, hemisphereCombo->currentIndex() == 0 +        \
? i18n("Point the telescope at the southern meridian. Press continue when ready.") +  \
                : i18n("Point the telescope at the northern meridian. Press continue \
                when ready.")
                                                 , i18n("Polar Alignment \
                Measurement"), KStandardGuiItem::cont(), KStandardGuiItem::cancel(),
-                                                i18n("Don't ask \
again"))!=KMessageBox::Continue) +                                                \
"ekos_measure_az_error")!=KMessageBox::Continue)  return;
 
         appendLogText(i18n("Solving first frame near the meridian."));
@@ -904,7 +905,6 @@ void Align::measureAzError()
 void Align::measureAltError()
 {
     static double initRA=0, initDEC=0, finalRA=0, finalDEC=0;
-    QString meridianOrient = (altDirCombo->currentIndex() == 0) ? i18n("east") : \
i18n("west");  
     switch (altStage)
     {
@@ -912,9 +912,11 @@ void Align::measureAltError()
 
         // Display message box confirming user point scope near meridian and south
 
-        if (KMessageBox::warningContinueCancel( 0, i18n("Point the telescope to the \
%1 with a minimum altitude of 20 degrees. Press continue when ready.", \
meridianOrient) +        if (KMessageBox::warningContinueCancel( 0, \
altDirCombo->currentIndex() == 0 +                                                   \
? i18n("Point the telescope to the east with a minimum altitude of 20 degrees. Press \
continue when ready.") +                                                   : \
i18n("Point the telescope to the west with a minimum altitude of 20 degrees. Press \
                continue when ready.")
                                                 , i18n("Polar Alignment \
                Measurement"), KStandardGuiItem::cont(), KStandardGuiItem::cancel(),
-                                                i18n("Don't ask \
again"))!=KMessageBox::Continue) +                                                \
"ekos_measure_alt_error")!=KMessageBox::Continue)  return;
 
         appendLogText(i18n("Solving first frame."));
@@ -1002,7 +1004,7 @@ void Align::calculatePolarError(double initRA, double initDEC, \
double finalRA, d  // In degrees
     double deviation = (3.81 * (decDeviation * 3600) ) / ( RATime * cos(initDEC * \
dms::DegToRad)) / 60.0;  
-    QString deviationDirection;
+    KLocalizedString deviationDirection;
 
     switch (hemisphereCombo->currentIndex())
     {
@@ -1011,9 +1013,9 @@ void Align::calculatePolarError(double initRA, double initDEC, \
double finalRA, d  if (azStage == AZ_FINISHED)
         {
             if (decDeviation > 0)
-                deviationDirection = "too far west";
+                deviationDirection = ki18n("%1 ° too far west");
             else
-                deviationDirection = "too far east";
+                deviationDirection = ki18n("%1 ° too far east");
         }
         else if (altStage == ALT_FINISHED)
         {
@@ -1022,17 +1024,17 @@ void Align::calculatePolarError(double initRA, double \
initDEC, double finalRA, d  // East
                 case 0:
                 if (decDeviation > 0)
-                    deviationDirection = "too far high";
+                    deviationDirection = ki18n("%1 ° too far high");
                 else
-                    deviationDirection = "too far low";
+                    deviationDirection = ki18n("%1 ° too far low");
                 break;
 
                 // West
                 case 1:
                 if (decDeviation > 0)
-                    deviationDirection = "too far low";
+                    deviationDirection = ki18n("%1 ° too far low");
                 else
-                    deviationDirection = "too far high";
+                    deviationDirection = ki18n("%1 ° too far high");
                 break;
 
                 default:
@@ -1046,9 +1048,9 @@ void Align::calculatePolarError(double initRA, double initDEC, \
double finalRA, d  if (azStage == AZ_FINISHED)
         {
             if (decDeviation > 0)
-                deviationDirection = "too far east";
+                deviationDirection = ki18n("%1 ° too far east");
             else
-                deviationDirection = "too far west";
+                deviationDirection = ki18n("%1 ° too far west");
         }
         else if (altStage == ALT_FINISHED)
         {
@@ -1057,17 +1059,17 @@ void Align::calculatePolarError(double initRA, double \
initDEC, double finalRA, d  // East
                 case 0:
                 if (decDeviation > 0)
-                    deviationDirection = "too far low";
+                    deviationDirection = ki18n("%1 ° too far low");
                 else
-                    deviationDirection = "too far high";
+                    deviationDirection = ki18n("%1 ° too far high");
                 break;
 
                 // West
                 case 1:
                 if (decDeviation > 0)
-                    deviationDirection = "too far high";
+                    deviationDirection = ki18n("%1 ° too far high");
                 else
-                    deviationDirection = "too far low";
+                    deviationDirection = ki18n("%1 ° too far low");
                 break;
 
                 default:
@@ -1083,13 +1085,13 @@ void Align::calculatePolarError(double initRA, double \
initDEC, double finalRA, d  
     if (azStage == AZ_FINISHED)
     {
-        azError->setText(i18n("%1 ° %2", QString("%1").arg(fabs(deviation), 0, 'g', \
3), i18n("%1", deviationDirection))); +        \
azError->setText(deviationDirection.subs(QString("%1").arg(fabs(deviation), 0, 'g', \
3)).toString());  azDeviation = deviation * (decDeviation > 0 ? 1 : -1);
         correctAzB->setEnabled(true);
     }
     if (altStage == ALT_FINISHED)
     {
-        altError->setText(i18n("%1 ° %2", QString("%1").arg(fabs(deviation), 0, 'g', \
3), i18n("%1", deviationDirection))); +        \
altError->setText(deviationDirection.subs(QString("%1").arg(fabs(deviation), 0, 'g', \
3)).toString());  altDeviation = deviation * (decDeviation > 0 ? 1 : -1);
         correctAltB->setEnabled(true);
     }
diff --git a/kstars/ekos/capture.cpp b/kstars/ekos/capture.cpp
index 849694a..975db49 100644
--- a/kstars/ekos/capture.cpp
+++ b/kstars/ekos/capture.cpp
@@ -602,10 +602,7 @@ void Capture::updateCaptureProgress(ISD::CCDChip * tChip, double \
value)  
     exposeOUT->setText(QString::number(value, 'd', 2));
 
-    if (value <= 1)
-        secondsLabel->setText(i18n("second left"));
-    else
-        secondsLabel->setText(i18n("seconds left"));
+    secondsLabel->setText(i18np("second left", "seconds left", value));
 
 }
 
diff --git a/kstars/ekos/capture.ui b/kstars/ekos/capture.ui
index 34738a3..fb70029 100644
--- a/kstars/ekos/capture.ui
+++ b/kstars/ekos/capture.ui
@@ -840,7 +840,7 @@
               <item row="0" column="2" colspan="2">
                <widget class="QLabel" name="secondsLabel">
                 <property name="text">
-                 <string>second left</string>
+                 <string notr="true">second left</string>
                 </property>
                </widget>
               </item>
diff --git a/kstars/ekos/opsekos.ui b/kstars/ekos/opsekos.ui
index 44ad7de..4fbeb60 100644
--- a/kstars/ekos/opsekos.ui
+++ b/kstars/ekos/opsekos.ui
@@ -31,7 +31,7 @@
           <item row="0" column="1">
            <widget class="QLineEdit" name="kcfg_remoteHost">
             <property name="text">
-             <string>localhost</string>
+             <string notr="true">localhost</string>
             </property>
            </widget>
           </item>
diff --git a/kstars/indi/opsindi.ui b/kstars/indi/opsindi.ui
index d9d2ccb..66f263b 100644
--- a/kstars/indi/opsindi.ui
+++ b/kstars/indi/opsindi.ui
@@ -32,7 +32,7 @@
         <item row="0" column="1">
          <widget class="KLineEdit" name="kcfg_telescopePort">
           <property name="text">
-           <string>/dev/ttyUSB0</string>
+           <string notr="true">/dev/ttyUSB0</string>
           </property>
          </widget>
         </item>
@@ -66,7 +66,7 @@
         <item row="1" column="1">
          <widget class="KLineEdit" name="kcfg_videoPort">
           <property name="text">
-           <string>/dev/video0</string>
+           <string notr="true">/dev/video0</string>
           </property>
          </widget>
         </item>
@@ -83,7 +83,7 @@
         <item row="1" column="4">
          <widget class="KLineEdit" name="kcfg_filterPort">
           <property name="text">
-           <string>/dev/ttyUSB2</string>
+           <string notr="true">/dev/ttyUSB2</string>
           </property>
          </widget>
         </item>
@@ -100,7 +100,7 @@
         <item row="2" column="1">
          <widget class="KLineEdit" name="kcfg_indiServer">
           <property name="text">
-           <string>/usr/bin/indiserver</string>
+           <string notr="true">/usr/bin/indiserver</string>
           </property>
          </widget>
         </item>
@@ -134,7 +134,7 @@
         <item>
          <widget class="KLineEdit" name="kcfg_indiDriversDir">
           <property name="text">
-           <string>/usr/share/indi</string>
+           <string notr="true">/usr/share/indi</string>
           </property>
          </widget>
         </item>
diff --git a/kstars/kstarsdcop.cpp b/kstars/kstarsdcop.cpp
index d3d5b8d..dd33af7 100644
--- a/kstars/kstarsdcop.cpp
+++ b/kstars/kstarsdcop.cpp
@@ -234,11 +234,11 @@ void KStars::setGeoLocation( const QString &city, const QString \
&province, const  
     if ( !cityFound ) {
         if ( province.isEmpty() )
-            kDebug() << i18n( "Error [D-Bus setGeoLocation]: city " ) << city << ", \
                "
-            << country << i18n( " not found in database." ) << endl;
+            kDebug() << i18n( "Error [D-Bus setGeoLocation]: city %1, %2 not found \
in database.", +                              city, country );
         else
-            kDebug() << i18n( "Error [D-Bus setGeoLocation]: city " ) << city << ", \
                "
-            << province << ", " << country << i18n( " not found in database." ) << \
endl; +            kDebug() << i18n( "Error [D-Bus setGeoLocation]: city %1, %2, %3 \
not found in database.", +                              city, province, country );
     }
 }
 


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

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