aboutsummaryrefslogtreecommitdiff
path: root/src/translation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/translation.cpp')
-rw-r--r--src/translation.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/translation.cpp b/src/translation.cpp
index 264ec0d5c..8bbaee0a3 100644
--- a/src/translation.cpp
+++ b/src/translation.cpp
@@ -22,6 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "util/string.h"
#include <unordered_map>
+
#ifndef SERVER
// Client translations
Translations client_translations;
@@ -29,9 +30,8 @@ Translations *g_client_translations = &client_translations;
#endif
// Per language server translations
-std::unordered_map<std::string, Translations> server_translations;
-std::unordered_map<std::string, Translations> *g_server_translations =
- &server_translations;
+std::unordered_map<std::string,Translations> server_translations;
+std::unordered_map<std::string,Translations> *g_server_translations = &server_translations;
Translations::~Translations()
{
@@ -51,8 +51,8 @@ const std::wstring &Translations::getTranslation(
return m_translations.at(key);
} catch (const std::out_of_range &) {
verbosestream << "Translations: can't find translation for string \""
- << wide_to_utf8(s) << "\" in textdomain \""
- << wide_to_utf8(textdomain) << "\"" << std::endl;
+ << wide_to_utf8(s) << "\" in textdomain \""
+ << wide_to_utf8(textdomain) << "\"" << std::endl;
// Silence that warning in the future
m_translations[key] = s;
return s;
@@ -68,7 +68,7 @@ void Translations::loadTranslation(const std::string &data)
while (is.good()) {
std::getline(is, line);
// Trim last character if file was using a \r\n line ending
- if (line.length() > 0 && line[line.length() - 1] == '\r')
+ if (line.length () > 0 && line[line.length() - 1] == '\r')
line.resize(line.length() - 1);
if (str_starts_with(line, "# textdomain:")) {
@@ -118,7 +118,7 @@ void Translations::loadTranslation(const std::string &data)
if (i == wline.length()) {
errorstream << "Malformed translation line \"" << line << "\""
- << std::endl;
+ << std::endl;
continue;
}
i++;
@@ -155,7 +155,7 @@ void Translations::loadTranslation(const std::string &data)
if (oword2.empty()) {
oword2 = oword1;
errorstream << "Ignoring empty translation for \""
- << wide_to_utf8(oword1) << "\"" << std::endl;
+ << wide_to_utf8(oword1) << "\"" << std::endl;
}
std::wstring translation_index = textdomain + L"|";