Bug 361892

Summary: i18n() in qDebug
Product: [Applications] kstars Reporter: Burkhard Lück <lueck>
Component: generalAssignee: Jasem Mutlaq <mutlaqja>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Burkhard Lück 2016-04-17 10:35:53 UTC
qDebug/qWarning/etc messages should not be translatable, see
http://marc.info/?l=kde-i18n-doc&m=146084723711722&w=2

Please remove i18n calls in master + 16.04 here:

./datahandlers/catalogdb.cpp:32:      qDebug()<< i18n("DSO DB does not exist!");
./datahandlers/catalogdb.cpp:40:      qDebug() << i18n("Opened the DSO Database. Ready!");
./kstars/kstarsdbus.cpp:174:        qDebug() << i18n( "Error [D-Bus waitForKey()]: Invalid key requested." );
./kstars/kstarsdbus.cpp:231:            qDebug() << i18n( "Error [D-Bus setGeoLocation]: city %1, %2 not found in database.",
./kstars/kstarsdbus.cpp:234:            qDebug() << i18n( "Error [D-Bus setGeoLocation]: city %1, %2, %3 not found in database.",
./kstars/main.cpp:112:        qDebug() << i18n( "Dumping sky image" );
./kstars/main.cpp:204:        else qDebug() << i18n( "Saved to file: %1", fname );
./kstars/time/timezonerule.cpp:65:        qDebug() << i18n( "Daylight Saving Time active" );
./kstars/time/timezonerule.cpp:68:        qDebug() << i18n( "Daylight Saving Time inactive" );
./kstars/time/timezonerule.cpp:241:    qDebug() << i18n( "Next Daylight Savings Time change (Local Time): " ) << result.toString();
./kstars/time/timezonerule.cpp:275:    qDebug() << i18n( "Previous Daylight Savings Time change (Local Time): " ) << result.toString();
./kstars/time/timezonerule.cpp:284:    qDebug() << i18n( "Next Daylight Savings Time change (UTC): " ) << result.toString();
./kstars/time/timezonerule.cpp:297:    qDebug() << i18n( "Previous Daylight Savings Time change (UTC): " ) << result.toString();
./kstars/time/simclock.cpp:110:        qDebug() << i18n( "Stopping the timer" );
./kstars/time/simclock.cpp:126:        qDebug() << i18n( "Starting the timer" );
./kstars/time/simclock.cpp:148:        qDebug() << i18n( "Setting clock:  UTC: %1  JD: %2" ,  UTC.toString(), QLocale().toString( (double) UTC.djd(), 'f' , 2 ) ) << endl;
./kstars/time/simclock.cpp:151:        qDebug() << i18n( "Cannot set SimClock:  Invalid Date/Time." );
./kstars/time/simclock.cpp:157:        qDebug() << i18n( "New clock scale: %1 sec", s );
./kstars/kstarsdata.cpp:532:                //if ( locale->language() != "en_US" ) qDebug() << i18n( "No localized URL file; using default English file." );
./kstars/kstarsdata.cpp:533:                if ( QLocale().language() != QLocale::English ) qDebug() << i18n( "No localized URL file; using default English file." );
./kstars/kstarsdata.cpp:548:                    qDebug() << i18n( "Failed to copy default URL file to locale folder, modifying default object links is not possible" );
./kstars/kstarsdata.cpp:715:        qDebug() << i18n( "Could not open file %1", f.fileName() );
./kstars/kstarsdata.cpp:841:                    if ( ! ok ) qDebug() << i18n( "Unable to load color scheme named %1. Also tried %2.", csName, filename ) << endl;
./kstars/kstarsactions.cpp:1216:    qDebug() << i18n( "Projection system: %1", Options::projection() );
./kstars/auxiliary/fov.cpp:193:        qDebug() << i18n( "Could not open fov.dat." );
./kstars/auxiliary/imageexporter.cpp:162:        qDebug() << i18n("Image saved to file: %1", fileName);
./kstars/auxiliary/colorscheme.cpp:163:            qDebug() << i18n( "Unable to load color scheme named %1. Also tried %2.", name, filename );
./kstars/skyobjects/ksplanet.cpp:147:            qDebug() << i18n("Error: Illegal identifier in KSPlanet constructor: %1", n) << endl;
./kstars/skyobjects/ksplanetbase.cpp:218:        qDebug() << i18n( "KSPlanetBase::setRearth():  Error: Need an Earth pointer.  (" ) << name() << ")";
./kstars/skyobjects/skyobject.cpp:466:        qDebug() << i18n( "Cannot write to user log file" );
./kstars/skyobjects/skyline.cpp:40:        qDebug() << i18n("SkyLine index error: no such point: %1", i );
./kstars/skyobjects/skyline.cpp:48:        qDebug() << i18n("SkyLine index error: no such segment: %1", i );
./kstars/widgets/timespinbox.cpp:220:    qDebug() << i18n( "Reporting new timestep value: " ) << timeScale();
./kstars/printing/foveditordialog.cpp:169:            qDebug() << i18n("Error: Unable to save image: %1 ", fname);
./kstars/printing/foveditordialog.cpp:174:            qDebug() << i18n("Image saved to file: %1", fname);
./kstars/tools/observinglist.cpp:534:            qDebug() << i18n( "Object %1 not found in list.", newName );
./kstars/tools/modcalcsidtime.cpp:258:                    qDebug() << i18n("Error: could not parse location string: ") << locationString;
./kstars/tools/modcalcsidtime.cpp:264:                    qDebug() << i18n("Error: location not found in database: ") << locationString;
./kstars/tools/modcalcsidtime.cpp:277:                qDebug() << i18n("Error: did not find a valid date string in: ") << line;
./kstars/tools/modcalcsidtime.cpp:290:            qDebug() << i18n("Error: did not find a valid time string in: ") << line;
./kstars/tools/modcalcvlsr.cpp:174:        qDebug() << i18n("Error: do not know which velocity to use for input.");
Comment 1 Jasem Mutlaq 2016-05-04 20:39:41 UTC
Git commit 54e889025260a2494cfdf9f2f0aa95624c104b3e by Jasem Mutlaq.
Committed on 04/05/2016 at 20:37.
Pushed by mutlaqja into branch 'master'.

Fixing i18n use in qDebug macros. Debug messages are not supposed to be translatable. Please bear that in mind next time you add any debug messages.

CCMAIL:kstars-devel@kde.org

M  +2    -2    datahandlers/catalogdb.cpp
M  +1    -1    kstars/auxiliary/colorscheme.cpp
M  +1    -1    kstars/auxiliary/fov.cpp
M  +1    -1    kstars/auxiliary/imageexporter.cpp
M  +1    -1    kstars/kstarsactions.cpp
M  +8    -6    kstars/kstarsdata.cpp
M  +3    -5    kstars/kstarsdbus.cpp
M  +5    -3    kstars/main.cpp
M  +2    -2    kstars/printing/foveditordialog.cpp
M  +1    -1    kstars/skyobjects/ksplanet.cpp
M  +1    -1    kstars/skyobjects/ksplanetbase.cpp
M  +2    -2    kstars/skyobjects/skyline.cpp
M  +1    -1    kstars/skyobjects/skyobject.cpp
M  +5    -5    kstars/time/simclock.cpp
M  +6    -6    kstars/time/timezonerule.cpp
M  +4    -4    kstars/tools/modcalcsidtime.cpp
M  +1    -1    kstars/tools/modcalcvlsr.cpp
M  +1    -1    kstars/tools/observinglist.cpp
M  +1    -1    kstars/widgets/timespinbox.cpp

http://commits.kde.org/kstars/54e889025260a2494cfdf9f2f0aa95624c104b3e