Menu

Translation for brazilian portuguese

Discussion
pedrohp
2006-05-22
2013-04-02
  • pedrohp

    pedrohp - 2006-05-22

    Can I do this translation?

     
    • G. Veith

      G. Veith - 2006-05-23

      Of course, I'd be happy if you do.

      First I hope you mean to translate the generated documentation not the program itself. While the program could be translated, it would be a hell to translate all the GUIs (.dfm files) and then to dive through the source files (.pas) to translate any messages etc. in it. And of course lots of hells to follow in order to merge the result with any new releases.
      I don't have much experience in localization, so if anyone knows of a good system, I'm listening.

      Translating the generated documentation on the other hand should be quite simple in comparison.
      All you need is the GUI version of DelphiDoc, although its source files will probably also be most helpful. Make sure you have the most recent version (1.7.1.332), the previous one introduced some bugs which in particular broke the loading of localized texts.

      Just start the GUI version, select the tab "Localization" in the tree view on the left and press the button "Localization". A dialog to edit all used strings/texts inside the generated documentation will pop up. Here you get 259 of these texts, 40 warnings (only a few can be localized here, so it does not make much sense to do so) and two special "options", one to toggle between pre-defined languages (only English and German) and another to load the texts from a file, which can also be done with buttons within the dialog.
      Speaking of that it might be easier to save all these texts to a file with the buttons, open the .ini-file with the text-editor of your choice and edit the texts this way. At least this way you can't forget to save you localized texts.

      If you hate GUIs you have to extract the needed information manually from the unit \Generator\HelperObjects\UDocumentationTexts.pas to create the ini file and load it via the -L option, just note that the topic of the section is called [TEditDocumentationTexts].

      For every text there will be a short description and you may also be able to understand what it means from its name/ID, its category and hopefully its englisch translation. But I fear for at least some of the texts you might have to dive in the sources to see where it is used. Download and decompress DelphiDocs' source, open the project in Delphi, use the search function (Ctrl+F), switch to "Search in Files", choose the directory containing the DelphiDoc.dpr and its sub-directories and search for the name/ID of the text to translate (optionally with the prefix 'dt').

      One main problem might be different grammars in the languages leading to a different order of the words. For example consider the heading:
      "Methods of class TWinHelpDoc by Name"
      It consists of several localized strings:
      'Methods', ' of ' and ' by Name'
      and is assembled depending for what the header is used for, so sometimes its the list of 'Properties' and sometimes of 'Fields', and also sometimes it's not ' by Name' but by classes (without any postfix).
      So I don't know if it is possible to express every assembled sentence in any language in this way. I hope it is (even though it might sound sometime a little strange), but it may be that the source code has to be changed slightly to allow a reordering of the parts or new localized strings have to be added.

      That said I hope it won't be too problematic to translate DelphiDoc in any indo-european language.

      Any feedback, further questions and of course ini files containing translations are welcome ;-)

      Best regards,
         Gerold Veith

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.