diff --git a/include/relapp.cpp b/include/relapp.cpp index 6195ba7c0..bd0ed129a 100755 --- a/include/relapp.cpp +++ b/include/relapp.cpp @@ -789,16 +789,11 @@ int TRelation_application::delete_mode() { long deleting = sht.checked(); TString msg; - msg = "Confermate l'eliminazione d"; - if (deleting == 1) - msg << "ell'elemento selezionato?"; - else - msg << "i " << deleting << " elementi selezionati?"; - + msg.format(FR("Confermare l'eliminazione di %d elementi"), deleting); bool can_delete = yesno_box(msg); if (can_delete && deleting > 100) { - msg.insert("ATTENZIONE: ", 0); + msg.insert(TR("ATTENZIONE: "), 0); can_delete = yesno_box(msg); } if (can_delete) @@ -834,12 +829,11 @@ int TRelation_application::delete_mode() } } cur.freeze(FALSE); + set_limits(); // Riaggiorno il numero del primo/ultimo record + if (skipped > 0) { - if (skipped == 1) - warning_box("Un elemento non e' stato cancellato in quanto protetto."); - else - warning_box("%ld elementi non sono stati cancellati in quanto protetti.", skipped); + warning_box(FR("%ld elementi non sono stati cancellati in quanto protetti."), skipped); query_mode(); } } @@ -876,7 +870,7 @@ bool TRelation_application::test_key( if (err) { TString msg(80); - msg = "Manca un valore indispensabile per la ricerca."; + msg = TR("Manca un valore indispensabile per la ricerca."); #ifdef DBG msg << "\nChiave " << int(k) << " - Campo " << e->dlg(); const TFieldref* fr = e->field(); @@ -901,7 +895,7 @@ bool TRelation_application::test_key( if (k == 1 && !onereq && !onefill) { if (err) - error_box("Manca un valore indispensabile per la ricerca"); + error_box(TR("Manca un valore indispensabile per la ricerca")); return FALSE; } return onefill || onereq; @@ -1146,14 +1140,14 @@ bool TRelation_application::relation_remove() if (protected_record(r)) return message_box("Elemento non eliminabile"); - if (_curr_transaction == TRANSACTION_DELETE || yesno_box("Confermare l'eliminazione")) + if (_curr_transaction == TRANSACTION_DELETE || yesno_box(TR("Confermare l'eliminazione"))) { r.restore_status(); const bool ok = remove(); if (ok || is_transaction()) set_limits(); else - return error_box("Errore di cancellazione %d", r.status()); + return error_box(FR("Errore di cancellazione %d"), r.status()); } return TRUE; } @@ -1248,7 +1242,7 @@ void TRelation_application::main_loop() if (pos >= 0 && _mask->fld(pos).active()) _mask->send_key(K_CTRL+'E', 0); else - error_box("Elemento non eliminabile."); + error_box(TR("Elemento non eliminabile.")); _autodelete = FALSE; } }