summaryrefslogtreecommitdiffstats
path: root/src/translator_adapter.h
blob: e3a111992e23b55b7e7a4c50c75b5a65dfaff20b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
#ifndef TRANSLATOR_ADAPTER_H
#define TRANSLATOR_ADAPTER_H

#include "version.h"

/*! \brief Base of the translator adapter tree
 *
 
 *  This abstract class provides access to the english
 *  translations, to be used as a substitute for not implemented
 *  local translations. 
 */
class TranslatorAdapterBase : public Translator
{
  protected:
    virtual ~TranslatorAdapterBase() {}
    TranslatorEnglish english;

    /*! An auxiliary inline method used by the updateNeededMessage()
     *  for building a warning message.
     */
    inline QCString createUpdateNeededMessage(const QCString & languageName,
                                              const QCString & versionString)
    {
      return QCString("Warning: The selected output language \"")
             + languageName 
             + "\" has not been updated\nsince "
             + versionString
             + ".  As a result some sentences may appear in English.\n\n";
    }
  
  public:
    /*! This method is used to generate a warning message to signal
     *  the user that the translation of his/her language of choice
     *  needs updating.  It must be implemented by the translator
     *  adapter class (pure virtual).
     * 
     *  \sa createUpdateNeededMessage()
     */
    virtual QCString updateNeededMessage() = 0;

};

class TranslatorAdapter_1_4_6 : public TranslatorAdapterBase
{
  public:
    virtual QCString updateNeededMessage()
    { return createUpdateNeededMessage(idLanguage(),"release 1.4.6"); }

    virtual QCString trCallerGraph()
    {
      return english.trCallerGraph();
    }
    virtual QCString trEnumerationValueDocumentation()
    {
      return english.trEnumerationValueDocumentation();
    }
};

class TranslatorAdapter_1_4_1 : public TranslatorAdapter_1_4_6
{
  public:
    virtual QCString updateNeededMessage()
    { return createUpdateNeededMessage(idLanguage(),"release 1.4.1"); }
    
    virtual QCString trOverloadText()
    { return english.trOverloadText(); }
};

class TranslatorAdapter_1_3_9 : public TranslatorAdapter_1_4_1
{
  public:
    virtual QCString updateNeededMessage()
    { return createUpdateNeededMessage(idLanguage(),"release 1.3.9"); }
    
    virtual QCString trDirIndex()
    { return english.trDirIndex(); }
    virtual QCString trDirDocumentation()
    { return english.trDirDocumentation(); }
    virtual QCString trDirectories()
    { return english.trDirectories(); }
    virtual QCString trDirDescription()
    { return english.trDirDescription(); }
    virtual QCString trDirReference(const char *dirName)
    { return english.trDirReference(dirName); }
    virtual QCString trDir(bool first_capital, bool singular)
    { return english.trDir(first_capital,singular); }
};

class TranslatorAdapter_1_3_8 : public TranslatorAdapter_1_3_9
{
  public:
    virtual QCString updateNeededMessage()
    { return createUpdateNeededMessage(idLanguage(),"release 1.3.8"); }
    
    virtual QCString trSourceFile(QCString& filename)
    { return english.trSourceFile(filename); }
};

class TranslatorAdapter_1_3_3 : public TranslatorAdapter_1_3_8
{
  public:
    virtual QCString updateNeededMessage() 
    { return createUpdateNeededMessage(idLanguage(),"release 1.3.3"); }

    virtual QCString trSearchForIndex()
    { return english.trSearchForIndex(); }
    virtual QCString trSearchResultsTitle()
    { return english.trSearchResultsTitle(); }
    virtual QCString trSearchResults(int numDocuments)
    { return english.trSearchResults(numDocuments); }
    virtual QCString trSearchMatches()
    { return english.trSearchMatches(); }

};

class TranslatorAdapter_1_3_1 : public TranslatorAdapter_1_3_3
{
  public:
    virtual QCString updateNeededMessage() 
    { return createUpdateNeededMessage(idLanguage(),"release 1.3.1"); }
    virtual QCString trAll()
    { return english.trAll(); }
    virtual QCString trCallGraph()
    { return english.trCallGraph(); }
};

class TranslatorAdapter_1_3 : public TranslatorAdapter_1_3_1
{
  public:
    virtual QCString updateNeededMessage() 
    { return createUpdateNeededMessage(idLanguage(),"release 1.3"); }

    virtual QCString trPackageTypes()
    { return english.trPackageTypes(); }
    virtual QCString trPackageMembers()
    { return english.trPackageMembers(); }
    virtual QCString trStaticPackageMembers()
    { return english.trStaticPackageMembers(); }
    virtual QCString trPackageAttribs()
    { return english.trPackageAttribs(); }
    virtual QCString trStaticPackageAttribs() 
    { return english.trStaticPackageAttribs(); }
};

class TranslatorAdapter_1_2_18 : public TranslatorAdapter_1_3
{
  public:
    virtual QCString updateNeededMessage() 
    { return createUpdateNeededMessage(idLanguage(),"release 1.2.18"); }

    virtual QCString trEvents()
    { return english.trEvents(); }
    virtual QCString trEventDocumentation()
    { return english.trEventDocumentation(); }
};

class TranslatorAdapter_1_2_17 : public TranslatorAdapter_1_2_18
{
  public:
    virtual QCString updateNeededMessage() 
    { return createUpdateNeededMessage(idLanguage(),"release 1.2.17"); }

    virtual QCString trDeprecatedList()
    { return english.trDeprecatedList(); }
};

class TranslatorAdapter_1_2_16 : public TranslatorAdapter_1_2_17
{
  public:
    virtual QCString updateNeededMessage() 
    { return createUpdateNeededMessage(idLanguage(),"release 1.2.16"); }

    virtual QCString trRTFTableOfContents()
    { return english.trRTFTableOfContents(); }
};

class TranslatorAdapter_1_2_13 : public TranslatorAdapter_1_2_16
{
  public:
    virtual QCString updateNeededMessage() 
    { return createUpdateNeededMessage(idLanguage(),"release 1.2.13"); }

    virtual QCString trImplementedFromList(int numEntries) 
    { return english.trImplementedFromList(numEntries); }

    virtual QCString trImplementedInList(int numEntries) 
    { return english.trImplementedInList(numEntries); }
};

class TranslatorAdapter_1_2_11 : public TranslatorAdapter_1_2_13
{
  public:
    virtual QCString updateNeededMessage() 
    { return createUpdateNeededMessage(idLanguage(),"release 1.2.11"); }
   
    virtual QCString trReferences()
    { return english.trReferences(); }
    
};

#endif