Skip to content

Commit

Permalink
Translations and code format
Browse files Browse the repository at this point in the history
  • Loading branch information
droidmonkey committed Dec 23, 2024
1 parent 2ac7c0d commit ee05c2d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 11 deletions.
12 changes: 12 additions & 0 deletions share/translations/keepassxc_en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2801,6 +2801,18 @@ Disable safe saves and try again?</source>
<source>Unlock to reload</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cannot save because the</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>database file &quot;%1&quot; was modified externally</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EditEntryWidget</name>
Expand Down
23 changes: 12 additions & 11 deletions src/gui/DatabaseWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2202,17 +2202,18 @@ void DatabaseWidget::reloadDatabaseFile(bool triggeredBySave)
if (triggeredBySave || m_db->isModified() || m_db->hasNonDataChanges()) {
// Ask how to proceed
auto prefix = triggeredBySave ? tr("Cannot save because the") : tr("The");
auto result = MessageBox::question(
this,
tr("Reload database"),
QString("%1 %2.\n%3\n\n%4.\n%5.\n%6.").arg(
prefix, tr("database file \"%1\" was modified externally").arg(displayFileName()),
tr("How to proceed with your unsaved changes?"),
tr("Merge all changes together"),
tr("Discard your changes"),
tr("Ignore the changes in the file on disk")),
MessageBox::Merge | MessageBox::Discard | MessageBox::Ignore | MessageBox::Cancel,
MessageBox::Merge);
auto result =
MessageBox::question(this,
tr("Reload database"),
QString("%1 %2.\n%3\n\n%4.\n%5.\n%6.")
.arg(prefix,
tr("database file \"%1\" was modified externally").arg(displayFileName()),
tr("How to proceed with your unsaved changes?"),
tr("Merge all changes together"),
tr("Discard your changes"),
tr("Ignore the changes in the file on disk")),
MessageBox::Merge | MessageBox::Discard | MessageBox::Ignore | MessageBox::Cancel,
MessageBox::Merge);

if (result == MessageBox::Cancel) {
reloadAbort();
Expand Down

0 comments on commit ee05c2d

Please sign in to comment.