esd-translators
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ESD-translators] state of the template manager -- kitchen


From: Stary, Tomas
Subject: Re: [ESD-translators] state of the template manager -- kitchen
Date: Sat, 2 Apr 2016 23:55:28 +0100

Hello Thérèse, all

(sorry for delay in my reply)

Thank you for the comments. I have added the options as you suggest
for the removal of scripts from the POT files and for the relaxation
of the 80% translation rule (points 1,2). 

I think that the points 3, 4 concern the original guide (English), and
I'm not sure how to include those.

I haven't have time to have a look to the gnun scripts yet (point
5). But I have copied your comment into the Makefile, so we can
address it when some new updates are done to the guide.

Regards,

Tomas

On Mon, Mar 28, 2016 at 09:02:57PM +0200, Thérèse Godefroy wrote:
> Hello Tomas, hello all,
> 
> Le 28/03/2016 05:47, Stary, Tomas a écrit :
> [...]
> > I have now started using the po4a and it works
> > very good for me. I think it should be the preferred way of working for
> > anyone who is starting a new translation from scratch. I can also see
> > benefits of the system for existing translation, but it is up to you
> > if you decide to migrate to this system. If yes, I have described the
> > process here.
> [...]
> 
> That's a very good summary.
> 
> gnu.org has a short but detailed howto for POedit [3]. We could probably
> adapt it to our workflow.
> 
> 
> > To make it more simple, I have prepared Makefile with all the required
> > commands for the creation of empty template POT files, extraction of
> > PO files with strings from an existing translation, and update of the
> > PO file for a new version. The generation of the translated HTML is
> > done by commands in Makefile.gen.
> 
> Beautiful!
> 
> Here are some variations that you might consider:
> 
> 1. In Makefile (po4a-gettextize):
> Disable extraction of <script> (assuming nobody will want to translate
> the javascript comments), enable extraction of <meta> content, + a few
> cosmetic things -- "porefs=none" disables the list of occurrences above
> each string; these lists may be useful at the beginning, but will become
> bothersome in the long run.
> 
> PO4A_FLAGS=-M utf-8 -f xhtml -o porefs=none \
>            -o 'untranslated=<script>' \
>            -o 'attributes=<meta>content' \
>            --package-name emailselfdefense --package-version $version
> 
> 2. In Makefile.gen, it may be useful to relax the default condition for
> actual regeneration of translated files (option "keep"). The default is
> 80%. It means you can't generate a translated page before 80% of the
> strings are translated. That's a little too high IMO. You may want to
> generate pages that are 30% translated (or even less) for proofreading.
> 
> PO4A_FLAGS=-M utf-8 -f xhtml --keep 30
> 
> 3. The language list shouldn't be translated, so we might as well
> replace it with a placeholder in the original. The real thing would be
> added and customized with the "current" class after the translated pages
> are generated (that goes for the English version as well).
> 
> 4. The html tag needs to be customized, at least for RTL languages.
> This could be done with sed, after regeneration. Alternatively,
> <!DOCTYPE>, <html>, <head> and a few untranslatable tags could be
> replaced with a placeholder:
>    <html><head> <!-- HTML header -->
> (the 2 tags are needed to keep po4a happy).
> 
> 5. The system could be further refined with 2 external scripts:
> 
> - gnun-add-fuzzy-diff (from the GNUN package [4]). Very useful to locate
> a change within a string. It runs after po4a-updatepo.
> 
> - some sort of reformatting script to get rid of the extra spaces, tabs,
> linefeeds, etc., to make sure that a spurious difference between
> index.html, mac.html and windows.html isn't going to add useless strings
> to an existing POT file, or make the POs fuzzy for no reason. There is
> such a script in the kitchen (reformat-html), but I am currently using a
> simpler one (reformat-original, attached).
> 
> Basically, the ingredients to build translated pages would be (1) the PO
> file, (2) English originals with placeholders, (3) language list, (4)
> header. The final processing could be done just before uploading to the
> live repo.
> 
> 
> > I have tried to put a lot of comments in the Makefiles, but perhaps
> > some bits might not be completely clear. I have found the manual
> > pages[2] of po4a quite helpful (especially the Graphical overview).
> 
> Your comments seem clear.
> 
> 
> Best,
> Thérèse
> 
> > [0] http://poedit.net
> > [1] https://www.emacswiki.org/emacs/PoMode
> > [2] dev.man-online.org/man7/po4a/
> > 
> [3] https://www.gnu.org/server/standards/translations/po-how-to.html
> [4] https://ftp.gnu.org/gnu/gnun/gnun-latest.tar.gz





reply via email to

[Prev in Thread] Current Thread [Next in Thread]