Show translator name in credits page
This commit is contained in:
parent
7dc0e2b859
commit
d6810e36b6
@ -98,6 +98,7 @@
|
|||||||
"WeatherIDText": "Sets weather by IDs (0-255). Don't touch unless you know what you're doing!"
|
"WeatherIDText": "Sets weather by IDs (0-255). Don't touch unless you know what you're doing!"
|
||||||
},
|
},
|
||||||
"Main": {
|
"Main": {
|
||||||
|
"Translator" : "Translator",
|
||||||
"TranslationLanguage": "English",
|
"TranslationLanguage": "English",
|
||||||
"TranslationLanguageDisclaimer": "Translated to English by Grinch_",
|
"TranslationLanguageDisclaimer": "Translated to English by Grinch_",
|
||||||
"TranslatorName": "Grinch_"
|
"TranslatorName": "Grinch_"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#include "locale.h"
|
#include "locale.h"
|
||||||
#include <filesystem>
|
#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;
|
std::string localePath = path;
|
||||||
if (localePath.back() != '/')
|
if (localePath.back() != '/')
|
||||||
@ -42,7 +42,7 @@ Locale::eReturnCodes Locale::Init(const char* path, const char* def, const char*
|
|||||||
#endif
|
#endif
|
||||||
m_locales.push_back(fileName);
|
m_locales.push_back(fileName);
|
||||||
|
|
||||||
if (!strcmp(callback, fileName.c_str()))
|
if (!strcmp(fallback, fileName.c_str()))
|
||||||
{
|
{
|
||||||
std::string localePath = m_path + fileName + ".json";
|
std::string localePath = m_path + fileName + ".json";
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ public:
|
|||||||
Loads json files from the locale directory
|
Loads json files from the locale directory
|
||||||
Calling it multiple times will unload previous data
|
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
|
// Returns a vector of available languages
|
||||||
static std::vector<std::string>& GetLocaleList();
|
static std::vector<std::string>& GetLocaleList();
|
||||||
|
@ -671,6 +671,12 @@ void Menu::ShowPage()
|
|||||||
ImGui::Text("TsudaKageyu");
|
ImGui::Text("TsudaKageyu");
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
ImGui::Text("MinHook");
|
ImGui::Text("MinHook");
|
||||||
|
|
||||||
|
ImGui::TableNextRow();
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
ImGui::Text(TEXT("Menu.TranslatorName"));
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
ImGui::Text(TEXT("Menu.Translator"));
|
||||||
|
|
||||||
ImGui::EndTable();
|
ImGui::EndTable();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user