l10ntools/inc/export.hxx | 6 -- l10ntools/source/export.cxx | 93 ++++++++++++++----------------------------- starmath/source/commands.src | 38 ++++++++--------- 3 files changed, 50 insertions(+), 87 deletions(-)
New commits: commit 9a319e930cf649346985e9e87e95945d447beae4 Author: Andras Timar <andras.ti...@collabora.com> Date: Mon Jan 6 10:57:16 2014 +0100 Typo fixes in Math tooltips Change-Id: I7623fd53dd60fdfd9afb99135b79adfb434aa72a diff --git a/starmath/source/commands.src b/starmath/source/commands.src index 950c582..a51eae2 100644 --- a/starmath/source/commands.src +++ b/starmath/source/commands.src @@ -48,7 +48,7 @@ String RID_NEGX_HELP String RID_XPLUSY { Text = "<?> + <?> " ; }; String RID_XPLUSY_HELP { - Text [ en-US ] = "Addition + " ; + Text [ en-US ] = "Addition +" ; }; String RID_XMINUSY { Text = "<?> - <?> " ; }; String RID_XMINUSY_HELP @@ -281,7 +281,7 @@ String RID_FACTX_HELP String RID_SQRTX { Text = "sqrt{<?>} " ; }; String RID_SQRTX_HELP { - Text [ en-US ] = "Square Root " ; + Text [ en-US ] = "Square Root" ; }; String RID_NROOTXY { Text = "nroot{<?>}{<?>} " ; }; String RID_NROOTXY_HELP @@ -336,7 +336,7 @@ String RID_ARCSINX_HELP String RID_ARCCOSX { Text = "arccos(<?>) " ; }; String RID_ARCCOSX_HELP { - Text [ en-US ] = "Arccosise" ; + Text [ en-US ] = "Arccosine" ; }; String RID_ARCTANX { Text = "arctan(<?>) " ; }; String RID_ARCTANX_HELP @@ -401,7 +401,7 @@ String RID_SUM_FROMX_HELP String RID_SUM_TOX { Text = "sum to{<?>} <?> " ; }; String RID_SUM_TOX_HELP { - Text [ en-US ] = "Sum SuperScript Top" ; + Text [ en-US ] = "Sum Superscript Top" ; }; String RID_SUM_FROMTOX { Text = "sum from{<?>} to{<?>} <?> " ; }; String RID_SUM_FROMTOX_HELP @@ -436,7 +436,7 @@ String RID_COPRODX_HELP String RID_COPROD_FROMX { Text = "coprod from{<?>} <?> " ; }; String RID_COPROD_FROMX_HELP { - Text [ en-US ] = "Coproduct " ; + Text [ en-US ] = "Coproduct Subscript Bottom" ; }; String RID_COPROD_TOX { Text = "coprod to{<?>} <?> " ; }; String RID_COPROD_TOX_HELP @@ -456,24 +456,24 @@ String RID_LIMX_HELP String RID_LIM_FROMX { Text = "lim from{<?>} <?> " ; }; String RID_LIM_FROMX_HELP { - Text [ en-US ] = "Lime Subscript Bottom" ; + Text [ en-US ] = "Limes Subscript Bottom" ; }; String RID_LIM_TOX { Text = "lim to{<?>} <?> " ; }; String RID_LIM_TOX_HELP { - Text [ en-US ] = "Lime Superscript Top" ; + Text [ en-US ] = "Limes Superscript Top" ; }; String RID_LIM_FROMTOX { Text = "lim from{<?>} to{<?>} <?> " ; }; String RID_LIM_FROMTOX_HELP { - Text [ en-US ] = "Lime Sup/Sub script" ; + Text [ en-US ] = "Limes Sup/Sub script" ; }; String RID_LIMINFX { Text = "liminf <?> " ; }; String RID_LIMSUPX { Text = "limsup <?> " ; }; String RID_EXISTS { Text = "exists " ; }; String RID_EXISTS_HELP { - Text [ en-US ] = "There exists" ; + Text [ en-US ] = "There Exists" ; }; String RID_NOTEXISTS { Text = "notexists " ; }; String RID_NOTEXISTS_HELP @@ -493,7 +493,7 @@ String RID_INTX_HELP String RID_INT_FROMX { Text = "int from{<?>} <?> " ; }; String RID_INT_FROMX_HELP { - Text [ en-US ] = "Integral Subscript Top" ; + Text [ en-US ] = "Integral Subscript Bottom" ; }; String RID_INT_TOX { Text = "int to{<?>} <?> " ; }; String RID_INT_TOX_HELP @@ -603,7 +603,7 @@ String RID_LLLINT_TOX_HELP String RID_LLLINT_FROMTOX { Text = "lllint from{<?>} to{<?>} <?> " ; }; String RID_LLLINT_FROMTOX_HELP { - Text [ en-US ] = "Trile Curve Integral Sup/Sub script" ; + Text [ en-US ] = "Triple Curve Integral Sup/Sub script" ; }; String RID_FROMX { Text = "from{<?>} <?> " ; }; String RID_TOX { Text = "to{<?>} <?> " ; }; @@ -646,7 +646,7 @@ String RID_DDOTX_HELP String RID_DDDOTX { Text = "dddot <?> " ; }; String RID_DDDOTX_HELP { - Text [ en-US ] = "Triple Dot " ; + Text [ en-US ] = "Triple Dot" ; }; String RID_GRAVEX { Text = "grave <?> " ; }; String RID_GRAVEX_HELP @@ -752,12 +752,12 @@ String RID_LRGROUPX_HELP String RID_LRPARENTX { Text = "(<?>) " ; }; String RID_LRPARENTX_HELP { - Text [ en-US ] = "Round Brackets (Scalable)" ; + Text [ en-US ] = "Round Brackets" ; }; String RID_LRBRACKETX { Text = "[<?>] " ; }; String RID_LRBRACKETX_HELP { - Text [ en-US ] = "Square Brackets (Scalable)" ; + Text [ en-US ] = "Square Brackets" ; }; String RID_LRDBRACKETX { Text = "ldbracket <?> rdbracket " ; }; String RID_LRDBRACKETX_HELP @@ -827,12 +827,12 @@ String RID_SLRANGLEX_HELP String RID_SLRCEILX { Text = "left lceil <?> right rceil " ; }; String RID_SLRCEILX_HELP { - Text [ en-US ] = "Minor ceil" ; + Text [ en-US ] = "Ceiling (Scalable)" ; }; String RID_SLRFLOORX { Text = "left lfloor <?> right rfloor " ; }; String RID_SLRFLOORX_HELP { - Text [ en-US ] = "Minor floor" ; + Text [ en-US ] = "Floor (Scalable)" ; }; String RID_SLRLINEX { Text = "left lline <?> right rline " ; }; String RID_SLRLINEX_HELP @@ -902,7 +902,7 @@ String RID_BLANK_HELP String RID_NEWLINE { Text = "newline " ; }; String RID_NEWLINE_HELP { - Text [ en-US ] = "New Line " ; + Text [ en-US ] = "New Line" ; }; String RID_BINOMXY { Text = "binom{<?>}{<?>} " ; }; String RID_BINOMXY_HELP @@ -1007,12 +1007,12 @@ String RID_XCIRCY_HELP String RID_XWIDESLASHY { Text = "{<?>} wideslash {<?>} " ; }; String RID_XWIDESLASHY_HELP { - Text [ en-US ] = "Division (wideslash) " ; + Text [ en-US ] = "Division (wideslash)" ; }; String RID_XWIDEBSLASHY { Text = "<?> widebslash <?> " ; }; String RID_XWIDEBSLASHY_HELP { - Text [ en-US ] = "Division (counter wideslash) " ; + Text [ en-US ] = "Division (counter wideslash)" ; }; String RID_XDIVIDESY { Text = "<?> divides <?> " ; }; String RID_XDIVIDESY_HELP commit 46d0619b547a0decb6dfa8836d1ad63c90ef2f9a Author: Zolnai Tamás <zolnaitamas2...@gmail.com> Date: Thu Dec 26 23:12:38 2013 +0100 Transex3: modify src list localization/merge part Avoid using numbers to identify the list items because using numbers can lead to mixed translations. Use the corresponding string instead. Remove a hacky solution for mixed translations. See: 95ea6cb21a7d7f4f163e642ba4b1e165a427a0d1 Change-Id: I6f1d48bf71fe2146f04f53c6b474dd7c0ce98678 diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx index 453ec51..d28df05 100644 --- a/l10ntools/inc/export.hxx +++ b/l10ntools/inc/export.hxx @@ -160,12 +160,6 @@ private: void CleanValue( OString &rValue ); OString GetText(const OString &rSource, int nToken); - /** - Get all MergeEntrys for the ExportList identified by pResData - Check whether list can merge and load all needed MergeEntry from DataBase. - */ - bool GetAllMergeEntrysOfList(ResData *pResData, std::vector<MergeEntrys*>& o_vMergeEntrys); - void ResData2Output( MergeEntrys *pEntry, sal_uInt16 nType, const OString& rTextType ); void MergeRest( ResData *pResData ); void ConvertMergeContent( OString &rText ); diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx index fd91eeb..5694edf 100644 --- a/l10ntools/source/export.cxx +++ b/l10ntools/source/export.cxx @@ -1007,55 +1007,6 @@ void Export::ConvertExportContent( OString& rText ) rText = helper::unEscapeAll(rText,"\\n""\\t""\\\\""\\\"","\n""\t""\\""\""); } -bool Export::GetAllMergeEntrysOfList(ResData *pResData, std::vector<MergeEntrys*>& o_vMergeEntrys ) -{ - o_vMergeEntrys.clear(); - - if (!pResData->sGId.isEmpty()) - pResData->sGId = pResData->sGId + OString('.'); - pResData->sGId = pResData->sGId + pResData->sId; - - pResData->sResTyp = lcl_GetListTyp( nList, false ); - - const sal_uInt16 nMaxIndex = pResData->m_aList.size(); - /** - * Check whether count of listentries match with count - * of translated items. If not than write origin items - * to the list to avoid mixed translations - * (exclude pairedlist) - */ - if( nList != LIST_PAIRED ) - { - MergeEntrys* pEntrys; - // MergeData contains longer list - pResData->sId = OString::number(nMaxIndex+1); - pEntrys = pMergeDataFile->GetMergeEntrys( pResData ); - if ( pEntrys ) - return false; - // MergeData contains shorter list - pResData->sId = OString::number(nMaxIndex); - pEntrys = pMergeDataFile->GetMergeEntrys( pResData ); - if ( !pEntrys ) - return false; - pResData->sId = "1"; - } - - for( sal_uInt16 nLIndex = 1; nLIndex <= nMaxIndex; ++nLIndex ) - { - // Set matching pairedlist identifier - if ( nList == LIST_PAIRED ) - { - pResData->sId = GetPairedListID ( pResData->m_aList[ ( nLIndex ) -1 ] ); - } - else - pResData->sId = OString::number(nLIndex); - - MergeEntrys* pEntrys = pMergeDataFile->GetMergeEntrys( pResData ); - o_vMergeEntrys.push_back(pEntrys); - } - return true; - } - void Export::ResData2Output( MergeEntrys *pEntry, sal_uInt16 nType, const OString& rTextType ) { sal_Bool bAddSemicolon = sal_False; @@ -1134,13 +1085,17 @@ void Export::MergeRest( ResData *pResData ) OString sOldGId = pResData->sGId; OString sOldTyp = pResData->sResTyp; + // Set pResData so we can find the corresponding string + if (!pResData->sGId.isEmpty()) + pResData->sGId = pResData->sGId + OString('.'); + pResData->sGId = pResData->sGId + pResData->sId; + + pResData->sResTyp = lcl_GetListTyp( nList, false ); + OString sSpace; for ( sal_uInt16 i = 1; i < nLevel-1; i++ ) sSpace += "\t"; - std::vector<MergeEntrys*> vMergeEntryVector; - bool bTranslateList = GetAllMergeEntrysOfList(pResData, vMergeEntryVector); - OString sCur; for( unsigned int n = 0; n < aLanguages.size(); n++ ) { @@ -1180,17 +1135,31 @@ void Export::MergeRest( ResData *pResData ) } } - if( bTranslateList && nLIndex < vMergeEntryVector.size() && vMergeEntryVector[nLIndex] ) + // Set matching identifier + if ( nList == LIST_PAIRED ) { - OString sText; - bool bText = vMergeEntryVector[nLIndex]->GetText( sText, STRING_TYP_TEXT, sCur, sal_True ); - if ( bText && !sText.isEmpty() ) - { - ConvertMergeContent( sText ); - OString sPre = sLine.copy( 0 , sLine.indexOf('"') ); - OString sPost = sLine.copy( sLine.lastIndexOf('"') + 1 ); - sLine = sPre + sText + sPost; - } + pResData->sId = GetPairedListID ( sLine ); + } + else + { + pResData->sId = + sLine.copy( + sLine.indexOf('"')+1, + sLine.lastIndexOf('"')-sLine.indexOf('"')-1); + ConvertExportContent( pResData->sId ); + } + + MergeEntrys* pEntrys = pMergeDataFile->GetMergeEntrys( pResData ); + OString sText; + bool bText = pEntrys ? pEntrys->GetText( sText, STRING_TYP_TEXT, sCur, sal_True ) : false; + + if( bText && !sText.isEmpty()) + { + ConvertMergeContent( sText ); + sLine = + sLine.copy( 0 , sLine.indexOf('"') ) + + sText + + sLine.copy( sLine.lastIndexOf('"') + 1 ); } OString sText1( "\t" );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits