You are viewing a plain text version of this content. The canonical link for it is here.
Posted to l10n@openoffice.apache.org by Tal Daniel <ta...@gmail.com> on 2014/05/26 11:54:58 UTC

Massive Find & Replace a Pootle Translation?

I've started to look into the Help in Hebrew, and I need help to make
massive Find & Replace in the Hebrew Help translation. Is it possible to
download it, make a batch/bash script and upload it again? Are there any
consequences (e.g. strings will be converted to suggestions, after
uploaded?)

The last post about it in L10N was from 2013, and wasn't answered.
The Pootle mailing list says it IS POSSIBLE, by downloading the PO files,
changing, and merging them back into SVN (see
https://www.mail-archive.com/translate-pootle@lists.sourceforge.net/msg02282.html
)

As for the Hebrew Help problem, in more detail:
It seems many of the strings are left as-is, in English, but an even worse
problem is that many strings are messed up. Ariel reported that EMPH and
BOOKMARK tags show with error, In Pootle too.

I've found there are 999+ strings with broken BOOKMARK_VALUE tags:
https://translate.apache.org/he/aoo40help/translate/helpcontent2/source/#search=bookmark_value&sfields=source,target
and over 999+ strings with escaped EMPH tags:
https://translate.apache.org/he/aoo40help/translate/helpcontent2/source/#search=%5C%5C%3Cemph%5C%5C%3E&sfields=target

Thanks for any help,
Tal

---------- Forwarded message ----------
From: Ariel Constenla-Haile <ar...@apache.org>
Date: Sat, May 24, 2014 at 12:29 AM
Subject: Re: OO, Hebrew Help
To: Tal Daniel <ta...@gmail.com>

[...] unzip the *.jar files in the help that comes with OpenOffice in
Hebrew [...]

\&lt;bookmark - 4007 matches
\&lt;emph     - 5355 matches

As you see, it does not make sense to try to fix them on Pootle; on the
other hand, the help seems to be almost 50% translated, so it would be
nice not to lose all that work.

May be it's possible to generate a translation memory from the current
translation, then import a clean version without the errors; [...]

Regards
--
Ariel Constenla-Haile
La Plata, Argentina

Re: Massive Find & Replace a Pootle Translation?

Posted by Yaron Shahrabani <sh...@gmail.com>.
On Mon, May 26, 2014 at 5:20 PM, Tal Daniel <ta...@gmail.com> wrote:

> On Mon, May 26, Yaron Shahrabani wrote:
>
> > Hi Tal!
> > You can download the file, make the required replacements and upload
> back.
> >
> Thanks, it works! That was simple :)
> I'll try to make batch changes to a small PO file, and upload it, in order
> to verify the process works smoothly.
>
> If unsure about the replacements you can always use the search confirmation
> > method in VIM.
> >
> I usually don't work with the vim tool, but I'll contact you, if I need
> further help.
>
There are plenty of tools you can use but if you need Regex and
confirmation it will get the job done quite easily.

If you want to be a little more risky you can try a combination of grep,
find, sed etc., not sure about confirmation but they are very good for
massive string replacement.

Kind regards,
Yaron.


>
> Thanks,
> Tal
>

Re: Massive Find & Replace a Pootle Translation?

Posted by Yaron Shahrabani <sh...@gmail.com>.
Great, glad that worked out for you, see ya ☺

Yaron Shahrabani

<Hebrew translator>



On Mon, May 26, 2014 at 11:38 PM, Tal Daniel <ta...@gmail.com> wrote:

> On Mon, May 26, Ariel Constenla-Haile wrote:
> >
> > > On Mon, May 26, Yaron Shahrabani wrote:
> > > > Hi Tal!  You can download the file, make the required replacements
> > > > and upload back.
> > > >
> > > Thanks, it works! That was simple :) I'll try to make batch changes to
> > > a small PO file, and upload it, in order to verify the process works
> > > smoothly.
> >
>
> Update: I've uploaded all Hebrew PO files back into Pootle, after replacing
> "\\<" into "<" and "\\>" into ">" (~21,400 occurrences of each). I used
> overwriting mode, after a single .po file successfully uploaded using the
> merge/suggestion mode that Ariel probably referred to.
>
> Verified that I don't see any \\<bookmark... nor \\<emph in Pootle, and
> other strings look normal. I hope that fixes this issue.
>
> On Windows you can try Notepad++, it supports search & replace in
> > multiple file with PCRE
> > http://notepad-plus-plus.org/features/
> >
>
> Thanks for your recommendations, Ariel, Yaron, I've tried Eclipse, and it
> did the work, too :)
>

Re: Massive Find & Replace a Pootle Translation?

