summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-07-01 15:45:52 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-07-01 15:45:52 +0200
commite50ef195bc95f3f410119f623928382cb88b45d2 (patch)
tree0897c005806c84d7e2add9f4a2d407ff4fe911a5 /l10ntools
parent363e39d63621b6c7017854ca5bb2f7668bb35846 (diff)
New loplugin:stringconcat
Change-Id: Id7c517fb37bc28797c45fc0dde83e866f2aa4aac
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/common.cxx12
-rw-r--r--l10ntools/source/helpex.cxx16
-rw-r--r--l10ntools/source/localize.cxx24
-rw-r--r--l10ntools/source/pocheck.cxx34
-rw-r--r--l10ntools/source/propmerge.cxx4
-rw-r--r--l10ntools/source/treemerge.cxx4
-rw-r--r--l10ntools/source/treex.cxx16
-rw-r--r--l10ntools/source/uimerge.cxx5
8 files changed, 66 insertions, 49 deletions
diff --git a/l10ntools/source/common.cxx b/l10ntools/source/common.cxx
index 78274b810bb5..426b09de2be0 100644
--- a/l10ntools/source/common.cxx
+++ b/l10ntools/source/common.cxx
@@ -95,12 +95,12 @@ void writeUsage(const OString& rName, const OString& rFileType)
std::cout
<< " Syntax: " << rName.getStr()
<< " -i FileIn -o FileOut [-m DataBase] [-l Lang] [-b]\n"
- << " FileIn: Source files (" << rFileType.getStr() << ")\n"
- << " FileOut: Destination file (*.*)\n"
- << " DataBase: Mergedata (*.po)\n"
- << " Lang: Restrict the handled language; one element of\n"
- << " (de, en-US, ...) or all\n"
- << " -b: Add UTF-8 Byte Order Mark to FileOut(use with -m option)\n";
+ " FileIn: Source files (" << rFileType.getStr() << ")\n"
+ " FileOut: Destination file (*.*)\n"
+ " DataBase: Mergedata (*.po)\n"
+ " Lang: Restrict the handled language; one element of\n"
+ " (de, en-US, ...) or all\n"
+ " -b: Add UTF-8 Byte Order Mark to FileOut(use with -m option)\n";
}
void writePoEntry(
diff --git a/l10ntools/source/helpex.cxx b/l10ntools/source/helpex.cxx
index c45564de2e65..3188a6cb165a 100644
--- a/l10ntools/source/helpex.cxx
+++ b/l10ntools/source/helpex.cxx
@@ -37,14 +37,14 @@
void WriteUsage()
{
std::cout
- << " Syntax: Helpex -[m]i FileIn -o FileOut [-m DataBase] [-l Lang]\n"
- << " FileIn + i: Source file (*.xhp)\n"
- << " FileIn + -mi: File including paths of source files"
- << " (only for merge)\n"
- << " FileOut: Destination file (*.*) or files (in case of -mi)\n"
- << " DataBase: Mergedata (*.po)\n"
- << " Lang: Restrict the handled languages; one element of\n"
- << " (de, en-US, ...) or all\n";
+ << (" Syntax: Helpex -[m]i FileIn -o FileOut [-m DataBase] [-l Lang]\n"
+ " FileIn + i: Source file (*.xhp)\n"
+ " FileIn + -mi: File including paths of source files"
+ " (only for merge)\n"
+ " FileOut: Destination file (*.*) or files (in case of -mi)\n"
+ " DataBase: Mergedata (*.po)\n"
+ " Lang: Restrict the handled languages; one element of\n"
+ " (de, en-US, ...) or all\n");
}
SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) {
diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index 6f7dbdeacc5d..10b446caeb3c 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -134,8 +134,12 @@ void InitPoFile(
if (osl::FileBase::getFileURLFromSystemPath(outDir, outDirUrl)
!= osl::FileBase::E_None)
{
- cerr << "Error: Cannot convert pathname to URL in " << __FILE__ << ", in line " << __LINE__ << "\n"
- << " outDir: " << OUStringToOString(outDir, RTL_TEXTENCODING_ASCII_US).getStr() << "\n";
+ cerr
+ << ("Error: Cannot convert pathname to URL in " __FILE__
+ ", in line ")
+ << __LINE__ << "\n outDir: "
+ << OUStringToOString(outDir, RTL_TEXTENCODING_ASCII_US).getStr()
+ << "\n";
throw false; //TODO
}
osl::Directory::createPath(outDirUrl);
@@ -411,8 +415,12 @@ void handleDirectory(
if (osl::FileBase::getFileURLFromSystemPath(sPoPath, sPoUrl)
!= osl::FileBase::E_None)
{
- cerr << "Error: Cannot convert pathname to URL in " << __FILE__ << ", in line " << __LINE__ << "\n"
- << OUStringToOString(sPoPath, RTL_TEXTENCODING_UTF8).getStr() << "\n";
+ cerr
+ << ("Error: Cannot convert pathname to URL in " __FILE__
+ ", in line ")
+ << __LINE__ << "\n"
+ << OUStringToOString(sPoPath, RTL_TEXTENCODING_UTF8).getStr()
+ << "\n";
throw false; //TODO
}
osl::Directory::remove(sPoUrl);
@@ -435,8 +443,12 @@ void handleProjects(char * sSourceRoot, char const * sDestRoot)
if (osl::FileBase::getFileURLFromSystemPath(root16, rootUrl)
!= osl::FileBase::E_None)
{
- cerr << "Error: Cannot convert pathname to URL in " << __FILE__ << ", in line " << __LINE__ << "\n"
- << " root16: " << OUStringToOString(root16, RTL_TEXTENCODING_ASCII_US).getStr() << "\n";
+ cerr
+ << ("Error: Cannot convert pathname to URL in " __FILE__
+ ", in line ")
+ << __LINE__ << "\n root16: "
+ << OUStringToOString(root16, RTL_TEXTENCODING_ASCII_US).getStr()
+ << "\n";
throw false; //TODO
}
handleDirectory(rootUrl, 0, OString(), OString(sDestRoot));
diff --git a/l10ntools/source/pocheck.cxx b/l10ntools/source/pocheck.cxx
index 9990a69f0a6f..a1836caf0a7b 100644
--- a/l10ntools/source/pocheck.cxx
+++ b/l10ntools/source/pocheck.cxx
@@ -272,9 +272,11 @@ static void checkFunctionNames(const OString& aLanguage)
{
if( it->second > 1 )
{
- std::cout << "ERROR: Spreadsheet function name translations must be unique.\n" <<
- "Language: " << aLanguage <<
- "\nDuplicated translation is: " << it->first << "\n\n";
+ std::cout
+ << ("ERROR: Spreadsheet function name translations must be"
+ " unique.\nLanguage: ")
+ << aLanguage << "\nDuplicated translation is: " << it->first
+ << "\n\n";
}
}
@@ -377,12 +379,14 @@ static void checkVerticalBar(const OString& aLanguage)
if( !aPoEntry.isFuzzy() && aPoEntry.getMsgId().endsWith("|") &&
!aPoEntry.getMsgStr().isEmpty() && !aPoEntry.getMsgStr().endsWith("|") )
{
- std::cout << "ERROR: Missing '|' character at the end of translated string.\n" <<
- "It causes runtime error in installer.\n" <<
- "File: " << aPoPath << std::endl <<
- "Language: " << aLanguage << std::endl <<
- "English: " << aPoEntry.getMsgId() << std::endl <<
- "Localized: " << aPoEntry.getMsgStr() << std::endl << std::endl;
+ std::cout
+ << ("ERROR: Missing '|' character at the end of translated"
+ " string.\nIt causes runtime error in installer.\nFile: ")
+ << aPoPath << std::endl
+ << "Language: " << aLanguage << std::endl
+ << "English: " << aPoEntry.getMsgId() << std::endl
+ << "Localized: " << aPoEntry.getMsgStr() << std::endl
+ << std::endl;
bError = true;
}
else
@@ -425,11 +429,13 @@ static void checkMathSymbolNames(const OString& aLanguage)
if( !aPoEntry.isFuzzy() && aPoEntry.getGroupId() == "RID_UI_SYMBOL_NAMES" &&
!aPoEntry.getMsgStr().isEmpty() && (aPoEntry.getMsgStr().indexOf(" ") != -1) )
{
- std::cout << "ERROR: Math symbol names must not contain spaces.\n" <<
- "File: " << aPoPath << std::endl <<
- "Language: " << aLanguage << std::endl <<
- "English: " << aPoEntry.getMsgId() << std::endl <<
- "Localized: " << aPoEntry.getMsgStr() << std::endl << std::endl;
+ std::cout
+ << "ERROR: Math symbol names must not contain spaces.\nFile: "
+ << aPoPath << std::endl
+ << "Language: " << aLanguage << std::endl
+ << "English: " << aPoEntry.getMsgId() << std::endl
+ << "Localized: " << aPoEntry.getMsgStr() << std::endl
+ << std::endl;
bError = true;
}
else
diff --git a/l10ntools/source/propmerge.cxx b/l10ntools/source/propmerge.cxx
index 72070fbaaa19..a41cd154d4c3 100644
--- a/l10ntools/source/propmerge.cxx
+++ b/l10ntools/source/propmerge.cxx
@@ -175,8 +175,8 @@ void PropParser::Merge( const OString &rMergeSrc, const OString &rDestinationFil
if( vLanguages.size()>=1 && vLanguages[0] != m_sLang )
{
std::cerr
- << "Propex error: given language conflicts with "
- << "language of Mergedata file: "
+ << ("Propex error: given language conflicts with language of"
+ " Mergedata file: ")
<< m_sLang.getStr() << " - "
<< vLanguages[0].getStr() << std::endl;
delete pMergeDataFile;
diff --git a/l10ntools/source/treemerge.cxx b/l10ntools/source/treemerge.cxx
index f2e959fcbf28..3cc2b401d94e 100644
--- a/l10ntools/source/treemerge.cxx
+++ b/l10ntools/source/treemerge.cxx
@@ -262,8 +262,8 @@ void TreeParser::Merge(
if( vLanguages.size()>=1 && vLanguages[0] != m_sLang )
{
std::cerr
- << "Treex error: given language conflicts with "
- << "language of Mergedata file: "
+ << ("Treex error: given language conflicts with language of"
+ " Mergedata file: ")
<< m_sLang.getStr() << " - "
<< vLanguages[0].getStr() << std::endl;
delete pMergeDataFile;
diff --git a/l10ntools/source/treex.cxx b/l10ntools/source/treex.cxx
index 7c572309b2d4..dafc80bbba50 100644
--- a/l10ntools/source/treex.cxx
+++ b/l10ntools/source/treex.cxx
@@ -17,14 +17,14 @@
void WriteUsage()
{
std::cout
- << "Syntax: Treex [-r Root] -i FileIn -o FileOut"
- << " [-m DataBase] [-l Lang]\n"
- << " Root: Path to root of localized xhp files\n"
- << " FileIn: Source files (*.tree)\n"
- << " FileOut: Destination file (*.*)\n"
- << " DataBase: Mergedata (*.po)\n"
- << " Lang: Restrict the handled languages; one element of\n"
- << " (de, en-US, ...) or all\n";
+ << ("Syntax: Treex [-r Root] -i FileIn -o FileOut"
+ " [-m DataBase] [-l Lang]\n"
+ " Root: Path to root of localized xhp files\n"
+ " FileIn: Source files (*.tree)\n"
+ " FileOut: Destination file (*.*)\n"
+ " DataBase: Mergedata (*.po)\n"
+ " Lang: Restrict the handled languages; one element of\n"
+ " (de, en-US, ...) or all\n");
}
diff --git a/l10ntools/source/uimerge.cxx b/l10ntools/source/uimerge.cxx
index 9610687030a7..5954ab17c8d3 100644
--- a/l10ntools/source/uimerge.cxx
+++ b/l10ntools/source/uimerge.cxx
@@ -113,9 +113,8 @@ namespace
if (sOut.isEmpty())
continue;
- aDestination << " <e "
- << "g=\"" << aI->second->sGID.getStr() << "\" "
- << "i=\"" << aI->second->sLID.getStr() << "\">"
+ aDestination << " <e g=\"" << aI->second->sGID.getStr() << "\" i=\""
+ << aI->second->sLID.getStr() << "\">"
<< helper::QuotHTML(sOut).getStr() << "</e>\n";
}