|
1 #ifndef TRANSLATOR_ADAPTER_H |
|
2 #define TRANSLATOR_ADAPTER_H |
|
3 |
|
4 #include "version.h" |
|
5 |
|
6 /*! \brief Base of the translator adapter tree |
|
7 * |
|
8 |
|
9 * This abstract class provides access to the english |
|
10 * translations, to be used as a substitute for not implemented |
|
11 * local translations. |
|
12 */ |
|
13 class TranslatorAdapterBase : public Translator |
|
14 { |
|
15 protected: |
|
16 virtual ~TranslatorAdapterBase() {} |
|
17 TranslatorEnglish english; |
|
18 |
|
19 /*! An auxiliary inline method used by the updateNeededMessage() |
|
20 * for building a warning message. |
|
21 */ |
|
22 inline QCString createUpdateNeededMessage(const QCString & languageName, |
|
23 const QCString & versionString) |
|
24 { |
|
25 return QCString("Warning: The selected output language \"") |
|
26 + languageName |
|
27 + "\" has not been updated\nsince " |
|
28 + versionString |
|
29 + ". As a result some sentences may appear in English.\n\n"; |
|
30 } |
|
31 |
|
32 public: |
|
33 /*! This method is used to generate a warning message to signal |
|
34 * the user that the translation of his/her language of choice |
|
35 * needs updating. It must be implemented by the translator |
|
36 * adapter class (pure virtual). |
|
37 * |
|
38 * \sa createUpdateNeededMessage() |
|
39 */ |
|
40 virtual QCString updateNeededMessage() = 0; |
|
41 |
|
42 }; |
|
43 |
|
44 class TranslatorAdapter_1_6_0 : public TranslatorAdapterBase |
|
45 { |
|
46 public: |
|
47 virtual QCString updateNeededMessage() |
|
48 { return createUpdateNeededMessage(idLanguage(),"release 1.6.0"); } |
|
49 |
|
50 virtual QCString trDirRelation(const char *name) |
|
51 { return english.trDirRelation(name); } |
|
52 |
|
53 virtual QCString trLoading() |
|
54 { return english.trLoading(); } |
|
55 |
|
56 virtual QCString trGlobalNamespace() |
|
57 { return english.trGlobalNamespace(); } |
|
58 |
|
59 virtual QCString trSearching() |
|
60 { return english.trSearching(); } |
|
61 |
|
62 virtual QCString trNoMatches() |
|
63 { return english.trNoMatches(); } |
|
64 }; |
|
65 |
|
66 class TranslatorAdapter_1_5_4 : public TranslatorAdapter_1_6_0 |
|
67 { |
|
68 public: |
|
69 virtual QCString updateNeededMessage() |
|
70 { return createUpdateNeededMessage(idLanguage(),"release 1.5.4"); } |
|
71 |
|
72 virtual QCString trMemberFunctionDocumentationFortran() |
|
73 { return english.trMemberFunctionDocumentationFortran(); } |
|
74 |
|
75 virtual QCString trCompoundListFortran() |
|
76 { return english.trCompoundListFortran(); } |
|
77 |
|
78 virtual QCString trCompoundMembersFortran() |
|
79 { return english.trCompoundMembersFortran(); } |
|
80 |
|
81 virtual QCString trCompoundListDescriptionFortran() |
|
82 { return english.trCompoundListDescriptionFortran(); } |
|
83 |
|
84 virtual QCString trCompoundMembersDescriptionFortran(bool extractAll) |
|
85 { return english.trCompoundMembersDescriptionFortran(extractAll); } |
|
86 |
|
87 virtual QCString trCompoundIndexFortran() |
|
88 { return english.trCompoundIndexFortran(); } |
|
89 |
|
90 virtual QCString trTypeDocumentation() |
|
91 { return english.trTypeDocumentation(); } |
|
92 |
|
93 virtual QCString trSubprograms() |
|
94 { return english.trSubprograms(); } |
|
95 |
|
96 virtual QCString trSubprogramDocumentation() |
|
97 { return english.trSubprogramDocumentation(); } |
|
98 |
|
99 virtual QCString trDataTypes() |
|
100 { return english.trDataTypes(); } |
|
101 |
|
102 virtual QCString trModulesList() |
|
103 { return english.trModulesList(); } |
|
104 |
|
105 virtual QCString trModulesListDescription(bool extractAll) |
|
106 { return english.trModulesListDescription(extractAll); } |
|
107 |
|
108 virtual QCString trCompoundReferenceFortran(const char *clName, |
|
109 ClassDef::CompoundType compType, |
|
110 bool isTemplate) |
|
111 { return english.trCompoundReferenceFortran(clName,compType,isTemplate); } |
|
112 |
|
113 virtual QCString trModuleReference(const char *namespaceName) |
|
114 { return english.trModuleReference(namespaceName); } |
|
115 |
|
116 virtual QCString trModulesMembers() |
|
117 { return english.trModulesMembers(); } |
|
118 |
|
119 virtual QCString trModulesMemberDescription(bool extractAll) |
|
120 { return english.trModulesMemberDescription(extractAll); } |
|
121 |
|
122 virtual QCString trModulesIndex() |
|
123 { return english.trModulesIndex(); } |
|
124 |
|
125 virtual QCString trModule(bool first_capital, bool singular) |
|
126 { return english.trModule(first_capital,singular); } |
|
127 |
|
128 virtual QCString trGeneratedFromFilesFortran(ClassDef::CompoundType compType, |
|
129 bool single) |
|
130 { return english.trGeneratedFromFilesFortran(compType,single); } |
|
131 |
|
132 virtual QCString trType(bool first_capital, bool singular) |
|
133 { return english.trType(first_capital,singular); } |
|
134 |
|
135 virtual QCString trSubprogram(bool first_capital, bool singular) |
|
136 { return english.trSubprogram(first_capital,singular); } |
|
137 |
|
138 virtual QCString trTypeConstraints() |
|
139 { return english.trTypeConstraints(); } |
|
140 }; |
|
141 |
|
142 class TranslatorAdapter_1_4_6 : public TranslatorAdapter_1_5_4 |
|
143 { |
|
144 public: |
|
145 virtual QCString updateNeededMessage() |
|
146 { return createUpdateNeededMessage(idLanguage(),"release 1.4.6"); } |
|
147 |
|
148 virtual QCString trCallerGraph() |
|
149 { |
|
150 return english.trCallerGraph(); |
|
151 } |
|
152 virtual QCString trEnumerationValueDocumentation() |
|
153 { |
|
154 return english.trEnumerationValueDocumentation(); |
|
155 } |
|
156 }; |
|
157 |
|
158 class TranslatorAdapter_1_4_1 : public TranslatorAdapter_1_4_6 |
|
159 { |
|
160 public: |
|
161 virtual QCString updateNeededMessage() |
|
162 { return createUpdateNeededMessage(idLanguage(),"release 1.4.1"); } |
|
163 |
|
164 virtual QCString trOverloadText() |
|
165 { return english.trOverloadText(); } |
|
166 }; |
|
167 |
|
168 class TranslatorAdapter_1_3_9 : public TranslatorAdapter_1_4_1 |
|
169 { |
|
170 public: |
|
171 virtual QCString updateNeededMessage() |
|
172 { return createUpdateNeededMessage(idLanguage(),"release 1.3.9"); } |
|
173 |
|
174 virtual QCString trDirIndex() |
|
175 { return english.trDirIndex(); } |
|
176 virtual QCString trDirDocumentation() |
|
177 { return english.trDirDocumentation(); } |
|
178 virtual QCString trDirectories() |
|
179 { return english.trDirectories(); } |
|
180 virtual QCString trDirDescription() |
|
181 { return english.trDirDescription(); } |
|
182 virtual QCString trDirReference(const char *dirName) |
|
183 { return english.trDirReference(dirName); } |
|
184 virtual QCString trDir(bool first_capital, bool singular) |
|
185 { return english.trDir(first_capital,singular); } |
|
186 }; |
|
187 |
|
188 class TranslatorAdapter_1_3_8 : public TranslatorAdapter_1_3_9 |
|
189 { |
|
190 public: |
|
191 virtual QCString updateNeededMessage() |
|
192 { return createUpdateNeededMessage(idLanguage(),"release 1.3.8"); } |
|
193 |
|
194 virtual QCString trSourceFile(QCString& filename) |
|
195 { return english.trSourceFile(filename); } |
|
196 }; |
|
197 |
|
198 class TranslatorAdapter_1_3_3 : public TranslatorAdapter_1_3_8 |
|
199 { |
|
200 public: |
|
201 virtual QCString updateNeededMessage() |
|
202 { return createUpdateNeededMessage(idLanguage(),"release 1.3.3"); } |
|
203 |
|
204 virtual QCString trSearchForIndex() |
|
205 { return english.trSearchForIndex(); } |
|
206 virtual QCString trSearchResultsTitle() |
|
207 { return english.trSearchResultsTitle(); } |
|
208 virtual QCString trSearchResults(int numDocuments) |
|
209 { return english.trSearchResults(numDocuments); } |
|
210 virtual QCString trSearchMatches() |
|
211 { return english.trSearchMatches(); } |
|
212 |
|
213 }; |
|
214 |
|
215 class TranslatorAdapter_1_3_1 : public TranslatorAdapter_1_3_3 |
|
216 { |
|
217 public: |
|
218 virtual QCString updateNeededMessage() |
|
219 { return createUpdateNeededMessage(idLanguage(),"release 1.3.1"); } |
|
220 virtual QCString trAll() |
|
221 { return english.trAll(); } |
|
222 virtual QCString trCallGraph() |
|
223 { return english.trCallGraph(); } |
|
224 }; |
|
225 |
|
226 class TranslatorAdapter_1_3 : public TranslatorAdapter_1_3_1 |
|
227 { |
|
228 public: |
|
229 virtual QCString updateNeededMessage() |
|
230 { return createUpdateNeededMessage(idLanguage(),"release 1.3"); } |
|
231 |
|
232 virtual QCString trPackageTypes() |
|
233 { return english.trPackageTypes(); } |
|
234 virtual QCString trPackageMembers() |
|
235 { return english.trPackageMembers(); } |
|
236 virtual QCString trStaticPackageMembers() |
|
237 { return english.trStaticPackageMembers(); } |
|
238 virtual QCString trPackageAttribs() |
|
239 { return english.trPackageAttribs(); } |
|
240 virtual QCString trStaticPackageAttribs() |
|
241 { return english.trStaticPackageAttribs(); } |
|
242 }; |
|
243 |
|
244 class TranslatorAdapter_1_2_18 : public TranslatorAdapter_1_3 |
|
245 { |
|
246 public: |
|
247 virtual QCString updateNeededMessage() |
|
248 { return createUpdateNeededMessage(idLanguage(),"release 1.2.18"); } |
|
249 |
|
250 virtual QCString trEvents() |
|
251 { return english.trEvents(); } |
|
252 virtual QCString trEventDocumentation() |
|
253 { return english.trEventDocumentation(); } |
|
254 }; |
|
255 |
|
256 |
|
257 #endif |
|
258 |