Re: [Libreoffice] comments translated in writer\sw\source\core\edit\edfmt.cxx
On Mon, 27 Dec 2010 10:49:19 -0800, TentleXS wrote: Hallo @all, my name is Pascal and I would like to contribute the following translated code comments in "writer\sw\source\core\edit\edfmt.cxx". My native language is german so I hope it's OK that I did the translation. Do you take requests? :-) I've been trying to work with these files, but I can't get the sense out of them. I'm putting my hope on the comments which are currently in German. sw/source/core/crsr/callnk.cxx sw/source/core/crsr/viscrs.cxx I am learning the workflow for contributing, so please excuse me if I did something wrong. I am glad if you decide to point me to resources where I can read up on how to contribute more effectively. I am not sure if I should mention that this code and its comments is contributed under LGPLv3+ / MPL ... because I just changed the comments ... but of course it is. (It's just for new code/code-changes, right?) Also, I would send it as a git patch so the committer can keep your authorship information. Otherwise, if someone picks your diff up he will need to apply your diff and create the commit himself and your authorship information gets lost. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] comments translated in writer\sw\source\core\edit\edfmt.cxx
Am 27.12.2010 20:12, schrieb Octavio Alvarez: On Mon, 27 Dec 2010 10:49:19 -0800, TentleXS wrote: Hallo @all, my name is Pascal and I would like to contribute the following translated code comments in "writer\sw\source\core\edit\edfmt.cxx". My native language is german so I hope it's OK that I did the translation. Do you take requests? :-) I've been trying to work with these files, but I can't get the sense out of them. I'm putting my hope on the comments which are currently in German. sw/source/core/crsr/callnk.cxx sw/source/core/crsr/viscrs.cxx I am learning the workflow for contributing, so please excuse me if I did something wrong. I am glad if you decide to point me to resources where I can read up on how to contribute more effectively. I am not sure if I should mention that this code and its comments is contributed under LGPLv3+ / MPL ... because I just changed the comments ... but of course it is. (It's just for new code/code-changes, right?) Also, I would send it as a git patch so the committer can keep your authorship information. Otherwise, if someone picks your diff up he will need to apply your diff and create the commit himself and your authorship information gets lost. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice Thanks for the pointing out to send a patch file. I do not know right now how to do that. It would be ok if my authorship information gets lost - for now :). Here you have a diff for "sw/source/core/crsr/callnk.cxx". I will work on "sw/source/core/crsr/viscrs.cxx" next. diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx index ea998fe..4dd5930 100644 --- a/sw/source/core/crsr/callnk.cxx +++ b/sw/source/core/crsr/callnk.cxx @@ -64,7 +64,7 @@ SwCallLink::SwCallLink( SwCrsrShell & rSh, ULONG nAktNode, xub_StrLen nAktCntnt, SwCallLink::SwCallLink( SwCrsrShell & rSh ) : rShell( rSh ) { -// SPoint-Werte vom aktuellen Cursor merken +// remember SPoint-values of current cursor SwPaM* pCrsr = rShell.IsTableMode() ? rShell.GetTblCrs() : rShell.GetCrsr(); SwNode& rNd = pCrsr->GetPoint()->nNode.GetNode(); nNode = rNd.GetIndex(); @@ -79,10 +79,11 @@ SwCallLink::SwCallLink( SwCrsrShell & rSh ) { nLeftFrmPos = 0; -// eine Sonderbehandlung fuer die SwFeShell: diese setzt beim Loeschen -// der Kopf-/Fusszeile, Fussnoten den Cursor auf NULL (Node + Content) -// steht der Cursor auf keinem CntntNode, wird sich das im NdType -// gespeichert. +// A special treatment for SwFeShell: +// When deleting the header/footer, footnotes SwFeShell sets the +// Cursor to NULL (Node + Content). +// If the Cursor is not on a CntntNode (ContentNode) this fact gets +// saved in NdType. if( ND_CONTENTNODE & nNdTyp ) nNdTyp = 0; } @@ -91,11 +92,11 @@ SwCallLink::SwCallLink( SwCrsrShell & rSh ) SwCallLink::~SwCallLink() { -if( !nNdTyp || !rShell.bCallChgLnk )// siehe ctor +if( !nNdTyp || !rShell.bCallChgLnk )// see ctor return ; -// wird ueber Nodes getravellt, Formate ueberpruefen und im neuen -// Node wieder anmelden +// If travelling over Nodes check formats and register them anew at the +// new Node. SwPaM* pCurCrsr = rShell.IsTableMode() ? rShell.GetTblCrs() : rShell.GetCrsr(); SwCntntNode * pCNd = pCurCrsr->GetCntntNode(); if( !pCNd ) @@ -150,17 +151,16 @@ SwCallLink::~SwCallLink() USHORT nNdWhich = pCNd->GetNodeType(); ULONG nAktNode = pCurCrsr->GetPoint()->nNode.GetIndex(); -// melde die Shell beim akt. Node als abhaengig an, dadurch koennen -// alle Attribut-Aenderungen ueber den Link weiter gemeldet werden. +// Register the Shell as dependent at the current Node. By doing this all +// attribute changes can be signaled over the link. pCNd->Add( &rShell ); if( nNdTyp != nNdWhich || nNode != nAktNode ) { -/* immer, wenn zwischen Nodes gesprungen wird, kann es - * vorkommen, das neue Attribute gelten; die Text-Attribute. - * Es muesste also festgestellt werden, welche Attribute - * jetzt gelten; das kann auch gleich der Handler machen - */ +// Every time a switch between nodes occurs, there is a chance that +// new attributes do apply - meaning text-attributes. +// So the currently applying attributes would have to be determined. +// That can be done in one go by the handler. rShell.CallChgLnk(); } else if( !bHasSelection != !(*pCurCrsr->GetPoint() != *pCurCrsr->GetMark()) ) @@ -171,14 +171,14 @@ SwCallLink::~SwCallLink() else if( rShell.aChgLnk.IsSet() && ND_TEXTNODE == nNdWhich && nCntnt != nAktCntnt ) { -// nur wenn mit Left/right getravellt, dann Text-Hints pruefen
Re: [Libreoffice] comments translated in writer\sw\source\core\edit\edfmt.cxx
Am 27.12.2010 20:12, schrieb Octavio Alvarez: On Mon, 27 Dec 2010 10:49:19 -0800, TentleXS wrote: Hallo @all, my name is Pascal and I would like to contribute the following translated code comments in "writer\sw\source\core\edit\edfmt.cxx". My native language is german so I hope it's OK that I did the translation. Do you take requests? :-) I've been trying to work with these files, but I can't get the sense out of them. I'm putting my hope on the comments which are currently in German. sw/source/core/crsr/callnk.cxx sw/source/core/crsr/viscrs.cxx I am learning the workflow for contributing, so please excuse me if I did something wrong. I am glad if you decide to point me to resources where I can read up on how to contribute more effectively. I am not sure if I should mention that this code and its comments is contributed under LGPLv3+ / MPL ... because I just changed the comments ... but of course it is. (It's just for new code/code-changes, right?) Also, I would send it as a git patch so the committer can keep your authorship information. Otherwise, if someone picks your diff up he will need to apply your diff and create the commit himself and your authorship information gets lost. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice I hope I did this right. This should be a patch file for writer/sw/source/core/edit/edfmt.cxx writer/sw/source/core/crsr/callnk.cxx Do I have to name the file differently? >From acd6bac4a5b590deea3017fb675e449810cf7f4c Mon Sep 17 00:00:00 2001 From: Pascal Ullrich Date: Tue, 28 Dec 2010 12:09:53 +0100 Subject: [PATCH] German comments translated to English. --- sw/source/core/crsr/callnk.cxx | 52 +++ sw/source/core/edit/edfmt.cxx |8 +++--- 2 files changed, 29 insertions(+), 31 deletions(-) diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx index ea998fe..4dd5930 100644 --- a/sw/source/core/crsr/callnk.cxx +++ b/sw/source/core/crsr/callnk.cxx @@ -64,7 +64,7 @@ SwCallLink::SwCallLink( SwCrsrShell & rSh, ULONG nAktNode, xub_StrLen nAktCntnt, SwCallLink::SwCallLink( SwCrsrShell & rSh ) : rShell( rSh ) { -// SPoint-Werte vom aktuellen Cursor merken +// remember SPoint-values of current cursor SwPaM* pCrsr = rShell.IsTableMode() ? rShell.GetTblCrs() : rShell.GetCrsr(); SwNode& rNd = pCrsr->GetPoint()->nNode.GetNode(); nNode = rNd.GetIndex(); @@ -79,10 +79,11 @@ SwCallLink::SwCallLink( SwCrsrShell & rSh ) { nLeftFrmPos = 0; -// eine Sonderbehandlung fuer die SwFeShell: diese setzt beim Loeschen -// der Kopf-/Fusszeile, Fussnoten den Cursor auf NULL (Node + Content) -// steht der Cursor auf keinem CntntNode, wird sich das im NdType -// gespeichert. +// A special treatment for SwFeShell: +// When deleting the header/footer, footnotes SwFeShell sets the +// Cursor to NULL (Node + Content). +// If the Cursor is not on a CntntNode (ContentNode) this fact gets +// saved in NdType. if( ND_CONTENTNODE & nNdTyp ) nNdTyp = 0; } @@ -91,11 +92,11 @@ SwCallLink::SwCallLink( SwCrsrShell & rSh ) SwCallLink::~SwCallLink() { -if( !nNdTyp || !rShell.bCallChgLnk ) // siehe ctor +if( !nNdTyp || !rShell.bCallChgLnk ) // see ctor return ; -// wird ueber Nodes getravellt, Formate ueberpruefen und im neuen -// Node wieder anmelden +// If travelling over Nodes check formats and register them anew at the +// new Node. SwPaM* pCurCrsr = rShell.IsTableMode() ? rShell.GetTblCrs() : rShell.GetCrsr(); SwCntntNode * pCNd = pCurCrsr->GetCntntNode(); if( !pCNd ) @@ -150,17 +151,16 @@ SwCallLink::~SwCallLink() USHORT nNdWhich = pCNd->GetNodeType(); ULONG nAktNode = pCurCrsr->GetPoint()->nNode.GetIndex(); -// melde die Shell beim akt. Node als abhaengig an, dadurch koennen -// alle Attribut-Aenderungen ueber den Link weiter gemeldet werden. +// Register the Shell as dependent at the current Node. By doing this all +// attribute changes can be signaled over the link. pCNd->Add( &rShell ); if( nNdTyp != nNdWhich || nNode != nAktNode ) { -/* immer, wenn zwischen Nodes gesprungen wird, kann es - * vorkommen, das neue Attribute gelten; die Text-Attribute. - * Es muesste also festgestellt werden, welche Attribute - * jetzt gelten; das kann auch gleich der Handler machen - */ +// Every time a switch between nodes occurs, there is a chance that +// new attributes do apply - meaning text-attributes. +// So the currently applying attributes would have to be determined. +// That can be done in one go by the handler. rShell.CallChgLnk(); } else if( !bHasSelection != !(*pCu
Re: [Libreoffice] comments translated in writer\sw\source\core\edit\edfmt.cxx
On Tue, 28 Dec 2010 03:25:43 -0800, TentleXS wrote: Am 27.12.2010 20:12, schrieb Octavio Alvarez: On Mon, 27 Dec 2010 10:49:19 -0800, TentleXS wrote: Hallo @all, I hope I did this right. This should be a patch file for writer/sw/source/core/edit/edfmt.cxx writer/sw/source/core/crsr/callnk.cxx Do I have to name the file differently? No, it looks ok. Now we have to wait for some of the core developers to review it and pick it up. Also, if you are interested, there is an IRC channel at the Freenode network: #libreoffice. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] comments translated in writer\sw\source\core\edit\edfmt.cxx
Am 28.12.2010 22:14, schrieb Octavio Alvarez: On Tue, 28 Dec 2010 03:25:43 -0800, TentleXS wrote: Am 27.12.2010 20:12, schrieb Octavio Alvarez: On Mon, 27 Dec 2010 10:49:19 -0800, TentleXS wrote: Hallo @all, I hope I did this right. This should be a patch file for writer/sw/source/core/edit/edfmt.cxx writer/sw/source/core/crsr/callnk.cxx Do I have to name the file differently? No, it looks ok. Now we have to wait for some of the core developers to review it and pick it up. Also, if you are interested, there is an IRC channel at the Freenode network: #libreoffice. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice Here is a follow up patch for sw/source/core/crsr/viscrs.cxx >From 74d1b93396d1d931123e61498e139e96a6f22aca Mon Sep 17 00:00:00 2001 From: Pascal Ullrich Date: Wed, 29 Dec 2010 01:40:13 +0100 Subject: [PATCH] German comments translated to English. Corrected some typos. --- sw/source/core/crsr/viscrs.cxx | 77 --- 1 files changed, 39 insertions(+), 38 deletions(-) diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index 0592c1f..01413a2 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -47,13 +47,13 @@ #include #include #include -#include// SwTxtFrm +#include // SwTxtFrm #include #include #include #include -#include // GetSearchDialog -#include // ResId fuer Abfrage wenn zu Search & Replaces +#include // GetSearchDialog +#include // ResId for query when (switching to?) Search & Replace #include #include @@ -62,9 +62,9 @@ extern void SwCalcPixStatics( OutputDevice *pOut ); -//Damit beim ShowCrsr nicht immer wieder die gleiche Size teuer ermittelt -//werden muss, hier statische Member, die beim Wechsel des MapModes -// angepasst werden +// Here static members are defined. They will get changed on alteration of the +// MapMode. This is done so that on ShowCrsr the same size does not have to be +// expensively determined again and again. long SwSelPaintRects::nPixPtX = 0; long SwSelPaintRects::nPixPtY = 0; @@ -216,7 +216,7 @@ void ShowRedlines( const SwCrsrShell* pSh, int nAction, const SwRect* pRect = 0 } #endif -// Ab hier Klassen / Methoden fuer den nicht Text-Cursor -- +// - Starting from here: classes / methods for the non-text-cursor - SwVisCrsr::SwVisCrsr( const SwCrsrShell * pCShell ) : pCrsrShell( pCShell ) @@ -228,7 +228,7 @@ SwVisCrsr::SwVisCrsr( const SwCrsrShell * pCShell ) #ifdef SW_CRSR_TIMER bTimerOn = TRUE; -SetTimeout( 50 ); // 50msec Verzoegerung +SetTimeout( 50 ); // 50 millisecond delay #endif } @@ -238,7 +238,7 @@ SwVisCrsr::~SwVisCrsr() { #ifdef SW_CRSR_TIMER if( bTimerOn ) -Stop();// Timer stoppen +Stop(); // stop timer #endif if( bIsVisible && aTxtCrsr.IsVisible() ) @@ -256,16 +256,16 @@ void SwVisCrsr::Show() { bIsVisible = TRUE; -// muss ueberhaupt angezeigt werden ? +// display at all? if( pCrsrShell->VisArea().IsOver( pCrsrShell->aCharRect ) ) #ifdef SW_CRSR_TIMER { if( bTimerOn ) -Start();// Timer aufsetzen +Start();// start timer else { if( IsActive() ) -Stop(); // Timer Stoppen +Stop(); // stop timer _SetPosAndShow(); } @@ -286,10 +286,10 @@ void SwVisCrsr::Hide() #ifdef SW_CRSR_TIMER if( IsActive() ) -Stop(); // Timer Stoppen +Stop(); // stop timer #endif -if( aTxtCrsr.IsVisible() ) // sollten die Flags nicht gueltig sein? +if( aTxtCrsr.IsVisible() ) // Shouldn't the flags be in effect? aTxtCrsr.Hide(); } } @@ -301,7 +301,7 @@ void SwVisCrsr::Timeout() OSL_ENSURE( !bIsDragCrsr, "Timer vorher abschalten" ); if( bIsVisible ) { -if ( !pCrsrShell->GetWin() ) //SwFrmFmt::GetGraphic setzt das Win temp aus! +if ( !pCrsrShell->GetWin() ) // SwFrmFmt::GetGraphic suspends Win temporarily! Start(); else _SetPosAndShow(); @@ -319,7 +319,7 @@ BOOL SwVisCrsr::ChgTimerFlag( BOOL bFlag ) bOld = bTimerOn; if( !bFlag && bIsVisible && IsActive() ) { -Stop();// Timer Stoppen +Stop(); // stop timer _SetPosAndShow(); } bTimerOn = bFlag; @@ -502,9 +502,9 @@ void SwSelPaintRects::Show() if(pTargetOverlay) { -// #i97672# get the system's hilight color and limit it to the maximum -// allowed luminance.
Re: [Libreoffice] comments translated in writer\sw\source\core\edit\edfmt.cxx
On Mon, Dec 27, 2010 at 12:49 PM, TentleXS wrote: > Hallo @all, > my name is Pascal and I would like to contribute the following > translated code comments in "writer\sw\source\core\edit\edfmt.cxx". My > native language is german so I hope it's OK that I did the translation. Hi Pascal, Welcome to LibreOffice dev. A translation by a native german speaker is mst welcome. > > I am learning the workflow for contributing, so please excuse me if I > did something wrong. You did it right. to make it perfect you could do this: http://wiki.documentfoundation.org/Development#Preparing_patches The reason for this is that git format-patch contain all the authorship information as you want them to be. It is also nice to suffix the patch file name with the repository name, so it is a no-brainer for the commiter to know on which repo this patch apply (for instance sw is in the 'writer' repo, so the patch filename should look something like 0001-xxx.writer.patch) > I am glad if you decide to point me to resources > where I can read up on how to contribute more effectively. I am not sure > if I should mention that this code and its comments is contributed under > LGPLv3+ / MPL ... because I just changed the comments ... but of course > it is. (It 's just for new code/code-changes, right?) > > A little bit about me: > I am a software developer working with Microsoft Dynamics NAV and > C#/.NET for almost nine years now. My condolences. > I do understand C/C++ and have done > some small projects some years ago using these languages, but I feel > that I have to warm up to using them again :). This is my first > contribution to a libre software project and I hope it will not be the > last one. I know that I have much to learn and I am excited to do so. we all have much to learn... that's a big part of the fun :-) > > It would be great to receive at least a reply like: "This was OK." or > "You should just have attached the file." or something like that. :) If you would please send the name under which to commit your submission ? I could use 'Pascal ', but I'd rather be sure that is what you really want (can't change it after the fact) Norbert > > Here is the diff (also to be found in the attached file): > > > diff --git a/sw/source/core/edit/edfmt.cxx b/sw/source/core/edit/edfmt.cxx > index 016fa4d..1ec3814 100644 > --- a/sw/source/core/edit/edfmt.cxx > +++ b/sw/source/core/edit/edfmt.cxx > @@ -39,7 +39,7 @@ > #include > #include > #include > -#include "ndtxt.hxx" // Fuer GetXXXFmt > +#include "ndtxt.hxx" // for GetXXXFmt > #include "hints.hxx" > > /* > @@ -93,7 +93,7 @@ void SwEditShell::FillByEx(SwCharFmt* pCharFmt, BOOL > bReset) > { > const SwPosition* pPtPos = pPam->GetPoint(); > const SwPosition* pMkPos = pPam->GetMark(); > - if( pPtPos->nNode == pMkPos->nNode ) // im selben Node ? > + if( pPtPos->nNode == pMkPos->nNode ) // in the same > node? > { > nStt = pPtPos->nContent.GetIndex(); > if( nStt < pMkPos->nContent.GetIndex() ) > @@ -155,7 +155,7 @@ SwCharFmt* SwEditShell::MakeCharFmt( const String& > rName, > } > > //-- > -// inlines im Product > +// inlines in product > > > SwTxtFmtColl* SwEditShell::GetTxtCollFromPool( USHORT nId ) > @@ -164,7 +164,7 @@ SwTxtFmtColl* SwEditShell::GetTxtCollFromPool( USHORT > nId ) > } > > > - // return das geforderte automatische Format - Basis-Klasse ! > + // return the demanded automatic format - base-class ! > SwFmt* SwEditShell::GetFmtFromPool( USHORT nId ) > { > return GetDoc()->GetFmtFromPool( nId ); > > > ___ > LibreOffice mailing list > LibreOffice@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/libreoffice > > ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] comments translated in writer\sw\source\core\edit\edfmt.cxx
On Tue, Dec 28, 2010 at 5:25 AM, TentleXS wrote: > Am 27.12.2010 20:12, schrieb Octavio Alvarez: >> >> On Mon, 27 Dec 2010 10:49:19 -0800, TentleXS wrote: >> >>> Hallo @all, >>> my name is Pascal and I would like to contribute the following >>> translated code comments in "writer\sw\source\core\edit\edfmt.cxx". My >>> native language is german so I hope it's OK that I did the translation. >> >> Do you take requests? :-) I've been trying to work with these files, but >> I can't get the sense out of them. I'm putting my hope on the comments >> which are currently in German. >> >> sw/source/core/crsr/callnk.cxx >> sw/source/core/crsr/viscrs.cxx >> >>> I am learning the workflow for contributing, so please excuse me if I >>> did something wrong. I am glad if you decide to point me to resources >>> where I can read up on how to contribute more effectively. I am not sure >>> if I should mention that this code and its comments is contributed under >>> LGPLv3+ / MPL ... because I just changed the comments ... but of course >>> it is. (It's just for new code/code-changes, right?) >> >> Also, I would send it as a git patch so the committer can keep your >> authorship information. Otherwise, if someone picks your diff up he will >> need to apply your diff and create the commit himself and your >> authorship information gets lost. >> ___ >> LibreOffice mailing list >> LibreOffice@lists.freedesktop.org >> http://lists.freedesktop.org/mailman/listinfo/libreoffice >> > > I hope I did this right. > This should be a patch file for > writer/sw/source/core/edit/edfmt.cxx > writer/sw/source/core/crsr/callnk.cxx you can combine change to multiple sources files together, as long as they belong to the same git repository. > > Do I have to name the file differently? If you use git format-patch the default name will be based on the commit message, which hopefully will be distinctive enough if not, make sure that the title in your mailing list post in new and differents from previous patch submission that will help us not to miss any. When a patch is pushed to the git repo, we typically send a reply to the ML with [Pushed] added to the title. Using the same title for two or more patch submission, increase the chance that a patch being accidentally dropped. Norbert > > ___ > LibreOffice mailing list > LibreOffice@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/libreoffice > > ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice