8#include <unordered_map>
21 void loadTranslation(
const std::string &filename,
const std::string &data);
24 const std::wstring &textdomain,
const std::wstring &s)
const;
26 const std::wstring &s,
unsigned long int number)
const;
27 static const std::string_view
getFileLanguage(
const std::string &filename);
40 std::unordered_map<std::wstring, std::pair<GettextPluralForm::Ptr, std::vector<std::wstring>>>
m_plural_translations;
42 void addTranslation(
const std::wstring &textdomain,
const std::wstring &original,
43 const std::wstring &translated);
46 const std::wstring &original,
47 std::vector<std::wstring> &translated);
48 std::wstring
unescapeC(
const std::wstring &str);
49 std::optional<std::pair<std::wstring, std::wstring>>
parsePoLine(
const std::string &line);
50 bool inEscape(
const std::wstring &str,
size_t pos);
std::shared_ptr< GettextPluralForm > Ptr
Definition gettext_plural_form.h:14
Definition translation.h:19
std::wstring unescapeC(const std::wstring &str)
Definition translation.cpp:199
size_t size()
Definition translation.h:33
const std::wstring & getPluralTranslation(const std::wstring &textdomain, const std::wstring &s, unsigned long int number) const
Definition translation.cpp:49
static const std::string_view getFileLanguage(const std::string &filename)
Definition translation.cpp:21
void loadMoTranslation(const std::string &basefilename, const std::string &data)
Definition translation.cpp:552
void clear()
Definition translation.cpp:33
void addTranslation(const std::wstring &textdomain, const std::wstring &original, const std::wstring &translated)
Definition translation.cpp:67
const std::wstring & getTranslation(const std::wstring &textdomain, const std::wstring &s) const
Definition translation.cpp:39
void loadTrTranslation(const std::string &data)
Definition translation.cpp:94
std::unordered_map< std::wstring, std::wstring > m_translations
Definition translation.h:39
bool inEscape(const std::wstring &str, size_t pos)
Definition translation.cpp:355
void loadTranslation(const std::string &filename, const std::string &data)
Definition translation.cpp:629
void addPluralTranslation(const std::wstring &textdomain, const GettextPluralForm::Ptr &plural, const std::wstring &original, std::vector< std::wstring > &translated)
Definition translation.cpp:76
void loadMoEntry(const std::wstring &basefilename, const GettextPluralForm::Ptr &plural_form, const std::string &original, const std::string &translated)
Definition translation.cpp:514
static bool isTranslationFile(const std::string &filename)
Definition translation.h:28
std::unordered_map< std::wstring, std::pair< GettextPluralForm::Ptr, std::vector< std::wstring > > > m_plural_translations
Definition translation.h:40
void loadPoEntry(const std::wstring &basefilename, const GettextPluralForm::Ptr &plural_form, const std::map< std::wstring, std::wstring > &entry)
Definition translation.cpp:321
std::optional< std::pair< std::wstring, std::wstring > > parsePoLine(const std::string &line)
Definition translation.cpp:369
void loadPoTranslation(const std::string &basefilename, const std::string &data)
Definition translation.cpp:418
Translations * g_client_translations
Definition translation.cpp:18