From cfaeb9f44e7511493e747cef689eb7113f648687 Mon Sep 17 00:00:00 2001 From: Petr Prikryl Date: Wed, 4 Sep 2013 13:49:14 +0200 Subject: doc/translator.py -- coloured status in HTML The "almost up-to-date" category of the language translator classes introduced. Together with the background colouring (green, yellow, pink, red), it is mostly the psychological move towards language maintainers :) --- doc/translator.py | 79 ++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 64 insertions(+), 15 deletions(-) diff --git a/doc/translator.py b/doc/translator.py index 2abce71..7e4f012 100644 --- a/doc/translator.py +++ b/doc/translator.py @@ -62,6 +62,8 @@ was prefixed by backslash (was LaTeX related error). 2013/02/19 - Better diagnostics when translator_xx.h is too crippled. 2013/06/25 - TranslatorDecoder checks removed after removing the class. + 2013/09/04 - Coloured status in langhowto. *ALMOST up-to-date* category + of translators introduced. """ from __future__ import generators @@ -1123,7 +1125,7 @@ class Transl: if not self.missingMethods: self.note = 'Change the base class to Translator.' self.status = '' - self.readableStatus = 'up-to-date' + self.readableStatus = 'almost up-to-date' elif self.baseClassId != 'TranslatorEnglish': # The translator uses some of the adapters. # Look at the missing methods and check what adapter @@ -1161,7 +1163,7 @@ class Transl: if self.note != '': self.note += '\n\t\t' if self.txtMAX_DOT_GRAPH_HEIGHT_flag: - self.note += 'The MAX_DOT_GRAPH_HEIGHT found in trLegendDocs()' + self.note += 'The MAX_DOT_GRAPH_HEIGHT found in trLegendDocs()' # If everything seems OK, but there are obsolete methods, set # the note to clean-up source. This note will be used only when @@ -1169,6 +1171,11 @@ class Transl: if not self.note and self.status == '' and self.obsoleteMethods: self.note = 'Remove the obsolete methods (never used).' + # If there is at least some note but the status suggests it is + # otherwise up-to-date, mark is as ALMOST up-to-date. + if self.note and self.status == '': + self.readableStatus = 'almost up-to-date' + def report(self, fout): """Returns the report part for the source as a multiline string. @@ -1522,6 +1529,24 @@ class TrManager: return lst + def getBgcolorByReadableStatus(self, readableStatus): + if readableStatus == 'up-to-date': + color = '#ccffcc' # green + elif readableStatus.startswith('almost'): + color = '#ffffff' # white + elif readableStatus.startswith('English'): + color = '#ccffcc' # green + elif readableStatus.startswith('1.8'): + color = '#ffffcc' # yellow + elif readableStatus.startswith('1.7'): + color = '#ffcccc' # pink + elif readableStatus.startswith('1.6'): + color = '#ffcccc' # pink + else: + color = '#ff5555' # red + return color + + def generateTranslatorReport(self): """Generates the translator report.""" @@ -1558,13 +1583,12 @@ class TrManager: # in the translator report. fmail = open('mailto.txt', 'w') - # Write the list of up-to-date translator classes. + # Write the list of "up-to-date" translator classes. if self.upToDateIdLst: s = '''The following translator classes are up-to-date (sorted alphabetically). This means that they derive from the - Translator class and they implement all %d of the required - methods. Anyway, there still may be some details listed even - for them:''' + Translator class, they implement all %d of the required + methods, and even minor problems were not spotted by the script:''' s = s % len(self.requiredMethodsDic) f.write('-' * 70 + '\n') f.write(fill(s) + '\n\n') @@ -1572,19 +1596,35 @@ class TrManager: mailtoLst = [] for x in self.upToDateIdLst: obj = self.__translDic[x] - f.write(' ' + obj.classId) - if obj.note: - f.write(' -- ' + obj.note) - f.write('\n') - mailtoLst.extend(self.__emails(obj.classId)) + if obj.note is None: + f.write(' ' + obj.classId + '\n') + mailtoLst.extend(self.__emails(obj.classId)) fmail.write('up-to-date\n') fmail.write('; '.join(mailtoLst)) + + # Write separately the list of "ALMOST up-to-date" translator classes. + s = '''The following translator classes are ALMOST up-to-date (sorted + alphabetically). This means that they derive from the + Translator class, but there still may be some minor problems + listed for them:''' + f.write('\n' + ('-' * 70) + '\n') + f.write(fill(s) + '\n\n') + mailtoLst = [] + for x in self.upToDateIdLst: + obj = self.__translDic[x] + if obj.note is not None: + f.write(' ' + obj.classId + '\t-- ' + obj.note + '\n') + mailtoLst.extend(self.__emails(obj.classId)) + + fmail.write('\n\nalmost up-to-date\n') + fmail.write('; '.join(mailtoLst)) + # Write the list of the adapter based classes. The very obsolete # translators that derive from TranslatorEnglish are included. if self.adaptIdLst: - s = '''The following translator classes need some maintenance + s = '''The following translator classes need maintenance (the most obsolete at the end). The other info shows the estimation of Doxygen version when the class was last updated and number of methods that must be implemented to @@ -1828,14 +1868,22 @@ class TrManager: htmlTableTpl = dedent(htmlTableTpl) htmlTrTpl = u'\n %s\n ' htmlTdTpl = u'\n %s' + htmlTdStatusColorTpl = u'\n %s' # Loop through transl objects in the order of sorted readable names # and add generate the content of the HTML table. trlst = [] for name, obj in self.langLst: # Fill the table data elements for one row. The first element - # contains the readable name of the language. - lst = [ htmlTdTpl % obj.langReadable ] + # contains the readable name of the language. Only the oldest + # translator are colour marked in the language columnt. Less + # "heavy" color is used (when compared with the Status column). + if obj.readableStatus.startswith('1.4'): + bkcolor = self.getBgcolorByReadableStatus('1.6') + else: + bkcolor = '#ffffff' + + lst = [ htmlTdStatusColorTpl % (bkcolor, obj.langReadable) ] # The next two elements contain the list of maintainers # and the list of their mangled e-mails. For English-based @@ -1882,7 +1930,8 @@ class TrManager: lst.append(htmlTdTpl % ee) # The last element contains the readable form of the status. - lst.append(htmlTdTpl % obj.readableStatus) + bgcolor = self.getBgcolorByReadableStatus(obj.readableStatus) + lst.append(htmlTdStatusColorTpl % (bgcolor, obj.readableStatus)) # Join the table data to one table row. trlst.append(htmlTrTpl % (''.join(lst))) -- cgit v0.12 From b935f3199f5f549c6fc335f91ce05b763306b718 Mon Sep 17 00:00:00 2001 From: Petr Prikryl Date: Wed, 4 Sep 2013 13:50:12 +0200 Subject: doc/language.tpl -- UTF-8 reflected in the langhowto template --- doc/language.tpl | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/doc/language.tpl b/doc/language.tpl index 005d51f..2b15159 100644 --- a/doc/language.tpl +++ b/doc/language.tpl @@ -93,6 +93,7 @@ This file should now contain a \#define for your language code. the \c HEADERS line.
  • Edit translator_xx.h:
      +
    • Use the UTF-8 capable editor and open the file using the UTF-8 mode.
    • Rename TRANSLATOR_EN_H to TRANSLATOR_XX_H twice (i.e. in the \c \#ifndef and \c \#define preprocessor commands at the beginning of the file). @@ -100,18 +101,17 @@ This file should now contain a \#define for your language code.
    • In the member idLanguage() change "english" into the name of your language (use lower case characters only). Depending on the language you may also wish to change the member functions - latexLanguageSupportCommand(), idLanguageCharset() and others - (you will recognize them when you start the work). + latexLanguageSupportCommand() and other (you will recognize them when + you start the work).
    • Edit all the strings that are returned by the member functions that - start with tr. + start with \c tr. Try to match punctuation and capitals! To enter special characters (with accents) you can:
        -
      • Enter them directly if your keyboard supports that and you are - using a Latin-1 font. Doxygen will translate the - characters to proper \f$\mbox{\LaTeX}\f$ and leave the - HTML and man output for what it is (which is fine, if - idLanguageCharset() is set correctly). +
      • Enter them directly if your keyboard supports that. Recall that + the text is expected to be saved using the UTF-8 encoding. Doxygen + will translate the characters to proper \f$\mbox{\LaTeX}\f$ and + leaves the HTML and man output in UTF-8.
      • Use html codes like \ä for an a with an umlaut (i.e. ä). See the HTML specification for the codes.
      @@ -122,7 +122,8 @@ This file should now contain a \#define for your language code. in the config file to generate output in your language.
    • Send translator_xx.h to me so I can add it to doxygen. Send also your name and e-mail address to be included in the - \c maintainers.txt list. + \c maintainers.txt list. You can also clone the Doxygen repository + at GitHub and make a PullRequest later. @@ -299,9 +300,11 @@ end with =0;). If everything compiles fine, try to run \c translator.py, and have a look at the translator report (ASCII file) at the \c doxygen/doc -directory. Even if your translator is marked as up-to-date, there -still may be some remarks related to your source code. Namely, the -obsolete methods--that are not used at all--may be listed in the +directory. Your translator is marked as up-to-date only if the script +does not detect anything special. If the translator uses the \c Translator +base class, there still may be some remarks related to your source code. +In the case, the translator is marked as almost up-to-date. +Namely, the obsolete methods--that are not used at all--may be listed in the section for your language. Simply, remove their code (and run the \c translator.py again). Also, you will be informed when you forgot to change the base class of your translator class to some newer adapter -- cgit v0.12 From e31402cb975d0a32c8d41deb593c9cfe289427b7 Mon Sep 17 00:00:00 2001 From: Petr Prikryl Date: Wed, 4 Sep 2013 13:51:26 +0200 Subject: doc/language.doc generated from the updated sources (bgcolored) --- doc/language.doc | 274 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 139 insertions(+), 135 deletions(-) diff --git a/doc/language.doc b/doc/language.doc index 570bf4c..5f798ad 100644 --- a/doc/language.doc +++ b/doc/language.doc @@ -1,11 +1,11 @@ /****************************************************************************** - * Do not edit this file. It was generated by the translator.py script. + * Do not edit this file. It was generated by the translator.py script. * * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its - * documentation under the terms of the GNU General Public License is hereby - * granted. No representations are made about the suitability of this software + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software * for any purpose. It is provided "as is" without express or implied warranty. * See the GNU General Public License for more details. * @@ -22,7 +22,7 @@ text fragments, generated by doxygen, can be produced in languages other than English (the default). The output language is chosen through the configuration file (with default name and known as Doxyfile). -Currently (version 1.8.4), 40 languages +Currently (version 1.8.5), 40 languages are supported (sorted alphabetically): Afrikaans, Arabic, Armenian, Brazilian Portuguese, Catalan, Chinese, Chinese Traditional, Croatian, Czech, Danish, Dutch, English, @@ -52,256 +52,256 @@ when the translator was updated. - Afrikaans + Afrikaans Johan Prinsloo johan at zippysnoek dot com - 1.6.0 + 1.6.0 - Arabic + Arabic Moaz Reyad
      Muhammad Bashir Al-Noimi [resigned]
      mbnoimi at gmail dot com - 1.4.6 + 1.4.6 - Armenian + Armenian Armen Tangamyan armen dot tangamyan at anu dot edu dot au - 1.8.0 + 1.8.0 - Brazilian Portuguese + Brazilian Portuguese Fabio "FJTC" Jun Takada Chino jun-chino at uol dot com dot br - 1.8.0 + 1.8.0 - Catalan + Catalan Maximiliano Pin
      Albert Mora max dot pin at bitroit dot com
      [unreachable] - 1.8.0 + 1.8.0 - Chinese + Chinese Lian Yang
      Li Daobing
      Wei Liu lian dot yang dot cn at gmail dot com
      lidaobing at gmail dot com
      liuwei at asiainfo dot com - 1.8.2 + 1.8.2 - Chinese Traditional + Chinese Traditional Daniel YC Lin
      Gary Lee dlin dot tw at gmail dot com
      garywlee at gmail dot com - up-to-date + almost up-to-date - Croatian + Croatian Boris Bralo boris dot bralo at gmail dot com - 1.8.2 + 1.8.2 - Czech + Czech Petr Přikryl prikryl at atlas dot cz - up-to-date + up-to-date - Danish + Danish Poul-Erik Hansen
      Erik Søe Sørensen pouhan at gnotometrics dot dk
      eriksoe+doxygen at daimi dot au dot dk - 1.8.0 + 1.8.0 - Dutch + Dutch Dimitri van Heesch dimitri at stack dot nl - up-to-date + up-to-date - English + English Dimitri van Heesch dimitri at stack dot nl - up-to-date + up-to-date - Esperanto + Esperanto Ander Martínez ander dot basaundi at gmail dot com - 1.8.4 + 1.8.4 - Finnish + Finnish Antti Laine antti dot a dot laine at tut dot fi - 1.6.0 + 1.6.0 - French + French David Martinet
      Xavier Outhier
      Benoît BROSSE contact at e-concept-applications dot fr
      xouthier at yahoo dot fr
      Benoit dot BROSSE at ingenico dot com - up-to-date + up-to-date - German + German Peter Grotrian
      Jens Seidel Peter dot Grotrian at pdv-FS dot de
      jensseidel at users dot sf dot net - 1.8.4 + 1.8.4 - Greek + Greek Paul Gessos gessos dot paul at yahoo dot gr - 1.8.4 + 1.8.4 - Hungarian + Hungarian Ákos Kiss
      Földvári György akiss at users dot sourceforge dot net
      [unreachable] - 1.4.6 + 1.4.6 - Indonesian + Indonesian Hendy Irawan ceefour at gauldong dot net - 1.8.0 + 1.8.0 - Italian + Italian Alessandro Falappa
      Ahmed Aldo Faisal alessandro at falappa dot net
      aaf23 at cam dot ac dot uk - 1.8.2 + 1.8.2 - Japanese + Japanese Hiroki Iseri
      Ryunosuke Satoh
      Kenji Nagamatsu
      Iwasa Kazmi goyoki at gmail dot com
      sun594 at hotmail dot com
      naga at joyful dot club dot ne dot jp
      [unreachable] - 1.6.0 + 1.6.0 - JapaneseEn + JapaneseEn see the Japanese language   - English based + English based - Korean + Korean Kim Taedong
      SooYoung Jung
      Richard Kim fly1004 at gmail dot com
      jung5000 at gmail dot com
      [unreachable] - up-to-date + up-to-date - KoreanEn + KoreanEn see the Korean language   - English based + English based - Latvian + Latvian Lauris lauris at nix.lv - up-to-date + up-to-date - Lithuanian + Lithuanian Tomas Simonaitis
      Mindaugas Radzius
      Aidas Berukstis
      -- searching for the maintainer -- [unreachable]
      [unreachable]
      [unreachable]
      [Please, try to help to find someone.] - 1.4.6 + 1.4.6 - Macedonian + Macedonian Slave Jovanovski slavejovanovski at yahoo dot com - 1.6.0 + 1.6.0 - Norwegian + Norwegian Lars Erik Jordet lejordet at gmail dot com - 1.4.6 + 1.4.6 - Persian + Persian Ali Nadalizadeh nadalizadeh at gmail dot com - 1.7.5 + 1.7.5 - Polish + Polish Piotr Kaminski
      Grzegorz Kowal
      Krzysztof Kral [unreachable]
      [unreachable]
      krzysztof dot kral at gmail dot com - 1.8.2 + 1.8.2 - Portuguese + Portuguese Rui Godinho Lopes
      Fabio "FJTC" Jun Takada Chino [resigned]
      jun-chino at uol dot com dot br - 1.8.0 + 1.8.0 - Romanian + Romanian Ionut Dumitrascu
      Alexandru Iosup reddumy at yahoo dot com
      aiosup at yahoo dot com - up-to-date + almost up-to-date - Russian - Alexandr Chelpanov - cav at cryptopro dot ru - 1.7.5 + Russian + Brilliantov Kirill Vladimirovich
      Alexandr Chelpanov + brilliantov at byterg dot ru
      cav at cryptopro dot ru + almost up-to-date - Serbian + Serbian Dejan Milosavljevic [unreachable] - 1.6.0 + 1.6.0 - SerbianCyrilic + SerbianCyrilic Nedeljko Stefanovic stenedjo at yahoo dot com - 1.6.0 + 1.6.0 - Slovak + Slovak Kali+Laco Švec
      Petr Přikryl [the Slovak language advisors]
      prikryl at atlas dot cz - up-to-date + up-to-date - Slovene + Slovene Matjaž Ostroveršnik matjaz dot ostroversnik at ostri dot org - 1.4.6 + 1.4.6 - Spanish + Spanish Bartomeu
      Francisco Oltra Thennet
      David Vaquero bartomeu at loteria3cornella dot com
      [unreachable]
      david at grupoikusnet dot com - up-to-date + up-to-date - Swedish + Swedish Mikael Hallin mikaelhallin at yahoo dot se - 1.6.0 + 1.6.0 - Turkish + Turkish Emin Ilker Cetinbas niw3 at yahoo dot com - 1.7.5 + 1.7.5 - Ukrainian + Ukrainian Olexij Tkatchenko
      Petro Yermolenko [resigned]
      python at i dot ua - 1.8.4 + 1.8.4 - Vietnamese + Vietnamese Dang Minh Tuan tuanvietkey at gmail dot com - 1.6.0 + 1.6.0 @@ -335,7 +335,7 @@ when the translator was updated. ~ & Li Daobing & {\tt\tiny lidaobing at gmail dot com} & ~ \\ ~ & Wei Liu & {\tt\tiny liuwei at asiainfo dot com} & ~ \\ \hline - Chinese Traditional & Daniel YC Lin & {\tt\tiny dlin dot tw at gmail dot com} & up-to-date \\ + Chinese Traditional & Daniel YC Lin & {\tt\tiny dlin dot tw at gmail dot com} & almost up-to-date \\ ~ & Gary Lee & {\tt\tiny garywlee at gmail dot com} & ~ \\ \hline Croatian & Boris Bralo & {\tt\tiny boris dot bralo at gmail dot com} & 1.8.2 \\ @@ -403,10 +403,11 @@ when the translator was updated. Portuguese & Rui Godinho Lopes & {\tt\tiny [resigned] rgl at ruilopes dot com} & 1.8.0 \\ ~ & Fabio "FJTC" Jun Takada Chino & {\tt\tiny jun-chino at uol dot com dot br} & ~ \\ \hline - Romanian & Ionut Dumitrascu & {\tt\tiny reddumy at yahoo dot com} & up-to-date \\ + Romanian & Ionut Dumitrascu & {\tt\tiny reddumy at yahoo dot com} & almost up-to-date \\ ~ & Alexandru Iosup & {\tt\tiny aiosup at yahoo dot com} & ~ \\ \hline - Russian & Alexandr Chelpanov & {\tt\tiny cav at cryptopro dot ru} & 1.7.5 \\ + Russian & Brilliantov Kirill Vladimirovich & {\tt\tiny brilliantov at byterg dot ru} & almost up-to-date \\ + ~ & Alexandr Chelpanov & {\tt\tiny cav at cryptopro dot ru} & ~ \\ \hline Serbian & Dejan Milosavljevic & {\tt\tiny [unreachable] dmilos at email dot com} & 1.6.0 \\ \hline @@ -436,10 +437,10 @@ when the translator was updated. Most people on the list have indicated that they were also busy -doing other things, so if you want to help to speed things up please +doing other things, so if you want to help to speed things up please let them (or me) know. -If you want to add support for a language that is not yet listed +If you want to add support for a language that is not yet listed please read the next section. @@ -450,12 +451,12 @@ This short HOWTO explains how to add support for the new language to Doxygen: Just follow these steps:
      1. Tell me for which language you want to add support. If no one else - is already working on support for that language, you will be - assigned as the maintainer for the language. -
      2. Create a copy of translator_en.h and name it + is already working on support for that language, you will be + assigned as the maintainer for the language. +
      3. Create a copy of translator_en.h and name it translator_\.h I'll use xx in the rest of this document. -
      4. Add definition of the symbol for your language in the configure +
      5. Add definition of the symbol for your language in the configure at two places in the script:
        1. After the f_langs= is statement, in lower case. @@ -464,7 +465,7 @@ at two places in the script: The rerun the configure script such that is generates src/lang_cfg.h. This file should now contain a \#define for your language code.
        2. Edit language.cpp: - Add a + Add a \verbatim #ifdef LANG_xx #include @@ -481,46 +482,47 @@ This file should now contain a \#define for your language code. { theTranslator = new TranslatorYourLanguage; } -#endif +#endif \endverbatim after the if { ... }. I.e., it must be placed after the code - for creating the English translator at the beginning, and before the - else { ... } part that creates the translator for the + for creating the English translator at the beginning, and before the + else { ... } part that creates the translator for the default language (English again). -
        3. Edit libdoxygen.pro.in and add \c translator_xx.h to +
        4. Edit libdoxygen.pro.in and add \c translator_xx.h to the \c HEADERS line.
        5. Edit translator_xx.h:
            -
          • Rename TRANSLATOR_EN_H to TRANSLATOR_XX_H - twice (i.e. in the \c \#ifndef and \c \#define preprocessor commands at +
          • Use the UTF-8 capable editor and open the file using the UTF-8 mode. +
          • Rename TRANSLATOR_EN_H to TRANSLATOR_XX_H + twice (i.e. in the \c \#ifndef and \c \#define preprocessor commands at the beginning of the file). -
          • Rename TranslatorEnglish to TranslatorYourLanguage -
          • In the member idLanguage() change "english" into the +
          • Rename TranslatorEnglish to TranslatorYourLanguage +
          • In the member idLanguage() change "english" into the name of your language (use lower case characters only). Depending - on the language you may also wish to change the member functions - latexLanguageSupportCommand(), idLanguageCharset() and others - (you will recognize them when you start the work). -
          • Edit all the strings that are returned by the member functions that - start with tr. + on the language you may also wish to change the member functions + latexLanguageSupportCommand() and other (you will recognize them when + you start the work). +
          • Edit all the strings that are returned by the member functions that + start with \c tr. Try to match punctuation and capitals! To enter special characters (with accents) you can:
              -
            • Enter them directly if your keyboard supports that and you are - using a Latin-1 font. Doxygen will translate the - characters to proper \f$\mbox{\LaTeX}\f$ and leave the - HTML and man output for what it is (which is fine, if - idLanguageCharset() is set correctly). +
            • Enter them directly if your keyboard supports that. Recall that + the text is expected to be saved using the UTF-8 encoding. Doxygen + will translate the characters to proper \f$\mbox{\LaTeX}\f$ and + leaves the HTML and man output in UTF-8.
            • Use html codes like \ä for an a with an umlaut (i.e. ä). See the HTML specification for the codes.
          -
        6. Run configure and make again from the root of the distribution, +
        7. Run configure and make again from the root of the distribution, in order to regenerated the Makefiles. -
        8. Now you can use OUTPUT_LANGUAGE = your_language_name +
        9. Now you can use OUTPUT_LANGUAGE = your_language_name in the config file to generate output in your language.
        10. Send translator_xx.h to me so I can add it to doxygen. Send also your name and e-mail address to be included in the - \c maintainers.txt list. + \c maintainers.txt list. You can also clone the Doxygen repository + at GitHub and make a PullRequest later.
        @@ -536,7 +538,7 @@ until all language maintainers have translated the new sentences and sent the results would not be very practical. The following text describes the usage of translator adapters to solve the problem. -The role of Translator Adapters. +The role of Translator Adapters. Whenever the \c Translator class interface changes in the new release, the new class \c TranslatorAdapter_x_y_z is added to the \c translator_adapter.h file (here x, y, and z are numbers that @@ -552,7 +554,7 @@ TranslatorAdapter_x_y_z class may use the obsolete method to get the result which is as close as possible to the older result in the target language. If it is not possible, the result (the default translation) is obtained using the English translator, which is (by -definition) always up-to-date. +definition) always up-to-date. For example, when the new \c trFile() method with parameters (to determine the capitalization of the first letter and @@ -582,7 +584,7 @@ of the translator adapter classes: The \c trFiles() is not present in the \c TranslatorEnglish class, because it was removed as obsolete. However, it was used until now -and its call was replaced by +and its call was replaced by \verbatim trFile(true, false) @@ -648,16 +650,16 @@ translator adapter classes. To simplify the maintenance of the language translator classes for the supported languages, the \c translator.py Python -script was developed (located in \c doxygen/doc directory). +script was developed (located in \c doxygen/doc directory). It extracts the important information about obsolete and -new methods from the source files for each of the languages. +new methods from the source files for each of the languages. The information is stored in the translator report ASCII file -(\c translator_report.txt). +(\c translator_report.txt). \htmlonly If you compiled this documentation from sources and if you have also doxygen sources available the link doxygen/doc/translator_report.txt should be valid.\endhtmlonly +>doxygen/doc/translator_report.txt should be valid.\endhtmlonly Looking at the base class of the language translator, the script guesses also the status of the translator -- see the last column of @@ -680,7 +682,7 @@ expected, you can always decide use some suitable translator adapter to finish the changes later and still make your translator working. The most radical way of updating the language translator is -to make your translator class derive directly +to make your translator class derive directly from the abstract class \c Translator and provide translations for the methods that are required to be implemented -- the compiler will tell you if you forgot to implement some of them. If you are in @@ -693,14 +695,16 @@ because the adapter classes do implement also the obsolete methods In other words, the up-to-date language translators do not need the \c TranslatorAdapter_x_y_z classes at all, and you do not need to implement anything else than the methods required by the Translator -class (i.e. the pure virtual methods of the \c Translator -- they +class (i.e. the pure virtual methods of the \c Translator -- they end with =0;). If everything compiles fine, try to run \c translator.py, and have a look at the translator report (ASCII file) at the \c doxygen/doc -directory. Even if your translator is marked as up-to-date, there -still may be some remarks related to your source code. Namely, the -obsolete methods--that are not used at all--may be listed in the +directory. Your translator is marked as up-to-date only if the script +does not detect anything special. If the translator uses the \c Translator +base class, there still may be some remarks related to your source code. +In the case, the translator is marked as almost up-to-date. +Namely, the obsolete methods--that are not used at all--may be listed in the section for your language. Simply, remove their code (and run the \c translator.py again). Also, you will be informed when you forgot to change the base class of your translator class to some newer adapter @@ -728,7 +732,7 @@ report shorter (also produced faster) -- it will contain only the information related to your translator. Once you reach the state when the base class should be changed to some newer adapter, you will see the note in the translator report. - + Warning: Don't forget to compile Doxygen to discover, whether it is compilable. The \c translator.py does not check if everything is correct with respect to the compiler. Because of that, it may lie @@ -743,7 +747,7 @@ When doing so, all the missing methods will be replaced by the English translation. This means that not-implemented methods will always return the English result. Such translators are marked using word \c obsolete. You should read it really obsolete. No -guess about the last update can be done. +guess about the last update can be done. Often, it is possible to construct better result from the obsolete methods. Because of that, the translator adapter classes should be -- cgit v0.12