Commit 12c6c96b authored by Jasem Mutlaq's avatar Jasem Mutlaq

i18n to xi18n

parent 0f06fda3
......@@ -42,44 +42,44 @@ ColorScheme::ColorScheme() : FileName() {
//To add another color to the Palette, just add an entry for KeyName,
//Name and Default here.
appendItem("SkyColor", i18n("Sky"), "#000000");
appendItem("MessColor", i18n("Messier Object"), "#008f00");
appendItem("NGCColor", i18nc("New General Catalog object", "NGC Object"), "#006666");
appendItem("ICColor", i18nc("Index Catalog object", "IC Object"), "#382a7d");
appendItem("SkyColor", xi18n("Sky"), "#000000");
appendItem("MessColor", xi18n("Messier Object"), "#008f00");
appendItem("NGCColor", xi18nc("New General Catalog object", "NGC Object"), "#006666");
appendItem("ICColor", xi18nc("Index Catalog object", "IC Object"), "#382a7d");
appendItem("HSTColor",
i18nc("Object with extra attached URLs", "Object w/ Links"), "#930000");
appendItem("SNameColor", i18n("Star Name"), "#577d7d");
appendItem("DSNameColor", i18n("Deep Sky Object Name"), "#75759c");
appendItem("PNameColor", i18n("Planet Name"), "#ac9800");
xi18nc("Object with extra attached URLs", "Object w/ Links"), "#930000");
appendItem("SNameColor", xi18n("Star Name"), "#577d7d");
appendItem("DSNameColor", xi18n("Deep Sky Object Name"), "#75759c");
appendItem("PNameColor", xi18n("Planet Name"), "#ac9800");
appendItem("CNameColor",
i18nc("Constellation Name", "Constell. Name"), "#718488");
xi18nc("Constellation Name", "Constell. Name"), "#718488");
appendItem("CLineColor",
i18nc("Constellation Line", "Constell. Line"), "#3d3d3d");
xi18nc("Constellation Line", "Constell. Line"), "#3d3d3d");
appendItem("CBoundColor",
i18nc("Constellation Boundary", "Constell. Boundary"), "#222f2f");
xi18nc("Constellation Boundary", "Constell. Boundary"), "#222f2f");
appendItem("CBoundHighColor",
i18nc("Highlighted Constellation Boundary", "Constell. Boundary Highlight"), "#445555");
xi18nc("Highlighted Constellation Boundary", "Constell. Boundary Highlight"), "#445555");
appendItem("MWColor",
i18nc("refers to the band of stars in the sky due to the Galactic plane", "Milky Way"), "#0d1115");
appendItem("EqColor", i18n("Equator"), "#909090");
appendItem("EclColor", i18n("Ecliptic"), "#613d12");
appendItem("HorzColor", i18n("Horizon"), "#091f14");
appendItem("CompassColor", i18n("Compass Labels"), "#909055");
appendItem("EquatorialGridColor", i18n("Equatorial Coordinate Grid"), "#445566");
appendItem("HorizontalGridColor", i18n("Horizontal Coordinate Grid"), "#091f14");
appendItem("BoxTextColor", i18n("Info Box Text"), "#d2dbef");
appendItem("BoxGrabColor", i18n("Info Box Selected"), "#900000");
appendItem("BoxBGColor", i18n("Info Box Background"), "#000000");
appendItem("TargetColor", i18n("Target Indicator"), "#DD0000");
appendItem("UserLabelColor", i18n("User Labels"), "#AAAAAA");
appendItem("PlanetTrailColor", i18n("Planet Trails"), "#993311");
appendItem("AngularRuler", i18n("Angular Distance Ruler"), "#445566");
appendItem("ObsListColor", i18n("Observing List Label"), "#FF0000");
appendItem("StarHopRouteColor", i18n("Star-Hop Route"), "#00FFFF");
appendItem("VisibleSatColor", i18n("Visible Satellites"), "#00FF00");
appendItem("SatColor", i18n("Satellites"), "#FF0000");
appendItem("SatLabelColor", i18n("Satellites Labels"), "#640000");
appendItem("SupernovaColor", i18n("Supernovae"), "#FFA500");
xi18nc("refers to the band of stars in the sky due to the Galactic plane", "Milky Way"), "#0d1115");
appendItem("EqColor", xi18n("Equator"), "#909090");
appendItem("EclColor", xi18n("Ecliptic"), "#613d12");
appendItem("HorzColor", xi18n("Horizon"), "#091f14");
appendItem("CompassColor", xi18n("Compass Labels"), "#909055");
appendItem("EquatorialGridColor", xi18n("Equatorial Coordinate Grid"), "#445566");
appendItem("HorizontalGridColor", xi18n("Horizontal Coordinate Grid"), "#091f14");
appendItem("BoxTextColor", xi18n("Info Box Text"), "#d2dbef");
appendItem("BoxGrabColor", xi18n("Info Box Selected"), "#900000");
appendItem("BoxBGColor", xi18n("Info Box Background"), "#000000");
appendItem("TargetColor", xi18n("Target Indicator"), "#DD0000");
appendItem("UserLabelColor", xi18n("User Labels"), "#AAAAAA");
appendItem("PlanetTrailColor", xi18n("Planet Trails"), "#993311");
appendItem("AngularRuler", xi18n("Angular Distance Ruler"), "#445566");
appendItem("ObsListColor", xi18n("Observing List Label"), "#FF0000");
appendItem("StarHopRouteColor", xi18n("Star-Hop Route"), "#00FFFF");
appendItem("VisibleSatColor", xi18n("Visible Satellites"), "#00FF00");
appendItem("SatColor", xi18n("Satellites"), "#FF0000");
appendItem("SatLabelColor", xi18n("Satellites Labels"), "#640000");
appendItem("SupernovaColor", xi18n("Supernovae"), "#FFA500");
//Load colors from config object
loadFromConfig();
......@@ -98,7 +98,7 @@ void ColorScheme::appendItem(QString key, QString name, QString def) {
QColor ColorScheme::colorNamed( const QString &name ) const {
if ( ! hasColorNamed( name ) ) {
qWarning() << i18n( "No color named \"%1\" found in color scheme.", name ) ;
qWarning() << xi18n( "No color named \"%1\" found in color scheme.", name ) ;
// Return white if no color found
return QColor( Qt::white );
}
......@@ -136,11 +136,11 @@ bool ColorScheme::load( const QString &name ) {
bool ok = false;
//Parse default names which don't follow the regular file-naming scheme
if ( name == i18nc("use default color scheme", "Default Colors") )
if ( name == xi18nc("use default color scheme", "Default Colors") )
filename = "classic.colors";
if ( name == i18nc("use 'star chart' color scheme", "Star Chart") )
if ( name == xi18nc("use 'star chart' color scheme", "Star Chart") )
filename = "chart.colors";
if ( name == i18nc("use 'night vision' color scheme", "Night Vision") )
if ( name == xi18nc("use 'night vision' color scheme", "Night Vision") )
filename = "night.colors";
//Try the filename if it ends with ".colors"
......@@ -156,7 +156,7 @@ bool ColorScheme::load( const QString &name ) {
}
if ( ! ok ) {
qDebug() << i18n( "Unable to load color scheme named %1. Also tried %2.", name, filename );
qDebug() << xi18n( "Unable to load color scheme named %1. Also tried %2.", name, filename );
return false;
}
}
......@@ -231,8 +231,8 @@ bool ColorScheme::save( const QString &name ) {
file.setFileName( QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + filename ) ; //determine filename in local user KDE directory tree.
if ( file.exists() || !file.open( QIODevice::ReadWrite | QIODevice::Append ) ) {
QString message = i18n( "Local color scheme file could not be opened.\nScheme cannot be recorded." );
KMessageBox::sorry( 0, message, i18n( "Could Not Open File" ) );
QString message = xi18n( "Local color scheme file could not be opened.\nScheme cannot be recorded." );
KMessageBox::sorry( 0, message, xi18n( "Could Not Open File" ) );
return false;
} else {
QTextStream stream( &file );
......@@ -246,8 +246,8 @@ bool ColorScheme::save( const QString &name ) {
file.setFileName( QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + "colors.dat" ) ; //determine filename in local user KDE directory tree.
if ( !file.open( QIODevice::ReadWrite | QIODevice::Append ) ) {
QString message = i18n( "Local color scheme index file could not be opened.\nScheme cannot be recorded." );
KMessageBox::sorry( 0, message, i18n( "Could Not Open File" ) );
QString message = xi18n( "Local color scheme index file could not be opened.\nScheme cannot be recorded." );
KMessageBox::sorry( 0, message, xi18n( "Could Not Open File" ) );
return false;
} else {
QTextStream stream( &file );
......@@ -255,8 +255,8 @@ bool ColorScheme::save( const QString &name ) {
file.close();
}
} else {
QString message = i18n( "Invalid filename requested.\nScheme cannot be recorded." );
KMessageBox::sorry( 0, message, i18n( "Invalid Filename" ) );
QString message = xi18n( "Invalid filename requested.\nScheme cannot be recorded." );
KMessageBox::sorry( 0, message, xi18n( "Invalid Filename" ) );
return false;
}
......
......@@ -43,7 +43,7 @@ AddCatDialog::AddCatDialog( KStars *_ks )
QDir::setCurrent( QDir::homePath() );
acd = new AddCatDialogUI(this);
setMainWidget(acd);
setCaption( i18n( "Import Catalog" ) );
setCaption( xi18n( "Import Catalog" ) );
setButtons( KDialog::Help|KDialog::Ok|KDialog::Cancel );
connect( acd->DataURL->lineEdit(), SIGNAL( lostFocus() ), this, SLOT( slotShowDataFile() ) );
......@@ -55,18 +55,18 @@ AddCatDialog::AddCatDialog( KStars *_ks )
connect(this,SIGNAL(cancelClicked()),this,SLOT(slotCancel()));
connect(this,SIGNAL(helpClicked()),this,SLOT(slotHelp()));
acd->FieldList->addItem( i18n( "ID Number" ) );
acd->FieldList->addItem( i18n( "Right Ascension" ) );
acd->FieldList->addItem( i18n( "Declination" ) );
acd->FieldList->addItem( i18n( "Object Type" ) );
acd->FieldPool->addItem( i18n( "Common Name" ) );
acd->FieldPool->addItem( i18n( "Magnitude" ) );
acd->FieldPool->addItem( i18n( "Flux" ) );
acd->FieldPool->addItem( i18n( "Major Axis" ) );
acd->FieldPool->addItem( i18n( "Minor Axis" ) );
acd->FieldPool->addItem( i18n( "Position Angle" ) );
acd->FieldPool->addItem( i18n( "Ignore" ) );
acd->FieldList->addItem( xi18n( "ID Number" ) );
acd->FieldList->addItem( xi18n( "Right Ascension" ) );
acd->FieldList->addItem( xi18n( "Declination" ) );
acd->FieldList->addItem( xi18n( "Object Type" ) );
acd->FieldPool->addItem( xi18n( "Common Name" ) );
acd->FieldPool->addItem( xi18n( "Magnitude" ) );
acd->FieldPool->addItem( xi18n( "Flux" ) );
acd->FieldPool->addItem( xi18n( "Major Axis" ) );
acd->FieldPool->addItem( xi18n( "Minor Axis" ) );
acd->FieldPool->addItem( xi18n( "Position Angle" ) );
acd->FieldPool->addItem( xi18n( "Ignore" ) );
}
AddCatDialog::~AddCatDialog(){
......@@ -83,21 +83,21 @@ void AddCatDialog::slotOk() {
void AddCatDialog::slotHelp() {
QString message =
i18n( "A valid custom catalog file has one line per object, "
xi18n( "A valid custom catalog file has one line per object, "
"with the following fields in each line:") + "\n\t" +
i18n( "1. Type identifier. Must be one of: 0 (star), 3 (open cluster), 4 (globular cluster), "
xi18n( "1. Type identifier. Must be one of: 0 (star), 3 (open cluster), 4 (globular cluster), "
"5 (gaseous nebula), 6 (planetary nebula), 7 (supernova remnant), or 8 (galaxy)" ) + "\n\t" +
i18n( "2. Right Ascension (floating-point value)" ) + "\n\t" +
i18n( "3. Declination (floating-point value)" ) + "\n\t" +
i18n( "4. Magnitude (floating-point value)" ) + "\n\t" +
i18n( "5. Integrated Flux (floating-point value); frequency and units are set separately in the catalog file." ) + "\n\t" +
i18n( "6. Spectral type (if type=0); otherwise object's catalog name" ) + "\n\t" +
i18n( "7. Star name (if type=0); otherwise object's common name. [field 7 is optional]" ) + "\n\n" +
i18n( "The fields should be separated by whitespace. In addition, the catalog "
xi18n( "2. Right Ascension (floating-point value)" ) + "\n\t" +
xi18n( "3. Declination (floating-point value)" ) + "\n\t" +
xi18n( "4. Magnitude (floating-point value)" ) + "\n\t" +
xi18n( "5. Integrated Flux (floating-point value); frequency and units are set separately in the catalog file." ) + "\n\t" +
xi18n( "6. Spectral type (if type=0); otherwise object's catalog name" ) + "\n\t" +
xi18n( "7. Star name (if type=0); otherwise object's common name. [field 7 is optional]" ) + "\n\n" +
xi18n( "The fields should be separated by whitespace. In addition, the catalog "
"may contain comment lines beginning with \'#\'." );
KMessageBox::information( 0, message, i18n( "Help on custom catalog file format" ) );
KMessageBox::information( 0, message, xi18n( "Help on custom catalog file format" ) );
}
/* Attempt to parse the catalog data file specified in the DataURL box.
......@@ -138,7 +138,7 @@ bool AddCatDialog::validateDataFile() {
}
QString AddCatDialog::writeCatalogHeader() {
QString name = ( acd->CatalogName->text().isEmpty() ? i18n("Custom") : acd->CatalogName->text() );
QString name = ( acd->CatalogName->text().isEmpty() ? xi18n("Custom") : acd->CatalogName->text() );
QString pre = ( acd->Prefix->text().isEmpty() ? "CC" : acd->Prefix->text() );
char delimiter = ( acd->CSVButton->isChecked() ? ',' : ' ' );
......@@ -152,27 +152,27 @@ QString AddCatDialog::writeCatalogHeader() {
for ( int i=0; i < acd->FieldList->count(); ++i ) {
QString f = acd->FieldList->item( i )->text();
if ( f == i18n( "ID Number" ) ) {
if ( f == xi18n( "ID Number" ) ) {
h += "ID ";
} else if ( f == i18n( "Right Ascension" ) ) {
} else if ( f == xi18n( "Right Ascension" ) ) {
h += "RA ";
} else if ( f == i18n( "Declination" ) ) {
} else if ( f == xi18n( "Declination" ) ) {
h += "Dc ";
} else if ( f == i18n( "Object Type" ) ) {
} else if ( f == xi18n( "Object Type" ) ) {
h += "Tp ";
} else if ( f == i18n( "Common Name" ) ) {
} else if ( f == xi18n( "Common Name" ) ) {
h += "Nm ";
} else if ( f == i18n( "Magnitude" ) ) {
} else if ( f == xi18n( "Magnitude" ) ) {
h += "Mg ";
} else if ( f == i18n( "Flux" ) ) {
} else if ( f == xi18n( "Flux" ) ) {
h += "Flux ";
} else if ( f == i18n( "Major Axis" ) ) {
} else if ( f == xi18n( "Major Axis" ) ) {
h += "Mj ";
} else if ( f == i18n( "Minor Axis" ) ) {
} else if ( f == xi18n( "Minor Axis" ) ) {
h += "Mn ";
} else if ( f == i18n( "Position Angle" ) ) {
} else if ( f == xi18n( "Position Angle" ) ) {
h += "PA ";
} else if ( f == i18n( "Ignore" ) ) {
} else if ( f == xi18n( "Ignore" ) ) {
h += "Ig ";
}
}
......@@ -194,8 +194,8 @@ void AddCatDialog::slotShowDataFile() {
void AddCatDialog::slotPreviewCatalog() {
if ( validateDataFile() ) {
KMessageBox::informationList( 0, i18n( "Preview of %1", acd->CatalogName->text() ),
CatalogContents.split( '\n' ), i18n( "Catalog Preview" ) );
KMessageBox::informationList( 0, xi18n( "Preview of %1", acd->CatalogName->text() ),
CatalogContents.split( '\n' ), xi18n( "Catalog Preview" ) );
}
}
......@@ -210,9 +210,9 @@ void AddCatDialog::slotCreateCatalog() {
{
KUrl u( acd->CatalogURL->url() );
int r=KMessageBox::warningContinueCancel( 0,
i18n( "A file named \"%1\" already exists. "
xi18n( "A file named \"%1\" already exists. "
"Overwrite it?", u.fileName() ),
i18n( "Overwrite File?" ),
xi18n( "Overwrite File?" ),
KStandardGuiItem::overwrite() );
if(r==KMessageBox::Cancel) return;
......@@ -221,8 +221,8 @@ void AddCatDialog::slotCreateCatalog() {
QFile OutFile( acd->CatalogURL->url().toLocalFile() );
if ( ! OutFile.open( QIODevice::WriteOnly ) ) {
KMessageBox::sorry( 0,
i18n( "Could not open the file %1 for writing.", acd->CatalogURL->url().toLocalFile() ),
i18n( "Error Opening Output File" ) );
xi18n( "Could not open the file %1 for writing.", acd->CatalogURL->url().toLocalFile() ),
xi18n( "Error Opening Output File" ) );
} else {
QTextStream outStream( &OutFile );
outStream << CatalogContents;
......
......@@ -33,7 +33,7 @@ AddLinkDialog::AddLinkDialog( QWidget *parent, const QString &oname )
{
ald = new AddLinkDialogUI(this);
setMainWidget( ald );
setCaption( i18n( "Add Custom URL to %1", oname ) );
setCaption( xi18n( "Add Custom URL to %1", oname ) );
setButtons( KDialog::Ok|KDialog::Cancel );
//connect signals to slots
......@@ -41,7 +41,7 @@ AddLinkDialog::AddLinkDialog( QWidget *parent, const QString &oname )
connect( ald->TypeBox, SIGNAL( clicked( int ) ), this, SLOT( changeDefaultDescription( int ) ) );
ald->ImageRadio->setChecked(true);
ald->DescBox->setText( i18n( "Show image of " ) + ObjectName );
ald->DescBox->setText( xi18n( "Show image of " ) + ObjectName );
}
void AddLinkDialog::checkURL( void ) {
......@@ -49,9 +49,9 @@ void AddLinkDialog::checkURL( void ) {
if ( _url.isValid() ) { //Is the string a valid URL?
KToolInvocation::invokeBrowser( _url.url() ); //If so, launch the browser to see if it's the correct document
} else { //If not, print a warning message box that offers to open the browser to a search engine.
QString message = i18n( "The URL is not valid. Would you like to open a browser window\nto the Google search engine?" );
QString caption = i18n( "Invalid URL" );
if ( KMessageBox::warningYesNo( 0, message, caption, KGuiItem(i18n("Browse Google")), KGuiItem(i18n("Do Not Browse")) )==KMessageBox::Yes ) {
QString message = xi18n( "The URL is not valid. Would you like to open a browser window\nto the Google search engine?" );
QString caption = xi18n( "Invalid URL" );
if ( KMessageBox::warningYesNo( 0, message, caption, KGuiItem(xi18n("Browse Google")), KGuiItem(xi18n("Do Not Browse")) )==KMessageBox::Yes ) {
KToolInvocation::invokeBrowser( "http://www.google.com" );
}
}
......@@ -60,12 +60,12 @@ void AddLinkDialog::checkURL( void ) {
void AddLinkDialog::changeDefaultDescription( int id ) {
//If the user hasn't changed the default desc text, but the link type (image/webpage)
//has been toggled, update the default desc text
if ( id==1 && desc().startsWith( i18n( "Show image of " ) ) ) {
ald->DescBox->setText( i18n( "Show webpage about " ) + ObjectName );
if ( id==1 && desc().startsWith( xi18n( "Show image of " ) ) ) {
ald->DescBox->setText( xi18n( "Show webpage about " ) + ObjectName );
}
if ( id==0 && desc().startsWith( i18n( "Show webpage about " ) ) ) {
ald->DescBox->setText( i18n( "Show image of " ) + ObjectName );
if ( id==0 && desc().startsWith( xi18n( "Show webpage about " ) ) ) {
ald->DescBox->setText( xi18n( "Show image of " ) + ObjectName );
}
}
......
......@@ -44,7 +44,7 @@ public:
/**
*Constructor.
*/
explicit AddLinkDialog( QWidget* parent = 0, const QString &oname=i18n("object") );
explicit AddLinkDialog( QWidget* parent = 0, const QString &oname=xi18n("object") );
/**
*Destructor (empty)
......
......@@ -84,7 +84,7 @@ DetailDialog::DetailDialog(SkyObject *o, const KStarsDateTime &ut, GeoLocation *
//Create thumbnail image
Thumbnail = new QPixmap( 200, 200 );
setCaption( i18n( "Object Details" ) );
setCaption( xi18n( "Object Details" ) );
setButtons( KDialog::Close );
createGeneralTab();
......@@ -101,7 +101,7 @@ DetailDialog::~DetailDialog() {
void DetailDialog::createGeneralTab()
{
Data = new DataWidget(this);
addPage( Data, i18n("General") );
addPage( Data, xi18n("General") );
Data->Names->setPalette( titlePalette );
......@@ -145,8 +145,8 @@ void DetailDialog::createGeneralTab()
else
Data->Names->setText( QString( ", HD %1" ).arg( QString::number( s->getHDIndex() ) ) );
}
objecttyp = s->sptype() + ' ' + i18n("star");
Data->Magnitude->setText( i18nc( "number in magnitudes", "%1 mag" ,
objecttyp = s->sptype() + ' ' + xi18n("star");
Data->Magnitude->setText( xi18nc( "number in magnitudes", "%1 mag" ,
KLocale::global()->formatNumber( s->mag(), 2 ) ) ); //show to hundredth place
Data->BVLabel->setVisible( true );
......@@ -161,15 +161,15 @@ void DetailDialog::createGeneralTab()
//distance
if ( s->distance() > 2000. || s->distance() < 0. ) // parallax < 0.5 mas
Data->Distance->setText( QString(i18nc("larger than 2000 parsecs", "> 2000 pc") ) );
Data->Distance->setText( QString(xi18nc("larger than 2000 parsecs", "> 2000 pc") ) );
else if ( s->distance() > 50.0 ) //show to nearest integer
Data->Distance->setText( i18nc( "number in parsecs", "%1 pc" ,
Data->Distance->setText( xi18nc( "number in parsecs", "%1 pc" ,
KLocale::global()->formatNumber( s->distance(), 0 ) ) );
else if ( s->distance() > 10.0 ) //show to tenths place
Data->Distance->setText( i18nc( "number in parsecs", "%1 pc" ,
Data->Distance->setText( xi18nc( "number in parsecs", "%1 pc" ,
KLocale::global()->formatNumber( s->distance(), 1 ) ) );
else //show to hundredths place
Data->Distance->setText( i18nc( "number in parsecs", "%1 pc" ,
Data->Distance->setText( xi18nc( "number in parsecs", "%1 pc" ,
KLocale::global()->formatNumber( s->distance(), 2 ) ) );
//Note multiplicity/variablility in angular size label
......@@ -177,12 +177,12 @@ void DetailDialog::createGeneralTab()
Data->AngSize->setText( QString() );
Data->AngSizeLabel->setFont( Data->AngSize->font() );
if ( s->isMultiple() && s->isVariable() ) {
Data->AngSizeLabel->setText( i18nc( "the star is a multiple star", "multiple" ) + ',' );
Data->AngSize->setText( i18nc( "the star is a variable star", "variable" ) );
Data->AngSizeLabel->setText( xi18nc( "the star is a multiple star", "multiple" ) + ',' );
Data->AngSize->setText( xi18nc( "the star is a variable star", "variable" ) );
} else if ( s->isMultiple() )
Data->AngSizeLabel->setText( i18nc( "the star is a multiple star", "multiple" ) );
Data->AngSizeLabel->setText( xi18nc( "the star is a multiple star", "multiple" ) );
else if ( s->isVariable() )
Data->AngSizeLabel->setText( i18nc( "the star is a variable star", "variable" ) );
Data->AngSizeLabel->setText( xi18nc( "the star is a variable star", "variable" ) );
break; //end of stars case
case SkyObject::ASTEROID: //[fall through to planets]
......@@ -194,11 +194,11 @@ void DetailDialog::createGeneralTab()
Data->Names->setText( ps->longname() );
//Type is "G5 star" for Sun
if ( ps->name() == "Sun" )
objecttyp = i18n("G5 star");
objecttyp = xi18n("G5 star");
else if ( ps->name() == "Moon" )
objecttyp = ps->translatedName();
else if ( ps->name() == i18n("Pluto") || ps->name() == "Ceres" || ps->name() == "Eris" ) // TODO: Check if Ceres / Eris have translations and i18n() them
objecttyp = i18n("Dwarf planet");
else if ( ps->name() == xi18n("Pluto") || ps->name() == "Ceres" || ps->name() == "Eris" ) // TODO: Check if Ceres / Eris have translations and i18n() them
objecttyp = xi18n("Dwarf planet");
else
objecttyp = ps->typeName();
......@@ -211,30 +211,30 @@ void DetailDialog::createGeneralTab()
}
if(selectedObject->type() == SkyObject::COMET){
Data->Magnitude->setText( i18nc( "number in magnitudes", "%1 mag" ,
Data->Magnitude->setText( xi18nc( "number in magnitudes", "%1 mag" ,
KLocale::global()->formatNumber( ((KSComet *)selectedObject)->getTotalMagnitudeParameter(), 2 ) ) ); //show to hundredth place
}
else{
Data->Magnitude->setText( i18nc( "number in magnitudes", "%1 mag" ,
Data->Magnitude->setText( xi18nc( "number in magnitudes", "%1 mag" ,
KLocale::global()->formatNumber( ps->mag(), 2 ) ) ); //show to hundredth place
}
//Distance from Earth. The moon requires a unit conversion
if ( ps->name() == "Moon" ) {
Data->Distance->setText( i18nc("distance in kilometers", "%1 km",
Data->Distance->setText( xi18nc("distance in kilometers", "%1 km",
KLocale::global()->formatNumber( ps->rearth()*AU_KM ) ) );
} else {
Data->Distance->setText( i18nc("distance in Astronomical Units", "%1 AU",
Data->Distance->setText( xi18nc("distance in Astronomical Units", "%1 AU",
KLocale::global()->formatNumber( ps->rearth() ) ) );
}
//Angular size; moon and sun in arcmin, others in arcsec
if ( ps->angSize() ) {
if ( ps->name() == "Sun" || ps->name() == "Moon" )
Data->AngSize->setText( i18nc("angular size in arcminutes", "%1 arcmin",
Data->AngSize->setText( xi18nc("angular size in arcminutes", "%1 arcmin",
KLocale::global()->formatNumber( ps->angSize() ) ) ); // Needn't be a plural form because sun / moon will never contract to 1 arcminute
else
Data->AngSize->setText( i18nc("angular size in arcseconds","%1 arcsec",
Data->AngSize->setText( xi18nc("angular size in arcseconds","%1 arcsec",
KLocale::global()->formatNumber( ps->angSize()*60.0 ) ) );
} else {
Data->AngSize->setText( "--" );
......@@ -247,7 +247,7 @@ void DetailDialog::createGeneralTab()
Data->Names->setText(sup->name());
Data->Magnitude->setText( i18nc( "number in magnitudes", "%1 mag" ,
Data->Magnitude->setText( xi18nc( "number in magnitudes", "%1 mag" ,
KLocale::global()->formatNumber( sup->mag(), 2 ) ) );
Data->Distance->setText( "---" );
......@@ -285,14 +285,14 @@ void DetailDialog::createGeneralTab()
if (dso->type() == SkyObject::RADIO_SOURCE)
{
Data->MagLabel->setText(i18nc("integrated flux at a frequency", "Flux(%1):", dso->customCatalog()->fluxFrequency()));
Data->Magnitude->setText( i18nc( "integrated flux value", "%1 %2" ,
Data->MagLabel->setText(xi18nc("integrated flux at a frequency", "Flux(%1):", dso->customCatalog()->fluxFrequency()));
Data->Magnitude->setText( xi18nc( "integrated flux value", "%1 %2" ,
KLocale::global()->formatNumber( dso->flux(), 1 ), dso->customCatalog()->fluxUnit()) ); //show to tenths place
}
else if ( dso->mag() > 90.0 )
Data->Magnitude->setText( "--" );
else
Data->Magnitude->setText( i18nc( "number in magnitudes", "%1 mag" ,
Data->Magnitude->setText( xi18nc( "number in magnitudes", "%1 mag" ,
KLocale::global()->formatNumber( dso->mag(), 1 ) ) ); //show to tenths place
//No distances at this point...
......@@ -300,10 +300,10 @@ void DetailDialog::createGeneralTab()
//Only show decimal place for small angular sizes
if ( dso->a() > 10.0 )
Data->AngSize->setText( i18nc("angular size in arcminutes", "%1 arcmin",
Data->AngSize->setText( xi18nc("angular size in arcminutes", "%1 arcmin",
KLocale::global()->formatNumber(dso->a(), 0 ) ) );
else if ( dso->a() )
Data->AngSize->setText( i18nc("angular size in arcminutes", "%1 arcmin",
Data->AngSize->setText( xi18nc("angular size in arcminutes", "%1 arcmin",
KLocale::global()->formatNumber( dso->a(), 1 ) ) );
else
Data->AngSize->setText( "--" );
......@@ -434,13 +434,13 @@ void DetailDialog::createGeneralTab()
KStarsData::Instance()->skyComposite()->getConstellationBoundary()->constellationName( selectedObject ) );
else
Data->ObjectTypeInConstellation->setText(
i18nc("%1 type of sky object (planet, asteroid etc), %2 name of a constellation", "%1 in %2", objecttyp,
xi18nc("%1 type of sky object (planet, asteroid etc), %2 name of a constellation", "%1 in %2", objecttyp,
KStarsData::Instance()->skyComposite()->getConstellationBoundary()->constellationName( selectedObject ) ) );
}
void DetailDialog::createPositionTab( const KStarsDateTime &ut, GeoLocation *geo ) {
Pos = new PositionWidget(this);
addPage( Pos, i18n("Position") );
addPage( Pos, xi18n("Position") );
Pos->CoordTitle->setPalette( titlePalette );
Pos->RSTTitle->setPalette( titlePalette );
......@@ -455,8 +455,8 @@ void DetailDialog::createPositionTab( const KStarsDateTime &ut, GeoLocation *geo
qDebug() << (selectedObject->deprecess(data->updateNum(),2451545.0l)).ra0().toHMSString() << (selectedObject->deprecess(data->updateNum(),2451545.0l)).dec0().toDMSString() << endl;
//qDebug() << selectedObject->ra().toHMSString() << selectedObject->dec().toDMSString() << endl;
Pos->RALabel->setText( i18n( "RA (%1):", sEpoch ) );
Pos->DecLabel->setText( i18n( "Dec (%1):", sEpoch ) );
Pos->RALabel->setText( xi18n( "RA (%1):", sEpoch ) );
Pos->DecLabel->setText( xi18n( "Dec (%1):", sEpoch ) );
Pos->RA->setText( selectedObject->ra().toHMSString() );
Pos->Dec->setText( selectedObject->dec().toDMSString() );
......@@ -529,15 +529,15 @@ void DetailDialog::createPositionTab( const KStarsDateTime &ut, GeoLocation *geo
Pos->AzSet->setText( saz.toDMSString() );
} else {
if ( selectedObject->alt().Degrees() > 0.0 ) {
Pos->TimeRise->setText( i18n( "Circumpolar" ) );
Pos->TimeSet->setText( i18n( "Circumpolar" ) );
Pos->TimeRise->setText( xi18n( "Circumpolar" ) );
Pos->TimeSet->setText( xi18n( "Circumpolar" ) );
} else {
Pos->TimeRise->setText( i18n( "Never rises" ) );
Pos->TimeSet->setText( i18n( "Never rises" ) );
Pos->TimeRise->setText( xi18n( "Never rises" ) );
Pos->TimeSet->setText( xi18n( "Never rises" ) );
}
Pos->AzRise->setText( i18nc( "Not Applicable", "N/A" ) );
Pos->AzSet->setText( i18nc( "Not Applicable", "N/A" ) );