From 9f809114f039bdb7703c7fc386424393cda43931 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sat, 5 May 2018 20:26:55 +0800 Subject: [PATCH] Really fix translation in fspathedit QT_TRANSLATE_NOOP3 is a macro, so we cannot use a runtime string for the context argument. Fix up 1d778676cd35ccd87102c92790df339c01a13b88. --- src/gui/fspathedit.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/gui/fspathedit.cpp b/src/gui/fspathedit.cpp index f14bc99b7..2d18d0660 100644 --- a/src/gui/fspathedit.cpp +++ b/src/gui/fspathedit.cpp @@ -41,7 +41,6 @@ namespace { - const char i18nContext[] = "FileSystemPathEdit"; struct TrStringWithComment { const char *source; @@ -49,18 +48,18 @@ namespace QString tr() const { - return QCoreApplication::translate(i18nContext, source, comment); + return QCoreApplication::translate("FileSystemPathEdit", source, comment); } }; constexpr TrStringWithComment browseButtonBriefText = - QT_TRANSLATE_NOOP3(i18nContext, "...", "Launch file dialog button text (brief)"); + QT_TRANSLATE_NOOP3("FileSystemPathEdit", "...", "Launch file dialog button text (brief)"); constexpr TrStringWithComment browseButtonFullText = - QT_TRANSLATE_NOOP3(i18nContext, "&Browse...", "Launch file dialog button text (full)"); + QT_TRANSLATE_NOOP3("FileSystemPathEdit", "&Browse...", "Launch file dialog button text (full)"); constexpr TrStringWithComment defaultDialogCaptionForFile = - QT_TRANSLATE_NOOP3(i18nContext, "Choose a file", "Caption for file open/save dialog"); + QT_TRANSLATE_NOOP3("FileSystemPathEdit", "Choose a file", "Caption for file open/save dialog"); constexpr TrStringWithComment defaultDialogCaptionForDirectory = - QT_TRANSLATE_NOOP3(i18nContext, "Choose a folder", "Caption for directory open dialog"); + QT_TRANSLATE_NOOP3("FileSystemPathEdit", "Choose a folder", "Caption for directory open dialog"); } class FileSystemPathEdit::FileSystemPathEditPrivate