Merge lp:~widelands-dev/widelands/i18nfixes into lp:widelands

Proposed by GunChleoc
Status: Merged
Merged at revision: 7227
Proposed branch: lp:~widelands-dev/widelands/i18nfixes
Merge into: lp:widelands
Diff against target: 7107 lines (+2206/-3249)
96 files modified
campaigns/atl01.wmf/elemental (+1/-1)
campaigns/cconfig (+12/-9)
campaigns/dummy.wmf/elemental (+2/-1)
campaigns/emp01.wmf/elemental (+1/-1)
campaigns/emp02.wmf/elemental (+1/-1)
campaigns/t01.wmf/elemental (+1/-1)
campaigns/t02.wmf/elemental (+1/-1)
campaigns/t03.wmf/elemental (+2/-2)
campaigns/tutorial01.wmf/elemental (+1/-1)
maps/Atoll.wmf/elemental (+5/-1)
maps/Calvisson.wmf/elemental (+20/-1)
maps/Crossing the horizon.wmf/elemental (+0/-2)
maps/Desert Tournament.wmf/elemental (+5/-1)
maps/Elven Forests.wmf/elemental (+10/-1)
maps/Four Castles.wmf/elemental (+5/-1)
maps/Four Mountains.wmf/elemental (+10/-1)
maps/Long, long way.wmf/elemental (+25/-1)
maps/MP Scenarios/Smugglers.wmf/elemental (+7/-2)
maps/Plateau.wmf/elemental (+4/-1)
maps/Rendez-Vous.wmf/elemental (+0/-1)
maps/Swamp Monks.wmf/elemental (+5/-1)
maps/The Nile.wmf/elemental (+30/-1)
maps/Trident of Fire.wmf/elemental (+20/-0)
po/mp_scenario_together_we_re_strong.wmf/ar.po (+0/-43)
po/mp_scenario_together_we_re_strong.wmf/ca.po (+0/-43)
po/mp_scenario_together_we_re_strong.wmf/cs.po (+0/-45)
po/mp_scenario_together_we_re_strong.wmf/de.po (+0/-45)
po/mp_scenario_together_we_re_strong.wmf/en_GB.po (+0/-44)
po/mp_scenario_together_we_re_strong.wmf/eo.po (+0/-43)
po/mp_scenario_together_we_re_strong.wmf/es.po (+0/-44)
po/mp_scenario_together_we_re_strong.wmf/eu.po (+0/-45)
po/mp_scenario_together_we_re_strong.wmf/fi.po (+0/-43)
po/mp_scenario_together_we_re_strong.wmf/fr.po (+0/-45)
po/mp_scenario_together_we_re_strong.wmf/gd.po (+0/-47)
po/mp_scenario_together_we_re_strong.wmf/hr.po (+0/-44)
po/mp_scenario_together_we_re_strong.wmf/hu.po (+0/-43)
po/mp_scenario_together_we_re_strong.wmf/it.po (+0/-44)
po/mp_scenario_together_we_re_strong.wmf/ja.po (+0/-43)
po/mp_scenario_together_we_re_strong.wmf/la.po (+0/-44)
po/mp_scenario_together_we_re_strong.wmf/lt.po (+0/-43)
po/mp_scenario_together_we_re_strong.wmf/mp_scenario_together_we_re_strong.wmf.pot (+0/-46)
po/mp_scenario_together_we_re_strong.wmf/nb.po (+0/-44)
po/mp_scenario_together_we_re_strong.wmf/nl.po (+0/-45)
po/mp_scenario_together_we_re_strong.wmf/oc.po (+0/-45)
po/mp_scenario_together_we_re_strong.wmf/pl.po (+0/-44)
po/mp_scenario_together_we_re_strong.wmf/pt.po (+0/-74)
po/mp_scenario_together_we_re_strong.wmf/pt_BR.po (+0/-45)
po/mp_scenario_together_we_re_strong.wmf/ru.po (+0/-44)
po/mp_scenario_together_we_re_strong.wmf/sk.po (+0/-43)
po/mp_scenario_together_we_re_strong.wmf/sv.po (+0/-45)
po/mp_scenario_together_we_re_strong.wmf/tr.po (+0/-44)
po/mp_scenario_together_we_re_strong.wmf/zh_TW.po (+0/-43)
src/ai/defaultai.cc (+2/-3)
src/base/i18n.cc (+11/-4)
src/base/i18n.h (+1/-1)
src/base/time_string.cc (+59/-32)
src/base/time_string.h (+1/-4)
src/editor/tools/editor_info_tool.cc (+2/-2)
src/editor/ui_menus/editor_main_menu_load_map.cc (+3/-2)
src/editor/ui_menus/editor_main_menu_map_options.cc (+4/-4)
src/editor/ui_menus/editor_main_menu_save_map.cc (+2/-2)
src/game_io/game_preload_packet.cc (+2/-14)
src/game_io/game_preload_packet.h (+2/-10)
src/logic/game.cc (+1/-0)
src/logic/map.cc (+36/-35)
src/logic/map.h (+28/-20)
src/map_io/map_elemental_packet.cc (+44/-1)
src/map_io/map_loader.h (+1/-1)
src/map_io/s2map.cc (+3/-3)
src/map_io/s2map.h (+1/-1)
src/network/nethost.cc (+12/-14)
src/scripting/lua_game.cc (+6/-6)
src/ui_basic/multilinetextarea.cc (+5/-0)
src/ui_basic/multilinetextarea.h (+1/-0)
src/ui_basic/table.cc (+1/-1)
src/ui_basic/table.h (+1/-1)
src/ui_fsmenu/CMakeLists.txt (+4/-4)
src/ui_fsmenu/campaign_select.cc (+305/-263)
src/ui_fsmenu/campaign_select.h (+71/-44)
src/ui_fsmenu/editor_mapselect.cc (+0/-264)
src/ui_fsmenu/editor_mapselect.h (+0/-62)
src/ui_fsmenu/launch_mpg.cc (+32/-16)
src/ui_fsmenu/launch_mpg.h (+9/-1)
src/ui_fsmenu/launch_spg.cc (+1/-1)
src/ui_fsmenu/load_map_or_game.cc (+98/-0)
src/ui_fsmenu/load_map_or_game.h (+120/-0)
src/ui_fsmenu/loadgame.cc (+424/-286)
src/ui_fsmenu/loadgame.h (+63/-41)
src/ui_fsmenu/loadreplay.cc (+0/-340)
src/ui_fsmenu/loadreplay.h (+0/-69)
src/ui_fsmenu/mapselect.cc (+416/-305)
src/ui_fsmenu/mapselect.h (+58/-39)
src/ui_fsmenu/suggested_teams_box.cc (+136/-0)
src/ui_fsmenu/suggested_teams_box.h (+60/-0)
src/wlapplication.cc (+10/-8)
src/wui/buildingwindow.cc (+2/-2)
To merge this branch: bzr merge lp:~widelands-dev/widelands/i18nfixes
Reviewer Review Type Date Requested Status
SirVer Approve
TiborB Approve
Review via email: mp+238137@code.launchpad.net

Description of the change

Improved Fullscreen Menus for loading map or game files.

The classes have been pretty much gutted and rebuilt, so for campaign_select, mapselect, loadgame and the new file load_map_or_game, it might be easier to browse the code than looking at the diff.

- General layout cleanup.
- Using relative layout and constants for easier customization later on.
- Common superclass to make layout more consistent.
- Unified mapselet and editor_mapselect
- Unified loadgame and loadreplay
- Converted all lists to sortable tables.
- New graphical "Suggested Teams" box. Added this to LaunchMPG as well (LaunchMPG will be refactored later).
- Deleted obsolete gettext catalogs for "Together We're Strong"
- Scenarios now always load as scenarios
- Added scenario filter and option to unlocalize map names
- Improved text for confirmation box when deleting a game/replay
- Common keybindings
- Higher table headers to fit font descenders (this is a global change)
- Diverse string fixes and improvements. New tooltips.

Screens to test:

Single Player -> New Game (= mapselect)
Single Player -> Campaigns (= campaign_select)
Single Player -> Load Game (= loadgame)

Multiplayer -> LAN / Direct IP -> Host a new game -> Map (= mapselect)

Watch Replay (= loadgame)

Editor -> Load Map (= mapselect)

To post a comment you must log in.
Revision history for this message
TiborB (tiborb95) wrote :

when I in 'Multiplayer Game Setup' / 'Please select' window clicked new map I got:

Program received signal SIGSEGV, Segmentation fault.
0x0877ce50 in UI::Statebox::get_state (this=0xd8) at /var/widelands/BZR/i18nfixes/src/ui_basic/checkbox.h:51
51 bool get_state() const {return m_flags & Is_Checked;}

backtrace:

 #0 0x0877ce50 in UI::Statebox::get_state (this=0xd8) at /var/widelands/BZR/i18nfixes/src/ui_basic/checkbox.h:51
 #1 0x08974ed8 in FullscreenMenuMapSelect::fill_table (this=0xbfffc024) at /var/widelands/BZR/i18nfixes/src/ui_fsmenu/mapselect.cc:511
 #2 0x089765f8 in FullscreenMenuMapSelect::_tagbox_changed (this=0xbfffc024, id=0, to=true)
     at /var/widelands/BZR/i18nfixes/src/ui_fsmenu/mapselect.cc:662
 #3 0x0897b6aa in boost::_mfi::mf2<void, FullscreenMenuMapSelect, int, bool>::operator() (this=0x97bf948, p=0xbfffc024, a1=0, a2=true)
     at /usr/include/boost/bind/mem_fn_template.hpp:280
 #4 0x0897b112 in boost::_bi::list3<boost::_bi::value<FullscreenMenuMapSelect*>, boost::_bi::value<int>, boost::arg<1> >::operator()<boost::_mfi::mf2<void, FullscreenMenuMapSelect, int, bool>, boost::_bi::list1<bool&> > (this=0x97bf950, f=..., a=...)
     at /usr/include/boost/bind/bind.hpp:392
 #5 0x0897ab99 in boost::_bi::bind_t<void, boost::_mfi::mf2<void, FullscreenMenuMapSelect, int, bool>, boost::_bi::list3<boost::_bi::value<FullscreenMenuMapSelect*>, boost::_bi::value<int>, boost::arg<1> > >::operator()<bool> (this=0x97bf948, a1=@0xbfffb8cc: true)
     at /usr/include/boost/bind/bind_template.hpp:32

review: Needs Fixing
Revision history for this message
GunChleoc (gunchleoc) wrote :

I can't reproduce this, but I fond something else I overlooked: Multiplayer also has a load map feature. So I should filter here for MP games only.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Multiplayer load game is done now.

Still can't reproduce Tibor's bug.

Revision history for this message
TiborB (tiborb95) wrote :

Well, now I got different crash:

/var/widelands/BZR/i18nfixes-installed/bin/widelands
Set home directory: /home/tibor/.widelands
Widelands executable directory: /var/widelands/BZR/i18nfixes-installed/bin/
full path: /var/widelands/BZR/i18nfixes-installed/bin/var
Adding directory: /var/widelands/BZR/i18nfixes-installed/bin/var/share/widelands
terminate called after throwing an instance of 'FileNotFoundError'
  what(): FileSystem::create: could not find file or directory: /var/widelands/BZR/i18nfixes-installed/bin/var/share/widelands
Aborted (core dumped)

note that 'full path: /var/widelands/BZR/i18nfixes-installed/bin/var' - is no correct and the rest is also not correct.

But I am using nonstandard compilation script, as I can see there were changes to compile.sh, so I will have to review and modify my installation script. So If nobody else has a problem, it is probably problem on my side only. I will let you know...

Revision history for this message
GunChleoc (gunchleoc) wrote :

This looks like a basic directory for Widelands in general is not found, so it can't be connected to my changes. I guess your instinct here is correct.

You could try not installing, just compiling and running.

Revision history for this message
TiborB (tiborb95) wrote :

All right, I used the compile.sh script...

but crash is still there:
 Lan/Direct IP -> Host a new game -> map => crash

Revision history for this message
GunChleoc (gunchleoc) wrote :

I still can't reproduce this bug, so I don't know how to fix it. I will be without my dev machine for a week now anyway. Do you you have time to go bug hunting?

Revision history for this message
TiborB (tiborb95) wrote :

I get the crash again - on different place - single player, in screen 'Launch game', I hit 'back' and got the same crash, backtrace points again to:

.....checkbox.h:51
51 bool get_state() const {return m_flags & Is_Checked;}

I am completely unfamiliar to this code.... no, I dont feel like digging into this problem...

Revision history for this message
TiborB (tiborb95) wrote :

all right, at least something. 'm_flags' does not exist in the context... this is why it crashes

Revision history for this message
GunChleoc (gunchleoc) wrote :

Thanks for checking.

Revision history for this message
GunChleoc (gunchleoc) wrote :

@Tibor: Since I can't reproduce this myself, could you please check if the crash is still happening for you after my last commit?

Revision history for this message
TiborB (tiborb95) wrote :

still crashes (rev 7276)
Do this:
launch game -> Multiplayer -> Lan/Direct IP -> Host a new game -> map => crash

Really this does not crash on your PC? I can not understand this...

Revision history for this message
GunChleoc (gunchleoc) wrote :

I really get no crash. And I tried both with an English language interface (no checkbox) and with a translated language interface (with checkbox).

Working off your stack trace, I tried something else. How is it now?

If it still crashes, does it crash for "Single Player" -> "New Game" and "Editor" -> "Load Map" as well, or does it crash for multiplayer only?

Revision history for this message
SirVer (sirver) wrote :

I see a crash too when I try to select a map. It is an "image not found" exception with an empty image. It is the same crash that I see in the SDL2 branch (see bug 1380048) and now I went back and tried it in trunk and it is there too.

Revision history for this message
TiborB (tiborb95) wrote :

Well it does not crash anymore! Good for me...

Revision history for this message
GunChleoc (gunchleoc) wrote :

Glad we found it :)

So, this should be ready for merging now?

Revision history for this message
TiborB (tiborb95) wrote :

For me it looks OK, you have my approve

review: Approve
Revision history for this message
SirVer (sirver) wrote :

