mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-25 03:09:13 +01:00
Merge pull request #196 from thedax/allowi18nPathOverride
Allow i18n path override for easier translation testing on mobile devices
This commit is contained in:
commit
f7f5e2c3ff
2 files changed
+11
-5
No files matched your search
+10
-4
@@ -72,14 +72,20 @@ bool I18NRepo::IniExists(const std::string &languageID) const {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool I18NRepo::LoadIni(const std::string &languageID) {
|
||||
bool I18NRepo::LoadIni(const std::string &languageID, const std::string &overridePath) {
|
||||
IniFile ini;
|
||||
std::string iniPath = GetIniPath(languageID);
|
||||
std::string iniPath;
|
||||
|
||||
// ILOG("Loading lang ini %s", iniPath.c_str());
|
||||
if (!ini.LoadFromVFS(GetIniPath(languageID))) {
|
||||
return false;
|
||||
if (!overridePath.empty()) {
|
||||
iniPath = overridePath + languageID + ".ini";
|
||||
} else {
|
||||
iniPath = GetIniPath(languageID);
|
||||
}
|
||||
|
||||
if (!ini.LoadFromVFS(iniPath))
|
||||
return false;
|
||||
|
||||
Clear();
|
||||
|
||||
const std::vector<IniFile::Section> §ions = ini.Sections();
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ public:
|
||||
~I18NRepo();
|
||||
|
||||
bool IniExists(const std::string &languageID) const;
|
||||
bool LoadIni(const std::string &languageID); // NOT the filename!
|
||||
bool LoadIni(const std::string &languageID, const std::string &overridePath = ""); // NOT the filename!
|
||||
void SaveIni(const std::string &languageID);
|
||||
|
||||
I18NCategory *GetCategory(const char *categoryName);
|
||||
|
||||
Reference in new issue
Block a user