Merge pull request #7190 from Techjar/video-backend-translation

Mark all video backend names for translation
This commit is contained in:
spycrab 2018-06-30 15:48:32 +02:00 committed by GitHub
commit a9841e4fc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 6 deletions

View File

@ -5,6 +5,7 @@
#include <memory> #include <memory>
#include <string> #include <string>
#include "Common/Common.h"
#include "Common/CommonTypes.h" #include "Common/CommonTypes.h"
#include "Common/MsgHandler.h" #include "Common/MsgHandler.h"
#include "Common/StringUtil.h" #include "Common/StringUtil.h"
@ -34,7 +35,7 @@ std::string VideoBackend::GetName() const
std::string VideoBackend::GetDisplayName() const std::string VideoBackend::GetDisplayName() const
{ {
return "Direct3D 11"; return _trans("Direct3D 11");
} }
void VideoBackend::InitBackendInfo() void VideoBackend::InitBackendInfo()

View File

@ -4,6 +4,7 @@
#pragma once #pragma once
#include "Common/Common.h"
#include "VideoCommon/VideoBackendBase.h" #include "VideoCommon/VideoBackendBase.h"
namespace Null namespace Null
@ -14,7 +15,11 @@ class VideoBackend : public VideoBackendBase
void Shutdown() override; void Shutdown() override;
std::string GetName() const override { return "Null"; } std::string GetName() const override { return "Null"; }
std::string GetDisplayName() const override { return "Null"; } std::string GetDisplayName() const override
{
// i18n: Null is referring to the null video backend, which renders nothing
return _trans("Null");
}
void InitBackendInfo() override; void InitBackendInfo() override;
}; };
} }

View File

@ -38,6 +38,7 @@ Make AA apply instantly during gameplay if possible
#include <string> #include <string>
#include <vector> #include <vector>
#include "Common/Common.h"
#include "Common/GL/GLInterfaceBase.h" #include "Common/GL/GLInterfaceBase.h"
#include "Common/GL/GLUtil.h" #include "Common/GL/GLUtil.h"
#include "Common/MsgHandler.h" #include "Common/MsgHandler.h"
@ -66,9 +67,9 @@ std::string VideoBackend::GetName() const
std::string VideoBackend::GetDisplayName() const std::string VideoBackend::GetDisplayName() const
{ {
if (GLInterface != nullptr && GLInterface->GetMode() == GLInterfaceMode::MODE_OPENGLES3) if (GLInterface != nullptr && GLInterface->GetMode() == GLInterfaceMode::MODE_OPENGLES3)
return "OpenGLES"; return _trans("OpenGL ES");
else else
return "OpenGL"; return _trans("OpenGL");
} }
void VideoBackend::InitBackendInfo() void VideoBackend::InitBackendInfo()

View File

@ -7,6 +7,7 @@
#include <string> #include <string>
#include <utility> #include <utility>
#include "Common/Common.h"
#include "Common/CommonTypes.h" #include "Common/CommonTypes.h"
#include "Common/GL/GLInterfaceBase.h" #include "Common/GL/GLInterfaceBase.h"
@ -51,7 +52,7 @@ std::string VideoSoftware::GetName() const
std::string VideoSoftware::GetDisplayName() const std::string VideoSoftware::GetDisplayName() const
{ {
return "Software Renderer"; return _trans("Software Renderer");
} }
void VideoSoftware::InitBackendInfo() void VideoSoftware::InitBackendInfo()

View File

@ -4,6 +4,7 @@
#pragma once #pragma once
#include "Common/Common.h"
#include "VideoCommon/VideoBackendBase.h" #include "VideoCommon/VideoBackendBase.h"
namespace Vulkan namespace Vulkan
@ -15,7 +16,7 @@ public:
void Shutdown() override; void Shutdown() override;
std::string GetName() const override { return "Vulkan"; } std::string GetName() const override { return "Vulkan"; }
std::string GetDisplayName() const override { return "Vulkan"; } std::string GetDisplayName() const override { return _trans("Vulkan"); }
void InitBackendInfo() override; void InitBackendInfo() override;
}; };
} }