rendered paste bodyIndex: src/dialogs/shoppinglistviewdialog.cpp
===================================================================
--- src/dialogs/shoppinglistviewdialog.cpp (revision 1044800)
+++ src/dialogs/shoppinglistviewdialog.cpp (working copy)
@@ -27,7 +27,7 @@
: KDialog( parent )
{
this->setObjectName( "shoppingviewdialog" );
- this->setCaption( i18n( "Shopping List" ) );
+ this->setCaption( i18nc( "@title:window", "Shopping List" ) );
this->setModal( true );
this->setButtons( KDialog::Close | KDialog::User1 );
this->setButtonGuiItem( KDialog::User1 , KStandardGuiItem::print() );
Index: src/dialogs/createingredientweightdialog.cpp
===================================================================
--- src/dialogs/createingredientweightdialog.cpp (revision 1044800)
+++ src/dialogs/createingredientweightdialog.cpp (working copy)
@@ -30,7 +30,7 @@
CreateIngredientWeightDialog::CreateIngredientWeightDialog( QWidget* parent, RecipeDB *db )
: KDialog( parent )
{
- setCaption( i18n( "Add Ingredient Weight" ) );
+ setCaption( i18nc( "@title:window", "Add Ingredient Weight" ) );
setButtons(KDialog::Ok | KDialog::Cancel);
setDefaultButton(KDialog::Ok);
setModal( true );
@@ -72,7 +72,7 @@
groupBox1Layout->addWidget( perAmountUnitBox, 1, 2 );
- prepMethodBox = new PrepMethodComboBox( false, groupBox1, db, i18n("-No Preparation-") );
+ prepMethodBox = new PrepMethodComboBox( false, groupBox1, db, i18nc("@item", "-No Preparation-") );
prepMethodBox->reload();
groupBox1Layout->addWidget( prepMethodBox, 1, 3 );
@@ -92,23 +92,23 @@
void CreateIngredientWeightDialog::languageChange()
{
- groupBox1->setTitle( i18n( "New Ingredient Weight" ) );
- perAmountLabel->setText( i18n( "Per Amount:" ) );
- weightLabel->setText( i18n( "Weight:" ) );
+ groupBox1->setTitle( i18nc( "@title:group", "New Ingredient Weight" ) );
+ perAmountLabel->setText( i18nc( "@label:textbox", "Per Amount:" ) );
+ weightLabel->setText( i18nc( "@label:textbox", "Weight:" ) );
}
void CreateIngredientWeightDialog::slotOk()
{
if ( !perAmountEdit->isInputValid() ) {
- KMessageBox::error( this, i18n( "Amount field contains invalid input." ),
- i18n( "Invalid input" ) );
+ KMessageBox::error( this, i18nc( "@info", "Amount field contains invalid input." ),
+ i18nc( "@title:window", "Invalid input" ) );
perAmountEdit->setFocus();
perAmountEdit->selectAll();
return;
}
else if ( !weightEdit->isInputValid() ) {
- KMessageBox::error( this, i18n( "Amount field contains invalid input." ),
- i18n( "Invalid input" ) );
+ KMessageBox::error( this, i18nc( "@info", "Amount field contains invalid input." ),
+ i18nc( "@title:window", "Invalid input" ) );
weightEdit->setFocus();
weightEdit->selectAll();
return;
Index: src/dialogs/selectauthorsdialog.cpp
===================================================================
--- src/dialogs/selectauthorsdialog.cpp (revision 1044800)
+++ src/dialogs/selectauthorsdialog.cpp (working copy)
@@ -29,7 +29,7 @@
: KDialog(parent ),
database(db)
{
- setCaption(i18n("Authors" ));
+ setCaption(i18nc("@title:window", "Authors" ));
setButtons(KDialog::Ok | KDialog::Cancel);
setDefaultButton(KDialog::Ok);
setModal( true );
@@ -65,7 +65,7 @@
KConfigGroup config( KGlobal::config(), "Advanced" );
bool show_id = config.readEntry( "ShowID", false );
authorListView->addColumn( "Id" , show_id ? -1 : 0 );
- authorListView->addColumn( i18n( "Author" ) );
+ authorListView->addColumn( i18nc( "@title:column", "Author" ) );
authorListView->setAllColumnsShowFocus( true );
// Load the list
@@ -115,7 +115,7 @@
{
//check bounds first
if ( authorsCombo->currentText().length() > int(database->maxAuthorNameLength()) ) {
- KMessageBox::error( this, i18np( "Author name cannot be longer than 1 character.", "Author name cannot be longer than %1 characters." , database->maxAuthorNameLength() ) );
+ KMessageBox::error( this, i18ncp( "@info", "Author name cannot be longer than 1 character.", "Author name cannot be longer than %1 characters." , database->maxAuthorNameLength() ) );
authorsCombo->lineEdit() ->selectAll();
return ;
}
Index: src/dialogs/authorsdialog.cpp
===================================================================
--- src/dialogs/authorsdialog.cpp (revision 1044800)
+++ src/dialogs/authorsdialog.cpp (working copy)
@@ -44,12 +44,12 @@
vboxl->setSpacing( KDialog::spacingHint() );
newAuthorButton = new KPushButton( this );
- newAuthorButton->setText( i18n( "Create ..." ) );
+ newAuthorButton->setText( i18nc( "@action:button", "Create ..." ) );
newAuthorButton->setIcon( KIcon( "list-add") );
vboxl->addWidget( newAuthorButton );
removeAuthorButton = new KPushButton( this );
- removeAuthorButton->setText( i18n( "Delete" ) );
+ removeAuthorButton->setText( i18nc( "@action:button", "Delete" ) );
removeAuthorButton->setIcon( KIcon( "list-remove") );
vboxl->addWidget( removeAuthorButton );
vboxl->addStretch();
Index: src/dialogs/categorieseditordialog.cpp
===================================================================
--- src/dialogs/categorieseditordialog.cpp (revision 1044800)
+++ src/dialogs/categorieseditordialog.cpp (working copy)
@@ -43,12 +43,12 @@
QVBoxLayout* vboxl = new QVBoxLayout();
vboxl->setSpacing( KDialog::spacingHint() );
newCategoryButton = new KPushButton( this );
- newCategoryButton->setText( i18n( "Create ..." ) );
+ newCategoryButton->setText( i18nc( "@action:button", "Create ..." ) );
newCategoryButton->setIcon( KIcon( "list-add" ) );
vboxl->addWidget( newCategoryButton );
removeCategoryButton = new KPushButton( this );
- removeCategoryButton->setText( i18n( "Delete" ) );
+ removeCategoryButton->setText( i18nc( "@action:button", "Delete" ) );
removeCategoryButton->setIcon( KIcon( "list-remove" ) );
vboxl->addWidget( removeCategoryButton );
vboxl->addStretch();
Index: src/dialogs/unitsdialog.cpp
===================================================================
--- src/dialogs/unitsdialog.cpp (revision 1044800)
+++ src/dialogs/unitsdialog.cpp (working copy)
@@ -56,24 +56,24 @@
vboxl->setSpacing( KDialog::spacingHint() );
newUnitButton = new KPushButton( unitTab );
- newUnitButton->setText( i18n( "Create ..." ) );
+ newUnitButton->setText( i18nc( "@action:button", "Create ..." ) );
newUnitButton->setIcon( KIcon ( "list-add" ) );
vboxl->addWidget( newUnitButton );
removeUnitButton = new KPushButton( unitTab );
- removeUnitButton->setText( i18n( "Delete" ) );
+ removeUnitButton->setText( i18nc( "@action:button", "Delete" ) );
removeUnitButton->setIcon( KIcon ( "list-remove" ) );
vboxl->addWidget( removeUnitButton );
vboxl->addStretch();
layout->addLayout( vboxl );
- tabWidget->insertTab( -1, unitTab, i18n( "Units" ) );
+ tabWidget->insertTab( -1, unitTab, i18nc( "@title:tab", "Units" ) );
massConversionTable = new ConversionTable( tabWidget, 1, 1 );
- tabWidget->insertTab( -1, massConversionTable, i18n( "Mass Conversions" ) );
+ tabWidget->insertTab( -1, massConversionTable, i18nc( "@title:tab", "Mass Conversions" ) );
volumeConversionTable = new ConversionTable( tabWidget, 1, 1 );
- tabWidget->insertTab( -1, volumeConversionTable, i18n( "Volume Conversions" ) );
+ tabWidget->insertTab( -1, volumeConversionTable, i18nc( "@title:tab", "Volume Conversions" ) );
page_layout->addWidget( tabWidget );
@@ -194,7 +194,7 @@
#if 0
ConversionTable *conversionTable = massConversionTable;
- KProgressDialog progress_dialog( this, "progress_dialog", i18n( "Finding Unit Ratios" ), QString::null, true );
+ KProgressDialog progress_dialog( this, "progress_dialog", i18nc( "@title:window", "Finding Unit Ratios" ), QString::null, true );
progress_dialog.progressBar() ->setTotalSteps( ratioList.count() * ratioList.count() );
for ( UnitRatioList::const_iterator current_it = ratioList.begin(); current_it != ratioList.end(); ++current_it ) {
Index: src/dialogs/dietwizarddialog.cpp
===================================================================
--- src/dialogs/dietwizarddialog.cpp (revision 1044800)
+++ src/dialogs/dietwizarddialog.cpp (working copy)
@@ -56,7 +56,7 @@
optionsBox = new KHBox( this );
daysSliderBox = new QGroupBox( optionsBox );
- daysSliderBox->setTitle( i18n( "Number of Days" ) );
+ daysSliderBox->setTitle( i18nc( "@label:slider", "Number of Days" ) );
QVBoxLayout *daysSliderBoxLayout = new QVBoxLayout;
daysSliderBox->setLayout( daysSliderBoxLayout );
dayNumberLabel = new QLabel;
@@ -75,7 +75,7 @@
dayNumberSelector->setFixedWidth( 100 );
mealsSliderBox = new QGroupBox( optionsBox );
- mealsSliderBox->setTitle( i18n( "Meals per Day" ) );
+ mealsSliderBox->setTitle( i18nc( "@label:slider", "Meals per Day" ) );
QVBoxLayout *mealsSliderBoxLayout = new QVBoxLayout;
mealsSliderBox->setLayout( mealsSliderBoxLayout );
mealNumberLabel = new QLabel;
@@ -103,7 +103,7 @@
okButton = new KPushButton( bottom_layout );
okButton->setIcon( KIcon( "dialog-ok" ) );
- okButton->setText( i18n( "Create the diet" ) );
+ okButton->setText( i18nc( "@action:button", "Create the diet" ) );
KPushButton *clearButton = new KPushButton( bottom_layout );
clearButton->setIcon( KIcon( "edit-clear" ) );
@@ -112,7 +112,7 @@
// Create Tabs
//don't use newTab, it'll load data and we don't want it to do that at startup
mealTab = new MealInput( mealTabs, database );
- mealTabs->addTab( mealTab,i18n( "Meal 1" ) );
+ mealTabs->addTab( mealTab,i18nc( "@title:tab", "Meal 1" ) );
mealTabs->setCurrentIndex( mealTabs->indexOf( mealTab ) );
// Signals & Slots
@@ -166,7 +166,7 @@
while ( mealNumber != mn ) {
mealNumber++;
- newTab( i18n( "Meal %1" , mealNumber ) );
+ newTab( i18nc( "@title:tab", "Meal %1" , mealNumber ) );
}
}
@@ -243,7 +243,7 @@
if ( alert ) {
KApplication::restoreOverrideCursor();
- KMessageBox::sorry( this, i18n( "Given the constraints, a full diet list could not be constructed. Either the recipe list is too short or the constraints are too demanding. " ) );
+ KMessageBox::sorry( this, i18nc( "@info", "Given the constraints, a full diet list could not be constructed. Either the recipe list is too short or the constraints are too demanding. " ) );
}
else // show the resulting diet
@@ -338,7 +338,7 @@
// Number of dishes input
dishNumberBox = new KHBox( mealOptions );
dishNumberBox->setSpacing( 10 );
- dishNumberLabel = new QLabel( i18n( "No. of dishes: " ), dishNumberBox );
+ dishNumberLabel = new QLabel( i18nc( "@label:spinbox", "No. of dishes: " ), dishNumberBox );
dishNumberInput = new QSpinBox( dishNumberBox );
dishNumberInput->setMinimum( 1 );
dishNumberInput->setMaximum( 10 );
@@ -355,12 +355,12 @@
buttonPrev = new QToolButton;
toolBarLayout->addWidget( buttonPrev );
buttonPrev->setToolButtonStyle( Qt::ToolButtonTextUnderIcon );
- buttonPrev->setText( i18n( "Previous Dish" ) );
+ buttonPrev->setText( i18nc( "@action:button", "Previous Dish" ) );
buttonPrev->setIcon( KIcon( "go-previous" ) );
buttonNext = new QToolButton;
toolBarLayout->addWidget( buttonNext );
buttonNext->setToolButtonStyle( Qt::ToolButtonTextUnderIcon );
- buttonNext->setText( i18n( "Next Dish" ) );
+ buttonNext->setText( i18nc( "@action:button", "Next Dish" ) );
buttonNext->setIcon( KIcon( "go-next" ) );
buttonPrev->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Minimum ) );
@@ -486,7 +486,7 @@
//Horizontal Box to hold the K3ListView's
listBox = new QGroupBox;
QHBoxLayout *listBoxLayout = new QHBoxLayout;
- listBox->setTitle( i18n( "Dish Characteristics" ) );
+ listBox->setTitle( i18nc( "@label:listbox", "Dish Characteristics" ) );
listBox->setLayout( listBoxLayout );
layout->addWidget( listBox );
@@ -498,7 +498,7 @@
//Categories list
categoriesBox = new KVBox;
categoriesEnabledBox = new QCheckBox( categoriesBox );
- categoriesEnabledBox->setText( i18n( "Enable Category Filtering" ) );
+ categoriesEnabledBox->setText( i18nc( "@option:check", "Enable Category Filtering" ) );
categoriesView = new CategoryCheckListView( categoriesBox, database, false );
categoriesView->setSizePolicy( QSizePolicy::Ignored, QSizePolicy::Ignored );
Index: src/dialogs/createpropertydialog.cpp
===================================================================
--- src/dialogs/createpropertydialog.cpp (revision 1044800)
+++ src/dialogs/createpropertydialog.cpp (working copy)
@@ -19,7 +19,7 @@
CreatePropertyDialog::CreatePropertyDialog( QWidget *parent, UnitList* list )
: KDialog( parent )
{
- setCaption( i18n( "New Property" ) );
+ setCaption( i18nc( "@title:window", "New Property" ) );
setButtons(KDialog::Ok | KDialog::Cancel);
setDefaultButton( KDialog::Ok);
setModal( true );
@@ -35,15 +35,15 @@
box->layout() ->setMargin( 11 );
QGridLayout *gridLayout = new QGridLayout( box->layout() );
gridLayout->setAlignment( Qt::AlignTop );
- box->setTitle( i18n( "New Property" ) );
+ box->setTitle( i18nc( "@title:group", "New Property" ) );
- nameEditText = new QLabel( i18n( "Property name:" ), box );
+ nameEditText = new QLabel( i18nc( "@label:textbox", "Property name:" ), box );
propertyNameEdit = new KLineEdit( box );
propertyNameEdit->setMinimumWidth( 150 );
gridLayout->addWidget( nameEditText, 0, 0 );
gridLayout->addWidget( propertyNameEdit, 0, 1 );
- unitsText = new QLabel( i18n( "Units:" ), box );
+ unitsText = new QLabel( i18nc( "@label:textbox", "Units:" ), box );
propertyUnits = new KLineEdit( box );
propertyUnits->setMinimumWidth( 150 );
gridLayout->addWidget( unitsText, 1, 0 );
Index: src/dialogs/createunitconversiondialog.cpp
===================================================================
--- src/dialogs/createunitconversiondialog.cpp (revision 1044800)
+++ src/dialogs/createunitconversiondialog.cpp (working copy)
@@ -72,8 +72,8 @@
void CreateUnitConversionDialog::languageChange()
{
- setCaption( i18n( "Unit Conversion" ) );
- buttonGroup1->setTitle( i18n( "New Unit Conversion" ) );
+ setCaption( i18nc( "@title:window", "Unit Conversion" ) );
+ buttonGroup1->setTitle( i18nc( "@title:group", "New Unit Conversion" ) );
fromUnitLabel->setText( QString::null );
textLabel4->setText( "=" );
}
Index: src/dialogs/ingredientsdialog.cpp
===================================================================
--- src/dialogs/ingredientsdialog.cpp (revision 1044800)
+++ src/dialogs/ingredientsdialog.cpp (working copy)
@@ -58,7 +58,7 @@
QSpacerItem* spacer_top = new QSpacerItem( 10, 10, QSizePolicy::Minimum, QSizePolicy::Fixed );
layout->addItem( spacer_top, 0, 1 );
- ingredientListView = new KreListView ( ingredientTab, i18n( "Ingredient list" ), true, 0 );
+ ingredientListView = new KreListView ( ingredientTab, i18nc( "@title", "Ingredient list" ), true, 0 );
StdIngredientListView *list_view = new StdIngredientListView( ingredientListView, database, true );
ingredientActionsHandler = new IngredientActionsHandler( list_view, database );
ingredientListView->setListView( list_view );
@@ -89,14 +89,14 @@
layout->addItem( buttonLayout, 1, 3 );
- QPushButton *propertyButton = new KPushButton( i18n("Property Information"), ingredientTab );
+ QPushButton *propertyButton = new KPushButton( i18nc("@action:button", "Property Information"), ingredientTab );
propertyButton->setIcon( KIcon( "document-properties") );
layout->addWidget( propertyButton, 6, 1 );
- tabWidget->insertTab( -1, ingredientTab, i18n( "Ingredients" ) );
+ tabWidget->insertTab( -1, ingredientTab, i18nc( "@title:tab", "Ingredients" ) );
groupsDialog = new IngredientGroupsDialog(database,tabWidget,"groupsDialog");
- tabWidget->insertTab( -1, groupsDialog, i18n( "Headers" ) );
+ tabWidget->insertTab( -1, groupsDialog, i18nc( "@title:tab", "Headers" ) );
page_layout->addWidget( tabWidget );
@@ -147,7 +147,7 @@
delete d;
}
else
- KMessageBox::information( this, i18n( "No ingredient selected." ), QString::null );
+ KMessageBox::information( this, i18nc( "@info", "No ingredient selected." ), QString::null );
}
#include "ingredientsdialog.moc"
Index: src/dialogs/refineshoppinglistdialog.cpp
===================================================================
--- src/dialogs/refineshoppinglistdialog.cpp (revision 1044800)
+++ src/dialogs/refineshoppinglistdialog.cpp (working copy)
@@ -34,7 +34,7 @@
: KDialog( parent),
database( db )
{
- setCaption( i18n( "Refine Shopping List" ) );
+ setCaption( i18nc( "@title:window", "Refine Shopping List" ) );
setButtons(KDialog::Ok);
setDefaultButton(KDialog::Ok);
setModal( true );
@@ -42,7 +42,7 @@
KVBox *page = new KVBox( this );
setMainWidget( page );
- setButtonText( KDialog::Ok, i18nc( "action:button Finished refining shopping list", "&Done" ) );
+ setButtonText( KDialog::Ok, i18nc( "@action:button Finished refining shopping list", "&Done" ) );
helpLabel = new QLabel( page );
@@ -84,9 +84,9 @@
layout2->addLayout( layout1 );
ingListView = new KreListView( layout2Widget, QString::null, true );
- ingListView->listView() ->addColumn( i18n( "Ingredients in Shopping List" ) );
- ingListView->listView() ->addColumn( i18n( "Amount" ) );
- ingListView->listView() ->addColumn( i18n( "Unit" ) );
+ ingListView->listView() ->addColumn( i18nc( "@title:column", "Ingredients in Shopping List" ) );
+ ingListView->listView() ->addColumn( i18nc( "@title:column", "Amount" ) );
+ ingListView->listView() ->addColumn( i18nc( "@title:column", "Unit" ) );
ingListView->listView() ->setItemsRenameable( true );
ingListView->listView() ->setRenameable( 0, false );
ingListView->listView() ->setRenameable( 1, true );
@@ -113,11 +113,11 @@
void RefineShoppingListDialog::languageChange()
{
- helpLabel->setText( i18n( "On the right are the ingredients needed for the recipes you selected. You may now add additional ingredients, remove ingredients you do not need, or modify the amounts of existing ingredients." ) );
- allIngListView->listView() ->header() ->setLabel( 0, i18n( "Ingredients" ) );
- ingListView->listView() ->header() ->setLabel( 0, i18n( "Ingredients in Shopping List" ) );
- ingListView->listView() ->header() ->setLabel( 1, i18n( "Amount" ) );
- ingListView->listView() ->header() ->setLabel( 2, i18n( "Unit" ) );
+ helpLabel->setText( i18nc( "@info", "On the right are the ingredients needed for the recipes you selected. You may now add additional ingredients, remove ingredients you do not need, or modify the amounts of existing ingredients." ) );
+ allIngListView->listView() ->header() ->setLabel( 0, i18nc( "@title:column", "Ingredients" ) );
+ ingListView->listView() ->header() ->setLabel( 0, i18nc( "@title:column", "Ingredients in Shopping List" ) );
+ ingListView->listView() ->header() ->setLabel( 1, i18nc( "@title:column", "Amount" ) );
+ ingListView->listView() ->header() ->setLabel( 2, i18nc( "@title:column", "Unit" ) );
}
void RefineShoppingListDialog::accept()
Index: src/dialogs/selectpropertydialog.cpp
===================================================================
--- src/dialogs/selectpropertydialog.cpp (revision 1044800)
+++ src/dialogs/selectpropertydialog.cpp (working copy)
@@ -31,7 +31,7 @@
setModal( true );
setButtons(KDialog::Ok | KDialog::Cancel);
setDefaultButton( KDialog::Ok);
- setCaption(i18n( "Choose Property" ));
+ setCaption(i18nc( "@title:window", "Choose Property" ));
// Initialize internal variables
unitListBack = new UnitList;
@@ -40,7 +40,7 @@
KVBox *page = new KVBox( this );
setMainWidget( page );
box = new Q3GroupBox( page );
- box->setTitle( i18n( "Choose Property" ) );
+ box->setTitle( i18nc( "@title:group", "Choose Property" ) );
box->setColumnLayout( 0, Qt::Vertical );
box->layout() ->setSpacing( 6 );
box->layout() ->setMargin( 11 );
@@ -53,7 +53,7 @@
bool show_id = config.readEntry( "ShowID", false );
propertyChooseView->addColumn( "Id" , show_id ? -1 : 0 );
- propertyChooseView->addColumn( i18n( "Property" ) );
+ propertyChooseView->addColumn( i18nc( "@title:column", "Property" ) );
propertyChooseView->setSorting(1);
propertyChooseView->setAllColumnsShowFocus( true );
boxLayout->addWidget( propertyChooseView );
@@ -62,7 +62,7 @@
perUnitsLabel = new QLabel( box );
perUnitsLabel->setGeometry( QRect( 5, 285, 100, 30 ) );
- perUnitsLabel->setText( i18n( "Per units:" ) );
+ perUnitsLabel->setText( i18nc( "@label:textbox", "Per units:" ) );
layout2->addWidget( perUnitsLabel );
perUnitsBox = new KComboBox( true, box );
@@ -141,7 +141,7 @@
QString unitName = ( *unit_it ).name;
if ( unitName.isEmpty() ) {
if ( m_showEmpty == ShowEmptyUnit )
- unitName = " "+i18n("-No unit-");
+ unitName = " "+i18nc("@item", "-No unit-");
else
continue;
}
Index: src/dialogs/resizerecipedialog.cpp
===================================================================
--- src/dialogs/resizerecipedialog.cpp (revision 1044800)
+++ src/dialogs/resizerecipedialog.cpp (working copy)
@@ -39,7 +39,7 @@
: KDialog( parent ),
m_recipe( recipe )
{
- setCaption(i18n("Resize Recipe" ));
+ setCaption(i18nc("@title:window", "Resize Recipe" ));
setButtons(KDialog::Ok | KDialog::Cancel);
setDefaultButton(KDialog::Ok);
setModal( true );
@@ -124,11 +124,11 @@
void ResizeRecipeDialog::languageChange()
{
buttonGroup->setTitle( QString::null );
- yieldRadioButton->setText( i18n( "Scale by yield" ) );
- newYieldLabel->setText( i18n( "New yield:" ) );
- currentYieldLabel->setText( i18n( "Current yield:" ) );
- factorRadioButton->setText( i18n( "Scale by factor" ) );
- factorLabel->setText( i18n( "Factor (i.e. 1/2 to half, 3 to triple):" ) );
+ yieldRadioButton->setText( i18nc( "@option:radio", "Scale by yield" ) );
+ newYieldLabel->setText( i18nc( "@label:text", "New yield:" ) );
+ currentYieldLabel->setText( i18nc( "@label:text", "Current yield:" ) );
+ factorRadioButton->setText( i18nc( "@option:radio", "Scale by factor" ) );
+ factorLabel->setText( i18nc( "@label:text", "Factor (i.e. 1/2 to half, 3 to triple):" ) );
}
void ResizeRecipeDialog::activateCurrentOption( int button_id )
@@ -150,7 +150,7 @@
void ResizeRecipeDialog::accept()
{
if ( currentYieldInput->text().toInt() == 0 )
- KMessageBox::error( this, i18n( "Unable to scale a recipe with zero yield" ) );
+ KMessageBox::error( this, i18nc( "@info", "Unable to scale a recipe with zero yield" ) );
else if ( buttonGroup->selected() == yieldRadioButton ) {
if ( newYieldInput->isInputValid() ) {
double new_yield = newYieldInput->value().toDouble();
@@ -159,7 +159,7 @@
resizeRecipe( new_yield / current_yield );
}
else {
- KMessageBox::error( this, i18n( "Invalid input" ) );
+ KMessageBox::error( this, i18nc( "@info", "Invalid input" ) );
newYieldInput->selectAll();
return;
}
@@ -168,7 +168,7 @@
if ( factorInput->isInputValid() && factorInput->value() > 0 )
resizeRecipe( factorInput->value().toDouble() );
else {
- KMessageBox::error( this, i18n( "Invalid input" ) );
+ KMessageBox::error( this, i18nc( "@info", "Invalid input" ) );
factorInput->selectAll();
return ;
}
Index: src/dialogs/advancedsearchdialog.cpp
===================================================================
--- src/dialogs/advancedsearchdialog.cpp (revision 1044800)
+++ src/dialogs/advancedsearchdialog.cpp (working copy)
@@ -108,11 +108,11 @@
titleFrameLayout ->setMargin( 5 );
titleFrameLayout ->setSpacing( 3 );
- requireAllTitle = new QCheckBox( i18n("Require All Words"), titleFrame );
+ requireAllTitle = new QCheckBox( i18nc("@option:check", "Require All Words"), titleFrame );
titleFrameLayout->addWidget( requireAllTitle );
KHBox *titleHBox = new KHBox( titleFrame );
- /*QLabel *titleInfoLabel = */new QLabel(i18n("Keywords:"),titleHBox);
+ /*QLabel *titleInfoLabel = */new QLabel(i18nc("@label:textbox", "Keywords:"),titleHBox);
titleEdit = new KLineEdit( titleHBox );
titleEdit->setObjectName( "titleEdit" );
titleFrameLayout->addWidget( titleHBox );
@@ -137,7 +137,7 @@
ingredientFrameLayout->setSpacing( 3 );
ingredientFrameLayout->setObjectName( "ingredientFrameLayout" );
- QLabel *ingredientInfoLabel = new QLabel(i18n("Enter ingredients: (e.g. chicken pasta \"white wine\")"),ingredientFrame);
+ QLabel *ingredientInfoLabel = new QLabel(i18nc("@info", "Enter ingredients: (e.g. chicken pasta \"white wine\")"),ingredientFrame);
ingredientInfoLabel->setWordWrap( true );
//ingredientInfoLabel->setTextFormat( Qt::RichText );
ingredientFrameLayout->addWidget( ingredientInfoLabel, 0, 0, 1, 2, 0 );
@@ -192,7 +192,7 @@
categoryFrameLayout->setObjectName( "ingredientFrameLayout" );
- QLabel *categoryInfoLabel = new QLabel(i18n("Enter categories: (e.g. Desserts Pastas \"Main Dishes\")"),categoryFrame);
+ QLabel *categoryInfoLabel = new QLabel(i18nc("@info", "Enter categories: (e.g. Desserts Pastas \"Main Dishes\")"),categoryFrame);
categoryInfoLabel->setWordWrap( true );
categoryInfoLabel->setTextFormat( Qt::RichText );
categoryFrameLayout->addWidget( categoryInfoLabel, 0, 0, 1, 2, 0 );
@@ -246,7 +246,7 @@
authorsFrameLayout->setSpacing( 3 );
authorsFrameLayout->setObjectName( "ingredientFrameLayout" );
- QLabel *authorsInfoLabel = new QLabel(i18n("Enter author name (e.g. Smith or \"Jane Doe\")"),authorsFrame);
+ QLabel *authorsInfoLabel = new QLabel(i18nc("@info", "Enter author name (e.g. Smith or \"Jane Doe\")"),authorsFrame);
authorsInfoLabel->setWordWrap( true );
authorsInfoLabel->setTextFormat( Qt::RichText );
authorsFrameLayout->addWidget( authorsInfoLabel, 0, 0, 1, 2, 0 );
@@ -379,11 +379,11 @@
instructionsFrameLayout->setMargin( 5 );
instructionsFrameLayout->setSpacing( 3 );
- requireAllInstructions = new QCheckBox( i18n("Require All Words"), instructionsFrame );
+ requireAllInstructions = new QCheckBox( i18nc("@option:check", "Require All Words"), instructionsFrame );
instructionsFrameLayout->addWidget( requireAllInstructions );
KHBox *instructionsHBox = new KHBox(instructionsFrame);
- /*QLabel *instructionsInfoLabel = */new QLabel(i18n("Keywords:"),instructionsHBox);
+ /*QLabel *instructionsInfoLabel = */new QLabel(i18nc("@label:textbox", "Keywords:"),instructionsHBox);
instructionsEdit = new KLineEdit( instructionsHBox );
instructionsEdit->setObjectName( "instructionsEdit" );
@@ -523,8 +523,8 @@
criteriaListView = new K3ListView( criterionFrame );
criteriaListView->setObjectName( "criteriaListView" );
criteriaListView->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
- criteriaListView->addColumn( i18n( "Criterion" ) );
- criteriaListView->addColumn( i18n( "Stars" ) );
+ criteriaListView->addColumn( i18nc( "@title:column", "Criterion" ) );
+ criteriaListView->addColumn( i18nc( "@title:column", "Stars" ) );
criterionFrameLayout->addWidget( criteriaListView );
ratingButtonGroupLayout->addWidget( criterionFrame );
@@ -653,43 +653,43 @@
void AdvancedSearchDialog::languageChange()
{
titleButton->setText( QString("%1 >>").arg(i18nc("@action:button Recipe title", "Title")) );
- textLabel1_4->setText( i18n( "Search using the following criteria:" ) );
- ingredientButton->setText( QString("%1 >>").arg(i18n("Ingredients")) );
- textLabel1_2->setText( i18n( "Uses any of:" ) );
- textLabel1->setText( i18n( "Uses all:" ) );
- textLabel1_3->setText( i18n( "Without:" ) );
- categoriesButton->setText( i18n( "Categories >>" ) );
- textLabel1_5->setText( i18n( "In all:" ) );
- textLabel1_3_3->setText( i18n( "Not in:" ) );
- textLabel1_2_3->setText( i18n( "In any of:" ) );
- authorsButton->setText( QString("%1 >>").arg(i18n("Authors")) );
- textLabel1_2_4->setText( i18n( "By any of:" ) );
- textLabel1_6->setText( i18n( "By all:" ) );
- textLabel1_3_4->setText( i18n( "Not by:" ) );
- servingsButton->setText( QString("%1 >>").arg(i18n("Yield")) );
- enableServingsCheckBox->setText( i18n( "Enabled" ) );
+ textLabel1_4->setText( i18nc( "@label", "Search using the following criteria:" ) );
+ ingredientButton->setText( QString("%1 >>").arg(i18nc("@action:button", "Ingredients")) );
+ textLabel1_2->setText( i18nc( "@label:textbox", "Uses any of:" ) );
+ textLabel1->setText( i18nc( "@label:textbox", "Uses all:" ) );
+ textLabel1_3->setText( i18nc( "@label:textbox", "Without:" ) );
+ categoriesButton->setText( i18nc( "@action:button", "Categories >>" ) );
+ textLabel1_5->setText( i18nc( "@label:textbox","In all:" ) );
+ textLabel1_3_3->setText( i18nc( "@label:textbox","Not in:" ) );
+ textLabel1_2_3->setText( i18nc( "@label:textbox","In any of:" ) );
+ authorsButton->setText( QString("%1 >>").arg(i18nc("@action:button", "Authors")) );
+ textLabel1_2_4->setText( i18nc( "@label:textbox", "By any of:" ) );
+ textLabel1_6->setText( i18nc( "@label:textbox", "By all:" ) );
+ textLabel1_3_4->setText( i18nc( "@label:textbox", "Not by:" ) );
+ servingsButton->setText( QString("%1 >>").arg(i18nc("@action:button", "Yield")) );
+ enableServingsCheckBox->setText( i18nc( "@option:check", "Enabled" ) );
servingsComboBox->clear();
- servingsComboBox->insertItem( servingsComboBox->count(), i18n( "Yields at least:" ) );
- servingsComboBox->insertItem( servingsComboBox->count(), i18n( "Yields at most:" ) );
- servingsComboBox->insertItem( servingsComboBox->count(), i18n( "Yields about:" ) );
- prepTimeButton->setText( QString("%1 >>").arg(i18n("Preparation Time")) );
- enablePrepTimeCheckBox->setText( i18n( "Enabled" ) );
+ servingsComboBox->insertItem( servingsComboBox->count(), i18nc( "@item:inlistbox", "Yields at least:" ) );
+ servingsComboBox->insertItem( servingsComboBox->count(), i18nc( "@item:inlistbox", "Yields at most:" ) );
+ servingsComboBox->insertItem( servingsComboBox->count(), i18nc( "@item:inlistbox", "Yields about:" ) );
+ prepTimeButton->setText( QString("%1 >>").arg(i18nc( "@action:button", "Preparation Time")) );
+ enablePrepTimeCheckBox->setText( i18nc( "@option:check", "Enabled" ) );
prepTimeComboBox->clear();
- prepTimeComboBox->insertItem( prepTimeComboBox->count(), i18n( "Ready in at most:" ) );
- prepTimeComboBox->insertItem( prepTimeComboBox->count(), i18n( "Ready in about:" ) );
- instructionsButton->setText( QString("%1 >>").arg(i18n("Instructions")) );
- metaDataButton->setText( QString("%1 >>").arg(i18n("Meta Data")) );
- clearButton->setText( i18nc( "action:button Clear search criteria", "C&lear" ) );
+ prepTimeComboBox->insertItem( prepTimeComboBox->count(), i18nc( "@item:inlistbox", "Ready in at most:" ) );
+ prepTimeComboBox->insertItem( prepTimeComboBox->count(), i18nc( "@item:inlistbox", "Ready in about:" ) );
+ instructionsButton->setText( QString("%1 >>").arg(i18nc( "@action:button", "Instructions")) );
+ metaDataButton->setText( QString("%1 >>").arg(i18nc( "@label", "Meta Data")) );
+ clearButton->setText( i18nc( "@action:button Clear search criteria", "C&lear" ) );
clearButton->setShortcut( QKeySequence( i18n( "Alt+L" ) ) );
findButton->setText( i18nc( "@action:button Search recipes", "&Search" ) );
- ratingAvgRadioButton->setText( i18n( "By average:" ) );
- avgStarsLabel->setText( i18n( "stars" ) );
- criterionRadioButton->setText( i18n( "By criteria:" ) );
+ ratingAvgRadioButton->setText( i18nc("@option:radio", "By average:" ) );
+ avgStarsLabel->setText( i18nc( "@label", "stars" ) );
+ criterionRadioButton->setText( i18nc( "@option:radio", "By criteria:" ) );
addCriteriaButton->setIcon( KIcon( "list-add" ) );
removeCriteriaButton->setIcon( KIcon( "list-remove" ) );
- criteriaListView->header()->setLabel( 0, i18n( "Criteria" ) );
- criteriaListView->header()->setLabel( 1, i18n( "Stars" ) );
- ratingsButton->setText( QString("%1 >>").arg(i18n("Ratings")) );
+ criteriaListView->header()->setLabel( 0, i18nc( "@title:column", "Criteria" ) );
+ criteriaListView->header()->setLabel( 1, i18nc( "@title:column", "Stars" ) );
+ ratingsButton->setText( QString("%1 >>").arg(i18nc("@action:button", "Ratings")) );
}
void AdvancedSearchDialog::addAction( KAction * action )
@@ -990,7 +990,7 @@
}
if ( !resultsListView->firstChild() ) {
- ( void ) new Q3ListViewItem( resultsListView, "--- "+i18n("No matching recipes found")+" ---");
+ ( void ) new Q3ListViewItem( resultsListView, "--- "+i18nc("@info", "No matching recipes found")+" ---");
}
KApplication::restoreOverrideCursor();
Index: src/dialogs/ingredientmatcherdialog.cpp
===================================================================
--- src/dialogs/ingredientmatcherdialog.cpp (revision 1044800)
+++ src/dialogs/ingredientmatcherdialog.cpp (working copy)
@@ -86,21 +86,21 @@
layout2->addLayout( layout1 );
ingListView = new KreListView( this, QString::null, true );
- ingListView->listView() ->addColumn( i18n( "Ingredient (required?)" ) );
- ingListView->listView() ->addColumn( i18n( "Amount Available" ) );
+ ingListView->listView() ->addColumn( i18nc( "@title:column", "Ingredient (required?)" ) );
+ ingListView->listView() ->addColumn( i18nc( "@title:column", "Amount Available" ) );
layout2->addWidget( ingListView );
dialogLayout->addLayout( layout2 );
// Box to select allowed number of missing ingredients
missingBox = new KHBox( this );
missingNumberLabel = new QLabel( missingBox );
- missingNumberLabel->setText( i18n( "Missing ingredients allowed:" ) );
+ missingNumberLabel->setText( i18nc( "@label:spinbox ", "Missing ingredients allowed:" ) );
missingNumberSpinBox = new KIntSpinBox( missingBox );
missingNumberSpinBox->setMinimum( -1 );
- missingNumberSpinBox->setSpecialValueText( i18nc( "Any amount of ingredients missing", "Any" ) );
+ missingNumberSpinBox->setSpecialValueText( i18nc( "@item Any amount of ingredients missing", "Any" ) );
// Found recipe list
- recipeListView = new KreListView( this, i18n( "Matching Recipes" ), false, 1, missingBox );
+ recipeListView = new KreListView( this, i18nc( "@title", "Matching Recipes" ), false, 1, missingBox );
recipeListView->listView() ->setAllColumnsShowFocus( true );
recipeListView->listView() ->addColumn( i18nc( "@title:column Recipe Title", "Title" ) );
@@ -109,7 +109,7 @@
bool show_id = config.readEntry( "ShowID", false );
recipeListView->listView() ->addColumn( "Id" , show_id ? -1 : 0 );
- recipeListView->listView() ->addColumn( i18n( "Missing Ingredients" ) );
+ recipeListView->listView() ->addColumn( i18nc( "@title:column", "Missing Ingredients" ) );
recipeListView->listView() ->setSorting( -1 );
dialogLayout->addWidget(recipeListView);
@@ -120,7 +120,7 @@
okButton = new KPushButton( buttonBox );
okButton->setIcon( KIcon( "dialog-ok" ) );
- okButton->setText( i18n( "Find matching recipes" ) );
+ okButton->setText( i18nc( "@action:button", "Find matching recipes" ) );
//buttonBox->layout()->addItem( new QSpacerItem( 10,10, QSizePolicy::MinimumExpanding, QSizePolicy::Fixed ) );
@@ -148,11 +148,11 @@
{
if ( col == 1 ) {
QPointer<KDialog> amountEditDialog = new KDialog(this);
- amountEditDialog->setCaption(i18n("Enter amount"));
+ amountEditDialog->setCaption(i18nc("@title:window", "Enter amount"));
amountEditDialog->setButtons(KDialog::Cancel | KDialog::Ok);
amountEditDialog->setDefaultButton(KDialog::Ok);
amountEditDialog->setModal( false );
- Q3GroupBox *box = new Q3GroupBox( 1, Qt::Horizontal, i18n("Amount"), amountEditDialog );
+ Q3GroupBox *box = new Q3GroupBox( 1, Qt::Horizontal, i18nc("@title:group", "Amount"), amountEditDialog );
AmountUnitInput *amountEdit = new AmountUnitInput( box, database );
// Set the values from the item
if ( !item->text(1).isEmpty() ) {
@@ -329,7 +329,7 @@
if ( ( *nit ) == missingNo ) {
if ( !titleShownYet ) {
- new SectionItem( recipeListView->listView(), i18np( "You are missing 1 ingredient for:", "You are missing %1 ingredients for:", missingNo ) );
+ new SectionItem( recipeListView->listView(), i18ncp( "@info", "You are missing 1 ingredient for:", "You are missing %1 ingredients for:", missingNo ) );
titleShownYet = true;
}
new CustomRecipeListItem( recipeListView->listView(), *it, *ilit );
Index: src/dialogs/recipeimportdialog.cpp
===================================================================
--- src/dialogs/recipeimportdialog.cpp (revision 1044800)
+++ src/dialogs/recipeimportdialog.cpp (working copy)
@@ -31,7 +31,7 @@
{
this->setObjectName( "RecipeImportDialog" );
this->setModal( true );
- this->setCaption( i18n( "Import Recipes" ) );
+ this->setCaption( i18nc( "@title:window", "Import Recipes" ) );
this->setButtons( KDialog::Ok | KDialog::Cancel );
this->setDefaultButton( KDialog::Ok );
setButtonsOrientation( Qt::Vertical );
@@ -41,7 +41,7 @@
kListView = new K3ListView( page );
- kListView->addColumn( i18n( "Recipes" ) );
+ kListView->addColumn( i18nc( "@title:column", "Recipes" ) );
kListView->setProperty( "selectionMode", "NoSelection" );
kListView->setRootIsDecorated( true );
kListView->setAllColumnsShowFocus( true );
@@ -99,8 +99,8 @@
if ( ( *recipe_it ).categoryList.count() == 0 ) {
if ( !category_item ) //don't create this until there are recipes to put in it
{
- category_item = new CustomCheckListItem( head_item, i18n( "Uncategorized" ), Q3CheckListItem::CheckBox );
- all_categories.insert( i18n( "Uncategorized" ), category_item );
+ category_item = new CustomCheckListItem( head_item, i18nc( "@item", "Uncategorized" ), Q3CheckListItem::CheckBox );
+ all_categories.insert( i18nc( "@item", "Uncategorized" ), category_item );
}
CustomCheckListItem *item = new CustomCheckListItem( category_item, ( *recipe_it ).title, Q3CheckListItem::CheckBox );
recipe_items->insert( item, recipe_it );
Index: src/dialogs/recipeprintpreview.cpp
===================================================================
--- src/dialogs/recipeprintpreview.cpp (revision 1044800)
+++ src/dialogs/recipeprintpreview.cpp (working copy)
@@ -22,16 +22,16 @@
RecipePrintPreview::RecipePrintPreview( QWidget *parent, RecipeDB *db, const QList<int> &ids )
: KDialog( parent )
{
- setCaption( i18n("Print Preview") );
+ setCaption( i18nc("@title:window", "Print Preview") );
setButtons(KDialog::Ok | KDialog::Cancel | KDialog::User1 | KDialog::Help);
setDefaultButton(KDialog::Ok);
setModal( true );
KVBox *page = new KVBox( this );
setMainWidget( page );
setHelp("print-recipe");
- setButtonText( KDialog::User1, i18n("Print Setup") );
+ setButtonText( KDialog::User1, i18nc("@action:button", "Print Setup") );
setButtonIcon( KDialog::User1, KIcon( "configure" ) );
- setButtonText( KDialog::Ok, i18n("&Print") );
+ setButtonText( KDialog::Ok, i18nc("@action:button", "&Print") );
setSizeGripEnabled( true );
@@ -58,7 +58,7 @@
void RecipePrintPreview::slotUser1( void )
{
QPointer<PageSetupDialog> pageSetup = new PageSetupDialog( this, Recipe(), "Print" );
- pageSetup->setCaption( i18n("Print Setup") );
+ pageSetup->setCaption( i18nc("@title:window", "Print Setup") );
if ( pageSetup->exec() == QDialog::Accepted )
reload();
delete pageSetup;
Index: src/dialogs/similarcategoriesdialog.cpp
===================================================================
--- src/dialogs/similarcategoriesdialog.cpp (revision 1044800)
+++ src/dialogs/similarcategoriesdialog.cpp (working copy)
@@ -178,22 +178,22 @@
*/
void SimilarCategoriesDialog::languageChange()
{
- setWindowTitle( i18n( "Similar Categories" ) );
- thresholdLabel->setText( i18n( "Threshold:" ) );
- categoryLabel->setText( i18n( "Category:" ) );
+ setWindowTitle( i18nc( "@title:window", "Similar Categories" ) );
+ thresholdLabel->setText( i18nc( "@label:textbox", "Threshold:" ) );
+ categoryLabel->setText( i18nc( "@label:textbox", "Category:" ) );
searchButton->setText( i18nc(
"@action:button Search a recipe category in database",
"Search" ) );
- allLabel->setText( i18n( "Similar Categories:" ) );
+ allLabel->setText( i18nc( "@label:textbox", "Similar Categories:" ) );
removeButton->setIcon( KIcon( "arrow-left" ) );
addButton->setIcon( KIcon( "arrow-right" ) );
- toMergeLabel->setText( i18n( "Categories to Merge:" ) );
- mergeButton->setText( i18n( "Merge" ) );
- cancelButton->setText( i18n( "Cancel" ) );
+ toMergeLabel->setText( i18nc( "@label:textbox", "Categories to Merge:" ) );
+ mergeButton->setText( i18nc( "@action:button", "Merge" ) );
+ cancelButton->setText( i18nc( "@action:button", "Cancel" ) );
- allListView->addColumn( i18n( "Category" ) );
+ allListView->addColumn( i18nc( "@title:column", "Category" ) );
//allListView->addColumn( "Id" );
- toMergeListView->addColumn( i18n( "Category" ) );
+ toMergeListView->addColumn( i18nc( "@title:column", "Category" ) );
//toMergeListView->addColumn( "Id" );
}
@@ -319,7 +319,7 @@
{
QList<Q3ListViewItem> items = parentListView->selectedItems();
if ( items.count() > 1 )
- KMessageBox::sorry( kapp->mainWidget(), i18n("Please select only one category."), QString::null );
+ KMessageBox::sorry( kapp->mainWidget(), i18nc("@info", "Please select only one category."), QString::null );
else if ( items.count() == 1 && items.at(0)->rtti() == 1001 ) {
CategoryListItem * cat_it = ( CategoryListItem* ) items.at(0);
QString name = cat_it->categoryName();
@@ -348,7 +348,7 @@
}
else //either nothing was selected or a recipe was selected
- KMessageBox::sorry( kapp->mainWidget(), i18n("No recipes selected."), i18n("Edit Recipe") );
+ KMessageBox::sorry( kapp->mainWidget(), i18nc("@info", "No recipes selected."), i18nc("@title", "Edit Recipe") );
}
#endif
@@ -379,7 +379,7 @@
void SimilarCategoriesDialog::mergeMatches()
{
if ( !toMergeListView->firstChild() ) {
- KMessageBox::sorry( this, i18n("No categories selected to merge."), QString::null );
+ KMessageBox::sorry( this, i18nc("@info", "No categories selected to merge."), QString::null );
return;
}
Index: src/dialogs/selectrecipedialog.cpp
===================================================================
--- src/dialogs/selectrecipedialog.cpp (revision 1044800)
+++ src/dialogs/selectrecipedialog.cpp (working copy)
@@ -71,8 +71,8 @@
searchLabel = new QLabel( searchBar );
- searchLabel->setText( i18nc( "Search recipes", "Search:" ) );
- searchLabel->setFixedWidth( searchLabel->fontMetrics().width( i18nc( "Search recipes", "Search:" ) ) + 5 );
+ searchLabel->setText( i18nc( "@label:textbox Search recipes", "Search:" ) );
+ searchLabel->setFixedWidth( searchLabel->fontMetrics().width( i18nc( "@label:textbox Search recipes", "Search:" ) ) + 5 );
searchBox = new KLineEdit( searchBar );
searchBox->setClearButtonShown( true );
connect( searchBox, SIGNAL(clearButtonClicked() ),this,SLOT( clearSearch() ) );
@@ -97,23 +97,23 @@
layout->addWidget( buttonBar, 4, 1, 1, 3, 0 );
openButton = new KPushButton( buttonBar );
- openButton->setText( i18n( "Show Recipe(s)" ) );
+ openButton->setText( i18nc( "@action:button", "Show Recipe(s)" ) );
openButton->setDisabled( true );
openButton->setIcon( KIcon( "system-search" ) );
editButton = new KPushButton( buttonBar );
- editButton->setText( i18n( "Edit Recipe" ) );
+ editButton->setText( i18nc( "@action:button", "Edit Recipe" ) );
editButton->setDisabled( true );
editButton->setIcon( KIcon( "document-edit" ) );
removeButton = new KPushButton( buttonBar );
- removeButton->setText( i18n( "Delete" ) );
+ removeButton->setText( i18nc( "@action:button", "Delete" ) );
removeButton->setDisabled( true );
removeButton->setMaximumWidth( 100 );
removeButton->setIcon( KIcon("edit-delete-shred" ) );
- tabWidget->insertTab( -1, basicSearchTab, i18nc( "Basic search", "Basic" ) );
+ tabWidget->insertTab( -1, basicSearchTab, i18nc( "@title:tab Basic search", "Basic" ) );
advancedSearch = new AdvancedSearchDialog( this, database );
- tabWidget->insertTab( -1, advancedSearch, i18nc( "Advanced search", "Advanced" ) );
+ tabWidget->insertTab( -1, advancedSearch, i18nc( "@title:tab Advanced search", "Advanced" ) );
//Takes care of all recipe actions and provides a popup menu to 'recipeListView'
actionHandler = new RecipeActionsHandler( recipeListView, database );
Index: src/dialogs/borderdialog.cpp
===================================================================
--- src/dialogs/borderdialog.cpp (revision 1044800)
+++ src/dialogs/borderdialog.cpp (working copy)
@@ -32,7 +32,7 @@
: KDialog( parent )
{
this->setObjectName( name );
- this->setCaption( i18n( "Choose Border" ) );
+ this->setCaption( i18nc( "@title:window", "Choose Border" ) );
this->setModal( true );
this->setButtons( KDialog::Ok | KDialog::Cancel );
this->setDefaultButton( KDialog::Ok );
@@ -128,10 +128,10 @@
void BorderDialog::languageChange()
{
- borderGroupBox->setTitle( i18n( "Requested Border" ) );
- styleLabel->setText( i18nc( "@label Border style", "Style:" ) );
- colorLabel->setText( i18nc( "@label Border color", "Color:" ) );
- widthLabel->setText( i18nc( "@label Border width", "Width:" ) );
+ borderGroupBox->setTitle( i18nc( "@title:group", "Requested Border" ) );
+ styleLabel->setText( i18nc( "@label:textbox Border style", "Style:" ) );
+ colorLabel->setText( i18nc( "@label:textbox Border color", "Color:" ) );
+ widthLabel->setText( i18nc( "@label:textbox Border width", "Width:" ) );
}
KreBorder BorderDialog::border() const
@@ -203,15 +203,15 @@
void BorderDialog::initListBoxs()
{
- styleListBox->insertItem( i18nc( "Border type none", "None" ) );
- styleListBox->insertItem( i18nc( "See http://krecipes.sourceforge.net/bordertypes.png for an example", "Dotted" ) );
- styleListBox->insertItem( i18nc( "See http://krecipes.sourceforge.net/bordertypes.png for an example", "Dashed" ) );
- styleListBox->insertItem( i18nc( "See http://krecipes.sourceforge.net/bordertypes.png for an example", "Solid" ) );
- styleListBox->insertItem( i18nc( "See http://krecipes.sourceforge.net/bordertypes.png for an example", "Double" ) );
- styleListBox->insertItem( i18nc( "See http://krecipes.sourceforge.net/bordertypes.png for an example", "Groove" ) );
- styleListBox->insertItem( i18nc( "See http://krecipes.sourceforge.net/bordertypes.png for an example", "Ridge" ) );
- styleListBox->insertItem( i18nc( "See http://krecipes.sourceforge.net/bordertypes.png for an example", "Inset" ) );
- styleListBox->insertItem( i18nc( "See http://krecipes.sourceforge.net/bordertypes.png for an example", "Outset" ) );
+ styleListBox->insertItem( i18nc( "@item:inlistbox Border type none", "None" ) );
+ styleListBox->insertItem( i18nc( "@item:inlistbox See http://krecipes.sourceforge.net/bordertypes.png for an example", "Dotted" ) );
+ styleListBox->insertItem( i18nc( "@item:inlistbox See http://krecipes.sourceforge.net/bordertypes.png for an example", "Dashed" ) );
+ styleListBox->insertItem( i18nc( "@item:inlistbox See http://krecipes.sourceforge.net/bordertypes.png for an example", "Solid" ) );
+ styleListBox->insertItem( i18nc( "@item:inlistbox See http://krecipes.sourceforge.net/bordertypes.png for an example", "Double" ) );
+ styleListBox->insertItem( i18nc( "@item:inlistbox See http://krecipes.sourceforge.net/bordertypes.png for an example", "Groove" ) );
+ styleListBox->insertItem( i18nc( "@item:inlistbox See http://krecipes.sourceforge.net/bordertypes.png for an example", "Ridge" ) );
+ styleListBox->insertItem( i18nc( "@item:inlistbox See http://krecipes.sourceforge.net/bordertypes.png for an example", "Inset" ) );
+ styleListBox->insertItem( i18nc( "@item:inlistbox See http://krecipes.sourceforge.net/bordertypes.png for an example", "Outset" ) );
widthListBox->insertItem( "1" );
widthListBox->insertItem( "2" );
Index: src/dialogs/dietviewdialog.cpp
===================================================================
--- src/dialogs/dietviewdialog.cpp (revision 1044800)
+++ src/dialogs/dietviewdialog.cpp (working copy)
@@ -21,7 +21,7 @@
DietViewDialog::DietViewDialog( QWidget *parent, const RecipeList &recipeList, int dayNumber, int mealNumber, const Q3ValueList <int> &dishNumbers )
: KDialog( parent )
{
- setCaption( i18n( "View Diet" ) );
+ setCaption( i18nc( "@window:title", "View Diet" ) );
setButtons(KDialog::User2 | KDialog::Close | KDialog::User1);
setDefaultButton(KDialog::User2);
setModal( false );
@@ -30,7 +30,7 @@
setButtonText( KDialog::User1, KStandardGuiItem::print().text() );
setButtonIcon( KDialog::User1, KIcon( "document-print" ) );
- setButtonText( KDialog::User2, i18n( "Create &Shopping List" ) );
+ setButtonText( KDialog::User2, i18nc( "@action:button", "Create &Shopping List" ) );
setButtonIcon( KDialog::User2, KIcon( "view-pim-tasks" ) );
// The html part
Index: src/dialogs/recipeinputdialog.cpp
===================================================================
--- src/dialogs/recipeinputdialog.cpp (revision 1044800)
+++ src/dialogs/recipeinputdialog.cpp (working copy)
@@ -168,15 +168,15 @@
changePhotoButton = new KPushButton( photoButtonsBox );
changePhotoButton->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Ignored ) );
changePhotoButton->setText( "..." );
- changePhotoButton->setToolTip( i18n( "Select photo" ) );
+ changePhotoButton->setToolTip( i18nc( "@info:tooltip", "Select photo" ) );
KPushButton *savePhotoAsButton = new KPushButton( photoButtonsBox );
savePhotoAsButton->setIcon( KIcon( "document-save" ) );
- savePhotoAsButton->setToolTip( i18n( "Save photo as..." ) );
+ savePhotoAsButton->setToolTip( i18nc( "action:button", "Save photo as..." ) );
KPushButton *clearPhotoButton = new KPushButton( photoButtonsBox );
clearPhotoButton->setIcon( KIcon( "edit-clear" ) );
- clearPhotoButton->setToolTip( i18n( "Clear photo" ) );
+ clearPhotoButton->setToolTip( i18nc( "@info:tooltip", "Clear photo" ) );
recipeLayout->addWidget( photoButtonsBox, 3, 2, 5, 1, 0 );
@@ -189,7 +189,7 @@
// Title
KVBox *titleBox = new KVBox( recipeTab );
titleBox->setSpacing( 5 );
- titleLabel = new QLabel( i18n( "Recipe Name" ), titleBox );
+ titleLabel = new QLabel( i18nc( "@label", "Recipe Name" ), titleBox );
titleEdit = new KLineEdit( titleBox );
titleEdit->setMinimumSize( QSize( 360, 30 ) );
titleEdit->setMaximumSize( QSize( 10000, 30 ) );
@@ -205,7 +205,7 @@
KVBox *authorBox = new KVBox( recipeTab ); // contains label and authorInput (input widgets)
authorBox->setSpacing( 5 );
recipeLayout->addWidget( authorBox, 3, 4 );
- authorLabel = new QLabel( i18n( "Authors" ), authorBox );
+ authorLabel = new QLabel( i18nc( "@label", "Authors" ), authorBox );
KHBox *authorInput = new KHBox( authorBox ); // Contains input + button
@@ -223,7 +223,7 @@
KVBox *categoryBox = new KVBox( recipeTab ); // Contains the label and categoryInput (input widgets)
categoryBox->setSpacing( 5 );
- categoryLabel = new QLabel( i18n( "Categories" ), categoryBox );
+ categoryLabel = new QLabel( i18nc( "@label", "Categories" ), categoryBox );
KHBox *categoryInput = new KHBox( categoryBox ); // Contains the input widgets
categoryShow = new KLineEdit( categoryInput );
@@ -243,11 +243,11 @@
// Backup options
QGroupBox *yieldGBox = new QGroupBox( serv_prep_box );
- yieldGBox->setTitle( i18n( "Yield" ) );
+ yieldGBox->setTitle( i18nc( "@label", "Yield" ) );
QGridLayout *yieldGBoxLayout = new QGridLayout;
yieldGBox->setLayout( yieldGBoxLayout );
- yieldLabel = new QLabel( i18n( "Amount" ) );
+ yieldLabel = new QLabel( i18nc( "@label", "Amount" ) );
yieldGBoxLayout->addWidget( yieldLabel, 0, 0 );
QLabel *yieldTypeLabel = new QLabel( i18n( "Type" ) );
yieldGBoxLayout->addWidget( yieldTypeLabel, 0, 1 );
@@ -261,7 +261,7 @@
prepTimeBox->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed ) );
prepTimeBox->setSpacing( 5 );
- ( void ) new QLabel( i18n( "Preparation Time" ), prepTimeBox );
+ ( void ) new QLabel( i18nc( "@label", "Preparation Time" ), prepTimeBox );
prepTimeEdit = new QDateTimeEdit( prepTimeBox );
prepTimeEdit->setMinimumTime( QTime( 0, 0 ) );
prepTimeEdit->setDisplayFormat( "hh:mm");
@@ -334,19 +334,19 @@
ingParserButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
ingredientsLayout->addWidget( ingParserButton, 8, 5 );
- addButton->setToolTip( i18n( "Add ingredient" ) );
- upButton->setToolTip( i18n( "Move ingredient up" ) );
- downButton->setToolTip( i18n( "Move ingredient down" ) );
- removeButton->setToolTip( i18n( "Remove ingredient" ) );
- ingParserButton->setToolTip( i18n( "Paste Ingredients" ) );
+ addButton->setToolTip( i18nc( "@info:tooltip", "Add ingredient" ) );
+ upButton->setToolTip( i18nc( "@info:tooltip", "Move ingredient up" ) );
+ downButton->setToolTip( i18nc( "@info:tooltip", "Move ingredient down" ) );
+ removeButton->setToolTip( i18nc( "@info:tooltip", "Remove ingredient" ) );
+ ingParserButton->setToolTip( i18nc( "@info:tooltip", "Paste Ingredients" ) );
// Ingredient List
ingredientList = new K3ListView( ingredientsTab );
- ingredientList->addColumn( i18n( "Ingredient" ) );
- ingredientList->addColumn( i18n( "Amount" ) );
+ ingredientList->addColumn( i18nc( "@title:column", "Ingredient" ) );
+ ingredientList->addColumn( i18nc( "@title:column", "Amount" ) );
ingredientList->setColumnAlignment( 1, Qt::AlignHCenter );
- ingredientList->addColumn( i18n( "Units" ) );
- ingredientList->addColumn( i18n( "Preparation Method" ) );
+ ingredientList->addColumn( i18nc( "@title:column", "Units" ) );
+ ingredientList->addColumn( i18nc( "@title:column", "Preparation Method" ) );
ingredientList->setSorting( -1 ); // Do not sort
ingredientList->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::MinimumExpanding ) );
ingredientList->setItemsRenameable( true );
@@ -361,11 +361,11 @@
propertyStatusLayout->setMargin( 0 );
propertyStatusLayout->setSpacing( 5 );
- QLabel *propertyLabel = new QLabel( i18n("Property Status:"), ingredientsTab );
+ QLabel *propertyLabel = new QLabel( i18nc( "@label", "Property Status:"), ingredientsTab );
propertyStatusLabel = new QLabel( ingredientsTab );
propertyStatusLed = new ClickableLed( ingredientsTab );
propertyStatusLed->setFixedSize( QSize(16,16) );
- propertyStatusButton = new KPushButton( i18n("Details..."), ingredientsTab );
+ propertyStatusButton = new KPushButton( i18nc( "@action:button", "Details..."), ingredientsTab );
//QPushButton *propertyUpdateButton = new QPushButton( i18n("Update"), ingredientsTab );
propertyStatusLayout->addWidget( propertyLabel );
propertyStatusLayout->addWidget( propertyStatusLabel );
@@ -383,7 +383,7 @@
propertyStatusDialog->setObjectName( "propertyStatusDialog" );
propertyStatusDialog->setModal( false );
propertyStatusDialog->showButtonSeparator( false );
- propertyStatusDialog->setCaption( i18n("Property details") );
+ propertyStatusDialog->setCaption( i18nc( "@title:window ", "Property details") );
propertyStatusDialog->setButtons( KDialog::Close | KDialog::User1 | KDialog::Help );
propertyStatusDialog->setDefaultButton( KDialog::Close );
propertyStatusDialog->setButtonGuiItem( KDialog::User1, updateGuiItem );
@@ -417,7 +417,7 @@
KVBox *ratingsTab = new KVBox( this );
ratingListDisplayWidget = new KWidgetListbox(ratingsTab);
- KPushButton *addRatingButton = new KPushButton(i18n("Add Rating..."),ratingsTab);
+ KPushButton *addRatingButton = new KPushButton(i18nc( "@action:button", "Add Rating..." ),ratingsTab);
addRatingButton->setIcon( KIcon( "list-add" ) );
connect( addRatingButton, SIGNAL(clicked()), this, SLOT(slotAddRating()) );
@@ -425,10 +425,10 @@
// ------- END OF Recipe Ratings Tab -----------
- tabWidget->insertTab( -1, recipeTab, i18n( "Recipe" ) );
- tabWidget->insertTab( -1, ingredientsTab, i18n( "Ingredients" ) );
- tabWidget->insertTab( -1, instructionsTab, i18n( "Instructions" ) );
- tabWidget->insertTab( -1, ratingsTab, i18n( "Ratings" ) );
+ tabWidget->insertTab( -1, recipeTab, i18nc( "@title:tab", "Recipe" ) );
+ tabWidget->insertTab( -1, ingredientsTab, i18nc( "@title:tab", "Ingredients" ) );
+ tabWidget->insertTab( -1, instructionsTab, i18nc( "@title:tab", "Instructions" ) );
+ tabWidget->insertTab( -1, ratingsTab, i18nc( "@title:tab", "Ratings" ) );
// Functions Box
@@ -448,17 +448,17 @@
resizeButton = new QToolButton;
resizeButton->setIcon( KIcon( "arrow-up-double" ) ); //TODO: give me an icon :)
- saveButton->setText( i18n( "Save recipe" ) );
- saveButton->setToolTip( i18n( "Save recipe" ) );
+ saveButton->setText( i18nc( "@action:buton", "Save recipe" ) );
+ saveButton->setToolTip( i18nc( "@info:tooltip", "Save recipe" ) );
saveButton->setToolButtonStyle( Qt::ToolButtonTextUnderIcon );
- showButton->setText( i18n( "Show recipe" ) );
- showButton->setToolTip( i18n( "Show recipe" ) );
+ showButton->setText( i18nc( "@action:buton", "Show recipe" ) );
+ showButton->setToolTip( i18nc( "@info:tooltip", "Show recipe" ) );
showButton->setToolButtonStyle( Qt::ToolButtonTextUnderIcon );
- closeButton->setText( i18n( "Close" ) );
- closeButton->setToolTip( i18n( "Close" ) );
+ closeButton->setText( i18nc( "@action:buton", "Close" ) );
+ closeButton->setToolTip( i18nc( "@info:tooltip", "Close" ) );
closeButton->setToolButtonStyle( Qt::ToolButtonTextUnderIcon );
- resizeButton->setText( i18n( "Resize recipe" ) );
- resizeButton->setToolTip( i18n( "Resize recipe" ) );
+ resizeButton->setText( i18nc( "@action:buton", "Resize recipe" ) );
+ resizeButton->setToolTip( i18nc( "@info:tooltip", "Resize recipe" ) );
resizeButton->setToolButtonStyle( Qt::ToolButtonTextUnderIcon );
functionsLayout->layout()->addItem( new QSpacerItem( 10, 10, QSizePolicy::MinimumExpanding, QSizePolicy::Fixed ) );
@@ -725,7 +725,7 @@
KUrl url = KFileDialog::getSaveUrl( KUrl(),
QString( "*.jpg *.jpeg |%1 (*.jpg *.jpeg)" ).arg( i18n( "Images" ) ),
this,
- i18n("Save photo as..."));
+ i18nc("@title:window", "Save photo as..."));
if ( url.isEmpty() )
return;
@@ -733,14 +733,14 @@
QFile outputFile (filename);
if (outputFile.exists()) {
int r = KMessageBox::warningYesNo(this,
- i18n("The file already exists, do you want to overwrite it?")
+ i18nc("@info", "The file already exists, do you want to overwrite it?")
);
if (r == KMessageBox::No)
return;
}
if ( !loadedRecipe->photo.save( filename, "JPEG" ) )
- KMessageBox::error(this, i18n("The photo cannot be saved in %1", filename) );
+ KMessageBox::error(this, i18nc("@info", "The photo cannot be saved in %1", filename) );
}
void RecipeInputDialog::clearPhoto( void )
@@ -1012,7 +1012,7 @@
if ( new_text.length() > int(database->maxUnitNameLength()) )
{
- KMessageBox::error( this, i18np( "Unit name cannot be longer than 1 character.", "Unit name cannot be longer than %1 characters.", database->maxUnitNameLength() ) );
+ KMessageBox::error( this, i18ncp( "@info", "Unit name cannot be longer than 1 character.", "Unit name cannot be longer than %1 characters.", database->maxUnitNameLength() ) );
ing_item->setUnit( old_unit );
break;
}
@@ -1051,7 +1051,7 @@
for ( QStringList::const_iterator it = prepMethodList.constBegin(); it != prepMethodList.constEnd(); ++it ) {
if ( (*it).trimmed().length() > int(database->maxPrepMethodNameLength()) )
{
- KMessageBox::error( this, i18np( "Preparation method cannot be longer than 1 character.", "Preparation method cannot be longer than %1 characters." , database->maxPrepMethodNameLength() ) );
+ KMessageBox::error( this, i18ncp( "@info", "Preparation method cannot be longer than 1 character.", "Preparation method cannot be longer than %1 characters." , database->maxPrepMethodNameLength() ) );
ing_item->setPrepMethod( old_text );
break;
}
@@ -1101,7 +1101,7 @@
{
//check bounds first
if ( titleEdit->text().length() > int(database->maxRecipeTitleLength()) ) {
- KMessageBox::error( this, i18np( "Recipe title cannot be longer than 1 character.", "Recipe title cannot be longer than %1 characters." , database->maxRecipeTitleLength() ), i18n( "Unable to save recipe" ) );
+ KMessageBox::error( this, i18ncp( "@info", "Recipe title cannot be longer than 1 character.", "Recipe title cannot be longer than %1 characters." , database->maxRecipeTitleLength() ), i18n( "Unable to save recipe" ) );
return false;
}
@@ -1138,9 +1138,9 @@
photoLabel->setPixmap( image );
sourcePhoto = QPixmap();
- instructionsEdit->setText( i18n( "Write the recipe instructions here" ) );
+ instructionsEdit->setText( i18nc( "@info", "Write the recipe instructions here" ) );
instructionsEdit->clearCompletionItems();
- titleEdit->setText( i18n( "Write the recipe title here" ) );
+ titleEdit->setText( i18nc( "@info", "Write the recipe title here" ) );
ingredientList->clear();
authorShow->clear();
categoryShow->clear();
@@ -1196,7 +1196,7 @@
QString categories;
for ( ElementList::const_iterator cat_it = loadedRecipe->categoryList.begin(); cat_it != loadedRecipe->categoryList.end(); ++cat_it ) {
if ( !categories.isEmpty() )
- categories += ",";
+ categories += ',';
categories += ( *cat_it ).name;
}
categoryShow->setText( categories );
@@ -1224,7 +1224,7 @@
QString authors;
for ( ElementList::const_iterator author_it = loadedRecipe->authorList.begin(); author_it != loadedRecipe->authorList.end(); ++author_it ) {
if ( !authors.isEmpty() )
- authors += ",";
+ authors += ',';
authors += ( *author_it ).name;
}
authorShow->setText( authors );
@@ -1241,7 +1241,7 @@
// First check if there's anything unsaved in the recipe
if ( unsavedChanges ) {
- switch ( KMessageBox::questionYesNoCancel( this, i18n( "This recipe contains unsaved changes.\n" "Would you like to save it before closing?" ), i18n( "Unsaved changes" ) ) ) {
+ switch ( KMessageBox::questionYesNoCancel( this, i18nc( "@info", "This recipe contains unsaved changes.\n" "Would you like to save it before closing?" ), i18nc( "@title:window", "Unsaved changes" ) ) ) {
case KMessageBox::Yes:
save();
break;
@@ -1266,7 +1266,7 @@
// First check if there's anything unsaved in the recipe
if ( loadedRecipe->recipeID == -1 ) {
- switch ( KMessageBox::questionYesNo( this, i18n( "You need to save the recipe before displaying it. Would you like to save it now?" ), i18n( "Unsaved changes" ) ) ) {
+ switch ( KMessageBox::questionYesNo( this, i18nc( "@info", "You need to save the recipe before displaying it. Would you like to save it now?" ), i18nc( "@title:window", "Unsaved changes" ) ) ) {
case KMessageBox::Yes:
save();
break;
@@ -1276,7 +1276,7 @@
}
else if ( unsavedChanges ) {
- switch ( KMessageBox::questionYesNoCancel( this, i18n( "This recipe has changes that will not be displayed unless the recipe is saved. Would you like to save it now?" ), i18n( "Unsaved changes" ) ) ) {
+ switch ( KMessageBox::questionYesNoCancel( this, i18nc( "@info", "This recipe has changes that will not be displayed unless the recipe is saved. Would you like to save it now?" ), i18nc( "@title:window", "Unsaved changes" ) ) ) {
case KMessageBox::Yes:
save();
break;
@@ -1533,7 +1533,7 @@
if ( ingPropertyList.count() == 0 ) {
propertyStatusMapRed.insert(ing.ingredientID, QString(
- i18n("<b>%1:</b> No nutrient information available. "
+ i18nc("@info", "<b>%1:</b> No nutrient information available. "
"<a href=\"ingredient#%2\">Provide nutrient information.</a>",
ing.name,
QString::number(ing.ingredientID))));
@@ -1554,7 +1554,7 @@
case RecipeDB::MissingUnitConversion: {
if ( ing.units.type != Unit::Other && ing.units.type == (*prop_it).perUnit.type ) {
propertyStatusMapRed.insert(ing.ingredientID,
- i18n("<b>%3:</b> Unit conversion missing for conversion from '%1' to '%2'"
+ i18nc( "@info", "<b>%3:</b> Unit conversion missing for conversion from '%1' to '%2'"
,(ing.units.name.isEmpty()?i18n("-No unit-"):ing.units.name)
,((*prop_it).perUnit.name)
,ing.name));
@@ -1569,21 +1569,21 @@
continue;
QString toUnit = database->unitName((*weight_it).perAmountUnitID).name;
- if ( toUnit.isEmpty() ) toUnit = i18n("-No unit-");
+ if ( toUnit.isEmpty() ) toUnit = i18nc( "@info", "-No unit-");
QString fromUnit = database->unitName((*weight_it).weightUnitID).name;
- if ( fromUnit.isEmpty() ) fromUnit = i18n("-No unit-");
+ if ( fromUnit.isEmpty() ) fromUnit = i18nc( "@info", "-No unit-");
QString ingUnit = ing.units.name;
- if ( ingUnit.isEmpty() ) ingUnit = i18n("-No unit-");
+ if ( ingUnit.isEmpty() ) ingUnit = i18nc( "@info", "-No unit-");
QString propUnit = (*prop_it).perUnit.name;
- if ( propUnit.isEmpty() ) propUnit = i18n("-No unit-");
+ if ( propUnit.isEmpty() ) propUnit = i18nc( "@info", "-No unit-");
missingConversions << conversionPath( ingUnit, toUnit, fromUnit, propUnit);
}
propertyStatusMapRed.insert(ing.ingredientID,
- i18n("<b>%1:</b> Either <a href=\"ingredient#%3\">enter an appropriate "
+ i18nc("@info", "<b>%1:</b> Either <a href=\"ingredient#%3\">enter an appropriate "
"ingredient weight entry</a>, or provide conversion information to "
"perform one of the following conversions: %2",
ing.name,
@@ -1595,20 +1595,20 @@
}
case RecipeDB::MissingIngredientWeight:
propertyStatusMapRed.insert(ing.ingredientID, QString(
- i18n("<b>%1:</b> No ingredient weight entries. <a href=\"ingredient#%2\">Provide "
+ i18nc("@info", "<b>%1:</b> No ingredient weight entries. <a href=\"ingredient#%2\">Provide "
"ingredient weight.</a>",
ing.name, QString::number(ing.ingredientID))));
break;
case RecipeDB::MismatchedPrepMethod:
if ( ing.prepMethodList.count() == 0 )
propertyStatusMapRed.insert(ing.ingredientID,QString(
- i18n("<b>%1:</b> There is no ingredient weight entry for when no "
+ i18nc("@info", "<b>%1:</b> There is no ingredient weight entry for when no "
"preparation method is specified. <a href=\"ingredient#%2\">Provide "
"ingredient weight.</a>",
ing.name, QString::number(ing.ingredientID))));
else
propertyStatusMapRed.insert(ing.ingredientID,QString(
- i18n("<b>%1:</b> There is no ""ingredient weight entry for when prepared "
+ i18nc("@info", "<b>%1:</b> There is no ""ingredient weight entry for when prepared "
"in any of the following manners: %2<a href=\"ingredient#%3\">Provide "
"ingredient weight.</a>"))
.arg(ing.name)
@@ -1617,7 +1617,7 @@
break;
case RecipeDB::MismatchedPrepMethodUsingApprox:
propertyStatusMapYellow.insert(ing.ingredientID,QString(
- i18n("<b>%1:</b> There is no ingredient weight entry for when prepared in any of "
+ i18nc("@info", "<b>%1:</b> There is no ingredient weight entry for when prepared in any of "
"the following manners (defaulting to a weight entry without a preparation "
"method specified): "
"%2<a href=\"ingredient#%3\">Provide ingredient weight.</a>"))
@@ -1639,18 +1639,18 @@
if ( propertyStatusMapRed.count() == 0 ) {
if ( propertyStatusMapYellow.count() == 0 ) {
propertyStatusLed->setColor( Qt::green );
- propertyStatusLabel->setText( i18n("Complete") );
+ propertyStatusLabel->setText( i18nc("@info", "Complete") );
propertyStatusButton->setEnabled(false);
}
else {
propertyStatusLed->setColor( Qt::yellow );
- propertyStatusLabel->setText( i18n("Complete, but approximations made") );
+ propertyStatusLabel->setText( i18nc("@info", "Complete, but approximations made") );
propertyStatusButton->setEnabled(true);
}
}
else {
propertyStatusLed->setColor( Qt::red );
- propertyStatusLabel->setText( i18n("Incomplete") );
+ propertyStatusLabel->setText( i18nc("@info", "Incomplete") );
propertyStatusButton->setEnabled(true);
}
@@ -1665,7 +1665,7 @@
QString statusMessage;
if ( propertyStatusMapRed.count() > 0 ) {
- statusMessage.append( i18n("The nutrient information for this recipe is incomplete because the following information is missing:") );
+ statusMessage.append( i18nc("@info", "The nutrient information for this recipe is incomplete because the following information is missing:") );
statusMessage.append("<ul>");
for ( QMap<int,QString>::const_iterator it = propertyStatusMapRed.begin(); it != propertyStatusMapRed.end(); ++it ) {
statusMessage.append("<li>");
@@ -1676,7 +1676,7 @@
}
if ( propertyStatusMapYellow.count() > 0 ) {
- statusMessage.append( i18n("The following approximations will be made when determining nutrient information:") );
+ statusMessage.append( i18nc("@info", "The following approximations will be made when determining nutrient information:") );
statusMessage.append("<ul>");
for ( QMap<int,QString>::const_iterator it = propertyStatusMapYellow.begin(); it != propertyStatusMapYellow.end(); ++it ) {
statusMessage.append("<li>");
Index: src/dialogs/editratingdialog.cpp
===================================================================
--- src/dialogs/editratingdialog.cpp (revision 1044800)
+++ src/dialogs/editratingdialog.cpp (working copy)
@@ -54,7 +54,7 @@
: KDialog( parent )
{
setObjectName( name );
- setCaption( i18n( "Rating" ) );
+ setCaption( i18nc( "@title:window", "Rating" ) );
init(criteriaList);
loadRating(rating);
}
@@ -67,7 +67,7 @@
: KDialog( parent )
{
setObjectName( name );
- setCaption( i18n( "Rating" ) );
+ setCaption( i18nc( "@title:window", "Rating" ) );
init(criteriaList);
}
@@ -115,8 +115,8 @@
removeButton->setIcon( KIcon( "list-remove" ) );
criteriaListView = new RatingCriteriaListView( page, "criteriaListView" );
- criteriaListView->addColumn( i18n( "Criteria" ) );
- criteriaListView->addColumn( i18n( "Stars" ) );
+ criteriaListView->addColumn( i18nc( "@title:column", "Criteria" ) );
+ criteriaListView->addColumn( i18nc( "@title:column", "Stars" ) );
criteriaListView->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, criteriaListView->sizePolicy().hasHeightForWidth() ) );
criteriaListView->setSorting(-1);
criteriaListView->setItemsRenameable( true );
@@ -138,7 +138,7 @@
KIconLoader *il = KIconLoader::global();
KMenu *kpop = new KMenu( criteriaListView );
- kpop->addAction( il->loadIcon( "edit-delete-shred", KIconLoader::NoGroup, 16 ), i18n( "&Delete" ), this, SLOT( slotRemoveRatingCriteria() ), Qt::Key_Delete );
+ kpop->addAction( il->loadIcon( "edit-delete-shred", KIconLoader::NoGroup, 16 ), i18nc( "@action:button", "&Delete" ), this, SLOT( slotRemoveRatingCriteria() ), Qt::Key_Delete );
for ( ElementList::const_iterator criteria_it = criteriaList.begin(); criteria_it != criteriaList.end(); ++criteria_it ) {
criteriaComboBox->insertItem( criteriaComboBox->count(), ( *criteria_it ).name );
@@ -162,14 +162,14 @@
*/
void EditRatingDialog::languageChange()
{
- criteriaLabel->setText( i18n( "Criteria:" ) );
- starsLabel->setText( i18n( "Stars:" ) );
- addButton->setText( i18n( "Add" ) );
- removeButton->setText( i18n( "&Delete" ) );
- criteriaListView->header()->setLabel( 0, i18n( "Criteria" ) );
- criteriaListView->header()->setLabel( 1, i18n( "Stars" ) );
- commentsLabel->setText( i18n( "Comments:" ) );
- raterLabel->setText( i18n( "Rater:" ) );
+ criteriaLabel->setText( i18nc( "@label:textbox", "Criteria:" ) );
+ starsLabel->setText( i18nc( "@label:textbox", "Stars:" ) );
+ addButton->setText( i18nc( "@action:button", "Add" ) );
+ removeButton->setText( i18nc( "@action:button", "&Delete" ) );
+ criteriaListView->header()->setLabel( 0, i18nc( "@title:column", "Criteria" ) );
+ criteriaListView->header()->setLabel( 1, i18nc( "@title:column", "Stars" ) );
+ commentsLabel->setText( i18nc( "@label:textbox", "Comments:" ) );
+ raterLabel->setText( i18nc( "@label:textbox", "Rater:" ) );
}
void EditRatingDialog::itemRenamed(Q3ListViewItem* it, const QString &, int c)
Index: src/dialogs/propertiesdialog.cpp
===================================================================
--- src/dialogs/propertiesdialog.cpp (revision 1044800)
+++ src/dialogs/propertiesdialog.cpp (working copy)
@@ -53,11 +53,11 @@
QVBoxLayout* vboxl = new QVBoxLayout();
vboxl->setSpacing( KDialog::spacingHint() );
addPropertyButton = new KPushButton( this );
- addPropertyButton->setText( i18n( "Create ..." ) );
+ addPropertyButton->setText( i18nc( "@action:button", "Create ..." ) );
addPropertyButton->setIcon( KIcon( "list-add" ) );
vboxl->addWidget( addPropertyButton );
removePropertyButton = new KPushButton( this );
- removePropertyButton->setText( i18n( "Delete" ) );
+ removePropertyButton->setText( i18nc( "@action:button", "Delete" ) );
removePropertyButton->setIcon( KIcon( "list-remove" ) );
vboxl->addWidget( removePropertyButton );
vboxl->addStretch();
Index: src/dialogs/recipeviewdialog.cpp
===================================================================
--- src/dialogs/recipeviewdialog.cpp (revision 1044800)
+++ src/dialogs/recipeviewdialog.cpp (working copy)
@@ -59,8 +59,8 @@
closeButton = new QToolButton;
closeButton->setIcon( KIcon( "window-close" ) );
- closeButton->setText( i18n( "Close" ) );
- closeButton->setToolTip( i18n( "Close" ) );
+ closeButton->setText( i18nc( "@action:button", "Close" ) );
+ closeButton->setToolTip( i18nc( "@info:tooltip", "Close" ) );
closeButton->setToolButtonStyle( Qt::ToolButtonTextUnderIcon );
functionsLayout->layout()->addItem( new QSpacerItem( 10, 10, QSizePolicy::MinimumExpanding, QSizePolicy::Fixed ) );
@@ -109,7 +109,7 @@
if ( ids.count() > 1 ) //we don't want a progress bar coming up when there is only one recipe... it may show up during the splash screen
{
- progress_dialog = new KProgressDialog( this, QString::null, i18n( "Opening recipes, please wait..." ) );
+ progress_dialog = new KProgressDialog( this, QString::null, i18nc( "@title:window", "Opening recipes, please wait..." ) );
progress_dialog->setObjectName( "open_progress_dialog" );
progress_dialog->setModal( true );
progress_dialog->resize( 240, 80 );
Index: src/dialogs/selectunitdialog.cpp
===================================================================
--- src/dialogs/selectunitdialog.cpp (revision 1044800)
+++ src/dialogs/selectunitdialog.cpp (working copy)
@@ -22,13 +22,13 @@
{
setButtons( KDialog::Ok | KDialog::Cancel );
setDefaultButton( KDialog::Ok );
- setCaption(i18n( "Choose Unit" ) );
+ setCaption(i18nc( "@title:window", "Choose Unit" ) );
setModal( true );
KVBox *page = new KVBox(this );
setMainWidget( page );
box = new Q3GroupBox( page );
- box->setTitle( i18n( "Choose Unit" ) );
+ box->setTitle( i18nc( "@title:group", "Choose Unit" ) );
box->setColumnLayout( 0, Qt::Vertical );
QVBoxLayout *boxLayout = new QVBoxLayout( box->layout() );
@@ -38,7 +38,7 @@
bool show_id = config.readEntry( "ShowID", false );
unitChooseView->addColumn( "Id" , show_id ? -1 : 0 );
- unitChooseView->addColumn( i18n( "Unit" ) );
+ unitChooseView->addColumn( i18nc( "@title:column", "Unit" ) );
unitChooseView->setSorting(1);
unitChooseView->setGeometry( QRect( 5, 30, 180, 250 ) );
unitChooseView->setAllColumnsShowFocus( true );
@@ -70,7 +70,7 @@
QString unitName = ( *unit_it ).name;
if ( unitName.isEmpty() ) {
if ( m_showEmpty == ShowEmptyUnit )
- unitName = " "+i18n("-No unit-");
+ unitName = " "+i18nc("@item", "-No unit-");
else
continue;
}
Index: src/dialogs/dbimportdialog.cpp
===================================================================
--- src/dialogs/dbimportdialog.cpp (revision 1044800)
+++ src/dialogs/dbimportdialog.cpp (working copy)
@@ -39,7 +39,7 @@
this->setModal( true );
this->setButtons( KDialog::Ok | KDialog::Cancel );
this->setDefaultButton( KDialog::Ok );
- this->setCaption( i18n( "Database Import" ) );
+ this->setCaption( i18nc( "@title:window", "Database Import" ) );
setButtonsOrientation( Qt::Vertical );
@@ -77,7 +77,7 @@
serverPageLayout_2->setSpacing( 6 );
serverPageLayout_2->setObjectName( "serverPageLayout_2" );
- QLabel *sqliteLabel = new QLabel( i18n( "Database file:" ), sqlitePage );
+ QLabel *sqliteLabel = new QLabel( i18nc( "@label:textbox", "Database file:" ), sqlitePage );
serverPageLayout_2->addWidget( sqliteLabel );
sqliteDBRequester = new KUrlRequester( sqlitePage );
sqliteDBRequester->setObjectName( "sqliteDBRequester" );
@@ -177,16 +177,16 @@
void DBImportDialog::languageChange()
{
- dbButtonGroup->setTitle( i18n( "Database" ) );
- liteRadioButton->setText( "SQLite" );
- mysqlRadioButton->setText( "MySQL" );
- psqlRadioButton->setText( "PostgreSQL" );
- hostLabel->setText( i18n( "Server:" ) );
- userLabel->setText( i18nc( "Database username", "Username:" ) );
- passwordLabel->setText( i18n( "Password:" ) );
- nameLabel->setText( i18n( "Database name:" ) );
- portLabel->setText( i18n( "Port:" ) );
- portEdit->setSpecialValueText( i18nc("Default port", "Default") );
+ dbButtonGroup->setTitle( i18nc( "@title:group", "Database" ) );
+ liteRadioButton->setText( "SQLite" ) ;
+ mysqlRadioButton->setText( "MySQL" ) ;
+ psqlRadioButton->setText( "PostgreSQL" ) ;
+ hostLabel->setText( i18nc( "@label:textbox", "Server:" ) );
+ userLabel->setText( i18nc( "@label:textbox Database username", "Username:" ) );
+ passwordLabel->setText( i18nc( "@label:textbox", "Password:" ) );
+ nameLabel->setText( i18nc( "@label:textbox", "Database name:" ) );
+ portLabel->setText( i18nc( "@label:textbox", "Port:" ) );
+ portEdit->setSpecialValueText( i18nc("@label:textbox Default port", "Default") );
//set defaults
hostEdit->setText( "localhost" );
Index: src/dialogs/dependanciesdialog.cpp
===================================================================
--- src/dialogs/dependanciesdialog.cpp (revision 1044800)
+++ src/dialogs/dependanciesdialog.cpp (working copy)
@@ -45,7 +45,7 @@
setDefaultButton(KDialog::Cancel);
setButtons(KDialog::Ok | KDialog::Cancel);
- setCaption( i18n( "Element with Dependencies" ) );
+ setCaption( i18nc( "@title:window", "Element with Dependencies" ) );
KVBox *page = new KVBox( this );
setMainWidget( page );
@@ -57,10 +57,10 @@
instructionsLabel->setAlignment( Qt::AlignVCenter );
instructionsLabel->setWordWrap(true);
if ( m_depsAreDeleted ) {
- instructionsLabel->setText( i18n( "<b>WARNING:</b> The following will have to be removed also, since currently they use the element you have chosen to be removed." ) );
+ instructionsLabel->setText( i18nc( "@info", "<b>WARNING:</b> The following will have to be removed also, since currently they use the element you have chosen to be removed." ) );
}
else {
- instructionsLabel->setText( i18n( "<b>WARNING:</b> The following currently use the element you have chosen to be removed." ) );
+ instructionsLabel->setText( i18nc( "@info", "<b>WARNING:</b> The following currently use the element you have chosen to be removed." ) );
}
for ( Q3ValueList<ListInfo>::const_iterator list_it = lists.begin(); list_it != lists.end(); ++list_it ) {
@@ -92,7 +92,7 @@
{
if ( !m_msg.isEmpty() ) {
switch ( KMessageBox::warningYesNo(this,
- QString("<b>%1</b><br><br>%2").arg(m_msg).arg(i18n("Are you sure you wish to proceed?")),
+ QString("<b>%1</b><br><br>%2").arg(m_msg).arg(i18nc("@info", "Are you sure you wish to proceed?")),
QString::null,KStandardGuiItem::yes(),KStandardGuiItem::no(),"doubleCheckDelete") )
{
case KMessageBox::Yes: KDialog::accept(); break;
Index: src/dialogs/shoppinglistdialog.cpp
===================================================================
--- src/dialogs/shoppinglistdialog.cpp (revision 1044800)
+++ src/dialogs/shoppinglistdialog.cpp (working copy)
@@ -69,7 +69,7 @@
layout->setMargin( KDialog::marginHint() );
layout->setSpacing( KDialog::spacingHint() );
- recipeListView = new KreListView ( this, i18n( "Full recipe list" ), true, 1 );
+ recipeListView = new KreListView ( this, i18nc( "@title", "Full recipe list" ), true, 1 );
layout->addWidget( recipeListView, 0, 0 );
listview = new RecipeListView( recipeListView, database );
listview->setSizePolicy( QSizePolicy::Ignored, QSizePolicy::MinimumExpanding );
@@ -99,7 +99,7 @@
layout->addItem( vboxl, 0, 1 );
- shopRecipeListView = new KreListView ( this, i18n("Shopping List") );
+ shopRecipeListView = new KreListView ( this, i18nc("@title", "Shopping List") );
ShoppingListView *slistview = new ShoppingListView( shopRecipeListView );
slistview->setSizePolicy( QSizePolicy::Ignored, QSizePolicy::MinimumExpanding );
slistview->setDragEnabled( true );
@@ -110,7 +110,7 @@
shopRecipeListView->setListView( slistview );
layout->addWidget( shopRecipeListView, 0, 2 );
- shopRecipeListView->listView() ->addColumn( i18n( "Recipe Title" ) );
+ shopRecipeListView->listView() ->addColumn( i18nc( "@title:column", "Recipe Title" ) );
KConfigGroup config( KGlobal::config(), "Advanced" );
bool show_id = config.readEntry( "ShowID", false );
@@ -129,7 +129,7 @@
okButton = new KPushButton( buttonBar );
okButton->setObjectName( "okButton" );
- okButton->setText( i18n( "&OK" ) );
+ okButton->setText( i18nc( "@action:button", "&OK" ) );
okButton->setIcon( KIcon( "dialog-ok" ) );
//buttonBar->layout()->addItem( new QSpacerItem( 10,10, QSizePolicy::MinimumExpanding, QSizePolicy::Fixed ) );
Index: src/dialogs/selectcategoriesdialog.cpp
===================================================================
--- src/dialogs/selectcategoriesdialog.cpp (revision 1044800)
+++ src/dialogs/selectcategoriesdialog.cpp (working copy)
@@ -29,7 +29,7 @@
: KDialog( parent ),
database(db)
{
- setCaption(i18n("Categories" ));
+ setCaption(i18nc("@title:window", "Categories" ));
setButtons(KDialog::Ok | KDialog::Cancel);
setDefaultButton(KDialog::Ok);
setModal( true );
@@ -43,7 +43,7 @@
//New category button
KPushButton *newCatButton = new KPushButton( page );
- newCatButton->setText( i18n( "&New Category..." ) );
+ newCatButton->setText( i18nc( "@action:button", "&New Category..." ) );
newCatButton->setIcon( KIcon( "list-add" ) );
// Load the list
@@ -86,7 +86,7 @@
//check bounds first
if ( result.length() > int(database->maxCategoryNameLength()) ) {
- KMessageBox::error( this, i18np( "Category name cannot be longer than 1 character.", "Category name cannot be longer than %1 characters.", database->maxCategoryNameLength() ) );
+ KMessageBox::error( this, i18ncp( "@info", "Category name cannot be longer than 1 character.", "Category name cannot be longer than %1 characters.", database->maxCategoryNameLength() ) );
return ;
}
Index: src/dialogs/conversiondialog.cpp
===================================================================
--- src/dialogs/conversiondialog.cpp (revision 1044800)
+++ src/dialogs/conversiondialog.cpp (working copy)
@@ -31,11 +31,11 @@
m_database(db)
{
setObjectName( name );
- setCaption(i18n( "Measurement Converter" ));
+ setCaption(i18nc( "@window:title", "Measurement Converter" ));
setButtons(KDialog::Close | KDialog::User1 | KDialog::Help);
setDefaultButton(KDialog::Close);
setHelp("measure-converter");
- setButtonText( KDialog::User1, i18n("Convert") );
+ setButtonText( KDialog::User1, i18nc("@action:button", "Convert") );
setModal( false );
@@ -56,10 +56,10 @@
KHBox *fromBottomBox = new KHBox(vbox);
- ingredientBox = new IngredientComboBox( false, fromBottomBox, db, i18n( "--Ingredient (optional)--" ) );
+ ingredientBox = new IngredientComboBox( false, fromBottomBox, db, i18nc( "@item:inlistbox", "--Ingredient (optional)--" ) );
ingredientBox->reload();
- prepMethodBox = new PrepMethodComboBox( false, fromBottomBox, db, i18n( "-No Preparation-" ) );
+ prepMethodBox = new PrepMethodComboBox( false, fromBottomBox, db, i18nc( "@item:inlistbox", "-No Preparation-" ) );
prepMethodBox->reload();
fromBottomBox->setSpacing(3);
@@ -94,9 +94,9 @@
void ConversionDialog::languageChange()
{
- convertLabel->setText( i18n( "Convert" ) );
- toLabel->setText( i18nc( "Convert to", "To" ) );
- resultLabel->setText( i18n( "<b>Result:</b>" ) );
+ convertLabel->setText( i18nc( "@label", "Convert" ) );
+ toLabel->setText( i18nc( "@label Convert to", "To" ) );
+ resultLabel->setText( i18nc( "@label", "<b>Result:</b>" ) );
resultText->setText( QString::null );
}
@@ -131,32 +131,32 @@
switch ( m_database->convertIngredientUnits( ing, unit, result ) ) {
case RecipeDB::Success:
- resultLabel->setText( i18n( "<b>Result:</b>" ) );
+ resultLabel->setText( i18nc( "@label:textbox", "<b>Result:</b>" ) );
resultText->setText(QString::number(result.amount)+" "+((result.amount>1)?result.units.plural:result.units.name));
break;
case RecipeDB::MismatchedPrepMethodUsingApprox:
- resultLabel->setText( i18n( "<b>Approximated result:</b>" ) );
+ resultLabel->setText( i18nc( "@label:textbox", "<b>Approximated result:</b>" ) );
resultText->setText(QString::number(result.amount)+" "+((result.amount>1)?result.units.plural:result.units.name));
break;
case RecipeDB::MissingUnitConversion:
- resultLabel->setText( i18n( "<b>Error:</b>" ) );
- resultText->setText( i18n("Missing unit conversion") );
+ resultLabel->setText( i18nc( "@label:textbox", "<b>Error:</b>" ) );
+ resultText->setText( i18nc( "@info", "Missing unit conversion" ) );
break;
case RecipeDB::MissingIngredientWeight:
- resultLabel->setText( i18n( "<b>Error:</b>" ) );
- resultText->setText( i18n("No ingredient weight available") );
+ resultLabel->setText( i18nc( "@label:textbox", "<b>Error:</b>" ) );
+ resultText->setText( i18nc( "@info", "No ingredient weight available" ) );
break;
case RecipeDB::MismatchedPrepMethod:
- resultLabel->setText( i18n( "<b>Error:</b>" ) );
- resultText->setText( i18n("No ingredient weight available for this method of preparation") );
+ resultLabel->setText( i18nc( "@label:textbox", "<b>Error:</b>" ) );
+ resultText->setText( i18nc( "@info", "No ingredient weight available for this method of preparation" ) );
break;
case RecipeDB::MissingIngredient:
- resultLabel->setText( i18n( "<b>Error:</b>" ) );
- resultText->setText( i18n("Ingredient required for conversion") );
+ resultLabel->setText( i18nc( "@label:textbox", "<b>Error:</b>" ) );
+ resultText->setText( i18nc( "@info", "Ingredient required for conversion" ) );
break;
case RecipeDB::InvalidTypes:
- resultLabel->setText( i18n( "<b>Error:</b>" ) );
- resultText->setText( i18n("Impossible unit conversion based on unit types") );
+ resultLabel->setText( i18nc( "@label:textbox", "<b>Error:</b>" ) );
+ resultText->setText( i18nc( "@info", "Impossible unit conversion based on unit types" ) );
break;
}
}
Index: src/dialogs/ingredientgroupsdialog.cpp
===================================================================
--- src/dialogs/ingredientgroupsdialog.cpp (revision 1044800)
+++ src/dialogs/ingredientgroupsdialog.cpp (working copy)
@@ -28,7 +28,7 @@
setObjectName( name );
QHBoxLayout* layout = new QHBoxLayout;
- headerListView = new KreListView ( this, i18n( "Header list" ), true, 0 );
+ headerListView = new KreListView ( this, i18nc( "@title", "Header list" ), true, 0 );
StdHeaderListView *list_view = new StdHeaderListView( headerListView, database, true );
headerActionsHandler = new HeaderActionsHandler( list_view, database );
headerListView->setListView( list_view );
Index: src/dialogs/prepmethodsdialog.cpp
===================================================================
--- src/dialogs/prepmethodsdialog.cpp (revision 1044800)
+++ src/dialogs/prepmethodsdialog.cpp (working copy)
@@ -43,12 +43,12 @@
vboxl->setSpacing ( KDialog::spacingHint() );
newPrepMethodButton = new KPushButton( this );
- newPrepMethodButton->setText( i18n( "Create ..." ) );
+ newPrepMethodButton->setText( i18nc( "@action:button", "Create ..." ) );
newPrepMethodButton->setIcon( KIcon( "list-add" ) );
vboxl->addWidget( newPrepMethodButton );
removePrepMethodButton = new KPushButton( this );
- removePrepMethodButton->setText( i18n( "Delete" ) );
+ removePrepMethodButton->setText( i18nc( "@action:button", "Delete" ) );
removePrepMethodButton->setIcon( KIcon( "list-remove" ) );
vboxl->addWidget( removePrepMethodButton );
vboxl->addStretch();
Index: src/dialogs/editpropertiesdialog.cpp
===================================================================
--- src/dialogs/editpropertiesdialog.cpp (revision 1044800)
+++ src/dialogs/editpropertiesdialog.cpp (working copy)
@@ -128,7 +128,7 @@
usdaListView = new KreListView( page, QString::null, page, 0 );
usdaListView->listView()->setSizePolicy( QSizePolicy::Ignored, QSizePolicy::MinimumExpanding );
- usdaListView->listView()->addColumn( i18n( "USDA Ingredient" ) );
+ usdaListView->listView()->addColumn( i18nc( "@title:column", "USDA Ingredient" ) );
usdaListView->listView()->addColumn( "Id" );
usdaListView->listView()->setAllColumnsShowFocus( true );
loadDataFromFile();
@@ -169,9 +169,9 @@
propertyListView->setObjectName( "propertyListView" );
propertyListView->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Preferred );
propertyListView->setAllColumnsShowFocus( true );
- propertyListView->addColumn( i18n( "Property" ) );
- propertyListView->addColumn( i18n( "Amount" ) );
- propertyListView->addColumn( i18n( "Unit" ) );
+ propertyListView->addColumn( i18nc( "@title:column", "Property" ) );
+ propertyListView->addColumn( i18nc( "@title:column", "Amount" ) );
+ propertyListView->addColumn( i18nc( "@title:column", "Unit" ) );
KConfigGroup config = KGlobal::config()->group( "Advanced" );
bool show_id = config.readEntry( "ShowID", false );
propertyListView->addColumn( "Id" , show_id ? -1 : 0 );
@@ -199,8 +199,8 @@
weightListView = new K3ListView( page );
weightListView->setObjectName( "weightListView" );
- weightListView->addColumn( i18n( "Weight" ) );
- weightListView->addColumn( i18n( "Per Amount" ) );
+ weightListView->addColumn( i18nc( "@title:column", "Weight" ) );
+ weightListView->addColumn( i18nc( "@title:column", "Per Amount" ) );
layout7->addWidget( weightListView );
layout9->addLayout( layout7 );
EditPropertiesDialogLayout->addLayout( layout9 );
@@ -235,22 +235,22 @@
void EditPropertiesDialog::languageChange()
{
- setCaption( i18n( "Property Information" ) );
- infoLabel->setText( i18n( "Property Information for <b>%1</b>" , ingredientName) );
- usdaListView->listView()->header()->setLabel( 0, i18n( "USDA Ingredient" ) );
+ setCaption( i18nc( "@title:window", "Property Information" ) );
+ infoLabel->setText( i18nc( "@label", "Property Information for <b>%1</b>" , ingredientName) );
+ usdaListView->listView()->header()->setLabel( 0, i18nc( "@title:column", "USDA Ingredient" ) );
usdaListView->listView()->header()->setLabel( 1, "Id" );
loadButton->setText( i18nc( "@action:button Load USDA property", "Load ->" ) );
- propertyLabel->setText( i18n( "Properties" ) );
- propertyAddButton->setText( i18n( "Add" ) );
- propertyRemoveButton->setText( i18n( "Remove" ) );
- propertyListView->header()->setLabel( 0, i18n( "Property" ) );
- propertyListView->header()->setLabel( 1, i18n( "Amount" ) );
- propertyListView->header()->setLabel( 2, i18n( "Unit" ) );
- weightLabel->setText( i18n( "Weights" ) );
- weightAddButton->setText( i18n( "Add" ) );
- weightRemoveButton->setText( i18n( "Remove" ) );
- weightListView->header()->setLabel( 0, i18n( "Weight" ) );
- weightListView->header()->setLabel( 1, i18n( "Per Amount" ) );
+ propertyLabel->setText( i18nc( "@label", "Properties" ) );
+ propertyAddButton->setText( i18nc( "@action:button", "Add" ) );
+ propertyRemoveButton->setText( i18nc( "@action:button", "Remove" ) );
+ propertyListView->header()->setLabel( 0, i18nc( "@title:column", "Property" ) );
+ propertyListView->header()->setLabel( 1, i18nc( "@title:column", "Amount" ) );
+ propertyListView->header()->setLabel( 2, i18nc( "@title:column", "Unit" ) );
+ weightLabel->setText( i18nc( "@label", "Weights" ) );
+ weightAddButton->setText( i18nc( "@action:button", "Add" ) );
+ weightRemoveButton->setText( i18nc( "@action:button", "Remove" ) );
+ weightListView->header()->setLabel( 0, i18nc( "@title:column", "Weight" ) );
+ weightListView->header()->setLabel( 1, i18nc( "@title:column", "Per Amount" ) );
}
void EditPropertiesDialog::addWeight()
@@ -276,7 +276,7 @@
{
Q3ListViewItem *it = weightListView->selectedItem();
if ( it ) {
- switch ( KMessageBox::warningContinueCancel(this, i18n("Recipes may require this information for nutrient analysis. Are you sure you want to delete this entry?"), QString(), KStandardGuiItem::cont(), KStandardGuiItem::cancel(), "DeleteIngredientWeight") ) {
+ switch ( KMessageBox::warningContinueCancel(this, i18nc("@info", "Recipes may require this information for nutrient analysis. Are you sure you want to delete this entry?"), QString(), KStandardGuiItem::cont(), KStandardGuiItem::cancel(), "DeleteIngredientWeight") ) {
case KMessageBox::Continue:
db->removeIngredientWeight( ((WeightListItem*)it)->weight().id );
delete it;
@@ -295,11 +295,11 @@
QPointer<KDialog> amountEditDialog = new KDialog( this );
amountEditDialog->setObjectName( "WeightAmountEdit" );
amountEditDialog->setModal( false );
- amountEditDialog->setCaption( i18n("Enter amount") );
+ amountEditDialog->setCaption( i18nc("@title:window", "Enter amount") );
amountEditDialog->setButtons( KDialog::Cancel | KDialog::Ok );
amountEditDialog->setDefaultButton( KDialog::Ok );
- Q3GroupBox *box = new Q3GroupBox( 1, Qt::Horizontal, i18n("Amount"), amountEditDialog );
+ Q3GroupBox *box = new Q3GroupBox( 1, Qt::Horizontal, i18nc("@title:group", "Amount"), amountEditDialog );
AmountUnitInput *amountEdit = new AmountUnitInput( box, db, Unit::Mass, MixedNumber::DecimalFormat );
WeightListItem *it = (WeightListItem*)item;
@@ -326,11 +326,11 @@
QPointer<KDialog> amountEditDialog = new KDialog( this );
amountEditDialog->setObjectName( "PerAmountEdit" );
amountEditDialog->setModal( false );
- amountEditDialog->setCaption( i18n("Enter amount") );
+ amountEditDialog->setCaption( i18nc("@title:window", "Enter amount") );
amountEditDialog->setButtons( KDialog::Cancel | KDialog::Ok );
amountEditDialog->setDefaultButton( KDialog::Ok );
- Q3GroupBox *box = new Q3GroupBox( 1, Qt::Horizontal, i18n("Amount"), amountEditDialog );
+ Q3GroupBox *box = new Q3GroupBox( 1, Qt::Horizontal, i18nc("@title:group", "Amount"), amountEditDialog );
WeightInput *amountEdit = new WeightInput( box, db, Unit::All, MixedNumber::DecimalFormat );
WeightListItem *it = (WeightListItem*)item;
@@ -417,7 +417,7 @@
db->addPropertyToIngredient( ingredientID, propertyID, 0, perUnitsID ); // Add result chosen property to ingredient in database, with amount 0 by default
}
else {
- KMessageBox::information( this, i18n( "Property Exists" ), i18n( "The property you tried to add already exists in the ingredient with the same per units." ) );
+ KMessageBox::information( this, i18nc( "@title:window" , "Property Exists" ), i18nc( "@info", "The property you tried to add already exists in the ingredient with the same per units." ) );
}
reloadPropertyList(); // Reload the list from database
}
Index: src/dialogs/ingredientparserdialog.cpp
===================================================================
--- src/dialogs/ingredientparserdialog.cpp (revision 1044800)
+++ src/dialogs/ingredientparserdialog.cpp (working copy)
@@ -39,7 +39,7 @@
{
//setButtonBoxOrientation( Qt::Vertical );
setObjectName( name );
- setCaption(i18n( "Ingredient Parser" ));
+ setCaption(i18nc( "@title:window", "Ingredient Parser" ));
setButtons(KDialog::Ok | KDialog::Cancel);
setDefaultButton(KDialog::Ok);
setModal( true );
@@ -63,10 +63,10 @@
previewIngView = new K3ListView( page );
previewIngView->setSorting(-1);
- previewIngView->addColumn( i18n( "Ingredient" ) );
- previewIngView->addColumn( i18n( "Amount" ) );
- previewIngView->addColumn( i18n( "Unit" ) );
- previewIngView->addColumn( i18n( "Preparation Method" ) );
+ previewIngView->addColumn( i18nc( "@title:column", "Ingredient" ) );
+ previewIngView->addColumn( i18nc( "@title:column", "Amount" ) );
+ previewIngView->addColumn( i18nc( "@title:column", "Unit" ) );
+ previewIngView->addColumn( i18nc( "@title:column", "Preparation Method" ) );
languageChange();
setInitialSize( QSize(577, 371).expandedTo(minimumSizeHint()) );
@@ -85,14 +85,14 @@
QWidget *buttonWidget = new QWidget( page );
QHBoxLayout *buttonBox = new QHBoxLayout(buttonWidget);
QSpacerItem *horizontalSpacing = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- buttonGroup = new QPushButton( i18n("Set &Header"), buttonWidget );
- buttonGroup->setWhatsThis( i18n("If an ingredient header is detected as an ingredient, select it and click this button so that Krecipes will recognize it as a header. All the ingredients below the header will be included within that group.\n\nAlternatively, if you select multiple ingredients and click this button, those ingredients will be grouped together.") );
+ buttonGroup = new QPushButton( i18nc("@action:button", "Set &Header"), buttonWidget );
+ buttonGroup->setWhatsThis( i18nc( "@info:whatsthis", "If an ingredient header is detected as an ingredient, select it and click this button so that Krecipes will recognize it as a header. All the ingredients below the header will be included within that group.\n\nAlternatively, if you select multiple ingredients and click this button, those ingredients will be grouped together.") );
buttonBox->addWidget( buttonGroup );
buttonBox->addItem( horizontalSpacing );
KMenu *kpop = new KMenu( previewIngView );
- kpop->addAction( i18n( "&Delete" ), this, SLOT( removeIngredient() ), Qt::Key_Delete );
- kpop->addAction( i18n("Set &Header") , this, SLOT( convertToHeader() ) );
+ kpop->addAction( i18nc( "@item:inmenu", "&Delete" ), this, SLOT( removeIngredient() ), Qt::Key_Delete );
+ kpop->addAction( i18nc( "@item:inmenu", "Set &Header") , this, SLOT( convertToHeader() ) );
connect( parseButton, SIGNAL(clicked()), this, SLOT(parseText()) );
connect( buttonGroup, SIGNAL(clicked()), this, SLOT(convertToHeader()) );
@@ -105,14 +105,14 @@
void IngredientParserDialog::languageChange()
{
- textLabel1->setText( i18n( "<p>To use: Paste a list of ingredient below, click \"Parse Text\", and then you may correct any incorrectly parsed ingredients.</p><p><b>Caution: Fields will be truncated if longer than the database allows</b></p>" ) );
- previewLabel->setText( i18n("Ingredients as understood by Krecipes:") );
+ textLabel1->setText( i18nc( "@info", "<p>To use: Paste a list of ingredient below, click \"Parse Text\", and then you may correct any incorrectly parsed ingredients.</p><p><b>Caution: Fields will be truncated if longer than the database allows</b></p>" ) );
+ previewLabel->setText( i18nc("@title", "Ingredients as understood by Krecipes:") );
textLabel1->setWordWrap(true);
- parseButton->setText( i18n( "Parse Text" ) );
- previewIngView->header()->setLabel( 0, i18n( "Ingredient" ) );
- previewIngView->header()->setLabel( 1, i18n( "Amount" ) );
- previewIngView->header()->setLabel( 2, i18n( "Unit" ) );
- previewIngView->header()->setLabel( 3, i18n( "Preparation Method" ) );
+ parseButton->setText( i18nc( "@action:button", "Parse Text" ) );
+ previewIngView->header()->setLabel( 0, i18nc( "@title:column", "Ingredient" ) );
+ previewIngView->header()->setLabel( 1, i18nc( "@title:column", "Amount" ) );
+ previewIngView->header()->setLabel( 2, i18nc( "@title:column", "Unit" ) );
+ previewIngView->header()->setLabel( 3, i18nc( "@title:column", "Preparation Method" ) );
}
void IngredientParserDialog::accept()