LibreOffice Module l10ntools (master) 1
|
Interface to use po entries in localization. More...
#include <po.hxx>
Public Types | |
enum | TYPE { TTEXT , TQUICKHELPTEXT , TTITLE } |
enum | Exception { NOSOURCFILE , NORESTYPE , NOGROUPID , NOSTRING , WRONGHELPTEXT } |
Public Member Functions | |
PoEntry () | |
PoEntry (std::string_view rSourceFile, std::string_view rResType, std::string_view rGroupId, std::string_view rLocalId, std::string_view rHelpText, const OString &rText, const TYPE eType) | |
~PoEntry () | |
PoEntry (const PoEntry &rPo) | |
PoEntry & | operator= (const PoEntry &rPo) |
PoEntry & | operator= (PoEntry &&rPo) noexcept |
OString const & | getSourceFile () const |
Get name of file from which entry is extracted. More... | |
OString | getGroupId () const |
OString | getLocalId () const |
OString | getResourceType () const |
Get the type of component from which entry is extracted. More... | |
TYPE | getType () const |
Get the type of entry. More... | |
OString const & | getMsgCtxt () const |
OString const & | getMsgId () const |
OString const & | getMsgStr () const |
bool | isFuzzy () const |
Static Public Member Functions | |
static bool | IsInSameComp (const PoEntry &rPo1, const PoEntry &rPo2) |
Check whether po-s belong to the same localization component. More... | |
static OString | genKeyId (const OString &rGenerator) |
Private Attributes | |
std::unique_ptr< GenPoEntry > | m_pGenPo |
bool | m_bIsInitialized |
Friends | |
class | PoOfstream |
class | PoIfstream |
Interface to use po entries in localization.
PoEntry based on GenPoEntry class which stores attributes of general po entry(see po.cxx). It makes easy to get/set all information needed to localize one english(US) string. It contains some basic checkings and some string transformations between po string and string used by localization tools.
enum PoEntry::Exception |
enum PoEntry::TYPE |
PoEntry::PoEntry | ( | std::string_view | rSourceFile, |
std::string_view | rResType, | ||
std::string_view | rGroupId, | ||
std::string_view | rLocalId, | ||
std::string_view | rHelpText, | ||
const OString & | rText, | ||
const TYPE | eType | ||
) |
Definition at line 242 of file po.cxx.
References eType, genKeyId(), idx, m_bIsInitialized, m_pGenPo, NOGROUPID, NORESTYPE, NOSOURCFILE, NOSTRING, TQUICKHELPTEXT, TTEXT, TTITLE, and WRONGHELPTEXT.
|
static |
Definition at line 415 of file po.cxx.
Referenced by MergeEntrys::GetQTZText(), MergeDataFile::InsertEntry(), and PoEntry().
OString PoEntry::getGroupId | ( | ) | const |
Definition at line 336 of file po.cxx.
References m_bIsInitialized, and m_pGenPo.
Referenced by checkMathSymbolNames(), IsInSameComp(), and MergeDataFile::MergeDataFile().
OString PoEntry::getLocalId | ( | ) | const |
Definition at line 342 of file po.cxx.
References m_bIsInitialized, and m_pGenPo.
Referenced by IsInSameComp(), and MergeDataFile::MergeDataFile().
const OString & PoEntry::getMsgCtxt | ( | ) | const |
Definition at line 384 of file po.cxx.
References m_bIsInitialized, and m_pGenPo.
Referenced by checkFunctionNames(), and checkStyleNames().
OString const & PoEntry::getMsgId | ( | ) | const |
Definition at line 392 of file po.cxx.
References m_bIsInitialized, and m_pGenPo.
Referenced by checkFunctionNames(), checkMathSymbolNames(), checkStyleNames(), checkVerticalBar(), and MergeDataFile::MergeDataFile().
const OString & PoEntry::getMsgStr | ( | ) | const |
Definition at line 399 of file po.cxx.
References m_bIsInitialized, and m_pGenPo.
Referenced by checkFunctionNames(), checkMathSymbolNames(), checkStyleNames(), checkVerticalBar(), and MergeDataFile::MergeDataFile().
OString PoEntry::getResourceType | ( | ) | const |
Get the type of component from which entry is extracted.
Definition at line 352 of file po.cxx.
References m_bIsInitialized, and m_pGenPo.
Referenced by IsInSameComp(), and MergeDataFile::MergeDataFile().
OString const & PoEntry::getSourceFile | ( | ) | const |
Get name of file from which entry is extracted.
Definition at line 330 of file po.cxx.
References m_bIsInitialized, and m_pGenPo.
Referenced by IsInSameComp(), and MergeDataFile::MergeDataFile().
PoEntry::TYPE PoEntry::getType | ( | ) | const |
Get the type of entry.
Definition at line 362 of file po.cxx.
References m_bIsInitialized, m_pGenPo, sType, TQUICKHELPTEXT, TTEXT, and TTITLE.
Referenced by MergeDataFile::MergeDataFile().
bool PoEntry::isFuzzy | ( | ) | const |
Definition at line 377 of file po.cxx.
References m_bIsInitialized, and m_pGenPo.
Referenced by checkFunctionNames(), checkMathSymbolNames(), checkStyleNames(), checkVerticalBar(), and MergeDataFile::MergeDataFile().
Check whether po-s belong to the same localization component.
Definition at line 406 of file po.cxx.
References getGroupId(), getLocalId(), getResourceType(), getSourceFile(), and m_bIsInitialized.
Referenced by MergeDataFile::MergeDataFile().
Definition at line 298 of file po.cxx.
References m_bIsInitialized, and m_pGenPo.
|
friend |
|
friend |
|
private |
Definition at line 38 of file po.hxx.
Referenced by getGroupId(), getLocalId(), getMsgCtxt(), getMsgId(), getMsgStr(), getResourceType(), getSourceFile(), getType(), isFuzzy(), IsInSameComp(), operator=(), PoEntry(), PoIfstream::readEntry(), and PoOfstream::writeEntry().
|
private |
Definition at line 37 of file po.hxx.
Referenced by getGroupId(), getLocalId(), getMsgCtxt(), getMsgId(), getMsgStr(), getResourceType(), getSourceFile(), getType(), isFuzzy(), operator=(), PoEntry(), PoIfstream::readEntry(), and PoOfstream::writeEntry().