Skip to content
Permalink
Browse files

string translation update:

- collect concatenated strings into one string to get more translation context (foo + tr(" bar ") + baz => tr("%1 bar %2)").arg( foo ).arg( bar) 
- don't qualify tr(), when not necessary (QObject::tr => tr)
- remove QString cast/ctor where not necessary ( QString( tr(...) ) => tr (...) )
- add numerusforms where applicable
- fix QgsGrassEdit::setCanvasPrompt (was setCanvasPropmt) and more typos
- remove plugin template strings from coordinate capture plugin
- add Q_OBJECT to classes using QObject::tr (fixes lupdate warnings)



git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9897 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Dec 26, 2008
1 parent 997c368 commit b62f7622c71c9711004b124ff4c34d96315fb44b
Showing with 865 additions and 1,050 deletions.
  1. +7 −0 src/app/CMakeLists.txt
  2. +17 −18 src/app/composer/qgscomposer.cpp
  3. +5 −5 src/app/composer/qgscomposerscalebarwidget.cpp
  4. +3 −3 src/app/legend/qgslegendlayerfile.cpp
  5. +70 −73 src/app/qgisapp.cpp
  6. +3 −8 src/app/qgsattributetabledisplay.cpp
  7. +3 −5 src/app/qgsbookmarks.cpp
  8. +16 −11 src/app/qgscustomprojectiondialog.cpp
  9. +6 −7 src/app/qgsdbsourceselect.cpp
  10. +1 −1 src/app/qgsidentifyresults.cpp
  11. +3 −2 src/app/qgsmapserverexport.cpp
  12. +21 −21 src/app/qgsmaptooladdfeature.cpp
  13. +1 −0 src/app/qgsmaptooladdfeature.h
  14. +9 −9 src/app/qgsmaptooladdisland.cpp
  15. +1 −0 src/app/qgsmaptooladdisland.h
  16. +14 −14 src/app/qgsmaptooladdring.cpp
  17. +1 −0 src/app/qgsmaptooladdring.h
  18. +21 −28 src/app/qgsmaptoolidentify.cpp
  19. +3 −3 src/app/qgsmaptoolmovefeature.cpp
  20. +1 −0 src/app/qgsmaptoolmovefeature.h
  21. +6 −6 src/app/qgsmaptoolselect.cpp
  22. +1 −0 src/app/qgsmaptoolselect.h
  23. +7 −7 src/app/qgsmaptoolsplitfeatures.cpp
  24. +1 −1 src/app/qgsnewconnection.cpp
  25. +1 −1 src/app/qgsoptions.cpp
  26. +18 −21 src/app/qgspgquerybuilder.cpp
  27. +1 −1 src/app/qgspluginmanager.cpp
  28. +3 −3 src/app/qgspluginregistry.cpp
  29. +36 −37 src/app/qgsrasterlayerproperties.cpp
  30. +1 −6 src/app/qgssearchquerybuilder.cpp
  31. +16 −19 src/app/qgsserversourceselect.cpp
  32. +38 −67 src/app/qgsvectorlayerproperties.cpp
  33. +1 −0 src/core/CMakeLists.txt
  34. +1 −1 src/core/composer/qgscomposerlegend.cpp
  35. +2 −2 src/core/composer/qgscomposermap.cpp
  36. +1 −0 src/core/qgsapplication.h
  37. +7 −6 src/core/qgscoordinatetransform.cpp
  38. +15 −25 src/core/qgshttptransaction.cpp
  39. +5 −5 src/core/qgsmaplayer.cpp
  40. +11 −12 src/core/qgsproject.cpp
  41. +2 −6 src/core/qgsproviderregistry.cpp
  42. +3 −4 src/core/qgsrunprocess.cpp
  43. +1 −2 src/core/qgssearchtreenode.cpp
  44. +24 −24 src/core/qgsvectorlayer.cpp
  45. +15 −13 src/core/raster/qgsrasterlayer.cpp
  46. +2 −2 src/gui/qgsgenericprojectionselector.cpp
  47. +10 −11 src/gui/qgsmapcanvas.cpp
  48. +7 −7 src/gui/qgsquickprint.cpp
  49. +5 −9 src/helpviewer/qgshelpviewer.cpp
  50. +1 −54 src/plugins/coordinate_capture/coordinatecapturegui.cpp
  51. +3 −3 src/plugins/delimited_text/qgsdelimitedtextplugin.cpp
  52. +1 −2 src/plugins/dxf2shp_converter/dxf2shpconverter.cpp
  53. +7 −9 src/plugins/geoprocessing/qgspggeoprocessing.cpp
  54. +2 −1 src/plugins/geoprocessing/qgspggeoprocessing.h
  55. +3 −3 src/plugins/georeferencer/plugingui.cpp
  56. +3 −6 src/plugins/georeferencer/qgsleastsquares.cpp
  57. +4 −5 src/plugins/georeferencer/qgspointdialog.cpp
  58. +8 −10 src/plugins/gps_importer/qgsgpsplugin.cpp
  59. +6 −4 src/plugins/gps_importer/qgsgpsplugingui.cpp
  60. +1 −0 src/plugins/grass/CMakeLists.txt
  61. +17 −16 src/plugins/grass/qgsgrassbrowser.cpp
  62. +9 −9 src/plugins/grass/qgsgrassedit.cpp
  63. +1 −1 src/plugins/grass/qgsgrassedit.h
  64. +36 −36 src/plugins/grass/qgsgrassedittools.cpp
  65. +10 −0 src/plugins/grass/qgsgrassedittools.h
  66. +9 −17 src/plugins/grass/qgsgrassmapcalc.cpp
  67. +9 −9 src/plugins/grass/qgsgrassmodel.cpp
  68. +42 −47 src/plugins/grass/qgsgrassmodule.cpp
  69. +10 −18 src/plugins/grass/qgsgrassnewmapset.cpp
  70. +25 −31 src/plugins/grass/qgsgrassplugin.cpp
  71. +3 −3 src/plugins/grass/qgsgrassregion.cpp
  72. +8 −10 src/plugins/grass/qgsgrasstools.cpp
  73. +2 −2 src/plugins/grid_maker/plugingui.cpp
  74. +1 −1 src/plugins/north_arrow/plugin.cpp
  75. +6 −7 src/plugins/ogr_converter/dialog.cpp
  76. +2 −2 src/plugins/quick_print/quickprintgui.cpp
  77. +1 −2 src/plugins/quick_print/quickprintplugin.cpp
  78. +7 −15 src/plugins/spit/qgsshapefile.cpp
  79. +68 −71 src/plugins/spit/qgsspit.cpp
  80. +2 −2 src/plugins/wfs/qgswfssourceselect.cpp
  81. +4 −5 src/providers/gpx/gpsdata.cpp
  82. +6 −6 src/providers/grass/qgsgrass.cpp
  83. +24 −38 src/providers/postgres/qgspostgresprovider.cpp
  84. +1 −1 src/providers/wfs/qgswfsprovider.cpp
  85. +71 −94 src/providers/wms/qgswmsprovider.cpp
  86. +5 −4 src/python/qgspythonutilsimpl.cpp
@@ -98,9 +98,16 @@ SET (QGIS_APP_MOC_HDRS
qgsidentifyresults.h
qgslabeldialog.h
qgsludialog.h

qgsmaptoolidentify.h
qgsmaptoolsplitfeatures.h
qgsmaptoolvertexedit.h
qgsmaptooladdfeature.h
qgsmaptooladdisland.h
qgsmaptooladdring.h
qgsmaptoolmovefeature.h
qgsmaptoolselect.h

qgsmeasuretool.h
qgsmeasuredialog.h
qgsnewhttpconnection.h
@@ -471,10 +471,8 @@ void QgsComposer::on_mActionExportAsImage_activated( void )
if ( memuse > 200 ) // cca 4500 x 4500
{
int answer = QMessageBox::warning( 0, tr( "Big image" ),
tr( "To create image " ) + QString::number( width ) + " x "
+ QString::number( height )
+ tr( " requires circa " )
+ QString::number( memuse ) + tr( " MB of memory" ),
tr( "To create image %1 x %2 required circa %3 MB of memory" )
.arg( width ).arg( height ).arg( memuse ),
QMessageBox::Ok, QMessageBox::Abort );

raise();
@@ -501,7 +499,8 @@ void QgsComposer::on_mActionExportAsImage_activated( void )
for ( ; myCounterInt < QImageWriter::supportedImageFormats().count(); myCounterInt++ )
{
QString myFormat = QString( QImageWriter::supportedImageFormats().at( myCounterInt ) );
QString myFilter = myFormat + " " + tr( "format" ) + " (*." + myFormat.toLower() + " *." + myFormat.toUpper() + ")";
QString myFilter = tr( "%1 format (*.%2 *.%3)" )
.arg( myFormat ).arg( myFormat.toLower() ).arg( myFormat.toUpper() );

if ( myCounterInt > 0 ) myFilters += ";;";
myFilters += myFilter;
@@ -602,26 +601,26 @@ void QgsComposer::on_mActionExportAsSVG_activated( void )
m->setMessageAsHtml( tr( "<p>The SVG export function in Qgis has several "
"problems due to bugs and deficiencies in the " )
#if QT_VERSION < 0x040300
+ tr( "Qt4 svg code. Of note, text does not "
"appear in the SVG file and there are problems "
"with the map bounding box clipping other items "
"such as the legend or scale bar.</p>" )
+ tr( "Qt4 svg code. Of note, text does not "
"appear in the SVG file and there are problems "
"with the map bounding box clipping other items "
"such as the legend or scale bar.</p>" )
#else
+ tr( "Qt4 svg code. In particular, there are problems "
"with layers not being clipped to the map "
"bounding box.</p>" )
+ tr( "Qt4 svg code. In particular, there are problems "
"with layers not being clipped to the map "
"bounding box.</p>" )
#endif
+ tr( "If you require a vector-based output file from "
"Qgis it is suggested that you try printing "
"to PostScript if the SVG output is not "
"satisfactory."
"</p>" ) );
+ tr( "<p>If you require a vector-based output file from "
"Qgis it is suggested that you try printing "
"to PostScript if the SVG output is not "
"satisfactory."
"</p>" ) );
m->exec();
}
QString myLastUsedFile = myQSettings.value( "/UI/lastSaveAsSvgFile", "qgis.svg" ).toString();
QFileInfo file( myLastUsedFile );
QFileDialog *myQFileDialog = new QFileDialog( this, tr( "Choose a file name to save the map as" ),
file.path(), tr( "SVG Format" ) + " (*.svg *SVG)" );
file.path(), tr( "SVG Format" ) + " (*.svg *.SVG)" );
myQFileDialog->selectFile( file.fileName() );
myQFileDialog->setFileMode( QFileDialog::AnyFile );
myQFileDialog->setAcceptMode( QFileDialog::AcceptSave );
@@ -64,7 +64,7 @@ void QgsComposerScaleBarWidget::refreshMapComboBox()
QList<const QgsComposerMap*>::const_iterator mapItemIt = availableMaps.constBegin();
for ( ; mapItemIt != availableMaps.constEnd(); ++mapItemIt )
{
mMapComboBox->addItem( tr( "Map " ) + QString::number(( *mapItemIt )->id() ) );
mMapComboBox->addItem( tr( "Map %1" ).arg(( *mapItemIt )->id() ) );
}
}
}
@@ -145,7 +145,7 @@ void QgsComposerScaleBarWidget::setGuiElements()
//map combo box
if ( mComposerScaleBar->composerMap() )
{
QString mapText = tr( "Map " ) + mComposerScaleBar->composerMap()->id();
QString mapText = tr( "Map %1" ).arg( mComposerScaleBar->composerMap()->id() );
int itemId = mMapComboBox->findText( mapText );
if ( itemId > 0 )
{
@@ -289,7 +289,7 @@ void QgsComposerScaleBarWidget::on_mStyleComboBox_currentIndexChanged( const QSt
}
else if ( text == tr( "Double Box" ) )
{
untranslatedStyleName = "Double Box";
untranslatedStyleName = "Double Box";
}
else if ( text == tr( "Line Ticks Middle" ) )
{
@@ -305,11 +305,11 @@ void QgsComposerScaleBarWidget::on_mStyleComboBox_currentIndexChanged( const QSt
}
else if ( text == tr( "Line Ticks Up" ) )
{
untranslatedStyleName = "Line Ticks Up";
untranslatedStyleName = "Line Ticks Up";
}
else if ( text == tr( "Numeric" ) )
{
untranslatedStyleName = "Numeric";
untranslatedStyleName = "Numeric";
}
mComposerScaleBar->setStyle( untranslatedStyleName );
mComposerScaleBar->update();
@@ -277,8 +277,8 @@ void QgsLegendLayerFile::saveAsShapefileGeneral( bool saveOnlySelection )

QgsGenericProjectionSelector * mySelector = new QgsGenericProjectionSelector();
mySelector->setSelectedCrsId( destCRS.srsid() );
mySelector->setMessage( tr( "Select the coordinate reference system for the saved shapefile." ) +
tr( "The data points will be transformed from the layer coordinate reference system." ) );
mySelector->setMessage( tr( "Select the coordinate reference system for the saved shapefile. "
"The data points will be transformed from the layer coordinate reference system." ) );

if ( mySelector->exec() )
{
@@ -325,7 +325,7 @@ void QgsLegendLayerFile::saveAsShapefileGeneral( bool saveOnlySelection )

case QgsVectorFileWriter::ErrCreateDataSource:
QMessageBox::warning( 0, tr( "Error creating shapefile" ),
tr( "The shapefile could not be created (" ) + shapefileName + ")" );
tr( "The shapefile could not be created (%1)" ).arg( shapefileName ) );
break;

case QgsVectorFileWriter::ErrCreateLayer:

0 comments on commit b62f762

Please sign in to comment.
You can’t perform that action at this time.