From kde-francophone Tue Sep 30 22:51:07 2008 From: "Nicolas Ternisien" Date: Tue, 30 Sep 2008 22:51:07 +0000 To: kde-francophone Subject: Re: [kde-francophone] Fwd: A glossary solution Message-Id: X-MARC-Message: https://marc.info/?l=kde-francophone&m=122281510704638 Classe ! La conversion risque d'être un peu longue à effectuer, mais le jeu en vaut la chandelle. Une fois le fichier XML sorti, je pourrais faire un script PHP qui lira à chaud notre glossaire francophone et l'affichera en HTML (sans passer par l'étape de conversion en ligne de commande, longue, fatigante, et demandant un workspace fonctionnel ;-) Nicolas On Tue, Sep 30, 2008 at 10:14 PM, Sébastien Renard wrote: > > À propos de la réorg. de notre glossaire, voici justement un bel outil réalisé > par Chusslove Illitch (coordinateur de l'équipe Serbe et éminent auteur de > plus de 90% du code de Pology) qui semble pas mal du tout. > > http://caslav.gmxhome.de/writings/divergloss.html > > a+ > -- > Sébastien > > ---------- Message transmis ---------- > > Sujet : A glossary solution > Date : vendredi 26 septembre 2008 > De : Chusslove Illich > À : kde-i18n-doc@kde.org > CC : > > Some months ago I had an urge to finally start tracking the terminology we > use in translations in a well-defined and flexible manner. I looked up for > the available glossary formats, and didn't find any that I liked (especially > not the TBX). So I decided to create a new format, the Divergloss, and some > tools around it. I feel that by now it's ready as a workable solution for > other teams in similar need. > > Divergloss is an XML format, but I aimed to keep it easy to edit as plain > text (thus well amenable to version control), with advanced features being > out of the way when not needed. The format itself is informally described > here: > > http://caslav.gmxhome.de/writings/divergloss.html > > but with many details which may not be needed at first or at all, depending > on desired level of representation. Instead, have a look at the attached > example of a minimal, yet quite reasonable glossary in support of > translation activities. > > Now, formats by themselves, XML or otherwise, I feel not very practically > useful. Divergloss therefore comes bundled with a Python module and > processing scripts which work out of the box, no installation or compilation > required (similar to Pology). Just fetch its Git repository and set the > path: > > $ mkdir divergloss && cd divergloss > $ git clone http://git.gitorious.org/divergloss/mainline.git > $ export PATH=$PWD/mainline/dgproc:$PATH > > and you will have at your disposal the dgproc.py script, which validates and > converts Divergloss glossaries into various target formats (there is, > though, a dependency on python-lxml, hopefully your distribution packs it). > It works by applying parametrized sieves (more sieves :) to the glossary > file. > > To validate the glossary, dgproc.py is run with no sieve, just the glossary > file as argument: > > $ dgproc.py gloss.xml > > No output means that the glossary is technically valid. > > Of the target formats available at present, I would mention a compact HTML > dictionary table with expandable details, created by the html-bidict sieve: > > $ dgproc.py html-bidict gloss.xml \ > -solang:en -stlang:sr -sstyle:igloo -sallinone \ > -sfile:gloss.html > > This produces output such as on http://sr.l10n.kde.org/pojmovnik.php. > > Another is the tbx sieve, for producing TBX glossary files usable by > Lokalize, to have automatic terminology suggestions while translating: > > $ dgproc.py tbx gloss.xml -sfile:gloss.tbx > > This is no serious conversion to TBX, just reverse-engineered from Nick's > example in l10n-kde4/ru/ :) But Lokalize seems to grok it happily. > > There are some other sieves, e.g. to produce a glossary in a PO file, and > certainly more to come as we need them. Use -S option to dgproc.py for list > of sieves, and -H for help on a given sieve. Sieves are described in more > detail in dgproc/dg/doc/html/index.html, under sieve submodule. > > For a working Divergloss setup in KDE repo, check Japanese at > http://websvn.kde.org/trunk/l10n-support/ja/glossary/ (in > trunk/l10n-support/sr/ there are only some build instructions and outputs, I > keep the source of Serbian glossary in another Git repository). > > -- > Chusslove Illich (Часлав Илић) > Serbian KDE translation team > > ------------------------------------------------------- > > _______________________________________________ > Liste de discussion kde-francophone > kde-francophone@kde.org > https://mail.kde.org/mailman/listinfo/kde-francophone > > _______________________________________________ Liste de discussion kde-francophone kde-francophone@kde.org https://mail.kde.org/mailman/listinfo/kde-francophone