Re: i18n of Turtle files for xesam project?



Στις 26-05-2007, ημέρα Σαβ, και ώρα 14:57 +0200, ο/η Mikkel Kamstrup
Erlandsen έγραψε:
> 2007/5/26, Simos Xenitellis <simos lists googlemail com>:
>         Στις 26-05-2007, ημέρα Σαβ, και ώρα 10:19 +0200, ο/η Mikkel
>         Kamstrup
>         Erlandsen έγραψε:
>         > Hi Gnomers,
>         >
>         > I also sent this mail to gnome-i18n a few days ago without
>         any replies
>         > and the xesam project[1] badly needs feedback from
>         enlightened people. 
>         >
>         > Here's the case. We need a way for describing our ontology
>         and one of
>         > the runner up candidates is a subset of the Turtle
>         syntax[2]. The
>         > files describing the ontology would then resemble: 
>         >
>         > START_FILE
>         >
>         > @prefix DC:   <http://freedesktop.org/standards/DC#>
>         > @prefix xesam:        <
>         > http://freedesktop.org/standards/xesam#>
>         > @prefix :     <
>         > http://freedesktop.org/standards/xesam_base#>
>         >
>         > xesam:Audio.Composer 
>         >       a               :field;
>         >       :of_type        :string;
>         >       :has_parent     DC:Creator;
>         >       :name           "Composer"@EN;
>         >       :name           "Komponist"@DA; 
>         >
>         >       :description    "Audio composer".
>         >
>         > xesam:Audio.Artist
>         >       a               :field;
>         >       :of_type        :string;
>         >       :has_parent     DC:Creator;
>         >       :name           "Artist"@EN;
>         >       :name           "Kunstner"@DA;
>         >       :description    "Performer featuring in the
>         recording"@EN;
>         >
>         >       :description    "Kunster der optræder på
>         optagelsen"@DA. 
>         >
>         > <more like this>
>         > END_FILE
>         >
>         > As you can guess the translations are marked with @ after
>         the strings.
>         >
>         > My question is : Will this cause problems or be a major
>         hassle? How 
>         > will it fit into the current translation workflow?
>         
>         Currently, the gnome i18n workflow can easily use .xml and .po
>         files.
>         For other file formats there will be need for quite some extra
>         work.
>         Thus, if you would like to use your proposed file format, you
>         would need 
>         to update http://svn.gnome.org/viewcvs/intltool/ Of course,
>         contact the
>         maintainer of intltool first.
>         
>         AFAIK, if intltool can parse your files, they will fit with
>         the workflow 
>         of GNOME.
> 
> Ok thanks for the tip :-)
> 
> How about the way fx .desktop files are handled? The translations are
> inlined in the .desktop files and that's also the way Turtle does it
> (see above example). So my concerns where about: 
> 
>  - I'm not keen on requiring the translators to understand
> yet-another-format, so I'm not keen on the translators having to
> resort to raw file editing
> 
>  - How hard would it be to make intltool extract the Turtle
> translation templates? Is there no way to tell intltool "use this
> external program to extract translation templates"? I've been browsing
> around the source and I can't find any clean way to extend it... 

Oh, intltool also understands .desktop files. From the README file
(http://svn.gnome.org/svn/intltool/trunk/README)

The intltool collection can be used to do these things:
 o Extract translatable strings from various source files (.xml.in,
   .glade, .desktop.in, .server.in, .oaf.in).
 o Collect the extracted strings together with messages from traditional
   source files (.c, .h) in po/$(PACKAGE).pot.
 o Merge back the translations from .po files into .xml, .desktop and
   .oaf files.  This merge step will happen at build resp. installation
   time.

I do not think it would be hard to extract the text from Turtle
translation templates. Just follow the example of the .desktop files
which should be very similar. You would need to code in Python a few
functions to extract/put back the translation messages. Is there some
Python module/code that understands the Turtle format (or the general
format that Turtle uses)?

Simos



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