Fix #231: Enable translation for more strings
This commit is contained in:
parent
7fb6cafe9e
commit
a3a5afe119
@ -26,7 +26,7 @@
|
|||||||
// This is a hack, but I can't think of a better way to do this easily without screwing with QTextDocument...
|
// This is a hack, but I can't think of a better way to do this easily without screwing with QTextDocument...
|
||||||
QString getCreditsHtml(QStringList patrons)
|
QString getCreditsHtml(QStringList patrons)
|
||||||
{
|
{
|
||||||
QString creditsHtml =
|
QString creditsHtml = QObject::tr(
|
||||||
"<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0//EN' 'http://www.w3.org/TR/REC-html40/strict.dtd'>"
|
"<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0//EN' 'http://www.w3.org/TR/REC-html40/strict.dtd'>"
|
||||||
"<html>"
|
"<html>"
|
||||||
""
|
""
|
||||||
@ -56,9 +56,9 @@ QString getCreditsHtml(QStringList patrons)
|
|||||||
"%1"
|
"%1"
|
||||||
""
|
""
|
||||||
"</body>"
|
"</body>"
|
||||||
"</html>";
|
"</html>");
|
||||||
if (patrons.isEmpty())
|
if (patrons.isEmpty())
|
||||||
return creditsHtml.arg("<p>Loading...</p>");
|
return creditsHtml.arg(QObject::tr("<p>Loading...</p>"));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QString patronsStr;
|
QString patronsStr;
|
||||||
|
@ -82,10 +82,10 @@ QVariant BaseVersionList::headerData(int section, Qt::Orientation orientation, i
|
|||||||
switch (section)
|
switch (section)
|
||||||
{
|
{
|
||||||
case NameColumn:
|
case NameColumn:
|
||||||
return "Name";
|
return tr("Name");
|
||||||
|
|
||||||
case TypeColumn:
|
case TypeColumn:
|
||||||
return "Type";
|
return tr("Type");
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return QVariant();
|
return QVariant();
|
||||||
@ -95,10 +95,10 @@ QVariant BaseVersionList::headerData(int section, Qt::Orientation orientation, i
|
|||||||
switch (section)
|
switch (section)
|
||||||
{
|
{
|
||||||
case NameColumn:
|
case NameColumn:
|
||||||
return "The name of the version.";
|
return tr("The name of the version.");
|
||||||
|
|
||||||
case TypeColumn:
|
case TypeColumn:
|
||||||
return "The version's type.";
|
return tr("The version's type.");
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return QVariant();
|
return QVariant();
|
||||||
|
@ -57,10 +57,10 @@ QVariant LWJGLVersionList::headerData(int section, Qt::Orientation orientation,
|
|||||||
switch (role)
|
switch (role)
|
||||||
{
|
{
|
||||||
case Qt::DisplayRole:
|
case Qt::DisplayRole:
|
||||||
return "Version";
|
return tr("Version");
|
||||||
|
|
||||||
case Qt::ToolTipRole:
|
case Qt::ToolTipRole:
|
||||||
return "LWJGL version name.";
|
return tr("LWJGL version name.");
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return QVariant();
|
return QVariant();
|
||||||
|
@ -467,9 +467,9 @@ QVariant ModList::headerData(int section, Qt::Orientation orientation, int role)
|
|||||||
case ActiveColumn:
|
case ActiveColumn:
|
||||||
return QString();
|
return QString();
|
||||||
case NameColumn:
|
case NameColumn:
|
||||||
return QString("Name");
|
return tr("Name");
|
||||||
case VersionColumn:
|
case VersionColumn:
|
||||||
return QString("Version");
|
return tr("Version");
|
||||||
default:
|
default:
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
@ -478,11 +478,11 @@ QVariant ModList::headerData(int section, Qt::Orientation orientation, int role)
|
|||||||
switch (section)
|
switch (section)
|
||||||
{
|
{
|
||||||
case ActiveColumn:
|
case ActiveColumn:
|
||||||
return "Is the mod enabled?";
|
return tr("Is the mod enabled?");
|
||||||
case NameColumn:
|
case NameColumn:
|
||||||
return "The name of the mod.";
|
return tr("The name of the mod.");
|
||||||
case VersionColumn:
|
case VersionColumn:
|
||||||
return "The version of the mod.";
|
return tr("The version of the mod.");
|
||||||
default:
|
default:
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
@ -183,10 +183,10 @@ QVariant MojangAccountList::headerData(int section, Qt::Orientation orientation,
|
|||||||
switch (section)
|
switch (section)
|
||||||
{
|
{
|
||||||
case ActiveColumn:
|
case ActiveColumn:
|
||||||
return "Active?";
|
return tr("Active?");
|
||||||
|
|
||||||
case NameColumn:
|
case NameColumn:
|
||||||
return "Name";
|
return tr("Name");
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return QVariant();
|
return QVariant();
|
||||||
@ -196,7 +196,7 @@ QVariant MojangAccountList::headerData(int section, Qt::Orientation orientation,
|
|||||||
switch (section)
|
switch (section)
|
||||||
{
|
{
|
||||||
case NameColumn:
|
case NameColumn:
|
||||||
return "The name of the version.";
|
return tr("The name of the version.");
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return QVariant();
|
return QVariant();
|
||||||
|
@ -99,13 +99,13 @@ QVariant ForgeVersionList::headerData(int section, Qt::Orientation orientation,
|
|||||||
switch (section)
|
switch (section)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
return "Version";
|
return tr("Version");
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
return "Minecraft";
|
return tr("Minecraft");
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
return "Type";
|
return tr("Type");
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return QVariant();
|
return QVariant();
|
||||||
@ -115,13 +115,13 @@ QVariant ForgeVersionList::headerData(int section, Qt::Orientation orientation,
|
|||||||
switch (section)
|
switch (section)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
return "The name of the version.";
|
return tr("The name of the version.");
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
return "Minecraft version";
|
return tr("Minecraft version");
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
return "The version's type.";
|
return tr("The version's type.");
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return QVariant();
|
return QVariant();
|
||||||
|
@ -99,13 +99,13 @@ QVariant JavaVersionList::headerData(int section, Qt::Orientation orientation, i
|
|||||||
switch (section)
|
switch (section)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
return "Version";
|
return tr("Version");
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
return "Arch";
|
return tr("Arch");
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
return "Path";
|
return tr("Path");
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return QVariant();
|
return QVariant();
|
||||||
@ -115,13 +115,13 @@ QVariant JavaVersionList::headerData(int section, Qt::Orientation orientation, i
|
|||||||
switch (section)
|
switch (section)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
return "The name of the version.";
|
return tr("The name of the version.");
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
return "The architecture this version is for.";
|
return tr("The architecture this version is for.");
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
return "Path to this Java version.";
|
return tr("Path to this Java version.");
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return QVariant();
|
return QVariant();
|
||||||
|
Loading…
Reference in New Issue
Block a user