fix: proper localization when using GtkFileChooserNative (#30888)

* fix: proper localization when using GtkFileChooserNative

* fix: iwyu
This commit is contained in:
Shelley Vohr 2021-09-22 20:12:50 +02:00 committed by GitHub
parent a75617bff1
commit 38b810b2e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 87 additions and 49 deletions

View file

@ -145,13 +145,13 @@ class GtkMessageBox : public NativeWindowObserver {
const char* TranslateToStock(int id, const std::string& text) {
const std::string lower = base::ToLowerASCII(text);
if (lower == "cancel")
return gtk_util::kCancelLabel;
return gtk_util::GetCancelLabel();
if (lower == "no")
return gtk_util::kNoLabel;
return gtk_util::GetNoLabel();
if (lower == "ok")
return gtk_util::kOkLabel;
return gtk_util::GetOkLabel();
if (lower == "yes")
return gtk_util::kYesLabel;
return gtk_util::GetYesLabel();
return text.c_str();
}