Posted by Tal Daniel <ta...@gmail.com>.
On Mon, May 26, Ariel Constenla-Haile wrote:
>
> > On Mon, May 26, Yaron Shahrabani wrote:
> > > Hi Tal!  You can download the file, make the required replacements
> > > and upload back.
> > >
> > Thanks, it works! That was simple :) I'll try to make batch changes to
> > a small PO file, and upload it, in order to verify the process works
> > smoothly.
>

Update: I've uploaded all Hebrew PO files back into Pootle, after replacing
"\\<" into "<" and "\\>" into ">" (~21,400 occurrences of each). I used
overwriting mode, after a single .po file successfully uploaded using the
merge/suggestion mode that Ariel probably referred to.

Verified that I don't see any \\<bookmark... nor \\<emph in Pootle, and
other strings look normal. I hope that fixes this issue.

On Windows you can try Notepad++, it supports search & replace in
> multiple file with PCRE
> http://notepad-plus-plus.org/features/
>

Thanks for your recommendations, Ariel, Yaron, I've tried Eclipse, and it
did the work, too :)

Re: Massive Find & Replace a Pootle Translation?

Posted by Ariel Constenla-Haile <ar...@apache.org>.
Hi Tal,

On Mon, May 26, 2014 at 05:20:47PM +0300, Tal Daniel wrote:
> On Mon, May 26, Yaron Shahrabani wrote:
> 
> > Hi Tal!  You can download the file, make the required replacements
> > and upload back.
> >
> Thanks, it works! That was simple :) I'll try to make batch changes to
> a small PO file, and upload it, in order to verify the process works
> smoothly.
> 
> If unsure about the replacements you can always use the search
> confirmation
> > method in VIM.
> >
> I usually don't work with the vim tool, but I'll contact you, if
> I need further help.

On Windows you can try Notepad++, it supports search & replace in
multiple file with PCRE
http://notepad-plus-plus.org/features/


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

Re: Massive Find & Replace a Pootle Translation?

Posted by Tal Daniel <ta...@gmail.com>.
On Mon, May 26, Yaron Shahrabani wrote:

> Hi Tal!
> You can download the file, make the required replacements and upload back.
>
Thanks, it works! That was simple :)
I'll try to make batch changes to a small PO file, and upload it, in order
to verify the process works smoothly.

If unsure about the replacements you can always use the search confirmation
> method in VIM.
>
I usually don't work with the vim tool, but I'll contact you, if I need
further help.

Thanks,
Tal

Re: Massive Find & Replace a Pootle Translation?

Posted by Yaron Shahrabani <sh...@gmail.com>.
Hi Tal!
You can download the file, make the required replacements and upload back.

If unsure about the replacements you can always use the search confirmation
method in VIM.

If you need any further help I'd love to assist.

Kind regards,

Yaron Shahrabani

<Hebrew translator>



On Mon, May 26, 2014 at 12:54 PM, Tal Daniel <ta...@gmail.com> wrote:

> I've started to look into the Help in Hebrew, and I need help to make
> massive Find & Replace in the Hebrew Help translation. Is it possible to
> download it, make a batch/bash script and upload it again? Are there any
> consequences (e.g. strings will be converted to suggestions, after
> uploaded?)
>
> The last post about it in L10N was from 2013, and wasn't answered.
> The Pootle mailing list says it IS POSSIBLE, by downloading the PO files,
> changing, and merging them back into SVN (see
>
> https://www.mail-archive.com/translate-pootle@lists.sourceforge.net/msg02282.html
> )
>
> As for the Hebrew Help problem, in more detail:
> It seems many of the strings are left as-is, in English, but an even worse
> problem is that many strings are messed up. Ariel reported that EMPH and
> BOOKMARK tags show with error, In Pootle too.
>
> I've found there are 999+ strings with broken BOOKMARK_VALUE tags:
>
> https://translate.apache.org/he/aoo40help/translate/helpcontent2/source/#search=bookmark_value&sfields=source,target
> and over 999+ strings with escaped EMPH tags:
>
> https://translate.apache.org/he/aoo40help/translate/helpcontent2/source/#search=%5C%5C%3Cemph%5C%5C%3E&sfields=target
>
> Thanks for any help,
> Tal
>
> ---------- Forwarded message ----------
> From: Ariel Constenla-Haile <ar...@apache.org>
> Date: Sat, May 24, 2014 at 12:29 AM
> Subject: Re: OO, Hebrew Help
> To: Tal Daniel <ta...@gmail.com>
>
> [...] unzip the *.jar files in the help that comes with OpenOffice in
> Hebrew [...]
>
> \&lt;bookmark - 4007 matches
> \&lt;emph     - 5355 matches
>
> As you see, it does not make sense to try to fix them on Pootle; on the
> other hand, the help seems to be almost 50% translated, so it would be
> nice not to lose all that work.
>
> May be it's possible to generate a translation memory from the current
> translation, then import a clean version without the errors; [...]
>
> Regards
> --
> Ariel Constenla-Haile
> La Plata, Argentina
>