Merge lp:~alexwolf/stellarium/landscape-l10n-description into lp:stellarium

Proposed by Alexander Wolf
Status: Superseded
Proposed branch: lp:~alexwolf/stellarium/landscape-l10n-description
Merge into: lp:stellarium
Diff against target: 308 lines (+93/-14)
27 files modified
landscapes/garching/CMakeLists.txt (+1/-1)
landscapes/garching/description.en.utf8 (+2/-0)
landscapes/garching/description.ru.utf8 (+2/-0)
landscapes/guereins/CMakeLists.txt (+1/-1)
landscapes/guereins/description.en.utf8 (+3/-0)
landscapes/guereins/description.ru.utf8 (+5/-0)
landscapes/hurricane/CMakeLists.txt (+1/-1)
landscapes/hurricane/description.en.utf8 (+5/-0)
landscapes/hurricane/description.ru.utf8 (+5/-0)
landscapes/mars/CMakeLists.txt (+1/-1)
landscapes/mars/description.en.utf8 (+5/-0)
landscapes/mars/description.ru.utf8 (+7/-0)
landscapes/moon/CMakeLists.txt (+1/-1)
landscapes/moon/description.en.utf8 (+2/-0)
landscapes/moon/description.ru.utf8 (+2/-0)
landscapes/moon/landscape.ini (+1/-1)
landscapes/ocean/CMakeLists.txt (+1/-1)
landscapes/ocean/description.en.utf8 (+2/-0)
landscapes/ocean/description.ru.utf8 (+2/-0)
landscapes/saturn/CMakeLists.txt (+1/-1)
landscapes/saturn/description.en.utf8 (+3/-0)
landscapes/saturn/description.ru.utf8 (+2/-0)
landscapes/trees/CMakeLists.txt (+1/-1)
landscapes/trees/description.en.utf8 (+2/-0)
landscapes/trees/description.ru.utf8 (+2/-0)
src/core/modules/LandscapeMgr.cpp (+30/-5)
src/core/modules/LandscapeMgr.hpp (+3/-0)
To merge this branch: bzr merge lp:~alexwolf/stellarium/landscape-l10n-description
Reviewer Review Type Date Requested Status
Fabien Chéreau Needs Fixing
Review via email: mp+62886@code.launchpad.net

This proposal supersedes a proposal from 2011-05-26.

This proposal has been superseded by a proposal from 2011-05-30.

To post a comment you must log in.
Revision history for this message
Alexander Wolf (alexwolf) wrote : Posted in a previous version of this proposal

I'm isolate a patch that adds support only the description for
landscapes (answer for request from branch landscape-l10n)

Revision history for this message
Fabien Chéreau (xalioth) wrote : Posted in a previous version of this proposal

Please get rid of the version string. It's unused.
Also I saw you added russian translations. they don't seem to match the english ones (they contain more info). Please try to keep the versions synchronized! E.g. complete the english versions to match the russian ones.

review: Needs Fixing
Revision history for this message
Fabien Chéreau (xalioth) wrote :

 * Please suppress remaining useless declaration in Landscape.hpp
 * Please avoid committing un-necessary changes in stellarium.pot/ stellarium-skycultures.pot

review: Needs Fixing
4891. By Alexander Wolf

