Bug 34196 - [PATCH] Translation of German comments in libs-core/editeng
Summary: [PATCH] Translation of German comments in libs-core/editeng
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-11 15:57 UTC by Albert Thuswaldner
Modified: 2011-02-16 14:21 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
patch containing translation of german comments in libs-core/editeng (929.77 KB, patch)
2011-02-11 15:57 UTC, Albert Thuswaldner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Albert Thuswaldner 2011-02-11 15:57:35 UTC
Created attachment 43275 [details]
patch containing translation of german comments in libs-core/editeng

I have now translated all German comments to English for all files in
the libs-core/editeng/ dir. I have generated the diff using the following command:

git diff -b origin/master > editeng-german-comments.diff

i.e. using the "-b" switch to avoid all those whitespace-only differences which
I managed to include in my previous diff-file. 

I've have also removed as many boilerplate comments I could find.

You can commit the patch under the terms of LGPL3+.

Cheers,

Albert Thuswaldner
Comment 1 Kohei Yoshida 2011-02-15 21:07:12 UTC
Thanks for your patch Albert.

(In reply to comment #0)

> You can commit the patch under the terms of LGPL3+.

Actually our preferred license is MPL 1.1 / GPLv3+ / LGPLv3+ triple license.  Can you confirm that we can commit your patch under these licenses?

Thanks!
Comment 2 Albert Thuswaldner 2011-02-16 00:37:07 UTC
(In reply to comment #1) 
> Can you confirm that we can commit your patch under these licenses?
> Thanks!

Yes, I hereby confirm that you can commit the patch under the terms of MPL 1.1 / GPLv3+ / LGPLv3+ triple license.

/Albert
Comment 3 Kohei Yoshida 2011-02-16 07:43:51 UTC
Thanks for the clarification.

BTW, probably by accident, but you've also removed some real code here and there.  Most are minor, but the following:

@@ -651,32 +645,15 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
     const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&) pNode->GetContentAttribs().GetItem( EE_PARA_SBL );
     const BOOL bScriptSpace = ((const SvxScriptSpaceItem&) pNode->GetContentAttribs().GetItem( EE_PARA_ASIANCJKSPACING )).GetValue();
 
-//     const sal_uInt16 nInvalidEnd = ( pParaPortion->GetInvalidDiff() > 0 )
-//             ? pParaPortion->GetInvalidPosStart() + pParaPortion->GetInvalidDiff()
-//             : pNode->Len();
-    const short nInvalidDiff = pParaPortion->GetInvalidDiff();
-    const sal_uInt16 nInvalidStart = pParaPortion->GetInvalidPosStart();
-    const sal_uInt16 nInvalidEnd =  nInvalidStart + Abs( nInvalidDiff );
-
-    sal_Bool bQuickFormat = sal_False;
-    if ( !bEmptyNodeWithPolygon && !HasScriptType( nPara, i18n::ScriptType::COMPLEX ) )
-    {
-        if ( ( pParaPortion->IsSimpleInvalid() ) && ( nInvalidDiff > 0 ) &&
-             ( pNode->Search( CH_FEATURE, nInvalidStart ) > nInvalidEnd ) )
-        {
-            bQuickFormat = sal_True;
-        }
-        else if ( ( pParaPortion->IsSimpleInvalid() ) && ( nInvalidDiff < 0 ) )
-        {
-            // pruefen, ob loeschen ueber Portiongrenzen erfolgte...
-            sal_uInt16 nStart = nInvalidStart; // DOPPELT !!!!!!!!!!!!!!!
-            sal_uInt16 nEnd = nStart - nInvalidDiff;  // neg.
+            // check if delete over the portion boundaries wss done ...
+            sal_uInt16 nStart = nInvalidStart; // DOUBLE !!!!!!!!!!!!!!!
+            sal_uInt16 nEnd = nStart - nInvalidDiff;  // negative
             bQuickFormat = sal_True;
             sal_uInt16 nPos = 0;
             sal_uInt16 nPortions = pParaPortion->GetTextPortions().Count();
             for ( sal_uInt16 nTP = 0; nTP < nPortions; nTP++ )
             {
-                // Es darf kein Start/Ende im geloeschten Bereich liegen.
+                // There must be no start / end are in the deleted area.
                 TextPortion* const pTP = pParaPortion->GetTextPortions()[ nTP ];
                 nPos = nPos + pTP->GetLen();
                 if ( ( nPos > nStart ) && ( nPos < nEnd ) )

are quite substantial. ;-)

Still reviewing...
Comment 4 Kohei Yoshida 2011-02-16 07:48:05 UTC
Hmm... There are a few more of this kind, in impedit3.cxx.
Comment 5 Albert Thuswaldner 2011-02-16 07:54:06 UTC
(In reply to comment #4)
> Hmm... There are a few more of this kind, in impedit3.cxx.

Oh, sorry for that.  Should have reviewed the patch myself more carfully before handing it over. I rememeber removing some longer sections of code which were w out-commented...

/Albert
Comment 6 Kohei Yoshida 2011-02-16 14:03:38 UTC
Ok.  I went through your whole patch, fixed all code errors I could find, committed it locally with success.  However, someone was also making a huge pile of changes in the same area at the same time so running git pull -r causes a whole lot of files in conflict....  So far I've spent a whole day, but I may have to do the rest tomorrow.

For future patch submissions, please submit in smaller chunks to make it easier for us to review, and send your patches to the mailing list.
Comment 7 Kohei Yoshida 2011-02-16 14:19:05 UTC
Finally pushed to master.....
Comment 8 Kohei Yoshida 2011-02-16 14:21:13 UTC
Also, it would be great to do the translation and code cleanups in separate commits, to make it easier for the reviewer to spot obvious accidental code change during translation.