diff options
-rw-r--r-- | common/translation.cpp | 12 | ||||
-rw-r--r-- | common/translation.h | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/common/translation.cpp b/common/translation.cpp index a8dec96587..896302c6cb 100644 --- a/common/translation.cpp +++ b/common/translation.cpp @@ -161,9 +161,9 @@ const char *TranslationManager::getTranslation(const char *message) { while (rightIndex >= leftIndex) { const int midIndex = (leftIndex + rightIndex) / 2; const PoMessageEntry * const m = &_currentTranslationMessages[midIndex]; - + const int compareResult = strcmp(message, _messageIds[m->msgid].c_str()); - + if (compareResult == 0) return m->msgstr.c_str(); else if (compareResult < 0) @@ -238,7 +238,7 @@ void TranslationManager::loadTranslationsInfoDat() { int nbTranslations = in.readUint16BE(); // Skip all the block sizes - for (int i = 0 ; i < nbTranslations + 2 ; ++i) + for (int i = 0; i < nbTranslations + 2; ++i) in.readUint16BE(); // Read list of languages @@ -291,7 +291,7 @@ void TranslationManager::loadLanguageDat(int index) { // Get size of blocks to skip. int skipSize = 0; - for (int i = 0 ; i < index + 2 ; ++i) + for (int i = 0; i < index + 2; ++i) skipSize += in.readUint16BE(); // We also need to skip the remaining block sizes skipSize += 2 * (nbTranslations - index); @@ -317,12 +317,12 @@ void TranslationManager::loadLanguageDat(int index) { } } -bool TranslationManager::checkHeader(File& in) { +bool TranslationManager::checkHeader(File &in) { char buf[13]; int ver; if (!in.isOpen()) { - warning("You're missing the 'translations.dat' file. GUI translation will not be available"); + warning("You re missing the 'translations.dat' file. GUI translation will not be available"); return false; } diff --git a/common/translation.h b/common/translation.h index 29b92ec9b6..ccd35ce288 100644 --- a/common/translation.h +++ b/common/translation.h @@ -139,12 +139,12 @@ private: * * @param index of the language in the list of languages */ - void loadLanguageDat(int); + void loadLanguageDat(int index); /** * Check the header of the given file to make sure it is a valid translations data file. */ - bool checkHeader(File&); + bool checkHeader(File &in); String _syslang; StringArray _langs; |