Sync *.pot with trunk, killed "QString version" line

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'landscapes/garching/CMakeLists.txt'
2--- landscapes/garching/CMakeLists.txt 2007-06-14 14:50:39 +0000
3+++ landscapes/garching/CMakeLists.txt 2011-05-30 14:50:47 +0000
4@@ -1,4 +1,4 @@
5
6 ########### install files ###############
7
8-INSTALL (FILES landscape.ini garching-gl1.png garching-gl2.png garching-gl3.png garching-gl4.png garching-ground3.png DESTINATION share/${PACKAGE}/landscapes/garching )
9+INSTALL (FILES landscape.ini description.en.utf8 description.ru.utf8 garching-gl1.png garching-gl2.png garching-gl3.png garching-gl4.png garching-ground3.png DESTINATION share/${PACKAGE}/landscapes/garching )
10
11=== added file 'landscapes/garching/description.en.utf8'
12--- landscapes/garching/description.en.utf8 1970-01-01 00:00:00 +0000
13+++ landscapes/garching/description.en.utf8 2011-05-30 14:50:47 +0000
14@@ -0,0 +1,2 @@
15+<h2>Garching</h2>
16+<p>A view from the ESO headquarters in Garching bei Munchen, Germany.
17
18=== added file 'landscapes/garching/description.ru.utf8'
19--- landscapes/garching/description.ru.utf8 1970-01-01 00:00:00 +0000
20+++ landscapes/garching/description.ru.utf8 2011-05-30 14:50:47 +0000
21@@ -0,0 +1,2 @@
22+<h2>Гархинг</h2>
23+<p>Вид из головного офиса <a href="http://ru.wikipedia.org/wiki/Европейская_южная_обсерватория">Европейской южной обсерватории</a> в Гархинге (<i>нем.</i> <a href="http://ru.wikipedia.org/wiki/Гархинг" title="Информация в википедии">Garching bei München</a>), Германия.
24
25=== modified file 'landscapes/guereins/CMakeLists.txt'
26--- landscapes/guereins/CMakeLists.txt 2007-06-14 14:50:39 +0000
27+++ landscapes/guereins/CMakeLists.txt 2011-05-30 14:50:47 +0000
28@@ -1,5 +1,5 @@
29
30 ########### install files ###############
31
32-INSTALL(FILES landscape.ini guereinsb.png guereins1.png guereins2.png guereins3.png guereins4.png guereins5.png guereins6.png guereins7.png guereins8.png DESTINATION share/${PACKAGE}/landscapes/guereins)
33+INSTALL(FILES landscape.ini description.en.utf8 description.ru.utf8 guereinsb.png guereins1.png guereins2.png guereins3.png guereins4.png guereins5.png guereins6.png guereins7.png guereins8.png DESTINATION share/${PACKAGE}/landscapes/guereins)
34
35
36=== added file 'landscapes/guereins/description.en.utf8'
37--- landscapes/guereins/description.en.utf8 1970-01-01 00:00:00 +0000
38+++ landscapes/guereins/description.en.utf8 2011-05-30 14:50:47 +0000
39@@ -0,0 +1,3 @@
40+<h2>Guereins</h2>
41+<p>Guéreins is a small french village in the Valley of the Saône river, 50 km North of Lyon. In the west stand the small mountains of the "Beaujolais" where the famous wine is produced. It is also the town where Stellarium was born :)
42+
43
44=== added file 'landscapes/guereins/description.ru.utf8'
45--- landscapes/guereins/description.ru.utf8 1970-01-01 00:00:00 +0000
46+++ landscapes/guereins/description.ru.utf8 2011-05-30 14:50:47 +0000
47@@ -0,0 +1,5 @@
48+<h2>Герен</h2>
49+<p>Герен (<i>фр.</i> <a href="http://fr.wikipedia.org/wiki/Guéreins" title="Информация в википедии">Guéreins</a>) &ndash;
50+небольшая французская деревушка в долине реки Сона в 50 км севернее Лиона. Она находится в западной части небольших гор
51+"Божоле", где производится знаменитое <a href="http://ru.wikipedia.org/wiki/Божоле_нуво" title="Божоле нуво">вино</a>.
52+Ко всему прочему это также местечко, в котором родился Stellarium :)
53
54=== modified file 'landscapes/hurricane/CMakeLists.txt'
55--- landscapes/hurricane/CMakeLists.txt 2007-06-14 14:50:39 +0000
56+++ landscapes/hurricane/CMakeLists.txt 2011-05-30 14:50:47 +0000
57@@ -1,5 +1,5 @@
58
59 ########### install files ###############
60
61-INSTALL(FILES landscape.ini hurricaneb.png hurricane1.png hurricane2.png hurricane3.png hurricane4.png hurricane5.png hurricane6.png hurricane7.png hurricane8.png DESTINATION share/${PACKAGE}/landscapes/hurricane)
62+INSTALL(FILES landscape.ini description.en.utf8 description.ru.utf8 hurricaneb.png hurricane1.png hurricane2.png hurricane3.png hurricane4.png hurricane5.png hurricane6.png hurricane7.png hurricane8.png DESTINATION share/${PACKAGE}/landscapes/hurricane)
63
64
65=== added file 'landscapes/hurricane/description.en.utf8'
66--- landscapes/hurricane/description.en.utf8 1970-01-01 00:00:00 +0000
67+++ landscapes/hurricane/description.en.utf8 2011-05-30 14:50:47 +0000
68@@ -0,0 +1,5 @@
69+<h2>Hurricane</h2>
70+<p>An edited view from Hurricane Ridge in Olympic National Park, Washington. In reality there is an expansive view of the
71+rest of the Olympic range to the South but lighting conditions were poor.
72+
73+
74
75=== added file 'landscapes/hurricane/description.ru.utf8'
76--- landscapes/hurricane/description.ru.utf8 1970-01-01 00:00:00 +0000
77+++ landscapes/hurricane/description.ru.utf8 2011-05-30 14:50:47 +0000
78@@ -0,0 +1,5 @@
79+<h2>Ураган</h2>
80+<p>Обновлённый вид с Ураган Ридж (Hurricane Ridge) в Национальном парке Олимпик в штате Вашингтон. В действительности
81+существует более обзорный вид зоны отдыха на юге парка Олимпик, но с плохими условиями освещения.
82+
83+
84
85=== modified file 'landscapes/mars/CMakeLists.txt'
86--- landscapes/mars/CMakeLists.txt 2008-09-22 12:32:47 +0000
87+++ landscapes/mars/CMakeLists.txt 2011-05-30 14:50:47 +0000
88@@ -1,5 +1,5 @@
89
90 ########### install files ###############
91
92-INSTALL(FILES landscape.ini mars.png DESTINATION share/${PACKAGE}/landscapes/mars)
93+INSTALL(FILES landscape.ini description.en.utf8 description.ru.utf8 mars.png DESTINATION share/${PACKAGE}/landscapes/mars)
94
95
96=== added file 'landscapes/mars/description.en.utf8'
97--- landscapes/mars/description.en.utf8 1970-01-01 00:00:00 +0000
98+++ landscapes/mars/description.en.utf8 2011-05-30 14:50:47 +0000
99@@ -0,0 +1,5 @@
100+<h2>Mars</h2>
101+<p> The panoramic camera on NASA's Mars Exploration Rover Spirit took the hundreds of images combined into this 360-degree view, the "Husband Hill Summit" panorama. The images were acquired on Spirit's sols 583 to 586 (Aug. 24 to 27, 2005), shortly after the rover reached the crest of "Husband Hill" inside Mars' Gusev Crater.
102+
103+
104+
105
106=== added file 'landscapes/mars/description.ru.utf8'
107--- landscapes/mars/description.ru.utf8 1970-01-01 00:00:00 +0000
108+++ landscapes/mars/description.ru.utf8 2011-05-30 14:50:47 +0000
109@@ -0,0 +1,7 @@
110+<h2>Марс</h2>
111+<p>Панорамная камера на борту марсохода Spirit сделала сотни изображений, объединенных в этой 360-градусной панораме
112+"Husband Hill Summit". Фотографии были сделаны марсоходом с 583 по 586 день (с 24 по 27 августа 2005 г.) вскоре после
113+достижения им гребня "Husband Hill" в кратере Гусева на Марсе.
114+
115+
116+
117
118=== modified file 'landscapes/moon/CMakeLists.txt'
119--- landscapes/moon/CMakeLists.txt 2007-06-14 14:50:39 +0000
120+++ landscapes/moon/CMakeLists.txt 2011-05-30 14:50:47 +0000
121@@ -1,5 +1,5 @@
122
123 ########### install files ###############
124
125-INSTALL(FILES landscape.ini apollo17.png DESTINATION share/${PACKAGE}/landscapes/moon)
126+INSTALL(FILES landscape.ini description.en.utf8 description.ru.utf8 apollo17.png DESTINATION share/${PACKAGE}/landscapes/moon)
127
128
129=== added file 'landscapes/moon/description.en.utf8'
130--- landscapes/moon/description.en.utf8 1970-01-01 00:00:00 +0000
131+++ landscapes/moon/description.en.utf8 2011-05-30 14:50:47 +0000
132@@ -0,0 +1,2 @@
133+<h2>Moon</h2>
134+<p>Photo taken from Apollo Mission
135
136=== added file 'landscapes/moon/description.ru.utf8'
137--- landscapes/moon/description.ru.utf8 1970-01-01 00:00:00 +0000
138+++ landscapes/moon/description.ru.utf8 2011-05-30 14:50:47 +0000
139@@ -0,0 +1,2 @@
140+<h2>Луна</h2>
141+<p>Панорама Луны, сделанная во время миссии Аполлон
142
143=== modified file 'landscapes/moon/landscape.ini'
144--- landscapes/moon/landscape.ini 2007-06-04 20:51:58 +0000
145+++ landscapes/moon/landscape.ini 2011-05-30 14:50:47 +0000
146@@ -1,6 +1,6 @@
147 [landscape]
148 name = Moon
149-author = Nasa
150+author = NASA
151 description = Photo taken from Apollo Mission
152 type = spherical
153 maptex = apollo17.png
154
155=== modified file 'landscapes/ocean/CMakeLists.txt'
156--- landscapes/ocean/CMakeLists.txt 2007-06-14 14:50:39 +0000
157+++ landscapes/ocean/CMakeLists.txt 2011-05-30 14:50:47 +0000
158@@ -1,5 +1,5 @@
159
160 ########### install files ###############
161
162-INSTALL(FILES landscape.ini ocean1.png ocean2.png ocean3.png ocean4.png ocean5.png ocean6.png ocean7.png ocean8.png ocean9.png DESTINATION share/${PACKAGE}/landscapes/ocean)
163+INSTALL(FILES landscape.ini description.en.utf8 description.ru.utf8 ocean1.png ocean2.png ocean3.png ocean4.png ocean5.png ocean6.png ocean7.png ocean8.png ocean9.png DESTINATION share/${PACKAGE}/landscapes/ocean)
164
165
166=== added file 'landscapes/ocean/description.en.utf8'
167--- landscapes/ocean/description.en.utf8 1970-01-01 00:00:00 +0000
168+++ landscapes/ocean/description.en.utf8 2011-05-30 14:50:47 +0000
169@@ -0,0 +1,2 @@
170+<h2>Ocean</h2>
171+<p>Made with Terragen.
172
173=== added file 'landscapes/ocean/description.ru.utf8'
174--- landscapes/ocean/description.ru.utf8 1970-01-01 00:00:00 +0000
175+++ landscapes/ocean/description.ru.utf8 2011-05-30 14:50:47 +0000
176@@ -0,0 +1,2 @@
177+<h2>Океан</h2>
178+<p>Нарисовано с помощью Terragen'а
179
180=== modified file 'landscapes/saturn/CMakeLists.txt'
181--- landscapes/saturn/CMakeLists.txt 2010-04-21 18:35:48 +0000
182+++ landscapes/saturn/CMakeLists.txt 2011-05-30 14:50:47 +0000
183@@ -1,5 +1,5 @@
184
185 ########### install files ###############
186
187-INSTALL(FILES landscape.ini saturn-256.png DESTINATION share/${PACKAGE}/landscapes/saturn)
188+INSTALL(FILES landscape.ini description.en.utf8 description.ru.utf8 saturn-256.png DESTINATION share/${PACKAGE}/landscapes/saturn)
189
190
191=== added file 'landscapes/saturn/description.en.utf8'
192--- landscapes/saturn/description.en.utf8 1970-01-01 00:00:00 +0000
193+++ landscapes/saturn/description.en.utf8 2011-05-30 14:50:47 +0000
194@@ -0,0 +1,3 @@
195+<h2>Saturn</h2>
196+<p>Simple Saturn gas surface ("top of atmosphere")
197+
198
199=== added file 'landscapes/saturn/description.ru.utf8'
200--- landscapes/saturn/description.ru.utf8 1970-01-01 00:00:00 +0000
201+++ landscapes/saturn/description.ru.utf8 2011-05-30 14:50:47 +0000
202@@ -0,0 +1,2 @@
203+<h2>Сатурн</h2>
204+<p>Просто газовая поверхность Сатурна ("верхних слоев атмосферы")
205
206=== modified file 'landscapes/trees/CMakeLists.txt'
207--- landscapes/trees/CMakeLists.txt 2007-06-14 14:50:39 +0000
208+++ landscapes/trees/CMakeLists.txt 2011-05-30 14:50:47 +0000
209@@ -1,5 +1,5 @@
210
211 ########### install files ###############
212
213-INSTALL(FILES landscape.ini trees_512.png DESTINATION share/${PACKAGE}/landscapes/trees)
214+INSTALL(FILES landscape.ini description.en.utf8 description.ru.utf8 trees_512.png DESTINATION share/${PACKAGE}/landscapes/trees)
215
216
217=== added file 'landscapes/trees/description.en.utf8'
218--- landscapes/trees/description.en.utf8 1970-01-01 00:00:00 +0000
219+++ landscapes/trees/description.en.utf8 2011-05-30 14:50:47 +0000
220@@ -0,0 +1,2 @@
221+<h2>Trees</h2>
222+<p>Trees in Greenlake Park, Seattle
223
224=== added file 'landscapes/trees/description.ru.utf8'
225--- landscapes/trees/description.ru.utf8 1970-01-01 00:00:00 +0000
226+++ landscapes/trees/description.ru.utf8 2011-05-30 14:50:47 +0000
227@@ -0,0 +1,2 @@
228+<h2>Деревья</h2>
229+<p>Деревья в парке Гринлейк, Сиэтл
230
231=== modified file 'src/core/modules/LandscapeMgr.cpp'
232--- src/core/modules/LandscapeMgr.cpp 2011-01-29 18:14:28 +0000
233+++ src/core/modules/LandscapeMgr.cpp 2011-05-30 14:50:47 +0000
234@@ -2,6 +2,7 @@
235 * Stellarium
236 * Copyright (C) 2006 Fabien Chereau
237 * Copyright (C) 2010 Bogdan Marinov (add/remove landscapes feature)
238+ * Copyright (C) 2011 Alexander Wolf
239 *
240 * This program is free software; you can redistribute it and/or
241 * modify it under the terms of the GNU General Public License
242@@ -444,9 +445,10 @@
243
244 QString LandscapeMgr::getCurrentLandscapeHtmlDescription() const
245 {
246- QString desc = QString("<h3>%1</h3>").arg(landscape->getName());
247- desc += landscape->getDescription();
248- desc+="<br><br>";
249+ SolarSystem* ssmgr = GETSTELMODULE(SolarSystem);
250+ QString planetName = ssmgr->searchByEnglishName(landscape->getLocation().planetName)->getNameI18n();
251+ QString desc = getDescription();
252+ desc+="<p>";
253 desc+="<b>"+q_("Author: ")+"</b>";
254 desc+=landscape->getAuthorName();
255 desc+="<br>";
256@@ -456,9 +458,9 @@
257 desc += StelUtils::radToDmsStrAdapt(landscape->getLocation().longitude * M_PI/180.);
258 desc += "/" + StelUtils::radToDmsStrAdapt(landscape->getLocation().latitude *M_PI/180.);
259 desc += QString(q_(", %1 m")).arg(landscape->getLocation().altitude);
260- if (landscape->getLocation().planetName!="")
261+ if (planetName!="")
262 {
263- desc += "<br><b>"+q_("Planet: ")+"</b>"+landscape->getLocation().planetName;
264+ desc += "<br><b>"+q_("Planet: ")+"</b>"+planetName;
265 }
266 desc += "<br><br>";
267 }
268@@ -922,3 +924,26 @@
269
270 return landscapeSize;
271 }
272+
273+QString LandscapeMgr::getDescription() const
274+{
275+ QString lang = StelApp::getInstance().getLocaleMgr().getAppLanguage();
276+ QString descriptionFile = StelFileMgr::findFile("landscapes/" + getCurrentLandscapeID(), StelFileMgr::Directory) + "/description." + lang + ".utf8";
277+ QString desc;
278+
279+ if(QFileInfo(descriptionFile).exists())
280+ {
281+ QFile file(descriptionFile);
282+ file.open(QIODevice::ReadOnly | QIODevice::Text);
283+ QTextStream in(&file);
284+ desc = in.readAll();
285+ file.close();
286+ }
287+ else
288+ {
289+ desc = QString("<h2>%1</h2>").arg(q_(landscape->getName()));
290+ desc += landscape->getDescription();
291+ }
292+
293+ return desc;
294+}
295
296=== modified file 'src/core/modules/LandscapeMgr.hpp'
297--- src/core/modules/LandscapeMgr.hpp 2011-01-29 18:14:28 +0000
298+++ src/core/modules/LandscapeMgr.hpp 2011-05-30 14:50:47 +0000
299@@ -128,6 +128,9 @@
300 //! Return a pseudo HTML formated string with all informations on the current landscape
301 QString getCurrentLandscapeHtmlDescription() const;
302
303+ //! Return a pseudo HTML formated string with information from description or ini file
304+ QString getDescription() const;
305+
306 //! Get flag for displaying Landscape.
307 bool getFlagLandscape() const;
308 //! Set flag for displaying Landscape.