[Project-ideas] [GSoC]: Editor for DTD Translations

Sayak Sarkar sayak.bugsmith at gmail.com
Mon Mar 26 01:49:24 PDT 2012


Hey Folks,

I've been going through the working of Gtranslator and I think I've
understood the way it works.

So, the basic layout of a .po file is as follows:-

    white-space
    #  translator-comments
    #. extracted-comments
    #: reference...
    #, flag...
    #| msgid previous-untranslated-string
    msgid "untranslated-string"
    msgstr "translated-string"

Now, what Gtranslator does is that it extracts the untranslated-string
from within the double quotes in msgid and displays it as the Original
Text. The interface provides a text area wherein the Translated Text
can be input. This input text is then stored within double quotes in
the .po file as msgstr.

The basic layout of DTD files that need translation is as follows:-

   <!--License Block-->
   <!-- General -->
   <!ENTITY element_name "msgstr">
   <!-- LOCALIZATION NOTE-->
   <!ENTITY element_name "msgstr">
   <!--Entity Specific Comments-->
   <!ENTITY element_name "msgstr">

The application extension that would enable the translation of DTD
files should ideally be able to fetch the msgstr from the entity tags,
store it in a temporarily in memory and display it as the Original
Text Area of the User Interface. Similar to the existing system the
Translated String can be input in the Translated Text area. This input
string can then be used to replace the existing msgstr within the double quotes.

The proposed system would thus require very little or no modifications
to the existing basic User Interface.

However, the main difference between the PO and DTD translation files
is the fact that the PO file contains record of the Original Text
whereas the DTD file contains only the Translated Text. This however
can be overcome by a small change in the way the extension would store
the translated text. Instead of replacing the msgstr in the original
entity itself, the extension can be customized to comment out the
original entity declaration and replace the msgstr in a copy of the
entity declaration as follows:-

   <!--<!ENTITY element_name "Untranslated msgstr">-->
   <!ENTITY element_name "Translated msgstr">

This is my basic proposal for the Translation Editor Extension for
Gtranslator. The main reason behind my intention to create this
extension for Gtranslator is that I personally am more proficient in
Gtranslator than Lokalize. However, once I successfully complete the
extension I would also like to work on Lokalize, if not during GSoC,
then after GSoC.

Could anyone please give me some suggestions as to what can language
would be best suited for writing such an extension. I'm proficient in
C, C++ and Java and am currently learning Python.

Also do I need to state the development languages/tools which are to
be used for the project in the project application?

Awaiting your feedback for the above,

Regards,
Sayak
--
About Me:http://about.me/sayak_sarkar
Twitter: http://twitter.com/sayak_sarkar
Blog: http://sayaksarkar.wordpress.com



More information about the Project-ideas mailing list