LibreOffice Module l10ntools (master) 1
Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
LngParser Class Reference

Class for localization of *.ulf files. More...

#include <lngmerge.hxx>

Public Member Functions

 LngParser (OString sLngFile)
 
 ~LngParser ()
 
void CreatePO (const OString &rPOFile)
 
void Merge (const OString &rPOFile, const OString &rDestinationFile, std::string_view rLanguage)
 

Static Private Member Functions

static bool isNextGroup (OString &sGroup_out, std::string_view sLine_in)
 
static void ReadLine (std::string_view rLine_in, OStringHashMap &rText_inout)
 
static void WritePO (PoOfstream &aPOStream, OStringHashMap &rText_inout, const OString &rActFileName, const OString &rID)
 

Private Attributes

std::vector< OString > mvLines
 
OString sSource
 
std::vector< OString > aLanguages
 

Detailed Description

Class for localization of *.ulf files.

Parse *.ulf files, extract translatable strings and merge translated strings.

Definition at line 40 of file lngmerge.hxx.

Constructor & Destructor Documentation

◆ LngParser()

LngParser::LngParser ( OString  sLngFile)

Definition at line 61 of file lngmerge.cxx.

References mvLines, and sSource.

◆ ~LngParser()

LngParser::~LngParser ( )

Definition at line 88 of file lngmerge.cxx.

Member Function Documentation

◆ CreatePO()

void LngParser::CreatePO ( const OString &  rPOFile)

◆ isNextGroup()

bool LngParser::isNextGroup ( OString &  sGroup_out,
std::string_view  sLine_in 
)
staticprivate

Definition at line 133 of file lngmerge.cxx.

References o3tl::trim().

Referenced by CreatePO().

◆ Merge()

void LngParser::Merge ( const OString &  rPOFile,
const OString &  rDestinationFile,
std::string_view  rLanguage 
)

◆ ReadLine()

void LngParser::ReadLine ( std::string_view  rLine_in,
OStringHashMap rText_inout 
)
staticprivate

Definition at line 138 of file lngmerge.cxx.

References o3tl::getToken(), o3tl::starts_with(), and o3tl::trim().

Referenced by CreatePO().

◆ WritePO()

void LngParser::WritePO ( PoOfstream aPOStream,
OStringHashMap rText_inout,
const OString &  rActFileName,
const OString &  rID 
)
staticprivate

Definition at line 124 of file lngmerge.cxx.

References common::writePoEntry().

Referenced by CreatePO().

Member Data Documentation

◆ aLanguages

std::vector<OString> LngParser::aLanguages
private

Definition at line 45 of file lngmerge.hxx.

Referenced by Merge().

◆ mvLines

std::vector<OString> LngParser::mvLines
private

Definition at line 43 of file lngmerge.hxx.

Referenced by CreatePO(), LngParser(), and Merge().

◆ sSource

OString LngParser::sSource
private

Definition at line 44 of file lngmerge.hxx.

Referenced by CreatePO(), LngParser(), and Merge().


The documentation for this class was generated from the following files: