mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-10 05:44:25 +00:00
Fix translation context. Closes #8211.
This commit is contained in:
parent
be5600dae2
commit
1d778676cd
@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
#include <QCoreApplication>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QStyle>
|
#include <QStyle>
|
||||||
@ -40,6 +41,7 @@
|
|||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
const char i18nContext[] = "FileSystemPathEdit";
|
||||||
struct TrStringWithComment
|
struct TrStringWithComment
|
||||||
{
|
{
|
||||||
const char *source;
|
const char *source;
|
||||||
@ -47,18 +49,18 @@ namespace
|
|||||||
|
|
||||||
QString tr() const
|
QString tr() const
|
||||||
{
|
{
|
||||||
return QObject::tr(source, comment);
|
return QCoreApplication::translate(i18nContext, source, comment);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
constexpr TrStringWithComment browseButtonBriefText =
|
constexpr TrStringWithComment browseButtonBriefText =
|
||||||
QT_TRANSLATE_NOOP3("FileSystemPathEdit", "...", "Launch file dialog button text (brief)");
|
QT_TRANSLATE_NOOP3(i18nContext, "...", "Launch file dialog button text (brief)");
|
||||||
constexpr TrStringWithComment browseButtonFullText =
|
constexpr TrStringWithComment browseButtonFullText =
|
||||||
QT_TRANSLATE_NOOP3("FileSystemPathEdit", "&Browse...", "Launch file dialog button text (full)");
|
QT_TRANSLATE_NOOP3(i18nContext, "&Browse...", "Launch file dialog button text (full)");
|
||||||
constexpr TrStringWithComment defaultDialogCaptionForFile =
|
constexpr TrStringWithComment defaultDialogCaptionForFile =
|
||||||
QT_TRANSLATE_NOOP3("FileSystemPathEdit", "Choose a file", "Caption for file open/save dialog");
|
QT_TRANSLATE_NOOP3(i18nContext, "Choose a file", "Caption for file open/save dialog");
|
||||||
constexpr TrStringWithComment defaultDialogCaptionForDirectory =
|
constexpr TrStringWithComment defaultDialogCaptionForDirectory =
|
||||||
QT_TRANSLATE_NOOP3("FileSystemPathEdit", "Choose a folder", "Caption for directory open dialog");
|
QT_TRANSLATE_NOOP3(i18nContext, "Choose a folder", "Caption for directory open dialog");
|
||||||
}
|
}
|
||||||
|
|
||||||
class FileSystemPathEdit::FileSystemPathEditPrivate
|
class FileSystemPathEdit::FileSystemPathEditPrivate
|
||||||
|
Loading…
x
Reference in New Issue
Block a user