Bug 427652 - Strangely worded KMessageBox
Summary: Strangely worded KMessageBox
Status: RESOLVED DUPLICATE of bug 420189
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 1.11.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-13 18:49 UTC by Oliver Sander
Modified: 2020-10-14 14:39 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Sander 2020-10-13 18:49:37 UTC
When I open a pdf document with annotations, move one of the annotations around, and try to quit without saving, I (rightly) get the message box

   Do you want to save your changes to [filename] or discard them?

However, the choice of buttons then is

   Ja   Nein   Abbrechen

(i.e., 'yes', 'no', 'cancel'), which doesn't really fit the question.

Strangely though, the code that produces the message box is part.cpp:1762

        const int res = KMessageBox::warningYesNoCancel(widget(), i18n("Do you want to save your changes to \"%1\" or discard them?", url().fileName()), i18n("Close Document"), KStandardGuiItem::save(), KStandardGuiItem::discard());

To my untrained eye, the KStandardGuiItem::save() and KStandardGuiItem::discard() make it seem like the buttons should really say 'save' and 'discard', but they don't, at least not in my German version.  Is this a bug in the German translation?  Or is `warningYesNoCancel` not the right type of message box?
Comment 1 Burkhard Lück 2020-10-14 11:08:11 UTC
This issue is not reproducible for me on two different systems:

System No 1)
Ubuntu 19.10
Okular Version 1.7.3
KDE Frameworks 5.62.0
Qt 5.12.4
Locale de

System No 2)
VM with KDE Neon
Okular Version 20.11.70
KDE Frameworks 5.75.0
Qt 5.15.0
Locale de

In both systems in german I have the dialog "Möchten Sie Ihre Änderungen an „%1“ speichern oder verwerfen?" (="Do you want to save your changes to "%1" or discard them?") with the buttons "Speichern" (="Save") "Verwerfen"(="Discard") and "Abbrechen" ("Cancel").

Is this a duplicate of https://bugs.kde.org/show_bug.cgi?id=420189 ?
Comment 2 Oliver Sander 2020-10-14 12:12:48 UTC
Thanks for checking.  Apparently it really is a duplicate of https://bugs.kde.org/show_bug.cgi?id=420189 .  I can reproduce what is described there: The buttons are only wrong when the message box appears for the first time.

What exactly do I have to do to start Okular without the German translation?
Comment 3 Burkhard Lück 2020-10-14 14:15:28 UTC
(In reply to Oliver Sander from comment #2)

> What exactly do I have to do to start Okular without the German translation?

LANGUAGE=en_US okular
or 
Help->Switch Application Language

That is OK for me as well, I have the buttons Save, Discard, Cancel

*** This bug has been marked as a duplicate of bug 420189 ***
Comment 4 Oliver Sander 2020-10-14 14:18:22 UTC
It must somehow be related to the translation.  With

  LANGUAGE=en_US okular

the message box works as expected.
Comment 5 Burkhard Lück 2020-10-14 14:39:31 UTC
@Oliver:
Please provide all information about your system at 
https://bugs.kde.org/show_bug.cgi?id=420189

distribution or build from sources
frameworks version
version/date of your translation catalog kwidgetsaddons5_qt
etc.

Thx