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

List:       kde-i18n-doc
Subject:    Ok to fix translation bug in KStars?
From:       Jason Harris <jharris () 30doradus ! org>
Date:       2007-11-17 18:59:56
Message-ID: 200711171159.57241.kstars () 30doradus ! org
[Download RAW message or body]

Hello,

With translators' consent, I would like to fix bug #151424[1].  The fix 
involves string substitutions that are too inflexible for some languages.  
The following patch shows the proposed strings changes:

===================================================================
--- dmsbox.cpp  (revision 737954)
+++ dmsbox.cpp  (working copy)
@@ -94,26 +94,29 @@
 void dmsBox::setDegType( bool t ) {
     deg = t;
     QString sDeg = ( t ? i18n( "degrees" ) : i18n( "hours" ) );
-    QString sMin = ( t ? i18n( "arcminutes" ) : i18n( "minutes" ) );
-    QString sSec = ( t ? i18n( "arcseconds" ) : i18n( "seconds" ) );
+    QString sDMS = ( t ?
+            i18nc( "three values describing an angle in degrees", "degrees, 
arcminutes and arcseconds" )
+            : i18n( "three values describing an angle in hours", "hours, 
minutes and seconds" ) );

-    QString sTip = i18n( "Angle value in %1.", sDeg );
+    QString sTip = i18nc( "Angle value in degrees/hours", "Angle value 
in %1.", sDeg );
     QString sWhatsThis;

     if ( isReadOnly() ) {
-        sWhatsThis = i18n( "This box displays an angle in %1. "
-                           "The three numbers displayed are the angle's "
-                           "%1, %2, and %3." , sDeg, sMin, sSec);
+        if ( deg ) {
+        sWhatsThis = i18nc( "This box displays an angle in degrees/hours",
+                "This box displays an angle in %1. ", sDeg );
+        sWhatsThis += i18n( "The three numbers displayed are the angle's %1", 
sDMS );
+
     } else {
         sTip += i18n( "  You may enter a simple integer, or a floating-point 
value, "
                       "or space- or colon-delimited values specifying "
-                      "%1, %2 and %3" , sDeg, sMin, sSec);
+                      "%1" , sDMS );

         sWhatsThis = i18n( "Enter an angle value in %1.  The angle can be 
expressed "
                            "as a simple integer (\"12\"), or floating-point "
                            "(\"12.33\") value, or as space- or 
colon-delimited "
-                           "values specifying %1, %2 and %3 (\"12:20\", 
\"12:20:00\", "
-                           "\"12 20\", \"12 20 00.0\", etc.)." , sDeg, sMin, 
sSec);
+                           "values specifying %2 (\"12:20\", \"12:20:00\", "
+                           "\"12 20\", \"12 20 00.0\", etc.)." , sDeg, 
sDMS );
     }

     setToolTip( sTip );

Essentially, rather than translating each word separately 
("degrees", "hours", "arcminutes", etc.), I'm now defining "degrees" 
and "hours", and then the triplet-values all together in one 
string: "degrees, arcminutes and arcseconds"; "hours, minutes and seconds".

thanks,
Jason

[1]: http://bugs.kde.org/show_bug.cgi?id=151424
[prev in list] [next in list] [prev in thread] [next in thread] 

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