Skip to content

Commit

Permalink
change ReportIf() => ReportDebugIf() in Translations.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
kjk committed Aug 12, 2024
1 parent a20fed9 commit daf6823
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Translations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ static void ParseTranslationsTxt(const StrSpan& d, const char* langCode) {
int i = 2; // skip first 2 header lines
while (i < nLines) {
orig = lines[i];
ReportIf(*orig != ':');
ReportDebugIf(*orig != ':');
orig += 1; // skip the ':' at the beginning
i++;
trans = nullptr;
Expand All @@ -120,7 +120,7 @@ static void ParseTranslationsTxt(const StrSpan& d, const char* langCode) {
c->Append(unescaped);
}
int nTrans = c->Size();
ReportIf(nTrans != nStrings * 2);
ReportDebugIf(nTrans != nStrings * 2);
if (nUntranslated > 0 && !str::Eq(langCode, "en:")) {
logf("Untranslated strings: %d for lang '%s'\n", nUntranslated, langCode);
}
Expand All @@ -134,7 +134,7 @@ const char* GetTranslation(const char* s) {
}
auto c = gTranslationCache;
int n = c->Size();
ReportIf(n % 2 != 0);
ReportDebugIf(n % 2 != 0);
n = n / 2;
int sLen = str::Leni(s);
for (int i = 0; i < n; i++) {
Expand All @@ -149,7 +149,7 @@ const char* GetTranslation(const char* s) {
return tr;
}
}
ReportIf(true);
ReportDebugIf(true);
return s;
}

Expand All @@ -172,7 +172,7 @@ void SetCurrentLangByCode(const char* langCode) {
// set to English
idx = 0;
}
ReportIf(-1 == idx);
ReportDebugIf(-1 == idx);
gCurrLangIdx = idx;
gCurrLangCode = GetLangCodeByIdx(idx);
if (idx == 0 && !gIsDebugBuild) {
Expand Down

0 comments on commit daf6823

Please sign in to comment.