I only skimmed this since Tibor already approved, but I did not see anything that stood out negative. I also ran it real quick and like the new menu structure - the teams graphics are awesome! Though I would change the headline to read "Suggested teams" or "Balanced team suggestions" as the players are free to choose the teams as they want of course.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'campaigns/atl01.wmf/elemental'
2--- campaigns/atl01.wmf/elemental 2014-10-04 18:23:52 +0000
3+++ campaigns/atl01.wmf/elemental 2014-10-27 09:37:32 +0000
4@@ -6,7 +6,7 @@
5 map_h="160"
6 nr_players="1"
7 world="greenland"
8-name=_"01 – From Nemesis to Genesis"
9+name=_"From Nemesis to Genesis"
10 author="SirVer,Nasenbaer"
11 descr=_ "After landing on a mysterious island close to Atlantis, the remaining Atlanteans struggle to make a new home for themselves."
12 background="campaigns/atl01.wmf/pics/background.jpg"
13
14=== modified file 'campaigns/cconfig'
15--- campaigns/cconfig 2014-02-25 10:47:47 +0000
16+++ campaigns/cconfig 2014-10-27 09:37:32 +0000
17@@ -24,22 +24,25 @@
18 [global]
19 version = 6
20 # Barbarians Introduction
21-campname0=_"Barbarians – The Second Empire"
22+campname0=_"The Second Empire"
23 campsect0=barbariantut
24+camptribe0=_"Barbarians"
25 campdiff0=1
26 campdiffdescr0=_"Easy. Introduces the Barbarians"
27 campdesc0=_"When Chat’Karuth died, he was an old man, father to three strong and ambitious sons, and warlord to an army that could match any enemy willing to rise against the ancient forests. Though at the end of his glorious reign, Chat’Karuth chose his eldest son, Thron, to succeed him as the tribe’s warlord – a decision that left his two brothers unsatisfied. The old warlord knew that. As his father instructed him, Thron left the capital of Al’thunran, the home of the Throne Among the Trees, and withdrew his forces to the high hills where he buried the corpse of his father. There he swore to the gods and his father’s spirit that he’d return to re-established order. While his brothers have raged blind war against Thron and the few forces he left to secure the borders of Al’thunran, the young warlord seeks to reunite his ambitious brothers and force the tribes to march once again under a common banner."
28 campvisi0=1
29 # Empire Introduction
30-campname1=_"Empire – The Months of Exile"
31+campname1=_"The Months of Exile"
32 campsect1=empiretut
33+camptribe1=_"Empire"
34 campdiff1=1
35 campdiffdescr1=_"Easy. Introduces the Empire"
36 campdesc1=_"Six months ago, Lutius – a young general of the Empire – was sent with 150 soldiers to the frontier beyond the northern forests where Barbarian tribes were crossing onto land held by the Empire. His task was to defend the Empire’s land. At first, everything was calm. He even talked to a few barbarian children and thought about a peaceful life – side by side with this archaic folk. He began to feel safer and his army began to drop their attention off the potential enemy. That was their undoing. One night in March his unprepared army was attacked by 100 barbarian footmen and was completely scattered. Only with his bare life he and a handful of his soldiers survived."
37 campvisi1=0
38 # Atlantean Introduction
39-campname2=_"Atlanteans – The Run for the Fire"
40+campname2=_"The Run for the Fire"
41 campsect2=atlanteans
42+camptribe2=_"Atlanteans"
43 campdiff2=2
44 campdiffdescr2=_"Challenging. Introduces the Atlanteans"
45 campdesc2=_"When their God lost faith in the Atlanteans and drowned their island, one woman’s struggle for justice and a second chance for her people would become the stuff of legends. Leading the remaining Atlanteans into a new future in a new part of the World, Jundlina became the most powerful human of her time, but at a high cost: her humanity and soul."
46@@ -61,29 +64,29 @@
47 #####
48
49 [barbariantut00]
50-name=_"01 – Eyes in the Dark"
51+name=_"Eyes in the Dark"
52 visible=1
53 path="campaigns/t01.wmf"
54
55 [barbariantut01]
56-name=_"02 – A Place to Call Home"
57+name=_"A Place to Call Home"
58 visible=0
59 path="campaigns/t02.wmf"
60
61 [barbariantut02]
62-name=_"03 – This Land is Our Land"
63+name=_"This Land is Our Land"
64 newvisi="campsect1"
65 visible=0
66 path="campaigns/t03.wmf"
67
68
69 [empiretut00]
70-name=_"01 – The Strands of Malac’ Mor"
71+name=_"The Strands of Malac’ Mor"
72 visible=1
73 path="campaigns/emp01.wmf"
74
75 [empiretut01]
76-name=_"02 – An Outpost for Exile"
77+name=_"An Outpost for Exile"
78 visible=0
79 path="campaigns/emp02.wmf"
80
81@@ -95,7 +98,7 @@
82
83
84 [atlanteans00]
85-name=_"01 – From Nemesis to Genesis"
86+name=_"From Nemesis to Genesis"
87 visible=1
88 path="campaigns/atl01.wmf"
89
90
91=== modified file 'campaigns/dummy.wmf/elemental'
92--- campaigns/dummy.wmf/elemental 2011-01-04 12:17:44 +0000
93+++ campaigns/dummy.wmf/elemental 2014-10-27 09:37:32 +0000
94@@ -5,5 +5,6 @@
95 nr_players="1"
96 world="greenland"
97 name=_"Not yet implemented"
98-author="Nobody"
99+# TRANSLATORS: Author for dummy map
100+author=_"Nobody"
101 descr=_"Sorry, this map is not yet implemented."
102
103=== modified file 'campaigns/emp01.wmf/elemental'
104--- campaigns/emp01.wmf/elemental 2014-10-04 18:23:52 +0000
105+++ campaigns/emp01.wmf/elemental 2014-10-27 09:37:32 +0000
106@@ -4,7 +4,7 @@
107 map_h=64
108 nr_players=1
109 world=desert
110-name=_"01 – The Strands of Malac’ Mor"
111+name=_"The Strands of Malac’ Mor"
112 author=Nasenbaer
113 descr=_"After losing an important battle against the barbarians which lead to the loss of a big part of the Empire’s territory, Lutius leaves Fremil to start a new life. But his destiny takes his ship into a heavy storm, which nearly destroys it. Only with a lot of luck he manages to beach his damaged ship on an unknown desert strand and save his people. For now."
114 background="campaigns/emp01.wmf/pics/background.jpg"
115
116=== modified file 'campaigns/emp02.wmf/elemental'
117--- campaigns/emp02.wmf/elemental 2014-10-04 18:23:52 +0000
118+++ campaigns/emp02.wmf/elemental 2014-10-27 09:37:32 +0000
119@@ -6,7 +6,7 @@
120 map_h=80
121 nr_players=2
122 world=desert
123-name=_"02 – An Outpost for Exile"
124+name=_"An Outpost for Exile"
125 author=Nasenbaer
126 descr=_"Finally the ship was repaired, so Lutius and his people returned to the quest to find a good place for a new beginning. Only a few days later, they land on a green, Mediterranean island, looking like paradise. Overjoyed, they set out to explore this new living space."
127 background="campaigns/emp01.wmf/pics/background.jpg"
128
129=== modified file 'campaigns/t01.wmf/elemental'
130--- campaigns/t01.wmf/elemental 2014-10-04 18:23:52 +0000
131+++ campaigns/t01.wmf/elemental 2014-10-27 09:37:32 +0000
132@@ -4,7 +4,7 @@
133 map_h=64
134 nr_players=1
135 world=greenland
136-name=_"01 – Eyes in the Dark"
137+name=_"Eyes in the Dark"
138 author=Winterwind
139 descr=_"In this tutorial, the basic gameplay and control as well as basic production buildings of the Barbarians are introduced."
140 background="campaigns/t01.wmf/pics/background.jpg"
141
142=== modified file 'campaigns/t02.wmf/elemental'
143--- campaigns/t02.wmf/elemental 2014-10-04 18:23:52 +0000
144+++ campaigns/t02.wmf/elemental 2014-10-27 09:37:32 +0000
145@@ -4,7 +4,7 @@
146 map_h=64
147 nr_players=1
148 world=greenland
149-name=_"02 – A Place to Call Home"
150+name=_"A Place to Call Home"
151 author=Winterwind
152 descr=_"In this scenario, the higher production buildings including mining and military expansions will be introduced."
153 background="campaigns/t02.wmf/pics/background.jpg"
154
155=== modified file 'campaigns/t03.wmf/elemental'
156--- campaigns/t03.wmf/elemental 2014-02-25 10:47:47 +0000
157+++ campaigns/t03.wmf/elemental 2014-10-27 09:37:32 +0000
158@@ -4,7 +4,7 @@
159 map_h="112"
160 nr_players="4"
161 world="winterland"
162-name=_"03 – This Land is Our Land"
163-author="Wolfpac & Nasenbaer"
164+name=_"This Land is Our Land"
165+author="Wolfpac,Nasenbaer"
166 descr=_"This tutorial explains the handling of military and training site buildings and will introduce fighting."
167 background="tribes/barbarians/pics/campmap-tut3.jpg"
168
169=== modified file 'campaigns/tutorial01.wmf/elemental'
170--- campaigns/tutorial01.wmf/elemental 2014-10-04 18:23:52 +0000
171+++ campaigns/tutorial01.wmf/elemental 2014-10-27 09:37:32 +0000
172@@ -5,6 +5,6 @@
173 nr_players=2
174 world=greenland
175 name=_"Tutorial 1"
176-author="Winterwind, SirVer, Nasenbaer"
177+author="Winterwind,SirVer,Nasenbaer"
178 descr=_"Basic Tutorial – a map based on Winterwind’s tutorial 1 for the Barbarians"
179 background="campaigns/tutorial01.wmf/pics/background.jpg"
180
181=== modified file 'maps/Atoll.wmf/elemental'
182--- maps/Atoll.wmf/elemental 2014-02-25 10:47:47 +0000
183+++ maps/Atoll.wmf/elemental 2014-10-27 09:37:32 +0000
184@@ -9,5 +9,9 @@
185 name=_"Atoll"
186 author="Nasenbaer"
187 descr=_"Who will be the real king of the big atoll?"
188-hint=_"Suggested Teams: (blue, yellow) vs. (red, green)"
189 tags="2teams,official,seafaring"
190+
191+[teams00]
192+team1=0,2
193+team2=1,3
194+# (blue, yellow) vs. (red, green)
195
196=== modified file 'maps/Calvisson.wmf/elemental'
197--- maps/Calvisson.wmf/elemental 2014-02-25 10:47:47 +0000
198+++ maps/Calvisson.wmf/elemental 2014-10-27 09:37:32 +0000
199@@ -9,5 +9,24 @@
200 name=_"Calvisson"
201 author="Kristin"
202 descr=_"It’s a pleasure to settle in the beauty of this fissured countryside. But the ways to encompass these large territories are long and meandering, so it is easy to err into the land of the foreign clans."
203-hint=_"Suggested Teams: blue vs. red | yellow vs. green | (blue, yellow) vs. (red, green) | (blue, green) vs. (red, yellow)"
204 tags="seafaring,official,2teams"
205+
206+[teams00]
207+team1=0
208+team2=1
209+# blue vs. red
210+
211+[teams01]
212+team1=2
213+team2=3
214+# yellow vs. green
215+
216+[teams02]
217+team1=0,2
218+team2=1,3
219+# (blue, yellow) vs. (red, green)
220+
221+[teams03]
222+team1=0,3
223+team2=1,2
224+# (blue, green) vs. (red, yellow)
225
226=== modified file 'maps/Crossing the horizon.wmf/elemental'
227--- maps/Crossing the horizon.wmf/elemental 2014-02-25 10:47:47 +0000
228+++ maps/Crossing the horizon.wmf/elemental 2014-10-27 09:37:32 +0000
229@@ -9,6 +9,4 @@
230 name=_"Crossing the Horizon"
231 author="Kristin"
232 descr=_"Man your ship and sail to the horizon."
233-hint=_"Suggested Teams: all ok"
234 tags="official,ffa,2teams,seafaring"
235-
236
237=== modified file 'maps/Desert Tournament.wmf/elemental'
238--- maps/Desert Tournament.wmf/elemental 2014-02-25 10:47:47 +0000
239+++ maps/Desert Tournament.wmf/elemental 2014-10-27 09:37:32 +0000
240@@ -7,5 +7,9 @@
241 name=_"Desert Tournament"
242 author="ivh"
243 descr=_ "Four tribes struggle with their nearest neighbor to be the first to reach the mountain of gold that promises riches beyond belief. But can the two remaining ones share the resources wisely?"
244-hint=_ "Suggested Teams: (blue, red) vs. (yellow, green)"
245 tags="official,ffa,2teams"
246+
247+[teams00]
248+team1=0,1
249+team2=2,3
250+# (blue, red) vs. (yellow, green)
251
252=== modified file 'maps/Elven Forests.wmf/elemental'
253--- maps/Elven Forests.wmf/elemental 2014-02-25 10:47:47 +0000
254+++ maps/Elven Forests.wmf/elemental 2014-10-27 09:37:32 +0000
255@@ -7,5 +7,14 @@
256 name=_Elven Forests
257 author=Winterwind
258 descr=_ "The breath-taking beauty of these emerald lands has lured many tribes into an attempt to take them for themselves."
259-hint=_ "Suggested Teams: (blue, red) vs. (yellow, green) | (blue, yellow) vs. (red, green)"
260 tags=official,2teams,ffa
261+
262+[teams00]
263+team1=0,1
264+team2=2,3
265+# (blue, red) vs. (yellow, green)
266+
267+[teams01]
268+team1=0,2
269+team2=1,3
270+# (blue, yellow) vs. (red, green)
271
272=== modified file 'maps/Four Castles.wmf/elemental'
273--- maps/Four Castles.wmf/elemental 2014-02-25 10:47:47 +0000
274+++ maps/Four Castles.wmf/elemental 2014-10-27 09:37:32 +0000
275@@ -7,5 +7,9 @@
276 name=_Four Castles
277 author=Winterwind
278 descr=_ "Well protected in their mighty fortresses, four power-hungry warlords are completing their schemes to dominate these lands..."
279-hint=_ "Suggested Teams: (blue, red) vs. (yellow, green)"
280 tags="official,ffa,2teams"
281+
282+[teams00]
283+team1=0,1
284+team2=2,3
285+# (blue, red) vs. (yellow, green)
286
287=== modified file 'maps/Four Mountains.wmf/elemental'
288--- maps/Four Mountains.wmf/elemental 2014-02-25 10:47:47 +0000
289+++ maps/Four Mountains.wmf/elemental 2014-10-27 09:37:32 +0000
290@@ -7,5 +7,14 @@
291 name=_ "Four Mountains"
292 author="Quappo"
293 descr=_ "Each tribe is surrounded by four mighty mountains. Who will first conquer them and claim the resources for his own tribe? Hint I: Water can be found along the river. Hint II: Snowmen mark additional water sources. Hint III: Each mountain contains only one resource."
294-hint=_ "Suggested Teams: (blue, red) vs. (yellow, green) | (blue, green) vs. (red, yellow)"
295 tags="official,ffa,2teams"
296+
297+[teams00]
298+team1=0,1
299+team2=2,3
300+# (blue, red) vs. (yellow, green)
301+
302+[teams01]
303+team1=0,3
304+team2=1,2
305+# (blue, green) vs. (red, yellow)
306
307=== modified file 'maps/Long, long way.wmf/elemental'
308--- maps/Long, long way.wmf/elemental 2014-02-25 10:47:47 +0000
309+++ maps/Long, long way.wmf/elemental 2014-10-27 09:37:32 +0000
310@@ -9,5 +9,29 @@
311 name=_"Long, long way"
312 author="Einstein13"
313 descr=_">Where dat? A thousand miles from here.< [Porgy and Bess] You have to go a long, long way to conquer all the islands. Good luck!"
314-hint=_"Suggested Teams: blue vs. red | yellow vs. green | (blue, yellow) vs. (red, green) | (blue, yellow, black) vs. (red, green, orange) | (blue, yellow, black, purple) vs. (red, green, orange, white)"
315 tags="seafaring,official,2teams,3teams,4teams"
316+
317+[teams00]
318+team1=0
319+team2=1
320+# blue vs. red
321+
322+[teams01]
323+team1=2
324+team2=3
325+# yellow vs. green
326+
327+[teams02]
328+team1=0,2
329+team2=1,3
330+# (blue, yellow) vs. (red, green)
331+
332+[teams03]
333+team1=0,2,4
334+team2=1,3,5
335+# (blue, yellow, black) vs. (red, green, orange)
336+
337+[teams04]
338+team1=0,2,4,6
339+team2=1,3,5,7
340+# (blue, yellow, black, purple) vs. (red, green, orange, white)
341
342=== modified file 'maps/MP Scenarios/Smugglers.wmf/elemental'
343--- maps/MP Scenarios/Smugglers.wmf/elemental 2014-02-25 10:47:47 +0000
344+++ maps/MP Scenarios/Smugglers.wmf/elemental 2014-10-27 09:37:32 +0000
345@@ -6,7 +6,12 @@
346 map_h="144"
347 nr_players="4"
348 world="greenland"
349-name="Smugglers"
350+name=_"Smugglers"
351 author="Nasenbaer,SirVer"
352-descr=_"Your well established smuggling routes suddenly got busy: Two other tribes have appeared and now a rivalry among smugglers has started: Which team will be the first to smuggle a certain number of wares? Teams are: Blue + Red vs. Yellow + Green."
353+descr=_"Your well established smuggling routes suddenly got busy: Two other tribes have appeared and now a rivalry among smugglers has started: Which team will be the first to smuggle a certain number of wares?"
354 tags="official"
355+
356+[teams00]
357+team1=0,1
358+team2=2,3
359+# blue, red vs. yellow, green
360
361=== modified file 'maps/Plateau.wmf/elemental'
362--- maps/Plateau.wmf/elemental 2014-02-25 10:47:47 +0000
363+++ maps/Plateau.wmf/elemental 2014-10-27 09:37:32 +0000
364@@ -7,6 +7,9 @@
365 name=_The Green Plateau
366 author=Nasenbaer
367 descr=_"You are standing on an island, crowned by mighty mountains which keep a wonderful and mighty treasure in their middle – The Green Plateau, which is hard to conquer but easy to lose. So, if you want it, be aware of the other clans."
368-hint=_"Suggested Teams: blue vs. yellow"
369 tags="official,1v1"
370
371+[teams00]
372+team1=0
373+team2=2
374+# blue vs. yellow
375
376=== modified file 'maps/Rendez-Vous.wmf/elemental'
377--- maps/Rendez-Vous.wmf/elemental 2014-02-25 10:47:47 +0000
378+++ maps/Rendez-Vous.wmf/elemental 2014-10-27 09:37:32 +0000
379@@ -7,5 +7,4 @@
380 name=_ "Rendez-Vous"
381 author="Quappo"
382 descr=_ "Only a small hill in the centre of the map connects these four competing tribes. Lead your army right away to this hill and build a giant stronghold as a sign of your superiority! Hint: In the centre is only space for one stronghold. Water can be found everywhere, so there is no need to send out geologists."
383-hint=_ "Suggested Teams: all ok"
384 tags="official,ffa,2teams"
385
386=== modified file 'maps/Swamp Monks.wmf/elemental'
387--- maps/Swamp Monks.wmf/elemental 2014-02-25 10:47:47 +0000
388+++ maps/Swamp Monks.wmf/elemental 2014-10-27 09:37:32 +0000
389@@ -7,5 +7,9 @@
390 name=_"Swamp Monks"
391 author="Nasenbaer"
392 descr=_ "It is said that the old war monks, living in the even older swamps, are the key to control over the whole island."
393-hint=_ "Suggested Teams: (blue, red) vs. (yellow, green)"
394 tags="official,2teams"
395+
396+[teams00]
397+team1=0,1
398+team2=2,3
399+# (blue, red) vs. (yellow, green)
400
401=== modified file 'maps/The Nile.wmf/elemental'
402--- maps/The Nile.wmf/elemental 2014-02-25 10:47:47 +0000
403+++ maps/The Nile.wmf/elemental 2014-10-27 09:37:32 +0000
404@@ -9,5 +9,34 @@
405 name=_"The Nile"
406 author="Einstein13"
407 descr=_"The river has always provided food and communication. This time, eight empires will fight for control over this land."
408-hint=_"Suggested Teams: blue vs. red | yellow vs. green | (blue, yellow) vs. (red, green) | (green, orange, white) vs. (yellow, black, purple) | (blue, orange, green) vs. (red, yellow, black) | (blue, green, orange, white) vs. (red, yellow, black, purple)"
409 tags="official,seafaring,1v1,2teams,3teams,4teams"
410+
411+[teams00]
412+team1=0
413+team2=1
414+# blue vs. red
415+
416+[teams01]
417+team1=2
418+team2=3
419+# yellow vs. green
420+
421+[teams02]
422+team1=0,2
423+team2=1,3
424+# (blue, yellow) vs. (red, green)
425+
426+[teams03]
427+team1=3,5,7
428+team2=2,4,6
429+# (green, orange, white) vs. (yellow, black, purple)
430+
431+[teams04]
432+team1=0,3,5
433+team2=1,2,4
434+# (blue, orange, green) vs. (red, yellow, black)
435+
436+[teams05]
437+team1=0,3,5,7
438+team2=1,2,4,6
439+# (blue, green, orange, white) vs. (red, yellow, black, purple)
440
441=== modified file 'maps/Trident of Fire.wmf/elemental'
442--- maps/Trident of Fire.wmf/elemental 2014-02-25 10:47:47 +0000
443+++ maps/Trident of Fire.wmf/elemental 2014-10-27 09:37:32 +0000
444@@ -11,3 +11,23 @@
445 descr=_"In the vicinity of three major volcanoes, six lovely islands are inviting settlers to start a new life. Deserts and a quickly growing forest wait to be discovered. But only by becoming a naval power will your tribe be able to explore enough resources to compete with its opponents."
446 hint=_"Suggested teams: red vs. green | (blue, yellow) vs. (green, orange) | (blue, black) vs. (green, red) | (blue, black, yellow) vs. (green, red, orange)"
447 tags="official,seafaring,1v1,2teams,3teams"
448+
449+[teams00]
450+team1=1
451+team2=3
452+# red vs. green
453+
454+[teams01]
455+team1=0,2
456+team2=3,5
457+# (blue, yellow) vs. (green, orange)
458+
459+[teams02]
460+team1=0,4
461+team2=3,1
462+# (blue, black) vs. (green, red)
463+
464+[teams03]
465+team1=0,4,2
466+team2=3,1,5
467+# (blue, black, yellow) vs. (green, red, orange)
468
469=== removed directory 'po/mp_scenario_together_we_re_strong.wmf'
470=== removed file 'po/mp_scenario_together_we_re_strong.wmf/ar.po'
471--- po/mp_scenario_together_we_re_strong.wmf/ar.po 2014-03-07 05:43:27 +0000
472+++ po/mp_scenario_together_we_re_strong.wmf/ar.po 1970-01-01 00:00:00 +0000
473@@ -1,43 +0,0 @@
474-# Arabic translation for widelands
475-# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
476-# This file is distributed under the same license as the widelands package.
477-# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
478-#
479-msgid ""
480-msgstr ""
481-"Project-Id-Version: widelands\n"
482-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
483-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
484-"PO-Revision-Date: 2013-10-05 14:30+0000\n"
485-"Last-Translator: abdXelrhman <abdXelrhman@gmail.com>\n"
486-"Language-Team: Arabic <ar@li.org>\n"
487-"MIME-Version: 1.0\n"
488-"Content-Type: text/plain; charset=UTF-8\n"
489-"Content-Transfer-Encoding: 8bit\n"
490-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
491-"X-Generator: Launchpad (build 16948)\n"
492-
493-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
494-msgid "Congratulations!"
495-msgstr "تهانينا!"
496-
497-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
498-msgid "The player who defeats the other player wins the game"
499-msgstr "اللاعب الذى يهزم الاخر سيربح اللعبه"
500-
501-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
502-msgid "Together we're strong"
503-msgstr "فى اﻹتحاد قوه"
504-
505-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
506-msgid "You are defeated!"
507-msgstr "خسرت اللعبه!"
508-
509-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
510-msgid ""
511-"You have nothing to command left. If you want, you may continue as spectator."
512-msgstr "لم يعد لديك شيء. إذا رغبت فبإمكانك المتابعه فى وضع المشاهدين"
513-
514-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
515-msgid "You have won this game!"
516-msgstr "ربحت اللعبه!"
517
518=== removed file 'po/mp_scenario_together_we_re_strong.wmf/ca.po'
519--- po/mp_scenario_together_we_re_strong.wmf/ca.po 2014-03-07 05:43:27 +0000
520+++ po/mp_scenario_together_we_re_strong.wmf/ca.po 1970-01-01 00:00:00 +0000
521@@ -1,43 +0,0 @@
522-# Catalan translation for widelands
523-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
524-# This file is distributed under the same license as the widelands package.
525-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
526-#
527-msgid ""
528-msgstr ""
529-"Project-Id-Version: widelands\n"
530-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
531-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
532-"PO-Revision-Date: 2012-04-02 20:07+0000\n"
533-"Last-Translator: Guybrush88 <Unknown>\n"
534-"Language-Team: Catalan <ca@li.org>\n"
535-"MIME-Version: 1.0\n"
536-"Content-Type: text/plain; charset=UTF-8\n"
537-"Content-Transfer-Encoding: 8bit\n"
538-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
539-"X-Generator: Launchpad (build 16948)\n"
540-
541-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
542-msgid "Congratulations!"
543-msgstr "Enhorabona!"
544-
545-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
546-msgid "The player who defeats the other player wins the game"
547-msgstr ""
548-
549-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
550-msgid "Together we're strong"
551-msgstr ""
552-
553-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
554-msgid "You are defeated!"
555-msgstr ""
556-
557-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
558-msgid ""
559-"You have nothing to command left. If you want, you may continue as spectator."
560-msgstr ""
561-
562-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
563-msgid "You have won this game!"
564-msgstr ""
565
566=== removed file 'po/mp_scenario_together_we_re_strong.wmf/cs.po'
567--- po/mp_scenario_together_we_re_strong.wmf/cs.po 2014-03-07 05:43:27 +0000
568+++ po/mp_scenario_together_we_re_strong.wmf/cs.po 1970-01-01 00:00:00 +0000
569@@ -1,45 +0,0 @@
570-# Czech translation for widelands
571-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
572-# This file is distributed under the same license as the widelands package.
573-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
574-#
575-msgid ""
576-msgstr ""
577-"Project-Id-Version: widelands\n"
578-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
579-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
580-"PO-Revision-Date: 2012-02-18 21:32+0000\n"
581-"Last-Translator: Marek Donar <markus7cz@gmail.com>\n"
582-"Language-Team: Czech <cs@li.org>\n"
583-"MIME-Version: 1.0\n"
584-"Content-Type: text/plain; charset=UTF-8\n"
585-"Content-Transfer-Encoding: 8bit\n"
586-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
587-"X-Generator: Launchpad (build 16948)\n"
588-
589-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
590-msgid "Congratulations!"
591-msgstr "Gratulujeme!"
592-
593-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
594-msgid "The player who defeats the other player wins the game"
595-msgstr "Zvítězí hráč, který porazí ostatní hráče"
596-
597-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
598-msgid "Together we're strong"
599-msgstr "V jednotě je síla"
600-
601-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
602-msgid "You are defeated!"
603-msgstr "Byl jsi poražen!"
604-
605-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
606-msgid ""
607-"You have nothing to command left. If you want, you may continue as spectator."
608-msgstr ""
609-"Nezbylo ti už nic, co bys mohl ovládat. Pokud chceš, zůstaň ve hře jako "
610-"pozorovatel."
611-
612-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
613-msgid "You have won this game!"
614-msgstr "Vyhrál jsi tuto hru!"
615
616=== removed file 'po/mp_scenario_together_we_re_strong.wmf/de.po'
617--- po/mp_scenario_together_we_re_strong.wmf/de.po 2014-03-07 05:43:27 +0000
618+++ po/mp_scenario_together_we_re_strong.wmf/de.po 1970-01-01 00:00:00 +0000
619@@ -1,45 +0,0 @@
620-# German translation for widelands
621-# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
622-# This file is distributed under the same license as the widelands package.
623-# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
624-#
625-msgid ""
626-msgstr ""
627-"Project-Id-Version: widelands\n"
628-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
629-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
630-"PO-Revision-Date: 2014-02-11 18:19+0000\n"
631-"Last-Translator: Mirian Margiani <mirian.margiani@gmail.com>\n"
632-"Language-Team: German <de@li.org>\n"
633-"MIME-Version: 1.0\n"
634-"Content-Type: text/plain; charset=UTF-8\n"
635-"Content-Transfer-Encoding: 8bit\n"
636-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
637-"X-Generator: Launchpad (build 16948)\n"
638-
639-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
640-msgid "Congratulations!"
641-msgstr "Herzlichen Glückwunsch!"
642-
643-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
644-msgid "The player who defeats the other player wins the game"
645-msgstr "Der Spieler, der den anderen Spieler besiegt, gewinnt das Spiel."
646-
647-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
648-msgid "Together we're strong"
649-msgstr "Zusammen sind wir stark"
650-
651-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
652-msgid "You are defeated!"
653-msgstr "Du wurdest besiegt!"
654-
655-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
656-msgid ""
657-"You have nothing to command left. If you want, you may continue as spectator."
658-msgstr ""
659-"Du hast nichts mehr zu kommandieren. Wenn du möchtest, kannst du als "
660-"Zuschauer fortfahren."
661-
662-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
663-msgid "You have won this game!"
664-msgstr "Du hast dieses Spiel gewonnen!"
665
666=== removed file 'po/mp_scenario_together_we_re_strong.wmf/en_GB.po'
667--- po/mp_scenario_together_we_re_strong.wmf/en_GB.po 2014-03-07 05:43:27 +0000
668+++ po/mp_scenario_together_we_re_strong.wmf/en_GB.po 1970-01-01 00:00:00 +0000
669@@ -1,44 +0,0 @@
670-# English (United Kingdom) translation for widelands
671-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
672-# This file is distributed under the same license as the widelands package.
673-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
674-#
675-msgid ""
676-msgstr ""
677-"Project-Id-Version: widelands\n"
678-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
679-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
680-"PO-Revision-Date: 2012-09-19 16:03+0000\n"
681-"Last-Translator: Biffaboy <Unknown>\n"
682-"Language-Team: English (United Kingdom) <en_GB@li.org>\n"
683-"MIME-Version: 1.0\n"
684-"Content-Type: text/plain; charset=UTF-8\n"
685-"Content-Transfer-Encoding: 8bit\n"
686-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
687-"X-Generator: Launchpad (build 16948)\n"
688-
689-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
690-msgid "Congratulations!"
691-msgstr "Congratulations!"
692-
693-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
694-msgid "The player who defeats the other player wins the game"
695-msgstr "The player who defeats the other player wins the game"
696-
697-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
698-msgid "Together we're strong"
699-msgstr "Together we're strong"
700-
701-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
702-msgid "You are defeated!"
703-msgstr "You are defeated!"
704-
705-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
706-msgid ""
707-"You have nothing to command left. If you want, you may continue as spectator."
708-msgstr ""
709-"You have nothing to command left. If you want, you may continue as spectator."
710-
711-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
712-msgid "You have won this game!"
713-msgstr "You have won this game!"
714
715=== removed file 'po/mp_scenario_together_we_re_strong.wmf/eo.po'
716--- po/mp_scenario_together_we_re_strong.wmf/eo.po 2014-03-07 05:43:27 +0000
717+++ po/mp_scenario_together_we_re_strong.wmf/eo.po 1970-01-01 00:00:00 +0000
718@@ -1,43 +0,0 @@
719-# Esperanto translation for widelands
720-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
721-# This file is distributed under the same license as the widelands package.
722-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
723-#
724-msgid ""
725-msgstr ""
726-"Project-Id-Version: widelands\n"
727-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
728-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
729-"PO-Revision-Date: 2012-03-05 18:49+0000\n"
730-"Last-Translator: Michael Moroni <michael.moroni@mailoo.org>\n"
731-"Language-Team: Esperanto <eo@li.org>\n"
732-"MIME-Version: 1.0\n"
733-"Content-Type: text/plain; charset=UTF-8\n"
734-"Content-Transfer-Encoding: 8bit\n"
735-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
736-"X-Generator: Launchpad (build 16948)\n"
737-
738-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
739-msgid "Congratulations!"
740-msgstr "Gratulojn!"
741-
742-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
743-msgid "The player who defeats the other player wins the game"
744-msgstr "La ludanto, kiu venkis la alian ludanton, gajnis"
745-
746-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
747-msgid "Together we're strong"
748-msgstr "Kune ni fortas"
749-
750-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
751-msgid "You are defeated!"
752-msgstr "Vi estas venkita!"
753-
754-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
755-msgid ""
756-"You have nothing to command left. If you want, you may continue as spectator."
757-msgstr "Nenio regenda restas. Se vi volas, vi povas daŭrigi kiel spektanto."
758-
759-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
760-msgid "You have won this game!"
761-msgstr "Vi gajnis!"
762
763=== removed file 'po/mp_scenario_together_we_re_strong.wmf/es.po'
764--- po/mp_scenario_together_we_re_strong.wmf/es.po 2014-03-07 05:43:27 +0000
765+++ po/mp_scenario_together_we_re_strong.wmf/es.po 1970-01-01 00:00:00 +0000
766@@ -1,44 +0,0 @@
767-# Spanish translation for widelands
768-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
769-# This file is distributed under the same license as the widelands package.
770-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
771-#
772-msgid ""
773-msgstr ""
774-"Project-Id-Version: widelands\n"
775-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
776-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
777-"PO-Revision-Date: 2012-01-22 01:57+0000\n"
778-"Last-Translator: MadkaT <Unknown>\n"
779-"Language-Team: Spanish <es@li.org>\n"
780-"MIME-Version: 1.0\n"
781-"Content-Type: text/plain; charset=UTF-8\n"
782-"Content-Transfer-Encoding: 8bit\n"
783-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
784-"X-Generator: Launchpad (build 16948)\n"
785-
786-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
787-msgid "Congratulations!"
788-msgstr "¡Felicitaciones!"
789-
790-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
791-msgid "The player who defeats the other player wins the game"
792-msgstr "El jugador que derrote al otro jugador gana el juego"
793-
794-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
795-msgid "Together we're strong"
796-msgstr "Juntos somos más fuertes"
797-
798-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
799-msgid "You are defeated!"
800-msgstr "Fuiste derrotado!"
801-
802-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
803-msgid ""
804-"You have nothing to command left. If you want, you may continue as spectator."
805-msgstr ""
806-"No tienes nada por hacer. Si quieres, puedes continuar como espectador."
807-
808-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
809-msgid "You have won this game!"
810-msgstr "Has ganado este juego!"
811
812=== removed file 'po/mp_scenario_together_we_re_strong.wmf/eu.po'
813--- po/mp_scenario_together_we_re_strong.wmf/eu.po 2014-03-07 05:43:27 +0000
814+++ po/mp_scenario_together_we_re_strong.wmf/eu.po 1970-01-01 00:00:00 +0000
815@@ -1,45 +0,0 @@
816-# Basque translation for widelands
817-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
818-# This file is distributed under the same license as the widelands package.
819-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
820-#
821-msgid ""
822-msgstr ""
823-"Project-Id-Version: widelands\n"
824-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
825-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
826-"PO-Revision-Date: 2012-04-30 10:48+0000\n"
827-"Last-Translator: Mikel Alzibar <mikelalzibar@gmail.com>\n"
828-"Language-Team: Basque <eu@li.org>\n"
829-"MIME-Version: 1.0\n"
830-"Content-Type: text/plain; charset=UTF-8\n"
831-"Content-Transfer-Encoding: 8bit\n"
832-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
833-"X-Generator: Launchpad (build 16948)\n"
834-
835-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
836-msgid "Congratulations!"
837-msgstr "Zorionak!"
838-
839-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
840-msgid "The player who defeats the other player wins the game"
841-msgstr "Beste jokalaria garaitzen duenak irabazten du jokoa"
842-
843-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
844-msgid "Together we're strong"
845-msgstr "Batera indartsuak gara"
846-
847-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
848-msgid "You are defeated!"
849-msgstr "Garaitua izan zara!"
850-
851-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
852-msgid ""
853-"You have nothing to command left. If you want, you may continue as spectator."
854-msgstr ""
855-"Ez da ezer geratzen agindu dezakezunik. Nahi baduzu ikusle bezela jarrai "
856-"dezakezu."
857-
858-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
859-msgid "You have won this game!"
860-msgstr "Jokoa irabazi duzu!"
861
862=== removed file 'po/mp_scenario_together_we_re_strong.wmf/fi.po'
863--- po/mp_scenario_together_we_re_strong.wmf/fi.po 2014-03-07 05:43:27 +0000
864+++ po/mp_scenario_together_we_re_strong.wmf/fi.po 1970-01-01 00:00:00 +0000
865@@ -1,43 +0,0 @@
866-# Finnish translation for widelands
867-# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
868-# This file is distributed under the same license as the widelands package.
869-# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
870-#
871-msgid ""
872-msgstr ""
873-"Project-Id-Version: widelands\n"
874-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
875-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
876-"PO-Revision-Date: 2013-08-03 10:40+0000\n"
877-"Last-Translator: Markus Hallfors <destroyerko@gmail.com>\n"
878-"Language-Team: Finnish <fi@li.org>\n"
879-"MIME-Version: 1.0\n"
880-"Content-Type: text/plain; charset=UTF-8\n"
881-"Content-Transfer-Encoding: 8bit\n"
882-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
883-"X-Generator: Launchpad (build 16948)\n"
884-
885-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
886-msgid "Congratulations!"
887-msgstr "Onneksi olkoon!"
888-
889-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
890-msgid "The player who defeats the other player wins the game"
891-msgstr ""
892-
893-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
894-msgid "Together we're strong"
895-msgstr "Yhdessä olemme vahvoja"
896-
897-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
898-msgid "You are defeated!"
899-msgstr ""
900-
901-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
902-msgid ""
903-"You have nothing to command left. If you want, you may continue as spectator."
904-msgstr ""
905-
906-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
907-msgid "You have won this game!"
908-msgstr "Olet voittanut tämä pelin!"
909
910=== removed file 'po/mp_scenario_together_we_re_strong.wmf/fr.po'
911--- po/mp_scenario_together_we_re_strong.wmf/fr.po 2014-03-07 05:43:27 +0000
912+++ po/mp_scenario_together_we_re_strong.wmf/fr.po 1970-01-01 00:00:00 +0000
913@@ -1,45 +0,0 @@
914-# French translation for widelands
915-# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
916-# This file is distributed under the same license as the widelands package.
917-# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
918-#
919-msgid ""
920-msgstr ""
921-"Project-Id-Version: widelands\n"
922-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
923-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
924-"PO-Revision-Date: 2011-12-05 23:29+0000\n"
925-"Last-Translator: bouchard renaud <Unknown>\n"
926-"Language-Team: French <fr@li.org>\n"
927-"MIME-Version: 1.0\n"
928-"Content-Type: text/plain; charset=UTF-8\n"
929-"Content-Transfer-Encoding: 8bit\n"
930-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
931-"X-Generator: Launchpad (build 16948)\n"
932-
933-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
934-msgid "Congratulations!"
935-msgstr "Félicitations !"
936-
937-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
938-msgid "The player who defeats the other player wins the game"
939-msgstr "Le joueur qui vaincra les autres remportera la partie"
940-
941-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
942-msgid "Together we're strong"
943-msgstr "Ensemble nous sommes forts"
944-
945-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
946-msgid "You are defeated!"
947-msgstr "Vous êtes vaincu !"
948-
949-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
950-msgid ""
951-"You have nothing to command left. If you want, you may continue as spectator."
952-msgstr ""
953-"Il ne vous reste plus de troupes à commander. Si vous le souhaitez, vous "
954-"pouvez continuer en tant que spectateur."
955-
956-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
957-msgid "You have won this game!"
958-msgstr "Vous avez gagné cette partie !"
959
960=== removed file 'po/mp_scenario_together_we_re_strong.wmf/gd.po'
961--- po/mp_scenario_together_we_re_strong.wmf/gd.po 2014-03-07 05:43:27 +0000
962+++ po/mp_scenario_together_we_re_strong.wmf/gd.po 1970-01-01 00:00:00 +0000
963@@ -1,47 +0,0 @@
964-# Gaelic; Scottish translation for widelands
965-# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
966-# This file is distributed under the same license as the widelands package.
967-# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
968-# GunChleoc <fios@foramnagaidhlig.net>, 2013.
969-msgid ""
970-msgstr ""
971-"Project-Id-Version: widelands\n"
972-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
973-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
974-"PO-Revision-Date: 2013-10-09 20:43+0000\n"
975-"Last-Translator: GunChleoc <Unknown>\n"
976-"Language-Team: Fòram na Gàidhlig http://www.foramnagaidhlig.net\n"
977-"MIME-Version: 1.0\n"
978-"Content-Type: text/plain; charset=UTF-8\n"
979-"Content-Transfer-Encoding: 8bit\n"
980-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
981-"X-Generator: Launchpad (build 16948)\n"
982-"Language: gd\n"
983-
984-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
985-msgid "Congratulations!"
986-msgstr "Meal do naidheachd!"
987-
988-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
989-msgid "The player who defeats the other player wins the game"
990-msgstr ""
991-"Buanaichidh an cluicheadair a bheir buaidh air a' chluicheadair eile an geama"
992-
993-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
994-msgid "Together we're strong"
995-msgstr "Làidir còmhla"
996-
997-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
998-msgid "You are defeated!"
999-msgstr "Chaidh ruaig a chur ort!"
1000-
1001-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
1002-msgid ""
1003-"You have nothing to command left. If you want, you may continue as spectator."
1004-msgstr ""
1005-"Chan eil dad ri òrdachadh air fhàgail dhut. Faodaidh tu leantainn air adhart "
1006-"'nad amharc ma thogras tu."
1007-
1008-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1009-msgid "You have won this game!"
1010-msgstr "Bhuannaich thu an geama seo!"
1011
1012=== removed file 'po/mp_scenario_together_we_re_strong.wmf/hr.po'
1013--- po/mp_scenario_together_we_re_strong.wmf/hr.po 2014-03-07 05:43:27 +0000
1014+++ po/mp_scenario_together_we_re_strong.wmf/hr.po 1970-01-01 00:00:00 +0000
1015@@ -1,44 +0,0 @@
1016-# Croatian translation for widelands
1017-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
1018-# This file is distributed under the same license as the widelands package.
1019-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
1020-#
1021-msgid ""
1022-msgstr ""
1023-"Project-Id-Version: widelands\n"
1024-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1025-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
1026-"PO-Revision-Date: 2012-03-30 17:16+0000\n"
1027-"Last-Translator: Mario Dautović <mario.dautovic@yahoo.com>\n"
1028-"Language-Team: Croatian <hr@li.org>\n"
1029-"MIME-Version: 1.0\n"
1030-"Content-Type: text/plain; charset=UTF-8\n"
1031-"Content-Transfer-Encoding: 8bit\n"
1032-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
1033-"X-Generator: Launchpad (build 16948)\n"
1034-
1035-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1036-msgid "Congratulations!"
1037-msgstr "Čestitamo!"
1038-
1039-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1040-msgid "The player who defeats the other player wins the game"
1041-msgstr "Igrač koji porazi drugoga je pobjednik"
1042-
1043-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1044-msgid "Together we're strong"
1045-msgstr "Zajedno smo jači"
1046-
1047-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
1048-msgid "You are defeated!"
1049-msgstr "Poraženi smo!"
1050-
1051-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
1052-msgid ""
1053-"You have nothing to command left. If you want, you may continue as spectator."
1054-msgstr ""
1055-"Nemate više sa čim upravljati. Ako želite, možete ostati kao gledatelj."
1056-
1057-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1058-msgid "You have won this game!"
1059-msgstr "Ti si pobijednik ove partije!"
1060
1061=== removed file 'po/mp_scenario_together_we_re_strong.wmf/hu.po'
1062--- po/mp_scenario_together_we_re_strong.wmf/hu.po 2014-03-07 05:43:27 +0000
1063+++ po/mp_scenario_together_we_re_strong.wmf/hu.po 1970-01-01 00:00:00 +0000
1064@@ -1,43 +0,0 @@
1065-# Hungarian translation for widelands
1066-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
1067-# This file is distributed under the same license as the widelands package.
1068-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
1069-#
1070-msgid ""
1071-msgstr ""
1072-"Project-Id-Version: widelands\n"
1073-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1074-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
1075-"PO-Revision-Date: 2014-01-09 20:48+0000\n"
1076-"Last-Translator: cn4ij <Unknown>\n"
1077-"Language-Team: Hungarian <hu@li.org>\n"
1078-"MIME-Version: 1.0\n"
1079-"Content-Type: text/plain; charset=UTF-8\n"
1080-"Content-Transfer-Encoding: 8bit\n"
1081-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
1082-"X-Generator: Launchpad (build 16948)\n"
1083-
1084-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1085-msgid "Congratulations!"
1086-msgstr "Gratulálunk!"
1087-
1088-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1089-msgid "The player who defeats the other player wins the game"
1090-msgstr "Amelyik játékos legyőzi a másikat, az nyer."
1091-
1092-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1093-msgid "Together we're strong"
1094-msgstr "Együtt erősek vagyunk"
1095-
1096-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
1097-msgid "You are defeated!"
1098-msgstr "Legyőztek!"
1099-
1100-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
1101-msgid ""
1102-"You have nothing to command left. If you want, you may continue as spectator."
1103-msgstr "Már nincs mit irányítanod. Ha szeretnél, maradhatsz megfigyelőként."
1104-
1105-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1106-msgid "You have won this game!"
1107-msgstr "Megnyerted a játékot!"
1108
1109=== removed file 'po/mp_scenario_together_we_re_strong.wmf/it.po'
1110--- po/mp_scenario_together_we_re_strong.wmf/it.po 2014-03-07 05:43:27 +0000
1111+++ po/mp_scenario_together_we_re_strong.wmf/it.po 1970-01-01 00:00:00 +0000
1112@@ -1,44 +0,0 @@
1113-# Italian translation for widelands
1114-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
1115-# This file is distributed under the same license as the widelands package.
1116-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
1117-#
1118-msgid ""
1119-msgstr ""
1120-"Project-Id-Version: widelands\n"
1121-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1122-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
1123-"PO-Revision-Date: 2012-01-01 19:54+0000\n"
1124-"Last-Translator: Guybrush88 <Unknown>\n"
1125-"Language-Team: Italian <it@li.org>\n"
1126-"MIME-Version: 1.0\n"
1127-"Content-Type: text/plain; charset=UTF-8\n"
1128-"Content-Transfer-Encoding: 8bit\n"
1129-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
1130-"X-Generator: Launchpad (build 16948)\n"
1131-
1132-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1133-msgid "Congratulations!"
1134-msgstr "Congratulazioni!"
1135-
1136-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1137-msgid "The player who defeats the other player wins the game"
1138-msgstr "Il giocatore che sconfigge l'altro giocatore vince la partita"
1139-
1140-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1141-msgid "Together we're strong"
1142-msgstr "Insieme siamo forti"
1143-
1144-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
1145-msgid "You are defeated!"
1146-msgstr "Sei stato sconfitto!"
1147-
1148-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
1149-msgid ""
1150-"You have nothing to command left. If you want, you may continue as spectator."
1151-msgstr ""
1152-"Non ti è rimasto nulla da comandare. Se vuoi puoi continuare come spettatore."
1153-
1154-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1155-msgid "You have won this game!"
1156-msgstr "Hai vinto questa partita!"
1157
1158=== removed file 'po/mp_scenario_together_we_re_strong.wmf/ja.po'
1159--- po/mp_scenario_together_we_re_strong.wmf/ja.po 2014-03-07 05:43:27 +0000
1160+++ po/mp_scenario_together_we_re_strong.wmf/ja.po 1970-01-01 00:00:00 +0000
1161@@ -1,43 +0,0 @@
1162-# Japanese translation for widelands
1163-# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
1164-# This file is distributed under the same license as the widelands package.
1165-# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
1166-#
1167-msgid ""
1168-msgstr ""
1169-"Project-Id-Version: widelands\n"
1170-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1171-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
1172-"PO-Revision-Date: 2013-10-07 19:28+0000\n"
1173-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1174-"Language-Team: Japanese <ja@li.org>\n"
1175-"MIME-Version: 1.0\n"
1176-"Content-Type: text/plain; charset=UTF-8\n"
1177-"Content-Transfer-Encoding: 8bit\n"
1178-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
1179-"X-Generator: Launchpad (build 16948)\n"
1180-
1181-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1182-msgid "Congratulations!"
1183-msgstr ""
1184-
1185-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1186-msgid "The player who defeats the other player wins the game"
1187-msgstr ""
1188-
1189-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1190-msgid "Together we're strong"
1191-msgstr ""
1192-
1193-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
1194-msgid "You are defeated!"
1195-msgstr ""
1196-
1197-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
1198-msgid ""
1199-"You have nothing to command left. If you want, you may continue as spectator."
1200-msgstr ""
1201-
1202-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1203-msgid "You have won this game!"
1204-msgstr ""
1205
1206=== removed file 'po/mp_scenario_together_we_re_strong.wmf/la.po'
1207--- po/mp_scenario_together_we_re_strong.wmf/la.po 2014-03-07 05:43:27 +0000
1208+++ po/mp_scenario_together_we_re_strong.wmf/la.po 1970-01-01 00:00:00 +0000
1209@@ -1,44 +0,0 @@
1210-# Latin translation for widelands
1211-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
1212-# This file is distributed under the same license as the widelands package.
1213-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
1214-#
1215-msgid ""
1216-msgstr ""
1217-"Project-Id-Version: widelands\n"
1218-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1219-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
1220-"PO-Revision-Date: 2012-03-25 08:19+0000\n"
1221-"Last-Translator: Sonnrain <Unknown>\n"
1222-"Language-Team: Latin <la@li.org>\n"
1223-"MIME-Version: 1.0\n"
1224-"Content-Type: text/plain; charset=UTF-8\n"
1225-"Content-Transfer-Encoding: 8bit\n"
1226-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
1227-"X-Generator: Launchpad (build 16948)\n"
1228-
1229-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1230-msgid "Congratulations!"
1231-msgstr "Congratulamur!"
1232-
1233-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1234-msgid "The player who defeats the other player wins the game"
1235-msgstr "Victor erit hic, qui ludor alios ludores vincit."
1236-
1237-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1238-msgid "Together we're strong"
1239-msgstr "Coniuncti pervigemus"
1240-
1241-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
1242-msgid "You are defeated!"
1243-msgstr "Victus es!"
1244-
1245-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
1246-msgid ""
1247-"You have nothing to command left. If you want, you may continue as spectator."
1248-msgstr ""
1249-"Nihil, quod praesidere potes, superest. Si vis, spectator perseveras."
1250-
1251-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1252-msgid "You have won this game!"
1253-msgstr "Victor es!"
1254
1255=== removed file 'po/mp_scenario_together_we_re_strong.wmf/lt.po'
1256--- po/mp_scenario_together_we_re_strong.wmf/lt.po 2014-06-18 05:43:17 +0000
1257+++ po/mp_scenario_together_we_re_strong.wmf/lt.po 1970-01-01 00:00:00 +0000
1258@@ -1,43 +0,0 @@
1259-# Lithuanian translation for widelands
1260-# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014
1261-# This file is distributed under the same license as the widelands package.
1262-# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
1263-#
1264-msgid ""
1265-msgstr ""
1266-"Project-Id-Version: widelands\n"
1267-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1268-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
1269-"PO-Revision-Date: 2014-06-17 02:35+0000\n"
1270-"Last-Translator: Mantas Kriaučiūnas <mantas@akl.lt>\n"
1271-"Language-Team: Lithuanian <lt@li.org>\n"
1272-"MIME-Version: 1.0\n"
1273-"Content-Type: text/plain; charset=UTF-8\n"
1274-"Content-Transfer-Encoding: 8bit\n"
1275-"X-Launchpad-Export-Date: 2014-06-18 05:43+0000\n"
1276-"X-Generator: Launchpad (build 17045)\n"
1277-
1278-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1279-msgid "Congratulations!"
1280-msgstr "Sveikiname!"
1281-
1282-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1283-msgid "The player who defeats the other player wins the game"
1284-msgstr "Žaidėjas, kuris nugalės kitus, laimės žaidimą"
1285-
1286-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1287-msgid "Together we're strong"
1288-msgstr "Kartu mes esame stiprūs"
1289-
1290-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
1291-msgid "You are defeated!"
1292-msgstr ""
1293-
1294-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
1295-msgid ""
1296-"You have nothing to command left. If you want, you may continue as spectator."
1297-msgstr ""
1298-
1299-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1300-msgid "You have won this game!"
1301-msgstr "Jūs laimėjote šį žaidimą!"
1302
1303=== removed file 'po/mp_scenario_together_we_re_strong.wmf/mp_scenario_together_we_re_strong.wmf.pot'
1304--- po/mp_scenario_together_we_re_strong.wmf/mp_scenario_together_we_re_strong.wmf.pot 2013-09-01 11:45:59 +0000
1305+++ po/mp_scenario_together_we_re_strong.wmf/mp_scenario_together_we_re_strong.wmf.pot 1970-01-01 00:00:00 +0000
1306@@ -1,46 +0,0 @@
1307-# Widelands PATH/TO/FILE.PO
1308-# Copyright (C) 2005-2013 Widelands Development Team
1309-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
1310-#
1311-msgid ""
1312-msgstr ""
1313-"Project-Id-Version: Widelands svnVERSION\n"
1314-"Report-Msgid-Bugs-To: widelands-public@lists.sourceforge.net\n"
1315-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
1316-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1317-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1318-"Language-Team: LANGUAGE <widelands-public@lists.sourceforge.net>\n"
1319-"MIME-Version: 1.0\n"
1320-"Content-Type: text/plain; charset=UTF-8\n"
1321-"Content-Transfer-Encoding: 8bit\n"
1322-
1323-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1324-msgid ""
1325-"Congratulations!"
1326-msgstr ""
1327-
1328-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1329-msgid ""
1330-"The player who defeats the other player wins the game"
1331-msgstr ""
1332-
1333-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1334-msgid ""
1335-"Together we're strong"
1336-msgstr ""
1337-
1338-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
1339-msgid ""
1340-"You are defeated!"
1341-msgstr ""
1342-
1343-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
1344-msgid ""
1345-"You have nothing to command left. If you want, you may continue as spectator."
1346-msgstr ""
1347-
1348-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1349-msgid ""
1350-"You have won this game!"
1351-msgstr ""
1352-
1353
1354=== removed file 'po/mp_scenario_together_we_re_strong.wmf/nb.po'
1355--- po/mp_scenario_together_we_re_strong.wmf/nb.po 2014-03-07 05:43:27 +0000
1356+++ po/mp_scenario_together_we_re_strong.wmf/nb.po 1970-01-01 00:00:00 +0000
1357@@ -1,44 +0,0 @@
1358-# Norwegian Bokmal translation for widelands
1359-# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
1360-# This file is distributed under the same license as the widelands package.
1361-# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
1362-#
1363-msgid ""
1364-msgstr ""
1365-"Project-Id-Version: widelands\n"
1366-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1367-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
1368-"PO-Revision-Date: 2012-04-08 14:39+0000\n"
1369-"Last-Translator: Hans Joachim Desserud <Unknown>\n"
1370-"Language-Team: Norwegian Bokmal <nb@li.org>\n"
1371-"MIME-Version: 1.0\n"
1372-"Content-Type: text/plain; charset=UTF-8\n"
1373-"Content-Transfer-Encoding: 8bit\n"
1374-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
1375-"X-Generator: Launchpad (build 16948)\n"
1376-
1377-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1378-msgid "Congratulations!"
1379-msgstr "Gratulerer!"
1380-
1381-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1382-msgid "The player who defeats the other player wins the game"
1383-msgstr "Spilleren som beseirer de andre vinner spillet"
1384-
1385-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1386-msgid "Together we're strong"
1387-msgstr "Sammen er vi sterke"
1388-
1389-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
1390-msgid "You are defeated!"
1391-msgstr "Du har blitt beseiret!"
1392-
1393-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
1394-msgid ""
1395-"You have nothing to command left. If you want, you may continue as spectator."
1396-msgstr ""
1397-"Du har ikke noe igjen å styre. Hvis du vil, kan du fortsette som tilskuer."
1398-
1399-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1400-msgid "You have won this game!"
1401-msgstr "Du har vunnet spillet!"
1402
1403=== removed file 'po/mp_scenario_together_we_re_strong.wmf/nl.po'
1404--- po/mp_scenario_together_we_re_strong.wmf/nl.po 2014-03-07 05:43:27 +0000
1405+++ po/mp_scenario_together_we_re_strong.wmf/nl.po 1970-01-01 00:00:00 +0000
1406@@ -1,45 +0,0 @@
1407-# Dutch translation for widelands
1408-# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
1409-# This file is distributed under the same license as the widelands package.
1410-# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
1411-#
1412-msgid ""
1413-msgstr ""
1414-"Project-Id-Version: widelands\n"
1415-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1416-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
1417-"PO-Revision-Date: 2011-12-14 16:09+0000\n"
1418-"Last-Translator: Foppe Benedictus <Unknown>\n"
1419-"Language-Team: Dutch <nl@li.org>\n"
1420-"MIME-Version: 1.0\n"
1421-"Content-Type: text/plain; charset=UTF-8\n"
1422-"Content-Transfer-Encoding: 8bit\n"
1423-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
1424-"X-Generator: Launchpad (build 16948)\n"
1425-
1426-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1427-msgid "Congratulations!"
1428-msgstr "Gefeliciteerd!"
1429-
1430-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1431-msgid "The player who defeats the other player wins the game"
1432-msgstr "De speler die de andere verslaat wint het spel"
1433-
1434-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1435-msgid "Together we're strong"
1436-msgstr "Samen staan we sterk"
1437-
1438-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
1439-msgid "You are defeated!"
1440-msgstr "Je bent verslagen!"
1441-
1442-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
1443-msgid ""
1444-"You have nothing to command left. If you want, you may continue as spectator."
1445-msgstr ""
1446-"U heeft niets meer om te besturen. Als u wilt kunt u verder gaan als "
1447-"toeschouwer."
1448-
1449-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1450-msgid "You have won this game!"
1451-msgstr "Je hebt het spel gewonnen!"
1452
1453=== removed file 'po/mp_scenario_together_we_re_strong.wmf/oc.po'
1454--- po/mp_scenario_together_we_re_strong.wmf/oc.po 2014-03-07 05:43:27 +0000
1455+++ po/mp_scenario_together_we_re_strong.wmf/oc.po 1970-01-01 00:00:00 +0000
1456@@ -1,45 +0,0 @@
1457-# Occitan (post 1500) translation for widelands
1458-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
1459-# This file is distributed under the same license as the widelands package.
1460-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
1461-#
1462-msgid ""
1463-msgstr ""
1464-"Project-Id-Version: widelands\n"
1465-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1466-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
1467-"PO-Revision-Date: 2012-11-02 11:04+0000\n"
1468-"Last-Translator: Cédric VALMARY (Tot en òc) <cvalmary@yahoo.fr>\n"
1469-"Language-Team: Occitan (post 1500) <oc@li.org>\n"
1470-"MIME-Version: 1.0\n"
1471-"Content-Type: text/plain; charset=UTF-8\n"
1472-"Content-Transfer-Encoding: 8bit\n"
1473-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
1474-"X-Generator: Launchpad (build 16948)\n"
1475-
1476-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1477-msgid "Congratulations!"
1478-msgstr "Òsca !"
1479-
1480-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1481-msgid "The player who defeats the other player wins the game"
1482-msgstr "Lo jogaire que vencerà los autres remportarà la partida"
1483-
1484-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1485-msgid "Together we're strong"
1486-msgstr "Amassa sèm fòrts"
1487-
1488-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
1489-msgid "You are defeated!"
1490-msgstr "Sètz vençuts !"
1491-
1492-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
1493-msgid ""
1494-"You have nothing to command left. If you want, you may continue as spectator."
1495-msgstr ""
1496-"Vos demòra pas mai de tropas a comandar. Se volètz, podètz contunhar coma "
1497-"espectator."
1498-
1499-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1500-msgid "You have won this game!"
1501-msgstr "Avètz ganhat aquesta partida !"
1502
1503=== removed file 'po/mp_scenario_together_we_re_strong.wmf/pl.po'
1504--- po/mp_scenario_together_we_re_strong.wmf/pl.po 2014-03-07 05:43:27 +0000
1505+++ po/mp_scenario_together_we_re_strong.wmf/pl.po 1970-01-01 00:00:00 +0000
1506@@ -1,44 +0,0 @@
1507-# Polish translation for widelands
1508-# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
1509-# This file is distributed under the same license as the widelands package.
1510-# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
1511-#
1512-msgid ""
1513-msgstr ""
1514-"Project-Id-Version: widelands\n"
1515-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1516-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
1517-"PO-Revision-Date: 2011-12-06 20:50+0000\n"
1518-"Last-Translator: Wesmania <ikk_pl@yahoo.co.uk>\n"
1519-"Language-Team: Polish <pl@li.org>\n"
1520-"MIME-Version: 1.0\n"
1521-"Content-Type: text/plain; charset=UTF-8\n"
1522-"Content-Transfer-Encoding: 8bit\n"
1523-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
1524-"X-Generator: Launchpad (build 16948)\n"
1525-
1526-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1527-msgid "Congratulations!"
1528-msgstr "Gratulacje!"
1529-
1530-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1531-msgid "The player who defeats the other player wins the game"
1532-msgstr "Gracz, który pokona drugiego gracza, wygrywa grę."
1533-
1534-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1535-msgid "Together we're strong"
1536-msgstr "W jedności siła"
1537-
1538-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
1539-msgid "You are defeated!"
1540-msgstr "Pokonano cię!"
1541-
1542-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
1543-msgid ""
1544-"You have nothing to command left. If you want, you may continue as spectator."
1545-msgstr ""
1546-"Nie masz już czym dowodzić. Jeśli chcesz, możesz kontynuować jako obserwator."
1547-
1548-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1549-msgid "You have won this game!"
1550-msgstr "Zwycięstwo!"
1551
1552=== removed file 'po/mp_scenario_together_we_re_strong.wmf/pt.po'
1553--- po/mp_scenario_together_we_re_strong.wmf/pt.po 2014-03-07 05:43:27 +0000
1554+++ po/mp_scenario_together_we_re_strong.wmf/pt.po 1970-01-01 00:00:00 +0000
1555@@ -1,74 +0,0 @@
1556-# Widelands PATH/TO/FILE.PO
1557-# Copyright (C) 2005-2012 Widelands Development Team
1558-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
1559-#
1560-msgid ""
1561-msgstr ""
1562-"Project-Id-Version: Widelands svnVERSION\n"
1563-"Report-Msgid-Bugs-To: widelands-public@lists.sourceforge.net\n"
1564-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
1565-"PO-Revision-Date: 2013-06-28 14:12+0000\n"
1566-"Last-Translator: trewe <Unknown>\n"
1567-"Language-Team: LANGUAGE <widelands-public@lists.sourceforge.net>\n"
1568-"MIME-Version: 1.0\n"
1569-"Content-Type: text/plain; charset=UTF-8\n"
1570-"Content-Transfer-Encoding: 8bit\n"
1571-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
1572-"X-Generator: Launchpad (build 16948)\n"
1573-"Language: \n"
1574-
1575-#
1576-# File: ../../maps/MP, line: -1
1577-# File: Scenarios/Together, line: -1
1578-# File: we're, line: -1
1579-# File: strong.wmf/scripting/multiplayer_init.lua, line: 224
1580-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1581-msgid "Congratulations!"
1582-msgstr "Parabéns!"
1583-
1584-#
1585-# File: ../../maps/MP, line: -1
1586-# File: Scenarios/Together, line: -1
1587-# File: we're, line: -1
1588-# File: strong.wmf/scripting/multiplayer_init.lua, line: 212
1589-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1590-msgid "The player who defeats the other player wins the game"
1591-msgstr "Quem vencer ao seu adversário vencerá a partida"
1592-
1593-#
1594-# File: ../../maps/MP, line: -1
1595-# File: Scenarios/Together, line: -1
1596-# File: we're, line: -1
1597-# File: strong.wmf/scripting/multiplayer_init.lua, line: 212
1598-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1599-msgid "Together we're strong"
1600-msgstr "Trabalho em Equipa"
1601-
1602-#
1603-# File: ../../maps/MP, line: -1
1604-# File: Scenarios/Together, line: -1
1605-# File: we're, line: -1
1606-# File: strong.wmf/scripting/multiplayer_init.lua, line: 219
1607-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
1608-msgid "You are defeated!"
1609-msgstr "Foste derrotado!"
1610-
1611-#
1612-# File: ../../maps/MP, line: -1
1613-# File: Scenarios/Together, line: -1
1614-# File: we're, line: -1
1615-# File: strong.wmf/scripting/multiplayer_init.lua, line: 220
1616-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
1617-msgid ""
1618-"You have nothing to command left. If you want, you may continue as spectator."
1619-msgstr ""
1620-"Já não tens nada para comandar. Se quiseres, podes continuar como espectador."
1621-
1622-#
1623-# File: ../../maps/MP, line: -1
1624-# File: Scenarios/Together, line: -1
1625-# File: we're, line: -1
1626-# File: strong.wmf/scripting/multiplayer_init.lua, line: 224
1627-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1628-msgid "You have won this game!"
1629-msgstr "Venceste o jogo!"
1630
1631=== removed file 'po/mp_scenario_together_we_re_strong.wmf/pt_BR.po'
1632--- po/mp_scenario_together_we_re_strong.wmf/pt_BR.po 2014-03-07 05:43:27 +0000
1633+++ po/mp_scenario_together_we_re_strong.wmf/pt_BR.po 1970-01-01 00:00:00 +0000
1634@@ -1,45 +0,0 @@
1635-# Brazilian Portuguese translation for widelands
1636-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
1637-# This file is distributed under the same license as the widelands package.
1638-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
1639-#
1640-msgid ""
1641-msgstr ""
1642-"Project-Id-Version: widelands\n"
1643-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1644-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
1645-"PO-Revision-Date: 2012-09-12 01:33+0000\n"
1646-"Last-Translator: Luiz N <luiz.z@msn.com>\n"
1647-"Language-Team: Brazilian Portuguese <pt_BR@li.org>\n"
1648-"MIME-Version: 1.0\n"
1649-"Content-Type: text/plain; charset=UTF-8\n"
1650-"Content-Transfer-Encoding: 8bit\n"
1651-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
1652-"X-Generator: Launchpad (build 16948)\n"
1653-
1654-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1655-msgid "Congratulations!"
1656-msgstr "Parabéns!"
1657-
1658-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1659-msgid "The player who defeats the other player wins the game"
1660-msgstr "O jogador que derrotar outro jogador, será o vencedor do jogo"
1661-
1662-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1663-msgid "Together we're strong"
1664-msgstr "Juntos somos mais fortes"
1665-
1666-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
1667-msgid "You are defeated!"
1668-msgstr "Você está derrotado!"
1669-
1670-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
1671-msgid ""
1672-"You have nothing to command left. If you want, you may continue as spectator."
1673-msgstr ""
1674-"Você não tem nenhum comando na esquerda. Se você quiser, pode continuar como "
1675-"um espectador."
1676-
1677-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1678-msgid "You have won this game!"
1679-msgstr "Você venceu o jogo!"
1680
1681=== removed file 'po/mp_scenario_together_we_re_strong.wmf/ru.po'
1682--- po/mp_scenario_together_we_re_strong.wmf/ru.po 2014-03-07 05:43:27 +0000
1683+++ po/mp_scenario_together_we_re_strong.wmf/ru.po 1970-01-01 00:00:00 +0000
1684@@ -1,44 +0,0 @@
1685-# Russian translation for widelands
1686-# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
1687-# This file is distributed under the same license as the widelands package.
1688-# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
1689-#
1690-msgid ""
1691-msgstr ""
1692-"Project-Id-Version: widelands\n"
1693-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1694-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
1695-"PO-Revision-Date: 2014-03-06 18:08+0000\n"
1696-"Last-Translator: Lex <teh.f4ll3n@gmail.com>\n"
1697-"Language-Team: Russian <ru@li.org>\n"
1698-"MIME-Version: 1.0\n"
1699-"Content-Type: text/plain; charset=UTF-8\n"
1700-"Content-Transfer-Encoding: 8bit\n"
1701-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
1702-"X-Generator: Launchpad (build 16948)\n"
1703-
1704-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1705-msgid "Congratulations!"
1706-msgstr "Поздравляем!"
1707-
1708-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1709-msgid "The player who defeats the other player wins the game"
1710-msgstr "Игрок, рагромивший другого игрока, побеждает в игре."
1711-
1712-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1713-msgid "Together we're strong"
1714-msgstr "Вместе мы сильны"
1715-
1716-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
1717-msgid "You are defeated!"
1718-msgstr "Вы разгромлены!"
1719-
1720-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
1721-msgid ""
1722-"You have nothing to command left. If you want, you may continue as spectator."
1723-msgstr ""
1724-"Вам больше нечем командовать. Если хотите, можете продолжить как наблюдатель."
1725-
1726-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1727-msgid "You have won this game!"
1728-msgstr "Вы победили в этой игре!"
1729
1730=== removed file 'po/mp_scenario_together_we_re_strong.wmf/sk.po'
1731--- po/mp_scenario_together_we_re_strong.wmf/sk.po 2014-08-10 05:33:09 +0000
1732+++ po/mp_scenario_together_we_re_strong.wmf/sk.po 1970-01-01 00:00:00 +0000
1733@@ -1,43 +0,0 @@
1734-# Slovak translation for widelands
1735-# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
1736-# This file is distributed under the same license as the widelands package.
1737-# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
1738-#
1739-msgid ""
1740-msgstr ""
1741-"Project-Id-Version: widelands\n"
1742-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1743-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
1744-"PO-Revision-Date: 2014-08-09 11:47+0000\n"
1745-"Last-Translator: Miroslav Remák <Unknown>\n"
1746-"Language-Team: Slovak <sk@li.org>\n"
1747-"MIME-Version: 1.0\n"
1748-"Content-Type: text/plain; charset=UTF-8\n"
1749-"Content-Transfer-Encoding: 8bit\n"
1750-"X-Launchpad-Export-Date: 2014-08-10 05:33+0000\n"
1751-"X-Generator: Launchpad (build 17156)\n"
1752-
1753-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1754-msgid "Congratulations!"
1755-msgstr "Blahoželáme!"
1756-
1757-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1758-msgid "The player who defeats the other player wins the game"
1759-msgstr "Hráč, ktorý porazí druhého hráča, vyhráva hru."
1760-
1761-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1762-msgid "Together we're strong"
1763-msgstr "V jednote je sila"
1764-
1765-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
1766-msgid "You are defeated!"
1767-msgstr "Porazili vás!"
1768-
1769-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
1770-msgid ""
1771-"You have nothing to command left. If you want, you may continue as spectator."
1772-msgstr "Už nemáte čomu veliť. Ak chcete, môžete pokračovať ako divák."
1773-
1774-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1775-msgid "You have won this game!"
1776-msgstr "Vyhrali ste túto hru!"
1777
1778=== removed file 'po/mp_scenario_together_we_re_strong.wmf/sv.po'
1779--- po/mp_scenario_together_we_re_strong.wmf/sv.po 2014-03-07 05:43:27 +0000
1780+++ po/mp_scenario_together_we_re_strong.wmf/sv.po 1970-01-01 00:00:00 +0000
1781@@ -1,45 +0,0 @@
1782-# Swedish translation for widelands
1783-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
1784-# This file is distributed under the same license as the widelands package.
1785-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
1786-#
1787-msgid ""
1788-msgstr ""
1789-"Project-Id-Version: widelands\n"
1790-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1791-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
1792-"PO-Revision-Date: 2012-04-21 07:58+0000\n"
1793-"Last-Translator: Patrick H. <dajgtre@gmail.com>\n"
1794-"Language-Team: Swedish <sv@li.org>\n"
1795-"MIME-Version: 1.0\n"
1796-"Content-Type: text/plain; charset=UTF-8\n"
1797-"Content-Transfer-Encoding: 8bit\n"
1798-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
1799-"X-Generator: Launchpad (build 16948)\n"
1800-
1801-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1802-msgid "Congratulations!"
1803-msgstr "Gratulerar!"
1804-
1805-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1806-msgid "The player who defeats the other player wins the game"
1807-msgstr "Spelaren som besegrar den andra spelaren winner spelet"
1808-
1809-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1810-msgid "Together we're strong"
1811-msgstr "Tillsammans är vi starka"
1812-
1813-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
1814-msgid "You are defeated!"
1815-msgstr "Du är besegrad!"
1816-
1817-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
1818-msgid ""
1819-"You have nothing to command left. If you want, you may continue as spectator."
1820-msgstr ""
1821-"Du har inget längre som du kan kontrollera. Om du önskar, kan du forsätta "
1822-"som en obeservatör."
1823-
1824-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1825-msgid "You have won this game!"
1826-msgstr "Du har vunnit matchen!"
1827
1828=== removed file 'po/mp_scenario_together_we_re_strong.wmf/tr.po'
1829--- po/mp_scenario_together_we_re_strong.wmf/tr.po 2014-03-07 05:43:27 +0000
1830+++ po/mp_scenario_together_we_re_strong.wmf/tr.po 1970-01-01 00:00:00 +0000
1831@@ -1,44 +0,0 @@
1832-# Turkish translation for widelands
1833-# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
1834-# This file is distributed under the same license as the widelands package.
1835-# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
1836-#
1837-msgid ""
1838-msgstr ""
1839-"Project-Id-Version: widelands\n"
1840-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1841-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
1842-"PO-Revision-Date: 2013-03-02 17:04+0000\n"
1843-"Last-Translator: Volkan Gezer <Unknown>\n"
1844-"Language-Team: Turkish <tr@li.org>\n"
1845-"MIME-Version: 1.0\n"
1846-"Content-Type: text/plain; charset=UTF-8\n"
1847-"Content-Transfer-Encoding: 8bit\n"
1848-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
1849-"X-Generator: Launchpad (build 16948)\n"
1850-
1851-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1852-msgid "Congratulations!"
1853-msgstr "Tebrikler!"
1854-
1855-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1856-msgid "The player who defeats the other player wins the game"
1857-msgstr "Karşı tarafı yenen oyuncu oyunu kazanır."
1858-
1859-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1860-msgid "Together we're strong"
1861-msgstr "Birlikte güçlüyüz"
1862-
1863-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
1864-msgid "You are defeated!"
1865-msgstr "Bozguna uğradın!"
1866-
1867-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
1868-msgid ""
1869-"You have nothing to command left. If you want, you may continue as spectator."
1870-msgstr ""
1871-"Verebileceğin komut kalmadı. İstersen izleyici olarak devam edebilirsin."
1872-
1873-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1874-msgid "You have won this game!"
1875-msgstr "Bu oyunu kazandın!"
1876
1877=== removed file 'po/mp_scenario_together_we_re_strong.wmf/zh_TW.po'
1878--- po/mp_scenario_together_we_re_strong.wmf/zh_TW.po 2014-03-07 05:43:27 +0000
1879+++ po/mp_scenario_together_we_re_strong.wmf/zh_TW.po 1970-01-01 00:00:00 +0000
1880@@ -1,43 +0,0 @@
1881-# Chinese (Traditional) translation for widelands
1882-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
1883-# This file is distributed under the same license as the widelands package.
1884-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
1885-#
1886-msgid ""
1887-msgstr ""
1888-"Project-Id-Version: widelands\n"
1889-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1890-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
1891-"PO-Revision-Date: 2012-10-29 04:03+0000\n"
1892-"Last-Translator: poormusic <poormusic2001@gmail.com>\n"
1893-"Language-Team: Chinese (Traditional) <zh_TW@li.org>\n"
1894-"MIME-Version: 1.0\n"
1895-"Content-Type: text/plain; charset=UTF-8\n"
1896-"Content-Transfer-Encoding: 8bit\n"
1897-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
1898-"X-Generator: Launchpad (build 16948)\n"
1899-
1900-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1901-msgid "Congratulations!"
1902-msgstr "恭喜!"
1903-
1904-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1905-msgid "The player who defeats the other player wins the game"
1906-msgstr "打敗其他玩家的人就可以贏得此遊戲"
1907-
1908-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
1909-msgid "Together we're strong"
1910-msgstr ""
1911-
1912-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
1913-msgid "You are defeated!"
1914-msgstr "你被打敗了!"
1915-
1916-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
1917-msgid ""
1918-"You have nothing to command left. If you want, you may continue as spectator."
1919-msgstr "你沒有什麼可以命令的了.如果你要的話, 你可以當旁觀者."
1920-
1921-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
1922-msgid "You have won this game!"
1923-msgstr "你已經贏了!"
1924
1925=== modified file 'src/ai/defaultai.cc'
1926--- src/ai/defaultai.cc 2014-10-16 08:11:06 +0000
1927+++ src/ai/defaultai.cc 2014-10-27 09:37:32 +0000
1928@@ -3276,7 +3276,6 @@
1929 count_m += 1;
1930 }
1931
1932- assert (count_l > 0 && count_m > 0);
1933- log(" Average: Landsize: %5d, military strenght: %3d\n", sum_l / count_l, sum_m / count_m);
1934-
1935+ assert(count_l > 0 && count_m > 0);
1936+ log(" Average: Landsize: %5d, military strength: %3d\n", sum_l / count_l, sum_m / count_m);
1937 }
1938
1939=== modified file 'src/base/i18n.cc'
1940--- src/base/i18n.cc 2014-08-01 12:57:17 +0000
1941+++ src/base/i18n.cc 2014-10-27 09:37:32 +0000
1942@@ -325,15 +325,22 @@
1943 result = *it;
1944 }
1945 else if (it == --items.end()) {
1946- if (listtype == ConcatenateWith::AND) {
1947+ if (listtype == ConcatenateWith::AMPERSAND) {
1948 /** TRANSLATORS: Concatenate the last 2 items on a list. */
1949 /** TRANSLATORS: RTL languages might want to change the word order here. */
1950- result = (boost::format(_("%1$s and %2$s")) % result % (*it)).str();
1951- }
1952- else {
1953+ result = (boost::format(_("%1$s & %2$s")) % result % (*it)).str();
1954+ } else if (listtype == ConcatenateWith::OR) {
1955 /** TRANSLATORS: Join the last 2 items on a list with "or". */
1956 /** TRANSLATORS: RTL languages might want to change the word order here. */
1957 result = (boost::format(_("%1$s or %2$s")) % result % (*it)).str();
1958+ } else if (listtype == ConcatenateWith::COMMA) {
1959+ /** TRANSLATORS: Join the last 2 items on a list with a comma. */
1960+ /** TRANSLATORS: RTL languages might want to change the word order here. */
1961+ result = (boost::format(_("%1$s, %2$s")) % result % (*it)).str();
1962+ } else {
1963+ /** TRANSLATORS: Concatenate the last 2 items on a list. */
1964+ /** TRANSLATORS: RTL languages might want to change the word order here. */
1965+ result = (boost::format(_("%1$s and %2$s")) % result % (*it)).str();
1966 }
1967 }
1968 else {
1969
1970=== modified file 'src/base/i18n.h'
1971--- src/base/i18n.h 2014-08-02 10:14:12 +0000
1972+++ src/base/i18n.h 2014-10-27 09:37:32 +0000
1973@@ -56,7 +56,7 @@
1974
1975 // Localize a list of 'items'. The last 2 items are concatenated with "and" or
1976 // "or", depending on 'concatenate_with'.
1977-enum class ConcatenateWith {AND, OR};
1978+enum class ConcatenateWith {AND, OR, AMPERSAND, COMMA};
1979 std::string localize_item_list(const std::vector<std::string>& items, ConcatenateWith concatenate_with);
1980
1981 }
1982
1983=== modified file 'src/base/time_string.cc'
1984--- src/base/time_string.cc 2014-10-11 10:04:45 +0000
1985+++ src/base/time_string.cc 2014-10-27 09:37:32 +0000
1986@@ -19,13 +19,10 @@
1987
1988 #include "base/time_string.h"
1989
1990-#include <algorithm>
1991 #include <cassert>
1992 #include <ctime>
1993 #include <string>
1994
1995-#include <boost/format.hpp>
1996-#include <boost/regex.hpp>
1997 #include <stdint.h>
1998
1999 #include "base/i18n.h"
2000@@ -90,52 +87,82 @@
2001
2002 std::string localize_month(int8_t month) {
2003 switch (month) {
2004+ case 0:
2005+ /** TRANSLATORS: January. Keep this to 4 letters maximum. */
2006+ /** TRANSLATORS: Use the "Months - abbreviated - Formatting" definition from the CLDR */
2007+ /** TRANSLATORS: definition if there is one for your language. */
2008+ /** TRANSLATORS: http://www.unicode.org/cldr/charts/latest/summary/root.html */
2009+ return _("Jan");
2010 case 1:
2011- /** TRANSLATORS: January. Keep this short if you can. */
2012- return _("Jan");
2013+ /** TRANSLATORS: February. Keep this to 4 letters maximum. */
2014+ /** TRANSLATORS: Use the "Months - abbreviated - Formatting" definition from the CLDR */
2015+ /** TRANSLATORS: definition if there is one for your language. */
2016+ /** TRANSLATORS: http://www.unicode.org/cldr/charts/latest/summary/root.html */
2017+ return _("Feb");
2018 case 2:
2019- /** TRANSLATORS: February. Keep this short if you can. */
2020- return _("Feb");
2021+ /** TRANSLATORS: March. Keep this to 4 letters maximum. */
2022+ /** TRANSLATORS: Use the "Months - abbreviated - Formatting" definition from the CLDR */
2023+ /** TRANSLATORS: definition if there is one for your language. */
2024+ /** TRANSLATORS: http://www.unicode.org/cldr/charts/latest/summary/root.html */
2025+ return _("Mar");
2026 case 3:
2027- /** TRANSLATORS: March. Keep this short if you can. */
2028- return _("Mar");
2029+ /** TRANSLATORS: April. Keep this to 4 letters maximum. */
2030+ /** TRANSLATORS: Use the "Months - abbreviated - Formatting" definition from the CLDR */
2031+ /** TRANSLATORS: definition if there is one for your language. */
2032+ /** TRANSLATORS: http://www.unicode.org/cldr/charts/latest/summary/root.html */
2033+ return _("Apr");
2034 case 4:
2035- /** TRANSLATORS: April. Keep this short if you can. */
2036- return _("Apr");
2037+ /** TRANSLATORS: May. Keep this to 4 letters maximum. */
2038+ /** TRANSLATORS: Use the "Months - abbreviated - Formatting" definition from the CLDR */
2039+ /** TRANSLATORS: definition if there is one for your language. */
2040+ /** TRANSLATORS: http://www.unicode.org/cldr/charts/latest/summary/root.html */
2041+ return _("May");
2042 case 5:
2043- /** TRANSLATORS: May. Keep this short if you can. */
2044- return _("May");
2045+ /** TRANSLATORS: June. Keep this to 4 letters maximum. */
2046+ /** TRANSLATORS: Use the "Months - abbreviated - Formatting" definition from the CLDR */
2047+ /** TRANSLATORS: definition if there is one for your language. */
2048+ /** TRANSLATORS: http://www.unicode.org/cldr/charts/latest/summary/root.html */
2049+ return _("Jun");
2050 case 6:
2051- /** TRANSLATORS: June. Keep this short if you can. */
2052- return _("Jun");
2053+ /** TRANSLATORS: July. Keep this to 4 letters maximum. */
2054+ /** TRANSLATORS: Use the "Months - abbreviated - Formatting" definition from the CLDR */
2055+ /** TRANSLATORS: definition if there is one for your language. */
2056+ /** TRANSLATORS: http://www.unicode.org/cldr/charts/latest/summary/root.html */
2057+ return _("Jul");
2058 case 7:
2059- /** TRANSLATORS: July. Keep this short if you can. */
2060- return _("Jul");
2061+ /** TRANSLATORS: August. Keep this to 4 letters maximum. */
2062+ /** TRANSLATORS: Use the "Months - abbreviated - Formatting" definition from the CLDR */
2063+ /** TRANSLATORS: definition if there is one for your language. */
2064+ /** TRANSLATORS: http://www.unicode.org/cldr/charts/latest/summary/root.html */
2065+ return _("Aug");
2066 case 8:
2067- /** TRANSLATORS: August. Keep this short if you can. */
2068- return _("Aug");
2069+ /** TRANSLATORS: September. Keep this to 4 letters maximum. */
2070+ /** TRANSLATORS: Use the "Months - abbreviated - Formatting" definition from the CLDR */
2071+ /** TRANSLATORS: definition if there is one for your language. */
2072+ /** TRANSLATORS: http://www.unicode.org/cldr/charts/latest/summary/root.html */
2073+ return _("Sep");
2074 case 9:
2075- /** TRANSLATORS: September. Keep this short if you can. */
2076- return _("Sep");
2077+ /** TRANSLATORS: October. Keep this to 4 letters maximum. */
2078+ /** TRANSLATORS: Use the "Months - abbreviated - Formatting" definition from the CLDR */
2079+ /** TRANSLATORS: definition if there is one for your language. */
2080+ /** TRANSLATORS: http://www.unicode.org/cldr/charts/latest/summary/root.html */
2081+ return _("Oct");
2082 case 10:
2083- /** TRANSLATORS: October. Keep this short if you can. */
2084- return _("Oct");
2085+ /** TRANSLATORS: November. Keep this to 4 letters maximum. */
2086+ /** TRANSLATORS: Use the "Months - abbreviated - Formatting" definition from the CLDR */
2087+ /** TRANSLATORS: definition if there is one for your language. */
2088+ /** TRANSLATORS: http://www.unicode.org/cldr/charts/latest/summary/root.html */
2089+ return _("Nov");
2090 case 11:
2091- /** TRANSLATORS: November. Keep this short if you can. */
2092- return _("Nov");
2093- case 12:
2094- /** TRANSLATORS: December. Keep this short if you can. */
2095+ /** TRANSLATORS: December. Keep this to 4 letters maximum. */
2096+ /** TRANSLATORS: Use the "Months - abbreviated - Formatting" definition from the CLDR */
2097+ /** TRANSLATORS: definition if there is one for your language. */
2098 return _("Dec");
2099 default:
2100 return std::to_string(month);
2101 }
2102 }
2103
2104-// Check if this is a string of the type "YYYY-MM-DDThh.mm.ss"
2105-bool is_timestring(const std::string& timestring) {
2106- boost::regex re("\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d\\.\\d\\d\\.\\d\\d.*");
2107- return boost::regex_match(timestring, re);
2108-}
2109
2110 char * gamestring_with_leading_zeros(uint32_t gametime)
2111 {
2112
2113=== modified file 'src/base/time_string.h'
2114--- src/base/time_string.h 2014-10-11 10:04:45 +0000
2115+++ src/base/time_string.h 2014-10-27 09:37:32 +0000
2116@@ -30,12 +30,9 @@
2117 char * timestring();
2118
2119 /// Turn a month number into a short, localized month string,
2120-/// 1 = "Jan" ... 12 = "Dec"
2121+/// 0 = "Jan" ... 11 = "Dec"
2122 std::string localize_month(int8_t month);
2123
2124-/// Returns true if this string starts with "YYYY-MM-DDThh.mm.ss"
2125-bool is_timestring(const std::string& timestring);
2126-
2127 /// Get a string representation of the game time as hhh:mm:ss. If Time
2128 /// represents more than 999 hours, it wraps around. Use this in table columns
2129 /// for easy sorting.
2130
2131=== modified file 'src/editor/tools/editor_info_tool.cc'
2132--- src/editor/tools/editor_info_tool.cc 2014-09-18 18:52:34 +0000
2133+++ src/editor/tools/editor_info_tool.cc 2014-10-27 09:37:32 +0000
2134@@ -119,7 +119,7 @@
2135
2136 // *** Map info
2137 buf += std::string("\n") + _("Map:") + "\n";
2138- buf += "• " + (boost::format(_("Name: %s")) % map.get_name()).str() + "\n";
2139+ buf += "• " + (boost::format(_("Name: %s")) % map.get_name().c_str()).str() + "\n";
2140 buf += "• " + (boost::format(_("Size: %1$ix%2$i"))
2141 % map.get_width() % map.get_height()).str() + "\n";
2142
2143@@ -132,7 +132,7 @@
2144 }
2145
2146 buf += "• " + (boost::format(_("Author: %s")) % map.get_author()).str() + "\n";
2147- buf += "• " + (boost::format(_("Descr: %s")) % map.get_description()).str() + "\n";
2148+ buf += "• " + (boost::format(_("Descr: %s")) % map.get_description().c_str()).str() + "\n";
2149
2150 multiline_textarea->set_text(buf.c_str());
2151
2152
2153=== modified file 'src/editor/ui_menus/editor_main_menu_load_map.cc'
2154--- src/editor/ui_menus/editor_main_menu_load_map.cc 2014-09-30 05:41:55 +0000
2155+++ src/editor/ui_menus/editor_main_menu_load_map.cc 2014-10-27 09:37:32 +0000
2156@@ -75,7 +75,7 @@
2157 posy += 40 + spacing;
2158
2159 new UI::Textarea
2160- (this, posx, posy, 150, 20, _("Author:"), UI::Align_CenterLeft);
2161+ (this, posx, posy, 150, 20, _("Authors:"), UI::Align_CenterLeft);
2162 m_author =
2163 new UI::Textarea
2164 (this, posx + descr_label_w, posy, 200, 20, "---", UI::Align_CenterLeft);
2165@@ -171,7 +171,8 @@
2166 m_name ->set_tooltip(map.get_name());
2167 m_author->set_text(map.get_author());
2168 m_descr ->set_text
2169- (_(map.get_description()) + (map.get_hint().empty() ? "" : (std::string("\n") + _(map.get_hint()))));
2170+ (_(map.get_description()) +
2171+ (map.get_hint().empty() ? "" : (std::string("\n\n") + _(map.get_hint()))));
2172
2173 m_nrplayers->set_text(std::to_string(static_cast<unsigned int>(map.get_nrplayers())));
2174
2175
2176=== modified file 'src/editor/ui_menus/editor_main_menu_map_options.cc'
2177--- src/editor/ui_menus/editor_main_menu_map_options.cc 2014-09-30 05:41:55 +0000
2178+++ src/editor/ui_menus/editor_main_menu_map_options.cc 2014-10-27 09:37:32 +0000
2179@@ -75,7 +75,7 @@
2180 m_nrplayers =
2181 new UI::Textarea(this, posx + ta->get_w() + spacing, posy - 2, "1");
2182 posy += height + spacing;
2183- ta = new UI::Textarea(this, posx, posy - 2, _("Author:"));
2184+ ta = new UI::Textarea(this, posx, posy - 2, _("Authors:"));
2185 m_author =
2186 new UI::EditBox
2187 (this,
2188@@ -131,9 +131,9 @@
2189 */
2190 void MainMenuMapOptions::changed(int32_t const id) {
2191 if (id == 0) {
2192- eia().egbase().map().set_name(m_name->text().c_str());
2193+ eia().egbase().map().set_name(m_name->text());
2194 } else if (id == 1) {
2195- eia().egbase().map().set_author(m_author->text().c_str());
2196+ eia().egbase().map().set_author(m_author->text());
2197 g_options.pull_section("global").set_string
2198 ("realname", m_author->text());
2199 }
2200@@ -144,5 +144,5 @@
2201 * Called when the editbox has changed
2202 */
2203 void MainMenuMapOptions::editbox_changed() {
2204- eia().egbase().map().set_description(m_descr->get_text().c_str());
2205+ eia().egbase().map().set_description(m_descr->get_text());
2206 }
2207
2208=== modified file 'src/editor/ui_menus/editor_main_menu_save_map.cc'
2209--- src/editor/ui_menus/editor_main_menu_save_map.cc 2014-09-30 05:41:55 +0000
2210+++ src/editor/ui_menus/editor_main_menu_save_map.cc 2014-10-27 09:37:32 +0000
2211@@ -85,7 +85,7 @@
2212 posy += 40 + spacing;
2213
2214 new UI::Textarea
2215- (this, posx, posy, descr_label_w, 20, _("Author:"), UI::Align_CenterLeft);
2216+ (this, posx, posy, descr_label_w, 20, _("Authors:"), UI::Align_CenterLeft);
2217 m_author =
2218 new UI::Textarea
2219 (this, posx + descr_label_w, posy, 200, 20, "---", UI::Align_CenterLeft);
2220@@ -174,7 +174,7 @@
2221 fill_list();
2222 } else { // Ok, save this map
2223 Widelands::Map & map = eia().egbase().map();
2224- if (!strcmp(map.get_name(), _("No Name"))) {
2225+ if (map.get_name() != _("No Name")) {
2226 std::string::size_type const filename_size = filename.size();
2227 map.set_name
2228 ((4 <= filename_size
2229
2230=== modified file 'src/game_io/game_preload_packet.cc'
2231--- src/game_io/game_preload_packet.cc 2014-10-07 10:59:11 +0000
2232+++ src/game_io/game_preload_packet.cc 2014-10-27 09:37:32 +0000
2233@@ -69,11 +69,7 @@
2234 if (fs.file_exists(MINIMAP_FILENAME)) {
2235 m_minimap_path = MINIMAP_FILENAME;
2236 }
2237- m_saveyear = s.get_int("saveyear");
2238- m_savemonth = s.get_int("savemonth");
2239- m_saveday = s.get_int("saveday");
2240- m_savehour = s.get_int("savehour");
2241- m_saveminute = s.get_int("saveminute");
2242+ m_savetimestamp = static_cast<time_t>(s.get_natural("savetimestamp"));
2243 m_gametype = static_cast<GameController::GameType>(s.get_natural("gametype"));
2244 } else {
2245 throw GameDataError
2246@@ -117,15 +113,7 @@
2247
2248 s.set_string("background", map.get_background());
2249 s.set_string("win_condition", game.get_win_condition_displayname());
2250-
2251- time_t t;
2252- time(&t);
2253- struct tm * datetime = localtime(&t);
2254- s.set_int("saveyear", 1900 + datetime->tm_year); // years start at 1900
2255- s.set_int("savemonth", 1 + datetime->tm_mon); // months start at 0
2256- s.set_int("saveday", datetime->tm_mday);
2257- s.set_int("savehour", datetime->tm_hour);
2258- s.set_int("saveminute", datetime->tm_min);
2259+ s.set_int("savetimestamp", static_cast<uint32_t>(time(nullptr)));
2260 s.set_int("gametype", static_cast<int32_t>(game.game_controller()->get_game_type()));
2261
2262 prof.write("preload", false, fs);
2263
2264=== modified file 'src/game_io/game_preload_packet.h'
2265--- src/game_io/game_preload_packet.h 2014-10-07 10:59:11 +0000
2266+++ src/game_io/game_preload_packet.h 2014-10-27 09:37:32 +0000
2267@@ -47,11 +47,7 @@
2268 uint8_t get_number_of_players() {return m_number_of_players;}
2269 std::string get_minimap_path() {return m_minimap_path;}
2270
2271- uint16_t get_saveyear() {return m_saveyear;}
2272- uint8_t get_savemonth() {return m_savemonth;}
2273- uint8_t get_saveday() {return m_saveday;}
2274- uint8_t get_savehour() {return m_savehour;}
2275- uint8_t get_saveminute() {return m_saveminute;}
2276+ time_t get_savetimestamp() {return m_savetimestamp;}
2277 GameController::GameType get_gametype() {return m_gametype;}
2278
2279 private:
2280@@ -62,11 +58,7 @@
2281 uint32_t m_gametime;
2282 uint8_t m_player_nr; // The local player idx
2283 uint8_t m_number_of_players;
2284- uint16_t m_saveyear;
2285- uint8_t m_savemonth;
2286- uint8_t m_saveday;
2287- uint8_t m_savehour;
2288- uint8_t m_saveminute;
2289+ time_t m_savetimestamp;
2290 GameController::GameType m_gametype;
2291 };
2292
2293
2294=== modified file 'src/logic/game.cc'
2295--- src/logic/game.cc 2014-10-07 10:59:11 +0000
2296+++ src/logic/game.cc 2014-10-27 09:37:32 +0000
2297@@ -139,6 +139,7 @@
2298 m_state (gs_notrunning),
2299 m_cmdqueue (*this),
2300 m_replaywriter (nullptr),
2301+ /** TRANSLATORS: Win condition for this game has not been set. */
2302 m_win_condition_displayname(_("Not set"))
2303 {
2304 }
2305
2306=== modified file 'src/logic/map.cc'
2307--- src/logic/map.cc 2014-09-20 09:37:47 +0000
2308+++ src/logic/map.cc 2014-10-27 09:37:32 +0000
2309@@ -73,6 +73,7 @@
2310 m_height (0),
2311 m_pathfieldmgr (new PathfieldManager)
2312 {
2313+ m_suggested_teams.clear();
2314 }
2315
2316
2317@@ -317,9 +318,9 @@
2318 */
2319 void Map::create_empty_map
2320 (const World& world, uint32_t const w, uint32_t const h,
2321- char const * const name,
2322- char const * const author,
2323- char const * const description)
2324+ const std::string& name,
2325+ const std::string& author,
2326+ const std::string& description)
2327 {
2328 set_size(w, h);
2329 set_name (name);
2330@@ -543,40 +544,40 @@
2331 }
2332
2333
2334-void Map::set_filename(char const * const string)
2335-{
2336- snprintf(m_filename, sizeof(m_filename), "%s", string);
2337-}
2338-
2339-void Map::set_author(char const * const string)
2340-{
2341- snprintf(m_author, sizeof(m_author), "%s", string);
2342-}
2343-
2344-void Map::set_name(char const * const string)
2345-{
2346- snprintf(m_name, sizeof(m_name), "%s", string);
2347-}
2348-
2349-void Map::set_description(char const * const string)
2350-{
2351- snprintf(m_description, sizeof(m_description), "%s", string);
2352-}
2353-
2354-void Map::set_hint(std::string string)
2355-{
2356- m_hint = string;
2357-}
2358-
2359-void Map::set_background(char const * const string)
2360-{
2361- if (string)
2362- m_background = string;
2363- else
2364+void Map::set_filename(const std::string& filename)
2365+{
2366+ m_filename = filename;
2367+}
2368+
2369+void Map::set_author(const std::string& author)
2370+{
2371+ m_author = author;
2372+}
2373+
2374+void Map::set_name(const std::string& name)
2375+{
2376+ m_name = name;
2377+}
2378+
2379+void Map::set_description(const std::string& description)
2380+{
2381+ m_description = description;
2382+}
2383+
2384+void Map::set_hint(const std::string& hint)
2385+{
2386+ m_hint = hint;
2387+}
2388+
2389+void Map::set_background(const std::string& image_path)
2390+{
2391+ if (image_path.empty())
2392 m_background.clear();
2393+ else
2394+ m_background = image_path;
2395 }
2396
2397-void Map::add_tag(std::string tag) {
2398+void Map::add_tag(const std::string& tag) {
2399 m_tags.insert(tag);
2400 }
2401
2402@@ -1646,7 +1647,7 @@
2403 }
2404 } else if (boost::algorithm::ends_with(lower_filename, S2MF_SUFFIX) ||
2405 boost::algorithm::ends_with(lower_filename, S2MF_SUFFIX2)) {
2406- result.reset(new S2MapLoader(filename.c_str(), *this));
2407+ result.reset(new S2MapLoader(filename, *this));
2408 }
2409 return result;
2410 }
2411
2412=== modified file 'src/logic/map.h'
2413--- src/logic/map.h 2014-09-19 12:54:54 +0000
2414+++ src/logic/map.h 2014-10-27 09:37:32 +0000
2415@@ -142,6 +142,9 @@
2416
2417 using PortSpacesSet = std::set<Coords, Coords::OrderingFunctor>;
2418 using Objectives = std::map<std::string, std::unique_ptr<Objective>>;
2419+ using SuggestedTeam = std::vector<uint16_t>; // Players in a team
2420+ using SuggestedTeamLineup = std::vector<SuggestedTeam*>; // Recommended teams to play against each other
2421+
2422
2423 enum { // flags for findpath()
2424
2425@@ -174,9 +177,9 @@
2426 (const World& world,
2427 uint32_t w = 64,
2428 uint32_t h = 64,
2429- char const* name = _("No Name"),
2430- char const* author = _("Unknown"),
2431- char const* description = _("no description defined"));
2432+ const std::string& name = _("No Name"),
2433+ const std::string& author = _("Unknown"),
2434+ const std::string& description = _("No description defined"));
2435
2436 void recalc_whole_map(const World& world);
2437 virtual void recalc_for_field_area(const World& world, Area<FCoords>);
2438@@ -190,13 +193,13 @@
2439 return m_starting_pos[p - 1];
2440 }
2441
2442- void set_filename (char const *);
2443- void set_author (char const *);
2444- void set_name (char const *);
2445- void set_description(char const *);
2446- void set_hint (std::string);
2447- void set_background (char const *);
2448- void add_tag (std::string);
2449+ void set_filename (const std::string& filename);
2450+ void set_author (const std::string& author);
2451+ void set_name (const std::string& name);
2452+ void set_description(const std::string& description);
2453+ void set_hint (const std::string& hint);
2454+ void set_background (const std::string& image_path);
2455+ void add_tag (const std::string& tag);
2456 void set_scenario_types(ScenarioTypes t) {m_scenario_types = t;}
2457
2458 // Allows access to the filesystem of the map to access auxiliary files.
2459@@ -204,16 +207,19 @@
2460 FileSystem* filesystem() const;
2461
2462 // informational functions
2463- const char * get_filename() const {return m_filename;}
2464- const char * get_author() const {return m_author;}
2465- const char * get_name() const {return m_name;}
2466- const char * get_description() const {return m_description;}
2467- std::string get_hint() const {return m_hint;}
2468- const std::string & get_background() const {return m_background;}
2469+ const std::string& get_filename() const {return m_filename;}
2470+ const std::string& get_author() const {return m_author;}
2471+ const std::string& get_name() const {return m_name;}
2472+ const std::string& get_description() const {return m_description;}
2473+ const std::string& get_hint() const {return m_hint;}
2474+ const std::string& get_background() const {return m_background;}
2475+
2476 using Tags = std::set<std::string>;
2477 const Tags & get_tags() const {return m_tags;}
2478 bool has_tag(std::string & s) const {return m_tags.count(s);}
2479
2480+ const std::vector<SuggestedTeamLineup*>& get_suggested_teams() const {return m_suggested_teams;}
2481+
2482 PlayerNumber get_nrplayers() const {return m_nrplayers;}
2483 ScenarioTypes scenario_types() const {return m_scenario_types;}
2484 Extent extent() const {return Extent(m_width, m_height);}
2485@@ -394,13 +400,15 @@
2486
2487 int16_t m_width;
2488 int16_t m_height;
2489- char m_filename [256];
2490- char m_author [61];
2491- char m_name [61];
2492- char m_description[1024];
2493+ std::string m_filename;
2494+ std::string m_author;
2495+ std::string m_name;
2496+ std::string m_description;
2497 std::string m_hint;
2498 std::string m_background;
2499 Tags m_tags;
2500+ std::vector<SuggestedTeamLineup*> m_suggested_teams;
2501+
2502 std::vector<Coords> m_starting_pos; // players' starting positions
2503
2504 std::unique_ptr<Field[]> m_fields;
2505
2506=== modified file 'src/map_io/map_elemental_packet.cc'
2507--- src/map_io/map_elemental_packet.cc 2014-09-19 12:54:54 +0000
2508+++ src/map_io/map_elemental_packet.cc 2014-10-27 09:37:32 +0000
2509@@ -20,6 +20,7 @@
2510 #include "map_io/map_elemental_packet.h"
2511
2512 #include <boost/algorithm/string.hpp>
2513+#include <boost/format.hpp>
2514
2515 #include "base/deprecated.h"
2516 #include "logic/editor_game_base.h"
2517@@ -47,7 +48,7 @@
2518 map->set_author (s.get_string("author"));
2519 map->set_description(s.get_string("descr"));
2520 map->set_hint (s.get_string("hint", ""));
2521- map->set_background (s.get_string("background"));
2522+ map->set_background (s.get_string("background", ""));
2523 old_world_name_ = s.get_string("world", "");
2524
2525 std::string t = s.get_string("tags", "");
2526@@ -61,6 +62,46 @@
2527 map->add_tag(tn);
2528 }
2529 }
2530+
2531+ // Get suggested teams
2532+ uint16_t team_section_id = 0;
2533+ std::string teamsection_key = (boost::format("teams%02i") % team_section_id).str();
2534+ while (Section* teamsection = prof.get_section(teamsection_key.c_str())) {
2535+
2536+ // A lineup is made up of teams
2537+ Map::SuggestedTeamLineup* lineup = new Map::SuggestedTeamLineup();
2538+
2539+ uint16_t team_number = 1;
2540+ std::string team_key = (boost::format("team%i") % team_number).str().c_str();
2541+ std::string team_string = teamsection->get_string(team_key.c_str(), "");
2542+ while (!team_string.empty()) {
2543+
2544+ // A team is made up of players
2545+ Map::SuggestedTeam* team = new Map::SuggestedTeam();
2546+
2547+ std::vector<std::string> players_string;
2548+ boost::split(players_string, team_string, boost::is_any_of(","));
2549+
2550+ for (const std::string& player: players_string) {
2551+ uint16_t player_number = static_cast<uint16_t>(atoi(player.c_str()));
2552+ assert(player_number < MAX_PLAYERS);
2553+ team->push_back(player_number);
2554+ }
2555+
2556+ lineup->push_back(team);
2557+
2558+ // Increase team number
2559+ ++team_number;
2560+ team_key = (boost::format("team%i") % team_number).str();
2561+ team_string = teamsection->get_string(team_key.c_str(), "");
2562+ }
2563+
2564+ map->m_suggested_teams.push_back(lineup);
2565+
2566+ // Increase teamsection
2567+ ++team_section_id;
2568+ teamsection_key = (boost::format("teams%02i") % team_section_id).str().c_str();
2569+ }
2570 } else
2571 throw GameDataError
2572 ("unknown/unhandled version %i", packet_version);
2573@@ -93,6 +134,8 @@
2574 s.set_string("author", map.get_author ());
2575 s.set_string("descr", map.get_description());
2576 s.set_string("hint", map.get_hint ());
2577+ if (!map.get_background().empty())
2578+ s.set_string("background", map.get_background ());
2579 s.set_string("tags", boost::algorithm::join(map.get_tags(), ","));
2580
2581 prof.write("elemental", false, fs);
2582
2583=== modified file 'src/map_io/map_loader.h'
2584--- src/map_io/map_loader.h 2014-09-10 08:55:04 +0000
2585+++ src/map_io/map_loader.h 2014-10-27 09:37:32 +0000
2586@@ -36,7 +36,7 @@
2587 /// must be selected.
2588 class MapLoader {
2589 public:
2590- MapLoader(char const * const filename, Map & M)
2591+ MapLoader(const std::string& filename, Map & M)
2592 : m_map(M), m_s(STATE_INIT) {m_map.set_filename(filename);}
2593 virtual ~MapLoader() {}
2594
2595
2596=== modified file 'src/map_io/s2map.cc'
2597--- src/map_io/s2map.cc 2014-09-20 09:37:47 +0000
2598+++ src/map_io/s2map.cc 2014-10-27 09:37:32 +0000
2599@@ -50,12 +50,12 @@
2600 struct S2MapDescrHeader {
2601
2602 char magic[10]; // "WORLD_V1.0"
2603- char name [20];
2604+ std::string name;
2605 int16_t w;
2606 int16_t h;
2607 int8_t uses_world; // 0 = green, 1 =black, 2 = winter
2608 int8_t nplayers;
2609- char author[26];
2610+ std::string author;
2611 char bulk[2290]; // unknown
2612 } /* size 2352 */;
2613
2614@@ -308,7 +308,7 @@
2615
2616 } // namespace
2617
2618-S2MapLoader::S2MapLoader(const char * filename, Widelands::Map & M)
2619+S2MapLoader::S2MapLoader(const std::string& filename, Widelands::Map& M)
2620 : Widelands::MapLoader(filename, M), m_filename(filename)
2621 {
2622 }
2623
2624=== modified file 'src/map_io/s2map.h'
2625--- src/map_io/s2map.h 2014-09-10 08:55:04 +0000
2626+++ src/map_io/s2map.h 2014-10-27 09:37:32 +0000
2627@@ -34,7 +34,7 @@
2628 WINTERLAND = 2,
2629 };
2630
2631- S2MapLoader(const char *, Widelands::Map &);
2632+ S2MapLoader(const std::string& filename, Widelands::Map& M);
2633
2634 int32_t preload_map(bool) override;
2635 virtual int32_t load_map_complete
2636
2637=== modified file 'src/network/nethost.cc'
2638--- src/network/nethost.cc 2014-10-26 12:17:01 +0000
2639+++ src/network/nethost.cc 2014-10-27 09:37:32 +0000
2640@@ -901,7 +901,7 @@
2641 if (d->settings.users.at(i).position != UserSettings::not_connected())
2642 if (d->settings.users.at(i).name != d->localplayername) // all names, but the dedicated server
2643 clients.push_back(d->settings.users.at(i).name);
2644- DedicatedLog::get()->game_start(clients, game.map().get_name());
2645+ DedicatedLog::get()->game_start(clients, game.map().get_name().c_str());
2646 }
2647 game.run
2648 (loaderUI.get(),
2649@@ -1316,27 +1316,25 @@
2650 FilenameSet files = g_fs->list_directory(directories.at(directories.size() - 1).c_str());
2651 directories.resize(directories.size() - 1);
2652 Widelands::Map map;
2653- const FilenameSet & gamefiles = files;
2654- for (const std::string& temp_filenames : gamefiles) {
2655- char const * const name = temp_filenames.c_str();
2656- std::unique_ptr<Widelands::MapLoader> ml = map.get_correct_loader(name);
2657+ for (const std::string& filename : files) {
2658+ std::unique_ptr<Widelands::MapLoader> ml = map.get_correct_loader(filename);
2659 if (ml) {
2660- map.set_filename(name);
2661+ map.set_filename(filename);
2662 ml->preload_map(true);
2663 DedicatedMapInfos info;
2664- info.path = name;
2665+ info.path = filename;
2666 info.players = map.get_nrplayers();
2667 info.scenario = map.scenario_types() & Widelands::Map::MP_SCENARIO;
2668 d->settings.maps.push_back(info);
2669 } else {
2670 if
2671- (g_fs->is_directory(name)
2672- &&
2673- strcmp(FileSystem::fs_filename(name), ".")
2674- &&
2675- strcmp(FileSystem::fs_filename(name), ".."))
2676+ (g_fs->is_directory(filename)
2677+ &&
2678+ strcmp(FileSystem::fs_filename(filename.c_str()), ".")
2679+ &&
2680+ strcmp(FileSystem::fs_filename(filename.c_str()), ".."))
2681 {
2682- directories.push_back(name);
2683+ directories.push_back(filename);
2684 }
2685 }
2686 }
2687@@ -2665,7 +2663,7 @@
2688 std::unique_ptr<Widelands::MapLoader> ml = map.get_correct_loader(path);
2689 if (ml.get() != nullptr) {
2690 // Yes it is a map file :)
2691- map.set_filename(path.c_str());
2692+ map.set_filename(path);
2693 ml->preload_map(true);
2694 d->settings.scenario = scenario;
2695 d->hp.set_map(map.get_name(), path, map.get_nrplayers(), false);
2696
2697=== modified file 'src/scripting/lua_game.cc'
2698--- src/scripting/lua_game.cc 2014-10-07 15:45:51 +0000
2699+++ src/scripting/lua_game.cc 2014-10-27 09:37:32 +0000
2700@@ -983,12 +983,12 @@
2701
2702 if (o.done()) {
2703 /** TRANSLATORS: File name for saving objective achieved */
2704- /** TRANSLATORS: %1$s = map name. %2$s = achievement name */
2705- std::string filename = (boost::format
2706- (_("%1$s (achieved %2$s)"))
2707- % get_egbase(L).get_map()->get_name()
2708- % o.descname().c_str()
2709- ).str();
2710+ /** TRANSLATORS: %1% = map name. %2% = achievement name */
2711+ std::string filename = _("%1% (%2%)");
2712+ i18n::Textdomain td("maps");
2713+ filename = (boost::format(filename)
2714+ % _(get_egbase(L).get_map()->get_name())
2715+ % o.descname().c_str()).str();
2716 get_game(L).save_handler().request_save(filename);
2717 }
2718 return 0;
2719
2720=== modified file 'src/ui_basic/multilinetextarea.cc'
2721--- src/ui_basic/multilinetextarea.cc 2014-09-10 14:48:40 +0000
2722+++ src/ui_basic/multilinetextarea.cc 2014-10-27 09:37:32 +0000
2723@@ -198,4 +198,9 @@
2724 m_scrollbar.handle_mousepress(btn, x, y) : false;
2725 }
2726
2727+void MultilineTextarea::scroll_to_top() {
2728+ m_scrollbar.set_scrollpos(0);
2729+ update(0, 0, 0, 0);
2730+}
2731+
2732 } // namespace UI
2733
2734=== modified file 'src/ui_basic/multilinetextarea.h'
2735--- src/ui_basic/multilinetextarea.h 2014-09-10 14:48:40 +0000
2736+++ src/ui_basic/multilinetextarea.h 2014-10-27 09:37:32 +0000
2737@@ -65,6 +65,7 @@
2738 void draw(RenderTarget &) override;
2739
2740 bool handle_mousepress (uint8_t btn, int32_t x, int32_t y) override;
2741+ void scroll_to_top();
2742
2743 const char * get_font_name() {return m_fontname.c_str();}
2744 int32_t get_font_size() {return m_fontsize;}
2745
2746=== modified file 'src/ui_basic/table.cc'
2747--- src/ui_basic/table.cc 2014-09-10 14:48:40 +0000
2748+++ src/ui_basic/table.cc 2014-10-27 09:37:32 +0000
2749@@ -52,7 +52,7 @@
2750 m_total_width (0),
2751 m_fontname (UI_FONT_NAME),
2752 m_fontsize (UI_FONT_SIZE_SMALL),
2753- m_headerheight (15),
2754+ m_headerheight (UI_FONT_SIZE_SMALL * 8 / 5),
2755 m_lineheight (g_fh->get_fontheight(m_fontname, m_fontsize)),
2756 m_scrollbar (nullptr),
2757 m_scrollpos (0),
2758
2759=== modified file 'src/ui_basic/table.h'
2760--- src/ui_basic/table.h 2014-09-14 11:31:58 +0000
2761+++ src/ui_basic/table.h 2014-10-27 09:37:32 +0000
2762@@ -187,7 +187,7 @@
2763 void set_font(const std::string & fontname, int32_t const fontsize) {
2764 m_fontname = fontname;
2765 m_fontsize = fontsize;
2766- m_headerheight = fontsize * 6 / 5;
2767+ m_headerheight = fontsize * 8 / 5;
2768 }
2769
2770 void sort
2771
2772=== modified file 'src/ui_fsmenu/CMakeLists.txt'
2773--- src/ui_fsmenu/CMakeLists.txt 2014-07-16 06:41:27 +0000
2774+++ src/ui_fsmenu/CMakeLists.txt 2014-10-27 09:37:32 +0000
2775@@ -6,8 +6,6 @@
2776 campaign_select.h
2777 editor.cc
2778 editor.h
2779- editor_mapselect.cc
2780- editor_mapselect.h
2781 fileview.cc
2782 fileview.h
2783 internet_lobby.cc
2784@@ -20,8 +18,8 @@
2785 launch_spg.h
2786 loadgame.cc
2787 loadgame.h
2788- loadreplay.cc
2789- loadreplay.h
2790+ load_map_or_game.cc
2791+ load_map_or_game.h
2792 main.cc
2793 main.h
2794 mapselect.cc
2795@@ -34,6 +32,8 @@
2796 options.h
2797 singleplayer.cc
2798 singleplayer.h
2799+ suggested_teams_box.cc
2800+ suggested_teams_box.h
2801 DEPENDS
2802 base_deprecated
2803 base_exceptions
2804
2805=== modified file 'src/ui_fsmenu/campaign_select.cc'
2806--- src/ui_fsmenu/campaign_select.cc 2014-09-10 14:08:25 +0000
2807+++ src/ui_fsmenu/campaign_select.cc 2014-10-27 09:37:32 +0000
2808@@ -21,6 +21,8 @@
2809
2810 #include <memory>
2811
2812+#include <boost/format.hpp>
2813+
2814 #include "base/i18n.h"
2815 #include "base/wexception.h"
2816 #include "graphic/graphic.h"
2817@@ -40,75 +42,79 @@
2818 * Loads a list of all visible campaigns
2819 */
2820 FullscreenMenuCampaignSelect::FullscreenMenuCampaignSelect() :
2821- FullscreenMenuBase("choosemapmenu.jpg"),
2822-
2823-// Values for alignment and size
2824- m_butw (get_w() / 4),
2825- m_buth (get_h() * 9 / 200),
2826- m_fs (fs_small()),
2827- m_fn (ui_fn()),
2828-
2829-// Text labels
2830- title
2831- (this,
2832- get_w() / 2, get_h() * 9 / 50,
2833- _("Select a campaign"), UI::Align_HCenter),
2834- label_campname
2835- (this, get_w() * 3 / 5, get_h() * 17 / 50, _("Campaign:")),
2836- tacampname
2837- (this, get_w() * 61 / 100, get_h() * 3 / 8, ""),
2838- label_difficulty
2839- (this, get_w() * 3 / 5, get_h() * 17 / 40, _("Difficulty:")),
2840- tadifficulty
2841- (this, get_w() * 61 / 100, get_h() * 23 / 50, get_w() * 9 / 25, get_h() * 3 / 50, ""),
2842- label_campdescr
2843- (this, get_w() * 3 / 5, get_h() * 17 / 32, _("Description:")),
2844- tacampdescr
2845- (this,
2846- get_w() * 61 / 100, get_h() * 45 / 80, get_w() * 9 / 25, get_h() * 7 / 25,
2847- ""),
2848-
2849-// Buttons
2850- b_ok
2851- (this, "ok",
2852- get_w() * 71 / 100, get_h() * 9 / 10, m_butw, m_buth,
2853- g_gr->images().get("pics/but2.png"),
2854- _("OK"), std::string(), false, false),
2855- back
2856- (this, "back",
2857- get_w() * 71 / 100, get_h() * 17 / 20, m_butw, m_buth,
2858- g_gr->images().get("pics/but0.png"),
2859- _("Back"), std::string(), true, false),
2860-
2861-// Campaign list
2862- m_list
2863- (this,
2864- get_w() * 47 / 2500, get_h() * 3417 / 10000,
2865- get_w() * 711 / 1250, get_h() * 6083 / 10000)
2866+ FullscreenMenuLoadMapOrGame(),
2867+
2868+ // Main Title
2869+ m_title
2870+ (this, get_w() / 2, m_tabley / 3,
2871+ _("Choose a campaign"),
2872+ UI::Align_HCenter),
2873+
2874+ // Campaign description
2875+ m_label_campname
2876+ (this, m_right_column_x, m_tabley,
2877+ "",
2878+ UI::Align_Left),
2879+ m_ta_campname(this,
2880+ m_right_column_x + m_indent, get_y_from_preceding(m_label_campname) + m_padding,
2881+ get_right_column_w(m_right_column_x) - m_indent, m_label_height),
2882+
2883+ m_label_tribename
2884+ (this, m_right_column_x, get_y_from_preceding(m_ta_campname) + 2 * m_padding,
2885+ "",
2886+ UI::Align_Left),
2887+ m_ta_tribename(this,
2888+ m_right_column_x + m_indent, get_y_from_preceding(m_label_tribename) + m_padding,
2889+ get_right_column_w(m_right_column_x + m_indent), m_label_height),
2890+
2891+ m_label_difficulty
2892+ (this, m_right_column_x, get_y_from_preceding(m_ta_tribename) + 2 * m_padding,
2893+ "",
2894+ UI::Align_Left),
2895+ m_ta_difficulty(this,
2896+ m_right_column_x + m_indent, get_y_from_preceding(m_label_difficulty) + m_padding,
2897+ get_right_column_w(m_right_column_x + m_indent), 2 * m_label_height - m_padding),
2898+
2899+ m_label_description
2900+ (this, m_right_column_x, get_y_from_preceding(m_ta_difficulty) + 2 * m_padding,
2901+ _("Description:"),
2902+ UI::Align_Left),
2903+ m_ta_description
2904+ (this,
2905+ m_right_column_x + m_indent,
2906+ get_y_from_preceding(m_label_description) + m_padding,
2907+ get_right_column_w(m_right_column_x + m_indent),
2908+ m_buty - get_y_from_preceding(m_label_description) - 4 * m_padding)
2909 {
2910- b_ok.sigclicked.connect
2911+ m_title.set_textstyle(ts_big());
2912+ m_back.set_tooltip(_("Return to the main menu"));
2913+ m_ok.set_tooltip(_("Play this campaign"));
2914+ m_ta_campname.set_tooltip(_("The name of this campaign"));
2915+ m_ta_tribename.set_tooltip(_("The tribe you will be playing"));
2916+ m_ta_difficulty.set_tooltip(_("The difficulty of this campaign"));
2917+ m_ta_description.set_tooltip(_("Story and hints"));
2918+
2919+ m_ok.sigclicked.connect
2920 (boost::bind
2921 (&FullscreenMenuCampaignSelect::clicked_ok, boost::ref(*this)));
2922- back.sigclicked.connect
2923+ m_back.sigclicked.connect
2924 (boost::bind
2925- (&FullscreenMenuCampaignSelect::end_modal, boost::ref(*this), 0));
2926-
2927- back.set_font(font_small());
2928- b_ok.set_font(font_small());
2929-
2930- title .set_font(m_fn, fs_big(), UI_FONT_CLR_FG);
2931- label_campname .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
2932- tacampname .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
2933- label_difficulty.set_font(m_fn, m_fs, UI_FONT_CLR_FG);
2934- tadifficulty .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
2935- label_campdescr .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
2936- tacampdescr .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
2937- m_list.set_font(m_fn, m_fs);
2938- m_list.selected.connect
2939- (boost::bind(&FullscreenMenuCampaignSelect::campaign_selected, this, _1));
2940- m_list.double_clicked.connect
2941- (boost::bind(&FullscreenMenuCampaignSelect::double_clicked, this, _1));
2942- fill_list();
2943+ (&FullscreenMenuCampaignSelect::clicked_back, boost::ref(*this)));
2944+ m_table.selected.connect
2945+ (boost::bind(&FullscreenMenuCampaignSelect::entry_selected, this));
2946+ m_table.double_clicked.connect
2947+ (boost::bind(&FullscreenMenuCampaignSelect::clicked_ok, boost::ref(*this)));
2948+
2949+ /** TRANSLATORS: Campaign difficulty table header */
2950+ m_table.add_column(45, _("Diff."), _("Difficulty"), UI::Align_Left);
2951+ m_table.add_column(100, _("Tribe"), _("Tribe Name"), UI::Align_Left);
2952+ m_table.add_column(m_table.get_w() - 100 - 45, _("Campaign Name"), _("Campaign Name"), UI::Align_Left);
2953+ m_table.set_column_compare
2954+ (0,
2955+ boost::bind(&FullscreenMenuCampaignSelect::compare_difficulty, this, _1, _2));
2956+ m_table.set_sort_column(0);
2957+ m_table.focus();
2958+ fill_table();
2959 }
2960
2961
2962@@ -127,70 +133,64 @@
2963 }
2964
2965 /// Pictorial descriptions of difficulty levels.
2966-static char const * const dif_picture_filenames[] = {
2967+static char const * const difficulty_picture_filenames[] = {
2968 "pics/novalue.png",
2969 "pics/easy.png",
2970 "pics/challenging.png",
2971 "pics/hard.png"
2972 };
2973
2974-/**
2975- * an entry of campaignlist got selected.
2976- */
2977-void FullscreenMenuCampaignSelect::campaign_selected(uint32_t const i)
2978+
2979+bool FullscreenMenuCampaignSelect::set_has_selection()
2980 {
2981- if (m_list.get_selected()) { // false if the selected entry has no value
2982- campaign = i;
2983-
2984- // enable OK button
2985- b_ok.set_enabled(true);
2986-
2987- // predefine the used variables
2988- char cname [sizeof("campname4294967296")];
2989- char cdifficulty [sizeof("campdiff4294967296")];
2990- char cdif_descr[sizeof("campdiffdescr4294967296")];
2991- char cdescription[sizeof("campdesc4294967296")];
2992-
2993- Profile prof("campaigns/cconfig", nullptr, "maps");
2994- Section & s = prof.get_safe_section("global");
2995-
2996- // add I to basic section name
2997- sprintf(cname, "campname%u", i);
2998- sprintf(cdifficulty, "campdiff%u", i);
2999- sprintf(cdescription, "campdesc%u", i);
3000- sprintf(cdif_descr, "campdiffdescr%u", i);
3001-
3002- s.get_natural(cdifficulty);
3003-
3004- std::string dif_description = s.get_string
3005- (cdif_descr, _("[No value found]"));
3006-
3007- tacampname .set_text(s.get_string(cname, _("[No value found]")));
3008- tadifficulty.set_text(dif_description);
3009- tacampdescr.set_text(s.get_string(cdescription, _("[No value found]")));
3010- } else { // normally never here
3011- b_ok.set_enabled(false);
3012- tacampname .set_text(_("[Invalid entry]"));
3013- tadifficulty.set_text("");
3014- tacampdescr .set_text("");
3015+ bool has_selection = m_table.has_selection();
3016+ FullscreenMenuLoadMapOrGame::set_has_selection();
3017+
3018+ if (!has_selection) {
3019+ m_label_campname.set_text(std::string());
3020+ m_label_tribename.set_text(std::string());
3021+ m_label_difficulty.set_text(std::string());
3022+ m_label_description.set_text(std::string());
3023+
3024+ m_ta_campname.set_text(std::string());
3025+ m_ta_tribename.set_text(std::string());
3026+ m_ta_difficulty.set_text(std::string());
3027+ m_ta_description.set_text(std::string());
3028+
3029+ } else {
3030+ m_label_campname.set_text(_("Campaign Name:"));
3031+ m_label_tribename.set_text(_("Tribe:"));
3032+ m_label_tribename.set_text(_("Difficulty:"));
3033+ m_label_description.set_text(_("Description:"));
3034 }
3035+ return has_selection;
3036 }
3037
3038
3039-/**
3040- * listbox got double clicked
3041- */
3042-void FullscreenMenuCampaignSelect::double_clicked(uint32_t)
3043+void FullscreenMenuCampaignSelect::entry_selected()
3044 {
3045- clicked_ok();
3046+ if (set_has_selection()) {
3047+ const CampaignListData& campaign_data = m_campaigns_data[m_table.get_selected()];
3048+ campaign = campaign_data.index;
3049+
3050+ m_ta_campname.set_text(campaign_data.name);
3051+ m_ta_tribename.set_text(campaign_data.tribename);
3052+ m_ta_difficulty.set_text(campaign_data.difficulty_description);
3053+ m_ta_description.set_text(campaign_data.description);
3054+
3055+ }
3056+ m_ta_description.scroll_to_top();
3057 }
3058
3059
3060 /**
3061 * fill the campaign list
3062 */
3063-void FullscreenMenuCampaignSelect::fill_list()
3064+void FullscreenMenuCampaignSelect::fill_table()
3065 {
3066+ m_campaigns_data.clear();
3067+ m_table.clear();
3068+
3069 // Read in the campaign config
3070 Profile prof("campaigns/cconfig", nullptr, "maps");
3071 Section & s = prof.get_safe_section("global");
3072@@ -200,45 +200,75 @@
3073 Profile campvis(cvs.get_path().c_str());
3074 Section & c = campvis.get_safe_section("campaigns");
3075
3076+ // Predefine variables, used in while-loop
3077 uint32_t i = 0;
3078-
3079- // predefine variables, used in while-loop
3080- char cname [sizeof("campname4294967296")];
3081- char csection [sizeof("campsect4294967296")];
3082- char cdifficulty[sizeof("campdiff4294967296")];
3083-
3084- sprintf(csection, "campsect%u", i);
3085- while (s.get_string(csection)) {
3086- // add i to the other strings the UI will search for
3087- sprintf(cname, "campname%u", i);
3088- sprintf(cdifficulty, "campdiff%u", i);
3089+ std::string csection = (boost::format("campsect%u") % i).str();
3090+ std::string cname;
3091+ std::string ctribename;
3092+ std::string cdifficulty;
3093+ std::string cdiff_descr;
3094+ std::string cdescription;
3095+
3096+ while (s.get_string(csection.c_str())) {
3097+
3098+ cname = (boost::format("campname%u") % i).str();
3099+ ctribename = (boost::format("camptribe%u") % i).str();
3100+ cdifficulty = (boost::format("campdiff%u") % i).str();
3101+ cdiff_descr = (boost::format("campdiffdescr%u") % i).str();
3102+ cdescription = (boost::format("campdesc%u") % i).str();
3103
3104 // Only list visible campaigns
3105- if (c.get_bool(csection)) {
3106+ if (c.get_bool(csection.c_str())) {
3107
3108- uint32_t dif = s.get_int(cdifficulty);
3109+ uint32_t difficulty = s.get_int(cdifficulty.c_str());
3110 if
3111- (sizeof (dif_picture_filenames)
3112+ (sizeof (difficulty_picture_filenames)
3113 /
3114- sizeof(*dif_picture_filenames)
3115+ sizeof(*difficulty_picture_filenames)
3116 <=
3117- dif)
3118- dif = 0;
3119-
3120- m_list.add
3121- (s.get_string(cname, _("[No value found]")),
3122- s.get_string(csection),
3123- g_gr->images().get(dif_picture_filenames[dif]));
3124-
3125+ difficulty) {
3126+ difficulty = 0;
3127+ }
3128+
3129+ CampaignListData campaign_data;
3130+
3131+ campaign_data.index = i;
3132+ campaign_data.name = s.get_string(cname.c_str(), "");
3133+ campaign_data.tribename = s.get_string(ctribename.c_str(), "");
3134+ campaign_data.difficulty = difficulty;
3135+ campaign_data.difficulty_description = s.get_string(cdiff_descr.c_str(), "");
3136+ campaign_data.description = s.get_string(cdescription.c_str(), "");
3137+ m_campaigns_data.push_back(campaign_data);
3138+
3139+ UI::Table<uintptr_t>::EntryRecord& tableEntry = m_table.add(i);
3140+ tableEntry.set_picture(0, g_gr->images().get(difficulty_picture_filenames[difficulty]));
3141+ tableEntry.set_string(1, campaign_data.tribename);
3142+ tableEntry.set_string(2, campaign_data.name);
3143 }
3144
3145+ // Increase counter & csection
3146 ++i;
3147-
3148- // increase csection
3149- sprintf(csection, "campsect%u", i);
3150- } // while (s->get_string(csection))
3151- if (m_list.size())
3152- m_list.select(0);
3153+ csection = (boost::format("campsect%u") % i).str();
3154+
3155+ } // while (s.get_string(csection.c_str()))
3156+ m_table.sort();
3157+
3158+ if (m_table.size()) {
3159+ m_table.select(0);
3160+ }
3161+ set_has_selection();
3162+}
3163+
3164+bool FullscreenMenuCampaignSelect::compare_difficulty
3165+ (uint32_t rowa, uint32_t rowb)
3166+{
3167+ const CampaignListData& r1 = m_campaigns_data[m_table[rowa]];
3168+ const CampaignListData& r2 = m_campaigns_data[m_table[rowb]];
3169+
3170+ if (r1.difficulty < r2.difficulty) {
3171+ return true;
3172+ }
3173+ return r1.index < r2.index;
3174 }
3175
3176
3177@@ -253,76 +283,69 @@
3178 * choose one.
3179 */
3180 FullscreenMenuCampaignMapSelect::FullscreenMenuCampaignMapSelect() :
3181- FullscreenMenuBase("choosemapmenu.jpg"),
3182-
3183-// Values for alignment and size
3184- m_butw (get_w() / 4),
3185- m_buth (get_h() * 9 / 200),
3186- m_fs (fs_small()),
3187- m_fn (ui_fn()),
3188-
3189-// Text labels
3190- title
3191- (this,
3192- get_w() / 2, get_h() * 9 / 50, _("Choose a map"),
3193- UI::Align_HCenter),
3194- label_mapname (this, get_w() * 3 / 5, get_h() * 17 / 50, _("Name:")),
3195- tamapname (this, get_w() * 61 / 100, get_h() * 3 / 8, ""),
3196- label_author (this, get_w() * 3 / 5, get_h() * 17 / 40, _("Author:")),
3197- taauthor (this, get_w() * 61 / 100, get_h() * 23 / 50, ""),
3198- label_mapdescr(this, get_w() * 3 / 5, get_h() * 51 / 100, _("Description:")),
3199- tamapdescr
3200- (this,
3201- get_w() * 61 / 100, get_h() * 11 / 20, get_w() * 9 / 25, get_h() * 7 / 25),
3202-
3203-// Buttons
3204- b_ok
3205- (this, "ok",
3206- get_w() * 71 / 100, get_h() * 9 / 10, m_butw, m_buth,
3207- g_gr->images().get("pics/but2.png"),
3208- _("OK"), std::string(), false, false),
3209- back
3210- (this, "back",
3211- get_w() * 71 / 100, get_h() * 17 / 20, m_butw, m_buth,
3212- g_gr->images().get("pics/but0.png"),
3213- _("Back"), std::string(), true, false),
3214-
3215-// Campaign map list
3216- m_list
3217- (this,
3218- get_w() * 47 / 2500, get_h() * 3417 / 10000,
3219- get_w() * 711 / 1250, get_h() * 6083 / 10000)
3220+ FullscreenMenuLoadMapOrGame(),
3221+
3222+ // Main title
3223+ m_title
3224+ (this, get_w() / 2, m_tabley / 3,
3225+ _("Choose a scenario"),
3226+ UI::Align_HCenter),
3227+ m_subtitle
3228+ (this, get_w() / 2, get_y_from_preceding(m_title) + 6 * m_padding,
3229+ "",
3230+ UI::Align_HCenter),
3231+
3232+ // Map description
3233+ m_label_mapname
3234+ (this, m_right_column_x, m_tabley,
3235+ "",
3236+ UI::Align_Left),
3237+ m_ta_mapname(this,
3238+ m_right_column_x + m_indent, get_y_from_preceding(m_label_mapname) + m_padding,
3239+ get_right_column_w(m_right_column_x + m_indent), m_label_height),
3240+
3241+ m_label_author
3242+ (this,
3243+ m_right_column_x, get_y_from_preceding(m_ta_mapname) + 2 * m_padding,
3244+ "",
3245+ UI::Align_Left),
3246+ m_ta_author(this,
3247+ m_right_column_x + m_indent, get_y_from_preceding(m_label_author) + m_padding,
3248+ get_right_column_w(m_right_column_x + m_indent), m_label_height),
3249+
3250+ m_label_description
3251+ (this, m_right_column_x, get_y_from_preceding(m_ta_author) + 2 * m_padding,
3252+ "",
3253+ UI::Align_Left),
3254+ m_ta_description
3255+ (this,
3256+ m_right_column_x + m_indent,
3257+ get_y_from_preceding(m_label_description) + m_padding,
3258+ get_right_column_w(m_right_column_x + m_indent),
3259+ m_buty - get_y_from_preceding(m_label_description) - 4 * m_padding)
3260 {
3261- b_ok.sigclicked.connect
3262+ m_title.set_textstyle(ts_big());
3263+ m_back.set_tooltip(_("Return to the main menu"));
3264+ m_ok.set_tooltip(_("Play this scenario"));
3265+ m_ta_mapname.set_tooltip(_("The name of this scenario"));
3266+ m_ta_description.set_tooltip(_("Story and hints"));
3267+
3268+ m_ok.sigclicked.connect
3269 (boost::bind
3270 (&FullscreenMenuCampaignMapSelect::clicked_ok, boost::ref(*this)));
3271- back.sigclicked.connect
3272+ m_back.sigclicked.connect
3273 (boost::bind
3274- (&FullscreenMenuCampaignMapSelect::end_modal, boost::ref(*this), 0));
3275-
3276- b_ok.set_font(font_small());
3277- back.set_font(font_small());
3278-
3279- title .set_font(m_fn, fs_big(), UI_FONT_CLR_FG);
3280- label_mapname .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
3281- tamapname .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
3282- label_author .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
3283- taauthor .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
3284- label_mapdescr.set_font(m_fn, m_fs, UI_FONT_CLR_FG);
3285- tamapdescr .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
3286- m_list.set_font(m_fn, m_fs);
3287- m_list.selected.connect(boost::bind(&FullscreenMenuCampaignMapSelect::map_selected, this, _1));
3288- m_list.double_clicked.connect
3289- (boost::bind(&FullscreenMenuCampaignMapSelect::double_clicked, this, _1));
3290-}
3291-
3292-
3293-/**
3294- * OK was clicked, after an entry of maplist got selected.
3295- */
3296-void FullscreenMenuCampaignMapSelect::clicked_ok()
3297-{
3298- end_modal(1);
3299+ (&FullscreenMenuCampaignMapSelect::clicked_back, boost::ref(*this)));
3300+ m_table.selected.connect(boost::bind(&FullscreenMenuCampaignMapSelect::entry_selected, this));
3301+ m_table.double_clicked.connect
3302+ (boost::bind(&FullscreenMenuCampaignMapSelect::clicked_ok, boost::ref(*this)));
3303+
3304+ /** TRANSLATORS: Campaign scenario number table header */
3305+ m_table.add_column(35, _("#"), _("The number of this scenario in the campaign"), UI::Align_Left);
3306+ m_table.add_column(m_table.get_w() - 35, _("Scenario Name"), _("Scenario Name"), UI::Align_Left);
3307+ m_table.set_sort_column(0);
3308+
3309+ m_table.focus();
3310 }
3311
3312
3313@@ -336,48 +359,64 @@
3314 //have, fill it.
3315 void FullscreenMenuCampaignMapSelect::set_campaign(uint32_t const i) {
3316 campaign = i;
3317- fill_list();
3318-}
3319-
3320-/**
3321- * an entry of the maplist got selected.
3322- */
3323-void FullscreenMenuCampaignMapSelect::map_selected(uint32_t) {
3324- campmapfile = m_list.get_selected();
3325- Widelands::Map map;
3326-
3327- std::unique_ptr<Widelands::MapLoader> ml(map.get_correct_loader(campmapfile));
3328- if (!ml) {
3329- throw wexception
3330- (_("Invalid path to file in cconfig: %s"), campmapfile.c_str());
3331- }
3332-
3333- map.set_filename(campmapfile.c_str());
3334- ml->preload_map(true);
3335-
3336- i18n::Textdomain td("maps");
3337- tamapname .set_text(_(map.get_name()));
3338- taauthor .set_text(map.get_author());
3339- tamapdescr.set_text(_(map.get_description()));
3340-
3341- // enable OK button
3342- b_ok.set_enabled(true);
3343-}
3344-
3345-
3346-/**
3347- * listbox got double clicked
3348- */
3349-void FullscreenMenuCampaignMapSelect::double_clicked(uint32_t)
3350+ fill_table();
3351+}
3352+
3353+bool FullscreenMenuCampaignMapSelect::set_has_selection()
3354 {
3355- clicked_ok();
3356+ bool has_selection = m_table.has_selection();
3357+ FullscreenMenuLoadMapOrGame::set_has_selection();
3358+
3359+ if (!has_selection) {
3360+ m_label_mapname.set_text(std::string());
3361+ m_label_author.set_text(std::string());
3362+ m_label_description.set_text(std::string());
3363+
3364+ m_ta_mapname.set_text(std::string());
3365+ m_ta_author.set_text(std::string());
3366+ m_ta_description.set_text(std::string());
3367+
3368+ } else {
3369+ m_label_mapname.set_text(_("Scenario:"));
3370+ m_label_description.set_text(_("Description:"));
3371+ }
3372+ return has_selection;
3373+}
3374+
3375+
3376+void FullscreenMenuCampaignMapSelect::entry_selected() {
3377+ if (set_has_selection()) {
3378+ const CampaignScenarioData& scenario_data = m_scenarios_data[m_table.get_selected()];
3379+ campmapfile = scenario_data.path;
3380+ Widelands::Map map;
3381+
3382+ std::unique_ptr<Widelands::MapLoader> ml(map.get_correct_loader(campmapfile));
3383+ if (!ml) {
3384+ throw wexception
3385+ (_("Invalid path to file in cconfig: %s"), campmapfile.c_str());
3386+ }
3387+
3388+ map.set_filename(campmapfile);
3389+ ml->preload_map(true);
3390+
3391+ MapAuthorData* authors = new MapAuthorData(map.get_author());
3392+ m_ta_author.set_text(authors->get_names());
3393+ m_ta_author.set_tooltip(ngettext("The designer of this scenario", "The designers of this scenario",
3394+ authors->get_number()));
3395+ m_label_author.set_text(ngettext("Author:", "Authors:", authors->get_number()));
3396+
3397+ i18n::Textdomain td("maps");
3398+ m_ta_mapname.set_text(_(map.get_name()));
3399+ m_ta_description.set_text(_(map.get_description()));
3400+ m_ta_description.scroll_to_top();
3401+ }
3402 }
3403
3404
3405 /**
3406 * fill the campaign-map list
3407 */
3408-void FullscreenMenuCampaignMapSelect::fill_list()
3409+void FullscreenMenuCampaignMapSelect::fill_table()
3410 {
3411 // read in the campaign config
3412 Profile prof("campaigns/cconfig", nullptr, "maps");
3413@@ -388,40 +427,43 @@
3414 Profile campvis(cvs.get_path().c_str());
3415 Section & c = campvis.get_safe_section("campmaps");
3416
3417- // Set title of the page
3418- char cname[sizeof("campname4294967296")];
3419- sprintf(cname, "campname%u", campaign);
3420- title.set_text(global_s.get_string(cname));
3421+ // Set subtitle of the page
3422+ const std::string campaign_name =
3423+ global_s.get_string((boost::format("campname%u") % campaign).str().c_str());
3424+ const std::string campaign_tribe =
3425+ global_s.get_string((boost::format("camptribe%u") % campaign).str().c_str());
3426+ m_subtitle.set_text((boost::format("%s — %s") % campaign_tribe % campaign_name).str().c_str());
3427
3428 // Get section of campaign-maps
3429- char csection[sizeof("campsect4294967296")];
3430- sprintf(csection, "campsect%u", campaign);
3431- std::string campsection = global_s.get_string(csection);
3432- std::string mapsection;
3433- uint32_t i = 0;
3434- char number[sizeof("4294967296")];
3435+ std::string campsection = global_s.get_string((boost::format("campsect%u") % campaign).str().c_str());
3436
3437 // Create the entry we use to load the section of the map
3438- mapsection = campsection;
3439- sprintf(number, "%02u", i);
3440- mapsection += number;
3441+ uint32_t i = 0;
3442+ std::string mapsection = campsection + (boost::format("%02i") % i).str();
3443
3444 // Add all visible entries to the list.
3445 while (Section * const s = prof.get_section(mapsection.c_str())) {
3446 if (c.get_bool(mapsection.c_str())) {
3447- m_list.add
3448- (s->get_string("name", _("[No value found]")),
3449- s->get_string("path"),
3450- g_gr->images().get("pics/ls_wlmap.png"));
3451+
3452+ CampaignScenarioData scenario_data;
3453+ scenario_data.index = i + 1;
3454+ scenario_data.name = s->get_string("name", "");
3455+ scenario_data.path = s->get_string("path");
3456+ m_scenarios_data.push_back(scenario_data);
3457+
3458+ UI::Table<uintptr_t>::EntryRecord& tableEntry = m_table.add(i);
3459+ tableEntry.set_string(0, (boost::format("%u") % scenario_data.index).str());
3460+ tableEntry.set_picture(1, g_gr->images().get("pics/ls_wlmap.png"), scenario_data.name);
3461 }
3462
3463+ // Increase counter & mapsection
3464 ++i;
3465+ mapsection = campsection + (boost::format("%02i") % i).str();
3466+ }
3467+ m_table.sort();
3468
3469- // increase mapsection
3470- mapsection = campsection;
3471- sprintf(number, "%02u", i);
3472- mapsection += number;
3473+ if (m_table.size()) {
3474+ m_table.select(0);
3475 }
3476- if (m_list.size())
3477- m_list.select(0);
3478+ set_has_selection();
3479 }
3480
3481=== modified file 'src/ui_fsmenu/campaign_select.h'
3482--- src/ui_fsmenu/campaign_select.h 2014-09-10 14:48:40 +0000
3483+++ src/ui_fsmenu/campaign_select.h 2014-10-27 09:37:32 +0000
3484@@ -24,77 +24,104 @@
3485 #include "ui_basic/button.h"
3486 #include "ui_basic/listselect.h"
3487 #include "ui_basic/multilinetextarea.h"
3488+#include "ui_basic/table.h"
3489 #include "ui_basic/textarea.h"
3490+#include "ui_fsmenu/load_map_or_game.h"
3491
3492 /*
3493 * Fullscreen Menu for all Campaigns
3494 */
3495
3496+
3497 /*
3498 * UI 1 - Selection of Campaign
3499 *
3500 */
3501-struct FullscreenMenuCampaignSelect : public FullscreenMenuBase {
3502+struct FullscreenMenuCampaignSelect : public FullscreenMenuLoadMapOrGame {
3503 FullscreenMenuCampaignSelect();
3504- void clicked_back();
3505- void clicked_ok();
3506- void campaign_selected(uint32_t);
3507- void double_clicked(uint32_t);
3508- void fill_list();
3509+
3510 int32_t get_campaign();
3511
3512+protected:
3513+ void clicked_ok() override;
3514+ void entry_selected() override;
3515+ void fill_table() override;
3516+ bool set_has_selection() override;
3517+
3518+
3519 private:
3520- uint32_t m_butw;
3521- uint32_t m_buth;
3522- uint32_t m_fs;
3523- std::string m_fn;
3524-
3525- UI::Textarea title;
3526- UI::Textarea label_campname;
3527- UI::Textarea tacampname;
3528- UI::Textarea label_difficulty;
3529- UI::MultilineTextarea tadifficulty;
3530- UI::Textarea label_campdescr;
3531- UI::MultilineTextarea tacampdescr;
3532- UI::Button b_ok, back;
3533- UI::Listselect<const char *> m_list;
3534+ /**
3535+ * Data about a campaign that we're interested in.
3536+ */
3537+ struct CampaignListData {
3538+ uint32_t index;
3539+ std::string name;
3540+ std::string tribename;
3541+ uint32_t difficulty;
3542+ std::string difficulty_description;
3543+ std::string description;
3544+
3545+ CampaignListData() : index(0), difficulty(0) {}
3546+ };
3547+
3548+ bool compare_difficulty(uint32_t, uint32_t);
3549+
3550+ UI::Textarea m_title;
3551+ UI::Textarea m_label_campname;
3552+ UI::MultilineTextarea m_ta_campname;
3553+ UI::Textarea m_label_tribename;
3554+ UI::MultilineTextarea m_ta_tribename;
3555+ UI::Textarea m_label_difficulty;
3556+ UI::MultilineTextarea m_ta_difficulty;
3557+ UI::Textarea m_label_description;
3558+ UI::MultilineTextarea m_ta_description;
3559+
3560+ std::vector<CampaignListData> m_campaigns_data;
3561
3562 /// Variables used for exchange between the two Campaign UIs and
3563 /// Game::run_campaign
3564- int32_t campaign;
3565+ int32_t campaign;
3566 };
3567 /*
3568 * UI 2 - Selection of a map
3569 *
3570 */
3571-struct FullscreenMenuCampaignMapSelect : public FullscreenMenuBase {
3572+struct FullscreenMenuCampaignMapSelect : public FullscreenMenuLoadMapOrGame {
3573 FullscreenMenuCampaignMapSelect();
3574- void clicked_back();
3575- void clicked_ok();
3576- void map_selected(uint32_t);
3577- void double_clicked(uint32_t);
3578- void fill_list();
3579+
3580 std::string get_map();
3581 void set_campaign(uint32_t);
3582
3583+protected:
3584+ void entry_selected() override;
3585+ void fill_table() override;
3586+ bool set_has_selection() override;
3587+
3588 private:
3589- uint32_t m_butw;
3590- uint32_t m_buth;
3591- uint32_t m_fs;
3592- std::string m_fn;
3593-
3594- UI::Textarea title;
3595- UI::Textarea label_mapname;
3596- UI::Textarea tamapname;
3597- UI::Textarea label_author;
3598- UI::Textarea taauthor;
3599- UI::Textarea label_mapdescr;
3600- UI::MultilineTextarea tamapdescr;
3601- UI::Button b_ok, back;
3602- UI::Listselect<std::string> m_list;
3603- uint32_t campaign;
3604- std::string campmapfile;
3605-
3606+ /**
3607+ * Data about a campaign scenario that we're interested in.
3608+ */
3609+ struct CampaignScenarioData {
3610+ uint32_t index;
3611+ std::string name;
3612+ std::string path;
3613+
3614+ CampaignScenarioData() : index(0) {}
3615+ };
3616+
3617+ UI::Textarea m_title;
3618+ UI::Textarea m_subtitle;
3619+ UI::Textarea m_label_mapname;
3620+ UI::MultilineTextarea m_ta_mapname;
3621+ UI::Textarea m_label_author;
3622+ UI::MultilineTextarea m_ta_author;
3623+ UI::Textarea m_label_description;
3624+ UI::MultilineTextarea m_ta_description;
3625+
3626+ uint32_t campaign;
3627+ std::string campmapfile;
3628+
3629+ std::vector<CampaignScenarioData> m_scenarios_data;
3630 };
3631
3632 #endif // end of include guard: WL_UI_FSMENU_CAMPAIGN_SELECT_H
3633
3634=== removed file 'src/ui_fsmenu/editor_mapselect.cc'
3635--- src/ui_fsmenu/editor_mapselect.cc 2014-09-30 05:41:55 +0000
3636+++ src/ui_fsmenu/editor_mapselect.cc 1970-01-01 00:00:00 +0000
3637@@ -1,264 +0,0 @@
3638-/*
3639- * Copyright (C) 2002-2004, 2006-2012 by the Widelands Development Team
3640- *
3641- * This program is free software; you can redistribute it and/or
3642- * modify it under the terms of the GNU General Public License
3643- * as published by the Free Software Foundation; either version 2
3644- * of the License, or (at your option) any later version.
3645- *
3646- * This program is distributed in the hope that it will be useful,
3647- * but WITHOUT ANY WARRANTY; without even the implied warranty of
3648- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3649- * GNU General Public License for more details.
3650- *
3651- * You should have received a copy of the GNU General Public License
3652- * along with this program; if not, write to the Free Software
3653- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
3654- *
3655- */
3656-
3657-#include "ui_fsmenu/editor_mapselect.h"
3658-
3659-#include <cstdio>
3660-#include <memory>
3661-#include <string>
3662-
3663-#include <boost/format.hpp>
3664-
3665-#include "base/i18n.h"
3666-#include "base/log.h"
3667-#include "base/wexception.h"
3668-#include "graphic/graphic.h"
3669-#include "io/filesystem/layered_filesystem.h"
3670-#include "logic/editor_game_base.h"
3671-#include "logic/map.h"
3672-#include "map_io/widelands_map_loader.h"
3673-#include "profile/profile.h"
3674-#include "wui/text_constants.h"
3675-
3676-using Widelands::WidelandsMapLoader;
3677-
3678-FullscreenMenuEditorMapSelect::FullscreenMenuEditorMapSelect() :
3679- FullscreenMenuBase("choosemapmenu.jpg"),
3680-
3681-// Values for alignment and size
3682- m_butw (get_w() / 4),
3683- m_buth (get_h() * 9 / 200),
3684- m_fs (fs_small()),
3685- m_fn (ui_fn()),
3686-
3687-// Text labels
3688- m_title
3689- (this,
3690- get_w() / 2, get_h() * 9 / 50,
3691- _("Choose a map"), UI::Align_HCenter),
3692- m_label_name
3693- (this,
3694- get_w() * 7 / 10, get_h() * 17 / 50,
3695- _("Name:"), UI::Align_Right),
3696- m_name (this, get_w() * 71 / 100, get_h() * 17 / 50, std::string()),
3697- m_label_author
3698- (this,
3699- get_w() * 7 / 10, get_h() * 3 / 8,
3700- _("Author:"), UI::Align_Right),
3701- m_author (this, get_w() * 71 / 100, get_h() * 3 / 8, std::string()),
3702- m_label_size
3703- (this,
3704- get_w() * 7 / 10, get_h() * 41 / 100,
3705- _("Size:"), UI::Align_Right),
3706- m_size (this, get_w() * 71 / 100, get_h() * 41 / 100, std::string()),
3707- m_label_nr_players
3708- (this,
3709- get_w() * 7 / 10, get_h() * 12 / 25,
3710- _("Players:"), UI::Align_Right),
3711- m_nr_players (this, get_w() * 71 / 100, get_h() * 12 / 25, std::string()),
3712- m_label_descr
3713- (this,
3714- get_w() * 7 / 10, get_h() * 103 / 200,
3715- _("Descr:"), UI::Align_Right),
3716- m_descr
3717- (this,
3718- get_w() * 71 / 100, get_h() * 13 / 25, get_w() / 4, get_h() * 63 / 200),
3719-
3720-// Buttons
3721- m_back
3722- (this, "back",
3723- get_w() * 71 / 100, get_h() * 17 / 20, m_butw, m_buth,
3724- g_gr->images().get("pics/but0.png"),
3725- _("Back"), std::string(), true, false),
3726- m_ok
3727- (this, "ok",
3728- get_w() * 71 / 100, get_h() * 9 / 10, m_butw, m_buth,
3729- g_gr->images().get("pics/but2.png"),
3730- _("OK"), std::string(), false, false),
3731-
3732-// Map list
3733- m_list
3734- (this,
3735- get_w() * 47 / 2500, get_h() * 3417 / 10000,
3736- get_w() * 711 / 1250, get_h() * 6083 / 10000),
3737-
3738-// Runtime variables
3739- m_curdir("maps"), m_basedir("maps")
3740-{
3741- m_back.sigclicked.connect(boost::bind(&FullscreenMenuEditorMapSelect::end_modal, boost::ref(*this), 0));
3742- m_ok.sigclicked.connect(boost::bind(&FullscreenMenuEditorMapSelect::ok, boost::ref(*this)));
3743-
3744- m_back.set_font(font_small());
3745- m_ok.set_font(font_small());
3746-
3747- m_title .set_font(m_fn, fs_big(), UI_FONT_CLR_FG);
3748- m_label_name .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
3749- m_name .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
3750- m_label_author .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
3751- m_author .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
3752- m_label_size .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
3753- m_size .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
3754- m_label_nr_players.set_font(m_fn, m_fs, UI_FONT_CLR_FG);
3755- m_nr_players .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
3756- m_label_descr .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
3757- m_descr .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
3758- m_list .set_font(m_fn, m_fs);
3759-
3760- m_list.selected.connect(boost::bind(&FullscreenMenuEditorMapSelect::map_selected, this, _1));
3761- m_list.double_clicked.connect
3762- (boost::bind(&FullscreenMenuEditorMapSelect::double_clicked, this, _1));
3763-
3764- fill_list();
3765-}
3766-
3767-std::string FullscreenMenuEditorMapSelect::get_map()
3768-{
3769- return m_list.has_selection() ? m_list.get_selected() : nullptr;
3770-}
3771-
3772-void FullscreenMenuEditorMapSelect::ok()
3773-{
3774- std::string filename(m_list.get_selected());
3775-
3776- if
3777- (g_fs->is_directory(filename.c_str())
3778- &&
3779- !WidelandsMapLoader::is_widelands_map(filename))
3780- {
3781-
3782- m_curdir = filename;
3783- m_list.clear();
3784- m_mapfiles.clear();
3785- fill_list();
3786- } else
3787- end_modal(1);
3788-}
3789-
3790-
3791-/**
3792- * Called when a different entry in the listbox gets selected.
3793- * When this happens, the information display at the right needs to be
3794- * refreshed.
3795- */
3796-void FullscreenMenuEditorMapSelect::map_selected(uint32_t)
3797-{
3798- std::string name = m_list.get_selected();
3799-
3800- m_ok.set_enabled(true);
3801-
3802- if (!g_fs->is_directory(name) || WidelandsMapLoader::is_widelands_map(name)) {
3803- Widelands::Map map;
3804- {
3805- std::unique_ptr<Widelands::MapLoader> ml = map.get_correct_loader(name);
3806- ml->preload_map(true); // This has worked before, no problem.
3807- }
3808-
3809- // Translate the map data
3810- i18n::Textdomain td("maps");
3811- m_name .set_text(_(map.get_name()));
3812- m_author.set_text(map.get_author());
3813- m_descr .set_text
3814- (_(map.get_description()) + (map.get_hint().empty() ? "" : (std::string("\n") + _(map.get_hint()))));
3815-
3816- m_nr_players.set_text(std::to_string(static_cast<unsigned int>(map.get_nrplayers())));
3817-
3818- /** TRANSLATORS: These are map coordinates */
3819- m_size .set_text((boost::format(_("%1$ix%2$i")) % map.get_width() % map.get_height()).str());
3820- } else {
3821- m_name .set_text(std::string());
3822- m_author .set_text(std::string());
3823- m_descr .set_text(std::string());
3824- m_nr_players.set_text(std::string());
3825- m_size .set_text(std::string());
3826- }
3827-}
3828-
3829-/**
3830- * listbox got double clicked
3831- */
3832-void FullscreenMenuEditorMapSelect::double_clicked(uint32_t) {ok();}
3833-
3834-/**
3835- * fill the file list
3836- */
3837-void FullscreenMenuEditorMapSelect::fill_list()
3838-{
3839- // Fill it with all files we find.
3840- m_mapfiles = g_fs->list_directory(m_curdir);
3841-
3842- // First, we add all directories. We manually add the parent directory.
3843- if (m_curdir != m_basedir) {
3844-#ifndef _WIN32
3845- m_parentdir = m_curdir.substr(0, m_curdir.rfind('/'));
3846-#else
3847- m_parentdir = m_curdir.substr(0, m_curdir.rfind('\\'));
3848-#endif
3849- std::string parent_string =
3850- /** TRANSLATORS: Parent directory */
3851- (boost::format("\\<%s\\>") % _("parent")).str();
3852- m_list.add
3853- (parent_string.c_str(),
3854- m_parentdir.c_str(),
3855- g_gr->images().get("pics/ls_dir.png"));
3856- }
3857-
3858- const FilenameSet::const_iterator mapfiles_end = m_mapfiles.end();
3859- for
3860- (FilenameSet::const_iterator pname = m_mapfiles.begin();
3861- pname != mapfiles_end;
3862- ++pname)
3863- {
3864- const char * const name = pname->c_str();
3865- if
3866- (strcmp(FileSystem::fs_filename(name), ".") &&
3867- // Upsy, appeared again. ignore
3868- strcmp(FileSystem::fs_filename(name), "..") &&
3869- g_fs->is_directory(name) &&
3870- !WidelandsMapLoader::is_widelands_map(name))
3871-
3872- m_list.add
3873- (FileSystem::fs_filename(name),
3874- name,
3875- g_gr->images().get("pics/ls_dir.png"));
3876- }
3877-
3878- Widelands::Map map;
3879-
3880- for
3881- (FilenameSet::const_iterator pname = m_mapfiles.begin();
3882- pname != mapfiles_end;
3883- ++pname)
3884- {
3885- char const * const name = pname->c_str();
3886- std::unique_ptr<Widelands::MapLoader> ml = map.get_correct_loader(name);
3887- if (ml.get() != nullptr) {
3888- try {
3889- ml->preload_map(true);
3890- m_list.add
3891- (FileSystem::fs_filename(name),
3892- name,
3893- g_gr->images().get
3894- (dynamic_cast<WidelandsMapLoader*>(ml.get()) ? "pics/ls_wlmap.png" : "pics/ls_s2map.png"));
3895- } catch (const WException &) {} // we simply skip illegal entries
3896- }
3897- }
3898-
3899- if (m_list.size())
3900- m_list.select(0);
3901-}
3902
3903=== removed file 'src/ui_fsmenu/editor_mapselect.h'
3904--- src/ui_fsmenu/editor_mapselect.h 2014-09-14 11:31:58 +0000
3905+++ src/ui_fsmenu/editor_mapselect.h 1970-01-01 00:00:00 +0000
3906@@ -1,62 +0,0 @@
3907-/*
3908- * Copyright (C) 2008, 2010 by the Widelands Development Team
3909- *
3910- * This program is free software; you can redistribute it and/or
3911- * modify it under the terms of the GNU General Public License
3912- * as published by the Free Software Foundation; either version 2
3913- * of the License, or (at your option) any later version.
3914- *
3915- * This program is distributed in the hope that it will be useful,
3916- * but WITHOUT ANY WARRANTY; without even the implied warranty of
3917- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3918- * GNU General Public License for more details.
3919- *
3920- * You should have received a copy of the GNU General Public License
3921- * along with this program; if not, write to the Free Software
3922- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
3923- *
3924- */
3925-
3926-#ifndef WL_UI_FSMENU_EDITOR_MAPSELECT_H
3927-#define WL_UI_FSMENU_EDITOR_MAPSELECT_H
3928-
3929-#include "ui_fsmenu/base.h"
3930-#include "io/filesystem/filesystem.h"
3931-#include "ui_basic/button.h"
3932-#include "ui_basic/listselect.h"
3933-#include "ui_basic/multilinetextarea.h"
3934-#include "ui_basic/textarea.h"
3935-
3936-/**
3937- * Select a Map in Fullscreen Mode. It's a modal fullscreen menu
3938- */
3939-
3940-struct FullscreenMenuEditorMapSelect : public FullscreenMenuBase {
3941- FullscreenMenuEditorMapSelect();
3942-
3943- std::string get_map();
3944-
3945-private:
3946- void ok();
3947- void map_selected(uint32_t);
3948- void changed(bool);
3949- void double_clicked(uint32_t);
3950- void fill_list();
3951-
3952- uint32_t m_butw;
3953- uint32_t m_buth;
3954- uint32_t m_fs;
3955- std::string m_fn;
3956-
3957- UI::Textarea m_title, m_label_name, m_name;
3958- UI::Textarea m_label_author, m_author, m_label_size;
3959- UI::Textarea m_size;
3960- UI::Textarea m_label_nr_players, m_nr_players, m_label_descr;
3961- UI::MultilineTextarea m_descr;
3962- UI::Button m_back, m_ok;
3963- UI::Listselect<std::string> m_list;
3964- std::string m_parentdir, m_curdir, m_basedir;
3965- FilenameSet m_mapfiles;
3966-};
3967-
3968-#endif // end of include guard: WL_UI_FSMENU_EDITOR_MAPSELECT_H
3969
3970=== modified file 'src/ui_fsmenu/launch_mpg.cc'
3971--- src/ui_fsmenu/launch_mpg.cc 2014-10-26 12:17:01 +0000
3972+++ src/ui_fsmenu/launch_mpg.cc 2014-10-27 09:37:32 +0000
3973@@ -117,32 +117,38 @@
3974 m_buth (get_h() * 9 / 200),
3975 m_fs (fs_small()),
3976 m_fn (ui_fn()),
3977+ // TODO(GunChleoc): We still need to use these consistently. Just getting them in for now
3978+ // so we can have the SuggestedTeamsBox
3979+ m_padding(4),
3980+ m_indent(10),
3981+ m_label_height(20),
3982+ m_right_column_x(get_w() * 37 / 50),
3983
3984 // Buttons
3985 m_change_map_or_save
3986 (this, "change_map_or_save",
3987- get_w() * 37 / 50 + m_butw - m_buth, get_h() * 3 / 20, m_buth, m_buth,
3988+ m_right_column_x + m_butw - m_buth, get_h() * 3 / 20, m_buth, m_buth,
3989 g_gr->images().get("pics/but1.png"),
3990 g_gr->images().get("pics/menu_toggle_minimap.png"),
3991 _("Change map or saved game"), false, false),
3992 m_ok
3993 (this, "ok",
3994- get_w() * 37 / 50, get_h() * 12 / 20, m_butw, m_buth,
3995+ m_right_column_x, get_h() * 12 / 20 - 2 * m_label_height, m_butw, m_buth,
3996 g_gr->images().get("pics/but2.png"),
3997 _("Start game"), std::string(), false, false),
3998 m_back
3999 (this, "back",
4000- get_w() * 37 / 50, get_h() * 218 / 240, m_butw, m_buth,
4001+ m_right_column_x, get_h() * 218 / 240, m_butw, m_buth,
4002 g_gr->images().get("pics/but0.png"),
4003 _("Back"), std::string(), true, false),
4004 m_wincondition
4005 (this, "win_condition",
4006- get_w() * 37 / 50, get_h() * 11 / 20, m_butw, m_buth,
4007+ m_right_column_x, get_h() * 11 / 20 - 2 * m_label_height, m_butw, m_buth,
4008 g_gr->images().get("pics/but1.png"),
4009 "", std::string(), false, false),
4010 m_help_button
4011 (this, "help",
4012- get_w() * 37 / 50 + m_butw - m_buth, get_h() / 100, m_buth, m_buth,
4013+ m_right_column_x + m_butw - m_buth, get_h() / 100, m_buth, m_buth,
4014 g_gr->images().get("pics/but1.png"),
4015 g_gr->images().get("pics/menu_help.png"),
4016 _("Show the help window"), true, false),
4017@@ -154,7 +160,7 @@
4018 _("Multiplayer Game Setup"), UI::Align_HCenter),
4019 m_mapname
4020 (this,
4021- get_w() * 37 / 50, get_h() * 3 / 20,
4022+ m_right_column_x, get_h() * 3 / 20,
4023 std::string()),
4024 m_clients
4025 (this,
4026@@ -167,15 +173,15 @@
4027 _("Players"), UI::Align_HCenter),
4028 m_map
4029 (this,
4030- get_w() * 37 / 50, get_h() / 10, m_butw, get_h() / 10,
4031+ m_right_column_x, get_h() / 10, m_butw, get_h() / 10,
4032 _("Map"), UI::Align_HCenter),
4033 m_wincondition_type
4034 (this,
4035- get_w() * 37 / 50 + (m_butw / 2), get_h() * 10 / 20,
4036+ m_right_column_x + (m_butw / 2), get_h() * 10 / 20 - 1.5 * m_label_height,
4037 _("Type of game"), UI::Align_HCenter),
4038
4039- m_map_info(this, get_w() * 37 / 50, get_h() * 2 / 10, m_butw, get_h() * 23 / 80),
4040- m_client_info(this, get_w() * 37 / 50, get_h() * 13 / 20, m_butw, get_h() * 5 / 20),
4041+ m_map_info(this, m_right_column_x, get_h() * 2 / 10, m_butw, get_h() * 23 / 80 - 2 * m_label_height),
4042+ m_client_info(this, m_right_column_x, get_h() * 13 / 20 - 2 * m_label_height, m_butw, 2 * m_label_height),
4043 m_help(nullptr),
4044
4045 // Variables and objects used in the menu
4046@@ -234,6 +240,12 @@
4047 m_settings->set_player_number(0);
4048 }
4049 }
4050+
4051+ // Y coordinate will be set later, when we know how high this box will get.
4052+ m_suggested_teams_box = new UI::SuggestedTeamsBox
4053+ (this, m_right_column_x, 0, UI::Box::Vertical,
4054+ m_padding, m_indent, m_label_height,
4055+ get_w() - m_right_column_x, 4 * m_label_height);
4056 }
4057
4058 FullscreenMenuLaunchMPG::~FullscreenMenuLaunchMPG() {
4059@@ -487,8 +499,7 @@
4060 (format(_("Player %i")) % (settings.playernum + 1)).str()
4061 :
4062 _("Spectator");
4063- temp = (format(_("At the moment you are %s")) % temp.c_str()).str() + "\n\n";
4064- temp += _("Click on the ‘?’ in the top right corner to get help.");
4065+ temp = (format(_("At the moment you are %s")) % temp.c_str()).str();
4066 m_client_info.set_text(temp);
4067 }
4068
4069@@ -520,7 +531,7 @@
4070 ("settings()->scenario was set to true, but no map is available");
4071 Widelands::Map map; // MapLoader needs a place to put its preload data
4072 std::unique_ptr<Widelands::MapLoader> ml(map.get_correct_loader(settings.mapfilename));
4073- map.set_filename(settings.mapfilename.c_str());
4074+ map.set_filename(settings.mapfilename);
4075 ml->preload_map(true);
4076 Widelands::PlayerNumber const nrplayers = map.get_nrplayers();
4077 for (uint8_t i = 0; i < nrplayers; ++i) {
4078@@ -625,13 +636,12 @@
4079 {
4080 Widelands::Map map; // MapLoader needs a place to put its preload data
4081
4082- char const * const name = m_settings->settings().mapfilename.c_str();
4083- std::unique_ptr<Widelands::MapLoader> ml = map.get_correct_loader(name);
4084+ std::unique_ptr<Widelands::MapLoader> ml = map.get_correct_loader(m_settings->settings().mapfilename);
4085 if (!ml) {
4086 throw WLWarning("There was an error!", "The map file seems to be invalid!");
4087 }
4088
4089- map.set_filename(name);
4090+ map.set_filename(m_settings->settings().mapfilename);
4091 {
4092 i18n::Textdomain td("maps");
4093 ml->preload_map(true);
4094@@ -652,6 +662,12 @@
4095
4096 m_map_info.set_text(infotext);
4097 m_filename_proof = m_settings->settings().mapfilename;
4098+
4099+ m_suggested_teams_box->hide();
4100+ m_suggested_teams_box->show(map.get_suggested_teams());
4101+ m_suggested_teams_box->set_pos(
4102+ Point(m_suggested_teams_box->get_x(),
4103+ m_back.get_y() - m_padding - m_suggested_teams_box->get_h() - m_padding));
4104 }
4105
4106 /// Show help
4107
4108=== modified file 'src/ui_fsmenu/launch_mpg.h'
4109--- src/ui_fsmenu/launch_mpg.h 2014-09-20 09:37:47 +0000
4110+++ src/ui_fsmenu/launch_mpg.h 2014-10-27 09:37:32 +0000
4111@@ -28,7 +28,7 @@
4112 #include "ui_basic/listselect.h"
4113 #include "ui_basic/multilinetextarea.h"
4114 #include "ui_basic/textarea.h"
4115-
4116+#include "ui_fsmenu/suggested_teams_box.h"
4117
4118 struct ChatProvider;
4119 struct GameChatPanel;
4120@@ -77,6 +77,12 @@
4121 uint32_t m_buth;
4122 uint32_t m_fs;
4123 std::string m_fn;
4124+ // TODO(GunChleoc): We still need to use these consistently. Just getting them in for now
4125+ // so we can have the SuggestedTeamsBox
4126+ int32_t const m_padding; // Common padding between panels
4127+ int32_t const m_indent; // Indent for elements below labels
4128+ int32_t const m_label_height;
4129+ int32_t const m_right_column_x;
4130
4131 UI::Button m_change_map_or_save, m_ok, m_back, m_wincondition;
4132 UI::Button m_help_button;
4133@@ -89,6 +95,8 @@
4134 MultiPlayerSetupGroup * m_mpsg;
4135 std::string m_filename_proof; // local variable to check state
4136 int16_t m_nr_players;
4137+
4138+ UI::SuggestedTeamsBox* m_suggested_teams_box;
4139 };
4140
4141
4142
4143=== modified file 'src/ui_fsmenu/launch_spg.cc'
4144--- src/ui_fsmenu/launch_spg.cc 2014-09-29 19:25:24 +0000
4145+++ src/ui_fsmenu/launch_spg.cc 2014-10-27 09:37:32 +0000
4146@@ -370,7 +370,7 @@
4147 Widelands::Map map; // MapLoader needs a place to put its preload data
4148 std::unique_ptr<Widelands::MapLoader> map_loader(
4149 map.get_correct_loader(m_settings->settings().mapfilename));
4150- map.set_filename(m_settings->settings().mapfilename.c_str());
4151+ map.set_filename(m_settings->settings().mapfilename);
4152 map_loader->preload_map(true);
4153 Widelands::PlayerNumber const nrplayers = map.get_nrplayers();
4154 for (uint8_t i = 0; i < nrplayers; ++i) {
4155
4156=== added file 'src/ui_fsmenu/load_map_or_game.cc'
4157--- src/ui_fsmenu/load_map_or_game.cc 1970-01-01 00:00:00 +0000
4158+++ src/ui_fsmenu/load_map_or_game.cc 2014-10-27 09:37:32 +0000
4159@@ -0,0 +1,98 @@
4160+/*
4161+ * Copyright (C) 2002, 2006-2008, 2010-2011, 2013 by the Widelands Development Team
4162+ *
4163+ * This program is free software; you can redistribute it and/or
4164+ * modify it under the terms of the GNU General Public License
4165+ * as published by the Free Software Foundation; either version 2
4166+ * of the License, or (at your option) any later version.
4167+ *
4168+ * This program is distributed in the hope that it will be useful,
4169+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4170+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4171+ * GNU General Public License for more details.
4172+ *
4173+ * You should have received a copy of the GNU General Public License
4174+ * along with this program; if not, write to the Free Software
4175+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
4176+ *
4177+ */
4178+
4179+#include "ui_fsmenu/load_map_or_game.h"
4180+
4181+#include <memory>
4182+
4183+#include <boost/algorithm/string.hpp>
4184+
4185+#include "base/i18n.h"
4186+#include "graphic/graphic.h"
4187+#include "io/filesystem/filesystem.h"
4188+#include "ui_basic/button.h"
4189+#include "ui_basic/listselect.h"
4190+#include "ui_basic/multilinetextarea.h"
4191+#include "ui_basic/textarea.h"
4192+
4193+
4194+/// Select a Map, Saved Game or Replay in Fullscreen Mode.
4195+/// This class defines common coordinates for these UI screens.
4196+/// It also defines common buttons.
4197+FullscreenMenuLoadMapOrGame::FullscreenMenuLoadMapOrGame(bool sort_descending) :
4198+ FullscreenMenuBase("choosemapmenu.jpg"),
4199+
4200+ // Values for alignment and size
4201+ m_padding(4),
4202+ m_indent(10),
4203+ m_label_height(20),
4204+ m_tablex(get_w() * 47 / 2500),
4205+ m_tabley(get_h() * 17 / 50),
4206+ m_tablew(get_w() * 711 / 1250),
4207+ m_tableh(get_h() * 6083 / 10000),
4208+ m_right_column_margin(15),
4209+ m_right_column_x(m_tablex + m_tablew + m_right_column_margin),
4210+ m_buty (get_h() * 9 / 10),
4211+ m_butw ((get_w() - m_right_column_x - m_right_column_margin) / 2 - m_padding),
4212+ m_buth (get_h() * 9 / 200),
4213+ m_right_column_tab(get_w() - m_right_column_margin - m_butw),
4214+
4215+ // Main buttons
4216+ m_back
4217+ (this, "back",
4218+ m_right_column_x, m_buty, m_butw, m_buth,
4219+ g_gr->images().get("pics/but0.png"),
4220+ _("Back"), std::string(), true, false),
4221+ m_ok
4222+ (this, "ok",
4223+ get_w() - m_right_column_margin - m_butw, m_buty, m_butw, m_buth,
4224+ g_gr->images().get("pics/but2.png"),
4225+ _("OK"), std::string(), false, false),
4226+ m_table(this, m_tablex, m_tabley, m_tablew, m_tableh, sort_descending)
4227+ {}
4228+
4229+bool FullscreenMenuLoadMapOrGame::handle_key(bool down, SDL_keysym code) {
4230+
4231+ if (!down)
4232+ return false;
4233+
4234+ switch (code.sym)
4235+ {
4236+ case SDLK_KP_ENTER:
4237+ case SDLK_RETURN:
4238+ clicked_ok();
4239+ return true;
4240+ case SDLK_ESCAPE:
4241+ clicked_back();
4242+ return true;
4243+ default:
4244+ break; // not handled
4245+ }
4246+ return FullscreenMenuBase::handle_key(down, code);
4247+}
4248+
4249+
4250+int32_t FullscreenMenuLoadMapOrGame::get_y_from_preceding(UI::Panel& preceding_panel) {
4251+ return preceding_panel.get_y() + preceding_panel.get_h();
4252+}
4253+
4254+
4255+int32_t FullscreenMenuLoadMapOrGame::get_right_column_w(int32_t x) {
4256+ return get_w() - m_right_column_margin - x;
4257+}
4258
4259=== added file 'src/ui_fsmenu/load_map_or_game.h'
4260--- src/ui_fsmenu/load_map_or_game.h 1970-01-01 00:00:00 +0000
4261+++ src/ui_fsmenu/load_map_or_game.h 2014-10-27 09:37:32 +0000
4262@@ -0,0 +1,120 @@
4263+/*
4264+ * Copyright (C) 2002, 2006-2008, 2010-2011, 2013 by the Widelands Development Team
4265+ *
4266+ * This program is free software; you can redistribute it and/or
4267+ * modify it under the terms of the GNU General Public License
4268+ * as published by the Free Software Foundation; either version 2
4269+ * of the License, or (at your option) any later version.
4270+ *
4271+ * This program is distributed in the hope that it will be useful,
4272+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4273+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4274+ * GNU General Public License for more details.
4275+ *
4276+ * You should have received a copy of the GNU General Public License
4277+ * along with this program; if not, write to the Free Software
4278+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
4279+ *
4280+ */
4281+
4282+#ifndef WL_UI_FSMENU_LOAD_MAP_OR_GAME_H
4283+#define WL_UI_FSMENU_LOAD_MAP_OR_GAME_H
4284+
4285+#include "ui_fsmenu/base.h"
4286+
4287+#include <memory>
4288+
4289+#include <boost/algorithm/string.hpp>
4290+
4291+#include "base/i18n.h"
4292+#include "graphic/graphic.h"
4293+#include "io/filesystem/filesystem.h"
4294+#include "ui_basic/button.h"
4295+#include "ui_basic/listselect.h"
4296+#include "ui_basic/multilinetextarea.h"
4297+#include "ui_basic/table.h"
4298+#include "ui_basic/textarea.h"
4299+
4300+
4301+namespace Widelands {
4302+class EditorGameBase;
4303+class Game;
4304+class Map;
4305+class MapLoader;
4306+}
4307+class Image;
4308+class RenderTarget;
4309+class GameController;
4310+struct GameSettingsProvider;
4311+
4312+/**
4313+ * Author data for a map or scenario.
4314+ */
4315+struct MapAuthorData {
4316+
4317+ const std::string& get_names() const {return m_names;}
4318+ size_t get_number() const {return m_number;}
4319+
4320+ // Parses author list string into localized contatenated list string.
4321+ // Use , as list separator and no whitespaces between author names.
4322+ explicit MapAuthorData(const std::string& author_list) {
4323+ std::vector<std::string> authors;
4324+ boost::split(authors, author_list, boost::is_any_of(","));
4325+ m_names = localize_item_list(authors, i18n::ConcatenateWith::AMPERSAND);
4326+ m_number = authors.size();
4327+ }
4328+
4329+private:
4330+ std::string m_names;
4331+ size_t m_number;
4332+};
4333+
4334+/// Select a Map, Saved Game or Replay in Fullscreen Mode.
4335+/// This class defines common coordinates for these UI screens.
4336+/// It also defines common buttons.
4337+struct FullscreenMenuLoadMapOrGame : public FullscreenMenuBase {
4338+ FullscreenMenuLoadMapOrGame(bool sortdesc = false);
4339+
4340+ bool handle_key(bool down, SDL_keysym code) override;
4341+
4342+protected:
4343+ virtual void clicked_ok() {end_modal(1);}
4344+ void clicked_back() {end_modal(0);}
4345+
4346+ // Updates the information display on the right-hand side.
4347+ // Call this function when a different entry in the table gets selected.
4348+ virtual void entry_selected() {}
4349+ virtual void fill_table() {}
4350+
4351+ // Updates buttons and text labels and returns whether a table entry is selected.
4352+ virtual bool set_has_selection() {
4353+ bool has_selection = m_table.has_selection();
4354+ m_ok.set_enabled(has_selection);
4355+ return has_selection;
4356+ }
4357+
4358+ // Returns a y coordinate that can be used to position a Panel below the Panel directly above it
4359+ int32_t get_y_from_preceding(UI::Panel& preceding_panel);
4360+
4361+ // Returns the width that a Panel in the right column should have, depending on its x position
4362+ int32_t get_right_column_w(int32_t x);
4363+
4364+ // UI coordinates and spacers
4365+ int32_t const m_padding; // Common padding between panels
4366+ int32_t const m_indent; // Indent for elements below labels
4367+ int32_t const m_label_height;
4368+ int32_t const m_tablex, m_tabley, m_tablew, m_tableh;
4369+ int32_t const m_right_column_margin; // X margins of the right column
4370+ int32_t const m_right_column_x;
4371+ int32_t const m_buty, m_butw, m_buth; // Button dimensions
4372+ int32_t const m_right_column_tab;
4373+
4374+ // Main buttons
4375+ UI::Button m_back;
4376+ UI::Button m_ok;
4377+
4378+ UI::Table<uintptr_t const> m_table;
4379+};
4380+
4381+
4382+#endif // end of include guard: WL_UI_FSMENU_LOAD_MAP_OR_GAME_H
4383
4384=== modified file 'src/ui_fsmenu/loadgame.cc'
4385--- src/ui_fsmenu/loadgame.cc 2014-10-11 16:08:10 +0000
4386+++ src/ui_fsmenu/loadgame.cc 2014-10-27 09:37:32 +0000
4387@@ -19,10 +19,12 @@
4388
4389 #include "ui_fsmenu/loadgame.h"
4390
4391+#include <algorithm>
4392 #include <cstdio>
4393+#include <ctime>
4394 #include <memory>
4395-#include <string>
4396
4397+#include <boost/algorithm/string/predicate.hpp>
4398 #include <boost/format.hpp>
4399
4400 #include "base/i18n.h"
4401@@ -35,345 +37,500 @@
4402 #include "graphic/image_transformations.h"
4403 #include "graphic/in_memory_image.h"
4404 #include "graphic/surface.h"
4405+#include "helper.h"
4406 #include "io/filesystem/layered_filesystem.h"
4407 #include "logic/game.h"
4408 #include "logic/game_controller.h"
4409 #include "logic/game_settings.h"
4410+#include "logic/replay.h"
4411 #include "ui_basic/icon.h"
4412 #include "ui_basic/messagebox.h"
4413 #include "wui/text_constants.h"
4414
4415
4416-
4417 FullscreenMenuLoadGame::FullscreenMenuLoadGame
4418- (Widelands::Game & g, GameSettingsProvider * gsp, GameController * gc) :
4419- FullscreenMenuBase("choosemapmenu.jpg"),
4420-
4421-// Values for alignment and size
4422- m_butw (get_w() / 4),
4423- m_buth (get_h() * 9 / 200),
4424- m_fs (fs_small()),
4425- m_fn (ui_fn()),
4426- m_minimap_max_size(get_w() * 15 / 100),
4427-
4428-// "Data holder" for the savegame information
4429- m_game(g),
4430-
4431-// Buttons
4432- m_back
4433- (this, "back",
4434- get_w() * 71 / 100, get_h() * 9 / 10, m_butw, m_buth,
4435- g_gr->images().get("pics/but0.png"),
4436- _("Back"), std::string(), true, false),
4437- m_ok
4438- (this, "ok",
4439- get_w() * 71 / 100, get_h() * 31 / 40, m_butw, m_buth,
4440- g_gr->images().get("pics/but2.png"),
4441- _("OK"), std::string(), false, false),
4442- m_delete
4443- (this, "delete",
4444- get_w() * 71 / 100, get_h() * 17 / 20, m_butw, m_buth,
4445- g_gr->images().get("pics/but0.png"),
4446- _("Delete"), std::string(), false, false),
4447-
4448-// Savegame list
4449- m_list
4450- (this, get_w() * 47 / 2500, get_h() * 3417 / 10000,
4451- get_w() * 711 / 1250, get_h() * 6083 / 10000),
4452-
4453-// Text areas
4454+ (Widelands::Game & g, GameSettingsProvider * gsp, GameController * gc, bool is_replay) :
4455+ FullscreenMenuLoadMapOrGame(true),
4456+
4457+ m_is_replay(is_replay),
4458+ // Main title
4459 m_title
4460- (this,
4461- get_w() / 2, get_h() * 3 / 20,
4462- _("Choose saved game"), UI::Align_HCenter),
4463+ (this, get_w() / 2, m_tabley / 3,
4464+ m_is_replay ? _("Choose a replay") : _("Choose a saved game"), UI::Align_HCenter),
4465+
4466+ // Savegame description
4467 m_label_mapname
4468- (this,
4469- get_w() * 7 / 10, get_h() * 17 / 50,
4470- _("Map Name:"), UI::Align_Right),
4471- m_tamapname(this, get_w() * 71 / 100, get_h() * 17 / 50),
4472+ (this, m_right_column_x, m_tabley, "", UI::Align_Left),
4473+ m_ta_mapname(this,
4474+ m_right_column_x + m_indent, get_y_from_preceding(m_label_mapname) + m_padding,
4475+ get_right_column_w(m_right_column_x + m_indent), 2 * m_label_height - m_padding),
4476+
4477 m_label_gametime
4478- (this,
4479- get_w() * 7 / 10, get_h() * 3 / 8,
4480- _("Gametime:"), UI::Align_Right),
4481- m_tagametime(this, get_w() * 71 / 100, get_h() * 3 / 8),
4482+ (this, m_right_column_x, get_y_from_preceding(m_ta_mapname) + 2 * m_padding,
4483+ "",
4484+ UI::Align_Left),
4485+ m_ta_gametime(this,
4486+ m_right_column_tab, m_label_gametime.get_y(),
4487+ get_right_column_w(m_right_column_tab), m_label_height),
4488+
4489 m_label_players
4490- (this,
4491- get_w() * 7 / 10, get_h() * 41 / 100,
4492- _("Players:"), UI::Align_Right),
4493- m_ta_players
4494- (this, get_w() * 71 / 100, get_h() * 41 / 100),
4495- m_ta_win_condition
4496- (this, get_w() * 71 / 100, get_h() * 9 / 20),
4497- m_label_minimap
4498- (this,
4499- get_w() * 7 / 10, get_h() * 10 / 20,
4500- _("Minimap:"), UI::Align_Right),
4501- m_minimap_icon
4502- (this, get_w() * 71 / 100, get_h() * 10 / 20,
4503- m_minimap_max_size, m_minimap_max_size, nullptr),
4504+ (this, m_right_column_x, get_y_from_preceding(m_ta_gametime),
4505+ "",
4506+ UI::Align_Left),
4507+ m_ta_players(this,
4508+ m_right_column_tab, m_label_players.get_y(),
4509+ get_right_column_w(m_right_column_tab), m_label_height),
4510+
4511+ m_label_win_condition
4512+ (this, m_right_column_x, get_y_from_preceding(m_ta_players) + 3 * m_padding,
4513+ "",
4514+ UI::Align_Left),
4515+ m_ta_win_condition(this,
4516+ m_right_column_x + m_indent, get_y_from_preceding(m_label_win_condition) + m_padding,
4517+ get_right_column_w(m_right_column_x + m_indent), m_label_height),
4518+
4519+ m_delete
4520+ (this, "delete",
4521+ m_right_column_x, m_buty - m_buth - 2 * m_padding,
4522+ m_butw, m_buth,
4523+ g_gr->images().get("pics/but0.png"),
4524+ _("Delete"), std::string(), false, false),
4525+
4526+ m_minimap_y(get_y_from_preceding(m_ta_win_condition) + 3 * m_padding),
4527+ m_minimap_w(get_right_column_w(m_right_column_x)),
4528+ m_minimap_h(m_delete.get_y() - get_y_from_preceding(m_ta_win_condition) - 6 * m_padding),
4529+ m_minimap_icon(this,
4530+ m_right_column_x, get_y_from_preceding(m_ta_win_condition) + 3 * m_padding,
4531+ m_minimap_w, m_minimap_h, nullptr),
4532+
4533+ // "Data container" for the savegame information
4534+ m_game(g),
4535 m_settings(gsp),
4536 m_ctrl(gc)
4537 {
4538- m_back.sigclicked.connect(boost::bind(&FullscreenMenuLoadGame::end_modal, boost::ref(*this), 0));
4539+ m_title.set_textstyle(ts_big());
4540+ m_ta_gametime.set_tooltip(_("The time that elapsed inside this game"));
4541+ m_ta_players.set_tooltip(_("The number of players"));
4542+ m_ta_win_condition.set_tooltip(_("The win condition that was set for this game"));
4543+
4544+ if (m_is_replay) {
4545+ m_back.set_tooltip(_("Return to the main menu"));
4546+ m_ok.set_tooltip(_("Load this replay"));
4547+ m_ta_mapname.set_tooltip(_("The map that this replay is based on"));
4548+ m_delete.set_tooltip(_("Delete this replay"));
4549+ } else {
4550+ m_back.set_tooltip(_("Return to the single player menu"));
4551+ m_ok.set_tooltip(_("Load this game"));
4552+ m_ta_mapname.set_tooltip(_("The map that this game is based on"));
4553+ m_delete.set_tooltip(_("Delete this game"));
4554+ }
4555+ m_minimap_icon.set_visible(false);
4556+
4557+ m_back.sigclicked.connect(boost::bind(&FullscreenMenuLoadGame::clicked_back, boost::ref(*this)));
4558 m_ok.sigclicked.connect(boost::bind(&FullscreenMenuLoadGame::clicked_ok, boost::ref(*this)));
4559 m_delete.sigclicked.connect
4560 (boost::bind
4561 (&FullscreenMenuLoadGame::clicked_delete, boost::ref(*this)));
4562-
4563- m_back.set_font(font_small());
4564- m_ok.set_font(font_small());
4565- m_delete.set_font(font_small());
4566-
4567- m_title .set_font(m_fn, fs_big(), UI_FONT_CLR_FG);
4568- m_label_mapname .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
4569- m_tamapname .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
4570- m_label_gametime.set_font(m_fn, m_fs, UI_FONT_CLR_FG);
4571- m_tagametime .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
4572- m_label_players .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
4573- m_ta_players .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
4574- m_ta_win_condition.set_font(m_fn, m_fs, UI_FONT_CLR_FG);
4575- m_minimap_icon.set_visible(false);
4576- m_list .set_font(m_fn, m_fs);
4577- m_list.selected.connect(boost::bind(&FullscreenMenuLoadGame::map_selected, this, _1));
4578- m_list.double_clicked.connect(boost::bind(&FullscreenMenuLoadGame::double_clicked, this, _1));
4579- m_list.focus();
4580- fill_list();
4581+ m_table.add_column(130, _("Save Date"), _("The date this game was saved"), UI::Align_Left);
4582+ if (m_is_replay || m_settings->settings().multiplayer) {
4583+ std::vector<std::string> modes;
4584+ if (m_is_replay) {
4585+ /** TRANSLATORS: Tooltip for the "Mode" column when choosing a game/replay to load. */
4586+ /** TRANSLATORS: Make sure that you keep consistency in your translation. */
4587+ modes.push_back("SP = Single Player");
4588+ }
4589+ /** TRANSLATORS: Tooltip for the "Mode" column when choosing a game/replay to load. */
4590+ /** TRANSLATORS: Make sure that you keep consistency in your translation. */
4591+ modes.push_back("MP = Multiplayer");
4592+ /** TRANSLATORS: Tooltip for the "Mode" column when choosing a game/replay to load. */
4593+ /** TRANSLATORS: Make sure that you keep consistency in your translation. */
4594+ modes.push_back("H = Multiplayer (Host)");
4595+ const std::string mode_tooltip_1 =
4596+ /** TRANSLATORS: Tooltip for the "Mode" column when choosing a game/replay to load. */
4597+ /** TRANSLATORS: %s is a list of game modes. */
4598+ ((boost::format(_("Game Mode: %s."))
4599+ % i18n::localize_item_list(modes, i18n::ConcatenateWith::COMMA))).str();
4600+ const std::string mode_tooltip_2 =
4601+ _("Numbers are the number of players.");
4602+
4603+ m_table.add_column(65,
4604+ /** TRANSLATORS: Game Mode table column when choosing a game/replay to load. */
4605+ /** TRANSLATORS: Keep this to 5 letters maximum. */
4606+ /** TRANSLATORS: A tooltip will explain if you need to use an abbreviation. */
4607+ _("Mode"),
4608+ (boost::format("%s %s") % mode_tooltip_1 % mode_tooltip_2).str(),
4609+ UI::Align_Left);
4610+ m_table.add_column(m_table.get_w() - 130 - 65,
4611+ _("Map Name"), _("The name of the map that was played"),
4612+ UI::Align_Left);
4613+ } else {
4614+ m_table.add_column(m_table.get_w() - 130,
4615+ _("Filename"), _("The filename the game was saved under"),
4616+ UI::Align_Left);
4617+ }
4618+ m_table.set_column_compare
4619+ (0,
4620+ boost::bind(&FullscreenMenuLoadGame::compare_date_descending, this, _1, _2));
4621+ m_table.selected.connect(boost::bind(&FullscreenMenuLoadGame::entry_selected, this));
4622+ m_table.double_clicked.connect(boost::bind(&FullscreenMenuLoadGame::clicked_ok, boost::ref(*this)));
4623+ m_table.set_sort_column(0);
4624+ m_table.focus();
4625+ fill_table();
4626 }
4627
4628 void FullscreenMenuLoadGame::think()
4629 {
4630- if (m_ctrl)
4631+ if (m_ctrl) {
4632 m_ctrl->think();
4633+ }
4634+}
4635+
4636+// Reverse default sort order for save date column
4637+bool FullscreenMenuLoadGame::compare_date_descending(uint32_t rowa, uint32_t rowb)
4638+{
4639+ const SavegameData & r1 = m_games_data[m_table[rowa]];
4640+ const SavegameData & r2 = m_games_data[m_table[rowb]];
4641+
4642+ return r1.savetimestamp < r2.savetimestamp;
4643 }
4644
4645
4646 void FullscreenMenuLoadGame::clicked_ok()
4647 {
4648- m_filename = m_list.get_selected();
4649+ const SavegameData & gamedata = m_games_data[m_table.get_selected()];
4650+ m_filename = gamedata.filename;
4651 end_modal(1);
4652 }
4653
4654 void FullscreenMenuLoadGame::clicked_delete()
4655 {
4656- std::string fname = m_list.get_selected();
4657+ if (!m_table.has_selection()) {
4658+ return;
4659+ }
4660+ const SavegameData & gamedata = m_games_data[m_table.get_selected()];
4661+
4662+ std::string message = (boost::format("%s %s\n")
4663+ % m_label_mapname.get_text() % gamedata.mapname).str();
4664+
4665+ message = (boost::format("%s %s %s\n") % message
4666+ % m_label_win_condition.get_text() % gamedata.wincondition).str();
4667+
4668+ message = (boost::format("%s %s %s\n") % message
4669+ % _("Save Date:") % gamedata.savedatestring).str();
4670+
4671+ message = (boost::format("%s %s %s\n") % message
4672+ % m_label_gametime.get_text() % gametimestring(gamedata.gametime)).str();
4673+
4674+ message = (boost::format("%s %s %s\n\n") % message
4675+ % m_label_players.get_text() % gamedata.nrplayers).str();
4676+
4677+ message = (boost::format("%s %s %s\n") % message
4678+ % _("Filename:") % gamedata.filename).str();
4679+
4680+ if (m_is_replay) {
4681+ message = (boost::format("%s\n\n%s")
4682+ % _("Do you really want to delete this replay?") % message).str();
4683+ } else {
4684+ message = (boost::format("%s\n\n%s")
4685+ % _("Do you really want to delete this game?") % message).str();
4686+ }
4687+
4688 UI::WLMessageBox confirmationBox
4689- (this,
4690- _("Delete file"),
4691- (boost::format(_("Do you really want to delete %s?")) % fname).str(),
4692- UI::WLMessageBox::YESNO);
4693+ (this, _("Confirm deleting file"), message, UI::WLMessageBox::YESNO);
4694 if (confirmationBox.run()) {
4695- g_fs->fs_unlink(m_list.get_selected());
4696- m_list.clear();
4697- fill_list();
4698- if (m_list.empty()) {
4699- // else fill_list() already selected the first entry
4700- no_selection();
4701+ g_fs->fs_unlink(gamedata.filename);
4702+ if (m_is_replay) {
4703+ g_fs->fs_unlink(gamedata.filename + WLGF_SUFFIX);
4704 }
4705- }
4706-}
4707-
4708-/**
4709- * Update buttons and labels to reflect that no loadable game is selected.
4710- */
4711-void FullscreenMenuLoadGame::no_selection()
4712-{
4713- m_ok.set_enabled(false);
4714- m_delete.set_enabled(false);
4715-
4716- m_tamapname .set_text(std::string());
4717- m_tagametime.set_text(std::string());
4718- m_ta_players.set_text(std::string());
4719- m_ta_win_condition.set_text(std::string());
4720- m_minimap_icon.set_icon(nullptr);
4721- m_minimap_icon.set_visible(false);
4722- m_minimap_icon.set_no_frame();
4723- m_minimap_image.reset();
4724-}
4725-
4726-
4727-void FullscreenMenuLoadGame::map_selected(uint32_t selected)
4728-{
4729- if (!m_list.has_selection()) {
4730- no_selection();
4731- return;
4732- }
4733- const char * const name = m_list.get_selected();
4734- if (!name) {
4735- no_selection();
4736- return;
4737- }
4738-
4739- Widelands::GamePreloadPacket gpdp;
4740- Widelands::GameLoader gl(name, m_game);
4741-
4742- try {
4743- gl.preload_game(gpdp);
4744- } catch (const WException & e) {
4745- if (!m_settings || m_settings->settings().saved_games.empty()) {
4746- log("Save game '%s' must have changed from under us\nException: %s\n", name, e.what());
4747- m_list.remove(selected);
4748- return;
4749+ fill_table();
4750+ }
4751+}
4752+
4753+
4754+bool FullscreenMenuLoadGame::set_has_selection()
4755+{
4756+ bool has_selection = m_table.has_selection();
4757+ FullscreenMenuLoadMapOrGame::set_has_selection();
4758+ m_delete.set_enabled(has_selection);
4759+
4760+ if (!has_selection) {
4761+ m_label_mapname .set_text(std::string());
4762+ m_label_gametime.set_text(std::string());
4763+ m_label_players.set_text(std::string());
4764+ m_label_win_condition.set_text(std::string());
4765+
4766+ m_ta_mapname .set_text(std::string());
4767+ m_ta_gametime.set_text(std::string());
4768+ m_ta_players.set_text(std::string());
4769+ m_ta_win_condition.set_text(std::string());
4770+ m_minimap_icon.set_icon(nullptr);
4771+ m_minimap_icon.set_visible(false);
4772+ m_minimap_icon.set_no_frame();
4773+ m_minimap_image.reset();
4774+ } else {
4775+ m_label_mapname .set_text(_("Map Name:"));
4776+ m_label_gametime.set_text(_("Gametime:"));
4777+ m_label_players.set_text(_("Players:"));
4778+ m_label_win_condition.set_text(_("Win Condition:"));
4779+ }
4780+ return has_selection;
4781+}
4782+
4783+
4784+void FullscreenMenuLoadGame::entry_selected()
4785+{
4786+ if (set_has_selection()) {
4787+
4788+ const SavegameData & gamedata = m_games_data[m_table.get_selected()];
4789+
4790+ m_ta_mapname.set_text(gamedata.mapname);
4791+ m_ta_gametime.set_text(gametimestring(gamedata.gametime));
4792+
4793+ uint8_t number_of_players = gamedata.nrplayers;
4794+ if (number_of_players > 0) {
4795+ m_ta_players.set_text((boost::format("%u") % static_cast<unsigned int>(number_of_players)).str());
4796 } else {
4797- m_ok.set_enabled(true);
4798- m_delete.set_enabled(false);
4799- m_tamapname .set_text(_("Savegame from dedicated server"));
4800- m_tagametime.set_text(_("Unknown gametime"));
4801- return;
4802+ m_label_players.set_text("");
4803+ m_ta_players.set_text("");
4804 }
4805- }
4806-
4807- m_ok.set_enabled(true);
4808- m_delete.set_enabled(true);
4809-
4810- //Try to translate the map name.
4811- //This will work on every official map as expected
4812- //and 'fail silently' (not find a translation) for already translated campaign map names.
4813- //It will also translate 'false-positively' on any user-made map which shares a name with
4814- //the official maps, but this should not be a problem to worry about.
4815- {
4816- i18n::Textdomain td("maps");
4817- m_tamapname.set_text(_(gpdp.get_mapname()));
4818- }
4819-
4820- uint32_t gametime = gpdp.get_gametime();
4821- m_tagametime.set_text(gametimestring(gametime));
4822-
4823- if (gpdp.get_number_of_players() > 0) {
4824- m_ta_players.set_text(std::to_string(static_cast<unsigned int>(gpdp.get_number_of_players())));
4825- } else {
4826- m_ta_players.set_text(_("Unknown"));
4827- }
4828- m_ta_win_condition.set_text(gpdp.get_win_condition());
4829-
4830- std::string minimap_path = gpdp.get_minimap_path();
4831- // Delete former image
4832- m_minimap_icon.set_icon(nullptr);
4833- m_minimap_icon.set_visible(false);
4834- m_minimap_icon.set_no_frame();
4835- m_minimap_image.reset();
4836- // Load the new one
4837- if (!minimap_path.empty()) {
4838- try {
4839- // Load the image
4840- std::unique_ptr<Surface> surface(load_image(
4841- minimap_path, std::unique_ptr<FileSystem>(g_fs->make_sub_file_system(name)).get()));
4842- m_minimap_image.reset(new_in_memory_image(std::string(name + minimap_path), surface.release()));
4843- // Scale it
4844- double scale = double(m_minimap_max_size) / m_minimap_image->width();
4845- double scaleY = double(m_minimap_max_size) / m_minimap_image->height();
4846- if (scaleY < scale) {
4847- scale = scaleY;
4848+
4849+ m_ta_win_condition.set_text(gamedata.wincondition);
4850+
4851+ std::string minimap_path = gamedata.minimap_path;
4852+ // Delete former image
4853+ m_minimap_icon.set_icon(nullptr);
4854+ m_minimap_icon.set_visible(false);
4855+ m_minimap_icon.set_no_frame();
4856+ m_minimap_image.reset();
4857+ // Load the new one
4858+ if (!minimap_path.empty()) {
4859+ try {
4860+ // Load the image
4861+ std::unique_ptr<Surface> surface(
4862+ load_image(
4863+ minimap_path,
4864+ std::unique_ptr<FileSystem>(g_fs->make_sub_file_system(gamedata.filename)).get()));
4865+
4866+ m_minimap_image.reset(new_in_memory_image(std::string(gamedata.filename + minimap_path),
4867+ surface.release()));
4868+
4869+ // Scale it
4870+ double scale = double(m_minimap_w) / m_minimap_image->width();
4871+ double scaleY = double(m_minimap_h) / m_minimap_image->height();
4872+ if (scaleY < scale) {
4873+ scale = scaleY;
4874+ }
4875+ if (scale > 1.0) scale = 1.0; // Don't make the image too big; fuzziness will result
4876+ uint16_t w = scale * m_minimap_image->width();
4877+ uint16_t h = scale * m_minimap_image->height();
4878+ const Image* resized = ImageTransformations::resize(m_minimap_image.get(), w, h);
4879+ // keeps our in_memory_image around and give to icon the one
4880+ // from resize that is handled by the cache. It is still linked to our
4881+ // surface
4882+ m_minimap_icon.set_size(w, h);
4883+
4884+ // Center the minimap in the available space
4885+ int32_t xpos = m_right_column_x + (get_w() - m_right_column_margin - w - m_right_column_x) / 2;
4886+ int32_t ypos = m_minimap_y;
4887+
4888+ // Set small minimaps higher up for a more harmonious look
4889+ if (h < m_minimap_h * 2 / 3) {
4890+ ypos += (m_minimap_h - h) / 3;
4891+ } else {
4892+ ypos += (m_minimap_h - h) / 2;
4893+ }
4894+
4895+ m_minimap_icon.set_pos(Point(xpos, ypos));
4896+ m_minimap_icon.set_frame(UI_FONT_CLR_FG);
4897+ m_minimap_icon.set_visible(true);
4898+ m_minimap_icon.set_icon(resized);
4899+ } catch (const std::exception & e) {
4900+ log("Failed to load the minimap image : %s\n", e.what());
4901 }
4902- uint16_t w = scale * m_minimap_image->width();
4903- uint16_t h = scale * m_minimap_image->height();
4904- const Image* resized = ImageTransformations::resize(m_minimap_image.get(), w, h);
4905- // keeps our in_memory_image around and give to icon the one
4906- // from resize that is handled by the cache. It is still linked to our
4907- // surface
4908- m_minimap_icon.set_size(w, h);
4909- m_minimap_icon.set_frame(UI_FONT_CLR_FG);
4910- m_minimap_icon.set_visible(true);
4911- m_minimap_icon.set_icon(resized);
4912- } catch (const std::exception & e) {
4913- log("Failed to load the minimap image : %s\n", e.what());
4914 }
4915 }
4916 }
4917
4918-/**
4919- * Listbox got double clicked
4920- */
4921-void FullscreenMenuLoadGame::double_clicked(uint32_t) {
4922- clicked_ok();
4923-}
4924
4925 /**
4926 * Fill the file list
4927 */
4928-void FullscreenMenuLoadGame::fill_list() {
4929+void FullscreenMenuLoadGame::fill_table() {
4930+
4931+ m_games_data.clear();
4932+ m_table.clear();
4933+
4934+ SavegameData* gamedata = new SavegameData();
4935+
4936 if (m_settings && !m_settings->settings().saved_games.empty()) {
4937 for (uint32_t i = 0; i < m_settings->settings().saved_games.size(); ++i) {
4938- const char * path = m_settings->settings().saved_games.at(i).path.c_str();
4939- m_list.add(FileSystem::filename_without_ext(path).c_str(), path);
4940+ gamedata->filename = m_settings->settings().saved_games.at(i).path;
4941+ m_games_data.push_back(*gamedata);
4942+
4943+ UI::Table<uintptr_t const>::EntryRecord & te =
4944+ m_table.add(m_games_data.size() - 1);
4945+ te.set_string(0, FileSystem::filename_without_ext(gamedata->filename.c_str()).c_str());
4946 }
4947 } else { // Normal case
4948 // Fill it with all files we find.
4949- m_gamefiles = g_fs->list_directory("save");
4950+
4951+ FilenameSet gamefiles;
4952+
4953+ if (m_is_replay) {
4954+ gamefiles = filter(g_fs->list_directory(REPLAY_DIR),
4955+ [](const std::string& fn) {return boost::ends_with(fn, REPLAY_SUFFIX);});
4956+ } else {
4957+ gamefiles = g_fs->list_directory("save");
4958+ }
4959
4960 Widelands::GamePreloadPacket gpdp;
4961
4962- const FilenameSet & gamefiles = m_gamefiles;
4963- for (const std::string& gamefile : gamefiles) {
4964- char const * const name = gamefile.c_str();
4965+ for (const std::string& gamefilename : gamefiles) {
4966+
4967+ gamedata = new SavegameData();
4968+
4969+ std::string savename = gamefilename;
4970+ if (m_is_replay) savename += WLGF_SUFFIX;
4971+
4972+ if (!g_fs->file_exists(savename.c_str())) {
4973+ continue;
4974+ }
4975+
4976+ gamedata->filename = gamefilename;
4977
4978 try {
4979- Widelands::GameLoader gl(name, m_game);
4980+ Widelands::GameLoader gl(savename.c_str(), m_game);
4981 gl.preload_game(gpdp);
4982
4983- // TODO(GunChleoc): Do something more structured with this information
4984- // in the ui_fsmenu refactoring branch
4985- const std::string fs_filename = FileSystem::filename_without_ext(name);
4986-
4987- // Begin localization section
4988- std::string displaytitle = fs_filename;
4989- if ((is_timestring(fs_filename) || fs_filename == "wl_autosave")
4990- && gpdp.get_saveyear() > 0
4991- && gpdp.get_savemonth() > 0
4992- && gpdp.get_saveday() > 0) {
4993-
4994- switch (gpdp.get_gametype()) {
4995+ gamedata->gametype = gpdp.get_gametype();
4996+
4997+ if (!m_is_replay) {
4998+ if (m_settings->settings().multiplayer) {
4999+ if (gamedata->gametype == GameController::GameType::SINGLEPLAYER) {
5000+ continue;
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to status/vote changes: