#include <translation.h>
|
void | loadTranslation (const std::string &filename, const std::string &data) |
|
void | clear () |
|
const std::wstring & | getTranslation (const std::wstring &textdomain, const std::wstring &s) const |
|
const std::wstring & | getPluralTranslation (const std::wstring &textdomain, const std::wstring &s, unsigned long int number) const |
|
size_t | size () |
|
|
void | addTranslation (const std::wstring &textdomain, const std::wstring &original, const std::wstring &translated) |
|
void | addPluralTranslation (const std::wstring &textdomain, const GettextPluralForm::Ptr &plural, const std::wstring &original, std::vector< std::wstring > &translated) |
|
std::wstring | unescapeC (const std::wstring &str) |
|
std::optional< std::pair< std::wstring, std::wstring > > | parsePoLine (const std::string &line) |
|
bool | inEscape (const std::wstring &str, size_t pos) |
|
void | loadPoEntry (const std::wstring &basefilename, const GettextPluralForm::Ptr &plural_form, const std::map< std::wstring, std::wstring > &entry) |
|
void | loadMoEntry (const std::wstring &basefilename, const GettextPluralForm::Ptr &plural_form, const std::string &original, const std::string &translated) |
|
void | loadTrTranslation (const std::string &data) |
|
void | loadPoTranslation (const std::string &basefilename, const std::string &data) |
|
void | loadMoTranslation (const std::string &basefilename, const std::string &data) |
|
◆ addPluralTranslation()
void Translations::addPluralTranslation |
( |
const std::wstring & | textdomain, |
|
|
const GettextPluralForm::Ptr & | plural, |
|
|
const std::wstring & | original, |
|
|
std::vector< std::wstring > & | translated ) |
|
private |
◆ addTranslation()
void Translations::addTranslation |
( |
const std::wstring & | textdomain, |
|
|
const std::wstring & | original, |
|
|
const std::wstring & | translated ) |
|
private |
◆ clear()
void Translations::clear |
( |
| ) |
|
◆ getFileLanguage()
const std::string_view Translations::getFileLanguage |
( |
const std::string & | filename | ) |
|
|
static |
◆ getPluralTranslation()
const std::wstring & Translations::getPluralTranslation |
( |
const std::wstring & | textdomain, |
|
|
const std::wstring & | s, |
|
|
unsigned long int | number ) const |
◆ getTranslation()
const std::wstring & Translations::getTranslation |
( |
const std::wstring & | textdomain, |
|
|
const std::wstring & | s ) const |
◆ inEscape()
bool Translations::inEscape |
( |
const std::wstring & | str, |
|
|
size_t | pos ) |
|
private |
◆ isTranslationFile()
static bool Translations::isTranslationFile |
( |
const std::string & | filename | ) |
|
|
inlinestatic |
◆ loadMoEntry()
void Translations::loadMoEntry |
( |
const std::wstring & | basefilename, |
|
|
const GettextPluralForm::Ptr & | plural_form, |
|
|
const std::string & | original, |
|
|
const std::string & | translated ) |
|
private |
◆ loadMoTranslation()
void Translations::loadMoTranslation |
( |
const std::string & | basefilename, |
|
|
const std::string & | data ) |
|
private |
◆ loadPoEntry()
void Translations::loadPoEntry |
( |
const std::wstring & | basefilename, |
|
|
const GettextPluralForm::Ptr & | plural_form, |
|
|
const std::map< std::wstring, std::wstring > & | entry ) |
|
private |
◆ loadPoTranslation()
void Translations::loadPoTranslation |
( |
const std::string & | basefilename, |
|
|
const std::string & | data ) |
|
private |
◆ loadTranslation()
void Translations::loadTranslation |
( |
const std::string & | filename, |
|
|
const std::string & | data ) |
◆ loadTrTranslation()
void Translations::loadTrTranslation |
( |
const std::string & | data | ) |
|
|
private |
◆ parsePoLine()
std::optional< std::pair< std::wstring, std::wstring > > Translations::parsePoLine |
( |
const std::string & | line | ) |
|
|
private |
◆ size()
size_t Translations::size |
( |
| ) |
|
|
inline |
◆ unescapeC()
std::wstring Translations::unescapeC |
( |
const std::wstring & | str | ) |
|
|
private |
◆ m_plural_translations
std::unordered_map<std::wstring, std::pair<GettextPluralForm::Ptr, std::vector<std::wstring> > > Translations::m_plural_translations |
|
private |
◆ m_translations
std::unordered_map<std::wstring, std::wstring> Translations::m_translations |
|
private |
The documentation for this class was generated from the following files: