widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #02883
[Merge] lp:~widelands-dev/widelands/i18nfixes into lp:widelands
GunChleoc has proposed merging lp:~widelands-dev/widelands/i18nfixes into lp:widelands.
Requested reviews:
Widelands Developers (widelands-dev)
Related bugs:
Bug #1289698 in widelands: "Sorting maps by name sort by original instead of translated name"
https://bugs.launchpad.net/widelands/+bug/1289698
Bug #1377660 in widelands: "Fullscreen Menu overhaul"
https://bugs.launchpad.net/widelands/+bug/1377660
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/i18nfixes/+merge/238137
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)
--
https://code.launchpad.net/~widelands-dev/widelands/i18nfixes/+merge/238137
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/i18nfixes into lp:widelands.
=== modified file 'campaigns/atl01.wmf/elemental'
--- campaigns/atl01.wmf/elemental 2014-10-04 18:23:52 +0000
+++ campaigns/atl01.wmf/elemental 2014-10-13 11:34:08 +0000
@@ -6,7 +6,7 @@
map_h="160"
nr_players="1"
world="greenland"
-name=_"01 – From Nemesis to Genesis"
+name=_"From Nemesis to Genesis"
author="SirVer,Nasenbaer"
descr=_ "After landing on a mysterious island close to Atlantis, the remaining Atlanteans struggle to make a new home for themselves."
background="campaigns/atl01.wmf/pics/background.jpg"
=== modified file 'campaigns/cconfig'
--- campaigns/cconfig 2014-02-25 10:47:47 +0000
+++ campaigns/cconfig 2014-10-13 11:34:08 +0000
@@ -24,22 +24,25 @@
[global]
version = 6
# Barbarians Introduction
-campname0=_"Barbarians – The Second Empire"
+campname0=_"The Second Empire"
campsect0=barbariantut
+camptribe0=_"Barbarians"
campdiff0=1
campdiffdescr0=_"Easy. Introduces the Barbarians"
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."
campvisi0=1
# Empire Introduction
-campname1=_"Empire – The Months of Exile"
+campname1=_"The Months of Exile"
campsect1=empiretut
+camptribe1=_"Empire"
campdiff1=1
campdiffdescr1=_"Easy. Introduces the Empire"
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."
campvisi1=0
# Atlantean Introduction
-campname2=_"Atlanteans – The Run for the Fire"
+campname2=_"The Run for the Fire"
campsect2=atlanteans
+camptribe2=_"Atlanteans"
campdiff2=2
campdiffdescr2=_"Challenging. Introduces the Atlanteans"
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."
@@ -61,29 +64,29 @@
#####
[barbariantut00]
-name=_"01 – Eyes in the Dark"
+name=_"Eyes in the Dark"
visible=1
path="campaigns/t01.wmf"
[barbariantut01]
-name=_"02 – A Place to Call Home"
+name=_"A Place to Call Home"
visible=0
path="campaigns/t02.wmf"
[barbariantut02]
-name=_"03 – This Land is Our Land"
+name=_"This Land is Our Land"
newvisi="campsect1"
visible=0
path="campaigns/t03.wmf"
[empiretut00]
-name=_"01 – The Strands of Malac’ Mor"
+name=_"The Strands of Malac’ Mor"
visible=1
path="campaigns/emp01.wmf"
[empiretut01]
-name=_"02 – An Outpost for Exile"
+name=_"An Outpost for Exile"
visible=0
path="campaigns/emp02.wmf"
@@ -95,7 +98,7 @@
[atlanteans00]
-name=_"01 – From Nemesis to Genesis"
+name=_"From Nemesis to Genesis"
visible=1
path="campaigns/atl01.wmf"
=== modified file 'campaigns/dummy.wmf/elemental'
--- campaigns/dummy.wmf/elemental 2011-01-04 12:17:44 +0000
+++ campaigns/dummy.wmf/elemental 2014-10-13 11:34:08 +0000
@@ -5,5 +5,6 @@
nr_players="1"
world="greenland"
name=_"Not yet implemented"
-author="Nobody"
+# TRANSLATORS: Author for dummy map
+author=_"Nobody"
descr=_"Sorry, this map is not yet implemented."
=== modified file 'campaigns/emp01.wmf/elemental'
--- campaigns/emp01.wmf/elemental 2014-10-04 18:23:52 +0000
+++ campaigns/emp01.wmf/elemental 2014-10-13 11:34:08 +0000
@@ -4,7 +4,7 @@
map_h=64
nr_players=1
world=desert
-name=_"01 – The Strands of Malac’ Mor"
+name=_"The Strands of Malac’ Mor"
author=Nasenbaer
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."
background="campaigns/emp01.wmf/pics/background.jpg"
=== modified file 'campaigns/emp02.wmf/elemental'
--- campaigns/emp02.wmf/elemental 2014-10-04 18:23:52 +0000
+++ campaigns/emp02.wmf/elemental 2014-10-13 11:34:08 +0000
@@ -6,7 +6,7 @@
map_h=80
nr_players=2
world=desert
-name=_"02 – An Outpost for Exile"
+name=_"An Outpost for Exile"
author=Nasenbaer
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."
background="campaigns/emp01.wmf/pics/background.jpg"
=== modified file 'campaigns/t01.wmf/elemental'
--- campaigns/t01.wmf/elemental 2014-10-04 18:23:52 +0000
+++ campaigns/t01.wmf/elemental 2014-10-13 11:34:08 +0000
@@ -4,7 +4,7 @@
map_h=64
nr_players=1
world=greenland
-name=_"01 – Eyes in the Dark"
+name=_"Eyes in the Dark"
author=Winterwind
descr=_"In this tutorial, the basic gameplay and control as well as basic production buildings of the Barbarians are introduced."
background="campaigns/t01.wmf/pics/background.jpg"
=== modified file 'campaigns/t02.wmf/elemental'
--- campaigns/t02.wmf/elemental 2014-10-04 18:23:52 +0000
+++ campaigns/t02.wmf/elemental 2014-10-13 11:34:08 +0000
@@ -4,7 +4,7 @@
map_h=64
nr_players=1
world=greenland
-name=_"02 – A Place to Call Home"
+name=_"A Place to Call Home"
author=Winterwind
descr=_"In this scenario, the higher production buildings including mining and military expansions will be introduced."
background="campaigns/t02.wmf/pics/background.jpg"
=== modified file 'campaigns/t03.wmf/elemental'
--- campaigns/t03.wmf/elemental 2014-02-25 10:47:47 +0000
+++ campaigns/t03.wmf/elemental 2014-10-13 11:34:08 +0000
@@ -4,7 +4,7 @@
map_h="112"
nr_players="4"
world="winterland"
-name=_"03 – This Land is Our Land"
-author="Wolfpac & Nasenbaer"
+name=_"This Land is Our Land"
+author="Wolfpac,Nasenbaer"
descr=_"This tutorial explains the handling of military and training site buildings and will introduce fighting."
background="tribes/barbarians/pics/campmap-tut3.jpg"
=== modified file 'campaigns/tutorial01.wmf/elemental'
--- campaigns/tutorial01.wmf/elemental 2014-10-04 18:23:52 +0000
+++ campaigns/tutorial01.wmf/elemental 2014-10-13 11:34:08 +0000
@@ -5,6 +5,6 @@
nr_players=2
world=greenland
name=_"Tutorial 1"
-author="Winterwind, SirVer, Nasenbaer"
+author="Winterwind,SirVer,Nasenbaer"
descr=_"Basic Tutorial – a map based on Winterwind’s tutorial 1 for the Barbarians"
background="campaigns/tutorial01.wmf/pics/background.jpg"
=== modified file 'maps/Atoll.wmf/elemental'
--- maps/Atoll.wmf/elemental 2014-02-25 10:47:47 +0000
+++ maps/Atoll.wmf/elemental 2014-10-13 11:34:08 +0000
@@ -9,5 +9,9 @@
name=_"Atoll"
author="Nasenbaer"
descr=_"Who will be the real king of the big atoll?"
-hint=_"Suggested Teams: (blue, yellow) vs. (red, green)"
tags="2teams,official,seafaring"
+
+[teams00]
+team1=0,2
+team2=1,3
+# (blue, yellow) vs. (red, green)
=== modified file 'maps/Calvisson.wmf/elemental'
--- maps/Calvisson.wmf/elemental 2014-02-25 10:47:47 +0000
+++ maps/Calvisson.wmf/elemental 2014-10-13 11:34:08 +0000
@@ -9,5 +9,24 @@
name=_"Calvisson"
author="Kristin"
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."
-hint=_"Suggested Teams: blue vs. red | yellow vs. green | (blue, yellow) vs. (red, green) | (blue, green) vs. (red, yellow)"
tags="seafaring,official,2teams"
+
+[teams00]
+team1=0
+team2=1
+# blue vs. red
+
+[teams01]
+team1=2
+team2=3
+# yellow vs. green
+
+[teams02]
+team1=0,2
+team2=1,3
+# (blue, yellow) vs. (red, green)
+
+[teams03]
+team1=0,3
+team2=1,2
+# (blue, green) vs. (red, yellow)
=== modified file 'maps/Crossing the horizon.wmf/elemental'
--- maps/Crossing the horizon.wmf/elemental 2014-02-25 10:47:47 +0000
+++ maps/Crossing the horizon.wmf/elemental 2014-10-13 11:34:08 +0000
@@ -9,6 +9,4 @@
name=_"Crossing the Horizon"
author="Kristin"
descr=_"Man your ship and sail to the horizon."
-hint=_"Suggested Teams: all ok"
tags="official,ffa,2teams,seafaring"
-
=== modified file 'maps/Desert Tournament.wmf/elemental'
--- maps/Desert Tournament.wmf/elemental 2014-02-25 10:47:47 +0000
+++ maps/Desert Tournament.wmf/elemental 2014-10-13 11:34:08 +0000
@@ -7,5 +7,9 @@
name=_"Desert Tournament"
author="ivh"
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?"
-hint=_ "Suggested Teams: (blue, red) vs. (yellow, green)"
tags="official,ffa,2teams"
+
+[teams00]
+team1=0,1
+team2=2,3
+# (blue, red) vs. (yellow, green)
=== modified file 'maps/Elven Forests.wmf/elemental'
--- maps/Elven Forests.wmf/elemental 2014-02-25 10:47:47 +0000
+++ maps/Elven Forests.wmf/elemental 2014-10-13 11:34:08 +0000
@@ -7,5 +7,14 @@
name=_Elven Forests
author=Winterwind
descr=_ "The breath-taking beauty of these emerald lands has lured many tribes into an attempt to take them for themselves."
-hint=_ "Suggested Teams: (blue, red) vs. (yellow, green) | (blue, yellow) vs. (red, green)"
tags=official,2teams,ffa
+
+[teams00]
+team1=0,1
+team2=2,3
+# (blue, red) vs. (yellow, green)
+
+[teams01]
+team1=0,2
+team2=1,3
+# (blue, yellow) vs. (red, green)
=== modified file 'maps/Four Castles.wmf/elemental'
--- maps/Four Castles.wmf/elemental 2014-02-25 10:47:47 +0000
+++ maps/Four Castles.wmf/elemental 2014-10-13 11:34:08 +0000
@@ -7,5 +7,9 @@
name=_Four Castles
author=Winterwind
descr=_ "Well protected in their mighty fortresses, four power-hungry warlords are completing their schemes to dominate these lands..."
-hint=_ "Suggested Teams: (blue, red) vs. (yellow, green)"
tags="official,ffa,2teams"
+
+[teams00]
+team1=0,1
+team2=2,3
+# (blue, red) vs. (yellow, green)
=== modified file 'maps/Four Mountains.wmf/elemental'
--- maps/Four Mountains.wmf/elemental 2014-02-25 10:47:47 +0000
+++ maps/Four Mountains.wmf/elemental 2014-10-13 11:34:08 +0000
@@ -7,5 +7,14 @@
name=_ "Four Mountains"
author="Quappo"
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."
-hint=_ "Suggested Teams: (blue, red) vs. (yellow, green) | (blue, green) vs. (red, yellow)"
tags="official,ffa,2teams"
+
+[teams00]
+team1=0,1
+team2=2,3
+# (blue, red) vs. (yellow, green)
+
+[teams01]
+team1=0,3
+team2=1,2
+# (blue, green) vs. (red, yellow)
=== modified file 'maps/Long, long way.wmf/elemental'
--- maps/Long, long way.wmf/elemental 2014-02-25 10:47:47 +0000
+++ maps/Long, long way.wmf/elemental 2014-10-13 11:34:08 +0000
@@ -9,5 +9,29 @@
name=_"Long, long way"
author="Einstein13"
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!"
-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)"
tags="seafaring,official,2teams,3teams,4teams"
+
+[teams00]
+team1=0
+team2=1
+# blue vs. red
+
+[teams01]
+team1=2
+team2=3
+# yellow vs. green
+
+[teams02]
+team1=0,2
+team2=1,3
+# (blue, yellow) vs. (red, green)
+
+[teams03]
+team1=0,2,4
+team2=1,3,5
+# (blue, yellow, black) vs. (red, green, orange)
+
+[teams04]
+team1=0,2,4,6
+team2=1,3,5,7
+# (blue, yellow, black, purple) vs. (red, green, orange, white)
=== modified file 'maps/MP Scenarios/Smugglers.wmf/elemental'
--- maps/MP Scenarios/Smugglers.wmf/elemental 2014-02-25 10:47:47 +0000
+++ maps/MP Scenarios/Smugglers.wmf/elemental 2014-10-13 11:34:08 +0000
@@ -6,7 +6,12 @@
map_h="144"
nr_players="4"
world="greenland"
-name="Smugglers"
+name=_"Smugglers"
author="Nasenbaer,SirVer"
-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."
+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?"
tags="official"
+
+[teams00]
+team1=0,1
+team2=2,3
+# blue, red vs. yellow, green
=== modified file 'maps/Plateau.wmf/elemental'
--- maps/Plateau.wmf/elemental 2014-02-25 10:47:47 +0000
+++ maps/Plateau.wmf/elemental 2014-10-13 11:34:08 +0000
@@ -7,6 +7,9 @@
name=_The Green Plateau
author=Nasenbaer
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."
-hint=_"Suggested Teams: blue vs. yellow"
tags="official,1v1"
+[teams00]
+team1=0
+team2=2
+# blue vs. yellow
=== modified file 'maps/Rendez-Vous.wmf/elemental'
--- maps/Rendez-Vous.wmf/elemental 2014-02-25 10:47:47 +0000
+++ maps/Rendez-Vous.wmf/elemental 2014-10-13 11:34:08 +0000
@@ -7,5 +7,4 @@
name=_ "Rendez-Vous"
author="Quappo"
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."
-hint=_ "Suggested Teams: all ok"
tags="official,ffa,2teams"
=== modified file 'maps/Swamp Monks.wmf/elemental'
--- maps/Swamp Monks.wmf/elemental 2014-02-25 10:47:47 +0000
+++ maps/Swamp Monks.wmf/elemental 2014-10-13 11:34:08 +0000
@@ -7,5 +7,9 @@
name=_"Swamp Monks"
author="Nasenbaer"
descr=_ "It is said that the old war monks, living in the even older swamps, are the key to control over the whole island."
-hint=_ "Suggested Teams: (blue, red) vs. (yellow, green)"
tags="official,2teams"
+
+[teams00]
+team1=0,1
+team2=2,3
+# (blue, red) vs. (yellow, green)
=== modified file 'maps/The Nile.wmf/elemental'
--- maps/The Nile.wmf/elemental 2014-02-25 10:47:47 +0000
+++ maps/The Nile.wmf/elemental 2014-10-13 11:34:08 +0000
@@ -9,5 +9,34 @@
name=_"The Nile"
author="Einstein13"
descr=_"The river has always provided food and communication. This time, eight empires will fight for control over this land."
-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)"
tags="official,seafaring,1v1,2teams,3teams,4teams"
+
+[teams00]
+team1=0
+team2=1
+# blue vs. red
+
+[teams01]
+team1=2
+team2=3
+# yellow vs. green
+
+[teams02]
+team1=0,2
+team2=1,3
+# (blue, yellow) vs. (red, green)
+
+[teams03]
+team1=3,5,7
+team2=2,4,6
+# (green, orange, white) vs. (yellow, black, purple)
+
+[teams04]
+team1=0,3,5
+team2=1,2,4
+# (blue, orange, green) vs. (red, yellow, black)
+
+[teams05]
+team1=0,3,5,7
+team2=1,2,4,6
+# (blue, green, orange, white) vs. (red, yellow, black, purple)
=== modified file 'maps/Trident of Fire.wmf/elemental'
--- maps/Trident of Fire.wmf/elemental 2014-02-25 10:47:47 +0000
+++ maps/Trident of Fire.wmf/elemental 2014-10-13 11:34:08 +0000
@@ -11,3 +11,23 @@
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."
hint=_"Suggested teams: red vs. green | (blue, yellow) vs. (green, orange) | (blue, black) vs. (green, red) | (blue, black, yellow) vs. (green, red, orange)"
tags="official,seafaring,1v1,2teams,3teams"
+
+[teams00]
+team1=1
+team2=3
+# red vs. green
+
+[teams01]
+team1=0,2
+team2=3,5
+# (blue, yellow) vs. (green, orange)
+
+[teams02]
+team1=0,4
+team2=3,1
+# (blue, black) vs. (green, red)
+
+[teams03]
+team1=0,4,2
+team2=3,1,5
+# (blue, black, yellow) vs. (green, red, orange)
=== removed directory 'po/mp_scenario_together_we_re_strong.wmf'
=== removed file 'po/mp_scenario_together_we_re_strong.wmf/ar.po'
--- po/mp_scenario_together_we_re_strong.wmf/ar.po 2014-03-07 05:43:27 +0000
+++ po/mp_scenario_together_we_re_strong.wmf/ar.po 1970-01-01 00:00:00 +0000
@@ -1,43 +0,0 @@
-# Arabic translation for widelands
-# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
-# This file is distributed under the same license as the widelands package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: widelands\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
-"PO-Revision-Date: 2013-10-05 14:30+0000\n"
-"Last-Translator: abdXelrhman <abdXelrhman@xxxxxxxxx>\n"
-"Language-Team: Arabic <ar@xxxxxx>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "Congratulations!"
-msgstr "تهانينا!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "The player who defeats the other player wins the game"
-msgstr "اللاعب الذى يهزم الاخر سيربح اللعبه"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "Together we're strong"
-msgstr "فى اﻹتحاد قوه"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
-msgid "You are defeated!"
-msgstr "خسرت اللعبه!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
-msgid ""
-"You have nothing to command left. If you want, you may continue as spectator."
-msgstr "لم يعد لديك شيء. إذا رغبت فبإمكانك المتابعه فى وضع المشاهدين"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "You have won this game!"
-msgstr "ربحت اللعبه!"
=== removed file 'po/mp_scenario_together_we_re_strong.wmf/ca.po'
--- po/mp_scenario_together_we_re_strong.wmf/ca.po 2014-03-07 05:43:27 +0000
+++ po/mp_scenario_together_we_re_strong.wmf/ca.po 1970-01-01 00:00:00 +0000
@@ -1,43 +0,0 @@
-# Catalan translation for widelands
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the widelands package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: widelands\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
-"PO-Revision-Date: 2012-04-02 20:07+0000\n"
-"Last-Translator: Guybrush88 <Unknown>\n"
-"Language-Team: Catalan <ca@xxxxxx>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "Congratulations!"
-msgstr "Enhorabona!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "The player who defeats the other player wins the game"
-msgstr ""
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "Together we're strong"
-msgstr ""
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
-msgid "You are defeated!"
-msgstr ""
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
-msgid ""
-"You have nothing to command left. If you want, you may continue as spectator."
-msgstr ""
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "You have won this game!"
-msgstr ""
=== removed file 'po/mp_scenario_together_we_re_strong.wmf/cs.po'
--- po/mp_scenario_together_we_re_strong.wmf/cs.po 2014-03-07 05:43:27 +0000
+++ po/mp_scenario_together_we_re_strong.wmf/cs.po 1970-01-01 00:00:00 +0000
@@ -1,45 +0,0 @@
-# Czech translation for widelands
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the widelands package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: widelands\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
-"PO-Revision-Date: 2012-02-18 21:32+0000\n"
-"Last-Translator: Marek Donar <markus7cz@xxxxxxxxx>\n"
-"Language-Team: Czech <cs@xxxxxx>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "Congratulations!"
-msgstr "Gratulujeme!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "The player who defeats the other player wins the game"
-msgstr "Zvítězí hráč, který porazí ostatní hráče"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "Together we're strong"
-msgstr "V jednotě je síla"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
-msgid "You are defeated!"
-msgstr "Byl jsi poražen!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
-msgid ""
-"You have nothing to command left. If you want, you may continue as spectator."
-msgstr ""
-"Nezbylo ti už nic, co bys mohl ovládat. Pokud chceš, zůstaň ve hře jako "
-"pozorovatel."
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "You have won this game!"
-msgstr "Vyhrál jsi tuto hru!"
=== removed file 'po/mp_scenario_together_we_re_strong.wmf/de.po'
--- po/mp_scenario_together_we_re_strong.wmf/de.po 2014-03-07 05:43:27 +0000
+++ po/mp_scenario_together_we_re_strong.wmf/de.po 1970-01-01 00:00:00 +0000
@@ -1,45 +0,0 @@
-# German translation for widelands
-# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
-# This file is distributed under the same license as the widelands package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: widelands\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
-"PO-Revision-Date: 2014-02-11 18:19+0000\n"
-"Last-Translator: Mirian Margiani <mirian.margiani@xxxxxxxxx>\n"
-"Language-Team: German <de@xxxxxx>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "Congratulations!"
-msgstr "Herzlichen Glückwunsch!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "The player who defeats the other player wins the game"
-msgstr "Der Spieler, der den anderen Spieler besiegt, gewinnt das Spiel."
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "Together we're strong"
-msgstr "Zusammen sind wir stark"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
-msgid "You are defeated!"
-msgstr "Du wurdest besiegt!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
-msgid ""
-"You have nothing to command left. If you want, you may continue as spectator."
-msgstr ""
-"Du hast nichts mehr zu kommandieren. Wenn du möchtest, kannst du als "
-"Zuschauer fortfahren."
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "You have won this game!"
-msgstr "Du hast dieses Spiel gewonnen!"
=== removed file 'po/mp_scenario_together_we_re_strong.wmf/en_GB.po'
--- po/mp_scenario_together_we_re_strong.wmf/en_GB.po 2014-03-07 05:43:27 +0000
+++ po/mp_scenario_together_we_re_strong.wmf/en_GB.po 1970-01-01 00:00:00 +0000
@@ -1,44 +0,0 @@
-# English (United Kingdom) translation for widelands
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the widelands package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: widelands\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
-"PO-Revision-Date: 2012-09-19 16:03+0000\n"
-"Last-Translator: Biffaboy <Unknown>\n"
-"Language-Team: English (United Kingdom) <en_GB@xxxxxx>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "Congratulations!"
-msgstr "Congratulations!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "The player who defeats the other player wins the game"
-msgstr "The player who defeats the other player wins the game"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "Together we're strong"
-msgstr "Together we're strong"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
-msgid "You are defeated!"
-msgstr "You are defeated!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
-msgid ""
-"You have nothing to command left. If you want, you may continue as spectator."
-msgstr ""
-"You have nothing to command left. If you want, you may continue as spectator."
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "You have won this game!"
-msgstr "You have won this game!"
=== removed file 'po/mp_scenario_together_we_re_strong.wmf/eo.po'
--- po/mp_scenario_together_we_re_strong.wmf/eo.po 2014-03-07 05:43:27 +0000
+++ po/mp_scenario_together_we_re_strong.wmf/eo.po 1970-01-01 00:00:00 +0000
@@ -1,43 +0,0 @@
-# Esperanto translation for widelands
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the widelands package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: widelands\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
-"PO-Revision-Date: 2012-03-05 18:49+0000\n"
-"Last-Translator: Michael Moroni <michael.moroni@xxxxxxxxxx>\n"
-"Language-Team: Esperanto <eo@xxxxxx>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "Congratulations!"
-msgstr "Gratulojn!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "The player who defeats the other player wins the game"
-msgstr "La ludanto, kiu venkis la alian ludanton, gajnis"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "Together we're strong"
-msgstr "Kune ni fortas"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
-msgid "You are defeated!"
-msgstr "Vi estas venkita!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
-msgid ""
-"You have nothing to command left. If you want, you may continue as spectator."
-msgstr "Nenio regenda restas. Se vi volas, vi povas daŭrigi kiel spektanto."
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "You have won this game!"
-msgstr "Vi gajnis!"
=== removed file 'po/mp_scenario_together_we_re_strong.wmf/es.po'
--- po/mp_scenario_together_we_re_strong.wmf/es.po 2014-03-07 05:43:27 +0000
+++ po/mp_scenario_together_we_re_strong.wmf/es.po 1970-01-01 00:00:00 +0000
@@ -1,44 +0,0 @@
-# Spanish translation for widelands
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the widelands package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: widelands\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
-"PO-Revision-Date: 2012-01-22 01:57+0000\n"
-"Last-Translator: MadkaT <Unknown>\n"
-"Language-Team: Spanish <es@xxxxxx>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "Congratulations!"
-msgstr "¡Felicitaciones!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "The player who defeats the other player wins the game"
-msgstr "El jugador que derrote al otro jugador gana el juego"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "Together we're strong"
-msgstr "Juntos somos más fuertes"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
-msgid "You are defeated!"
-msgstr "Fuiste derrotado!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
-msgid ""
-"You have nothing to command left. If you want, you may continue as spectator."
-msgstr ""
-"No tienes nada por hacer. Si quieres, puedes continuar como espectador."
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "You have won this game!"
-msgstr "Has ganado este juego!"
=== removed file 'po/mp_scenario_together_we_re_strong.wmf/eu.po'
--- po/mp_scenario_together_we_re_strong.wmf/eu.po 2014-03-07 05:43:27 +0000
+++ po/mp_scenario_together_we_re_strong.wmf/eu.po 1970-01-01 00:00:00 +0000
@@ -1,45 +0,0 @@
-# Basque translation for widelands
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the widelands package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: widelands\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
-"PO-Revision-Date: 2012-04-30 10:48+0000\n"
-"Last-Translator: Mikel Alzibar <mikelalzibar@xxxxxxxxx>\n"
-"Language-Team: Basque <eu@xxxxxx>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "Congratulations!"
-msgstr "Zorionak!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "The player who defeats the other player wins the game"
-msgstr "Beste jokalaria garaitzen duenak irabazten du jokoa"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "Together we're strong"
-msgstr "Batera indartsuak gara"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
-msgid "You are defeated!"
-msgstr "Garaitua izan zara!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
-msgid ""
-"You have nothing to command left. If you want, you may continue as spectator."
-msgstr ""
-"Ez da ezer geratzen agindu dezakezunik. Nahi baduzu ikusle bezela jarrai "
-"dezakezu."
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "You have won this game!"
-msgstr "Jokoa irabazi duzu!"
=== removed file 'po/mp_scenario_together_we_re_strong.wmf/fi.po'
--- po/mp_scenario_together_we_re_strong.wmf/fi.po 2014-03-07 05:43:27 +0000
+++ po/mp_scenario_together_we_re_strong.wmf/fi.po 1970-01-01 00:00:00 +0000
@@ -1,43 +0,0 @@
-# Finnish translation for widelands
-# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
-# This file is distributed under the same license as the widelands package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: widelands\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
-"PO-Revision-Date: 2013-08-03 10:40+0000\n"
-"Last-Translator: Markus Hallfors <destroyerko@xxxxxxxxx>\n"
-"Language-Team: Finnish <fi@xxxxxx>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "Congratulations!"
-msgstr "Onneksi olkoon!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "The player who defeats the other player wins the game"
-msgstr ""
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "Together we're strong"
-msgstr "Yhdessä olemme vahvoja"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
-msgid "You are defeated!"
-msgstr ""
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
-msgid ""
-"You have nothing to command left. If you want, you may continue as spectator."
-msgstr ""
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "You have won this game!"
-msgstr "Olet voittanut tämä pelin!"
=== removed file 'po/mp_scenario_together_we_re_strong.wmf/fr.po'
--- po/mp_scenario_together_we_re_strong.wmf/fr.po 2014-03-07 05:43:27 +0000
+++ po/mp_scenario_together_we_re_strong.wmf/fr.po 1970-01-01 00:00:00 +0000
@@ -1,45 +0,0 @@
-# French translation for widelands
-# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
-# This file is distributed under the same license as the widelands package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: widelands\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
-"PO-Revision-Date: 2011-12-05 23:29+0000\n"
-"Last-Translator: bouchard renaud <Unknown>\n"
-"Language-Team: French <fr@xxxxxx>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "Congratulations!"
-msgstr "Félicitations !"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "The player who defeats the other player wins the game"
-msgstr "Le joueur qui vaincra les autres remportera la partie"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "Together we're strong"
-msgstr "Ensemble nous sommes forts"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
-msgid "You are defeated!"
-msgstr "Vous êtes vaincu !"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
-msgid ""
-"You have nothing to command left. If you want, you may continue as spectator."
-msgstr ""
-"Il ne vous reste plus de troupes à commander. Si vous le souhaitez, vous "
-"pouvez continuer en tant que spectateur."
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "You have won this game!"
-msgstr "Vous avez gagné cette partie !"
=== removed file 'po/mp_scenario_together_we_re_strong.wmf/gd.po'
--- po/mp_scenario_together_we_re_strong.wmf/gd.po 2014-03-07 05:43:27 +0000
+++ po/mp_scenario_together_we_re_strong.wmf/gd.po 1970-01-01 00:00:00 +0000
@@ -1,47 +0,0 @@
-# Gaelic; Scottish translation for widelands
-# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
-# This file is distributed under the same license as the widelands package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
-# GunChleoc <fios@xxxxxxxxxxxxxxxxxxx>, 2013.
-msgid ""
-msgstr ""
-"Project-Id-Version: widelands\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
-"PO-Revision-Date: 2013-10-09 20:43+0000\n"
-"Last-Translator: GunChleoc <Unknown>\n"
-"Language-Team: Fòram na Gàidhlig http://www.foramnagaidhlig.net\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
-"Language: gd\n"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "Congratulations!"
-msgstr "Meal do naidheachd!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "The player who defeats the other player wins the game"
-msgstr ""
-"Buanaichidh an cluicheadair a bheir buaidh air a' chluicheadair eile an geama"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "Together we're strong"
-msgstr "Làidir còmhla"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
-msgid "You are defeated!"
-msgstr "Chaidh ruaig a chur ort!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
-msgid ""
-"You have nothing to command left. If you want, you may continue as spectator."
-msgstr ""
-"Chan eil dad ri òrdachadh air fhàgail dhut. Faodaidh tu leantainn air adhart "
-"'nad amharc ma thogras tu."
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "You have won this game!"
-msgstr "Bhuannaich thu an geama seo!"
=== removed file 'po/mp_scenario_together_we_re_strong.wmf/hr.po'
--- po/mp_scenario_together_we_re_strong.wmf/hr.po 2014-03-07 05:43:27 +0000
+++ po/mp_scenario_together_we_re_strong.wmf/hr.po 1970-01-01 00:00:00 +0000
@@ -1,44 +0,0 @@
-# Croatian translation for widelands
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the widelands package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: widelands\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
-"PO-Revision-Date: 2012-03-30 17:16+0000\n"
-"Last-Translator: Mario Dautović <mario.dautovic@xxxxxxxxx>\n"
-"Language-Team: Croatian <hr@xxxxxx>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "Congratulations!"
-msgstr "Čestitamo!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "The player who defeats the other player wins the game"
-msgstr "Igrač koji porazi drugoga je pobjednik"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "Together we're strong"
-msgstr "Zajedno smo jači"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
-msgid "You are defeated!"
-msgstr "Poraženi smo!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
-msgid ""
-"You have nothing to command left. If you want, you may continue as spectator."
-msgstr ""
-"Nemate više sa čim upravljati. Ako želite, možete ostati kao gledatelj."
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "You have won this game!"
-msgstr "Ti si pobijednik ove partije!"
=== removed file 'po/mp_scenario_together_we_re_strong.wmf/hu.po'
--- po/mp_scenario_together_we_re_strong.wmf/hu.po 2014-03-07 05:43:27 +0000
+++ po/mp_scenario_together_we_re_strong.wmf/hu.po 1970-01-01 00:00:00 +0000
@@ -1,43 +0,0 @@
-# Hungarian translation for widelands
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the widelands package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: widelands\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
-"PO-Revision-Date: 2014-01-09 20:48+0000\n"
-"Last-Translator: cn4ij <Unknown>\n"
-"Language-Team: Hungarian <hu@xxxxxx>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "Congratulations!"
-msgstr "Gratulálunk!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "The player who defeats the other player wins the game"
-msgstr "Amelyik játékos legyőzi a másikat, az nyer."
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "Together we're strong"
-msgstr "Együtt erősek vagyunk"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
-msgid "You are defeated!"
-msgstr "Legyőztek!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
-msgid ""
-"You have nothing to command left. If you want, you may continue as spectator."
-msgstr "Már nincs mit irányítanod. Ha szeretnél, maradhatsz megfigyelőként."
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "You have won this game!"
-msgstr "Megnyerted a játékot!"
=== removed file 'po/mp_scenario_together_we_re_strong.wmf/it.po'
--- po/mp_scenario_together_we_re_strong.wmf/it.po 2014-03-07 05:43:27 +0000
+++ po/mp_scenario_together_we_re_strong.wmf/it.po 1970-01-01 00:00:00 +0000
@@ -1,44 +0,0 @@
-# Italian translation for widelands
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the widelands package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: widelands\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
-"PO-Revision-Date: 2012-01-01 19:54+0000\n"
-"Last-Translator: Guybrush88 <Unknown>\n"
-"Language-Team: Italian <it@xxxxxx>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "Congratulations!"
-msgstr "Congratulazioni!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "The player who defeats the other player wins the game"
-msgstr "Il giocatore che sconfigge l'altro giocatore vince la partita"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "Together we're strong"
-msgstr "Insieme siamo forti"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
-msgid "You are defeated!"
-msgstr "Sei stato sconfitto!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
-msgid ""
-"You have nothing to command left. If you want, you may continue as spectator."
-msgstr ""
-"Non ti è rimasto nulla da comandare. Se vuoi puoi continuare come spettatore."
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "You have won this game!"
-msgstr "Hai vinto questa partita!"
=== removed file 'po/mp_scenario_together_we_re_strong.wmf/ja.po'
--- po/mp_scenario_together_we_re_strong.wmf/ja.po 2014-03-07 05:43:27 +0000
+++ po/mp_scenario_together_we_re_strong.wmf/ja.po 1970-01-01 00:00:00 +0000
@@ -1,43 +0,0 @@
-# Japanese translation for widelands
-# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
-# This file is distributed under the same license as the widelands package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: widelands\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
-"PO-Revision-Date: 2013-10-07 19:28+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Japanese <ja@xxxxxx>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "Congratulations!"
-msgstr ""
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "The player who defeats the other player wins the game"
-msgstr ""
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "Together we're strong"
-msgstr ""
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
-msgid "You are defeated!"
-msgstr ""
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
-msgid ""
-"You have nothing to command left. If you want, you may continue as spectator."
-msgstr ""
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "You have won this game!"
-msgstr ""
=== removed file 'po/mp_scenario_together_we_re_strong.wmf/la.po'
--- po/mp_scenario_together_we_re_strong.wmf/la.po 2014-03-07 05:43:27 +0000
+++ po/mp_scenario_together_we_re_strong.wmf/la.po 1970-01-01 00:00:00 +0000
@@ -1,44 +0,0 @@
-# Latin translation for widelands
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the widelands package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: widelands\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
-"PO-Revision-Date: 2012-03-25 08:19+0000\n"
-"Last-Translator: Sonnrain <Unknown>\n"
-"Language-Team: Latin <la@xxxxxx>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "Congratulations!"
-msgstr "Congratulamur!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "The player who defeats the other player wins the game"
-msgstr "Victor erit hic, qui ludor alios ludores vincit."
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "Together we're strong"
-msgstr "Coniuncti pervigemus"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
-msgid "You are defeated!"
-msgstr "Victus es!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
-msgid ""
-"You have nothing to command left. If you want, you may continue as spectator."
-msgstr ""
-"Nihil, quod praesidere potes, superest. Si vis, spectator perseveras."
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "You have won this game!"
-msgstr "Victor es!"
=== removed file 'po/mp_scenario_together_we_re_strong.wmf/lt.po'
--- po/mp_scenario_together_we_re_strong.wmf/lt.po 2014-06-18 05:43:17 +0000
+++ po/mp_scenario_together_we_re_strong.wmf/lt.po 1970-01-01 00:00:00 +0000
@@ -1,43 +0,0 @@
-# Lithuanian translation for widelands
-# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014
-# This file is distributed under the same license as the widelands package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: widelands\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
-"PO-Revision-Date: 2014-06-17 02:35+0000\n"
-"Last-Translator: Mantas Kriaučiūnas <mantas@xxxxxx>\n"
-"Language-Team: Lithuanian <lt@xxxxxx>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-06-18 05:43+0000\n"
-"X-Generator: Launchpad (build 17045)\n"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "Congratulations!"
-msgstr "Sveikiname!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "The player who defeats the other player wins the game"
-msgstr "Žaidėjas, kuris nugalės kitus, laimės žaidimą"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "Together we're strong"
-msgstr "Kartu mes esame stiprūs"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
-msgid "You are defeated!"
-msgstr ""
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
-msgid ""
-"You have nothing to command left. If you want, you may continue as spectator."
-msgstr ""
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "You have won this game!"
-msgstr "Jūs laimėjote šį žaidimą!"
=== removed file 'po/mp_scenario_together_we_re_strong.wmf/mp_scenario_together_we_re_strong.wmf.pot'
--- po/mp_scenario_together_we_re_strong.wmf/mp_scenario_together_we_re_strong.wmf.pot 2013-09-01 11:45:59 +0000
+++ po/mp_scenario_together_we_re_strong.wmf/mp_scenario_together_we_re_strong.wmf.pot 1970-01-01 00:00:00 +0000
@@ -1,46 +0,0 @@
-# Widelands PATH/TO/FILE.PO
-# Copyright (C) 2005-2013 Widelands Development Team
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Widelands svnVERSION\n"
-"Report-Msgid-Bugs-To: widelands-public@xxxxxxxxxxxxxxxxxxxxx\n"
-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <widelands-public@xxxxxxxxxxxxxxxxxxxxx>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid ""
-"Congratulations!"
-msgstr ""
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid ""
-"The player who defeats the other player wins the game"
-msgstr ""
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid ""
-"Together we're strong"
-msgstr ""
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
-msgid ""
-"You are defeated!"
-msgstr ""
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
-msgid ""
-"You have nothing to command left. If you want, you may continue as spectator."
-msgstr ""
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid ""
-"You have won this game!"
-msgstr ""
-
=== removed file 'po/mp_scenario_together_we_re_strong.wmf/nb.po'
--- po/mp_scenario_together_we_re_strong.wmf/nb.po 2014-03-07 05:43:27 +0000
+++ po/mp_scenario_together_we_re_strong.wmf/nb.po 1970-01-01 00:00:00 +0000
@@ -1,44 +0,0 @@
-# Norwegian Bokmal translation for widelands
-# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
-# This file is distributed under the same license as the widelands package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: widelands\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
-"PO-Revision-Date: 2012-04-08 14:39+0000\n"
-"Last-Translator: Hans Joachim Desserud <Unknown>\n"
-"Language-Team: Norwegian Bokmal <nb@xxxxxx>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "Congratulations!"
-msgstr "Gratulerer!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "The player who defeats the other player wins the game"
-msgstr "Spilleren som beseirer de andre vinner spillet"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "Together we're strong"
-msgstr "Sammen er vi sterke"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
-msgid "You are defeated!"
-msgstr "Du har blitt beseiret!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
-msgid ""
-"You have nothing to command left. If you want, you may continue as spectator."
-msgstr ""
-"Du har ikke noe igjen å styre. Hvis du vil, kan du fortsette som tilskuer."
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "You have won this game!"
-msgstr "Du har vunnet spillet!"
=== removed file 'po/mp_scenario_together_we_re_strong.wmf/nl.po'
--- po/mp_scenario_together_we_re_strong.wmf/nl.po 2014-03-07 05:43:27 +0000
+++ po/mp_scenario_together_we_re_strong.wmf/nl.po 1970-01-01 00:00:00 +0000
@@ -1,45 +0,0 @@
-# Dutch translation for widelands
-# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
-# This file is distributed under the same license as the widelands package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: widelands\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
-"PO-Revision-Date: 2011-12-14 16:09+0000\n"
-"Last-Translator: Foppe Benedictus <Unknown>\n"
-"Language-Team: Dutch <nl@xxxxxx>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "Congratulations!"
-msgstr "Gefeliciteerd!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "The player who defeats the other player wins the game"
-msgstr "De speler die de andere verslaat wint het spel"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "Together we're strong"
-msgstr "Samen staan we sterk"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
-msgid "You are defeated!"
-msgstr "Je bent verslagen!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
-msgid ""
-"You have nothing to command left. If you want, you may continue as spectator."
-msgstr ""
-"U heeft niets meer om te besturen. Als u wilt kunt u verder gaan als "
-"toeschouwer."
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "You have won this game!"
-msgstr "Je hebt het spel gewonnen!"
=== removed file 'po/mp_scenario_together_we_re_strong.wmf/oc.po'
--- po/mp_scenario_together_we_re_strong.wmf/oc.po 2014-03-07 05:43:27 +0000
+++ po/mp_scenario_together_we_re_strong.wmf/oc.po 1970-01-01 00:00:00 +0000
@@ -1,45 +0,0 @@
-# Occitan (post 1500) translation for widelands
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the widelands package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: widelands\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
-"PO-Revision-Date: 2012-11-02 11:04+0000\n"
-"Last-Translator: Cédric VALMARY (Tot en òc) <cvalmary@xxxxxxxx>\n"
-"Language-Team: Occitan (post 1500) <oc@xxxxxx>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "Congratulations!"
-msgstr "Òsca !"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "The player who defeats the other player wins the game"
-msgstr "Lo jogaire que vencerà los autres remportarà la partida"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "Together we're strong"
-msgstr "Amassa sèm fòrts"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
-msgid "You are defeated!"
-msgstr "Sètz vençuts !"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
-msgid ""
-"You have nothing to command left. If you want, you may continue as spectator."
-msgstr ""
-"Vos demòra pas mai de tropas a comandar. Se volètz, podètz contunhar coma "
-"espectator."
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "You have won this game!"
-msgstr "Avètz ganhat aquesta partida !"
=== removed file 'po/mp_scenario_together_we_re_strong.wmf/pl.po'
--- po/mp_scenario_together_we_re_strong.wmf/pl.po 2014-03-07 05:43:27 +0000
+++ po/mp_scenario_together_we_re_strong.wmf/pl.po 1970-01-01 00:00:00 +0000
@@ -1,44 +0,0 @@
-# Polish translation for widelands
-# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
-# This file is distributed under the same license as the widelands package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: widelands\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
-"PO-Revision-Date: 2011-12-06 20:50+0000\n"
-"Last-Translator: Wesmania <ikk_pl@xxxxxxxxxxx>\n"
-"Language-Team: Polish <pl@xxxxxx>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "Congratulations!"
-msgstr "Gratulacje!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "The player who defeats the other player wins the game"
-msgstr "Gracz, który pokona drugiego gracza, wygrywa grę."
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "Together we're strong"
-msgstr "W jedności siła"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
-msgid "You are defeated!"
-msgstr "Pokonano cię!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
-msgid ""
-"You have nothing to command left. If you want, you may continue as spectator."
-msgstr ""
-"Nie masz już czym dowodzić. Jeśli chcesz, możesz kontynuować jako obserwator."
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "You have won this game!"
-msgstr "Zwycięstwo!"
=== removed file 'po/mp_scenario_together_we_re_strong.wmf/pt.po'
--- po/mp_scenario_together_we_re_strong.wmf/pt.po 2014-03-07 05:43:27 +0000
+++ po/mp_scenario_together_we_re_strong.wmf/pt.po 1970-01-01 00:00:00 +0000
@@ -1,74 +0,0 @@
-# Widelands PATH/TO/FILE.PO
-# Copyright (C) 2005-2012 Widelands Development Team
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Widelands svnVERSION\n"
-"Report-Msgid-Bugs-To: widelands-public@xxxxxxxxxxxxxxxxxxxxx\n"
-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
-"PO-Revision-Date: 2013-06-28 14:12+0000\n"
-"Last-Translator: trewe <Unknown>\n"
-"Language-Team: LANGUAGE <widelands-public@xxxxxxxxxxxxxxxxxxxxx>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
-"Language: \n"
-
-#
-# File: ../../maps/MP, line: -1
-# File: Scenarios/Together, line: -1
-# File: we're, line: -1
-# File: strong.wmf/scripting/multiplayer_init.lua, line: 224
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "Congratulations!"
-msgstr "Parabéns!"
-
-#
-# File: ../../maps/MP, line: -1
-# File: Scenarios/Together, line: -1
-# File: we're, line: -1
-# File: strong.wmf/scripting/multiplayer_init.lua, line: 212
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "The player who defeats the other player wins the game"
-msgstr "Quem vencer ao seu adversário vencerá a partida"
-
-#
-# File: ../../maps/MP, line: -1
-# File: Scenarios/Together, line: -1
-# File: we're, line: -1
-# File: strong.wmf/scripting/multiplayer_init.lua, line: 212
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "Together we're strong"
-msgstr "Trabalho em Equipa"
-
-#
-# File: ../../maps/MP, line: -1
-# File: Scenarios/Together, line: -1
-# File: we're, line: -1
-# File: strong.wmf/scripting/multiplayer_init.lua, line: 219
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
-msgid "You are defeated!"
-msgstr "Foste derrotado!"
-
-#
-# File: ../../maps/MP, line: -1
-# File: Scenarios/Together, line: -1
-# File: we're, line: -1
-# File: strong.wmf/scripting/multiplayer_init.lua, line: 220
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
-msgid ""
-"You have nothing to command left. If you want, you may continue as spectator."
-msgstr ""
-"Já não tens nada para comandar. Se quiseres, podes continuar como espectador."
-
-#
-# File: ../../maps/MP, line: -1
-# File: Scenarios/Together, line: -1
-# File: we're, line: -1
-# File: strong.wmf/scripting/multiplayer_init.lua, line: 224
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "You have won this game!"
-msgstr "Venceste o jogo!"
=== removed file 'po/mp_scenario_together_we_re_strong.wmf/pt_BR.po'
--- po/mp_scenario_together_we_re_strong.wmf/pt_BR.po 2014-03-07 05:43:27 +0000
+++ po/mp_scenario_together_we_re_strong.wmf/pt_BR.po 1970-01-01 00:00:00 +0000
@@ -1,45 +0,0 @@
-# Brazilian Portuguese translation for widelands
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the widelands package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: widelands\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
-"PO-Revision-Date: 2012-09-12 01:33+0000\n"
-"Last-Translator: Luiz N <luiz.z@xxxxxxx>\n"
-"Language-Team: Brazilian Portuguese <pt_BR@xxxxxx>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "Congratulations!"
-msgstr "Parabéns!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "The player who defeats the other player wins the game"
-msgstr "O jogador que derrotar outro jogador, será o vencedor do jogo"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "Together we're strong"
-msgstr "Juntos somos mais fortes"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
-msgid "You are defeated!"
-msgstr "Você está derrotado!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
-msgid ""
-"You have nothing to command left. If you want, you may continue as spectator."
-msgstr ""
-"Você não tem nenhum comando na esquerda. Se você quiser, pode continuar como "
-"um espectador."
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "You have won this game!"
-msgstr "Você venceu o jogo!"
=== removed file 'po/mp_scenario_together_we_re_strong.wmf/ru.po'
--- po/mp_scenario_together_we_re_strong.wmf/ru.po 2014-03-07 05:43:27 +0000
+++ po/mp_scenario_together_we_re_strong.wmf/ru.po 1970-01-01 00:00:00 +0000
@@ -1,44 +0,0 @@
-# Russian translation for widelands
-# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
-# This file is distributed under the same license as the widelands package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: widelands\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
-"PO-Revision-Date: 2014-03-06 18:08+0000\n"
-"Last-Translator: Lex <teh.f4ll3n@xxxxxxxxx>\n"
-"Language-Team: Russian <ru@xxxxxx>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "Congratulations!"
-msgstr "Поздравляем!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "The player who defeats the other player wins the game"
-msgstr "Игрок, рагромивший другого игрока, побеждает в игре."
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "Together we're strong"
-msgstr "Вместе мы сильны"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
-msgid "You are defeated!"
-msgstr "Вы разгромлены!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
-msgid ""
-"You have nothing to command left. If you want, you may continue as spectator."
-msgstr ""
-"Вам больше нечем командовать. Если хотите, можете продолжить как наблюдатель."
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "You have won this game!"
-msgstr "Вы победили в этой игре!"
=== removed file 'po/mp_scenario_together_we_re_strong.wmf/sk.po'
--- po/mp_scenario_together_we_re_strong.wmf/sk.po 2014-08-10 05:33:09 +0000
+++ po/mp_scenario_together_we_re_strong.wmf/sk.po 1970-01-01 00:00:00 +0000
@@ -1,43 +0,0 @@
-# Slovak translation for widelands
-# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
-# This file is distributed under the same license as the widelands package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: widelands\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
-"PO-Revision-Date: 2014-08-09 11:47+0000\n"
-"Last-Translator: Miroslav Remák <Unknown>\n"
-"Language-Team: Slovak <sk@xxxxxx>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-08-10 05:33+0000\n"
-"X-Generator: Launchpad (build 17156)\n"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "Congratulations!"
-msgstr "Blahoželáme!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "The player who defeats the other player wins the game"
-msgstr "Hráč, ktorý porazí druhého hráča, vyhráva hru."
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "Together we're strong"
-msgstr "V jednote je sila"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
-msgid "You are defeated!"
-msgstr "Porazili vás!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
-msgid ""
-"You have nothing to command left. If you want, you may continue as spectator."
-msgstr "Už nemáte čomu veliť. Ak chcete, môžete pokračovať ako divák."
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "You have won this game!"
-msgstr "Vyhrali ste túto hru!"
=== removed file 'po/mp_scenario_together_we_re_strong.wmf/sv.po'
--- po/mp_scenario_together_we_re_strong.wmf/sv.po 2014-03-07 05:43:27 +0000
+++ po/mp_scenario_together_we_re_strong.wmf/sv.po 1970-01-01 00:00:00 +0000
@@ -1,45 +0,0 @@
-# Swedish translation for widelands
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the widelands package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: widelands\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
-"PO-Revision-Date: 2012-04-21 07:58+0000\n"
-"Last-Translator: Patrick H. <dajgtre@xxxxxxxxx>\n"
-"Language-Team: Swedish <sv@xxxxxx>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "Congratulations!"
-msgstr "Gratulerar!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "The player who defeats the other player wins the game"
-msgstr "Spelaren som besegrar den andra spelaren winner spelet"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "Together we're strong"
-msgstr "Tillsammans är vi starka"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
-msgid "You are defeated!"
-msgstr "Du är besegrad!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
-msgid ""
-"You have nothing to command left. If you want, you may continue as spectator."
-msgstr ""
-"Du har inget längre som du kan kontrollera. Om du önskar, kan du forsätta "
-"som en obeservatör."
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "You have won this game!"
-msgstr "Du har vunnit matchen!"
=== removed file 'po/mp_scenario_together_we_re_strong.wmf/tr.po'
--- po/mp_scenario_together_we_re_strong.wmf/tr.po 2014-03-07 05:43:27 +0000
+++ po/mp_scenario_together_we_re_strong.wmf/tr.po 1970-01-01 00:00:00 +0000
@@ -1,44 +0,0 @@
-# Turkish translation for widelands
-# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
-# This file is distributed under the same license as the widelands package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: widelands\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
-"PO-Revision-Date: 2013-03-02 17:04+0000\n"
-"Last-Translator: Volkan Gezer <Unknown>\n"
-"Language-Team: Turkish <tr@xxxxxx>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "Congratulations!"
-msgstr "Tebrikler!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "The player who defeats the other player wins the game"
-msgstr "Karşı tarafı yenen oyuncu oyunu kazanır."
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "Together we're strong"
-msgstr "Birlikte güçlüyüz"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
-msgid "You are defeated!"
-msgstr "Bozguna uğradın!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
-msgid ""
-"You have nothing to command left. If you want, you may continue as spectator."
-msgstr ""
-"Verebileceğin komut kalmadı. İstersen izleyici olarak devam edebilirsin."
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "You have won this game!"
-msgstr "Bu oyunu kazandın!"
=== removed file 'po/mp_scenario_together_we_re_strong.wmf/zh_TW.po'
--- po/mp_scenario_together_we_re_strong.wmf/zh_TW.po 2014-03-07 05:43:27 +0000
+++ po/mp_scenario_together_we_re_strong.wmf/zh_TW.po 1970-01-01 00:00:00 +0000
@@ -1,43 +0,0 @@
-# Chinese (Traditional) translation for widelands
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the widelands package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: widelands\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2013-09-01 09:23+0000\n"
-"PO-Revision-Date: 2012-10-29 04:03+0000\n"
-"Last-Translator: poormusic <poormusic2001@xxxxxxxxx>\n"
-"Language-Team: Chinese (Traditional) <zh_TW@xxxxxx>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-07 05:43+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "Congratulations!"
-msgstr "恭喜!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "The player who defeats the other player wins the game"
-msgstr "打敗其他玩家的人就可以贏得此遊戲"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:212
-msgid "Together we're strong"
-msgstr ""
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:219
-msgid "You are defeated!"
-msgstr "你被打敗了!"
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:220
-msgid ""
-"You have nothing to command left. If you want, you may continue as spectator."
-msgstr "你沒有什麼可以命令的了.如果你要的話, 你可以當旁觀者."
-
-#: ../../maps/MP Scenarios/Together we're strong.wmf/scripting/multiplayer_init.lua:224
-msgid "You have won this game!"
-msgstr "你已經贏了!"
=== modified file 'src/ai/defaultai.cc'
--- src/ai/defaultai.cc 2014-10-12 20:55:10 +0000
+++ src/ai/defaultai.cc 2014-10-13 11:34:08 +0000
@@ -3275,8 +3275,7 @@
sum_m += genstats[j - 1].miltary_strength.back();
count_m += 1;
}
-
- assert ( count_l > 0 && count_m > 0 ) ;
+
+ assert(count_l > 0 && count_m > 0);
log(" Average: Landsize: %5d, military strenght: %3d\n", sum_l / count_l, sum_m / count_m);
-
}
=== modified file 'src/base/i18n.cc'
--- src/base/i18n.cc 2014-08-01 12:57:17 +0000
+++ src/base/i18n.cc 2014-10-13 11:34:08 +0000
@@ -325,16 +325,21 @@
result = *it;
}
else if (it == --items.end()) {
- if (listtype == ConcatenateWith::AND) {
+ if (listtype == ConcatenateWith::AMPERSAND) {
/** TRANSLATORS: Concatenate the last 2 items on a list. */
/** TRANSLATORS: RTL languages might want to change the word order here. */
- result = (boost::format(_("%1$s and %2$s")) % result % (*it)).str();
+ result = (boost::format(_("%1$s & %2$s")) % result % (*it)).str();
}
- else {
+ else if (listtype == ConcatenateWith::OR) {
/** TRANSLATORS: Join the last 2 items on a list with "or". */
/** TRANSLATORS: RTL languages might want to change the word order here. */
result = (boost::format(_("%1$s or %2$s")) % result % (*it)).str();
}
+ else {
+ /** TRANSLATORS: Concatenate the last 2 items on a list. */
+ /** TRANSLATORS: RTL languages might want to change the word order here. */
+ result = (boost::format(_("%1$s and %2$s")) % result % (*it)).str();
+ }
}
else {
/** TRANSLATORS: Concatenate 2 items at in the middle of a list. */
=== modified file 'src/base/i18n.h'
--- src/base/i18n.h 2014-08-02 10:14:12 +0000
+++ src/base/i18n.h 2014-10-13 11:34:08 +0000
@@ -56,7 +56,7 @@
// Localize a list of 'items'. The last 2 items are concatenated with "and" or
// "or", depending on 'concatenate_with'.
-enum class ConcatenateWith {AND, OR};
+enum class ConcatenateWith {AND, OR, AMPERSAND};
std::string localize_item_list(const std::vector<std::string>& items, ConcatenateWith concatenate_with);
}
=== modified file 'src/base/time_string.cc'
--- src/base/time_string.cc 2014-10-11 10:04:45 +0000
+++ src/base/time_string.cc 2014-10-13 11:34:08 +0000
@@ -19,13 +19,10 @@
#include "base/time_string.h"
-#include <algorithm>
#include <cassert>
#include <ctime>
#include <string>
-#include <boost/format.hpp>
-#include <boost/regex.hpp>
#include <stdint.h>
#include "base/i18n.h"
@@ -90,52 +87,82 @@
std::string localize_month(int8_t month) {
switch (month) {
+ case 0:
+ /** TRANSLATORS: January. Keep this to 4 letters maximum. */
+ /** TRANSLATORS: Use the "Months - abbreviated - Formatting" definition from the CLDR */
+ /** TRANSLATORS: definition if there is one for your language. */
+ /** TRANSLATORS: http://www.unicode.org/cldr/charts/latest/summary/root.html */
+ return _("Jan");
case 1:
- /** TRANSLATORS: January. Keep this short if you can. */
- return _("Jan");
+ /** TRANSLATORS: February. Keep this to 4 letters maximum. */
+ /** TRANSLATORS: Use the "Months - abbreviated - Formatting" definition from the CLDR */
+ /** TRANSLATORS: definition if there is one for your language. */
+ /** TRANSLATORS: http://www.unicode.org/cldr/charts/latest/summary/root.html */
+ return _("Feb");
case 2:
- /** TRANSLATORS: February. Keep this short if you can. */
- return _("Feb");
+ /** TRANSLATORS: March. Keep this to 4 letters maximum. */
+ /** TRANSLATORS: Use the "Months - abbreviated - Formatting" definition from the CLDR */
+ /** TRANSLATORS: definition if there is one for your language. */
+ /** TRANSLATORS: http://www.unicode.org/cldr/charts/latest/summary/root.html */
+ return _("Mar");
case 3:
- /** TRANSLATORS: March. Keep this short if you can. */
- return _("Mar");
+ /** TRANSLATORS: April. Keep this to 4 letters maximum. */
+ /** TRANSLATORS: Use the "Months - abbreviated - Formatting" definition from the CLDR */
+ /** TRANSLATORS: definition if there is one for your language. */
+ /** TRANSLATORS: http://www.unicode.org/cldr/charts/latest/summary/root.html */
+ return _("Apr");
case 4:
- /** TRANSLATORS: April. Keep this short if you can. */
- return _("Apr");
+ /** TRANSLATORS: May. Keep this to 4 letters maximum. */
+ /** TRANSLATORS: Use the "Months - abbreviated - Formatting" definition from the CLDR */
+ /** TRANSLATORS: definition if there is one for your language. */
+ /** TRANSLATORS: http://www.unicode.org/cldr/charts/latest/summary/root.html */
+ return _("May");
case 5:
- /** TRANSLATORS: May. Keep this short if you can. */
- return _("May");
+ /** TRANSLATORS: June. Keep this to 4 letters maximum. */
+ /** TRANSLATORS: Use the "Months - abbreviated - Formatting" definition from the CLDR */
+ /** TRANSLATORS: definition if there is one for your language. */
+ /** TRANSLATORS: http://www.unicode.org/cldr/charts/latest/summary/root.html */
+ return _("Jun");
case 6:
- /** TRANSLATORS: June. Keep this short if you can. */
- return _("Jun");
+ /** TRANSLATORS: July. Keep this to 4 letters maximum. */
+ /** TRANSLATORS: Use the "Months - abbreviated - Formatting" definition from the CLDR */
+ /** TRANSLATORS: definition if there is one for your language. */
+ /** TRANSLATORS: http://www.unicode.org/cldr/charts/latest/summary/root.html */
+ return _("Jul");
case 7:
- /** TRANSLATORS: July. Keep this short if you can. */
- return _("Jul");
+ /** TRANSLATORS: August. Keep this to 4 letters maximum. */
+ /** TRANSLATORS: Use the "Months - abbreviated - Formatting" definition from the CLDR */
+ /** TRANSLATORS: definition if there is one for your language. */
+ /** TRANSLATORS: http://www.unicode.org/cldr/charts/latest/summary/root.html */
+ return _("Aug");
case 8:
- /** TRANSLATORS: August. Keep this short if you can. */
- return _("Aug");
+ /** TRANSLATORS: September. Keep this to 4 letters maximum. */
+ /** TRANSLATORS: Use the "Months - abbreviated - Formatting" definition from the CLDR */
+ /** TRANSLATORS: definition if there is one for your language. */
+ /** TRANSLATORS: http://www.unicode.org/cldr/charts/latest/summary/root.html */
+ return _("Sep");
case 9:
- /** TRANSLATORS: September. Keep this short if you can. */
- return _("Sep");
+ /** TRANSLATORS: October. Keep this to 4 letters maximum. */
+ /** TRANSLATORS: Use the "Months - abbreviated - Formatting" definition from the CLDR */
+ /** TRANSLATORS: definition if there is one for your language. */
+ /** TRANSLATORS: http://www.unicode.org/cldr/charts/latest/summary/root.html */
+ return _("Oct");
case 10:
- /** TRANSLATORS: October. Keep this short if you can. */
- return _("Oct");
+ /** TRANSLATORS: November. Keep this to 4 letters maximum. */
+ /** TRANSLATORS: Use the "Months - abbreviated - Formatting" definition from the CLDR */
+ /** TRANSLATORS: definition if there is one for your language. */
+ /** TRANSLATORS: http://www.unicode.org/cldr/charts/latest/summary/root.html */
+ return _("Nov");
case 11:
- /** TRANSLATORS: November. Keep this short if you can. */
- return _("Nov");
- case 12:
- /** TRANSLATORS: December. Keep this short if you can. */
+ /** TRANSLATORS: December. Keep this to 4 letters maximum. */
+ /** TRANSLATORS: Use the "Months - abbreviated - Formatting" definition from the CLDR */
+ /** TRANSLATORS: definition if there is one for your language. */
return _("Dec");
default:
return std::to_string(month);
}
}
-// Check if this is a string of the type "YYYY-MM-DDThh.mm.ss"
-bool is_timestring(const std::string& timestring) {
- boost::regex re("\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d\\.\\d\\d\\.\\d\\d.*");
- return boost::regex_match(timestring, re);
-}
char * gamestring_with_leading_zeros(uint32_t gametime)
{
=== modified file 'src/base/time_string.h'
--- src/base/time_string.h 2014-10-11 10:04:45 +0000
+++ src/base/time_string.h 2014-10-13 11:34:08 +0000
@@ -30,12 +30,9 @@
char * timestring();
/// Turn a month number into a short, localized month string,
-/// 1 = "Jan" ... 12 = "Dec"
+/// 0 = "Jan" ... 11 = "Dec"
std::string localize_month(int8_t month);
-/// Returns true if this string starts with "YYYY-MM-DDThh.mm.ss"
-bool is_timestring(const std::string& timestring);
-
/// Get a string representation of the game time as hhh:mm:ss. If Time
/// represents more than 999 hours, it wraps around. Use this in table columns
/// for easy sorting.
=== modified file 'src/editor/tools/editor_info_tool.cc'
--- src/editor/tools/editor_info_tool.cc 2014-09-18 18:52:34 +0000
+++ src/editor/tools/editor_info_tool.cc 2014-10-13 11:34:08 +0000
@@ -119,7 +119,7 @@
// *** Map info
buf += std::string("\n") + _("Map:") + "\n";
- buf += "• " + (boost::format(_("Name: %s")) % map.get_name()).str() + "\n";
+ buf += "• " + (boost::format(_("Name: %s")) % map.get_name().c_str()).str() + "\n";
buf += "• " + (boost::format(_("Size: %1$ix%2$i"))
% map.get_width() % map.get_height()).str() + "\n";
@@ -132,7 +132,7 @@
}
buf += "• " + (boost::format(_("Author: %s")) % map.get_author()).str() + "\n";
- buf += "• " + (boost::format(_("Descr: %s")) % map.get_description()).str() + "\n";
+ buf += "• " + (boost::format(_("Descr: %s")) % map.get_description().c_str()).str() + "\n";
multiline_textarea->set_text(buf.c_str());
=== modified file 'src/editor/ui_menus/editor_main_menu_load_map.cc'
--- src/editor/ui_menus/editor_main_menu_load_map.cc 2014-09-30 05:41:55 +0000
+++ src/editor/ui_menus/editor_main_menu_load_map.cc 2014-10-13 11:34:08 +0000
@@ -75,7 +75,7 @@
posy += 40 + spacing;
new UI::Textarea
- (this, posx, posy, 150, 20, _("Author:"), UI::Align_CenterLeft);
+ (this, posx, posy, 150, 20, _("Authors:"), UI::Align_CenterLeft);
m_author =
new UI::Textarea
(this, posx + descr_label_w, posy, 200, 20, "---", UI::Align_CenterLeft);
@@ -171,7 +171,8 @@
m_name ->set_tooltip(map.get_name());
m_author->set_text(map.get_author());
m_descr ->set_text
- (_(map.get_description()) + (map.get_hint().empty() ? "" : (std::string("\n") + _(map.get_hint()))));
+ (_(map.get_description()) +
+ (map.get_hint().empty() ? "" : (std::string("\n\n") + _(map.get_hint()))));
m_nrplayers->set_text(std::to_string(static_cast<unsigned int>(map.get_nrplayers())));
=== modified file 'src/editor/ui_menus/editor_main_menu_map_options.cc'
--- src/editor/ui_menus/editor_main_menu_map_options.cc 2014-09-30 05:41:55 +0000
+++ src/editor/ui_menus/editor_main_menu_map_options.cc 2014-10-13 11:34:08 +0000
@@ -75,7 +75,7 @@
m_nrplayers =
new UI::Textarea(this, posx + ta->get_w() + spacing, posy - 2, "1");
posy += height + spacing;
- ta = new UI::Textarea(this, posx, posy - 2, _("Author:"));
+ ta = new UI::Textarea(this, posx, posy - 2, _("Authors:"));
m_author =
new UI::EditBox
(this,
@@ -131,9 +131,9 @@
*/
void MainMenuMapOptions::changed(int32_t const id) {
if (id == 0) {
- eia().egbase().map().set_name(m_name->text().c_str());
+ eia().egbase().map().set_name(m_name->text());
} else if (id == 1) {
- eia().egbase().map().set_author(m_author->text().c_str());
+ eia().egbase().map().set_author(m_author->text());
g_options.pull_section("global").set_string
("realname", m_author->text());
}
@@ -144,5 +144,5 @@
* Called when the editbox has changed
*/
void MainMenuMapOptions::editbox_changed() {
- eia().egbase().map().set_description(m_descr->get_text().c_str());
+ eia().egbase().map().set_description(m_descr->get_text());
}
=== modified file 'src/editor/ui_menus/editor_main_menu_save_map.cc'
--- src/editor/ui_menus/editor_main_menu_save_map.cc 2014-09-30 05:41:55 +0000
+++ src/editor/ui_menus/editor_main_menu_save_map.cc 2014-10-13 11:34:08 +0000
@@ -85,7 +85,7 @@
posy += 40 + spacing;
new UI::Textarea
- (this, posx, posy, descr_label_w, 20, _("Author:"), UI::Align_CenterLeft);
+ (this, posx, posy, descr_label_w, 20, _("Authors:"), UI::Align_CenterLeft);
m_author =
new UI::Textarea
(this, posx + descr_label_w, posy, 200, 20, "---", UI::Align_CenterLeft);
@@ -174,7 +174,7 @@
fill_list();
} else { // Ok, save this map
Widelands::Map & map = eia().egbase().map();
- if (!strcmp(map.get_name(), _("No Name"))) {
+ if (map.get_name() != _("No Name")) {
std::string::size_type const filename_size = filename.size();
map.set_name
((4 <= filename_size
=== modified file 'src/game_io/game_preload_packet.cc'
--- src/game_io/game_preload_packet.cc 2014-10-07 10:59:11 +0000
+++ src/game_io/game_preload_packet.cc 2014-10-13 11:34:08 +0000
@@ -69,11 +69,7 @@
if (fs.file_exists(MINIMAP_FILENAME)) {
m_minimap_path = MINIMAP_FILENAME;
}
- m_saveyear = s.get_int("saveyear");
- m_savemonth = s.get_int("savemonth");
- m_saveday = s.get_int("saveday");
- m_savehour = s.get_int("savehour");
- m_saveminute = s.get_int("saveminute");
+ m_savetimestamp = static_cast<time_t>(s.get_natural("savetimestamp"));
m_gametype = static_cast<GameController::GameType>(s.get_natural("gametype"));
} else {
throw GameDataError
@@ -117,15 +113,7 @@
s.set_string("background", map.get_background());
s.set_string("win_condition", game.get_win_condition_displayname());
-
- time_t t;
- time(&t);
- struct tm * datetime = localtime(&t);
- s.set_int("saveyear", 1900 + datetime->tm_year); // years start at 1900
- s.set_int("savemonth", 1 + datetime->tm_mon); // months start at 0
- s.set_int("saveday", datetime->tm_mday);
- s.set_int("savehour", datetime->tm_hour);
- s.set_int("saveminute", datetime->tm_min);
+ s.set_int("savetimestamp", static_cast<uint32_t>(time(nullptr)));
s.set_int("gametype", static_cast<int32_t>(game.game_controller()->get_game_type()));
prof.write("preload", false, fs);
=== modified file 'src/game_io/game_preload_packet.h'
--- src/game_io/game_preload_packet.h 2014-10-07 10:59:11 +0000
+++ src/game_io/game_preload_packet.h 2014-10-13 11:34:08 +0000
@@ -47,11 +47,7 @@
uint8_t get_number_of_players() {return m_number_of_players;}
std::string get_minimap_path() {return m_minimap_path;}
- uint16_t get_saveyear() {return m_saveyear;}
- uint8_t get_savemonth() {return m_savemonth;}
- uint8_t get_saveday() {return m_saveday;}
- uint8_t get_savehour() {return m_savehour;}
- uint8_t get_saveminute() {return m_saveminute;}
+ time_t get_savetimestamp() {return m_savetimestamp;}
GameController::GameType get_gametype() {return m_gametype;}
private:
@@ -62,11 +58,7 @@
uint32_t m_gametime;
uint8_t m_player_nr; // The local player idx
uint8_t m_number_of_players;
- uint16_t m_saveyear;
- uint8_t m_savemonth;
- uint8_t m_saveday;
- uint8_t m_savehour;
- uint8_t m_saveminute;
+ time_t m_savetimestamp;
GameController::GameType m_gametype;
};
=== modified file 'src/logic/game.cc'
--- src/logic/game.cc 2014-10-07 10:59:11 +0000
+++ src/logic/game.cc 2014-10-13 11:34:08 +0000
@@ -139,6 +139,7 @@
m_state (gs_notrunning),
m_cmdqueue (*this),
m_replaywriter (nullptr),
+ /** TRANSLATORS: Win condition for this game has not been set. */
m_win_condition_displayname(_("Not set"))
{
}
=== modified file 'src/logic/map.cc'
--- src/logic/map.cc 2014-09-20 09:37:47 +0000
+++ src/logic/map.cc 2014-10-13 11:34:08 +0000
@@ -73,6 +73,7 @@
m_height (0),
m_pathfieldmgr (new PathfieldManager)
{
+ m_suggested_teams.clear();
}
@@ -317,9 +318,9 @@
*/
void Map::create_empty_map
(const World& world, uint32_t const w, uint32_t const h,
- char const * const name,
- char const * const author,
- char const * const description)
+ const std::string& name,
+ const std::string& author,
+ const std::string& description)
{
set_size(w, h);
set_name (name);
@@ -543,40 +544,40 @@
}
-void Map::set_filename(char const * const string)
-{
- snprintf(m_filename, sizeof(m_filename), "%s", string);
-}
-
-void Map::set_author(char const * const string)
-{
- snprintf(m_author, sizeof(m_author), "%s", string);
-}
-
-void Map::set_name(char const * const string)
-{
- snprintf(m_name, sizeof(m_name), "%s", string);
-}
-
-void Map::set_description(char const * const string)
-{
- snprintf(m_description, sizeof(m_description), "%s", string);
-}
-
-void Map::set_hint(std::string string)
-{
- m_hint = string;
-}
-
-void Map::set_background(char const * const string)
-{
- if (string)
- m_background = string;
- else
+void Map::set_filename(const std::string& filename)
+{
+ m_filename = filename;
+}
+
+void Map::set_author(const std::string& author)
+{
+ m_author = author;
+}
+
+void Map::set_name(const std::string& name)
+{
+ m_name = name;
+}
+
+void Map::set_description(const std::string& description)
+{
+ m_description = description;
+}
+
+void Map::set_hint(const std::string& hint)
+{
+ m_hint = hint;
+}
+
+void Map::set_background(const std::string& image_path)
+{
+ if (image_path.empty())
m_background.clear();
+ else
+ m_background = image_path;
}
-void Map::add_tag(std::string tag) {
+void Map::add_tag(const std::string& tag) {
m_tags.insert(tag);
}
@@ -1646,7 +1647,7 @@
}
} else if (boost::algorithm::ends_with(lower_filename, S2MF_SUFFIX) ||
boost::algorithm::ends_with(lower_filename, S2MF_SUFFIX2)) {
- result.reset(new S2MapLoader(filename.c_str(), *this));
+ result.reset(new S2MapLoader(filename, *this));
}
return result;
}
=== modified file 'src/logic/map.h'
--- src/logic/map.h 2014-09-19 12:54:54 +0000
+++ src/logic/map.h 2014-10-13 11:34:08 +0000
@@ -142,6 +142,9 @@
using PortSpacesSet = std::set<Coords, Coords::OrderingFunctor>;
using Objectives = std::map<std::string, std::unique_ptr<Objective>>;
+ using SuggestedTeam = std::vector<uint16_t>; // Players in a team
+ using SuggestedTeamLineup = std::vector<SuggestedTeam*>; // Recommended teams to play against each other
+
enum { // flags for findpath()
@@ -174,9 +177,9 @@
(const World& world,
uint32_t w = 64,
uint32_t h = 64,
- char const* name = _("No Name"),
- char const* author = _("Unknown"),
- char const* description = _("no description defined"));
+ const std::string& name = _("No Name"),
+ const std::string& author = _("Unknown"),
+ const std::string& description = _("No description defined"));
void recalc_whole_map(const World& world);
virtual void recalc_for_field_area(const World& world, Area<FCoords>);
@@ -190,13 +193,13 @@
return m_starting_pos[p - 1];
}
- void set_filename (char const *);
- void set_author (char const *);
- void set_name (char const *);
- void set_description(char const *);
- void set_hint (std::string);
- void set_background (char const *);
- void add_tag (std::string);
+ void set_filename (const std::string& filename);
+ void set_author (const std::string& author);
+ void set_name (const std::string& name);
+ void set_description(const std::string& description);
+ void set_hint (const std::string& hint);
+ void set_background (const std::string& image_path);
+ void add_tag (const std::string& tag);
void set_scenario_types(ScenarioTypes t) {m_scenario_types = t;}
// Allows access to the filesystem of the map to access auxiliary files.
@@ -204,16 +207,19 @@
FileSystem* filesystem() const;
// informational functions
- const char * get_filename() const {return m_filename;}
- const char * get_author() const {return m_author;}
- const char * get_name() const {return m_name;}
- const char * get_description() const {return m_description;}
- std::string get_hint() const {return m_hint;}
- const std::string & get_background() const {return m_background;}
+ const std::string& get_filename() const {return m_filename;}
+ const std::string& get_author() const {return m_author;}
+ const std::string& get_name() const {return m_name;}
+ const std::string& get_description() const {return m_description;}
+ const std::string& get_hint() const {return m_hint;}
+ const std::string& get_background() const {return m_background;}
+
using Tags = std::set<std::string>;
const Tags & get_tags() const {return m_tags;}
bool has_tag(std::string & s) const {return m_tags.count(s);}
+ const std::vector<SuggestedTeamLineup*>& get_suggested_teams() const {return m_suggested_teams;}
+
PlayerNumber get_nrplayers() const {return m_nrplayers;}
ScenarioTypes scenario_types() const {return m_scenario_types;}
Extent extent() const {return Extent(m_width, m_height);}
@@ -394,13 +400,15 @@
int16_t m_width;
int16_t m_height;
- char m_filename [256];
- char m_author [61];
- char m_name [61];
- char m_description[1024];
+ std::string m_filename;
+ std::string m_author;
+ std::string m_name;
+ std::string m_description;
std::string m_hint;
std::string m_background;
Tags m_tags;
+ std::vector<SuggestedTeamLineup*> m_suggested_teams;
+
std::vector<Coords> m_starting_pos; // players' starting positions
std::unique_ptr<Field[]> m_fields;
=== modified file 'src/map_io/map_elemental_packet.cc'
--- src/map_io/map_elemental_packet.cc 2014-09-19 12:54:54 +0000
+++ src/map_io/map_elemental_packet.cc 2014-10-13 11:34:08 +0000
@@ -20,6 +20,7 @@
#include "map_io/map_elemental_packet.h"
#include <boost/algorithm/string.hpp>
+#include <boost/format.hpp>
#include "base/deprecated.h"
#include "logic/editor_game_base.h"
@@ -47,7 +48,7 @@
map->set_author (s.get_string("author"));
map->set_description(s.get_string("descr"));
map->set_hint (s.get_string("hint", ""));
- map->set_background (s.get_string("background"));
+ map->set_background (s.get_string("background", ""));
old_world_name_ = s.get_string("world", "");
std::string t = s.get_string("tags", "");
@@ -61,6 +62,46 @@
map->add_tag(tn);
}
}
+
+ // Get suggested teams
+ uint16_t team_section_id = 0;
+ std::string teamsection_key = (boost::format("teams%02i") % team_section_id).str();
+ while (Section* teamsection = prof.get_section(teamsection_key.c_str())) {
+
+ // A lineup is made up of teams
+ Map::SuggestedTeamLineup* lineup = new Map::SuggestedTeamLineup();
+
+ uint16_t team_number = 1;
+ std::string team_key = (boost::format("team%i") % team_number).str().c_str();
+ std::string team_string = teamsection->get_string(team_key.c_str(), "");
+ while (!team_string.empty()) {
+
+ // A team is made up of players
+ Map::SuggestedTeam* team = new Map::SuggestedTeam();
+
+ std::vector<std::string> players_string;
+ boost::split(players_string, team_string, boost::is_any_of(","));
+
+ for (const std::string& player: players_string) {
+ uint16_t player_number = static_cast<uint16_t>(atoi(player.c_str()));
+ assert(player_number < MAX_PLAYERS);
+ team->push_back(player_number);
+ }
+
+ lineup->push_back(team);
+
+ // Increase team number
+ ++team_number;
+ team_key = (boost::format("team%i") % team_number).str();
+ team_string = teamsection->get_string(team_key.c_str(), "");
+ }
+
+ map->m_suggested_teams.push_back(lineup);
+
+ // Increase teamsection
+ ++team_section_id;
+ teamsection_key = (boost::format("teams%02i") % team_section_id).str().c_str();
+ }
} else
throw GameDataError
("unknown/unhandled version %i", packet_version);
@@ -93,6 +134,8 @@
s.set_string("author", map.get_author ());
s.set_string("descr", map.get_description());
s.set_string("hint", map.get_hint ());
+ if (!map.get_background().empty())
+ s.set_string("background", map.get_background ());
s.set_string("tags", boost::algorithm::join(map.get_tags(), ","));
prof.write("elemental", false, fs);
=== modified file 'src/map_io/map_loader.h'
--- src/map_io/map_loader.h 2014-09-10 08:55:04 +0000
+++ src/map_io/map_loader.h 2014-10-13 11:34:08 +0000
@@ -36,7 +36,7 @@
/// must be selected.
class MapLoader {
public:
- MapLoader(char const * const filename, Map & M)
+ MapLoader(const std::string& filename, Map & M)
: m_map(M), m_s(STATE_INIT) {m_map.set_filename(filename);}
virtual ~MapLoader() {}
=== modified file 'src/map_io/s2map.cc'
--- src/map_io/s2map.cc 2014-09-20 09:37:47 +0000
+++ src/map_io/s2map.cc 2014-10-13 11:34:08 +0000
@@ -50,12 +50,12 @@
struct S2MapDescrHeader {
char magic[10]; // "WORLD_V1.0"
- char name [20];
+ std::string name;
int16_t w;
int16_t h;
int8_t uses_world; // 0 = green, 1 =black, 2 = winter
int8_t nplayers;
- char author[26];
+ std::string author;
char bulk[2290]; // unknown
} /* size 2352 */;
@@ -308,7 +308,7 @@
} // namespace
-S2MapLoader::S2MapLoader(const char * filename, Widelands::Map & M)
+S2MapLoader::S2MapLoader(const std::string& filename, Widelands::Map& M)
: Widelands::MapLoader(filename, M), m_filename(filename)
{
}
=== modified file 'src/map_io/s2map.h'
--- src/map_io/s2map.h 2014-09-10 08:55:04 +0000
+++ src/map_io/s2map.h 2014-10-13 11:34:08 +0000
@@ -34,7 +34,7 @@
WINTERLAND = 2,
};
- S2MapLoader(const char *, Widelands::Map &);
+ S2MapLoader(const std::string& filename, Widelands::Map& M);
int32_t preload_map(bool) override;
virtual int32_t load_map_complete
=== modified file 'src/network/nethost.cc'
--- src/network/nethost.cc 2014-10-11 16:03:18 +0000
+++ src/network/nethost.cc 2014-10-13 11:34:08 +0000
@@ -901,7 +901,7 @@
if (d->settings.users.at(i).position != UserSettings::not_connected())
if (d->settings.users.at(i).name != d->localplayername) // all names, but the dedicated server
clients.push_back(d->settings.users.at(i).name);
- DedicatedLog::get()->game_start(clients, game.map().get_name());
+ DedicatedLog::get()->game_start(clients, game.map().get_name().c_str());
}
game.run
(loaderUI.get(),
@@ -1314,27 +1314,25 @@
FilenameSet files = g_fs->list_directory(directories.at(directories.size() - 1).c_str());
directories.resize(directories.size() - 1);
Widelands::Map map;
- const FilenameSet & gamefiles = files;
- for (const std::string& temp_filenames : gamefiles) {
- char const * const name = temp_filenames.c_str();
- std::unique_ptr<Widelands::MapLoader> ml = map.get_correct_loader(name);
+ for (const std::string& filename : files) {
+ std::unique_ptr<Widelands::MapLoader> ml = map.get_correct_loader(filename);
if (ml) {
- map.set_filename(name);
+ map.set_filename(filename);
ml->preload_map(true);
DedicatedMapInfos info;
- info.path = name;
+ info.path = filename;
info.players = map.get_nrplayers();
info.scenario = map.scenario_types() & Widelands::Map::MP_SCENARIO;
d->settings.maps.push_back(info);
} else {
if
- (g_fs->is_directory(name)
- &&
- strcmp(FileSystem::fs_filename(name), ".")
- &&
- strcmp(FileSystem::fs_filename(name), ".."))
+ (g_fs->is_directory(filename)
+ &&
+ strcmp(FileSystem::fs_filename(filename.c_str()), ".")
+ &&
+ strcmp(FileSystem::fs_filename(filename.c_str()), ".."))
{
- directories.push_back(name);
+ directories.push_back(filename);
}
}
}
@@ -2660,7 +2658,7 @@
std::unique_ptr<Widelands::MapLoader> ml = map.get_correct_loader(path);
if (ml.get() != nullptr) {
// Yes it is a map file :)
- map.set_filename(path.c_str());
+ map.set_filename(path);
ml->preload_map(true);
d->settings.scenario = scenario;
d->hp.set_map(map.get_name(), path, map.get_nrplayers(), false);
=== modified file 'src/scripting/lua_game.cc'
--- src/scripting/lua_game.cc 2014-10-07 15:45:51 +0000
+++ src/scripting/lua_game.cc 2014-10-13 11:34:08 +0000
@@ -983,12 +983,12 @@
if (o.done()) {
/** TRANSLATORS: File name for saving objective achieved */
- /** TRANSLATORS: %1$s = map name. %2$s = achievement name */
- std::string filename = (boost::format
- (_("%1$s (achieved %2$s)"))
- % get_egbase(L).get_map()->get_name()
- % o.descname().c_str()
- ).str();
+ /** TRANSLATORS: %1% = map name. %2% = achievement name */
+ std::string filename = _("%1% (%2%)");
+ i18n::Textdomain td("maps");
+ filename = (boost::format(filename)
+ % _(get_egbase(L).get_map()->get_name())
+ % o.descname().c_str()).str();
get_game(L).save_handler().request_save(filename);
}
return 0;
=== modified file 'src/ui_basic/multilinetextarea.cc'
--- src/ui_basic/multilinetextarea.cc 2014-09-10 14:48:40 +0000
+++ src/ui_basic/multilinetextarea.cc 2014-10-13 11:34:08 +0000
@@ -198,4 +198,9 @@
m_scrollbar.handle_mousepress(btn, x, y) : false;
}
+void MultilineTextarea::scroll_to_top() {
+ m_scrollbar.set_scrollpos(0);
+ update(0, 0, 0, 0);
+}
+
} // namespace UI
=== modified file 'src/ui_basic/multilinetextarea.h'
--- src/ui_basic/multilinetextarea.h 2014-09-10 14:48:40 +0000
+++ src/ui_basic/multilinetextarea.h 2014-10-13 11:34:08 +0000
@@ -65,6 +65,7 @@
void draw(RenderTarget &) override;
bool handle_mousepress (uint8_t btn, int32_t x, int32_t y) override;
+ void scroll_to_top();
const char * get_font_name() {return m_fontname.c_str();}
int32_t get_font_size() {return m_fontsize;}
=== modified file 'src/ui_basic/table.cc'
--- src/ui_basic/table.cc 2014-09-10 14:48:40 +0000
+++ src/ui_basic/table.cc 2014-10-13 11:34:08 +0000
@@ -52,7 +52,7 @@
m_total_width (0),
m_fontname (UI_FONT_NAME),
m_fontsize (UI_FONT_SIZE_SMALL),
- m_headerheight (15),
+ m_headerheight (UI_FONT_SIZE_SMALL * 8 / 5),
m_lineheight (g_fh->get_fontheight(m_fontname, m_fontsize)),
m_scrollbar (nullptr),
m_scrollpos (0),
=== modified file 'src/ui_basic/table.h'
--- src/ui_basic/table.h 2014-09-14 11:31:58 +0000
+++ src/ui_basic/table.h 2014-10-13 11:34:08 +0000
@@ -187,7 +187,7 @@
void set_font(const std::string & fontname, int32_t const fontsize) {
m_fontname = fontname;
m_fontsize = fontsize;
- m_headerheight = fontsize * 6 / 5;
+ m_headerheight = fontsize * 8 / 5;
}
void sort
=== modified file 'src/ui_fsmenu/CMakeLists.txt'
--- src/ui_fsmenu/CMakeLists.txt 2014-07-16 06:41:27 +0000
+++ src/ui_fsmenu/CMakeLists.txt 2014-10-13 11:34:08 +0000
@@ -6,8 +6,6 @@
campaign_select.h
editor.cc
editor.h
- editor_mapselect.cc
- editor_mapselect.h
fileview.cc
fileview.h
internet_lobby.cc
@@ -20,8 +18,8 @@
launch_spg.h
loadgame.cc
loadgame.h
- loadreplay.cc
- loadreplay.h
+ load_map_or_game.cc
+ load_map_or_game.h
main.cc
main.h
mapselect.cc
@@ -34,6 +32,8 @@
options.h
singleplayer.cc
singleplayer.h
+ suggested_teams_box.cc
+ suggested_teams_box.h
DEPENDS
base_deprecated
base_exceptions
=== modified file 'src/ui_fsmenu/campaign_select.cc'
--- src/ui_fsmenu/campaign_select.cc 2014-09-10 14:08:25 +0000
+++ src/ui_fsmenu/campaign_select.cc 2014-10-13 11:34:08 +0000
@@ -21,6 +21,8 @@
#include <memory>
+#include <boost/format.hpp>
+
#include "base/i18n.h"
#include "base/wexception.h"
#include "graphic/graphic.h"
@@ -40,75 +42,79 @@
* Loads a list of all visible campaigns
*/
FullscreenMenuCampaignSelect::FullscreenMenuCampaignSelect() :
- FullscreenMenuBase("choosemapmenu.jpg"),
-
-// Values for alignment and size
- m_butw (get_w() / 4),
- m_buth (get_h() * 9 / 200),
- m_fs (fs_small()),
- m_fn (ui_fn()),
-
-// Text labels
- title
- (this,
- get_w() / 2, get_h() * 9 / 50,
- _("Select a campaign"), UI::Align_HCenter),
- label_campname
- (this, get_w() * 3 / 5, get_h() * 17 / 50, _("Campaign:")),
- tacampname
- (this, get_w() * 61 / 100, get_h() * 3 / 8, ""),
- label_difficulty
- (this, get_w() * 3 / 5, get_h() * 17 / 40, _("Difficulty:")),
- tadifficulty
- (this, get_w() * 61 / 100, get_h() * 23 / 50, get_w() * 9 / 25, get_h() * 3 / 50, ""),
- label_campdescr
- (this, get_w() * 3 / 5, get_h() * 17 / 32, _("Description:")),
- tacampdescr
- (this,
- get_w() * 61 / 100, get_h() * 45 / 80, get_w() * 9 / 25, get_h() * 7 / 25,
- ""),
-
-// Buttons
- b_ok
- (this, "ok",
- get_w() * 71 / 100, get_h() * 9 / 10, m_butw, m_buth,
- g_gr->images().get("pics/but2.png"),
- _("OK"), std::string(), false, false),
- back
- (this, "back",
- get_w() * 71 / 100, get_h() * 17 / 20, m_butw, m_buth,
- g_gr->images().get("pics/but0.png"),
- _("Back"), std::string(), true, false),
-
-// Campaign list
- m_list
- (this,
- get_w() * 47 / 2500, get_h() * 3417 / 10000,
- get_w() * 711 / 1250, get_h() * 6083 / 10000)
+ FullscreenMenuLoadMapOrGame(),
+
+ // Main Title
+ m_title
+ (this, get_w() / 2, m_tabley / 3,
+ _("Choose a campaign"),
+ UI::Align_HCenter),
+
+ // Campaign description
+ m_label_campname
+ (this, m_right_column_x, m_tabley,
+ "",
+ UI::Align_Left),
+ m_ta_campname(this,
+ m_right_column_x + m_indent, get_y_from_preceding(m_label_campname) + m_padding,
+ get_right_column_w(m_right_column_x) - m_indent, m_label_height),
+
+ m_label_tribename
+ (this, m_right_column_x, get_y_from_preceding(m_ta_campname) + 2 * m_padding,
+ "",
+ UI::Align_Left),
+ m_ta_tribename(this,
+ m_right_column_x + m_indent, get_y_from_preceding(m_label_tribename) + m_padding,
+ get_right_column_w(m_right_column_x + m_indent), m_label_height),
+
+ m_label_difficulty
+ (this, m_right_column_x, get_y_from_preceding(m_ta_tribename) + 2 * m_padding,
+ "",
+ UI::Align_Left),
+ m_ta_difficulty(this,
+ m_right_column_x + m_indent, get_y_from_preceding(m_label_difficulty) + m_padding,
+ get_right_column_w(m_right_column_x + m_indent), 2 * m_label_height - m_padding),
+
+ m_label_description
+ (this, m_right_column_x, get_y_from_preceding(m_ta_difficulty) + 2 * m_padding,
+ _("Description:"),
+ UI::Align_Left),
+ m_ta_description
+ (this,
+ m_right_column_x + m_indent,
+ get_y_from_preceding(m_label_description) + m_padding,
+ get_right_column_w(m_right_column_x + m_indent),
+ m_buty - get_y_from_preceding(m_label_description) - 4 * m_padding)
{
- b_ok.sigclicked.connect
+ m_title.set_textstyle(ts_big());
+ m_back.set_tooltip(_("Return to the main menu"));
+ m_ok.set_tooltip(_("Play this campaign"));
+ m_ta_campname.set_tooltip(_("The name of this campaign"));
+ m_ta_tribename.set_tooltip(_("The tribe you will be playing"));
+ m_ta_difficulty.set_tooltip(_("The difficulty of this campaign"));
+ m_ta_description.set_tooltip(_("Story and hints"));
+
+ m_ok.sigclicked.connect
(boost::bind
(&FullscreenMenuCampaignSelect::clicked_ok, boost::ref(*this)));
- back.sigclicked.connect
+ m_back.sigclicked.connect
(boost::bind
- (&FullscreenMenuCampaignSelect::end_modal, boost::ref(*this), 0));
-
- back.set_font(font_small());
- b_ok.set_font(font_small());
-
- title .set_font(m_fn, fs_big(), UI_FONT_CLR_FG);
- label_campname .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
- tacampname .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
- label_difficulty.set_font(m_fn, m_fs, UI_FONT_CLR_FG);
- tadifficulty .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
- label_campdescr .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
- tacampdescr .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
- m_list.set_font(m_fn, m_fs);
- m_list.selected.connect
- (boost::bind(&FullscreenMenuCampaignSelect::campaign_selected, this, _1));
- m_list.double_clicked.connect
- (boost::bind(&FullscreenMenuCampaignSelect::double_clicked, this, _1));
- fill_list();
+ (&FullscreenMenuCampaignSelect::clicked_back, boost::ref(*this)));
+ m_table.selected.connect
+ (boost::bind(&FullscreenMenuCampaignSelect::entry_selected, this));
+ m_table.double_clicked.connect
+ (boost::bind(&FullscreenMenuCampaignSelect::clicked_ok, boost::ref(*this)));
+
+ /** TRANSLATORS: Campaign difficulty table header */
+ m_table.add_column(45, _("Diff."), _("Difficulty"), UI::Align_Left);
+ m_table.add_column(100, _("Tribe"), _("Tribe Name"), UI::Align_Left);
+ m_table.add_column(m_table.get_w() - 100 - 45, _("Campaign Name"), _("Campaign Name"), UI::Align_Left);
+ m_table.set_column_compare
+ (0,
+ boost::bind(&FullscreenMenuCampaignSelect::compare_difficulty, this, _1, _2));
+ m_table.set_sort_column(0);
+ m_table.focus();
+ fill_table();
}
@@ -127,70 +133,64 @@
}
/// Pictorial descriptions of difficulty levels.
-static char const * const dif_picture_filenames[] = {
+static char const * const difficulty_picture_filenames[] = {
"pics/novalue.png",
"pics/easy.png",
"pics/challenging.png",
"pics/hard.png"
};
-/**
- * an entry of campaignlist got selected.
- */
-void FullscreenMenuCampaignSelect::campaign_selected(uint32_t const i)
+
+bool FullscreenMenuCampaignSelect::set_has_selection()
{
- if (m_list.get_selected()) { // false if the selected entry has no value
- campaign = i;
-
- // enable OK button
- b_ok.set_enabled(true);
-
- // predefine the used variables
- char cname [sizeof("campname4294967296")];
- char cdifficulty [sizeof("campdiff4294967296")];
- char cdif_descr[sizeof("campdiffdescr4294967296")];
- char cdescription[sizeof("campdesc4294967296")];
-
- Profile prof("campaigns/cconfig", nullptr, "maps");
- Section & s = prof.get_safe_section("global");
-
- // add I to basic section name
- sprintf(cname, "campname%u", i);
- sprintf(cdifficulty, "campdiff%u", i);
- sprintf(cdescription, "campdesc%u", i);
- sprintf(cdif_descr, "campdiffdescr%u", i);
-
- s.get_natural(cdifficulty);
-
- std::string dif_description = s.get_string
- (cdif_descr, _("[No value found]"));
-
- tacampname .set_text(s.get_string(cname, _("[No value found]")));
- tadifficulty.set_text(dif_description);
- tacampdescr.set_text(s.get_string(cdescription, _("[No value found]")));
- } else { // normally never here
- b_ok.set_enabled(false);
- tacampname .set_text(_("[Invalid entry]"));
- tadifficulty.set_text("");
- tacampdescr .set_text("");
+ bool has_selection = m_table.has_selection();
+ FullscreenMenuLoadMapOrGame::set_has_selection();
+
+ if (!has_selection) {
+ m_label_campname.set_text(std::string());
+ m_label_tribename.set_text(std::string());
+ m_label_difficulty.set_text(std::string());
+ m_label_description.set_text(std::string());
+
+ m_ta_campname.set_text(std::string());
+ m_ta_tribename.set_text(std::string());
+ m_ta_difficulty.set_text(std::string());
+ m_ta_description.set_text(std::string());
+
+ } else {
+ m_label_campname.set_text(_("Campaign Name:"));
+ m_label_tribename.set_text(_("Tribe:"));
+ m_label_tribename.set_text(_("Difficulty:"));
+ m_label_description.set_text(_("Description:"));
}
+ return has_selection;
}
-/**
- * listbox got double clicked
- */
-void FullscreenMenuCampaignSelect::double_clicked(uint32_t)
+void FullscreenMenuCampaignSelect::entry_selected()
{
- clicked_ok();
+ if (set_has_selection()) {
+ const CampaignListData& campaign_data = m_campaigns_data[m_table.get_selected()];
+ campaign = campaign_data.index;
+
+ m_ta_campname.set_text(campaign_data.name);
+ m_ta_tribename.set_text(campaign_data.tribename);
+ m_ta_difficulty.set_text(campaign_data.difficulty_description);
+ m_ta_description.set_text(campaign_data.description);
+
+ }
+ m_ta_description.scroll_to_top();
}
/**
* fill the campaign list
*/
-void FullscreenMenuCampaignSelect::fill_list()
+void FullscreenMenuCampaignSelect::fill_table()
{
+ m_campaigns_data.clear();
+ m_table.clear();
+
// Read in the campaign config
Profile prof("campaigns/cconfig", nullptr, "maps");
Section & s = prof.get_safe_section("global");
@@ -200,45 +200,75 @@
Profile campvis(cvs.get_path().c_str());
Section & c = campvis.get_safe_section("campaigns");
+ // Predefine variables, used in while-loop
uint32_t i = 0;
-
- // predefine variables, used in while-loop
- char cname [sizeof("campname4294967296")];
- char csection [sizeof("campsect4294967296")];
- char cdifficulty[sizeof("campdiff4294967296")];
-
- sprintf(csection, "campsect%u", i);
- while (s.get_string(csection)) {
- // add i to the other strings the UI will search for
- sprintf(cname, "campname%u", i);
- sprintf(cdifficulty, "campdiff%u", i);
+ std::string csection = (boost::format("campsect%u") % i).str();
+ std::string cname;
+ std::string ctribename;
+ std::string cdifficulty;
+ std::string cdiff_descr;
+ std::string cdescription;
+
+ while (s.get_string(csection.c_str())) {
+
+ cname = (boost::format("campname%u") % i).str();
+ ctribename = (boost::format("camptribe%u") % i).str();
+ cdifficulty = (boost::format("campdiff%u") % i).str();
+ cdiff_descr = (boost::format("campdiffdescr%u") % i).str();
+ cdescription = (boost::format("campdesc%u") % i).str();
// Only list visible campaigns
- if (c.get_bool(csection)) {
+ if (c.get_bool(csection.c_str())) {
- uint32_t dif = s.get_int(cdifficulty);
+ uint32_t difficulty = s.get_int(cdifficulty.c_str());
if
- (sizeof (dif_picture_filenames)
+ (sizeof (difficulty_picture_filenames)
/
- sizeof(*dif_picture_filenames)
+ sizeof(*difficulty_picture_filenames)
<=
- dif)
- dif = 0;
-
- m_list.add
- (s.get_string(cname, _("[No value found]")),
- s.get_string(csection),
- g_gr->images().get(dif_picture_filenames[dif]));
-
+ difficulty) {
+ difficulty = 0;
+ }
+
+ CampaignListData campaign_data;
+
+ campaign_data.index = i;
+ campaign_data.name = s.get_string(cname.c_str(), "");
+ campaign_data.tribename = s.get_string(ctribename.c_str(), "");
+ campaign_data.difficulty = difficulty;
+ campaign_data.difficulty_description = s.get_string(cdiff_descr.c_str(), "");
+ campaign_data.description = s.get_string(cdescription.c_str(), "");
+ m_campaigns_data.push_back(campaign_data);
+
+ UI::Table<uintptr_t>::EntryRecord& tableEntry = m_table.add(i);
+ tableEntry.set_picture(0, g_gr->images().get(difficulty_picture_filenames[difficulty]));
+ tableEntry.set_string(1, campaign_data.tribename);
+ tableEntry.set_string(2, campaign_data.name);
}
+ // Increase counter & csection
++i;
-
- // increase csection
- sprintf(csection, "campsect%u", i);
- } // while (s->get_string(csection))
- if (m_list.size())
- m_list.select(0);
+ csection = (boost::format("campsect%u") % i).str();
+
+ } // while (s.get_string(csection.c_str()))
+ m_table.sort();
+
+ if (m_table.size()) {
+ m_table.select(0);
+ }
+ set_has_selection();
+}
+
+bool FullscreenMenuCampaignSelect::compare_difficulty
+ (uint32_t rowa, uint32_t rowb)
+{
+ const CampaignListData& r1 = m_campaigns_data[m_table[rowa]];
+ const CampaignListData& r2 = m_campaigns_data[m_table[rowb]];
+
+ if (r1.difficulty < r2.difficulty) {
+ return true;
+ }
+ return r1.index < r2.index;
}
@@ -253,76 +283,69 @@
* choose one.
*/
FullscreenMenuCampaignMapSelect::FullscreenMenuCampaignMapSelect() :
- FullscreenMenuBase("choosemapmenu.jpg"),
-
-// Values for alignment and size
- m_butw (get_w() / 4),
- m_buth (get_h() * 9 / 200),
- m_fs (fs_small()),
- m_fn (ui_fn()),
-
-// Text labels
- title
- (this,
- get_w() / 2, get_h() * 9 / 50, _("Choose a map"),
- UI::Align_HCenter),
- label_mapname (this, get_w() * 3 / 5, get_h() * 17 / 50, _("Name:")),
- tamapname (this, get_w() * 61 / 100, get_h() * 3 / 8, ""),
- label_author (this, get_w() * 3 / 5, get_h() * 17 / 40, _("Author:")),
- taauthor (this, get_w() * 61 / 100, get_h() * 23 / 50, ""),
- label_mapdescr(this, get_w() * 3 / 5, get_h() * 51 / 100, _("Description:")),
- tamapdescr
- (this,
- get_w() * 61 / 100, get_h() * 11 / 20, get_w() * 9 / 25, get_h() * 7 / 25),
-
-// Buttons
- b_ok
- (this, "ok",
- get_w() * 71 / 100, get_h() * 9 / 10, m_butw, m_buth,
- g_gr->images().get("pics/but2.png"),
- _("OK"), std::string(), false, false),
- back
- (this, "back",
- get_w() * 71 / 100, get_h() * 17 / 20, m_butw, m_buth,
- g_gr->images().get("pics/but0.png"),
- _("Back"), std::string(), true, false),
-
-// Campaign map list
- m_list
- (this,
- get_w() * 47 / 2500, get_h() * 3417 / 10000,
- get_w() * 711 / 1250, get_h() * 6083 / 10000)
+ FullscreenMenuLoadMapOrGame(),
+
+ // Main title
+ m_title
+ (this, get_w() / 2, m_tabley / 3,
+ _("Choose a scenario"),
+ UI::Align_HCenter),
+ m_subtitle
+ (this, get_w() / 2, get_y_from_preceding(m_title) + 6 * m_padding,
+ "",
+ UI::Align_HCenter),
+
+ // Map description
+ m_label_mapname
+ (this, m_right_column_x, m_tabley,
+ "",
+ UI::Align_Left),
+ m_ta_mapname(this,
+ m_right_column_x + m_indent, get_y_from_preceding(m_label_mapname) + m_padding,
+ get_right_column_w(m_right_column_x + m_indent), m_label_height),
+
+ m_label_author
+ (this,
+ m_right_column_x, get_y_from_preceding(m_ta_mapname) + 2 * m_padding,
+ "",
+ UI::Align_Left),
+ m_ta_author(this,
+ m_right_column_x + m_indent, get_y_from_preceding(m_label_author) + m_padding,
+ get_right_column_w(m_right_column_x + m_indent), m_label_height),
+
+ m_label_description
+ (this, m_right_column_x, get_y_from_preceding(m_ta_author) + 2 * m_padding,
+ "",
+ UI::Align_Left),
+ m_ta_description
+ (this,
+ m_right_column_x + m_indent,
+ get_y_from_preceding(m_label_description) + m_padding,
+ get_right_column_w(m_right_column_x + m_indent),
+ m_buty - get_y_from_preceding(m_label_description) - 4 * m_padding)
{
- b_ok.sigclicked.connect
+ m_title.set_textstyle(ts_big());
+ m_back.set_tooltip(_("Return to the main menu"));
+ m_ok.set_tooltip(_("Play this scenario"));
+ m_ta_mapname.set_tooltip(_("The name of this scenario"));
+ m_ta_description.set_tooltip(_("Story and hints"));
+
+ m_ok.sigclicked.connect
(boost::bind
(&FullscreenMenuCampaignMapSelect::clicked_ok, boost::ref(*this)));
- back.sigclicked.connect
+ m_back.sigclicked.connect
(boost::bind
- (&FullscreenMenuCampaignMapSelect::end_modal, boost::ref(*this), 0));
-
- b_ok.set_font(font_small());
- back.set_font(font_small());
-
- title .set_font(m_fn, fs_big(), UI_FONT_CLR_FG);
- label_mapname .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
- tamapname .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
- label_author .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
- taauthor .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
- label_mapdescr.set_font(m_fn, m_fs, UI_FONT_CLR_FG);
- tamapdescr .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
- m_list.set_font(m_fn, m_fs);
- m_list.selected.connect(boost::bind(&FullscreenMenuCampaignMapSelect::map_selected, this, _1));
- m_list.double_clicked.connect
- (boost::bind(&FullscreenMenuCampaignMapSelect::double_clicked, this, _1));
-}
-
-
-/**
- * OK was clicked, after an entry of maplist got selected.
- */
-void FullscreenMenuCampaignMapSelect::clicked_ok()
-{
- end_modal(1);
+ (&FullscreenMenuCampaignMapSelect::clicked_back, boost::ref(*this)));
+ m_table.selected.connect(boost::bind(&FullscreenMenuCampaignMapSelect::entry_selected, this));
+ m_table.double_clicked.connect
+ (boost::bind(&FullscreenMenuCampaignMapSelect::clicked_ok, boost::ref(*this)));
+
+ /** TRANSLATORS: Campaign scenario number table header */
+ m_table.add_column(35, _("#"), _("The number of this scenario in the campaign"), UI::Align_Left);
+ m_table.add_column(m_table.get_w() - 35, _("Scenario Name"), _("Scenario Name"), UI::Align_Left);
+ m_table.set_sort_column(0);
+
+ m_table.focus();
}
@@ -336,48 +359,64 @@
//have, fill it.
void FullscreenMenuCampaignMapSelect::set_campaign(uint32_t const i) {
campaign = i;
- fill_list();
-}
-
-/**
- * an entry of the maplist got selected.
- */
-void FullscreenMenuCampaignMapSelect::map_selected(uint32_t) {
- campmapfile = m_list.get_selected();
- Widelands::Map map;
-
- std::unique_ptr<Widelands::MapLoader> ml(map.get_correct_loader(campmapfile));
- if (!ml) {
- throw wexception
- (_("Invalid path to file in cconfig: %s"), campmapfile.c_str());
- }
-
- map.set_filename(campmapfile.c_str());
- ml->preload_map(true);
-
- i18n::Textdomain td("maps");
- tamapname .set_text(_(map.get_name()));
- taauthor .set_text(map.get_author());
- tamapdescr.set_text(_(map.get_description()));
-
- // enable OK button
- b_ok.set_enabled(true);
-}
-
-
-/**
- * listbox got double clicked
- */
-void FullscreenMenuCampaignMapSelect::double_clicked(uint32_t)
+ fill_table();
+}
+
+bool FullscreenMenuCampaignMapSelect::set_has_selection()
{
- clicked_ok();
+ bool has_selection = m_table.has_selection();
+ FullscreenMenuLoadMapOrGame::set_has_selection();
+
+ if (!has_selection) {
+ m_label_mapname.set_text(std::string());
+ m_label_author.set_text(std::string());
+ m_label_description.set_text(std::string());
+
+ m_ta_mapname.set_text(std::string());
+ m_ta_author.set_text(std::string());
+ m_ta_description.set_text(std::string());
+
+ } else {
+ m_label_mapname.set_text(_("Scenario:"));
+ m_label_description.set_text(_("Description:"));
+ }
+ return has_selection;
+}
+
+
+void FullscreenMenuCampaignMapSelect::entry_selected() {
+ if (set_has_selection()) {
+ const CampaignScenarioData& scenario_data = m_scenarios_data[m_table.get_selected()];
+ campmapfile = scenario_data.path;
+ Widelands::Map map;
+
+ std::unique_ptr<Widelands::MapLoader> ml(map.get_correct_loader(campmapfile));
+ if (!ml) {
+ throw wexception
+ (_("Invalid path to file in cconfig: %s"), campmapfile.c_str());
+ }
+
+ map.set_filename(campmapfile);
+ ml->preload_map(true);
+
+ MapAuthorData* authors = new MapAuthorData(map.get_author());
+ m_ta_author.set_text(authors->get_names());
+ m_ta_author.set_tooltip(ngettext("The designer of this scenario", "The designers of this scenario",
+ authors->get_number()));
+ m_label_author.set_text(ngettext("Author:", "Authors:", authors->get_number()));
+
+ i18n::Textdomain td("maps");
+ m_ta_mapname.set_text(_(map.get_name()));
+ m_ta_description.set_text(_(map.get_description()));
+ m_ta_description.scroll_to_top();
+ }
}
/**
* fill the campaign-map list
*/
-void FullscreenMenuCampaignMapSelect::fill_list()
+void FullscreenMenuCampaignMapSelect::fill_table()
{
// read in the campaign config
Profile prof("campaigns/cconfig", nullptr, "maps");
@@ -388,40 +427,43 @@
Profile campvis(cvs.get_path().c_str());
Section & c = campvis.get_safe_section("campmaps");
- // Set title of the page
- char cname[sizeof("campname4294967296")];
- sprintf(cname, "campname%u", campaign);
- title.set_text(global_s.get_string(cname));
+ // Set subtitle of the page
+ const std::string campaign_name =
+ global_s.get_string((boost::format("campname%u") % campaign).str().c_str());
+ const std::string campaign_tribe =
+ global_s.get_string((boost::format("camptribe%u") % campaign).str().c_str());
+ m_subtitle.set_text((boost::format("%s — %s") % campaign_tribe % campaign_name).str().c_str());
// Get section of campaign-maps
- char csection[sizeof("campsect4294967296")];
- sprintf(csection, "campsect%u", campaign);
- std::string campsection = global_s.get_string(csection);
- std::string mapsection;
- uint32_t i = 0;
- char number[sizeof("4294967296")];
+ std::string campsection = global_s.get_string((boost::format("campsect%u") % campaign).str().c_str());
// Create the entry we use to load the section of the map
- mapsection = campsection;
- sprintf(number, "%02u", i);
- mapsection += number;
+ uint32_t i = 0;
+ std::string mapsection = campsection + (boost::format("%02i") % i).str();
// Add all visible entries to the list.
while (Section * const s = prof.get_section(mapsection.c_str())) {
if (c.get_bool(mapsection.c_str())) {
- m_list.add
- (s->get_string("name", _("[No value found]")),
- s->get_string("path"),
- g_gr->images().get("pics/ls_wlmap.png"));
+
+ CampaignScenarioData scenario_data;
+ scenario_data.index = i + 1;
+ scenario_data.name = s->get_string("name", "");
+ scenario_data.path = s->get_string("path");
+ m_scenarios_data.push_back(scenario_data);
+
+ UI::Table<uintptr_t>::EntryRecord& tableEntry = m_table.add(i);
+ tableEntry.set_string(0, (boost::format("%u") % scenario_data.index).str());
+ tableEntry.set_picture(1, g_gr->images().get("pics/ls_wlmap.png"), scenario_data.name);
}
+ // Increase counter & mapsection
++i;
+ mapsection = campsection + (boost::format("%02i") % i).str();
+ }
+ m_table.sort();
- // increase mapsection
- mapsection = campsection;
- sprintf(number, "%02u", i);
- mapsection += number;
+ if (m_table.size()) {
+ m_table.select(0);
}
- if (m_list.size())
- m_list.select(0);
+ set_has_selection();
}
=== modified file 'src/ui_fsmenu/campaign_select.h'
--- src/ui_fsmenu/campaign_select.h 2014-09-10 14:48:40 +0000
+++ src/ui_fsmenu/campaign_select.h 2014-10-13 11:34:08 +0000
@@ -24,77 +24,104 @@
#include "ui_basic/button.h"
#include "ui_basic/listselect.h"
#include "ui_basic/multilinetextarea.h"
+#include "ui_basic/table.h"
#include "ui_basic/textarea.h"
+#include "ui_fsmenu/load_map_or_game.h"
/*
* Fullscreen Menu for all Campaigns
*/
+
/*
* UI 1 - Selection of Campaign
*
*/
-struct FullscreenMenuCampaignSelect : public FullscreenMenuBase {
+struct FullscreenMenuCampaignSelect : public FullscreenMenuLoadMapOrGame {
FullscreenMenuCampaignSelect();
- void clicked_back();
- void clicked_ok();
- void campaign_selected(uint32_t);
- void double_clicked(uint32_t);
- void fill_list();
+
int32_t get_campaign();
+protected:
+ void clicked_ok() override;
+ void entry_selected() override;
+ void fill_table() override;
+ bool set_has_selection() override;
+
+
private:
- uint32_t m_butw;
- uint32_t m_buth;
- uint32_t m_fs;
- std::string m_fn;
-
- UI::Textarea title;
- UI::Textarea label_campname;
- UI::Textarea tacampname;
- UI::Textarea label_difficulty;
- UI::MultilineTextarea tadifficulty;
- UI::Textarea label_campdescr;
- UI::MultilineTextarea tacampdescr;
- UI::Button b_ok, back;
- UI::Listselect<const char *> m_list;
+ /**
+ * Data about a campaign that we're interested in.
+ */
+ struct CampaignListData {
+ uint32_t index;
+ std::string name;
+ std::string tribename;
+ uint32_t difficulty;
+ std::string difficulty_description;
+ std::string description;
+
+ CampaignListData() : index(0), difficulty(0) {}
+ };
+
+ bool compare_difficulty(uint32_t, uint32_t);
+
+ UI::Textarea m_title;
+ UI::Textarea m_label_campname;
+ UI::MultilineTextarea m_ta_campname;
+ UI::Textarea m_label_tribename;
+ UI::MultilineTextarea m_ta_tribename;
+ UI::Textarea m_label_difficulty;
+ UI::MultilineTextarea m_ta_difficulty;
+ UI::Textarea m_label_description;
+ UI::MultilineTextarea m_ta_description;
+
+ std::vector<CampaignListData> m_campaigns_data;
/// Variables used for exchange between the two Campaign UIs and
/// Game::run_campaign
- int32_t campaign;
+ int32_t campaign;
};
/*
* UI 2 - Selection of a map
*
*/
-struct FullscreenMenuCampaignMapSelect : public FullscreenMenuBase {
+struct FullscreenMenuCampaignMapSelect : public FullscreenMenuLoadMapOrGame {
FullscreenMenuCampaignMapSelect();
- void clicked_back();
- void clicked_ok();
- void map_selected(uint32_t);
- void double_clicked(uint32_t);
- void fill_list();
+
std::string get_map();
void set_campaign(uint32_t);
+protected:
+ void entry_selected() override;
+ void fill_table() override;
+ bool set_has_selection() override;
+
private:
- uint32_t m_butw;
- uint32_t m_buth;
- uint32_t m_fs;
- std::string m_fn;
-
- UI::Textarea title;
- UI::Textarea label_mapname;
- UI::Textarea tamapname;
- UI::Textarea label_author;
- UI::Textarea taauthor;
- UI::Textarea label_mapdescr;
- UI::MultilineTextarea tamapdescr;
- UI::Button b_ok, back;
- UI::Listselect<std::string> m_list;
- uint32_t campaign;
- std::string campmapfile;
-
+ /**
+ * Data about a campaign scenario that we're interested in.
+ */
+ struct CampaignScenarioData {
+ uint32_t index;
+ std::string name;
+ std::string path;
+
+ CampaignScenarioData() : index(0) {}
+ };
+
+ UI::Textarea m_title;
+ UI::Textarea m_subtitle;
+ UI::Textarea m_label_mapname;
+ UI::MultilineTextarea m_ta_mapname;
+ UI::Textarea m_label_author;
+ UI::MultilineTextarea m_ta_author;
+ UI::Textarea m_label_description;
+ UI::MultilineTextarea m_ta_description;
+
+ uint32_t campaign;
+ std::string campmapfile;
+
+ std::vector<CampaignScenarioData> m_scenarios_data;
};
#endif // end of include guard: WL_UI_FSMENU_CAMPAIGN_SELECT_H
=== removed file 'src/ui_fsmenu/editor_mapselect.cc'
--- src/ui_fsmenu/editor_mapselect.cc 2014-09-30 05:41:55 +0000
+++ src/ui_fsmenu/editor_mapselect.cc 1970-01-01 00:00:00 +0000
@@ -1,264 +0,0 @@
-/*
- * Copyright (C) 2002-2004, 2006-2012 by the Widelands Development Team
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "ui_fsmenu/editor_mapselect.h"
-
-#include <cstdio>
-#include <memory>
-#include <string>
-
-#include <boost/format.hpp>
-
-#include "base/i18n.h"
-#include "base/log.h"
-#include "base/wexception.h"
-#include "graphic/graphic.h"
-#include "io/filesystem/layered_filesystem.h"
-#include "logic/editor_game_base.h"
-#include "logic/map.h"
-#include "map_io/widelands_map_loader.h"
-#include "profile/profile.h"
-#include "wui/text_constants.h"
-
-using Widelands::WidelandsMapLoader;
-
-FullscreenMenuEditorMapSelect::FullscreenMenuEditorMapSelect() :
- FullscreenMenuBase("choosemapmenu.jpg"),
-
-// Values for alignment and size
- m_butw (get_w() / 4),
- m_buth (get_h() * 9 / 200),
- m_fs (fs_small()),
- m_fn (ui_fn()),
-
-// Text labels
- m_title
- (this,
- get_w() / 2, get_h() * 9 / 50,
- _("Choose a map"), UI::Align_HCenter),
- m_label_name
- (this,
- get_w() * 7 / 10, get_h() * 17 / 50,
- _("Name:"), UI::Align_Right),
- m_name (this, get_w() * 71 / 100, get_h() * 17 / 50, std::string()),
- m_label_author
- (this,
- get_w() * 7 / 10, get_h() * 3 / 8,
- _("Author:"), UI::Align_Right),
- m_author (this, get_w() * 71 / 100, get_h() * 3 / 8, std::string()),
- m_label_size
- (this,
- get_w() * 7 / 10, get_h() * 41 / 100,
- _("Size:"), UI::Align_Right),
- m_size (this, get_w() * 71 / 100, get_h() * 41 / 100, std::string()),
- m_label_nr_players
- (this,
- get_w() * 7 / 10, get_h() * 12 / 25,
- _("Players:"), UI::Align_Right),
- m_nr_players (this, get_w() * 71 / 100, get_h() * 12 / 25, std::string()),
- m_label_descr
- (this,
- get_w() * 7 / 10, get_h() * 103 / 200,
- _("Descr:"), UI::Align_Right),
- m_descr
- (this,
- get_w() * 71 / 100, get_h() * 13 / 25, get_w() / 4, get_h() * 63 / 200),
-
-// Buttons
- m_back
- (this, "back",
- get_w() * 71 / 100, get_h() * 17 / 20, m_butw, m_buth,
- g_gr->images().get("pics/but0.png"),
- _("Back"), std::string(), true, false),
- m_ok
- (this, "ok",
- get_w() * 71 / 100, get_h() * 9 / 10, m_butw, m_buth,
- g_gr->images().get("pics/but2.png"),
- _("OK"), std::string(), false, false),
-
-// Map list
- m_list
- (this,
- get_w() * 47 / 2500, get_h() * 3417 / 10000,
- get_w() * 711 / 1250, get_h() * 6083 / 10000),
-
-// Runtime variables
- m_curdir("maps"), m_basedir("maps")
-{
- m_back.sigclicked.connect(boost::bind(&FullscreenMenuEditorMapSelect::end_modal, boost::ref(*this), 0));
- m_ok.sigclicked.connect(boost::bind(&FullscreenMenuEditorMapSelect::ok, boost::ref(*this)));
-
- m_back.set_font(font_small());
- m_ok.set_font(font_small());
-
- m_title .set_font(m_fn, fs_big(), UI_FONT_CLR_FG);
- m_label_name .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
- m_name .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
- m_label_author .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
- m_author .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
- m_label_size .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
- m_size .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
- m_label_nr_players.set_font(m_fn, m_fs, UI_FONT_CLR_FG);
- m_nr_players .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
- m_label_descr .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
- m_descr .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
- m_list .set_font(m_fn, m_fs);
-
- m_list.selected.connect(boost::bind(&FullscreenMenuEditorMapSelect::map_selected, this, _1));
- m_list.double_clicked.connect
- (boost::bind(&FullscreenMenuEditorMapSelect::double_clicked, this, _1));
-
- fill_list();
-}
-
-std::string FullscreenMenuEditorMapSelect::get_map()
-{
- return m_list.has_selection() ? m_list.get_selected() : nullptr;
-}
-
-void FullscreenMenuEditorMapSelect::ok()
-{
- std::string filename(m_list.get_selected());
-
- if
- (g_fs->is_directory(filename.c_str())
- &&
- !WidelandsMapLoader::is_widelands_map(filename))
- {
-
- m_curdir = filename;
- m_list.clear();
- m_mapfiles.clear();
- fill_list();
- } else
- end_modal(1);
-}
-
-
-/**
- * Called when a different entry in the listbox gets selected.
- * When this happens, the information display at the right needs to be
- * refreshed.
- */
-void FullscreenMenuEditorMapSelect::map_selected(uint32_t)
-{
- std::string name = m_list.get_selected();
-
- m_ok.set_enabled(true);
-
- if (!g_fs->is_directory(name) || WidelandsMapLoader::is_widelands_map(name)) {
- Widelands::Map map;
- {
- std::unique_ptr<Widelands::MapLoader> ml = map.get_correct_loader(name);
- ml->preload_map(true); // This has worked before, no problem.
- }
-
- // Translate the map data
- i18n::Textdomain td("maps");
- m_name .set_text(_(map.get_name()));
- m_author.set_text(map.get_author());
- m_descr .set_text
- (_(map.get_description()) + (map.get_hint().empty() ? "" : (std::string("\n") + _(map.get_hint()))));
-
- m_nr_players.set_text(std::to_string(static_cast<unsigned int>(map.get_nrplayers())));
-
- /** TRANSLATORS: These are map coordinates */
- m_size .set_text((boost::format(_("%1$ix%2$i")) % map.get_width() % map.get_height()).str());
- } else {
- m_name .set_text(std::string());
- m_author .set_text(std::string());
- m_descr .set_text(std::string());
- m_nr_players.set_text(std::string());
- m_size .set_text(std::string());
- }
-}
-
-/**
- * listbox got double clicked
- */
-void FullscreenMenuEditorMapSelect::double_clicked(uint32_t) {ok();}
-
-/**
- * fill the file list
- */
-void FullscreenMenuEditorMapSelect::fill_list()
-{
- // Fill it with all files we find.
- m_mapfiles = g_fs->list_directory(m_curdir);
-
- // First, we add all directories. We manually add the parent directory.
- if (m_curdir != m_basedir) {
-#ifndef _WIN32
- m_parentdir = m_curdir.substr(0, m_curdir.rfind('/'));
-#else
- m_parentdir = m_curdir.substr(0, m_curdir.rfind('\\'));
-#endif
- std::string parent_string =
- /** TRANSLATORS: Parent directory */
- (boost::format("\\<%s\\>") % _("parent")).str();
- m_list.add
- (parent_string.c_str(),
- m_parentdir.c_str(),
- g_gr->images().get("pics/ls_dir.png"));
- }
-
- const FilenameSet::const_iterator mapfiles_end = m_mapfiles.end();
- for
- (FilenameSet::const_iterator pname = m_mapfiles.begin();
- pname != mapfiles_end;
- ++pname)
- {
- const char * const name = pname->c_str();
- if
- (strcmp(FileSystem::fs_filename(name), ".") &&
- // Upsy, appeared again. ignore
- strcmp(FileSystem::fs_filename(name), "..") &&
- g_fs->is_directory(name) &&
- !WidelandsMapLoader::is_widelands_map(name))
-
- m_list.add
- (FileSystem::fs_filename(name),
- name,
- g_gr->images().get("pics/ls_dir.png"));
- }
-
- Widelands::Map map;
-
- for
- (FilenameSet::const_iterator pname = m_mapfiles.begin();
- pname != mapfiles_end;
- ++pname)
- {
- char const * const name = pname->c_str();
- std::unique_ptr<Widelands::MapLoader> ml = map.get_correct_loader(name);
- if (ml.get() != nullptr) {
- try {
- ml->preload_map(true);
- m_list.add
- (FileSystem::fs_filename(name),
- name,
- g_gr->images().get
- (dynamic_cast<WidelandsMapLoader*>(ml.get()) ? "pics/ls_wlmap.png" : "pics/ls_s2map.png"));
- } catch (const WException &) {} // we simply skip illegal entries
- }
- }
-
- if (m_list.size())
- m_list.select(0);
-}
=== removed file 'src/ui_fsmenu/editor_mapselect.h'
--- src/ui_fsmenu/editor_mapselect.h 2014-09-14 11:31:58 +0000
+++ src/ui_fsmenu/editor_mapselect.h 1970-01-01 00:00:00 +0000
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2008, 2010 by the Widelands Development Team
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef WL_UI_FSMENU_EDITOR_MAPSELECT_H
-#define WL_UI_FSMENU_EDITOR_MAPSELECT_H
-
-#include "ui_fsmenu/base.h"
-#include "io/filesystem/filesystem.h"
-#include "ui_basic/button.h"
-#include "ui_basic/listselect.h"
-#include "ui_basic/multilinetextarea.h"
-#include "ui_basic/textarea.h"
-
-/**
- * Select a Map in Fullscreen Mode. It's a modal fullscreen menu
- */
-
-struct FullscreenMenuEditorMapSelect : public FullscreenMenuBase {
- FullscreenMenuEditorMapSelect();
-
- std::string get_map();
-
-private:
- void ok();
- void map_selected(uint32_t);
- void changed(bool);
- void double_clicked(uint32_t);
- void fill_list();
-
- uint32_t m_butw;
- uint32_t m_buth;
- uint32_t m_fs;
- std::string m_fn;
-
- UI::Textarea m_title, m_label_name, m_name;
- UI::Textarea m_label_author, m_author, m_label_size;
- UI::Textarea m_size;
- UI::Textarea m_label_nr_players, m_nr_players, m_label_descr;
- UI::MultilineTextarea m_descr;
- UI::Button m_back, m_ok;
- UI::Listselect<std::string> m_list;
- std::string m_parentdir, m_curdir, m_basedir;
- FilenameSet m_mapfiles;
-};
-
-#endif // end of include guard: WL_UI_FSMENU_EDITOR_MAPSELECT_H
=== modified file 'src/ui_fsmenu/launch_mpg.cc'
--- src/ui_fsmenu/launch_mpg.cc 2014-09-30 05:41:55 +0000
+++ src/ui_fsmenu/launch_mpg.cc 2014-10-13 11:34:08 +0000
@@ -117,32 +117,38 @@
m_buth (get_h() * 9 / 200),
m_fs (fs_small()),
m_fn (ui_fn()),
+ // TODO(GunChleoc): We still need to use these consistently. Just getting them in for now
+ // so we can have the SuggestedTeamsBox
+ m_padding(4),
+ m_indent(10),
+ m_label_height(20),
+ m_right_column_x(get_w() * 37 / 50),
// Buttons
m_change_map_or_save
(this, "change_map_or_save",
- get_w() * 37 / 50 + m_butw - m_buth, get_h() * 3 / 20, m_buth, m_buth,
+ m_right_column_x + m_butw - m_buth, get_h() * 3 / 20, m_buth, m_buth,
g_gr->images().get("pics/but1.png"),
g_gr->images().get("pics/menu_toggle_minimap.png"),
_("Change map or saved game"), false, false),
m_ok
(this, "ok",
- get_w() * 37 / 50, get_h() * 12 / 20, m_butw, m_buth,
+ m_right_column_x, get_h() * 12 / 20 - 2 * m_label_height, m_butw, m_buth,
g_gr->images().get("pics/but2.png"),
_("Start game"), std::string(), false, false),
m_back
(this, "back",
- get_w() * 37 / 50, get_h() * 218 / 240, m_butw, m_buth,
+ m_right_column_x, get_h() * 218 / 240, m_butw, m_buth,
g_gr->images().get("pics/but0.png"),
_("Back"), std::string(), true, false),
m_wincondition
(this, "win_condition",
- get_w() * 37 / 50, get_h() * 11 / 20, m_butw, m_buth,
+ m_right_column_x, get_h() * 11 / 20 - 2 * m_label_height, m_butw, m_buth,
g_gr->images().get("pics/but1.png"),
"", std::string(), false, false),
m_help_button
(this, "help",
- get_w() * 37 / 50 + m_butw - m_buth, get_h() / 100, m_buth, m_buth,
+ m_right_column_x + m_butw - m_buth, get_h() / 100, m_buth, m_buth,
g_gr->images().get("pics/but1.png"),
g_gr->images().get("pics/menu_help.png"),
_("Show the help window"), true, false),
@@ -154,7 +160,7 @@
_("Multiplayer Game Setup"), UI::Align_HCenter),
m_mapname
(this,
- get_w() * 37 / 50, get_h() * 3 / 20,
+ m_right_column_x, get_h() * 3 / 20,
std::string()),
m_clients
(this,
@@ -167,15 +173,15 @@
_("Players"), UI::Align_HCenter),
m_map
(this,
- get_w() * 37 / 50, get_h() / 10, m_butw, get_h() / 10,
+ m_right_column_x, get_h() / 10, m_butw, get_h() / 10,
_("Map"), UI::Align_HCenter),
m_wincondition_type
(this,
- get_w() * 37 / 50 + (m_butw / 2), get_h() * 10 / 20,
+ m_right_column_x + (m_butw / 2), get_h() * 10 / 20 - 1.5 * m_label_height,
_("Type of game"), UI::Align_HCenter),
- m_map_info(this, get_w() * 37 / 50, get_h() * 2 / 10, m_butw, get_h() * 23 / 80),
- m_client_info(this, get_w() * 37 / 50, get_h() * 13 / 20, m_butw, get_h() * 5 / 20),
+ m_map_info(this, m_right_column_x, get_h() * 2 / 10, m_butw, get_h() * 23 / 80 - 2 * m_label_height),
+ m_client_info(this, m_right_column_x, get_h() * 13 / 20 - 2 * m_label_height, m_butw, 2 * m_label_height),
m_help(nullptr),
// Variables and objects used in the menu
@@ -234,6 +240,12 @@
m_settings->set_player_number(0);
}
}
+
+ // Y coordinate will be set later, when we know how high this box will get.
+ m_suggested_teams_box = new UI::SuggestedTeamsBox
+ (this, m_right_column_x, 0, UI::Box::Vertical,
+ m_padding, m_indent, m_label_height,
+ get_w() - m_right_column_x, 4 * m_label_height);
}
FullscreenMenuLaunchMPG::~FullscreenMenuLaunchMPG() {
@@ -487,8 +499,7 @@
(format(_("Player %i")) % (settings.playernum + 1)).str()
:
_("Spectator");
- temp = (format(_("At the moment you are %s")) % temp.c_str()).str() + "\n\n";
- temp += _("Click on the ‘?’ in the top right corner to get help.");
+ temp = (format(_("At the moment you are %s")) % temp.c_str()).str();
m_client_info.set_text(temp);
}
@@ -520,7 +531,7 @@
("settings()->scenario was set to true, but no map is available");
Widelands::Map map; // MapLoader needs a place to put its preload data
std::unique_ptr<Widelands::MapLoader> ml(map.get_correct_loader(settings.mapfilename));
- map.set_filename(settings.mapfilename.c_str());
+ map.set_filename(settings.mapfilename);
ml->preload_map(true);
Widelands::PlayerNumber const nrplayers = map.get_nrplayers();
for (uint8_t i = 0; i < nrplayers; ++i) {
@@ -625,13 +636,12 @@
{
Widelands::Map map; // MapLoader needs a place to put its preload data
- char const * const name = m_settings->settings().mapfilename.c_str();
- std::unique_ptr<Widelands::MapLoader> ml = map.get_correct_loader(name);
+ std::unique_ptr<Widelands::MapLoader> ml = map.get_correct_loader(m_settings->settings().mapfilename);
if (!ml) {
throw WLWarning("There was an error!", "The map file seems to be invalid!");
}
- map.set_filename(name);
+ map.set_filename(m_settings->settings().mapfilename);
{
i18n::Textdomain td("maps");
ml->preload_map(true);
@@ -652,6 +662,12 @@
m_map_info.set_text(infotext);
m_filename_proof = m_settings->settings().mapfilename;
+
+ m_suggested_teams_box->hide();
+ m_suggested_teams_box->show(map.get_suggested_teams());
+ m_suggested_teams_box->set_pos(
+ Point(m_suggested_teams_box->get_x(),
+ m_back.get_y() - m_padding - m_suggested_teams_box->get_h() - m_padding));
}
/// Show help
=== modified file 'src/ui_fsmenu/launch_mpg.h'
--- src/ui_fsmenu/launch_mpg.h 2014-09-20 09:37:47 +0000
+++ src/ui_fsmenu/launch_mpg.h 2014-10-13 11:34:08 +0000
@@ -28,7 +28,7 @@
#include "ui_basic/listselect.h"
#include "ui_basic/multilinetextarea.h"
#include "ui_basic/textarea.h"
-
+#include "ui_fsmenu/suggested_teams_box.h"
struct ChatProvider;
struct GameChatPanel;
@@ -77,6 +77,12 @@
uint32_t m_buth;
uint32_t m_fs;
std::string m_fn;
+ // TODO(GunChleoc): We still need to use these consistently. Just getting them in for now
+ // so we can have the SuggestedTeamsBox
+ int32_t const m_padding; // Common padding between panels
+ int32_t const m_indent; // Indent for elements below labels
+ int32_t const m_label_height;
+ int32_t const m_right_column_x;
UI::Button m_change_map_or_save, m_ok, m_back, m_wincondition;
UI::Button m_help_button;
@@ -89,6 +95,8 @@
MultiPlayerSetupGroup * m_mpsg;
std::string m_filename_proof; // local variable to check state
int16_t m_nr_players;
+
+ UI::SuggestedTeamsBox* m_suggested_teams_box;
};
=== modified file 'src/ui_fsmenu/launch_spg.cc'
--- src/ui_fsmenu/launch_spg.cc 2014-09-29 19:25:24 +0000
+++ src/ui_fsmenu/launch_spg.cc 2014-10-13 11:34:08 +0000
@@ -370,7 +370,7 @@
Widelands::Map map; // MapLoader needs a place to put its preload data
std::unique_ptr<Widelands::MapLoader> map_loader(
map.get_correct_loader(m_settings->settings().mapfilename));
- map.set_filename(m_settings->settings().mapfilename.c_str());
+ map.set_filename(m_settings->settings().mapfilename);
map_loader->preload_map(true);
Widelands::PlayerNumber const nrplayers = map.get_nrplayers();
for (uint8_t i = 0; i < nrplayers; ++i) {
=== added file 'src/ui_fsmenu/load_map_or_game.cc'
--- src/ui_fsmenu/load_map_or_game.cc 1970-01-01 00:00:00 +0000
+++ src/ui_fsmenu/load_map_or_game.cc 2014-10-13 11:34:08 +0000
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2002, 2006-2008, 2010-2011, 2013 by the Widelands Development Team
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "ui_fsmenu/load_map_or_game.h"
+
+#include <memory>
+
+#include <boost/algorithm/string.hpp>
+
+#include "base/i18n.h"
+#include "graphic/graphic.h"
+#include "io/filesystem/filesystem.h"
+#include "ui_basic/button.h"
+#include "ui_basic/listselect.h"
+#include "ui_basic/multilinetextarea.h"
+#include "ui_basic/textarea.h"
+
+
+/// Select a Map, Saved Game or Replay in Fullscreen Mode.
+/// This class defines common coordinates for these UI screens.
+/// It also defines common buttons.
+FullscreenMenuLoadMapOrGame::FullscreenMenuLoadMapOrGame(bool sort_descending) :
+ FullscreenMenuBase("choosemapmenu.jpg"),
+
+ // Values for alignment and size
+ m_padding(4),
+ m_indent(10),
+ m_label_height(20),
+ m_tablex(get_w() * 47 / 2500),
+ m_tabley(get_h() * 17 / 50),
+ m_tablew(get_w() * 711 / 1250),
+ m_tableh(get_h() * 6083 / 10000),
+ m_right_column_margin(15),
+ m_right_column_x(m_tablex + m_tablew + m_right_column_margin),
+ m_buty (get_h() * 9 / 10),
+ m_butw ((get_w() - m_right_column_x - m_right_column_margin) / 2 - m_padding),
+ m_buth (get_h() * 9 / 200),
+ m_right_column_tab(get_w() - m_right_column_margin - m_butw),
+
+ // Main buttons
+ m_back
+ (this, "back",
+ m_right_column_x, m_buty, m_butw, m_buth,
+ g_gr->images().get("pics/but0.png"),
+ _("Back"), std::string(), true, false),
+ m_ok
+ (this, "ok",
+ get_w() - m_right_column_margin - m_butw, m_buty, m_butw, m_buth,
+ g_gr->images().get("pics/but2.png"),
+ _("OK"), std::string(), false, false),
+ m_table(this, m_tablex, m_tabley, m_tablew, m_tableh, sort_descending)
+ {}
+
+bool FullscreenMenuLoadMapOrGame::handle_key(bool down, SDL_keysym code) {
+
+ if (!down)
+ return false;
+
+ switch (code.sym)
+ {
+ case SDLK_KP_ENTER:
+ case SDLK_RETURN:
+ clicked_ok();
+ return true;
+ case SDLK_ESCAPE:
+ clicked_back();
+ return true;
+ default:
+ break; // not handled
+ }
+ return FullscreenMenuBase::handle_key(down, code);
+}
+
+
+int32_t FullscreenMenuLoadMapOrGame::get_y_from_preceding(UI::Panel& preceding_panel) {
+ return preceding_panel.get_y() + preceding_panel.get_h();
+}
+
+
+int32_t FullscreenMenuLoadMapOrGame::get_right_column_w(int32_t x) {
+ return get_w() - m_right_column_margin - x;
+}
=== added file 'src/ui_fsmenu/load_map_or_game.h'
--- src/ui_fsmenu/load_map_or_game.h 1970-01-01 00:00:00 +0000
+++ src/ui_fsmenu/load_map_or_game.h 2014-10-13 11:34:08 +0000
@@ -0,0 +1,120 @@
+/*
+ * Copyright (C) 2002, 2006-2008, 2010-2011, 2013 by the Widelands Development Team
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef WL_UI_FSMENU_LOAD_MAP_OR_GAME_H
+#define WL_UI_FSMENU_LOAD_MAP_OR_GAME_H
+
+#include "ui_fsmenu/base.h"
+
+#include <memory>
+
+#include <boost/algorithm/string.hpp>
+
+#include "base/i18n.h"
+#include "graphic/graphic.h"
+#include "io/filesystem/filesystem.h"
+#include "ui_basic/button.h"
+#include "ui_basic/listselect.h"
+#include "ui_basic/multilinetextarea.h"
+#include "ui_basic/table.h"
+#include "ui_basic/textarea.h"
+
+
+namespace Widelands {
+class EditorGameBase;
+class Game;
+class Map;
+class MapLoader;
+}
+class Image;
+class RenderTarget;
+class GameController;
+struct GameSettingsProvider;
+
+/**
+ * Author data for a map or scenario.
+ */
+struct MapAuthorData {
+
+ const std::string& get_names() const {return m_names;}
+ size_t get_number() const {return m_number;}
+
+ // Parses author list string into localized contatenated list string.
+ // Use , as list separator and no whitespaces between author names.
+ explicit MapAuthorData(const std::string& author_list) {
+ std::vector<std::string> authors;
+ boost::split(authors, author_list, boost::is_any_of(","));
+ m_names = localize_item_list(authors, i18n::ConcatenateWith::AMPERSAND);
+ m_number = authors.size();
+ }
+
+private:
+ std::string m_names;
+ size_t m_number;
+};
+
+/// Select a Map, Saved Game or Replay in Fullscreen Mode.
+/// This class defines common coordinates for these UI screens.
+/// It also defines common buttons.
+struct FullscreenMenuLoadMapOrGame : public FullscreenMenuBase {
+ FullscreenMenuLoadMapOrGame(bool sortdesc = false);
+
+ bool handle_key(bool down, SDL_keysym code) override;
+
+protected:
+ virtual void clicked_ok() {end_modal(1);}
+ void clicked_back() {end_modal(0);}
+
+ // Updates the information display on the right-hand side.
+ // Call this function when a different entry in the table gets selected.
+ virtual void entry_selected() {}
+ virtual void fill_table() {}
+
+ // Updates buttons and text labels and returns whether a table entry is selected.
+ virtual bool set_has_selection() {
+ bool has_selection = m_table.has_selection();
+ m_ok.set_enabled(has_selection);
+ return has_selection;
+ }
+
+ // Returns a y coordinate that can be used to position a Panel below the Panel directly above it
+ int32_t get_y_from_preceding(UI::Panel& preceding_panel);
+
+ // Returns the width that a Panel in the right column should have, depending on its x position
+ int32_t get_right_column_w(int32_t x);
+
+ // UI coordinates and spacers
+ int32_t const m_padding; // Common padding between panels
+ int32_t const m_indent; // Indent for elements below labels
+ int32_t const m_label_height;
+ int32_t const m_tablex, m_tabley, m_tablew, m_tableh;
+ int32_t const m_right_column_margin; // X margins of the right column
+ int32_t const m_right_column_x;
+ int32_t const m_buty, m_butw, m_buth; // Button dimensions
+ int32_t const m_right_column_tab;
+
+ // Main buttons
+ UI::Button m_back;
+ UI::Button m_ok;
+
+ UI::Table<uintptr_t const> m_table;
+};
+
+
+#endif // end of include guard: WL_UI_FSMENU_LOAD_MAP_OR_GAME_H
=== modified file 'src/ui_fsmenu/loadgame.cc'
--- src/ui_fsmenu/loadgame.cc 2014-10-11 16:08:10 +0000
+++ src/ui_fsmenu/loadgame.cc 2014-10-13 11:34:08 +0000
@@ -19,10 +19,12 @@
#include "ui_fsmenu/loadgame.h"
+#include <algorithm>
#include <cstdio>
+#include <ctime>
#include <memory>
-#include <string>
+#include <boost/algorithm/string/predicate.hpp>
#include <boost/format.hpp>
#include "base/i18n.h"
@@ -35,345 +37,476 @@
#include "graphic/image_transformations.h"
#include "graphic/in_memory_image.h"
#include "graphic/surface.h"
+#include "helper.h"
#include "io/filesystem/layered_filesystem.h"
#include "logic/game.h"
#include "logic/game_controller.h"
#include "logic/game_settings.h"
+#include "logic/replay.h"
#include "ui_basic/icon.h"
#include "ui_basic/messagebox.h"
#include "wui/text_constants.h"
-
FullscreenMenuLoadGame::FullscreenMenuLoadGame
- (Widelands::Game & g, GameSettingsProvider * gsp, GameController * gc) :
- FullscreenMenuBase("choosemapmenu.jpg"),
-
-// Values for alignment and size
- m_butw (get_w() / 4),
- m_buth (get_h() * 9 / 200),
- m_fs (fs_small()),
- m_fn (ui_fn()),
- m_minimap_max_size(get_w() * 15 / 100),
-
-// "Data holder" for the savegame information
- m_game(g),
-
-// Buttons
- m_back
- (this, "back",
- get_w() * 71 / 100, get_h() * 9 / 10, m_butw, m_buth,
- g_gr->images().get("pics/but0.png"),
- _("Back"), std::string(), true, false),
- m_ok
- (this, "ok",
- get_w() * 71 / 100, get_h() * 31 / 40, m_butw, m_buth,
- g_gr->images().get("pics/but2.png"),
- _("OK"), std::string(), false, false),
- m_delete
- (this, "delete",
- get_w() * 71 / 100, get_h() * 17 / 20, m_butw, m_buth,
- g_gr->images().get("pics/but0.png"),
- _("Delete"), std::string(), false, false),
-
-// Savegame list
- m_list
- (this, get_w() * 47 / 2500, get_h() * 3417 / 10000,
- get_w() * 711 / 1250, get_h() * 6083 / 10000),
-
-// Text areas
+ (Widelands::Game & g, GameSettingsProvider * gsp, GameController * gc, bool is_replay) :
+ FullscreenMenuLoadMapOrGame(true),
+
+ m_is_replay(is_replay),
+ // Main title
m_title
- (this,
- get_w() / 2, get_h() * 3 / 20,
- _("Choose saved game"), UI::Align_HCenter),
+ (this, get_w() / 2, m_tabley / 3,
+ m_is_replay ? _("Choose a replay") : _("Choose a saved game"), UI::Align_HCenter),
+
+ // Savegame description
m_label_mapname
- (this,
- get_w() * 7 / 10, get_h() * 17 / 50,
- _("Map Name:"), UI::Align_Right),
- m_tamapname(this, get_w() * 71 / 100, get_h() * 17 / 50),
+ (this, m_right_column_x, m_tabley, "", UI::Align_Left),
+ m_ta_mapname(this,
+ m_right_column_x + m_indent, get_y_from_preceding(m_label_mapname) + m_padding,
+ get_right_column_w(m_right_column_x + m_indent), 2 * m_label_height - m_padding),
+
m_label_gametime
- (this,
- get_w() * 7 / 10, get_h() * 3 / 8,
- _("Gametime:"), UI::Align_Right),
- m_tagametime(this, get_w() * 71 / 100, get_h() * 3 / 8),
+ (this, m_right_column_x, get_y_from_preceding(m_ta_mapname) + 2 * m_padding,
+ "",
+ UI::Align_Left),
+ m_ta_gametime(this,
+ m_right_column_tab, m_label_gametime.get_y(),
+ get_right_column_w(m_right_column_tab), m_label_height),
+
m_label_players
- (this,
- get_w() * 7 / 10, get_h() * 41 / 100,
- _("Players:"), UI::Align_Right),
- m_ta_players
- (this, get_w() * 71 / 100, get_h() * 41 / 100),
- m_ta_win_condition
- (this, get_w() * 71 / 100, get_h() * 9 / 20),
- m_label_minimap
- (this,
- get_w() * 7 / 10, get_h() * 10 / 20,
- _("Minimap:"), UI::Align_Right),
- m_minimap_icon
- (this, get_w() * 71 / 100, get_h() * 10 / 20,
- m_minimap_max_size, m_minimap_max_size, nullptr),
+ (this, m_right_column_x, get_y_from_preceding(m_ta_gametime),
+ "",
+ UI::Align_Left),
+ m_ta_players(this,
+ m_right_column_tab, m_label_players.get_y(),
+ get_right_column_w(m_right_column_tab), m_label_height),
+
+ m_label_win_condition
+ (this, m_right_column_x, get_y_from_preceding(m_ta_players) + 3 * m_padding,
+ "",
+ UI::Align_Left),
+ m_ta_win_condition(this,
+ m_right_column_x + m_indent, get_y_from_preceding(m_label_win_condition) + m_padding,
+ get_right_column_w(m_right_column_x + m_indent), m_label_height),
+
+ m_delete
+ (this, "delete",
+ m_right_column_x, m_buty - m_buth - 2 * m_padding,
+ m_butw, m_buth,
+ g_gr->images().get("pics/but0.png"),
+ _("Delete"), std::string(), false, false),
+
+ m_minimap_y(get_y_from_preceding(m_ta_win_condition) + 3 * m_padding),
+ m_minimap_w(get_right_column_w(m_right_column_x)),
+ m_minimap_h(m_delete.get_y() - get_y_from_preceding(m_ta_win_condition) - 6 * m_padding),
+ m_minimap_icon(this,
+ m_right_column_x, get_y_from_preceding(m_ta_win_condition) + 3 * m_padding,
+ m_minimap_w, m_minimap_h, nullptr),
+
+ // "Data container" for the savegame information
+ m_game(g),
m_settings(gsp),
m_ctrl(gc)
{
- m_back.sigclicked.connect(boost::bind(&FullscreenMenuLoadGame::end_modal, boost::ref(*this), 0));
+ m_title.set_textstyle(ts_big());
+ m_ta_gametime.set_tooltip(_("The time that elapsed inside this game"));
+ m_ta_players.set_tooltip(_("The number of players"));
+ m_ta_win_condition.set_tooltip(_("The win condition that was set for this game"));
+
+ if (m_is_replay) {
+ m_back.set_tooltip(_("Return to the main menu"));
+ m_ok.set_tooltip(_("Load this replay"));
+ m_ta_mapname.set_tooltip(_("The map that this replay is based on"));
+ m_delete.set_tooltip(_("Delete this replay"));
+ } else {
+ m_back.set_tooltip(_("Return to the single player menu"));
+ m_ok.set_tooltip(_("Load this game"));
+ m_ta_mapname.set_tooltip(_("The map that this game is based on"));
+ m_delete.set_tooltip(_("Delete this game"));
+ }
+ m_minimap_icon.set_visible(false);
+
+ m_back.sigclicked.connect(boost::bind(&FullscreenMenuLoadGame::clicked_back, boost::ref(*this)));
m_ok.sigclicked.connect(boost::bind(&FullscreenMenuLoadGame::clicked_ok, boost::ref(*this)));
m_delete.sigclicked.connect
(boost::bind
(&FullscreenMenuLoadGame::clicked_delete, boost::ref(*this)));
-
- m_back.set_font(font_small());
- m_ok.set_font(font_small());
- m_delete.set_font(font_small());
-
- m_title .set_font(m_fn, fs_big(), UI_FONT_CLR_FG);
- m_label_mapname .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
- m_tamapname .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
- m_label_gametime.set_font(m_fn, m_fs, UI_FONT_CLR_FG);
- m_tagametime .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
- m_label_players .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
- m_ta_players .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
- m_ta_win_condition.set_font(m_fn, m_fs, UI_FONT_CLR_FG);
- m_minimap_icon.set_visible(false);
- m_list .set_font(m_fn, m_fs);
- m_list.selected.connect(boost::bind(&FullscreenMenuLoadGame::map_selected, this, _1));
- m_list.double_clicked.connect(boost::bind(&FullscreenMenuLoadGame::double_clicked, this, _1));
- m_list.focus();
- fill_list();
+ m_table.add_column(130, _("Save Date"), _("The date this game was saved"), UI::Align_Left);
+ if (m_is_replay) {
+ const std::string mode_tooltip_1 =
+ /** TRANSLATORS: Tooltip for the "Mode" column when choosing a game/replay to load. */
+ /** TRANSLATORS: Make sure that you keep consistency in your translation. */
+ _("Game Mode: SP = Single Player, MP = Multiplayer, H = Multiplayer (Host).");
+ const std::string mode_tooltip_2 =
+ _("Numbers are the number of players.");
+
+ m_table.add_column(65,
+ /** TRANSLATORS: Game Mode table column when choosing a game/replay to load. */
+ /** TRANSLATORS: Keep this to 5 letters maximum. */
+ /** TRANSLATORS: A tooltip will explain if you need to use an abbreviation. */
+ _("Mode"),
+ (boost::format("%s %s") % mode_tooltip_1 % mode_tooltip_2).str(),
+ UI::Align_Left);
+ m_table.add_column(m_table.get_w() - 130 - 65,
+ _("Map Name"), _("The name of the map that was played"),
+ UI::Align_Left);
+ } else {
+ m_table.add_column(m_table.get_w() - 130,
+ _("Filename"), _("The filename the game was saved under"),
+ UI::Align_Left);
+ }
+ m_table.set_column_compare
+ (0,
+ boost::bind(&FullscreenMenuLoadGame::compare_date_descending, this, _1, _2));
+ m_table.selected.connect(boost::bind(&FullscreenMenuLoadGame::entry_selected, this));
+ m_table.double_clicked.connect(boost::bind(&FullscreenMenuLoadGame::clicked_ok, boost::ref(*this)));
+ m_table.set_sort_column(0);
+ m_table.focus();
+ fill_table();
}
void FullscreenMenuLoadGame::think()
{
- if (m_ctrl)
+ if (m_ctrl) {
m_ctrl->think();
+ }
+}
+
+// Reverse default sort order for save date column
+bool FullscreenMenuLoadGame::compare_date_descending(uint32_t rowa, uint32_t rowb)
+{
+ const SavegameData & r1 = m_games_data[m_table[rowa]];
+ const SavegameData & r2 = m_games_data[m_table[rowb]];
+
+ return r1.savetimestamp < r2.savetimestamp;
}
void FullscreenMenuLoadGame::clicked_ok()
{
- m_filename = m_list.get_selected();
+ const SavegameData & gamedata = m_games_data[m_table.get_selected()];
+ m_filename = gamedata.filename;
end_modal(1);
}
void FullscreenMenuLoadGame::clicked_delete()
{
- std::string fname = m_list.get_selected();
+ if (!m_table.has_selection()) {
+ return;
+ }
+ const SavegameData & gamedata = m_games_data[m_table.get_selected()];
+
+ std::string message = (boost::format("%s %s\n")
+ % m_label_mapname.get_text() % gamedata.mapname).str();
+
+ message = (boost::format("%s %s %s\n") % message
+ % m_label_win_condition.get_text() % gamedata.wincondition).str();
+
+ message = (boost::format("%s %s %s\n") % message
+ % _("Save Date:") % gamedata.savedatestring).str();
+
+ message = (boost::format("%s %s %s\n") % message
+ % m_label_gametime.get_text() % gametimestring(gamedata.gametime)).str();
+
+ message = (boost::format("%s %s %s\n\n") % message
+ % m_label_players.get_text() % gamedata.nrplayers).str();
+
+ message = (boost::format("%s %s %s\n") % message
+ % _("Filename:") % gamedata.filename).str();
+
+ if (m_is_replay) {
+ message = (boost::format("%s\n\n%s")
+ % _("Do you really want to delete this replay?") % message).str();
+ } else {
+ message = (boost::format("%s\n\n%s")
+ % _("Do you really want to delete this game?") % message).str();
+ }
+
UI::WLMessageBox confirmationBox
- (this,
- _("Delete file"),
- (boost::format(_("Do you really want to delete %s?")) % fname).str(),
- UI::WLMessageBox::YESNO);
+ (this, _("Confirm deleting file"), message, UI::WLMessageBox::YESNO);
if (confirmationBox.run()) {
- g_fs->fs_unlink(m_list.get_selected());
- m_list.clear();
- fill_list();
- if (m_list.empty()) {
- // else fill_list() already selected the first entry
- no_selection();
+ g_fs->fs_unlink(gamedata.filename);
+ if (m_is_replay) {
+ g_fs->fs_unlink(gamedata.filename + WLGF_SUFFIX);
}
- }
-}
-
-/**
- * Update buttons and labels to reflect that no loadable game is selected.
- */
-void FullscreenMenuLoadGame::no_selection()
-{
- m_ok.set_enabled(false);
- m_delete.set_enabled(false);
-
- m_tamapname .set_text(std::string());
- m_tagametime.set_text(std::string());
- m_ta_players.set_text(std::string());
- m_ta_win_condition.set_text(std::string());
- m_minimap_icon.set_icon(nullptr);
- m_minimap_icon.set_visible(false);
- m_minimap_icon.set_no_frame();
- m_minimap_image.reset();
-}
-
-
-void FullscreenMenuLoadGame::map_selected(uint32_t selected)
-{
- if (!m_list.has_selection()) {
- no_selection();
- return;
- }
- const char * const name = m_list.get_selected();
- if (!name) {
- no_selection();
- return;
- }
-
- Widelands::GamePreloadPacket gpdp;
- Widelands::GameLoader gl(name, m_game);
-
- try {
- gl.preload_game(gpdp);
- } catch (const WException & e) {
- if (!m_settings || m_settings->settings().saved_games.empty()) {
- log("Save game '%s' must have changed from under us\nException: %s\n", name, e.what());
- m_list.remove(selected);
- return;
+ fill_table();
+ }
+}
+
+
+bool FullscreenMenuLoadGame::set_has_selection()
+{
+ bool has_selection = m_table.has_selection();
+ FullscreenMenuLoadMapOrGame::set_has_selection();
+ m_delete.set_enabled(has_selection);
+
+ if (!has_selection) {
+ m_label_mapname .set_text(std::string());
+ m_label_gametime.set_text(std::string());
+ m_label_players.set_text(std::string());
+ m_label_win_condition.set_text(std::string());
+
+ m_ta_mapname .set_text(std::string());
+ m_ta_gametime.set_text(std::string());
+ m_ta_players.set_text(std::string());
+ m_ta_win_condition.set_text(std::string());
+ m_minimap_icon.set_icon(nullptr);
+ m_minimap_icon.set_visible(false);
+ m_minimap_icon.set_no_frame();
+ m_minimap_image.reset();
+ } else {
+ m_label_mapname .set_text(_("Map Name:"));
+ m_label_gametime.set_text(_("Gametime:"));
+ m_label_players.set_text(_("Players:"));
+ m_label_win_condition.set_text(_("Win Condition:"));
+ }
+ return has_selection;
+}
+
+
+void FullscreenMenuLoadGame::entry_selected()
+{
+ if (set_has_selection()) {
+
+ const SavegameData & gamedata = m_games_data[m_table.get_selected()];
+
+ m_ta_mapname.set_text(gamedata.mapname);
+ m_ta_gametime.set_text(gametimestring(gamedata.gametime));
+
+ uint8_t number_of_players = gamedata.nrplayers;
+ if (number_of_players > 0) {
+ m_ta_players.set_text((boost::format("%u") % static_cast<unsigned int>(number_of_players)).str());
} else {
- m_ok.set_enabled(true);
- m_delete.set_enabled(false);
- m_tamapname .set_text(_("Savegame from dedicated server"));
- m_tagametime.set_text(_("Unknown gametime"));
- return;
+ m_label_players.set_text("");
+ m_ta_players.set_text("");
}
- }
-
- m_ok.set_enabled(true);
- m_delete.set_enabled(true);
-
- //Try to translate the map name.
- //This will work on every official map as expected
- //and 'fail silently' (not find a translation) for already translated campaign map names.
- //It will also translate 'false-positively' on any user-made map which shares a name with
- //the official maps, but this should not be a problem to worry about.
- {
- i18n::Textdomain td("maps");
- m_tamapname.set_text(_(gpdp.get_mapname()));
- }
-
- uint32_t gametime = gpdp.get_gametime();
- m_tagametime.set_text(gametimestring(gametime));
-
- if (gpdp.get_number_of_players() > 0) {
- m_ta_players.set_text(std::to_string(static_cast<unsigned int>(gpdp.get_number_of_players())));
- } else {
- m_ta_players.set_text(_("Unknown"));
- }
- m_ta_win_condition.set_text(gpdp.get_win_condition());
-
- std::string minimap_path = gpdp.get_minimap_path();
- // Delete former image
- m_minimap_icon.set_icon(nullptr);
- m_minimap_icon.set_visible(false);
- m_minimap_icon.set_no_frame();
- m_minimap_image.reset();
- // Load the new one
- if (!minimap_path.empty()) {
- try {
- // Load the image
- std::unique_ptr<Surface> surface(load_image(
- minimap_path, std::unique_ptr<FileSystem>(g_fs->make_sub_file_system(name)).get()));
- m_minimap_image.reset(new_in_memory_image(std::string(name + minimap_path), surface.release()));
- // Scale it
- double scale = double(m_minimap_max_size) / m_minimap_image->width();
- double scaleY = double(m_minimap_max_size) / m_minimap_image->height();
- if (scaleY < scale) {
- scale = scaleY;
+
+ m_ta_win_condition.set_text(gamedata.wincondition);
+
+ std::string minimap_path = gamedata.minimap_path;
+ // Delete former image
+ m_minimap_icon.set_icon(nullptr);
+ m_minimap_icon.set_visible(false);
+ m_minimap_icon.set_no_frame();
+ m_minimap_image.reset();
+ // Load the new one
+ if (!minimap_path.empty()) {
+ try {
+ // Load the image
+ std::unique_ptr<Surface> surface(
+ load_image(
+ minimap_path,
+ std::unique_ptr<FileSystem>(g_fs->make_sub_file_system(gamedata.filename)).get()));
+
+ m_minimap_image.reset(new_in_memory_image(std::string(gamedata.filename + minimap_path),
+ surface.release()));
+
+ // Scale it
+ double scale = double(m_minimap_w) / m_minimap_image->width();
+ double scaleY = double(m_minimap_h) / m_minimap_image->height();
+ if (scaleY < scale) {
+ scale = scaleY;
+ }
+ if (scale > 1.0) scale = 1.0; // Don't make the image too big; fuzziness will result
+ uint16_t w = scale * m_minimap_image->width();
+ uint16_t h = scale * m_minimap_image->height();
+ const Image* resized = ImageTransformations::resize(m_minimap_image.get(), w, h);
+ // keeps our in_memory_image around and give to icon the one
+ // from resize that is handled by the cache. It is still linked to our
+ // surface
+ m_minimap_icon.set_size(w, h);
+
+ // Center the minimap in the available space
+ int32_t xpos = m_right_column_x + (get_w() - m_right_column_margin - w - m_right_column_x) / 2;
+ int32_t ypos = m_minimap_y;
+
+ // Set small minimaps higher up for a more harmonious look
+ if (h < m_minimap_h * 2 / 3) {
+ ypos += (m_minimap_h - h) / 3;
+ } else {
+ ypos += (m_minimap_h - h) / 2;
+ }
+
+ m_minimap_icon.set_pos(Point(xpos, ypos));
+ m_minimap_icon.set_frame(UI_FONT_CLR_FG);
+ m_minimap_icon.set_visible(true);
+ m_minimap_icon.set_icon(resized);
+ } catch (const std::exception & e) {
+ log("Failed to load the minimap image : %s\n", e.what());
}
- uint16_t w = scale * m_minimap_image->width();
- uint16_t h = scale * m_minimap_image->height();
- const Image* resized = ImageTransformations::resize(m_minimap_image.get(), w, h);
- // keeps our in_memory_image around and give to icon the one
- // from resize that is handled by the cache. It is still linked to our
- // surface
- m_minimap_icon.set_size(w, h);
- m_minimap_icon.set_frame(UI_FONT_CLR_FG);
- m_minimap_icon.set_visible(true);
- m_minimap_icon.set_icon(resized);
- } catch (const std::exception & e) {
- log("Failed to load the minimap image : %s\n", e.what());
}
}
}
-/**
- * Listbox got double clicked
- */
-void FullscreenMenuLoadGame::double_clicked(uint32_t) {
- clicked_ok();
-}
/**
* Fill the file list
*/
-void FullscreenMenuLoadGame::fill_list() {
+void FullscreenMenuLoadGame::fill_table() {
+
+ m_games_data.clear();
+ m_table.clear();
+
+ SavegameData* gamedata = new SavegameData();
+
if (m_settings && !m_settings->settings().saved_games.empty()) {
for (uint32_t i = 0; i < m_settings->settings().saved_games.size(); ++i) {
- const char * path = m_settings->settings().saved_games.at(i).path.c_str();
- m_list.add(FileSystem::filename_without_ext(path).c_str(), path);
+ gamedata->filename = m_settings->settings().saved_games.at(i).path;
+ m_games_data.push_back(*gamedata);
+
+ UI::Table<uintptr_t const>::EntryRecord & te =
+ m_table.add(m_games_data.size() - 1);
+ te.set_string(0, FileSystem::filename_without_ext(gamedata->filename.c_str()).c_str());
}
} else { // Normal case
// Fill it with all files we find.
- m_gamefiles = g_fs->list_directory("save");
+
+ FilenameSet gamefiles;
+
+ if (m_is_replay) {
+ gamefiles = filter(g_fs->list_directory(REPLAY_DIR),
+ [](const std::string& fn) {return boost::ends_with(fn, REPLAY_SUFFIX);});
+ } else {
+ gamefiles = g_fs->list_directory("save");
+ }
Widelands::GamePreloadPacket gpdp;
- const FilenameSet & gamefiles = m_gamefiles;
- for (const std::string& gamefile : gamefiles) {
- char const * const name = gamefile.c_str();
+ for (const std::string& gamefilename : gamefiles) {
+
+ gamedata = new SavegameData();
+
+ std::string savename = gamefilename;
+ if (m_is_replay) savename += WLGF_SUFFIX;
+
+ if (!g_fs->file_exists(savename.c_str())) {
+ continue;
+ }
+
+ gamedata->filename = gamefilename;
try {
- Widelands::GameLoader gl(name, m_game);
+ Widelands::GameLoader gl(savename.c_str(), m_game);
gl.preload_game(gpdp);
- // TODO(GunChleoc): Do something more structured with this information
- // in the ui_fsmenu refactoring branch
- const std::string fs_filename = FileSystem::filename_without_ext(name);
-
- // Begin localization section
- std::string displaytitle = fs_filename;
- if ((is_timestring(fs_filename) || fs_filename == "wl_autosave")
- && gpdp.get_saveyear() > 0
- && gpdp.get_savemonth() > 0
- && gpdp.get_saveday() > 0) {
-
- switch (gpdp.get_gametype()) {
+ gamedata->mapname = gpdp.get_mapname();
+ gamedata->gametime = gpdp.get_gametime();
+ gamedata->nrplayers = gpdp.get_number_of_players();
+
+ gamedata->savetimestamp = gpdp.get_savetimestamp();
+ time_t t;
+ time(&t);
+ struct tm * currenttime = localtime(&t);
+ // We need to put these into variables because of a sideeffect of the localtime function.
+ int8_t current_year = currenttime->tm_year;
+ int8_t current_month = currenttime->tm_mon;
+ int8_t current_day = currenttime->tm_mday;
+
+ struct tm * savedate = localtime(&gamedata->savetimestamp);
+
+ if (gamedata->savetimestamp > 0) {
+ if (savedate->tm_year == current_year &&
+ savedate->tm_mon == current_month &&
+ savedate->tm_mday == current_day) { // Today
+
+ // Adding the 0 padding in a separate statement so translators won't have to deal with it
+ const std::string minute = (boost::format("%02u") % savedate->tm_min).str();
+
+ /** TRANSLATORS: Display date for choosing a savegame/replay */
+ /** TRANSLATORS: hour:minute */
+ gamedata->savedatestring = (boost::format(_("Today, %1%:%2%"))
+ % savedate->tm_hour % minute).str();
+ } else if ((savedate->tm_year == current_year &&
+ savedate->tm_mon == current_month &&
+ savedate->tm_mday == current_day - 1) ||
+ (savedate->tm_year == current_year - 1 &&
+ savedate->tm_mon == 11 && current_month == 0 &&
+ savedate->tm_mday == 31 && current_day == 1)) { // Yesterday
+ // Adding the 0 padding in a separate statement so translators won't have to deal with it
+ const std::string minute = (boost::format("%02u") % savedate->tm_min).str();
+
+ /** TRANSLATORS: Display date for choosing a savegame/replay */
+ /** TRANSLATORS: hour:minute */
+ gamedata->savedatestring = (boost::format(_("Yesterday, %1%:%2%"))
+ % savedate->tm_hour % minute).str();
+ } else { // Older
+
+ /** TRANSLATORS: Display date for choosing a savegame/replay */
+ /** TRANSLATORS: month day, year */
+ gamedata->savedatestring = (boost::format(_("%2% %1%, %3%"))
+ % savedate->tm_mday
+ % localize_month(savedate->tm_mon)
+ % (1900 + savedate->tm_year)).str();
+ }
+ }
+
+ {
+ i18n::Textdomain td("win_conditions");
+ gamedata->wincondition = _(gpdp.get_win_condition());
+ }
+ gamedata->minimap_path = gpdp.get_minimap_path();
+ m_games_data.push_back(*gamedata);
+
+ UI::Table<uintptr_t const>::EntryRecord & te =
+ m_table.add(m_games_data.size() - 1);
+ te.set_string(0, gamedata->savedatestring);
+
+ if (m_is_replay) {
+ gamedata->gametype = gpdp.get_gametype();
+ std::string gametypestring;
+ switch (gamedata->gametype) {
case GameController::GameType::SINGLEPLAYER:
- /** TRANSLATORS: Gametype used in filenames for loading games */
- displaytitle = _("Single Player");
+ /** TRANSLATORS: "Single Player" entry in the Game Mode table column. */
+ /** TRANSLATORS: "Keep this to 6 letters maximum. */
+ /** TRANSLATORS: A tooltip will explain the abbreviation. */
+ /** TRANSLATORS: Make sure that this translation is consistent with the tooltip. */
+ gametypestring = _("SP");
break;
case GameController::GameType::NETHOST:
- /** TRANSLATORS: Gametype used in filenames for loading games */
+ /** TRANSLATORS: "Multiplayer Host" entry in the Game Mode table column. */
+ /** TRANSLATORS: "Keep this to 2 letters maximum. */
+ /** TRANSLATORS: A tooltip will explain the abbreviation. */
+ /** TRANSLATORS: Make sure that this translation is consistent with the tooltip. */
/** TRANSLATORS: %1% is the number of players */
- displaytitle = (boost::format(_("Multiplayer (%1%, Host)"))
- % static_cast<unsigned int>(gpdp.get_number_of_players())).str();
+ gametypestring = (boost::format(_("H (%1%)"))
+ % static_cast<unsigned int>(gamedata->nrplayers)).str();
break;
case GameController::GameType::NETCLIENT:
- /** TRANSLATORS: Gametype used in filenames for loading games */
+ /** TRANSLATORS: "Multiplayer" entry in the Game Mode table column. */
+ /** TRANSLATORS: "Keep this to 2 letters maximum. */
+ /** TRANSLATORS: A tooltip will explain the abbreviation. */
+ /** TRANSLATORS: Make sure that this translation is consistent with the tooltip. */
/** TRANSLATORS: %1% is the number of players */
- displaytitle = (boost::format(_("Multiplayer (%1%)"))
- % static_cast<unsigned int>(gpdp.get_number_of_players())).str();
+ gametypestring = (boost::format(_("MP (%1%)"))
+ % static_cast<unsigned int>(gamedata->nrplayers)).str();
break;
default:
- // TODO(GunChleoc): Localize this
- displaytitle = ("Unknown game type");
+ gametypestring = "";
}
-
- /** TRANSLATORS: Filenames for loading games */
- /** TRANSLATORS: month day, year hour:minute gametype – mapname */
- /** TRANSLATORS: The mapname should always come last, because it */
- /** TRANSLATORS: can be longer than the space we have */
- // TODO(GunChleoc): Localize this
- displaytitle = (boost::format("%1$s %2$u, %3$u %4$u:%5$u %6$s – %7$s")
- % localize_month(gpdp.get_savemonth())
- % static_cast<unsigned int>(gpdp.get_saveday())
- % static_cast<unsigned int>(gpdp.get_saveyear())
- % static_cast<unsigned int>(gpdp.get_savehour())
- % static_cast<unsigned int>(gpdp.get_saveminute())
- % displaytitle
- % gpdp.get_mapname()).str();
-
+ te.set_string(1, gametypestring);
+ te.set_string(2, gpdp.get_mapname());
+
+ } else {
+ const std::string fs_filename = FileSystem::filename_without_ext(gamedata->filename.c_str());
if (fs_filename == "wl_autosave") {
/** TRANSLATORS: Used in filenames for loading games */
- // TODO(GunChleoc): Localize this
- displaytitle = (boost::format(("Autosave: %1%")) % displaytitle).str();
+ te.set_string(1, (boost::format(_("Autosave: %1%")) % gpdp.get_mapname()).str());
+ } else {
+ te.set_string(1, fs_filename);
}
}
- // End localization section
- m_list.add(displaytitle.c_str(), name);
} catch (const WException &) {
// we simply skip illegal entries
}
}
}
+ m_table.sort();
- if (m_list.size())
- m_list.select(0);
+ if (m_table.size()) {
+ m_table.select(0);
+ }
+ set_has_selection();
}
bool FullscreenMenuLoadGame::handle_key(bool down, SDL_keysym code)
@@ -383,35 +516,16 @@
switch (code.sym)
{
- case SDLK_KP2:
- if (code.mod & KMOD_NUM)
- break;
- /* no break */
- case SDLK_DOWN:
- case SDLK_KP8:
- if (code.mod & KMOD_NUM)
- break;
- /* no break */
- case SDLK_UP:
- m_list.handle_key(down, code);
- return true;
- case SDLK_KP_ENTER:
- case SDLK_RETURN:
- clicked_ok();
- return true;
- case SDLK_KP_PERIOD:
- if (code.mod & KMOD_NUM)
- break;
- /* no break */
- case SDLK_DELETE:
- clicked_delete();
- return true;
- case SDLK_ESCAPE:
- end_modal(0);
- return true;
- default:
- break;
+ case SDLK_KP_PERIOD:
+ if (code.mod & KMOD_NUM)
+ break;
+ /* no break */
+ case SDLK_DELETE:
+ clicked_delete();
+ return true;
+ default:
+ break;
}
- return FullscreenMenuBase::handle_key(down, code);
+ return FullscreenMenuLoadMapOrGame::handle_key(down, code);
}
=== modified file 'src/ui_fsmenu/loadgame.h'
--- src/ui_fsmenu/loadgame.h 2014-09-14 11:31:58 +0000
+++ src/ui_fsmenu/loadgame.h 2014-10-13 11:34:08 +0000
@@ -25,13 +25,13 @@
#include <memory>
#include "graphic/image.h"
-#include "io/filesystem/filesystem.h"
+#include "logic/game_controller.h"
#include "ui_basic/button.h"
-#include "ui_basic/checkbox.h"
#include "ui_basic/icon.h"
-#include "ui_basic/listselect.h"
#include "ui_basic/multilinetextarea.h"
+#include "ui_basic/table.h"
#include "ui_basic/textarea.h"
+#include "ui_fsmenu/load_map_or_game.h"
namespace Widelands {
class EditorGameBase;
@@ -44,53 +44,75 @@
class GameController;
struct GameSettingsProvider;
+
+/**
+ * Data about a savegame/replay that we're interested in.
+ */
+struct SavegameData {
+ std::string filename;
+ std::string mapname;
+ std::string wincondition;
+ std::string minimap_path;
+ std::string savedatestring;
+
+ uint32_t gametime;
+ uint32_t nrplayers;
+ time_t savetimestamp;
+ GameController::GameType gametype;
+
+ SavegameData() : gametime(0), nrplayers(0), savetimestamp(0),
+ gametype(GameController::GameType::SINGLEPLAYER) {}
+};
+
+
+
/// Select a Saved Game in Fullscreen Mode. It's a modal fullscreen menu.
-struct FullscreenMenuLoadGame : public FullscreenMenuBase {
+struct FullscreenMenuLoadGame : public FullscreenMenuLoadMapOrGame {
FullscreenMenuLoadGame
- (Widelands::Game &, GameSettingsProvider * gsp = nullptr, GameController * gc = nullptr);
+ (Widelands::Game&, GameSettingsProvider* gsp = nullptr, GameController* gc = nullptr,
+ bool is_replay = false);
const std::string & filename() {return m_filename;}
- void clicked_ok ();
- void clicked_delete();
- void map_selected (uint32_t);
- void double_clicked(uint32_t);
- void fill_list ();
- void think() override;
+ void think();
bool handle_key(bool down, SDL_keysym code) override;
+protected:
+ void clicked_ok() override;
+ void entry_selected() override;
+ void fill_table() override;
+ bool set_has_selection() override;
+
+
private:
- void no_selection();
-
- uint32_t m_butw;
- uint32_t m_buth;
- uint32_t m_fs;
- std::string m_fn;
- uint16_t m_minimap_max_size;
-
- Widelands::Game & m_game;
- UI::Button m_back;
- UI::Button m_ok;
- UI::Button m_delete;
- UI::Listselect<const char *> m_list;
- UI::Textarea m_title;
- UI::Textarea m_label_mapname;
- UI::Textarea m_tamapname;
- UI::Textarea m_label_gametime;
- UI::Textarea m_tagametime;
- UI::Textarea m_label_players;
- UI::Textarea m_ta_players;
- UI::Textarea m_ta_win_condition;
- UI::Textarea m_label_minimap;
- UI::Icon m_minimap_icon;
- std::string m_filename;
-
- FilenameSet m_gamefiles;
-
- GameSettingsProvider * m_settings;
- GameController * m_ctrl;
- std::unique_ptr<const Image> m_minimap_image;
+ bool compare_date_descending(uint32_t, uint32_t);
+ void clicked_delete();
+
+ bool m_is_replay;
+
+ UI::Textarea m_title;
+ UI::Textarea m_label_mapname;
+ UI::MultilineTextarea m_ta_mapname; // Multiline for long names
+ UI::Textarea m_label_gametime;
+ UI::MultilineTextarea m_ta_gametime; // Multiline because we want tooltips
+ UI::Textarea m_label_players;
+ UI::MultilineTextarea m_ta_players;
+ UI::Textarea m_label_win_condition;
+ UI::MultilineTextarea m_ta_win_condition;
+
+ UI::Button m_delete;
+
+ int32_t const m_minimap_y, m_minimap_w, m_minimap_h;
+ UI::Icon m_minimap_icon;
+ std::unique_ptr<const Image> m_minimap_image;
+
+ std::vector<SavegameData> m_games_data;
+ std::string m_filename;
+
+ Widelands::Game& m_game;
+ GameSettingsProvider* m_settings;
+ GameController* m_ctrl;
};
=== removed file 'src/ui_fsmenu/loadreplay.cc'
--- src/ui_fsmenu/loadreplay.cc 2014-10-11 16:08:10 +0000
+++ src/ui_fsmenu/loadreplay.cc 1970-01-01 00:00:00 +0000
@@ -1,340 +0,0 @@
-/*
- * Copyright (C) 2007-2011 by the Widelands Development Team
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "ui_fsmenu/loadreplay.h"
-
-#include <string>
-
-#include <boost/algorithm/string/predicate.hpp>
-#include <boost/format.hpp>
-
-#include "base/i18n.h"
-#include "base/log.h"
-#include "base/time_string.h"
-#include "game_io/game_loader.h"
-#include "game_io/game_preload_packet.h"
-#include "graphic/graphic.h"
-#include "helper.h"
-#include "io/filesystem/layered_filesystem.h"
-#include "logic/game.h"
-#include "logic/replay.h"
-#include "ui_basic/messagebox.h"
-#include "wui/text_constants.h"
-
-FullscreenMenuLoadReplay::FullscreenMenuLoadReplay(Widelands::Game & g) :
- FullscreenMenuBase("choosemapmenu.jpg"),
-
-// Values for alignment and size
- m_butw (get_w() / 4),
- m_buth (get_h() * 19 / 400),
-
-// Buttons
- m_back
- (this, "back",
- get_w() * 71 / 100, get_h() * 9 / 10, m_butw, m_buth,
- g_gr->images().get("pics/but0.png"),
- _("Back"), std::string(), true, false),
- m_ok
- (this, "ok",
- get_w() * 71 / 100, get_h() * 15 / 20, m_butw, m_buth,
- g_gr->images().get("pics/but2.png"),
- _("OK"), std::string(), false, false),
- m_delete
- (this, "delete",
- get_w() * 71 / 100, get_h() * 17 / 20, m_butw, m_buth,
- g_gr->images().get("pics/but0.png"),
- _("Delete"), std::string(), false, false),
-
-// Replay list
- m_list
- (this,
- get_w() * 47 / 2500, get_h() * 3417 / 10000,
- get_w() * 711 / 1250, get_h() * 6083 / 10000),
-
-// Text area
- m_title
- (this,
- get_w() / 2, get_h() * 3 / 20,
- _("Choose a replay"), UI::Align_HCenter),
- m_label_mapname
- (this,
- get_w() * 7 / 10, get_h() * 17 / 50,
- _("Map Name:"), UI::Align_Right),
- m_tamapname(this, get_w() * 71 / 100, get_h() * 17 / 50),
- m_label_gametime
- (this,
- get_w() * 7 / 10, get_h() * 3 / 8,
- _("Gametime:"), UI::Align_Right),
- m_tagametime(this, get_w() * 71 / 100, get_h() * 3 / 8),
- m_label_players
- (this,
- get_w() * 7 / 10, get_h() * 41 / 100,
- _("Players:"), UI::Align_Right),
- m_ta_players
- (this, get_w() * 71 / 100, get_h() * 41 / 100),
- m_ta_win_condition
- (this, get_w() * 71 / 100, get_h() * 9 / 20),
- m_game(g)
-{
- m_back.sigclicked.connect(boost::bind(&FullscreenMenuLoadReplay::end_modal, boost::ref(*this), 0));
- m_ok.sigclicked.connect(boost::bind(&FullscreenMenuLoadReplay::clicked_ok, boost::ref(*this)));
- m_delete.sigclicked.connect
- (boost::bind
- (&FullscreenMenuLoadReplay::clicked_delete, boost::ref(*this)));
-
- m_list.set_font(ui_fn(), fs_small());
- m_list.selected.connect(boost::bind(&FullscreenMenuLoadReplay::replay_selected, this, _1));
- m_list.double_clicked.connect
- (boost::bind(&FullscreenMenuLoadReplay::double_clicked, this, _1));
-
- m_title .set_font(ui_fn(), fs_big(), UI_FONT_CLR_FG);
- m_label_mapname .set_font(ui_fn(), fs_small(), UI_FONT_CLR_FG);
- m_tamapname .set_font(ui_fn(), fs_small(), UI_FONT_CLR_FG);
- m_label_gametime.set_font(ui_fn(), fs_small(), UI_FONT_CLR_FG);
- m_tagametime .set_font(ui_fn(), fs_small(), UI_FONT_CLR_FG);
- m_label_players .set_font(ui_fn(), fs_small(), UI_FONT_CLR_FG);
- m_ta_players .set_font(ui_fn(), fs_small(), UI_FONT_CLR_FG);
- m_ta_win_condition.set_font(ui_fn(), fs_small(), UI_FONT_CLR_FG);
- m_list .set_font(ui_fn(), fs_small());
- m_back.set_font(font_small());
- m_ok.set_font(font_small());
- m_delete.set_font(font_small());
-
- fill_list();
-}
-
-
-void FullscreenMenuLoadReplay::clicked_ok()
-{
- if (!m_list.has_selection())
- return;
-
- m_filename = m_list.get_selected();
- end_modal(1);
-}
-
-void FullscreenMenuLoadReplay::double_clicked(uint32_t)
-{
- clicked_ok();
-}
-
-void FullscreenMenuLoadReplay::clicked_delete()
-{
- if (!m_list.has_selection())
- return;
-
- std::string fname = m_list.get_selected();
- UI::WLMessageBox confirmationBox
- (this,
- _("Delete file"),
- (boost::format(_("Do you really want to delete %s?")) % fname).str(),
- UI::WLMessageBox::YESNO);
- if (confirmationBox.run()) {
- g_fs->fs_unlink(m_list.get_selected());
- g_fs->fs_unlink(m_list.get_selected() + WLGF_SUFFIX);
- m_list.clear();
- fill_list();
- if (m_list.empty()) {
- // else fill_list() already selected the first entry
- no_selection();
- }
- }
-}
-
-/**
- * Update buttons and labels to reflect that no loadable replay is selected.
- */
-void FullscreenMenuLoadReplay::no_selection()
-{
- m_ok.set_enabled(false);
- m_delete.set_enabled(false);
-
- m_tamapname .set_text(std::string());
- m_tagametime.set_text(std::string());
-}
-
-void FullscreenMenuLoadReplay::replay_selected(uint32_t const selected)
-{
- if (!m_list.has_selection()) {
- no_selection();
- return;
- }
-
-
- if (m_list.has_selection()) {
- std::string name = m_list.get_selected() + WLGF_SUFFIX;
- Widelands::GamePreloadPacket gpdp;
-
- try {
- Widelands::GameLoader gl(name, m_game);
- gl.preload_game(gpdp);
- } catch (const WException & e) {
- log("Replay '%s' must have changed from under us\nException: %s\n", name.c_str(), e.what());
- m_list.remove(selected);
- return;
- }
-
- m_ok.set_enabled(true);
- m_delete.set_enabled(true);
- m_tamapname.set_text(gpdp.get_mapname());
-
- uint32_t gametime = gpdp.get_gametime();
- m_tagametime.set_text(gametimestring(gametime));
-
- if (gpdp.get_number_of_players() > 0) {
- m_ta_players.set_text(std::to_string(static_cast<unsigned int>(gpdp.get_number_of_players())));
- } else {
- m_ta_players.set_text(_("Unknown"));
- }
-
- m_ta_win_condition.set_text(gpdp.get_win_condition());
- } else {
- no_selection();
- }
-}
-
-
-/**
- * Fill the file list by simply fetching all files that end with the
- * replay suffix and have a valid associated savegame.
- */
-void FullscreenMenuLoadReplay::fill_list()
-{
- FilenameSet files;
-
- files = filter(g_fs->list_directory(REPLAY_DIR),
- [](const std::string& fn) {return boost::ends_with(fn, REPLAY_SUFFIX);});
-
- Widelands::GamePreloadPacket gpdp;
- for
- (FilenameSet::iterator pname = files.begin();
- pname != files.end();
- ++pname)
- {
- std::string savename = *pname + WLGF_SUFFIX;
-
- if (!g_fs->file_exists(savename))
- continue;
-
- try {
- Widelands::GameLoader gl(savename, m_game);
- gl.preload_game(gpdp);
-
- // TODO(GunChleoc): Do something more structured with this information
- // in the ui_fsmenu refactoring branch
- const std::string fs_filename = FileSystem::filename_without_ext(pname->c_str());
-
- // Begin localization section
- std::string displaytitle = fs_filename;
- if ((is_timestring(fs_filename) || fs_filename == "wl_autosave")
- && gpdp.get_saveyear() > 0
- && gpdp.get_savemonth() > 0
- && gpdp.get_saveday() > 0) {
-
- switch (gpdp.get_gametype()) {
- case GameController::GameType::SINGLEPLAYER:
- /** TRANSLATORS: Gametype used in filenames for loading games */
- displaytitle = _("Single Player");
- break;
- case GameController::GameType::NETHOST:
- /** TRANSLATORS: Gametype used in filenames for loading games */
- /** TRANSLATORS: %1% is the number of players */
- displaytitle = (boost::format(_("Multiplayer (%1%, Host)"))
- % static_cast<unsigned int>(gpdp.get_number_of_players())).str();
- break;
- case GameController::GameType::NETCLIENT:
- /** TRANSLATORS: Gametype used in filenames for loading games */
- /** TRANSLATORS: %1% is the number of players */
- displaytitle = (boost::format(_("Multiplayer (%1%)"))
- % static_cast<unsigned int>(gpdp.get_number_of_players())).str();
- break;
- default:
- // TODO(GunChleoc): Localize this
- displaytitle = ("Unknown game type");
- }
-
- /** TRANSLATORS: Filenames for loading games */
- /** TRANSLATORS: month day, year hour:minute gametype – mapname */
- /** TRANSLATORS: The mapname should always come last, because it */
- /** TRANSLATORS: can be longer than the space we have */
- // TODO(GunChleoc): Localize this
- displaytitle = (boost::format("%1$s %2$u, %3$u %4$u:%5$u %6$s – %7$s")
- % localize_month(gpdp.get_savemonth())
- % static_cast<unsigned int>(gpdp.get_saveday())
- % static_cast<unsigned int>(gpdp.get_saveyear())
- % static_cast<unsigned int>(gpdp.get_savehour())
- % static_cast<unsigned int>(gpdp.get_saveminute())
- % displaytitle
- % gpdp.get_mapname()).str();
-
- if (fs_filename == "wl_autosave") {
- /** TRANSLATORS: Used in filenames for loading games */
- // TODO(GunChleoc): Localize this
- displaytitle = (boost::format(("Autosave: %1%")) % displaytitle).str();
- }
- }
- // End localization section
-
- m_list.add(displaytitle.c_str(), *pname);
- } catch (const WException &) {} // we simply skip illegal entries
- }
-
- if (m_list.size())
- m_list.select(0);
-}
-
-bool FullscreenMenuLoadReplay::handle_key(bool down, SDL_keysym code)
-{
- if (!down)
- return false;
-
- switch (code.sym)
- {
- case SDLK_KP2:
- if (code.mod & KMOD_NUM)
- break;
- /* no break */
- case SDLK_DOWN:
- case SDLK_KP8:
- if (code.mod & KMOD_NUM)
- break;
- /* no break */
- case SDLK_UP:
- m_list.handle_key(down, code);
- return true;
- case SDLK_KP_ENTER:
- case SDLK_RETURN:
- clicked_ok();
- return true;
- case SDLK_KP_PERIOD:
- if (code.mod & KMOD_NUM)
- break;
- /* no break */
- case SDLK_DELETE:
- clicked_delete();
- return true;
- case SDLK_ESCAPE:
- end_modal(0);
- return true;
- default:
- break; // not handled
- }
-
- return FullscreenMenuBase::handle_key(down, code);
-}
=== removed file 'src/ui_fsmenu/loadreplay.h'
--- src/ui_fsmenu/loadreplay.h 2014-09-10 14:08:25 +0000
+++ src/ui_fsmenu/loadreplay.h 1970-01-01 00:00:00 +0000
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2007-2009 by the Widelands Development Team
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef WL_UI_FSMENU_LOADREPLAY_H
-#define WL_UI_FSMENU_LOADREPLAY_H
-
-#include "ui_fsmenu/base.h"
-#include "ui_basic/button.h"
-#include "ui_basic/listselect.h"
-#include "ui_basic/textarea.h"
-
-namespace Widelands
-{class Game;}
-/**
- * Select a replay from a list of replays.
- */
-struct FullscreenMenuLoadReplay : public FullscreenMenuBase {
- FullscreenMenuLoadReplay(Widelands::Game &);
-
- const std::string & filename() {return m_filename;}
-
- void clicked_ok();
- void clicked_delete();
- void replay_selected(uint32_t);
- void double_clicked(uint32_t);
- void fill_list();
-
- bool handle_key(bool down, SDL_keysym code) override;
-
-private:
- void no_selection();
-
- uint32_t m_butw;
- uint32_t m_buth;
-
- UI::Button m_back;
- UI::Button m_ok;
- UI::Button m_delete;
- UI::Listselect<std::string> m_list;
- UI::Textarea m_title;
- UI::Textarea m_label_mapname;
- UI::Textarea m_tamapname;
- UI::Textarea m_label_gametime;
- UI::Textarea m_tagametime;
- UI::Textarea m_label_players;
- UI::Textarea m_ta_players;
- UI::Textarea m_ta_win_condition;
- std::string m_filename;
- Widelands::Game & m_game;
-};
-
-
-#endif // end of include guard: WL_UI_FSMENU_LOADREPLAY_H
=== modified file 'src/ui_fsmenu/mapselect.cc'
--- src/ui_fsmenu/mapselect.cc 2014-09-30 05:41:55 +0000
+++ src/ui_fsmenu/mapselect.cc 2014-10-13 11:34:08 +0000
@@ -20,188 +20,186 @@
#include <cstdio>
#include <memory>
-#include <string>
#include <boost/format.hpp>
-#include "base/deprecated.h"
#include "base/i18n.h"
#include "base/log.h"
#include "base/wexception.h"
#include "graphic/graphic.h"
#include "io/filesystem/layered_filesystem.h"
-#include "logic/editor_game_base.h"
#include "logic/game_controller.h"
#include "logic/game_settings.h"
#include "map_io/widelands_map_loader.h"
-#include "profile/profile.h"
#include "ui_basic/box.h"
-#include "ui_basic/checkbox.h"
#include "wui/text_constants.h"
using Widelands::WidelandsMapLoader;
FullscreenMenuMapSelect::FullscreenMenuMapSelect
- (GameSettingsProvider * const settings, GameController * const ctrl) :
- FullscreenMenuBase("choosemapmenu.jpg"),
-
-// Values for alignment and size
- m_butw (get_w() / 4),
- m_buth (get_h() * 9 / 200),
-
-// Text labels
+ (GameSettingsProvider* const settings, GameController* const ctrl, bool is_editor) :
+ FullscreenMenuLoadMapOrGame(),
+
+ m_is_editor(is_editor),
+ m_checkbox_space(25),
+ m_checkboxes_y(m_tabley - 120),
+
+ // Main title
m_title
- (this,
- get_w() / 2, get_h() / 10,
+ (this, get_w() / 2, m_checkboxes_y / 3,
_("Choose a map"),
UI::Align_HCenter),
- m_label_load_map_as_scenario
- (this,
- get_w() * 23 / 25, get_h() * 11 / 40,
- _("Load map as scenario"),
- UI::Align_Right),
- m_label_name
- (this,
- get_w() * 7 / 10, get_h() * 17 / 50,
- _("Name:"),
- UI::Align_Right),
- m_name (this, get_w() * 71 / 100, get_h() * 17 / 50),
+
+ // Map description
+ m_label_mapname(this, m_right_column_x, m_tabley, "", UI::Align_Left),
+ m_ta_mapname(this,
+ m_right_column_x + m_indent, get_y_from_preceding(m_label_mapname) + m_padding,
+ get_right_column_w(m_right_column_x + m_indent), m_label_height),
+
m_label_author
- (this,
- get_w() * 7 / 10, get_h() * 3 / 8,
- _("Author:"),
- UI::Align_Right),
- m_author (this, get_w() * 71 / 100, get_h() * 3 / 8),
- m_label_size
- (this,
- get_w() * 7 / 10, get_h() * 41 / 100,
- _("Size:"),
- UI::Align_Right),
- m_size (this, get_w() * 71 / 100, get_h() * 41 / 100),
- m_label_nr_players
- (this,
- get_w() * 7 / 10, get_h() * 12 / 25,
- _("Players:"),
- UI::Align_Right),
- m_nr_players (this, get_w() * 71 / 100, get_h() * 12 / 25),
- m_label_descr
- (this,
- get_w() * 7 / 10, get_h() * 103 / 200,
- _("Descr:"),
- UI::Align_Right),
- m_descr
- (this,
- get_w() * 71 / 100, get_h() * 13 / 25, get_w() / 4, get_h() * 63 / 200),
-
-// Buttons
- m_back
- (this, "back",
- get_w() * 71 / 100, get_h() * 17 / 20, m_butw, m_buth,
- g_gr->images().get("pics/but0.png"),
- _("Back"), std::string(), true, false),
- m_ok
- (this, "ok",
- get_w() * 71 / 100, get_h() * 9 / 10, m_butw, m_buth,
- g_gr->images().get("pics/but2.png"),
- _("OK"), std::string(), false, false),
-
-// Checkbox
- m_load_map_as_scenario (this, Point (get_w() * 187 / 200, get_h() * 7 / 25)),
-
-// Map table
- m_table
- (this,
- get_w() * 47 / 2500, get_h() * 3417 / 10000,
- get_w() * 711 / 1250, get_h() * 6083 / 10000),
- m_curdir("maps"),
- m_basedir("maps"),
+ (this, m_right_column_x, get_y_from_preceding(m_ta_mapname) + 2 * m_padding,
+ "",
+ UI::Align_Left),
+ m_ta_author(this,
+ m_right_column_x + m_indent, get_y_from_preceding(m_label_author) + m_padding,
+ get_right_column_w(m_right_column_x + m_indent), m_label_height),
+
+ m_label_description
+ (this, m_right_column_x, get_y_from_preceding(m_ta_author) + 2 * m_padding,
+ _("Description:"),
+ UI::Align_Left),
+ m_ta_description
+ (this,
+ m_right_column_x + m_indent,
+ get_y_from_preceding(m_label_description) + m_padding,
+ get_right_column_w(m_right_column_x + m_indent),
+ m_buty - get_y_from_preceding(m_label_description) - 4 * m_padding),
+
+ m_is_scenario(false),
+
+ // Runtime variables
+ m_curdir("maps"), m_basedir("maps"),
m_settings(settings),
m_ctrl(ctrl)
{
- m_back.sigclicked.connect(boost::bind(&FullscreenMenuMapSelect::end_modal, boost::ref(*this), 0));
- m_ok.sigclicked.connect(boost::bind(&FullscreenMenuMapSelect::ok, boost::ref(*this)));
-
m_title.set_textstyle(ts_big());
- m_label_load_map_as_scenario.set_textstyle(ts_small());
- m_label_name .set_textstyle(ts_small());
- m_name .set_textstyle(ts_small());
- m_label_author .set_textstyle(ts_small());
- m_author .set_textstyle(ts_small());
- m_label_size .set_textstyle(ts_small());
- m_size .set_textstyle(ts_small());
- m_label_nr_players .set_textstyle(ts_small());
- m_nr_players .set_textstyle(ts_small());
- m_label_descr .set_textstyle(ts_small());
- m_descr .set_font(ui_fn(), fs_small(), UI_FONT_CLR_FG);
- m_table .set_font(ui_fn(), fs_small());
-
- m_back.set_font(font_small());
- m_ok.set_font(font_small());
-
-#define NR_PLAYERS_WIDTH 35
+ if (m_is_editor) {
+ m_back.set_tooltip(_("Return to the editor menu"));
+ } else {
+ if (m_settings->settings().multiplayer) {
+ m_back.set_tooltip(_("Return to the multiplayer game setup"));
+ } else {
+ m_back.set_tooltip(_("Return to the single player menu"));
+ }
+ }
+ m_ta_description.set_tooltip(_("Story and hints"));
+
+ m_back.sigclicked.connect(boost::bind(&FullscreenMenuMapSelect::clicked_back, boost::ref(*this)));
+ m_ok.sigclicked.connect(boost::bind(&FullscreenMenuMapSelect::clicked_ok, boost::ref(*this)));
+ m_table.selected.connect(boost::bind(&FullscreenMenuMapSelect::entry_selected, this));
+ m_table.double_clicked.connect(boost::bind(&FullscreenMenuMapSelect::clicked_ok, boost::ref(*this)));
+
/** TRANSLATORS: Column title for number of players in map list */
- m_table.add_column(NR_PLAYERS_WIDTH, _("#"), "", UI::Align_HCenter);
- m_table.add_column
- (m_table.get_w() - NR_PLAYERS_WIDTH, _("Map Name"), "", UI::Align_Left);
+ m_table.add_column(35, _("Pl."), _("Number of players"), UI::Align_HCenter);
+ m_table.add_column(m_table.get_w() - 35 - 115, _("Map Name"), _("The name of the map or scenario"),
+ UI::Align_Left);
+ m_table.add_column(115, _("Size"), _("The size of the map (Width x Height)"), UI::Align_Left);
+ m_table.set_column_compare
+ (0,
+ boost::bind(&FullscreenMenuMapSelect::compare_players, this, _1, _2));
m_table.set_column_compare
(1,
- boost::bind
- (&FullscreenMenuMapSelect::compare_maprows, this, _1, _2));
+ boost::bind(&FullscreenMenuMapSelect::compare_mapnames, this, _1, _2));
+ m_table.set_column_compare
+ (2,
+ boost::bind(&FullscreenMenuMapSelect::compare_size, this, _1, _2));
m_table.set_sort_column(0);
- m_load_map_as_scenario.set_state(false);
- m_load_map_as_scenario.set_enabled(false);
-
- m_table.selected.connect(boost::bind(&FullscreenMenuMapSelect::map_selected, this, _1));
- m_table.double_clicked.connect(boost::bind(&FullscreenMenuMapSelect::double_clicked, this, _1));
-
- UI::Box* vbox = new UI::Box(
- this, m_table.get_x(), m_table.get_y() - 120, UI::Box::Horizontal, m_table.get_w());
- m_show_all_maps = _add_tag_checkbox(vbox, "blumba", _("Show all maps"));
+ m_is_scenario = false;
+
+ // Suggested teams
+ // Y coordinate will be set later, when we know how high this box will get.
+ m_suggested_teams_box = new UI::SuggestedTeamsBox(this, m_right_column_x, 0, UI::Box::Vertical,
+ m_padding, m_indent, m_label_height,
+ get_w() - m_right_column_x, 4 * m_label_height);
+
+
+ UI::Box* vbox = new UI::Box(this, m_tablex, m_checkboxes_y,
+ UI::Box::Horizontal, m_checkbox_space, get_w());
+ m_cb_show_all_maps = _add_tag_checkbox(vbox, "blumba", _("Show all maps"));
m_tags_checkboxes.clear(); // Remove this again, it is a special tag checkbox
- m_show_all_maps->set_state(true);
- vbox->set_size(get_w(), 25);
-
- vbox = new UI::Box(this, m_table.get_x(), m_table.get_y() - 90, UI::Box::Horizontal, m_table.get_w());
- _add_tag_checkbox(vbox, "official", _("Official Map"));
- _add_tag_checkbox(vbox, "seafaring", _("Seafaring Map"));
- vbox->set_size(get_w(), 25);
-
- vbox = new UI::Box(this, m_table.get_x(), m_table.get_y() - 60, UI::Box::Horizontal, m_table.get_w());
+ m_cb_show_all_maps->set_state(true);
+
+ m_cb_dont_localize_mapnames = new UI::Checkbox(vbox, Point(0, 0));
+ m_cb_dont_localize_mapnames->changedto.connect
+ (boost::bind(&FullscreenMenuMapSelect::fill_table, boost::ref(*this)));
+ vbox->add(m_cb_dont_localize_mapnames, UI::Box::AlignLeft, true);
+ UI::Textarea * ta_dont_localize_mapnames =
+ /** TRANSLATORS: Checkbox title. If this checkbox is enabled, map names aren't translated. */
+ new UI::Textarea(vbox, _("Show original map names"), UI::Align_CenterLeft);
+ vbox->add_space(m_padding);
+ vbox->add(ta_dont_localize_mapnames, UI::Box::AlignLeft);
+ vbox->add_space(m_checkbox_space);
+ vbox->set_size(get_w() - 2 * m_tablex, m_checkbox_space);
+
+ vbox = new UI::Box(this,
+ m_tablex, vbox->get_y() + vbox->get_h() + m_padding,
+ UI::Box::Horizontal, m_checkbox_space, get_w());
+ _add_tag_checkbox(vbox, "official", _("Official"));
+ _add_tag_checkbox(vbox, "unbalanced", _("Unbalanced"));
+ _add_tag_checkbox(vbox, "seafaring", _("Seafaring"));
+ _add_tag_checkbox(vbox, "scenario", _("Scenario"));
+ vbox->set_size(get_w() - 2 * m_tablex, m_checkbox_space);
+
+ vbox = new UI::Box(this,
+ m_tablex, vbox->get_y() + vbox->get_h() + m_padding,
+ UI::Box::Horizontal, m_checkbox_space, get_w());
+ _add_tag_checkbox(vbox, "ffa", _("Free for all"));
_add_tag_checkbox(vbox, "1v1", _("1v1"));
+
+ vbox->set_size(get_w() - 2 * m_tablex, m_checkbox_space);
+
+ vbox = new UI::Box(this,
+ m_tablex, vbox->get_y() + vbox->get_h() + m_padding,
+ UI::Box::Horizontal, m_checkbox_space, get_w());
_add_tag_checkbox(vbox, "2teams", _("Teams of 2"));
_add_tag_checkbox(vbox, "3teams", _("Teams of 3"));
- vbox->set_size(get_w(), 25);
-
- vbox = new UI::Box(this, m_table.get_x(), m_table.get_y() - 30, UI::Box::Horizontal, m_table.get_w());
_add_tag_checkbox(vbox, "4teams", _("Teams of 4"));
- _add_tag_checkbox(vbox, "ffa", _("Free for all"));
- _add_tag_checkbox(vbox, "unbalanced", _("Unbalanced"));
- vbox->set_size(get_w(), 25);
+ vbox->set_size(get_w() - 2 * m_tablex, m_checkbox_space);
m_scenario_types = m_settings->settings().multiplayer ? Map::MP_SCENARIO : Map::SP_SCENARIO;
- if (m_scenario_types) {
- m_load_map_as_scenario.set_visible(true);
- m_label_load_map_as_scenario.set_visible(true);
- } else {
- m_load_map_as_scenario.set_visible(false);
- m_label_load_map_as_scenario.set_visible(false);
- }
m_table.focus();
- fill_list();
+ fill_table();
+
+ // We don't need the unlocalizing option if there is nothing to unlocalize.
+ // We know this after the list is filled.
+ m_cb_dont_localize_mapnames->set_visible(m_has_translated_mapname);
+ ta_dont_localize_mapnames->set_visible(m_has_translated_mapname);
}
void FullscreenMenuMapSelect::think()
{
- if (m_ctrl)
+ if (m_ctrl) {
m_ctrl->think();
-}
-
-
-bool FullscreenMenuMapSelect::compare_maprows
- (uint32_t rowa, uint32_t rowb)
+ }
+}
+
+
+bool FullscreenMenuMapSelect::compare_players(uint32_t rowa, uint32_t rowb)
+{
+ const MapData & r1 = m_maps_data[m_table[rowa]];
+ const MapData & r2 = m_maps_data[m_table[rowb]];
+
+ if (r1.nrplayers == r2.nrplayers) {
+ return compare_mapnames(rowa, rowb);
+ }
+ return r1.nrplayers < r2.nrplayers;
+}
+
+
+bool FullscreenMenuMapSelect::compare_mapnames(uint32_t rowa, uint32_t rowb)
{
const MapData & r1 = m_maps_data[m_table[rowa]];
const MapData & r2 = m_maps_data[m_table[rowb]];
@@ -212,72 +210,152 @@
return true;
} else if (r1.width && !r2.width) {
return false;
- }
- return r1.name < r2.name;
-}
+ } else if (m_cb_dont_localize_mapnames->get_state()) {
+ return r1.name < r2.name;
+ }
+ return r1.localized_name < r2.localized_name;
+}
+
+
+bool FullscreenMenuMapSelect::compare_size(uint32_t rowa, uint32_t rowb)
+{
+ const MapData & r1 = m_maps_data[m_table[rowa]];
+ const MapData & r2 = m_maps_data[m_table[rowb]];
+
+ if (r1.width != r2.width) {
+ return r1.width < r2.width;
+ } else if (r1.height == r2.height) {
+ return compare_mapnames(rowa, rowb);
+ }
+ return r1.height < r2.height;
+}
+
bool FullscreenMenuMapSelect::is_scenario()
{
- return m_load_map_as_scenario.get_state();
+ return m_is_scenario;
}
+
MapData const * FullscreenMenuMapSelect::get_map() const
{
- if (!m_table.has_selection())
+ if (!m_table.has_selection()) {
return nullptr;
+ }
return &m_maps_data[m_table.get_selected()];
}
-void FullscreenMenuMapSelect::ok()
+void FullscreenMenuMapSelect::clicked_ok()
{
const MapData & mapdata = m_maps_data[m_table.get_selected()];
if (!mapdata.width) {
m_curdir = mapdata.filename;
- fill_list();
- } else
+ fill_table();
+ } else {
end_modal(1 + is_scenario());
-}
-
-
-/**
- * Called when a different entry in the listbox gets selected.
- * When this happens, the information display at the right needs to be
- * refreshed.
- */
-void FullscreenMenuMapSelect::map_selected(uint32_t)
-{
- const MapData & map = m_maps_data[m_table.get_selected()];
-
- if (map.width) {
- // Translate the map data
- i18n::Textdomain td("maps");
- m_name .set_text(_(map.name));
- m_author .set_text(map.author);
- m_size .set_text((boost::format("%-4ux%4u") % map.width % map.height).str());
- m_nr_players.set_text(std::to_string(static_cast<unsigned int>(map.nrplayers)));
- m_descr .set_text(_(map.description) + (map.hint.empty() ? "" : (std::string("\n") + _(map.hint))));
- m_load_map_as_scenario.set_enabled(map.scenario);
- } else {
- // Directory
- m_name .set_text(_("(directory)"));
- m_author .set_text(std::string());
- m_size .set_text(std::string());
- m_nr_players.set_text(std::string());
- m_descr .set_text(std::string());
- m_load_map_as_scenario.set_enabled(false);
- }
- m_ok.set_enabled(true);
- m_load_map_as_scenario.set_state(false); // reset
-}
-
-/**
- * listbox got double clicked
- */
-void FullscreenMenuMapSelect::double_clicked(uint32_t) {
- ok();
-}
+ }
+}
+
+bool FullscreenMenuMapSelect::set_has_selection()
+{
+ bool has_selection = m_table.has_selection();
+ FullscreenMenuLoadMapOrGame::set_has_selection();
+
+ if (!has_selection) {
+ m_label_mapname.set_text(std::string());
+ m_label_author.set_text(std::string());
+ m_label_description.set_text(std::string());
+
+ m_ta_mapname.set_text(std::string());
+ m_ta_author.set_text(std::string());
+ m_ta_description.set_text(std::string());
+
+ m_suggested_teams_box->hide();
+ }
+ return has_selection;
+}
+
+
+void FullscreenMenuMapSelect::entry_selected()
+{
+ if (set_has_selection()) {
+ const MapData & map = m_maps_data[m_table.get_selected()];
+
+ if (map.width) {
+ // Show map information
+ if (map.scenario) {
+ m_label_mapname.set_text(_("Scenario:"));
+ } else {
+ m_label_mapname.set_text(_("Map:"));
+ }
+ std::string map_displayname = map.localized_name;
+ if (m_cb_dont_localize_mapnames->get_state()) {
+ map_displayname = map.name;
+ }
+ m_ta_mapname.set_text(map_displayname);
+ if (map.localized_name != map.name) {
+ if (m_cb_dont_localize_mapnames->get_state()) {
+ m_ta_mapname.set_tooltip
+ /** TRANSLATORS: Tooltip in map description when map names are being displayed in English. */
+ /** TRANSLATORS: %s is the localized name of the map. */
+ ((boost::format(_("The name of this map in your language: %s"))
+ % map.localized_name).str());
+ } else {
+ m_ta_mapname.set_tooltip
+ /** TRANSLATORS: Tooltip in map description when translated map names are being displayed. */
+ /** TRANSLATORS: %s is the English name of the map. */
+ ((boost::format(_("The original name of this map: %s"))
+ % map.name).str());
+ }
+ } else {
+ m_ta_mapname.set_tooltip(_("The name of this map"));
+ }
+ m_label_author.set_text(ngettext("Author:", "Authors:", map.authors->get_number()));
+ m_ta_author.set_tooltip(ngettext("The designer of this map", "The designers of this map",
+ map.authors->get_number()));
+ m_ta_author.set_text(map.authors->get_names());
+ m_ta_description.set_text(map.description +
+ (map.hint.empty() ? "" : (std::string("\n\n") + map.hint)));
+ m_label_author.set_visible(true);
+ m_label_description.set_visible(true);
+ m_ta_description.set_size
+ (m_ta_description.get_w(),
+ m_buty - get_y_from_preceding(m_label_description) - 4 * m_padding);
+ m_ok.set_tooltip(m_is_editor ? _("Edit this map") : _("Play this map"));
+ } else {
+ // Show directory information
+ m_label_mapname.set_text(_("Directory:"));
+ m_ta_mapname.set_text(map.localized_name);
+ m_ta_mapname.set_tooltip(_("The name of this directory"));
+
+ m_ta_author.set_text(std::string());
+ m_ta_description.set_text(std::string());
+ m_label_author.set_visible(false);
+ m_label_description.set_visible(false);
+ m_ok.set_tooltip(_("Open this directory"));
+ }
+
+ m_is_scenario = map.scenario; // reset
+ m_ta_description.scroll_to_top();
+
+ // Show / hide suggested teams
+ m_suggested_teams_box->hide();
+
+ if (!map.suggested_teams.empty()) {
+ m_suggested_teams_box->show(map.suggested_teams);
+
+ m_suggested_teams_box->set_pos(
+ Point(m_suggested_teams_box->get_x(),
+ m_buty - m_padding - m_suggested_teams_box->get_h() - m_padding));
+
+ m_ta_description.set_size(m_ta_description.get_w(),
+ m_suggested_teams_box->get_y() - m_ta_description.get_y() - 3 * m_padding);
+ }
+ }
+}
+
/**
* Fill the list with maps that can be opened.
@@ -298,10 +376,17 @@
* \note special case is, if this is a multiplayer game on a dedicated server and
* the client wants to change the map - in that case the maps available on the server are shown.
*/
-void FullscreenMenuMapSelect::fill_list()
+void FullscreenMenuMapSelect::fill_table()
{
+ uint8_t col_players = 0;
+ uint8_t col_name = 1;
+ uint8_t col_size = 2;
+
m_maps_data.clear();
m_table.clear();
+ m_has_translated_mapname = false;
+
+ MapData* mapdata;
if (m_settings->settings().maps.empty()) {
// This is the normal case
@@ -314,33 +399,29 @@
//If we are not at the top of the map directory hierarchy (we're not talking
//about the absolute filesystem top!) we manually add ".."
if (m_curdir != m_basedir) {
- MapData map;
+ mapdata = new MapData();
#ifndef _WIN32
- map.filename = m_curdir.substr(0, m_curdir.rfind('/'));
+ mapdata->filename = m_curdir.substr(0, m_curdir.rfind('/'));
#else
- map.filename = m_curdir.substr(0, m_curdir.rfind('\\'));
+ mapdata->filename = m_curdir.substr(0, m_curdir.rfind('\\'));
#endif
- m_maps_data.push_back(map);
+ mapdata->localized_name = (boost::format("\\<%s\\>") % _("parent")).str();
+ m_maps_data.push_back(*mapdata);
UI::Table<uintptr_t const>::EntryRecord & te =
m_table.add(m_maps_data.size() - 1);
- te.set_string(0, "");
- std::string parent_string =
- (boost::format("\\<%s\\>") % _("parent")).str();
+ te.set_string(col_players, "");
te.set_picture
- (1, g_gr->images().get("pics/ls_dir.png"),
- parent_string);
+ (col_name, g_gr->images().get("pics/ls_dir.png"),
+ mapdata->localized_name);
+ te.set_string(col_size, "");
++ndirs;
}
//Add subdirectories to the list (except for uncompressed maps)
- for
- (FilenameSet::iterator pname = files.begin();
- pname != files.end();
- ++pname)
- {
- char const * const name = pname->c_str();
+ for (const std::string& mapfilename : files) {
+ char const * const name = mapfilename.c_str();
if (!strcmp(FileSystem::fs_filename(name), "."))
continue;
// Upsy, appeared again. ignore
@@ -351,80 +432,97 @@
if (WidelandsMapLoader::is_widelands_map(name))
continue;
- MapData dir;
- dir.filename = name;
+ mapdata = new MapData();
+ mapdata->filename = name;
+ if (strcmp (name, "maps/MP Scenarios") == 0) {
+ /** TRANSLATORS: Directory name for MP Scenarios in map selection */
+ mapdata->localized_name = _("Multiplayer Scenarios");
+ } else {
+ mapdata->localized_name = FileSystem::fs_filename(name);
+ }
- m_maps_data.push_back(dir);
+ m_maps_data.push_back(*mapdata);
UI::Table<uintptr_t const>::EntryRecord & te = m_table.add(m_maps_data.size() - 1);
- te.set_string(0, "");
- te.set_picture
- (1, g_gr->images().get("pics/ls_dir.png"),
- FileSystem::fs_filename(name));
+ te.set_string(col_players, "");
+ te.set_picture(col_name, g_gr->images().get("pics/ls_dir.png"), mapdata->localized_name);
+ te.set_string(col_size, "");
++ndirs;
}
//Add map files(compressed maps) and directories(uncompressed)
{
- Widelands::Map map; // MapLoader needs a place to put its preload data
-
- for
- (FilenameSet::iterator pname = files.begin();
- pname != files.end();
- ++pname)
- {
- char const * const name = pname->c_str();
-
- std::unique_ptr<Widelands::MapLoader> ml = map.get_correct_loader(name);
- if (!ml)
+ Widelands::Map* map; // MapLoader needs a place to put its preload data
+
+ for (const std::string& mapfilename : files) {
+
+ map = new Widelands::Map();
+
+ std::unique_ptr<Widelands::MapLoader> ml = map->get_correct_loader(mapfilename);
+ if (!ml) {
continue;
+ }
try {
- map.set_filename(name);
+ map->set_filename(mapfilename);
ml->preload_map(true);
- MapData mapdata;
- mapdata.filename = name;
- mapdata.name = map.get_name();
- mapdata.author = map.get_author();
- mapdata.description = map.get_description();
- mapdata.hint = map.get_hint();
- mapdata.nrplayers = map.get_nrplayers();
- mapdata.width = map.get_width();
- mapdata.height = map.get_height();
- mapdata.scenario = map.scenario_types() & m_scenario_types;
- mapdata.tags = map.get_tags();
-
- if (!mapdata.width || !mapdata.height)
+ i18n::Textdomain td("maps");
+
+ mapdata = new MapData();
+ mapdata->filename = mapfilename;
+ mapdata->name = map->get_name();
+ mapdata->localized_name = mapdata->name.empty() ? "" : _(mapdata->name);
+ mapdata->authors = new MapAuthorData(map->get_author());
+ mapdata->description = map->get_description().empty() ? "" : _(map->get_description());
+ mapdata->hint = map->get_hint().empty() ? "" : _(map->get_hint());
+ mapdata->nrplayers = map->get_nrplayers();
+ mapdata->width = map->get_width();
+ mapdata->height = map->get_height();
+ mapdata->scenario = map->scenario_types() & m_scenario_types
+ || (m_is_editor && map->scenario_types() > 0);
+ mapdata->tags = map->get_tags();
+ if (mapdata->scenario) {
+ mapdata->tags.insert("scenario");
+ }
+ mapdata->suggested_teams = map->get_suggested_teams();
+
+ m_has_translated_mapname =
+ m_has_translated_mapname || (mapdata->name != mapdata->localized_name);
+
+ if (!mapdata->width || !mapdata->height) {
continue;
+ }
bool has_all_tags = true;
for (std::set<uint32_t>::const_iterator it = m_req_tags.begin(); it != m_req_tags.end(); ++it)
- has_all_tags &= mapdata.tags.count(m_tags_ordered[*it]);
- if (!has_all_tags)
+ has_all_tags &= mapdata->tags.count(m_tags_ordered[*it]);
+ if (!has_all_tags) {
continue;
-
-
- m_maps_data.push_back(mapdata);
+ }
+
+ m_maps_data.push_back(*mapdata);
UI::Table<uintptr_t const>::EntryRecord & te = m_table.add(m_maps_data.size() - 1);
- char buf[256];
- sprintf(buf, "(%i)", mapdata.nrplayers);
- te.set_string(0, buf);
- i18n::Textdomain td("maps");
+ te.set_string(col_players, (boost::format("(%i)") % mapdata->nrplayers).str());
+
+ std::string map_displayname = mapdata->localized_name;
+ if (m_cb_dont_localize_mapnames->get_state()) {
+ map_displayname = mapdata->name;
+ }
te.set_picture
- (1, g_gr->images().get
+ (col_name, g_gr->images().get
(dynamic_cast<WidelandsMapLoader*>(ml.get()) ?
- (mapdata.scenario ? "pics/ls_wlscenario.png" : "pics/ls_wlmap.png") :
+ (mapdata->scenario ? "pics/ls_wlscenario.png" : "pics/ls_wlmap.png") :
"pics/ls_s2map.png"),
- _(mapdata.name));
+ map_displayname);
+
+ te.set_string(col_size, (boost::format("%u x %u") % mapdata->width % mapdata->height).str());
} catch (const std::exception & e) {
- log
- ("Mapselect: Skip %s due to preload error: %s\n",
- name, e.what());
+ log("Mapselect: Skip %s due to preload error: %s\n", mapfilename.c_str(), e.what());
} catch (...) {
- log("Mapselect: Skip %s due to unknown exception\n", name);
+ log("Mapselect: Skip %s due to unknown exception\n", mapfilename.c_str());
}
}
}
@@ -432,79 +530,84 @@
//client changing maps on dedicated server
for (uint16_t i = 0; i < m_settings->settings().maps.size(); ++i) {
Widelands::Map map; // MapLoader needs a place to put its preload data
+
+ const DedicatedMapInfos & dmap = m_settings->settings().maps.at(i);
+ const std::string& mapfilename = dmap.path;
+ std::unique_ptr<Widelands::MapLoader> ml(map.get_correct_loader(mapfilename));
+
i18n::Textdomain td("maps");
- MapData mapdata;
-
- const DedicatedMapInfos & dmap = m_settings->settings().maps.at(i);
- char const * const name = dmap.path.c_str();
- std::unique_ptr<Widelands::MapLoader> ml(map.get_correct_loader(name));
+ mapdata = new MapData();
try {
- if (!ml)
- throw wexception("Not useable!");
+ if (!ml) {
+ throw wexception("Mapselect: No MapLoader");
+ }
- map.set_filename(name);
+ map.set_filename(mapfilename);
ml->preload_map(true);
- mapdata.filename = name;
- mapdata.name = map.get_name();
- mapdata.author = map.get_author();
- mapdata.description = map.get_description();
- mapdata.hint = map.get_hint();
- mapdata.nrplayers = map.get_nrplayers();
- mapdata.width = map.get_width();
- mapdata.height = map.get_height();
- mapdata.scenario = map.scenario_types() & m_scenario_types;
-
- if (mapdata.nrplayers != dmap.players || mapdata.scenario != dmap.scenario)
- throw wexception("Not useable!");
-
- if (!mapdata.width || !mapdata.height)
- throw wexception("Not useable!");
+ mapdata->filename = mapfilename;
+ mapdata->name = map.get_name();
+ mapdata->authors = new MapAuthorData(map.get_author());
+ mapdata->description = map.get_description();
+ mapdata->hint = map.get_hint();
+ mapdata->nrplayers = map.get_nrplayers();
+ mapdata->width = map.get_width();
+ mapdata->height = map.get_height();
+ mapdata->scenario = map.scenario_types() & m_scenario_types;
+
+ if (mapdata->nrplayers != dmap.players || mapdata->scenario != dmap.scenario) {
+ throw wexception("Mapselect: Number of players or scenario doesn't match");
+ }
+
+ if (!mapdata->width || !mapdata->height) {
+ throw wexception("Mapselect: Map has no size");
+ }
// Finally write the entry to the list
- m_maps_data.push_back(mapdata);
+ m_maps_data.push_back(*mapdata);
UI::Table<uintptr_t const>::EntryRecord & te = m_table.add(m_maps_data.size() - 1);
- char buf[256];
- sprintf(buf, "(%i)", mapdata.nrplayers);
- te.set_string(0, buf);
+ te.set_string(col_players, (boost::format("(%i)") % mapdata->nrplayers).str());
te.set_picture
- (1, g_gr->images().get((mapdata.scenario ? "pics/ls_wlscenario.png" : "pics/ls_wlmap.png")),
- mapdata.name.c_str());
+ (col_name,
+ g_gr->images().get((mapdata->scenario ? "pics/ls_wlscenario.png" : "pics/ls_wlmap.png")),
+ mapdata->name.c_str());
+ te.set_string(col_size, (boost::format("%u x %u") % mapdata->width % mapdata->height).str());
} catch (...) {
- log("Mapselect: Skipped reading locale data for file %s - not valid.\n", name);
+ log("Mapselect: Skipped reading locale data for file %s - not valid.\n", mapfilename.c_str());
// Fill in the data we got from the dedicated server
- mapdata.filename = name;
- mapdata.name = dmap.path.substr(5, dmap.path.size() - 1);
- mapdata.author = _("unknown");
- mapdata.description = _("This map file is not present in your filesystem."
+ mapdata->filename = mapfilename;
+ mapdata->name = mapfilename.substr(5, mapfilename.size() - 1);
+ mapdata->authors = new MapAuthorData(_("Nobody"));
+ mapdata->description = _("This map file is not present in your filesystem."
" The data shown here was sent by the server.");
- mapdata.hint = "";
- mapdata.nrplayers = dmap.players;
- mapdata.width = 1;
- mapdata.height = 0;
- mapdata.scenario = dmap.scenario;
+ mapdata->hint = "";
+ mapdata->nrplayers = dmap.players;
+ mapdata->width = 1;
+ mapdata->height = 0;
+ mapdata->scenario = dmap.scenario;
// Finally write the entry to the list
- m_maps_data.push_back(mapdata);
+ m_maps_data.push_back(*mapdata);
UI::Table<uintptr_t const>::EntryRecord & te = m_table.add(m_maps_data.size() - 1);
- char buf[256];
- sprintf(buf, "(%i)", mapdata.nrplayers);
- te.set_string(0, buf);
+ te.set_string(col_players, (boost::format("(%i)") % mapdata->nrplayers).str());
te.set_picture
- (1, g_gr->images().get
- ((mapdata.scenario ? "pics/ls_wlscenario.png" : "pics/ls_wlmap.png")), mapdata.name.c_str());
+ (col_name, g_gr->images().get
+ ((mapdata->scenario ? "pics/ls_wlscenario.png" : "pics/ls_wlmap.png")),
+ mapdata->name.c_str());
+ te.set_string(col_size, (boost::format("%u x %u") % mapdata->width % mapdata->height).str());
}
}
}
-
m_table.sort();
- if (m_table.size())
+ if (m_table.size()) {
m_table.select(0);
+ }
+ set_has_selection();
}
/*
@@ -522,8 +625,9 @@
box->add(cb, UI::Box::AlignLeft, true);
UI::Textarea * ta = new UI::Textarea(box, displ_name, UI::Align_CenterLeft);
+ box->add_space(m_padding);
box->add(ta, UI::Box::AlignLeft);
- box->add_space(25);
+ box->add_space(m_checkbox_space);
m_tags_checkboxes.push_back(cb);
@@ -541,15 +645,19 @@
}
}
} else { // Any tag
- if (to)
+ if (to) {
m_req_tags.insert(id);
- else
+ }
+ else {
m_req_tags.erase(id);
- }
- if (m_req_tags.empty())
- m_show_all_maps->set_state(true);
- else
- m_show_all_maps->set_state(false);
+ }
+ }
+ if (m_req_tags.empty()) {
+ m_cb_show_all_maps->set_state(true);
+ }
+ else {
+ m_cb_show_all_maps->set_state(false);
+ }
- fill_list();
+ fill_table();
}
=== modified file 'src/ui_fsmenu/mapselect.h'
--- src/ui_fsmenu/mapselect.h 2014-09-14 11:31:58 +0000
+++ src/ui_fsmenu/mapselect.h 2014-10-13 11:34:08 +0000
@@ -30,6 +30,8 @@
#include "ui_basic/multilinetextarea.h"
#include "ui_basic/table.h"
#include "ui_basic/textarea.h"
+#include "ui_fsmenu/load_map_or_game.h"
+#include "ui_fsmenu/suggested_teams_box.h"
using Widelands::Map;
@@ -48,67 +50,84 @@
std::string filename;
std::string name;
- std::string author;
+ std::string localized_name;
std::string description;
std::string hint;
Tags tags;
+ std::vector<Map::SuggestedTeamLineup*> suggested_teams;
+ MapAuthorData* authors;
uint32_t width;
uint32_t height;
uint32_t nrplayers;
bool scenario; // is this a scenario we should list?
- MapData()
- : width(0), height(0), nrplayers(0), scenario(false) {}
+ MapData() :
+ authors(new MapAuthorData("")),
+ width(0), height(0), nrplayers(0),
+ scenario(false)
+ {
+ suggested_teams.clear();
+ }
};
+
/**
* Select a Map in Fullscreen Mode. It's a modal fullscreen menu
*/
-
-struct FullscreenMenuMapSelect : public FullscreenMenuBase {
- FullscreenMenuMapSelect(GameSettingsProvider *, GameController *);
+struct FullscreenMenuMapSelect : public FullscreenMenuLoadMapOrGame {
+ FullscreenMenuMapSelect(GameSettingsProvider*, GameController*, bool is_editor = false);
bool is_scenario();
- MapData const * get_map() const;
+ MapData const* get_map() const;
void think() override;
+protected:
+ void clicked_ok() override;
+ void entry_selected() override;
+ void fill_table() override;
+ bool set_has_selection() override;
+
+
private:
- void ok();
- void map_selected(uint32_t);
- void changed(bool);
- void double_clicked(uint32_t);
- void fill_list();
- bool compare_maprows(uint32_t, uint32_t);
+ bool compare_players(uint32_t, uint32_t);
+ bool compare_mapnames(uint32_t, uint32_t);
+ bool compare_size(uint32_t, uint32_t);
- UI::Checkbox * _add_tag_checkbox(UI::Box *, std::string, std::string);
+ UI::Checkbox* _add_tag_checkbox(UI::Box*, std::string, std::string);
void _tagbox_changed(int32_t, bool);
- uint32_t m_butw;
- uint32_t m_buth;
- UI::Textarea m_title;
- UI::Textarea m_label_load_map_as_scenario;
- UI::Textarea m_label_name, m_name;
- UI::Textarea m_label_author, m_author;
- UI::Textarea m_label_size, m_size;
- UI::Textarea m_label_nr_players, m_nr_players;
- UI::Textarea m_label_descr;
- UI::MultilineTextarea m_descr;
- UI::Button m_back, m_ok;
- UI::Checkbox m_load_map_as_scenario;
- UI::Checkbox * m_show_all_maps;
- std::vector<UI::Checkbox *> m_tags_checkboxes;
- UI::Table<uintptr_t const> m_table;
- std::string m_curdir, m_basedir;
- Map::ScenarioTypes m_scenario_types;
-
- std::vector<std::string> m_tags_ordered;
- std::set<uint32_t> m_req_tags;
-
- std::vector<MapData> m_maps_data;
-
- GameSettingsProvider * m_settings;
- GameController * m_ctrl;
+ bool const m_is_editor;
+ int32_t const m_checkbox_space;
+ int32_t const m_checkboxes_y;
+
+ UI::Textarea m_title;
+ UI::Textarea m_label_mapname;
+ UI::MultilineTextarea m_ta_mapname;
+ UI::Textarea m_label_author;
+ UI::MultilineTextarea m_ta_author;
+ UI::Textarea m_label_description;
+ UI::MultilineTextarea m_ta_description;
+
+ UI::Checkbox* m_cb_dont_localize_mapnames;
+ bool m_has_translated_mapname;
+
+ UI::Checkbox* m_cb_show_all_maps;
+ std::vector<UI::Checkbox*> m_tags_checkboxes;
+
+ UI::SuggestedTeamsBox* m_suggested_teams_box;
+
+ bool m_is_scenario;
+ std::string m_curdir, m_basedir;
+ Map::ScenarioTypes m_scenario_types;
+
+ std::vector<std::string> m_tags_ordered;
+ std::set<uint32_t> m_req_tags;
+
+ std::vector<MapData> m_maps_data;
+
+ GameSettingsProvider* m_settings;
+ GameController* m_ctrl;
};
#endif // end of include guard: WL_UI_FSMENU_MAPSELECT_H
=== added file 'src/ui_fsmenu/suggested_teams_box.cc'
--- src/ui_fsmenu/suggested_teams_box.cc 1970-01-01 00:00:00 +0000
+++ src/ui_fsmenu/suggested_teams_box.cc 2014-10-13 11:34:08 +0000
@@ -0,0 +1,136 @@
+/*
+ * Copyright (C) 2014 by the Widelands Development Team
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "ui_fsmenu/suggested_teams_box.h"
+
+#include <set>
+#include <string>
+
+#include <boost/format.hpp>
+
+#include "graphic/graphic.h"
+
+namespace UI {
+
+SuggestedTeamsBox::SuggestedTeamsBox(Panel * parent,
+ int32_t x, int32_t y,
+ uint32_t orientation,
+ int32_t padding, int32_t indent, int32_t label_height,
+ int32_t max_x, int32_t max_y,
+ uint32_t inner_spacing) :
+ UI::Box(parent, x, y, orientation, max_x, max_y, inner_spacing),
+ m_padding(padding),
+ m_indent(indent),
+ m_label_height(label_height)
+{
+ m_player_icons.clear();
+ m_suggested_teams.clear();
+ set_size(max_x, max_y);
+
+ m_suggested_teams_box_label =
+ new UI::Textarea(this, "", UI::Align_CenterLeft);
+ add(m_suggested_teams_box_label, UI::Box::AlignLeft);
+}
+SuggestedTeamsBox::~SuggestedTeamsBox() {
+ SuggestedTeamsBox::hide();
+}
+
+void SuggestedTeamsBox::hide() {
+ // Delete former images
+ for (UI::Icon* player_icon : m_player_icons) {
+ player_icon->set_icon(nullptr);
+ player_icon->set_visible(false);
+ player_icon->set_no_frame();
+ }
+ m_player_icons.clear();
+
+ // Delete vs. labels
+ for (UI::Textarea* vs_label : m_vs_labels) {
+ vs_label->set_visible(false);
+ }
+ m_vs_labels.clear();
+
+ set_visible(false);
+ m_suggested_teams_box_label->set_visible(false);
+ m_suggested_teams_box_label->set_text("");
+}
+
+
+void SuggestedTeamsBox::show(const std::vector<Widelands::Map::SuggestedTeamLineup*>& suggested_teams)
+{
+ hide();
+ m_suggested_teams = suggested_teams;
+
+ if (!m_suggested_teams.empty()) {
+
+ // Initialize
+ uint8_t lineup_counter = 0;
+ set_visible(true);
+ m_suggested_teams_box_label->set_visible(true);
+ /** TRANSLATORS: Label for the list of suggested teams when choosing a map */
+ m_suggested_teams_box_label->set_text(_("Teams:"));
+ int32_t teamlist_offset = m_suggested_teams_box_label->get_y() +
+ m_suggested_teams_box_label->get_h() +
+ m_padding;
+
+ // Parse suggested teams
+ UI::Icon* player_icon;
+ UI::Textarea * vs_label;
+ for (Widelands::Map::SuggestedTeamLineup* lineup : m_suggested_teams) {
+
+ m_lineup_box =
+ new UI::Box(this, m_indent, teamlist_offset + lineup_counter * m_label_height,
+ UI::Box::Horizontal, get_w() - m_indent);
+
+ m_lineup_box->set_size(get_w(), m_label_height + m_padding);
+
+ bool is_first = true;
+ for (Widelands::Map::SuggestedTeam* team : *lineup) {
+
+ if (!is_first) {
+ m_lineup_box->add_space(m_padding);
+ vs_label = new UI::Textarea(m_lineup_box, "x", UI::Align_CenterLeft);
+ m_lineup_box->add(vs_label, UI::Box::AlignLeft);
+ vs_label->set_visible(true);
+ m_vs_labels.push_back(vs_label);
+ m_lineup_box->add_space(m_padding);
+ }
+ is_first = false;
+
+ for (uint16_t player : *team) {
+ assert(player < MAX_PLAYERS);
+ const std::string player_filename = (boost::format("pics/fsel_editor_set_player_0%i_pos.png")
+ % (++player)).str().c_str();
+ player_icon = new UI::Icon(m_lineup_box, 0, 0, 20, 20,
+ g_gr->images().get(player_filename));
+ player_icon->set_visible(true);
+ player_icon->set_no_frame();
+ m_lineup_box->add(player_icon, UI::Box::AlignLeft);
+ m_player_icons.push_back(player_icon);
+ } // Players in team
+ } // Teams in lineup
+ ++lineup_counter;
+ } // All lineups
+
+ // Adjust size to content
+ set_size(get_w(), teamlist_offset + lineup_counter * m_label_height);
+ }
+}
+
+}
=== added file 'src/ui_fsmenu/suggested_teams_box.h'
--- src/ui_fsmenu/suggested_teams_box.h 1970-01-01 00:00:00 +0000
+++ src/ui_fsmenu/suggested_teams_box.h 2014-10-13 11:34:08 +0000
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2014 by the Widelands Development Team
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef WL_UI_FSMENU_SUGGESTED_TEAMS_BOX_H
+#define WL_UI_FSMENU_SUGGESTED_TEAMS_BOX_H
+
+#include <set>
+#include <string>
+
+#include "logic/map.h"
+#include "ui_basic/box.h"
+#include "ui_basic/icon.h"
+#include "ui_basic/textarea.h"
+
+
+namespace UI {
+ struct Box;
+
+struct SuggestedTeamsBox : public UI::Box {
+ SuggestedTeamsBox(Panel * parent,
+ int32_t x, int32_t y,
+ uint32_t orientation,
+ int32_t padding, int32_t indent, int32_t label_height,
+ int32_t max_x = 0, int32_t max_y = 0,
+ uint32_t inner_spacing = 0);
+ ~SuggestedTeamsBox();
+
+ void hide();
+ void show(const std::vector<Widelands::Map::SuggestedTeamLineup*>& suggested_teams);
+
+private:
+ int32_t const m_padding;
+ int32_t const m_indent;
+ int32_t const m_label_height;
+ UI::Textarea * m_suggested_teams_box_label;
+ UI::Box* m_lineup_box;
+ std::vector<UI::Icon*> m_player_icons;
+ std::vector<UI::Textarea*> m_vs_labels;
+ std::vector<Widelands::Map::SuggestedTeamLineup*> m_suggested_teams;
+};
+
+}
+
+#endif // end of include guard: WL_UI_FSMENU_SUGGESTED_TEAMS_BOX_H
=== modified file 'src/wlapplication.cc'
--- src/wlapplication.cc 2014-10-11 11:14:25 +0000
+++ src/wlapplication.cc 2014-10-13 11:34:08 +0000
@@ -73,13 +73,11 @@
#include "ui_basic/progresswindow.h"
#include "ui_fsmenu/campaign_select.h"
#include "ui_fsmenu/editor.h"
-#include "ui_fsmenu/editor_mapselect.h"
#include "ui_fsmenu/fileview.h"
#include "ui_fsmenu/internet_lobby.h"
#include "ui_fsmenu/intro.h"
#include "ui_fsmenu/launch_spg.h"
#include "ui_fsmenu/loadgame.h"
-#include "ui_fsmenu/loadreplay.h"
#include "ui_fsmenu/main.h"
#include "ui_fsmenu/mapselect.h"
#include "ui_fsmenu/multiplayer.h"
@@ -344,7 +342,7 @@
// Load the requested map
Widelands::Map map;
i18n::Textdomain td("maps");
- map.set_filename(m_filename.c_str());
+ map.set_filename(m_filename);
std::unique_ptr<Widelands::MapLoader> ml = map.get_correct_loader(m_filename);
if (!ml) {
throw WLWarning
@@ -358,7 +356,7 @@
MapData mapdata;
mapdata.filename = m_filename;
mapdata.name = map.get_name();
- mapdata.author = map.get_author();
+ mapdata.authors = new MapAuthorData(map.get_author());
mapdata.description = map.get_description();
mapdata.nrplayers = map.get_nrplayers();
mapdata.width = map.get_width();
@@ -1330,11 +1328,12 @@
case FullscreenMenuEditor::Load_Map: {
std::string filename;
{
- FullscreenMenuEditorMapSelect emsm;
+ SinglePlayerGameSettingsProvider sp;
+ FullscreenMenuMapSelect emsm(&sp, nullptr, true);
if (emsm.run() <= 0)
break;
- filename = emsm.get_map();
+ filename = emsm.get_map()->filename;
}
EditorInteractive::run_editor(filename.c_str(), "");
return;
@@ -1484,7 +1483,8 @@
{
Widelands::Game game;
if (m_filename.empty()) {
- FullscreenMenuLoadReplay rm(game);
+ SinglePlayerGameSettingsProvider sp;
+ FullscreenMenuLoadGame rm(game, &sp, nullptr, true);
if (rm.run() <= 0)
return;
=== modified file 'src/wui/buildingwindow.cc'
--- src/wui/buildingwindow.cc 2014-09-18 18:52:34 +0000
+++ src/wui/buildingwindow.cc 2014-10-13 11:34:08 +0000
@@ -229,7 +229,7 @@
const Widelands::BuildingDescr & building_descr =
*tribe.get_building_descr(enhancement);
- std::string tooltip = (boost::format(_("Enhance to %s"))
+ std::string enhance_tooltip = (boost::format(_("Enhance to %s"))
% building_descr.descname().c_str()).str()
+ "<br><font size=11>" + _("Construction costs:") + "</font><br>"
+ waremap_to_richtext(tribe, building_descr.enhancement_cost());
@@ -239,7 +239,7 @@
(capsbuttons, "enhance", 0, 0, 34, 34,
g_gr->images().get("pics/but4.png"),
building_descr.get_icon(),
- tooltip);
+ enhance_tooltip);
// button id = building id
enhancebtn->sigclicked.connect([this, enhancement] {act_enhance(enhancement);});
Follow ups
-
[Merge] lp:~widelands-dev/widelands/i18nfixes into lp:widelands
From: noreply, 2014-10-28
-
Re: [Merge] lp:~widelands-dev/widelands/i18nfixes into lp:widelands
From: SirVer, 2014-10-28
-
Re: [Merge] lp:~widelands-dev/widelands/i18nfixes into lp:widelands
From: TiborB, 2014-10-27
-
Re: [Merge] lp:~widelands-dev/widelands/i18nfixes into lp:widelands
From: GunChleoc, 2014-10-27
-
Re: [Merge] lp:~widelands-dev/widelands/i18nfixes into lp:widelands
From: TiborB, 2014-10-26
-
Re: [Merge] lp:~widelands-dev/widelands/i18nfixes into lp:widelands
From: SirVer, 2014-10-26
-
Re: [Merge] lp:~widelands-dev/widelands/i18nfixes into lp:widelands
From: GunChleoc, 2014-10-26
-
Re: [Merge] lp:~widelands-dev/widelands/i18nfixes into lp:widelands
From: TiborB, 2014-10-25
-
Re: [Merge] lp:~widelands-dev/widelands/i18nfixes into lp:widelands
From: GunChleoc, 2014-10-25
-
Re: [Merge] lp:~widelands-dev/widelands/i18nfixes into lp:widelands
From: GunChleoc, 2014-10-19
-
Re: [Merge] lp:~widelands-dev/widelands/i18nfixes into lp:widelands
From: TiborB, 2014-10-18
-
Re: [Merge] lp:~widelands-dev/widelands/i18nfixes into lp:widelands
From: TiborB, 2014-10-18
-
Re: [Merge] lp:~widelands-dev/widelands/i18nfixes into lp:widelands
From: GunChleoc, 2014-10-18
-
Re: [Merge] lp:~widelands-dev/widelands/i18nfixes into lp:widelands
From: TiborB, 2014-10-18
-
Re: [Merge] lp:~widelands-dev/widelands/i18nfixes into lp:widelands
From: GunChleoc, 2014-10-18
-
Re: [Merge] lp:~widelands-dev/widelands/i18nfixes into lp:widelands
From: TiborB, 2014-10-17
-
Re: [Merge] lp:~widelands-dev/widelands/i18nfixes into lp:widelands
From: GunChleoc, 2014-10-17
-
Re: [Merge] lp:~widelands-dev/widelands/i18nfixes into lp:widelands
From: GunChleoc, 2014-10-16
-
Re: [Merge] lp:~widelands-dev/widelands/i18nfixes into lp:widelands
From: TiborB, 2014-10-15