Show translator name in credits page

This commit is contained in:
Grinch_ 2022-03-04 12:08:06 +06:00
parent 7dc0e2b859
commit d6810e36b6
4 changed files with 10 additions and 3 deletions

View File

@ -98,6 +98,7 @@
"WeatherIDText": "Sets weather by IDs (0-255). Don't touch unless you know what you're doing!"
},
"Main": {
"Translator" : "Translator",
"TranslationLanguage": "English",
"TranslationLanguageDisclaimer": "Translated to English by Grinch_",
"TranslatorName": "Grinch_"

View File

@ -2,7 +2,7 @@
#include "locale.h"
#include <filesystem>
Locale::eReturnCodes Locale::Init(const char* path, const char* def, const char* callback)
Locale::eReturnCodes Locale::Init(const char* path, const char* def, const char* fallback)
{
std::string localePath = path;
if (localePath.back() != '/')
@ -42,7 +42,7 @@ Locale::eReturnCodes Locale::Init(const char* path, const char* def, const char*
#endif
m_locales.push_back(fileName);
if (!strcmp(callback, fileName.c_str()))
if (!strcmp(fallback, fileName.c_str()))
{
std::string localePath = m_path + fileName + ".json";

View File

@ -36,7 +36,7 @@ public:
Loads json files from the locale directory
Calling it multiple times will unload previous data
*/
static eReturnCodes Init(const char* path, const char* def = "English", const char* callback = "");
static eReturnCodes Init(const char* path, const char* def = "English", const char* fallback = "");
// Returns a vector of available languages
static std::vector<std::string>& GetLocaleList();

View File

@ -671,6 +671,12 @@ void Menu::ShowPage()
ImGui::Text("TsudaKageyu");
ImGui::TableNextColumn();
ImGui::Text("MinHook");
ImGui::TableNextRow();
ImGui::TableNextColumn();
ImGui::Text(TEXT("Menu.TranslatorName"));
ImGui::TableNextColumn();
ImGui::Text(TEXT("Menu.Translator"));
ImGui::EndTable();
}