File tree Expand file tree Collapse file tree 6 files changed +33
-0
lines changed
Expand file tree Collapse file tree 6 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 88
99#include " common/twlmenusettings.h"
1010#include " common/inifile.h"
11+ // #include "common/logging.h"
1112
1213#define STRING (what,def ) std::string STR_##what;
1314#include " language.inl"
1819 */
1920std::string getString (CIniFile &ini, const std::string &item, const std::string &defaultValue) {
2021 std::string out = ini.GetString (" LANGUAGE" , item, defaultValue);
22+ // logPrint("%s: %s\n", item.c_str(), out.c_str());
23+ if (out == " " ) {
24+ // Fallback to default string if translated string is blank
25+ out = defaultValue;
26+ }
2127
2228 // Convert "\n" to actual newlines
2329 for (uint i = 0 ; i < out.length () - 1 ; i++) {
Original file line number Diff line number Diff line change 88
99#include " common/twlmenusettings.h"
1010#include " common/inifile.h"
11+ // #include "common/logging.h"
1112
1213#define STRING (what,def ) std::string STR_##what;
1314#include " language.inl"
1819 */
1920std::string getString (CIniFile &ini, const std::string &item, const std::string &defaultValue) {
2021 std::string out = ini.GetString (" LANGUAGE" , item, defaultValue);
22+ // logPrint("%s: %s\n", item.c_str(), out.c_str());
23+ if (out == " " ) {
24+ // Fallback to default string if translated string is blank
25+ out = defaultValue;
26+ }
2127
2228 // Convert "\n" to actual newlines
2329 for (uint i = 0 ; i < out.length () - 1 ; i++) {
Original file line number Diff line number Diff line change 88
99#include " common/twlmenusettings.h"
1010#include " common/inifile.h"
11+ // #include "common/logging.h"
1112
1213#define STRING (what,def ) std::string STR_##what;
1314#include " language.inl"
1819 */
1920std::string getString (CIniFile &ini, const std::string &item, const std::string &defaultValue) {
2021 std::string out = ini.GetString (" LANGUAGE" , item, defaultValue);
22+ // logPrint("%s: %s\n", item.c_str(), out.c_str());
23+ if (out == " " ) {
24+ // Fallback to default string if translated string is blank
25+ out = defaultValue;
26+ }
2127
2228 // Convert "\n" to actual newlines
2329 for (uint i = 0 ; i < out.length () - 1 ; i++) {
Original file line number Diff line number Diff line change 1919 */
2020std::string getString (CIniFile &ini, const std::string &item, const std::string &defaultValue) {
2121 std::string out = ini.GetString (" LANGUAGE" , item, defaultValue);
22+ // logPrint("%s: %s\n", item.c_str(), out.c_str());
23+ if (out == " " ) {
24+ // Fallback to default string if translated string is blank
25+ out = defaultValue;
26+ }
2227
2328 // Convert "\n" to actual newlines
2429 for (uint i = 0 ; i < out.length () - 1 ; i++) {
Original file line number Diff line number Diff line change @@ -21,6 +21,11 @@ extern bool useTwlCfg;
2121 */
2222std::string getString (CIniFile &ini, const std::string &item, const std::string &defaultValue) {
2323 std::string out = ini.GetString (" LANGUAGE" , item, defaultValue);
24+ // logPrint("%s: %s\n", item.c_str(), out.c_str());
25+ if (out == " " ) {
26+ // Fallback to default string if translated string is blank
27+ out = defaultValue;
28+ }
2429
2530 // Convert "\n" to actual newlines
2631 for (uint i = 0 ; i < out.length () - 1 ; i++) {
Original file line number Diff line number Diff line change 1919 */
2020std::string getString (CIniFile &ini, const std::string &item, const std::string &defaultValue) {
2121 std::string out = ini.GetString (" LANGUAGE" , item, defaultValue);
22+ // logPrint("%s: %s\n", item.c_str(), out.c_str());
23+ if (out == " " ) {
24+ // Fallback to default string if translated string is blank
25+ out = defaultValue;
26+ }
2227
2328 // Convert "\n" to actual newlines
2429 for (uint i = 0 ; i < out.length () - 1 ; i++) {
You can’t perform that action at this time.
0 commit comments