26 int argc,
char * argv[],
HandledArgs& o_aHandledArgs)
31 for(
int i = 1;
i < argc;
i++ )
33 if ( OString( argv[
i ] ).toAsciiUpperCase() ==
"-I" )
37 else if ( OString( argv[
i ] ).toAsciiUpperCase() ==
"-O" )
41 else if ( OString( argv[
i ] ).toAsciiUpperCase() ==
"-M" )
46 else if ( OString( argv[
i ] ).toAsciiUpperCase() ==
"-L" )
50 else if ( OString( argv[
i ] ).toAsciiUpperCase() ==
"-B" )
77 case State::Languages:
97void writeUsage(
const OString& rName,
const OString& rFileType)
100 <<
" Syntax: " << rName
101 <<
" -i FileIn -o FileOut [-m DataBase] [-l Lang] [-b]\n"
102 " FileIn: Source files (" << rFileType <<
")\n"
103 " FileOut: Destination file (*.*)\n"
104 " DataBase: Mergedata (*.po)\n"
105 " Lang: Restrict the handled language; one element of\n"
106 " (de, en-US, ...) or all\n"
107 " -b: Add UTF-8 Byte Order Mark to FileOut(use with -m option)\n";
111 const OString& rExecutable,
PoOfstream& rPoStream,
const OString& rSourceFile,
112 std::string_view rResType,
const OString& rGroupId,
const OString& rLocalId,
113 const OString& rHelpText,
const OString& rText,
const PoEntry::TYPE eType )
117 PoEntry aPO(rSourceFile, rResType, rGroupId, rLocalId, rHelpText, rText,
eType);
124 std::cerr << rExecutable <<
" warning: no sourcefile specified for po entry\n";
128 std::cerr << rExecutable <<
" warning: invalid po attributes extracted from " << rSourceFile <<
"\n";
131 std::cerr <<
"No groupID specified!\n";
132 std::cerr <<
"String: " << rText <<
"\n";
136 std::cerr <<
"No string specified!\n";
137 std::cerr <<
"GroupID: " << rGroupId <<
"\n";
138 if( !rLocalId.isEmpty() ) std::cerr <<
"LocalID: " << rLocalId <<
"\n";
144 std::cerr <<
"No resource type specified!\n";
148 std::cerr <<
"x-comment length is 5 characters:" << rHelpText <<
"\n";
151 std::cerr <<
"GroupID: " << rGroupId <<
"\n";
152 if( !rLocalId.isEmpty() ) std::cerr <<
"LocalID: " << rLocalId <<
"\n";
153 std::cerr <<
"String: " << rText <<
"\n";
Interface to use po entries in localization.
Interface to write po entry to files as output streams.
void writeEntry(const PoEntry &rPo)
void writeUsage(const OString &rName, const OString &rFileType)
Write out a help about usage.
void writePoEntry(const OString &rExecutable, PoOfstream &rPoStream, const OString &rSourceFile, std::string_view rResType, const OString &rGroupId, const OString &rLocalId, const OString &rHelpText, const OString &rText, const PoEntry::TYPE eType)
Write out a PoEntry with attention to exceptions.
bool handleArguments(int argc, char *argv[], HandledArgs &o_aHandledArgs)
Handle command line parameters.
Result type of handleArguments()