153 t << "else" << endl; |
153 t << "else" << endl; |
154 t << "CLEAN: " << cleanDeps << endl; |
154 t << "CLEAN: " << cleanDeps << endl; |
155 t << "endif" << endl << endl; |
155 t << "endif" << endl << endl; |
156 t << "CLEANLIB: " DO_NOTHING_TARGET << endl << endl; |
156 t << "CLEANLIB: " DO_NOTHING_TARGET << endl << endl; |
157 |
157 |
158 QStringList qmFileNames; |
158 QStringList trFileNames; |
159 QString translationFilename = project->first("TRANSLATIONS"); |
159 if (!project->values("SYMBIANTRANSLATIONS").isEmpty()) { |
160 if (!project->values("SYMBIANTRANSLATIONS").isEmpty() && !translationFilename.isEmpty()) { |
160 QString translationFilename = project->first("TRANSLATIONS"); |
161 QStringList symbianTranslations = project->values("SYMBIANTRANSLATIONS"); |
161 if (!translationFilename.isEmpty()) { |
162 QString symbianTrPath = project->first("SYMBIANTRANSLATIONDIR"); |
162 QStringList symbianTranslations = project->values("SYMBIANTRANSLATIONS"); |
163 t << "RESOURCE: create_qm" << endl << endl; |
163 QString symbianTrPath = project->first("SYMBIANTRANSLATIONDIR"); |
164 t << "create_qm : " << endl; |
164 QString symbianTrSrcPath = project->first("SYMBIANTRANSLATIONSRCDIR"); |
165 foreach (const QString &symbianTrans, symbianTranslations) { |
165 QString symbianWinscwUdebQmPath = project->first("SYMBIANWINSCWUDEBTRANSLATIONDIR"); |
166 QString translationTsFilename(translationFilename); |
166 QString symbianWinscwUrelQmPath = project->first("SYMBIANWINSCWURELTRANSLATIONDIR"); |
167 translationTsFilename.chop(3); |
167 t << "RESOURCE: create_qm" << endl << endl; |
168 translationTsFilename.insert(0,symbianTrPath); |
168 t << "create_qm : " << endl; |
169 translationTsFilename.append(QString::fromLatin1("_")); |
169 foreach (const QString &symbianTrans, symbianTranslations) { |
170 translationTsFilename.append(symbianTrans); |
170 QString translationTsFilename(translationFilename); |
171 QString translationQmFilename(translationTsFilename); |
171 translationTsFilename.chop(3); |
172 translationTsFilename.append(QString::fromLatin1(".ts")); |
172 translationTsFilename.insert(0,symbianTrPath); |
173 translationQmFilename.append(QString::fromLatin1(".qm")); |
173 translationTsFilename.append(QString::fromLatin1("_")); |
174 t << "\t$(EPOCROOT)epoc32\\tools\\qt\\lrelease -silent -idbased " << translationTsFilename << " -qm " << translationQmFilename << endl; |
174 translationTsFilename.append(symbianTrans); |
175 // qmFileNames are needed in RELEASABLES: part |
175 QString translationQmFilename(translationTsFilename); |
176 qmFileNames.append(translationQmFilename); |
176 |
|
177 translationTsFilename.append(QString::fromLatin1(".ts")); |
|
178 // output path for armv5 qm files./epoc32/data/z/resource/qt/translations/ |
|
179 translationQmFilename.append(QString::fromLatin1(".qm")); |
|
180 |
|
181 // input path for ts files. /epoc32/include/platform/qt/translations/ |
|
182 QString translationTsSrcFilename(translationFilename); |
|
183 translationTsSrcFilename.chop(3); |
|
184 translationTsSrcFilename.insert(0,symbianTrSrcPath); |
|
185 translationTsSrcFilename.append(QString::fromLatin1("_")); |
|
186 translationTsSrcFilename.append(symbianTrans); |
|
187 translationTsSrcFilename.append(QString::fromLatin1(".ts")); |
|
188 |
|
189 // output path for winscw qm files. /epoc32/release/winscw/udeb/z/resource/qt/translations/ |
|
190 QString translationQmWinscwUdebFilename(translationFilename); |
|
191 translationQmWinscwUdebFilename.chop(3); |
|
192 translationQmWinscwUdebFilename.insert(0,symbianWinscwUdebQmPath); |
|
193 translationQmWinscwUdebFilename.append(QString::fromLatin1("_")); |
|
194 translationQmWinscwUdebFilename.append(symbianTrans); |
|
195 translationQmWinscwUdebFilename.append(QString::fromLatin1(".qm")); |
|
196 |
|
197 // output path for winscw qm files. /epoc32/release/winscw/urel/z/resource/qt/translations/ |
|
198 QString translationQmWinscwUrelFilename(translationFilename); |
|
199 translationQmWinscwUrelFilename.chop(3); |
|
200 translationQmWinscwUrelFilename.insert(0,symbianWinscwUrelQmPath); |
|
201 translationQmWinscwUrelFilename.append(QString::fromLatin1("_")); |
|
202 translationQmWinscwUrelFilename.append(symbianTrans); |
|
203 translationQmWinscwUrelFilename.append(QString::fromLatin1(".qm")); |
|
204 |
|
205 //these get generated to component mk file. |
|
206 t << "\tlrelease -silent -idbased " << translationTsSrcFilename << " -qm " << translationQmFilename << endl; |
|
207 t << "\tlrelease -silent -idbased " << translationTsSrcFilename << " -qm " << translationQmWinscwUdebFilename << endl; |
|
208 t << "\tlrelease -silent -idbased " << translationTsSrcFilename << " -qm " << translationQmWinscwUrelFilename << endl; |
|
209 |
|
210 // trFileNames QStringList needed in RELEASABLES part |
|
211 trFileNames.append(translationQmFilename); |
|
212 trFileNames.append(translationQmWinscwUdebFilename); |
|
213 trFileNames.append(translationQmWinscwUrelFilename); |
|
214 } |
|
215 t << endl; |
177 } |
216 } |
178 t << endl; |
217 else |
|
218 t << "RESOURCE: " DO_NOTHING_TARGET << endl << endl; |
179 } else { |
219 } else { |
180 t << "RESOURCE: " DO_NOTHING_TARGET << endl << endl; |
220 t << "RESOURCE: " DO_NOTHING_TARGET << endl << endl; |
181 } |
221 } |
182 t << "FREEZE: " DO_NOTHING_TARGET << endl << endl; |
222 t << "FREEZE: " DO_NOTHING_TARGET << endl << endl; |
183 t << "SAVESPACE: " DO_NOTHING_TARGET << endl << endl; |
223 t << "SAVESPACE: " DO_NOTHING_TARGET << endl << endl; |
184 |
224 |
185 if (!project->values("SYMBIANTRANSLATIONS").isEmpty() && !qmFileNames.isEmpty()) { |
225 if (!project->values("SYMBIANTRANSLATIONS").isEmpty()) { |
186 t << "RELEASABLES: list_qm" << endl << endl; |
226 t << "RELEASABLES: list_qm" << endl << endl; |
187 t << "list_qm : " << endl; |
227 t << "list_qm : " << endl; |
188 foreach (const QString &qmFilename, qmFileNames) { |
228 foreach (const QString &trFilename, trFileNames) { |
189 t << "\t@echo " << qmFilename << endl; |
229 t << "\t@echo " << trFilename << endl; |
190 } |
230 } |
191 t << endl; |
231 t << endl; |
192 } else { |
232 } else { |
193 t << "RELEASABLES: " DO_NOTHING_TARGET << endl << endl; |
233 t << "RELEASABLES: " DO_NOTHING_TARGET << endl << endl; |
194 } |
234 } |
195 t << "ifeq \"$(PLATFORM)\" \"WINSCW\"" << endl; |
235 t << "ifeq \"$(PLATFORM)\" \"WINSCW\"" << endl; |