mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
preferences: re-use a tr() string in _language.cpp
Also, tell "in date format" instead of "in time format" for dates. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
parent
2c06cb027f
commit
4fde26fb2c
1 changed files with 3 additions and 2 deletions
|
@ -89,14 +89,15 @@ void PreferencesLanguage::syncSettings()
|
|||
lang->setDateFormatShort(ui->shortDateFormatEntry->text());
|
||||
uiLanguage(NULL);
|
||||
|
||||
QString qDateTimeWeb = tr("These will be used as is. This might not be what you intended.\nSee http://doc.qt.io/qt-5/qdatetime.html#toString");
|
||||
QRegExp tfillegalchars("[^hHmszaApPt\\s:;\\.,]");
|
||||
if (tfillegalchars.indexIn(ui->timeFormatEntry->text()) >= 0)
|
||||
QMessageBox::warning(this, tr("Literal characters"),
|
||||
tr("Non-special character(s) in time format.\nThese will be used as is. This might not be what you intended.\nSee http://doc.qt.io/qt-5/qdatetime.html#toString"));
|
||||
tr("Non-special character(s) in time format.\n") + qDateTimeWeb);
|
||||
|
||||
QRegExp dfillegalchars("[^dMy/\\s:;\\.,\\-]");
|
||||
if (dfillegalchars.indexIn(ui->dateFormatEntry->currentText()) >= 0 ||
|
||||
dfillegalchars.indexIn(ui->shortDateFormatEntry->text()) >= 0)
|
||||
QMessageBox::warning(this, tr("Literal characters"),
|
||||
tr("Non-special character(s) in time format.\nThese will be used as is. This might not be what you intended.\nSee http://doc.qt.io/qt-5/qdatetime.html#toString"));
|
||||
tr("Non-special character(s) in date format.\n") + qDateTimeWeb);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue