Mercurial > hg > octave-nkf
diff libgui/src/m-editor/file-editor-tab.cc @ 15982:131d40cd805b
gui: cleanup some string constants for translations
* file-editor.h: deleted constants for file filters and name for new files
* file-editor.cc (request_open_file): translate file filter in open dialog
* file-editor.cc (request_new_file): create new edit tab with empty title
because the title is updated later
* file-editor-tab.cc (update_window_title): translate unnamed title
* file-editor-tab.cc (save_file_as): translate file filter, shorter warning
message when new file name is the same as the current one
author | Torsten <ttl@justmail.de> |
---|---|
date | Sun, 27 Jan 2013 22:22:19 +0100 |
parents | e3873531dd7c |
children | 1eb3c67139f6 |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc +++ b/libgui/src/m-editor/file-editor-tab.cc @@ -659,7 +659,7 @@ { QString title (""); if (_file_name.isEmpty () || _file_name.at (_file_name.count () - 1) == '/') - title = UNNAMED_FILE; + title = tr("<unnamed>"); else { if ( _long_title ) @@ -866,7 +866,7 @@ fileDialog->setDirectory (_file_name); } } - fileDialog->setNameFilter (SAVE_FILE_FILTER); + fileDialog->setNameFilter (tr("Octave Files (*.m);;All Files (*.*)")); fileDialog->setDefaultSuffix ("m"); fileDialog->setAcceptMode (QFileDialog::AcceptSave); fileDialog->setViewMode (QFileDialog::Detail); @@ -897,7 +897,8 @@ // Create a NonModal message about error. QMessageBox* msgBox = new QMessageBox ( QMessageBox::Critical, tr ("Octave Editor"), - tr ("File not saved! You've selected a file name\n\n %1\n\nwhich is the same as the current file name. Use ""Save"" to overwrite. (Could allow overwriting, with message, if that is what folks want.)"). + tr ("File not saved! The selected file name\n%1\n" + "is the same as the current file name"). arg (saveFileName), QMessageBox::Ok, 0); msgBox->setWindowModality (Qt::NonModal);