widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #01654
[Merge] lp:~widelands-dev/widelands/gci18nfixes into lp:widelands
SirVer has proposed merging lp:~widelands-dev/widelands/gci18nfixes into lp:widelands.
Requested reviews:
Widelands Developers (widelands-dev)
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/gci18nfixes/+merge/192288
- Fixes a bunch of strings to in .cc and .lua files to be translatable in more languages.
- Adds support for ngettext into Lua, the lua xgettext extractor.
To be merged after b18.
--
https://code.launchpad.net/~widelands-dev/widelands/gci18nfixes/+merge/192288
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/gci18nfixes into lp:widelands.
=== modified file 'compile.sh'
--- compile.sh 2013-07-18 12:31:57 +0000
+++ compile.sh 2013-10-23 05:48:49 +0000
@@ -58,33 +58,37 @@
local_var_ready=0
while [ $local_var_ready -eq 0 ]
do
- echo " "
- echo " Should Widelands be build in [r]elease or [d]ebug mode?"
- echo " "
- read local_var_choice
- echo " "
- case $local_var_choice in
- r) echo " -> Release mode selected" ; var_build=1 ; local_var_ready=1 ;;
- d) echo " -> Debug mode selected" ; var_build=0 ; local_var_ready=1 ;;
- *) echo " -> Bad choice. Please try again!" ;;
- esac
+var_build=1
+local_var_ready=1
+# echo " "
+# echo " Should Widelands be build in [r]elease or [d]ebug mode?"
+# echo " "
+# read local_var_choice
+# echo " "
+# case $local_var_choice in
+# r) echo " -> Release mode selected" ; var_build=1 ; local_var_ready=1 ;;
+# d) echo " -> Debug mode selected" ; var_build=0 ; local_var_ready=1 ;;
+# *) echo " -> Bad choice. Please try again!" ;;
+# esac
done
local_var_ready=0
- if [ $var_build -eq 0 ] ; then
- while [ $local_var_ready -eq 0 ]
- do
- echo " "
- echo " Should translations be build [y]/[n]?"
- echo " "
- read local_var_choice
- echo " "
- case $local_var_choice in
- y) echo " -> Translations will be build" ; var_build_lang=1 ; local_var_ready=1 ;;
- n) echo " -> Translations will not be build" ; var_build_lang=0 ; local_var_ready=1 ;;
- *) echo " -> Bad choice. Please try again!" ;;
- esac
- done
- fi
+var_build_lang=0
+local_var_ready=1
+# if [ $var_build -eq 0 ] ; then
+# while [ $local_var_ready -eq 0 ]
+# do
+# echo " "
+# echo " Should translations be build [y]/[n]?"
+# echo " "
+# read local_var_choice
+# echo " "
+# case $local_var_choice in
+# y) echo " -> Translations will be build" ; var_build_lang=1 ; local_var_ready=1 ;;
+# n) echo " -> Translations will not be build" ; var_build_lang=0 ; local_var_ready=1 ;;
+# *) echo " -> Bad choice. Please try again!" ;;
+# esac
+# done
+# fi
return 0
}
@@ -154,9 +158,9 @@
update_script () {
# First check if this is an bzr checkout at all - only in that case,
# creation of a script makes any sense.
- if ! [ -f .bzr/branch-format ] ; then
+# if ! [ -f .bzr/branch-format ] ; then
return 0
- fi
+# fi
while :
do
echo " "
=== modified file 'po/map_plateau.wmf/map_plateau.wmf.pot'
--- po/map_plateau.wmf/map_plateau.wmf.pot 2013-09-15 17:41:36 +0000
+++ po/map_plateau.wmf/map_plateau.wmf.pot 2013-10-23 05:48:49 +0000
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: Widelands svnVERSION\n"
"Report-Msgid-Bugs-To: widelands-public@xxxxxxxxxxxxxxxxxxxxx\n"
-"POT-Creation-Date: 2013-09-15 17:41+0000\n"
+"POT-Creation-Date: 2013-10-23 05:46+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"
=== modified file 'po/maps/maps.pot'
--- po/maps/maps.pot 2013-09-15 17:41:36 +0000
+++ po/maps/maps.pot 2013-10-23 05:48:49 +0000
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: Widelands svnVERSION\n"
"Report-Msgid-Bugs-To: widelands-public@xxxxxxxxxxxxxxxxxxxxx\n"
-"POT-Creation-Date: 2013-09-15 17:41+0000\n"
+"POT-Creation-Date: 2013-10-23 05:46+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"
=== modified file 'po/mp_scenario_island_hopping.wmf/mp_scenario_island_hopping.wmf.pot'
--- po/mp_scenario_island_hopping.wmf/mp_scenario_island_hopping.wmf.pot 2013-09-15 17:41:36 +0000
+++ po/mp_scenario_island_hopping.wmf/mp_scenario_island_hopping.wmf.pot 2013-10-23 05:48:49 +0000
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: Widelands svnVERSION\n"
"Report-Msgid-Bugs-To: widelands-public@xxxxxxxxxxxxxxxxxxxxx\n"
-"POT-Creation-Date: 2013-09-15 17:41+0000\n"
+"POT-Creation-Date: 2013-10-23 05:46+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"
=== modified file 'po/mp_scenario_smugglers.wmf/mp_scenario_smugglers.wmf.pot'
--- po/mp_scenario_smugglers.wmf/mp_scenario_smugglers.wmf.pot 2013-09-15 17:41:36 +0000
+++ po/mp_scenario_smugglers.wmf/mp_scenario_smugglers.wmf.pot 2013-10-23 05:48:49 +0000
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: Widelands svnVERSION\n"
"Report-Msgid-Bugs-To: widelands-public@xxxxxxxxxxxxxxxxxxxxx\n"
-"POT-Creation-Date: 2013-09-15 17:41+0000\n"
+"POT-Creation-Date: 2013-10-23 05:46+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"
=== modified file 'po/scenario_atl01.wmf/scenario_atl01.wmf.pot'
--- po/scenario_atl01.wmf/scenario_atl01.wmf.pot 2013-09-15 17:41:36 +0000
+++ po/scenario_atl01.wmf/scenario_atl01.wmf.pot 2013-10-23 05:48:49 +0000
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: Widelands svnVERSION\n"
"Report-Msgid-Bugs-To: widelands-public@xxxxxxxxxxxxxxxxxxxxx\n"
-"POT-Creation-Date: 2013-09-15 17:41+0000\n"
+"POT-Creation-Date: 2013-10-23 05:46+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"
=== modified file 'po/scenario_dummy.wmf/scenario_dummy.wmf.pot'
--- po/scenario_dummy.wmf/scenario_dummy.wmf.pot 2013-09-15 17:41:36 +0000
+++ po/scenario_dummy.wmf/scenario_dummy.wmf.pot 2013-10-23 05:48:49 +0000
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: Widelands svnVERSION\n"
"Report-Msgid-Bugs-To: widelands-public@xxxxxxxxxxxxxxxxxxxxx\n"
-"POT-Creation-Date: 2013-09-15 17:41+0000\n"
+"POT-Creation-Date: 2013-10-23 05:46+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"
=== modified file 'po/scenario_emp01.wmf/scenario_emp01.wmf.pot'
--- po/scenario_emp01.wmf/scenario_emp01.wmf.pot 2013-09-15 17:41:36 +0000
+++ po/scenario_emp01.wmf/scenario_emp01.wmf.pot 2013-10-23 05:48:49 +0000
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: Widelands svnVERSION\n"
"Report-Msgid-Bugs-To: widelands-public@xxxxxxxxxxxxxxxxxxxxx\n"
-"POT-Creation-Date: 2013-09-15 17:41+0000\n"
+"POT-Creation-Date: 2013-10-23 05:46+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"
@@ -86,12 +86,12 @@
"* Build a forester's house to preserve the wood resources of this island."
msgstr ""
-#: ../../campaigns/emp01.wmf/scripting/texts.lua:69
+#: ../../campaigns/emp01.wmf/scripting/texts.lua:70
msgid ""
"* Build a lumberjack's house at the red house symbol, south of your provisional headquarters. Cutting down enough trees for more buildings will take a while. You can speed the game up using PAGE UP and slow it down again with PAGE DOWN."
msgstr ""
-#: ../../campaigns/emp01.wmf/scripting/texts.lua:153
+#: ../../campaigns/emp01.wmf/scripting/texts.lua:154
msgid ""
"* Build a lumberjack's house at the red point, south of your provisional headquarters. Cutting down enough trees for more buildings will take a while. You can speed the game up using PAGE UP and slow it down again with PAGE DOWN."
msgstr ""
=== modified file 'po/scenario_emp02.wmf/scenario_emp02.wmf.pot'
--- po/scenario_emp02.wmf/scenario_emp02.wmf.pot 2013-09-15 17:41:36 +0000
+++ po/scenario_emp02.wmf/scenario_emp02.wmf.pot 2013-10-23 05:48:49 +0000
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: Widelands svnVERSION\n"
"Report-Msgid-Bugs-To: widelands-public@xxxxxxxxxxxxxxxxxxxxx\n"
-"POT-Creation-Date: 2013-09-15 17:41+0000\n"
+"POT-Creation-Date: 2013-10-23 05:46+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"
=== modified file 'po/scenario_t01.wmf/scenario_t01.wmf.pot'
--- po/scenario_t01.wmf/scenario_t01.wmf.pot 2013-09-15 17:41:36 +0000
+++ po/scenario_t01.wmf/scenario_t01.wmf.pot 2013-10-23 05:48:49 +0000
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: Widelands svnVERSION\n"
"Report-Msgid-Bugs-To: widelands-public@xxxxxxxxxxxxxxxxxxxxx\n"
-"POT-Creation-Date: 2013-09-15 17:41+0000\n"
+"POT-Creation-Date: 2013-10-23 05:46+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"
=== modified file 'po/scenario_t02.wmf/scenario_t02.wmf.pot'
--- po/scenario_t02.wmf/scenario_t02.wmf.pot 2013-09-15 17:41:36 +0000
+++ po/scenario_t02.wmf/scenario_t02.wmf.pot 2013-10-23 05:48:49 +0000
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: Widelands svnVERSION\n"
"Report-Msgid-Bugs-To: widelands-public@xxxxxxxxxxxxxxxxxxxxx\n"
-"POT-Creation-Date: 2013-09-15 17:41+0000\n"
+"POT-Creation-Date: 2013-10-23 05:46+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"
=== modified file 'po/scenario_t03.wmf/scenario_t03.wmf.pot'
--- po/scenario_t03.wmf/scenario_t03.wmf.pot 2013-09-15 17:41:36 +0000
+++ po/scenario_t03.wmf/scenario_t03.wmf.pot 2013-10-23 05:48:49 +0000
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: Widelands svnVERSION\n"
"Report-Msgid-Bugs-To: widelands-public@xxxxxxxxxxxxxxxxxxxxx\n"
-"POT-Creation-Date: 2013-09-15 17:41+0000\n"
+"POT-Creation-Date: 2013-10-23 05:46+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"
=== modified file 'po/scenario_tutorial01.wmf/scenario_tutorial01.wmf.pot'
--- po/scenario_tutorial01.wmf/scenario_tutorial01.wmf.pot 2013-09-15 17:41:36 +0000
+++ po/scenario_tutorial01.wmf/scenario_tutorial01.wmf.pot 2013-10-23 05:48:49 +0000
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: Widelands svnVERSION\n"
"Report-Msgid-Bugs-To: widelands-public@xxxxxxxxxxxxxxxxxxxxx\n"
-"POT-Creation-Date: 2013-09-15 17:41+0000\n"
+"POT-Creation-Date: 2013-10-23 05:46+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"
=== modified file 'po/texts/texts.pot'
--- po/texts/texts.pot 2013-09-15 17:41:36 +0000
+++ po/texts/texts.pot 2013-10-23 05:48:49 +0000
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: Widelands svnVERSION\n"
"Report-Msgid-Bugs-To: widelands-public@xxxxxxxxxxxxxxxxxxxxx\n"
-"POT-Creation-Date: 2013-09-15 17:41+0000\n"
+"POT-Creation-Date: 2013-10-23 05:46+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"
=== modified file 'po/tribe_atlanteans/tribe_atlanteans.pot'
--- po/tribe_atlanteans/tribe_atlanteans.pot 2013-09-15 17:41:36 +0000
+++ po/tribe_atlanteans/tribe_atlanteans.pot 2013-10-23 05:48:49 +0000
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: Widelands svnVERSION\n"
"Report-Msgid-Bugs-To: widelands-public@xxxxxxxxxxxxxxxxxxxxx\n"
-"POT-Creation-Date: 2013-09-15 17:41+0000\n"
+"POT-Creation-Date: 2013-10-23 05:46+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"
=== modified file 'po/tribe_barbarians/tribe_barbarians.pot'
--- po/tribe_barbarians/tribe_barbarians.pot 2013-09-15 17:41:36 +0000
+++ po/tribe_barbarians/tribe_barbarians.pot 2013-10-23 05:48:49 +0000
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: Widelands svnVERSION\n"
"Report-Msgid-Bugs-To: widelands-public@xxxxxxxxxxxxxxxxxxxxx\n"
-"POT-Creation-Date: 2013-09-15 17:41+0000\n"
+"POT-Creation-Date: 2013-10-23 05:46+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"
@@ -358,7 +358,6 @@
#: ../../tribes/barbarians/deep_coalmine/help.lua:30
#: ../../tribes/barbarians/deeper_coalmine/help.lua:29
#: ../../tribes/barbarians/metalworks/help.lua:59
-#: ../../tribes/barbarians/trainingscamp/help.lua:27
#: ../../tribes/barbarians/warmill/help.lua:35
msgid ""
"Axefactory"
@@ -1365,7 +1364,6 @@
#: ../../tribes/barbarians/conf:207
#: ../../tribes/barbarians/deep_coalmine/help.lua:32
#: ../../tribes/barbarians/deeper_coalmine/help.lua:31
-#: ../../tribes/barbarians/trainingscamp/help.lua:32
msgid ""
"Helmsmithy"
msgstr ""
@@ -1419,16 +1417,16 @@
"Hunting Spear"
msgstr ""
+#: ../../tribes/barbarians/trainingscamp/help.lua:61
+msgid ""
+"If all needed wares are delivered in time, a %1s can train one new soldier in %2s and %3s to the final level in %4s on average."
+msgstr ""
+
#: ../../tribes/barbarians/battlearena/help.lua:55
msgid ""
"If all needed wares are delivered in time, a %s can train %s for one soldier from 0 to the highest level in %s on average."
msgstr ""
-#: ../../tribes/barbarians/trainingscamp/help.lua:61
-msgid ""
-"If all needed wares are delivered in time, a %s can train one new soldier in %s and %s to the final level in %s on average."
-msgstr ""
-
#: ../../tribes/barbarians/bakery/help.lua:55
#: ../../tribes/barbarians/cattlefarm/help.lua:48
msgid ""
@@ -2073,10 +2071,18 @@
msgstr ""
#: ../../tribes/barbarians/trainingscamp/help.lua:27
+msgid ""
+"Provided by the Axefactory"
+msgstr ""
+
+#: ../../tribes/barbarians/trainingscamp/help.lua:32
+msgid ""
+"Provided by the Helmsmithy"
+msgstr ""
+
#: ../../tribes/barbarians/trainingscamp/help.lua:29
-#: ../../tribes/barbarians/trainingscamp/help.lua:32
msgid ""
-"Provided by the "
+"Provided by the War Mill"
msgstr ""
#: ../../tribes/barbarians/axefactory/help.lua:16
@@ -2601,161 +2607,21 @@
"The Axe is a basic weapon for the barbarians. All young soldiers are equipped with it."
msgstr ""
-#: ../../tribes/barbarians/axefactory/help.lua:8
-msgid ""
-"The Barbarian Axefactory"
-msgstr ""
-
#: ../../tribes/barbarians/axefactory/help.lua:16
msgid ""
"The Barbarian Axefactory is the intermediate production site in a series of three buildings. It is an upgrade from the Metalwork Shop but doesn't require additional qualification for the worker."
msgstr ""
-#: ../../tribes/barbarians/bakery/help.lua:8
-msgid ""
-"The Barbarian Bakery"
-msgstr ""
-
-#: ../../tribes/barbarians/battlearena/help.lua:8
-msgid ""
-"The Barbarian Battle Arena"
-msgstr ""
-
-#: ../../tribes/barbarians/cattlefarm/help.lua:8
-msgid ""
-"The Barbarian Cattle Farm"
-msgstr ""
-
-#: ../../tribes/barbarians/coalmine/help.lua:8
-msgid ""
-"The Barbarian Coal Mine"
-msgstr ""
-
-#: ../../tribes/barbarians/deep_coalmine/help.lua:8
-msgid ""
-"The Barbarian Deep Coal Mine"
-msgstr ""
-
-#: ../../tribes/barbarians/deep_goldmine/help.lua:8
-msgid ""
-"The Barbarian Deep Gold Mine"
-msgstr ""
-
-#: ../../tribes/barbarians/deep_oremine/help.lua:8
-msgid ""
-"The Barbarian Deep Iron Ore Mine"
-msgstr ""
-
-#: ../../tribes/barbarians/deeper_coalmine/help.lua:8
-msgid ""
-"The Barbarian Deeper Coal Mine"
-msgstr ""
-
-#: ../../tribes/barbarians/deeper_goldmine/help.lua:8
-msgid ""
-"The Barbarian Deeper Gold Mine"
-msgstr ""
-
-#: ../../tribes/barbarians/deeper_oremine/help.lua:8
-msgid ""
-"The Barbarian Deeper Iron Ore Mine"
-msgstr ""
-
-#: ../../tribes/barbarians/farm/help.lua:8
-msgid ""
-"The Barbarian Farm"
-msgstr ""
-
-#: ../../tribes/barbarians/fernery/help.lua:8
-msgid ""
-"The Barbarian Fernery"
-msgstr ""
-
-#: ../../tribes/barbarians/fishers_hut/help.lua:8
-msgid ""
-"The Barbarian Fisher's Hut"
-msgstr ""
-
-#: ../../tribes/barbarians/gamekeepers_hut/help.lua:8
-msgid ""
-"The Barbarian Gamekeeper's Hut"
-msgstr ""
-
-#: ../../tribes/barbarians/goldmine/help.lua:8
-msgid ""
-"The Barbarian Gold Mine"
-msgstr ""
-
-#: ../../tribes/barbarians/granitemine/help.lua:8
-msgid ""
-"The Barbarian Granite Mine"
-msgstr ""
-
-#: ../../tribes/barbarians/hunters_hut/help.lua:8
-msgid ""
-"The Barbarian Hunter's Hut"
-msgstr ""
-
-#: ../../tribes/barbarians/oremine/help.lua:8
-msgid ""
-"The Barbarian Iron Ore Mine"
-msgstr ""
-
-#: ../../tribes/barbarians/lime_kiln/help.lua:8
-msgid ""
-"The Barbarian Limekiln"
-msgstr ""
-
-#: ../../tribes/barbarians/lumberjacks_hut/help.lua:8
-msgid ""
-"The Barbarian Lumberjack's Hut"
-msgstr ""
-
-#: ../../tribes/barbarians/metalworks/help.lua:8
-msgid ""
-"The Barbarian Metalwork Shop"
-msgstr ""
-
#: ../../tribes/barbarians/metalworks/help.lua:16
msgid ""
"The Barbarian Metalwork Shop is the basic production site in a series of three buildings and creates all the tools that Barbarians need. The others are for weapons."
msgstr ""
-#: ../../tribes/barbarians/micro-brewery/help.lua:8
-msgid ""
-"The Barbarian Micro Brewery"
-msgstr ""
-
-#: ../../tribes/barbarians/quarry/help.lua:8
-msgid ""
-"The Barbarian Quarry"
-msgstr ""
-
-#: ../../tribes/barbarians/rangers_hut/help.lua:8
-msgid ""
-"The Barbarian Ranger's Hut"
-msgstr ""
-
-#: ../../tribes/barbarians/trainingscamp/help.lua:8
-msgid ""
-"The Barbarian Trainingscamp"
-msgstr ""
-
-#: ../../tribes/barbarians/warmill/help.lua:8
-msgid ""
-"The Barbarian War Mill"
-msgstr ""
-
#: ../../tribes/barbarians/warmill/help.lua:16
msgid ""
"The Barbarian War Mill is their most advanced production site for weapons. As such it needs to be upgraded from an Axefactory."
msgstr ""
-#: ../../tribes/barbarians/well/help.lua:8
-msgid ""
-"The Barbarian Well"
-msgstr ""
-
#: ../../tribes/barbarians/well/help.lua:47
msgid ""
"The Carrier needs %s to get one bucket full of water."
@@ -3283,7 +3149,6 @@
#: ../../tribes/barbarians/conf:201
#: ../../tribes/barbarians/deep_coalmine/help.lua:31
#: ../../tribes/barbarians/deeper_coalmine/help.lua:30
-#: ../../tribes/barbarians/trainingscamp/help.lua:29
msgid ""
"War Mill"
msgstr ""
=== modified file 'po/tribe_empire/tribe_empire.pot'
--- po/tribe_empire/tribe_empire.pot 2013-09-15 17:41:36 +0000
+++ po/tribe_empire/tribe_empire.pot 2013-10-23 05:48:49 +0000
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: Widelands svnVERSION\n"
"Report-Msgid-Bugs-To: widelands-public@xxxxxxxxxxxxxxxxxxxxx\n"
-"POT-Creation-Date: 2013-09-15 17:41+0000\n"
+"POT-Creation-Date: 2013-10-23 05:46+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"
=== modified file 'po/widelands/gd.po'
--- po/widelands/gd.po 2013-10-09 05:12:14 +0000
+++ po/widelands/gd.po 2013-10-23 05:48:49 +0000
@@ -1523,8 +1523,29 @@
msgstr ""
#: ../../src/logic/production_program.cc:1022
-msgid "Recruited "
-msgstr ""
+msgid "Recruited %s"
+msgstr "%s air a thrusadh"
+
+#
+msgid "Provided by the Axefactory"
+msgstr "'Ga sholar leis an fhactaraidh thuaghan"
+
+#
+msgid "Provided by the War Mill"
+msgstr "'Ga sholar leis a' cheàrdach-cogaidh"
+
+#
+msgid "Provided by the Helmsmithy"
+msgstr "'Ga sholar leis a' cheàrdach chlogaidean"
+
+msgid "If all needed wares are delivered in time, "
+"a %1s can train one new soldier in %2s and %3s "
+"to the final level in %4s on average."
+msgstr "Ma thèid na h-uile bathar a lìbhrigeadh ri àm, "
+"bheir %1s %4s 'sa chuibheas gus %2s is %3s aig saighdear "
+"a thrèanadh gun leibheil dheireannach."
+
+
#: ../../src/logic/production_program.cc:1069
msgid "distance"
@@ -1727,12 +1748,13 @@
#, c-format
msgid ""
"should breed resource type %s, which does not exist in world; tribe is not "
-"compatible with world"
+"compatible with world"
+
msgstr ""
#: ../../src/logic/worker.cc:605
-msgid "Out of "
-msgstr ""
+msgid "Out of %s"
+msgstr "%s a dhìth"
#: ../../src/logic/worker.cc:608
msgid ""
@@ -2164,8 +2186,22 @@
#: ../../src/network/internet_gaming.cc:434
#, c-format
-msgid "Server time offset is %i seconds."
-msgstr ""
+msgid "Server time offset is %u second."
+msgid_plural "Server time offset is %u seconds."
+msgstr[0] "Tha frith-àireamh ama an fhrithealaiche na %u diog."
+msgstr[1] "Tha frith-àireamh ama an fhrithealaiche na %u dhiog."
+msgstr[2] "Tha frith-àireamh ama an fhrithealaiche na %u diogan."
+msgstr[3] "Tha frith-àireamh ama an fhrithealaiche na %u diog."
+
+#: ../../src/network/internet_gaming.cc:434
+#, c-format
+msgid "InternetGaming: Server time offset is %u second."
+msgid_plural "InternetGaming: Server time offset is %u seconds."
+msgstr[0] "Geama eadar-lìn: Tha frith-àireamh ama an fhrithealaiche na %u diog."
+msgstr[1] "Geama eadar-lìn: Tha frith-àireamh ama an fhrithealaiche na %u dhiog."
+msgstr[2] "Geama eadar-lìn: Tha frith-àireamh ama an fhrithealaiche na %u diogan."
+msgstr[3] "Geama eadar-lìn: Tha frith-àireamh ama an fhrithealaiche na %u diog."
+
#: ../../src/network/internet_gaming.cc:454
msgid "Invalid message type"
@@ -2539,6 +2575,10 @@
msgid "Received command number %s, that is disallowed in this state."
msgstr ""
+#, c-format
+msgid "%1$i%% built"
+msgstr "%1$i%% air a thogail"
+
#: ../../src/network/network_gaming_messages.cc:142
msgid "Client reports time to host that is running backwards."
msgstr ""
@@ -3033,8 +3073,13 @@
#: ../../src/ui_fsmenu/launchMPG.cc:649
#, c-format
-msgid "* %i Players\n"
-msgstr ""
+msgid "* %u Player\n"
+msgid_plural "* %u Players\n"
+msgstr[0] "* %u chluicheadair\n"
+msgstr[1] "* %u chluicheadair\n"
+msgstr[2] "* %u cluicheadairean\n"
+msgstr[3] "* %u cluicheadair\n"
+
#: ../../src/ui_fsmenu/launchMPG.cc:650
#, c-format
@@ -3198,8 +3243,8 @@
msgstr "Sguab às am faidhle"
#: ../../src/ui_fsmenu/loadgame.cc:158 ../../src/ui_fsmenu/loadreplay.cc:139
-msgid "Do you really want to delete "
-msgstr ""
+msgid "Do you really want to delete %s?"
+msgstr "A bheil thu airson %s a sguabadh às?"
#: ../../src/ui_fsmenu/loadgame.cc:215
msgid "Savegame from dedicated server"
=== modified file 'po/widelands/widelands.pot'
--- po/widelands/widelands.pot 2013-09-15 17:41:36 +0000
+++ po/widelands/widelands.pot 2013-10-23 05:48:49 +0000
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: widelands-public@xxxxxxxxxxxxxxxxxxxxx\n"
-"POT-Creation-Date: 2013-09-15 19:41+0200\n"
+"POT-Creation-Date: 2013-10-23 07:46+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@xxxxxx>\n"
@@ -39,15 +39,15 @@
msgid "WARNING"
msgstr ""
-#: ../../src/save_handler.cc:75
+#: ../../src/save_handler.cc:76
msgid "Saving game..."
msgstr ""
-#: ../../src/save_handler.cc:94
+#: ../../src/save_handler.cc:95
msgid "Saving failed!"
msgstr ""
-#: ../../src/save_handler.cc:113
+#: ../../src/save_handler.cc:114
msgid "Game saved"
msgstr ""
@@ -87,23 +87,23 @@
msgid "--double is disabled. This is not a debug build!"
msgstr ""
-#: ../../src/wlapplication.cc:1332
+#: ../../src/wlapplication.cc:1340
msgid "This is Widelands-"
msgstr ""
-#: ../../src/wlapplication.cc:1334
+#: ../../src/wlapplication.cc:1342
msgid ""
"Usage: widelands <option0>=<value0> ... <optionN>=<valueN>\n"
"\n"
msgstr ""
-#: ../../src/wlapplication.cc:1335
+#: ../../src/wlapplication.cc:1343
msgid ""
"Options:\n"
"\n"
msgstr ""
-#: ../../src/wlapplication.cc:1339
+#: ../../src/wlapplication.cc:1347
msgid ""
" --<config-entry-name>=value overwrites any config file setting\n"
"\n"
@@ -115,11 +115,11 @@
" files, savegames and replays\n"
msgstr ""
-#: ../../src/wlapplication.cc:1347
+#: ../../src/wlapplication.cc:1355
msgid " Default is ~/.widelands\n"
msgstr ""
-#: ../../src/wlapplication.cc:1350
+#: ../../src/wlapplication.cc:1358
msgid ""
" --record=FILENAME Record all events to the given filename for\n"
" later playback\n"
@@ -137,7 +137,7 @@
" If this is 0 replays are not deleted.\n"
msgstr ""
-#: ../../src/wlapplication.cc:1365
+#: ../../src/wlapplication.cc:1373
msgid ""
"Sound options:\n"
" --nosound Starts the game with sound disabled.\n"
@@ -154,11 +154,17 @@
" --loadgame=FILENAME Directly loads the savegame FILENAME.\n"
msgstr ""
-#: ../../src/wlapplication.cc:1378
+#: ../../src/wlapplication.cc:1387
+msgid ""
+" --script=FILENAME Run the given Lua script after initialization.\n"
+" Only valid with --scenario, --loadgame, or --editor.\n"
+msgstr ""
+
+#: ../../src/wlapplication.cc:1389
msgid " --dedicated=FILENAME Starts a dedicated server with FILENAME as map\n"
msgstr ""
-#: ../../src/wlapplication.cc:1381
+#: ../../src/wlapplication.cc:1392
msgid ""
" --speed_of_new_game The speed that the new game will run at\n"
" when started, with factor 1000 (0 is pause,\n"
@@ -167,8 +173,6 @@
" Whether to enter roadbuilding mode\n"
" automatically after placing a flag that is\n"
" not connected to a road.\n"
-" --write_HTML=[yes|no]\n"
-" Write HTML-helpfiles for parsed game data.\n"
"\n"
"Graphic options:\n"
" --fullscreen=[yes|no]\n"
@@ -179,13 +183,13 @@
" --yres=[...] Height of the window in pixel.\n"
msgstr ""
-#: ../../src/wlapplication.cc:1400
+#: ../../src/wlapplication.cc:1409
msgid ""
" --opengl=[0|1]\n"
" Enables OpenGL rendering\n"
msgstr ""
-#: ../../src/wlapplication.cc:1404
+#: ../../src/wlapplication.cc:1413
msgid ""
"\n"
"Options for the internal window manager:\n"
@@ -208,22 +212,22 @@
"\n"
msgstr ""
-#: ../../src/wlapplication.cc:1428
+#: ../../src/wlapplication.cc:1437
msgid ""
" --double Start the game twice (for localhost network\n"
" testing)\n"
"\n"
msgstr ""
-#: ../../src/wlapplication.cc:1432
+#: ../../src/wlapplication.cc:1441
msgid " --verbose Enable verbose debug messages\n"
msgstr ""
-#: ../../src/wlapplication.cc:1433
+#: ../../src/wlapplication.cc:1442
msgid " --help Show this help\n"
msgstr ""
-#: ../../src/wlapplication.cc:1437
+#: ../../src/wlapplication.cc:1446
msgid ""
"Bug reports? Suggestions? Check out the project website:\n"
" https://launchpad.net/widelands\n"
@@ -232,29 +236,29 @@
"\n"
msgstr ""
-#: ../../src/wlapplication.cc:1525
+#: ../../src/wlapplication.cc:1534
msgid "Fallback settings in effect"
msgstr ""
-#: ../../src/wlapplication.cc:1527
+#: ../../src/wlapplication.cc:1536
msgid ""
"Your video settings could not be enabled, and fallback settings are in "
"effect. Please check the graphics options!"
msgstr ""
-#: ../../src/wlapplication.cc:1598
+#: ../../src/wlapplication.cc:1607
msgid "Warning: "
msgstr ""
-#: ../../src/wlapplication.cc:1602
+#: ../../src/wlapplication.cc:1611
msgid "Game data error"
msgstr ""
-#: ../../src/wlapplication.cc:1607
+#: ../../src/wlapplication.cc:1616
msgid "Unexpected error during the game"
msgstr ""
-#: ../../src/wlapplication.cc:1611
+#: ../../src/wlapplication.cc:1620
msgid ""
"\n"
"\n"
@@ -263,7 +267,7 @@
"using build "
msgstr ""
-#: ../../src/wlapplication.cc:1617
+#: ../../src/wlapplication.cc:1626
msgid ""
". Please add this information to your report.\n"
"\n"
@@ -271,321 +275,48 @@
"It is often - though not always - possible to load it and continue playing.\n"
msgstr ""
-#: ../../src/wlapplication.cc:1729
+#: ../../src/wlapplication.cc:1738
msgid "The address of the game server is invalid"
msgstr ""
-#: ../../src/wlapplication.cc:1834 ../../src/network/nethost.cc:2050
+#: ../../src/wlapplication.cc:1843 ../../src/network/nethost.cc:2058
#: ../../src/wui/game_summary.cc:90
msgid "Player"
msgstr ""
-#: ../../src/wlapplication.cc:2029 ../../src/network/netclient.cc:197
-#: ../../src/network/nethost.cc:839
+#: ../../src/wlapplication.cc:2038 ../../src/network/netclient.cc:197
+#: ../../src/network/nethost.cc:840
msgid "Preparing game"
msgstr ""
-#: ../../src/wlapplication.cc:2137
+#: ../../src/wlapplication.cc:2146
msgid "End of replay"
msgstr ""
-#: ../../src/wlapplication.cc:2139
+#: ../../src/wlapplication.cc:2148
msgid ""
"The end of the replay has been reached and the game has been paused. You may "
"unpause the game and continue watching if you want to."
msgstr ""
-#: ../../src/wlapplication.cc:2222 ../../src/logic/game.cc:375
-#: ../../src/logic/game.cc:414
+#: ../../src/wlapplication.cc:2231 ../../src/logic/game.cc:375
+#: ../../src/logic/game.cc:408
msgid "Loading..."
msgstr ""
-#: ../../src/writeHTML.cc:42
-msgid "Requesters"
-msgstr ""
-
-#: ../../src/writeHTML.cc:57
-msgid "Providers"
-msgstr ""
-
-#: ../../src/writeHTML.cc:72
-msgid "Successors"
-msgstr ""
-
-#: ../../src/writeHTML.cc:87
-msgid "Predecessors"
-msgstr ""
-
-#: ../../src/writeHTML.cc:102
-msgid "Employers"
-msgstr ""
-
-#: ../../src/writeHTML.cc:265 ../../src/writeHTML.cc:271
-msgid "Building types"
-msgstr ""
-
-#: ../../src/writeHTML.cc:276 ../../src/writeHTML.cc:510
-#: ../../src/writeHTML.cc:1463
-msgid "Icon"
-msgstr ""
-
-#: ../../src/writeHTML.cc:278 ../../src/writeHTML.cc:512
-#: ../../src/writeHTML.cc:1465 ../../src/ui_fsmenu/internet_lobby.cc:155
-#: ../../src/wui/building_statistics_menu.cc:110
-msgid "Name"
-msgstr ""
-
-#: ../../src/writeHTML.cc:280 ../../src/wui/building_statistics_menu.cc:111
-msgid "Size"
-msgstr ""
-
-#: ../../src/writeHTML.cc:282
-msgid "Buildable"
-msgstr ""
-
-#: ../../src/writeHTML.cc:284
-msgid "Enhanced"
-msgstr ""
-
-#: ../../src/writeHTML.cc:286
-msgid "Conquer<br/>range"
-msgstr ""
-
-#: ../../src/writeHTML.cc:288 ../../src/writeHTML.cc:514
-msgid "Vision<br/>range"
-msgstr ""
-
-#: ../../src/writeHTML.cc:315 ../../src/writeHTML.cc:371
-#: ../../src/logic/building.cc:545
-msgid "Mine"
-msgstr ""
-
-#: ../../src/writeHTML.cc:319 ../../src/writeHTML.cc:387
-#: ../../src/logic/building.cc:546
-msgid "Small"
-msgstr ""
-
-#: ../../src/writeHTML.cc:323 ../../src/writeHTML.cc:381
-#: ../../src/logic/building.cc:547
-#: ../../src/editor/ui_menus/editor_main_menu_random_map.cc:255
-msgid "Medium"
-msgstr ""
-
-#: ../../src/writeHTML.cc:328 ../../src/writeHTML.cc:376
-#: ../../src/logic/building.cc:547
-msgid "Big"
-msgstr ""
-
-#: ../../src/writeHTML.cc:332 ../../src/writeHTML.cc:335
-#: ../../src/ui_basic/messagebox.cc:99
-#: ../../src/editor/tools/editor_info_tool.cc:75
-#: ../../src/editor/tools/editor_info_tool.cc:76
-msgid "Yes"
-msgstr ""
-
-#: ../../src/writeHTML.cc:332 ../../src/writeHTML.cc:335
-#: ../../src/ui_basic/messagebox.cc:106
-#: ../../src/editor/tools/editor_info_tool.cc:75
-#: ../../src/editor/tools/editor_info_tool.cc:76
-msgid "No"
-msgstr ""
-
-#: ../../src/writeHTML.cc:373
-msgid "Is mine."
-msgstr ""
-
-#: ../../src/writeHTML.cc:378
-msgid "Is big."
-msgstr ""
-
-#: ../../src/writeHTML.cc:383
-msgid "Is medium."
-msgstr ""
-
-#: ../../src/writeHTML.cc:389
-msgid "Is small."
-msgstr ""
-
-#: ../../src/writeHTML.cc:396
-msgid "Is not buildable."
-msgstr ""
-
-#: ../../src/writeHTML.cc:403
-msgid "Is enhanced."
-msgstr ""
-
-#: ../../src/writeHTML.cc:410
-#, c-format
-msgid "Conquer range is %u."
-msgstr ""
-
-#: ../../src/writeHTML.cc:418 ../../src/writeHTML.cc:642
-#, c-format
-msgid "Vision range is %u."
-msgstr ""
-
-#: ../../src/writeHTML.cc:426 ../../src/writeHTML.cc:649
-msgid "Build cost"
-msgstr ""
-
-#: ../../src/writeHTML.cc:436
-#, c-format
-msgid "%s's constructionsite"
-msgstr ""
-
-#: ../../src/writeHTML.cc:448
-msgid "Enhancements"
-msgstr ""
-
-#: ../../src/writeHTML.cc:458
-#, c-format
-msgid "%s's enhancement"
-msgstr ""
-
-#: ../../src/writeHTML.cc:499 ../../src/writeHTML.cc:505
-msgid "Worker types"
-msgstr ""
-
-#: ../../src/writeHTML.cc:516
-msgid "Needed<br/>experience"
-msgstr ""
-
-#: ../../src/writeHTML.cc:518
-msgid "Becomes"
-msgstr ""
-
-#: ../../src/writeHTML.cc:577
-msgid "Combat Properties"
-msgstr ""
-
-#: ../../src/writeHTML.cc:584
-#, c-format
-msgid "Hitpoints is %u, plus %u for each level above 0 (maximum level is %u)."
-msgstr ""
-
-#: ../../src/writeHTML.cc:594
-#, c-format
-msgid ""
-"Attack is between %u and %u, plus %u for each level above 0 (maximum level "
-"is %u)."
-msgstr ""
-
-#: ../../src/writeHTML.cc:604
-#, c-format
-msgid "Defense is %u, plus %u for each level above 0 (maximum level is %u)."
-msgstr ""
-
-#: ../../src/writeHTML.cc:614
-#, c-format
-msgid "Evade is %u, plus %u for each level above 0 (maximum level is %u)."
-msgstr ""
-
-#: ../../src/writeHTML.cc:660 ../../src/writeHTML.cc:671
-#, c-format
-msgid "%s's creation"
-msgstr ""
-
-#: ../../src/writeHTML.cc:682
-msgid "Spawns in warehouses."
-msgstr ""
-
-#: ../../src/writeHTML.cc:691
-#, c-format
-msgid "Needs experience from working %u times to become"
-msgstr ""
-
-#: ../../src/writeHTML.cc:699
-#, c-format
-msgid "%s's promotion"
-msgstr ""
-
-#: ../../src/writeHTML.cc:710 ../../src/writeHTML.cc:855
-msgid "Programs"
-msgstr ""
-
-#: ../../src/writeHTML.cc:764
-msgid "UNKNOWN"
-msgstr ""
-
-#: ../../src/writeHTML.cc:771 ../../src/wui/ware_statistics_menu.cc:177
-msgid "Production"
-msgstr ""
-
-#: ../../src/writeHTML.cc:775 ../../src/wui/general_statistics_menu.cc:180
-#: ../../src/wui/productionsitewindow.cc:106 ../../src/wui/transport_ui.cc:66
-#: ../../src/wui/warehousewindow.cc:211
-msgid "Workers"
-msgstr ""
-
-#: ../../src/writeHTML.cc:786
-#, c-format
-msgid "%s's employee"
-msgstr ""
-
-#: ../../src/writeHTML.cc:796
-msgid "Inputs"
-msgstr ""
-
-#: ../../src/writeHTML.cc:807
-#, c-format
-msgid "%s's input"
-msgstr ""
-
-#: ../../src/writeHTML.cc:819
-msgid "Output"
-msgstr ""
-
-#: ../../src/writeHTML.cc:830 ../../src/writeHTML.cc:844
-#, c-format
-msgid "%s's output"
-msgstr ""
-
-#: ../../src/writeHTML.cc:893 ../../src/writeHTML.cc:1037
-#: ../../src/writeHTML.cc:1100 ../../src/writeHTML.cc:1129
-#: ../../src/writeHTML.cc:1150 ../../src/writeHTML.cc:1170
-#: ../../src/writeHTML.cc:1192 ../../src/writeHTML.cc:1236
-#: ../../src/writeHTML.cc:1274 ../../src/writeHTML.cc:1316
-#: ../../src/writeHTML.cc:1344 ../../src/writeHTML.cc:1369
-#: ../../src/writeHTML.cc:1394 ../../src/writeHTML.cc:1412
-msgid "Documentation for program command "
-msgstr ""
-
-#: ../../src/writeHTML.cc:1017
-msgid "workers of this site"
-msgstr ""
-
-#: ../../src/writeHTML.cc:1047
-#, c-format
-msgid "site's program %s"
-msgstr ""
-
-#: ../../src/writeHTML.cc:1114
-#, c-format
-msgid "%s's program %s"
-msgstr ""
-
-#: ../../src/writeHTML.cc:1138 ../../src/writeHTML.cc:1179
-#, c-format
-msgid " %u.%03u s"
-msgstr ""
-
-#: ../../src/writeHTML.cc:1452 ../../src/writeHTML.cc:1458
-msgid "Ware types"
-msgstr ""
-
#: ../../src/economy/cmd_call_economy_balance.cc:86
-#: ../../src/economy/fleet.cc:767 ../../src/economy/portdock.cc:619
-#: ../../src/economy/request.cc:240 ../../src/economy/wares_queue.cc:287
+#: ../../src/economy/fleet.cc:770 ../../src/economy/portdock.cc:537
+#: ../../src/economy/request.cc:241 ../../src/economy/wares_queue.cc:287
#: ../../src/game_io/game_cmd_queue_data_packet.cc:84
#: ../../src/game_io/game_game_class_data_packet.cc:44
#: ../../src/game_io/game_interactive_player_data_packet.cc:79
-#: ../../src/game_io/game_player_economies_data_packet.cc:71
+#: ../../src/game_io/game_player_economies_data_packet.cc:87
#: ../../src/game_io/game_player_info_data_packet.cc:143
-#: ../../src/logic/battle.cc:408
+#: ../../src/logic/battle.cc:407
#: ../../src/logic/cmd_calculate_statistics.cc:44
#: ../../src/logic/cmd_incorporate.cc:46
#: ../../src/logic/cmd_luacoroutine.cc:75 ../../src/logic/cmd_luascript.cc:56
-#: ../../src/logic/cmd_queue.cc:191 ../../src/logic/critter_bob.cc:387
+#: ../../src/logic/cmd_queue.cc:184 ../../src/logic/critter_bob.cc:387
#: ../../src/logic/immovable.cc:793 ../../src/logic/immovable.cc:1489
#: ../../src/logic/instances.cc:71 ../../src/logic/instances.cc:129
#: ../../src/logic/instances.cc:495 ../../src/logic/legacy.cc:428
@@ -601,36 +332,36 @@
#: ../../src/logic/playercommand.cc:1757 ../../src/logic/playercommand.cc:1855
#: ../../src/logic/playercommand.cc:1933 ../../src/logic/playercommand.cc:1977
#: ../../src/logic/replay.cc:116 ../../src/logic/requirements.cc:48
-#: ../../src/logic/ship.cc:984
-#: ../../src/map_io/widelands_map_bob_data_packet.cc:136
+#: ../../src/logic/ship.cc:1045
+#: ../../src/map_io/widelands_map_bob_data_packet.cc:135
#: ../../src/map_io/widelands_map_bobdata_data_packet.cc:372
#: ../../src/map_io/widelands_map_bobdata_data_packet.cc:387
#: ../../src/map_io/widelands_map_bobdata_data_packet.cc:481
#: ../../src/map_io/widelands_map_bobdata_data_packet.cc:497
#: ../../src/map_io/widelands_map_bobdata_data_packet.cc:549
-#: ../../src/map_io/widelands_map_building_data_packet.cc:111
+#: ../../src/map_io/widelands_map_building_data_packet.cc:110
#: ../../src/map_io/widelands_map_buildingdata_data_packet.cc:247
#: ../../src/map_io/widelands_map_buildingdata_data_packet.cc:348
#: ../../src/map_io/widelands_map_buildingdata_data_packet.cc:385
#: ../../src/map_io/widelands_map_buildingdata_data_packet.cc:465
-#: ../../src/map_io/widelands_map_buildingdata_data_packet.cc:763
-#: ../../src/map_io/widelands_map_buildingdata_data_packet.cc:860
-#: ../../src/map_io/widelands_map_buildingdata_data_packet.cc:1159
-#: ../../src/map_io/widelands_map_buildingdata_data_packet.cc:1235
-#: ../../src/map_io/widelands_map_exploration_data_packet.cc:92
-#: ../../src/map_io/widelands_map_extradata_data_packet.cc:99
-#: ../../src/map_io/widelands_map_flag_data_packet.cc:118
-#: ../../src/map_io/widelands_map_flagdata_data_packet.cc:221
-#: ../../src/map_io/widelands_map_heights_data_packet.cc:51
+#: ../../src/map_io/widelands_map_buildingdata_data_packet.cc:734
+#: ../../src/map_io/widelands_map_buildingdata_data_packet.cc:831
+#: ../../src/map_io/widelands_map_buildingdata_data_packet.cc:1130
+#: ../../src/map_io/widelands_map_buildingdata_data_packet.cc:1206
+#: ../../src/map_io/widelands_map_exploration_data_packet.cc:91
+#: ../../src/map_io/widelands_map_extradata_data_packet.cc:98
+#: ../../src/map_io/widelands_map_flag_data_packet.cc:119
+#: ../../src/map_io/widelands_map_flagdata_data_packet.cc:220
+#: ../../src/map_io/widelands_map_heights_data_packet.cc:50
#: ../../src/map_io/widelands_map_node_ownership_data_packet.cc:62
#: ../../src/map_io/widelands_map_object_packet.cc:61
-#: ../../src/map_io/widelands_map_player_position_data_packet.cc:59
-#: ../../src/map_io/widelands_map_road_data_packet.cc:67
-#: ../../src/map_io/widelands_map_roaddata_data_packet.cc:207
-#: ../../src/map_io/widelands_map_terrain_data_packet.cc:78
-#: ../../src/map_io/widelands_map_version_data_packet.cc:74
-#: ../../src/map_io/widelands_map_ware_data_packet.cc:74
-#: ../../src/map_io/widelands_map_waredata_data_packet.cc:206
+#: ../../src/map_io/widelands_map_player_position_data_packet.cc:58
+#: ../../src/map_io/widelands_map_road_data_packet.cc:66
+#: ../../src/map_io/widelands_map_roaddata_data_packet.cc:206
+#: ../../src/map_io/widelands_map_terrain_data_packet.cc:77
+#: ../../src/map_io/widelands_map_version_data_packet.cc:73
+#: ../../src/map_io/widelands_map_ware_data_packet.cc:73
+#: ../../src/map_io/widelands_map_waredata_data_packet.cc:205
#, c-format
msgid "unknown/unhandled version %u"
msgstr ""
@@ -661,7 +392,7 @@
msgid "economy: %s"
msgstr ""
-#: ../../src/economy/fleet.cc:769 ../../src/economy/portdock.cc:621
+#: ../../src/economy/fleet.cc:772 ../../src/economy/portdock.cc:539
#, c-format
msgid "loading portdock: %s"
msgstr ""
@@ -697,7 +428,7 @@
msgstr ""
#: ../../src/editor/editorinteractive.cc:80
-#: ../../src/ui_fsmenu/launchMPG.cc:160
+#: ../../src/ui_fsmenu/launchMPG.cc:162
msgid "Players"
msgstr ""
@@ -710,7 +441,7 @@
msgstr ""
#: ../../src/editor/editorinteractive.cc:190
-#: ../../src/editor/editorinteractive.cc:610
+#: ../../src/editor/editorinteractive.cc:606
#, c-format
msgid "Loading tribe: %s"
msgstr ""
@@ -725,7 +456,7 @@
msgstr ""
#: ../../src/editor/editorinteractive.cc:206
-#: ../../src/editor/editorinteractive.cc:614
+#: ../../src/editor/editorinteractive.cc:610
msgid "Loading graphics..."
msgstr ""
@@ -737,20 +468,20 @@
msgid "The Map is unsaved, do you really want to quit?"
msgstr ""
-#: ../../src/editor/editorinteractive.cc:601
+#: ../../src/editor/editorinteractive.cc:597
#: ../../src/editor/ui_menus/editor_main_menu_new_map.cc:179
#: ../../src/editor/ui_menus/editor_main_menu_random_map.cc:486
#: ../../src/editor/ui_menus/editor_main_menu_save_map.cc:182
-#: ../../src/logic/map.h:166
+#: ../../src/logic/map.h:168
msgid "No Name"
msgstr ""
-#: ../../src/editor/editorinteractive.cc:603
-#: ../../src/ui_fsmenu/loadgame.cc:241 ../../src/ui_fsmenu/loadreplay.cc:197
+#: ../../src/editor/editorinteractive.cc:599
+#: ../../src/ui_fsmenu/loadgame.cc:243 ../../src/ui_fsmenu/loadreplay.cc:199
#: ../../src/ui_fsmenu/netsetup_lan.cc:198 ../../src/wui/game_summary.cc:171
#: ../../src/editor/ui_menus/editor_main_menu_new_map.cc:180
#: ../../src/editor/ui_menus/editor_main_menu_random_map.cc:487
-#: ../../src/logic/map.h:167
+#: ../../src/logic/map.h:169
msgid "Unknown"
msgstr ""
@@ -773,24 +504,24 @@
msgid "interactive player: %s"
msgstr ""
-#: ../../src/game_io/game_player_economies_data_packet.cc:65
+#: ../../src/game_io/game_player_economies_data_packet.cc:62
msgid "there is no flag at the specified location"
msgstr ""
-#: ../../src/game_io/game_player_economies_data_packet.cc:67
-#: ../../src/map_io/widelands_map_player_position_data_packet.cc:55
+#: ../../src/game_io/game_player_economies_data_packet.cc:83
+#: ../../src/map_io/widelands_map_player_position_data_packet.cc:54
#, c-format
-msgid "player %u: %s"
+msgid "player %1$u: %2$s"
msgstr ""
-#: ../../src/game_io/game_player_economies_data_packet.cc:73
+#: ../../src/game_io/game_player_economies_data_packet.cc:89
#, c-format
msgid "economies: %s"
msgstr ""
#: ../../src/game_io/game_player_info_data_packet.cc:54
#, c-format
-msgid "player number (%i) is out of range (1 .. %u)"
+msgid "player number (%1$i) is out of range (1 .. %2$u)"
msgstr ""
#: ../../src/game_io/game_player_info_data_packet.cc:145
@@ -804,17 +535,17 @@
#: ../../src/game_io/game_preload_data_packet.cc:77
#: ../../src/logic/game.cc:248 ../../src/logic/game.cc:344
-#: ../../src/ui_fsmenu/launchMPG.cc:286 ../../src/ui_fsmenu/launchSPG.cc:230
+#: ../../src/ui_fsmenu/launchMPG.cc:288 ../../src/ui_fsmenu/launchSPG.cc:232
#: ../../src/wui/multiplayersetupgroup.cc:356
msgid "Scenario"
msgstr ""
#: ../../src/game_io/game_preload_data_packet.cc:104
-#: ../../src/map_io/widelands_map_allowed_building_types_data_packet.cc:93
-#: ../../src/map_io/widelands_map_allowed_worker_types_data_packet.cc:79
-#: ../../src/map_io/widelands_map_elemental_data_packet.cc:68
-#: ../../src/map_io/widelands_map_objective_data_packet.cc:71
-#: ../../src/map_io/widelands_map_player_names_and_tribes_data_packet.cc:79
+#: ../../src/map_io/widelands_map_allowed_building_types_data_packet.cc:92
+#: ../../src/map_io/widelands_map_allowed_worker_types_data_packet.cc:78
+#: ../../src/map_io/widelands_map_elemental_data_packet.cc:67
+#: ../../src/map_io/widelands_map_objective_data_packet.cc:70
+#: ../../src/map_io/widelands_map_player_names_and_tribes_data_packet.cc:78
#: ../../src/map_io/widelands_map_port_spaces_data_packet.cc:61
#, c-format
msgid "unknown/unhandled version %i"
@@ -830,49 +561,52 @@
#: ../../src/logic/immovable.cc:868 ../../src/logic/immovable.cc:1033
#: ../../src/logic/military_data.cc:51 ../../src/logic/military_data.cc:58
#: ../../src/logic/production_program.cc:114
-#: ../../src/logic/production_program.cc:276
-#: ../../src/logic/production_program.cc:283
-#: ../../src/logic/production_program.cc:301
-#: ../../src/logic/production_program.cc:318
-#: ../../src/logic/production_program.cc:397
-#: ../../src/logic/production_program.cc:401
-#: ../../src/logic/production_program.cc:529
-#: ../../src/logic/production_program.cc:543
-#: ../../src/logic/production_program.cc:661
-#: ../../src/logic/production_program.cc:735
-#: ../../src/logic/production_program.cc:891
-#: ../../src/logic/production_program.cc:989
-#: ../../src/logic/production_program.cc:1069
-#: ../../src/logic/production_program.cc:1079
-#: ../../src/logic/production_program.cc:1090
-#: ../../src/logic/production_program.cc:1246
-#: ../../src/logic/production_program.cc:1268
-#: ../../src/logic/production_program.cc:1327
-#: ../../src/logic/production_program.cc:1339
-#: ../../src/logic/production_program.cc:1348
-#: ../../src/logic/production_program.cc:1438 ../../src/logic/soldier.cc:70
+#: ../../src/logic/production_program.cc:284
+#: ../../src/logic/production_program.cc:291
+#: ../../src/logic/production_program.cc:309
+#: ../../src/logic/production_program.cc:326
+#: ../../src/logic/production_program.cc:351
+#: ../../src/logic/production_program.cc:370
+#: ../../src/logic/production_program.cc:403
+#: ../../src/logic/production_program.cc:407
+#: ../../src/logic/production_program.cc:544
+#: ../../src/logic/production_program.cc:558
+#: ../../src/logic/production_program.cc:676
+#: ../../src/logic/production_program.cc:750
+#: ../../src/logic/production_program.cc:918
+#: ../../src/logic/production_program.cc:1016
+#: ../../src/logic/production_program.cc:1097
+#: ../../src/logic/production_program.cc:1107
+#: ../../src/logic/production_program.cc:1118
+#: ../../src/logic/production_program.cc:1274
+#: ../../src/logic/production_program.cc:1286
+#: ../../src/logic/production_program.cc:1294
+#: ../../src/logic/production_program.cc:1353
+#: ../../src/logic/production_program.cc:1365
+#: ../../src/logic/production_program.cc:1374
+#: ../../src/logic/production_program.cc:1465 ../../src/logic/soldier.cc:70
#: ../../src/logic/soldier.cc:77 ../../src/logic/soldier.cc:185
#: ../../src/map_io/widelands_map_buildingdata_data_packet.cc:557
#: ../../src/map_io/widelands_map_players_messages_data_packet.cc:131
#, c-format
-msgid "expected %s but found \"%s\""
+msgid "expected %1$s but found \"%2$s\""
msgstr ""
#: ../../src/graphic/animation.cc:138
msgid "frame number"
msgstr ""
-#: ../../src/io/dedicated_log.cc:66 ../../src/network/internet_gaming.cc:795
+#: ../../src/io/dedicated_log.cc:66 ../../src/network/internet_gaming.cc:805
#: ../../src/ui_fsmenu/mapselect.cc:503 ../../src/ui_fsmenu/mapselect.cc:507
msgid "unknown"
msgstr ""
-#: ../../src/logic/battle.cc:174
+#: ../../src/logic/battle.cc:173
#, c-format
msgid "[battle] soldier %u lose battle\n"
msgstr ""
-#: ../../src/logic/battle.cc:178
+#: ../../src/logic/battle.cc:177
#, c-format
msgid "[battle] waking up winner %d\n"
msgstr ""
@@ -882,25 +616,42 @@
msgid "bad attribute \"%s\""
msgstr ""
+#: ../../src/logic/building.cc:539
+msgid "mine"
+msgstr ""
+
#: ../../src/logic/building.cc:540
-msgid "mine"
-msgstr ""
-
-#: ../../src/logic/building.cc:541
#: ../../src/editor/tools/editor_info_tool.cc:60
msgid "small"
msgstr ""
-#: ../../src/logic/building.cc:542
+#: ../../src/logic/building.cc:541
#: ../../src/editor/tools/editor_info_tool.cc:61
msgid "medium"
msgstr ""
-#: ../../src/logic/building.cc:542
+#: ../../src/logic/building.cc:541
#: ../../src/editor/tools/editor_info_tool.cc:62
msgid "big"
msgstr ""
+#: ../../src/logic/building.cc:544
+msgid "Mine"
+msgstr ""
+
+#: ../../src/logic/building.cc:545
+msgid "Small"
+msgstr ""
+
+#: ../../src/logic/building.cc:546
+#: ../../src/editor/ui_menus/editor_main_menu_random_map.cc:255
+msgid "Medium"
+msgstr ""
+
+#: ../../src/logic/building.cc:546
+msgid "Big"
+msgstr ""
+
#: ../../src/logic/cmd_calculate_statistics.cc:46
#, c-format
msgid "calculate statistics function: %s"
@@ -916,16 +667,21 @@
msgid "lua: %s"
msgstr ""
-#: ../../src/logic/cmd_queue.cc:188
+#: ../../src/logic/cmd_queue.cc:181
#, c-format
-msgid "duetime (%i) < gametime (%i)"
+msgid "duetime (%1$i) < gametime (%2$i)"
msgstr ""
-#: ../../src/logic/cmd_queue.cc:193
+#: ../../src/logic/cmd_queue.cc:186
#, c-format
msgid "game logic: %s"
msgstr ""
+#: ../../src/logic/constructionsite.cc:92
+#, c-format
+msgid "%1$i%% built"
+msgstr ""
+
#: ../../src/logic/critter_bob.cc:389
#, c-format
msgid "loading critter: %s"
@@ -962,7 +718,7 @@
msgstr ""
#: ../../src/logic/game.cc:283 ../../src/logic/game.cc:362
-#: ../../src/logic/game.cc:397
+#: ../../src/logic/game.cc:391
msgid "Preloading map"
msgstr ""
@@ -974,15 +730,15 @@
msgid "Loading map"
msgstr ""
-#: ../../src/logic/game.cc:484
+#: ../../src/logic/game.cc:478
msgid "Creating player infrastructure"
msgstr ""
-#: ../../src/logic/game.cc:497 ../../src/logic/player.cc:221
+#: ../../src/logic/game.cc:491 ../../src/logic/player.cc:221
msgid "Missing starting position"
msgstr ""
-#: ../../src/logic/game.cc:499 ../../src/logic/player.cc:223
+#: ../../src/logic/game.cc:493 ../../src/logic/player.cc:223
#, c-format
msgid ""
"Widelands could not start the game, because player %u has no starting "
@@ -991,7 +747,7 @@
"problem."
msgstr ""
-#: ../../src/logic/immovable.cc:141 ../../src/logic/production_program.cc:1647
+#: ../../src/logic/immovable.cc:141 ../../src/logic/production_program.cc:1674
#, c-format
msgid "unknown command type \"%s\""
msgstr ""
@@ -1006,7 +762,7 @@
#: ../../src/logic/immovable.cc:224
#, c-format
-msgid "program %s: %s"
+msgid "program %1$s: %2$s"
msgstr ""
#: ../../src/logic/immovable.cc:256 ../../src/logic/immovable.cc:271
@@ -1020,17 +776,17 @@
#: ../../src/logic/immovable.cc:276
#, c-format
-msgid "[terrain affinity] \"%s\" (not in current world): %s"
+msgid "[terrain affinity] \"%1$s\" (not in current world): %2$s"
msgstr ""
#: ../../src/logic/immovable.cc:312
#, c-format
-msgid "immovable %s has no program \"%s\""
+msgid "immovable %1$s has no program \"%2$s\""
msgstr ""
#: ../../src/logic/immovable.cc:776
#, c-format
-msgid "tribe %s does not define immovable type \"%s\""
+msgid "tribe %1$s does not define immovable type \"%2$s\""
msgstr ""
#: ../../src/logic/immovable.cc:779
@@ -1048,12 +804,12 @@
msgid "immovable type %s"
msgstr ""
-#: ../../src/logic/immovable.cc:829 ../../src/logic/production_program.cc:662
-#: ../../src/logic/production_program.cc:736
+#: ../../src/logic/immovable.cc:829 ../../src/logic/production_program.cc:677
+#: ../../src/logic/production_program.cc:751
msgid "duration in ms"
msgstr ""
-#: ../../src/logic/immovable.cc:868 ../../src/logic/production_program.cc:1438
+#: ../../src/logic/immovable.cc:868 ../../src/logic/production_program.cc:1465
msgid "priority"
msgstr ""
@@ -1098,7 +854,7 @@
#: ../../src/logic/instances.cc:122
#, c-format
-msgid "object %u: %s"
+msgid "object %1$u: %2$s"
msgstr ""
#: ../../src/logic/instances.cc:131
@@ -1106,7 +862,7 @@
msgid "act: %s"
msgstr ""
-#: ../../src/logic/map.cc:363
+#: ../../src/logic/map.cc:365
msgid "Player 1"
msgstr ""
@@ -1120,71 +876,71 @@
#: ../../src/logic/military_data.cc:63
#, c-format
-msgid "expected positive integer >= %u <= 100 but found \"%s\""
+msgid "expected positive integer >= %1$u <= 100 but found \"%2$s\""
msgstr ""
#: ../../src/logic/military_data.cc:75
#, c-format
-msgid "expected positive integer >= %u <= %u but found \"%u\""
+msgid "expected positive integer >= %1$u <= %2$u but found \"%3$u\""
msgstr ""
-#: ../../src/logic/militarysite.cc:62 ../../src/logic/warehouse.cc:251
+#: ../../src/logic/militarysite.cc:62 ../../src/logic/warehouse.cc:248
msgid " conquer"
msgstr ""
-#: ../../src/logic/militarysite.cc:119
+#: ../../src/logic/militarysite.cc:120
#, c-format
msgid "%u soldier"
msgid_plural "%u soldiers"
msgstr[0] ""
msgstr[1] ""
-#: ../../src/logic/militarysite.cc:124
+#: ../../src/logic/militarysite.cc:125
#, c-format
-msgid "%u(+%u) soldier"
-msgid_plural "%u(+%u) soldiers"
+msgid "%1$u(+%2$u) soldier"
+msgid_plural "%1$u(+%2$u) soldiers"
msgstr[0] ""
msgstr[1] ""
-#: ../../src/logic/militarysite.cc:239
+#: ../../src/logic/militarysite.cc:240
#, c-format
msgid "Your soldiers occupied your %s."
msgstr ""
-#: ../../src/logic/militarysite.cc:840
+#: ../../src/logic/militarysite.cc:841
#, c-format
msgid "The enemy defeated your soldiers at the %s."
msgstr ""
-#: ../../src/logic/militarysite.cc:845
+#: ../../src/logic/militarysite.cc:846
msgid "Militarysite lost!"
msgstr ""
-#: ../../src/logic/militarysite.cc:899
+#: ../../src/logic/militarysite.cc:900
#, c-format
msgid "Your soldiers defeated the enemy at the %s."
msgstr ""
-#: ../../src/logic/militarysite.cc:904
+#: ../../src/logic/militarysite.cc:905
msgid "Enemy at site defeated!"
msgstr ""
-#: ../../src/logic/militarysite.cc:949
+#: ../../src/logic/militarysite.cc:950
#, c-format
msgid "Your %s discovered an aggressor.</p>"
msgstr ""
-#: ../../src/logic/militarysite.cc:950
+#: ../../src/logic/militarysite.cc:951
#, c-format
msgid "Your %s is under attack.</p>"
msgstr ""
-#: ../../src/logic/militarysite.cc:958
+#: ../../src/logic/militarysite.cc:959
msgid "You are under attack"
msgstr ""
#: ../../src/logic/playercommand.cc:147
-#: ../../src/map_io/widelands_map_building_data_packet.cc:105
+#: ../../src/map_io/widelands_map_building_data_packet.cc:104
#, c-format
msgid "player %u does not exist"
msgstr ""
@@ -1196,7 +952,7 @@
#: ../../src/logic/playercommand.cc:195
#, c-format
-msgid "player immovable %u: %s"
+msgid "player immovable %1$u: %2$s"
msgstr ""
#: ../../src/logic/playercommand.cc:201
@@ -1221,7 +977,7 @@
#: ../../src/logic/playercommand.cc:444
#, c-format
-msgid "flag %u: %s"
+msgid "flag %1$u: %2$s"
msgstr ""
#: ../../src/logic/playercommand.cc:450
@@ -1233,7 +989,7 @@
#: ../../src/logic/playercommand.cc:619 ../../src/logic/playercommand.cc:677
#: ../../src/map_io/widelands_map_buildingdata_data_packet.cc:242
#, c-format
-msgid "building %u: %s"
+msgid "building %1$u: %2$s"
msgstr ""
#: ../../src/logic/playercommand.cc:507 ../../src/logic/playercommand.cc:581
@@ -1250,7 +1006,7 @@
#: ../../src/logic/playercommand.cc:1169 ../../src/logic/playercommand.cc:1674
#: ../../src/logic/playercommand.cc:1752
#, c-format
-msgid "site %u: %s"
+msgid "site %1$u: %2$s"
msgstr ""
#: ../../src/logic/playercommand.cc:1179
@@ -1280,7 +1036,7 @@
#: ../../src/logic/playercommand.cc:1681
#, c-format
-msgid "soldier %u: %s"
+msgid "soldier %1$u: %2$s"
msgstr ""
#: ../../src/logic/playercommand.cc:1687
@@ -1295,7 +1051,7 @@
#: ../../src/logic/playercommand.cc:1924
#, c-format
-msgid "retreat: value out of range. Received %u expected %u-%u"
+msgid "retreat: value out of range. Received %1$u expected %2$u-%3$u"
msgstr ""
#: ../../src/logic/playercommand.cc:1935
@@ -1316,249 +1072,270 @@
#: ../../src/logic/production_program.cc:87
#, c-format
msgid ""
-"%s is not declared as an input (\"%s=<count>\" was not found in the [inputs] "
-"section)"
+"%1$s is not declared as an input (\"%2$s=<count>\" was not found in the "
+"[inputs] section)"
msgstr ""
#: ../../src/logic/production_program.cc:100
#, c-format
msgid ""
-"wrong order of ware types within group: ware type %s appears after ware type "
-"%s (fix order!)"
+"wrong order of ware types within group: ware type %1$s appears after ware "
+"type %2$s (fix order!)"
msgstr ""
#: ../../src/logic/production_program.cc:114
-#: ../../src/logic/production_program.cc:892
-#: ../../src/logic/production_program.cc:990
+#: ../../src/logic/production_program.cc:919
+#: ../../src/logic/production_program.cc:1017
msgid "count"
msgstr ""
#: ../../src/logic/production_program.cc:119
#, c-format
msgid ""
-"group count is %u but (total) input storage capacity of the specified ware "
-"type(s) is only %u, so the group can never be fulfilled by the site"
-msgstr ""
-
-#: ../../src/logic/production_program.cc:154
-msgid "not "
-msgstr ""
-
-#: ../../src/logic/production_program.cc:176
-#: ../../src/logic/production_program.cc:197
-msgid "economy needs "
-msgstr ""
-
-#: ../../src/logic/production_program.cc:226
-msgid "site has "
-msgstr ""
-
-#: ../../src/logic/production_program.cc:252
+"group count is %1$u but (total) input storage capacity of the specified ware "
+"type(s) is only %2$u, so the group can never be fulfilled by the site"
+msgstr ""
+
+#: ../../src/logic/production_program.cc:155
+#, c-format
+msgid "not %s"
+msgstr ""
+
+#: ../../src/logic/production_program.cc:178
+#: ../../src/logic/production_program.cc:200
+#, c-format
+msgid "economy needs %s"
+msgstr ""
+
+#: ../../src/logic/production_program.cc:233
+#: ../../src/logic/production_program.cc:841
+#: ../../src/logic/production_program.cc:866
+#, c-format
+msgid "%1$s %2$s"
+msgstr ""
+
+#: ../../src/logic/production_program.cc:236
+#: ../../src/logic/production_program.cc:847
+#, c-format
+msgid "%s,"
+msgstr ""
+
+#: ../../src/logic/production_program.cc:241
+#: ../../src/logic/production_program.cc:855
+#, c-format
+msgid "%1$s (%2$i)"
+msgstr ""
+
+#: ../../src/logic/production_program.cc:244
+#, c-format
+msgid "site has%s"
+msgstr ""
+
+#: ../../src/logic/production_program.cc:260
msgid "workers need experience"
msgstr ""
-#: ../../src/logic/production_program.cc:277
+#: ../../src/logic/production_program.cc:285
msgid "ware type or worker type"
msgstr ""
-#: ../../src/logic/production_program.cc:346
+#: ../../src/logic/production_program.cc:354
#, c-format
msgid "invalid condition: %s"
msgstr ""
-#: ../../src/logic/production_program.cc:363
+#: ../../src/logic/production_program.cc:382
+#: ../../src/logic/production_program.cc:397
#, c-format
-msgid "expected {\"failed\"|\"completed\"|\"skipped\"} but found \"%s\""
-msgstr ""
-
-#: ../../src/logic/production_program.cc:376
-msgid "expected \"and\" or end of input"
-msgstr ""
-
-#: ../../src/logic/production_program.cc:385
+msgid "expected \"%s\" or end of input"
+msgstr ""
+
+#: ../../src/logic/production_program.cc:391
msgid "expected condition at end of input"
msgstr ""
-#: ../../src/logic/production_program.cc:391
-msgid "expected \"or\" or end of input"
-msgstr ""
-
-#: ../../src/logic/production_program.cc:424
-#: ../../src/logic/production_program.cc:815
-msgid "failed"
-msgstr ""
-
-#: ../../src/logic/production_program.cc:425
-msgid "completed"
-msgstr ""
-
-#: ../../src/logic/production_program.cc:425
-msgid "skipped"
+#: ../../src/logic/production_program.cc:427
+#, c-format
+msgid "Failed %s"
+msgstr ""
+
+#: ../../src/logic/production_program.cc:429
+#, c-format
+msgid "Completed %s"
msgstr ""
#: ../../src/logic/production_program.cc:431
-#: ../../src/logic/production_program.cc:839
-msgid " and "
-msgstr ""
-
-#: ../../src/logic/production_program.cc:432
-#: ../../src/logic/production_program.cc:818
-msgid " because: "
-msgstr ""
-
-#: ../../src/logic/production_program.cc:443
-#: ../../src/wui/encyclopedia_window.cc:198
-msgid " or "
-msgstr ""
-
-#: ../../src/logic/production_program.cc:444
-msgid " because not: "
-msgstr ""
-
-#: ../../src/logic/production_program.cc:493
+#, c-format
+msgid "Skipped %s"
+msgstr ""
+
+#: ../../src/logic/production_program.cc:447
+#, c-format
+msgid "%s and "
+msgstr ""
+
+#: ../../src/logic/production_program.cc:451
+#, c-format
+msgid "%1$s because: %2$s"
+msgstr ""
+
+#: ../../src/logic/production_program.cc:464
+#, c-format
+msgid "%s or "
+msgstr ""
+
+#: ../../src/logic/production_program.cc:468
+#, c-format
+msgid "%1$s because not: %2$s"
+msgstr ""
+
+#: ../../src/logic/production_program.cc:508
#, c-format
msgid ""
-"the program \"%s\" has not (yet) been declared in %s (wrong declaration "
+"the program \"%1$s\" has not (yet) been declared in %2$s (wrong declaration "
"order?)"
msgstr ""
-#: ../../src/logic/production_program.cc:515
-#: ../../src/logic/production_program.cc:520
-#: ../../src/logic/production_program.cc:525
+#: ../../src/logic/production_program.cc:530
+#: ../../src/logic/production_program.cc:535
+#: ../../src/logic/production_program.cc:540
#, c-format
msgid "%s handling method already defined"
msgstr ""
-#: ../../src/logic/production_program.cc:515
+#: ../../src/logic/production_program.cc:530
msgid "failure"
msgstr ""
-#: ../../src/logic/production_program.cc:520
+#: ../../src/logic/production_program.cc:535
msgid "completion"
msgstr ""
-#: ../../src/logic/production_program.cc:525
+#: ../../src/logic/production_program.cc:540
msgid "skip"
msgstr ""
-#: ../../src/logic/production_program.cc:530
-msgid "{\"failure\"|\"completion\"|\"skip\"}"
-msgstr ""
-
-#: ../../src/logic/production_program.cc:544
-msgid "{\"fail\"|\"complete\"|\"skip\"|\"repeat\"}"
-msgstr ""
-
-#: ../../src/logic/production_program.cc:666
-#: ../../src/logic/production_program.cc:688
+#: ../../src/logic/production_program.cc:681
+#: ../../src/logic/production_program.cc:703
#, c-format
msgid "sleep: %s"
msgstr ""
-#: ../../src/logic/production_program.cc:684
+#: ../../src/logic/production_program.cc:699
#, c-format
msgid "Unknown parameter \"%s\""
msgstr ""
-#: ../../src/logic/production_program.cc:686
+#: ../../src/logic/production_program.cc:701
msgid "No parameter given!"
msgstr ""
-#: ../../src/logic/production_program.cc:719
+#: ../../src/logic/production_program.cc:734
msgid "idle animation is default; calling is not allowed"
msgstr ""
-#: ../../src/logic/production_program.cc:768
+#: ../../src/logic/production_program.cc:783
msgid "expected ware_type1[,ware_type2[,...]][:N] ..."
msgstr ""
-#: ../../src/logic/production_program.cc:842
+#: ../../src/logic/production_program.cc:832
+#, c-format
+msgid "Failed %s because:"
+msgstr ""
+
+#: ../../src/logic/production_program.cc:862
+#, c-format
+msgid "%s and"
+msgstr ""
+
+#: ../../src/logic/production_program.cc:867
msgid " is missing"
msgid_plural " are missing"
msgstr[0] ""
msgstr[1] ""
-#: ../../src/logic/production_program.cc:907
-#: ../../src/logic/production_program.cc:1005
-#, c-format
-msgid ""
-"%s is not declared as an output (\"output=%s\" was not found in the [global] "
-"section)"
-msgstr ""
-
#: ../../src/logic/production_program.cc:934
-#: ../../src/logic/production_program.cc:1030
+#: ../../src/logic/production_program.cc:1032
+#, c-format
+msgid ""
+"%1$s is not declared as an output (\"output=%2$s\" was not found in the "
+"[global] section)"
+msgstr ""
+
+#: ../../src/logic/production_program.cc:961
+#: ../../src/logic/production_program.cc:1057
#, c-format
msgid "%u "
msgstr ""
-#: ../../src/logic/production_program.cc:941
-#: ../../src/logic/production_program.cc:1037
+#: ../../src/logic/production_program.cc:968
+#: ../../src/logic/production_program.cc:1064
msgid ", "
msgstr ""
-#: ../../src/logic/production_program.cc:944
+#: ../../src/logic/production_program.cc:971
#, c-format
msgid "Produced %s"
msgstr ""
-#: ../../src/logic/production_program.cc:1022
-msgid "Recruited "
+#: ../../src/logic/production_program.cc:1066
+#, c-format
+msgid "Recruited %s?"
msgstr ""
-#: ../../src/logic/production_program.cc:1069
+#: ../../src/logic/production_program.cc:1097
msgid "distance"
msgstr ""
-#: ../../src/logic/production_program.cc:1080
-#: ../../src/logic/production_program.cc:1091
+#: ../../src/logic/production_program.cc:1108
+#: ../../src/logic/production_program.cc:1119
msgid "percentage"
msgstr ""
-#: ../../src/logic/production_program.cc:1208
+#: ../../src/logic/production_program.cc:1123
+#, c-format
+msgid "%1$s %2$s mine %3$s"
+msgstr ""
+
+#: ../../src/logic/production_program.cc:1236
#, c-format
msgid "No left resources found!"
msgstr ""
-#: ../../src/logic/production_program.cc:1229
+#: ../../src/logic/production_program.cc:1257
msgid "Main vein exhausted"
msgstr ""
-#: ../../src/logic/production_program.cc:1231
+#: ../../src/logic/production_program.cc:1259
msgid ""
"This mines' main vein exhausted. Expect strongly diminished returns on "
"investment. You should consider to expand, dismantle or destruct it."
msgstr ""
-#: ../../src/logic/production_program.cc:1246
-#: ../../src/logic/production_program.cc:1327
+#: ../../src/logic/production_program.cc:1274
+#: ../../src/logic/production_program.cc:1353
msgid "soldier type"
msgstr ""
-#: ../../src/logic/production_program.cc:1259
-#, c-format
-msgid "expected {\"hp\"|\"attack\"|\"defense\"|\"evade\"} but found \"%s\""
-msgstr ""
-
-#: ../../src/logic/production_program.cc:1268
-#: ../../src/logic/production_program.cc:1348
+#: ../../src/logic/production_program.cc:1294
+#: ../../src/logic/production_program.cc:1374
msgid "level"
msgstr ""
-#: ../../src/logic/production_program.cc:1282
+#: ../../src/logic/production_program.cc:1308
#, c-format
msgid "No soldier to train!"
msgstr ""
-#: ../../src/logic/production_program.cc:1292
-#: ../../src/logic/production_program.cc:1382
+#: ../../src/logic/production_program.cc:1318
+#: ../../src/logic/production_program.cc:1409
#, c-format
msgid "No soldier for this training level found!"
msgstr ""
-#: ../../src/logic/production_program.cc:1358
+#: ../../src/logic/production_program.cc:1385
#, c-format
-msgid "expected level > %u but found \"%s\""
+msgid "expected level > %1$u but found \"%2$s\""
msgstr ""
#: ../../src/logic/productionsite.cc:71
@@ -1588,43 +1365,43 @@
#: ../../src/logic/requirements.cc:233
#, c-format
msgid ""
-"expected atrHP (%u), atrAttack (%u), atrDefense (%u), atrEvade (%u) or "
-"atrTotal (%u) but found unknown attribute value (%u)"
+"expected atrHP (%1$u), atrAttack (%2$u), atrDefense (%3$u), atrEvade (%4$u) "
+"or atrTotal (%5$u) but found unknown attribute value (%6$u)"
msgstr ""
-#: ../../src/logic/ship.cc:423
+#: ../../src/logic/ship.cc:437
msgid "Port space found"
msgstr ""
-#: ../../src/logic/ship.cc:424
+#: ../../src/logic/ship.cc:438
msgid "An expedition ship found a new port build space."
msgstr ""
-#: ../../src/logic/ship.cc:531
+#: ../../src/logic/ship.cc:545
msgid "Island surrounded"
msgstr ""
-#: ../../src/logic/ship.cc:532
+#: ../../src/logic/ship.cc:546
msgid "An expedition ship surrounded its island without any events."
msgstr ""
-#: ../../src/logic/ship.cc:584
+#: ../../src/logic/ship.cc:598
msgid "Coast reached"
msgstr ""
-#: ../../src/logic/ship.cc:586
+#: ../../src/logic/ship.cc:600
msgid "An expedition ship reached a coast and is waiting for further commands."
msgstr ""
-#: ../../src/logic/ship.cc:722
+#: ../../src/logic/ship.cc:764
msgid "Expedition ready"
msgstr ""
-#: ../../src/logic/ship.cc:723
+#: ../../src/logic/ship.cc:765
msgid "An expedition ship is waiting for your commands."
msgstr ""
-#: ../../src/logic/ship.cc:986
+#: ../../src/logic/ship.cc:1047
#, c-format
msgid "loading ship: %s"
msgstr ""
@@ -1635,7 +1412,7 @@
#: ../../src/logic/soldier.cc:82
#, c-format
-msgid "expected positive integer >= %u but found \"%s\""
+msgid "expected positive integer >= %1$u but found \"%2$s\""
msgstr ""
#: ../../src/logic/soldier.cc:186
@@ -1684,52 +1461,53 @@
#: ../../src/logic/tribe.cc:334
#, c-format
-msgid "tribe %s: %s"
+msgid "tribe %1$s: %2$s"
msgstr ""
-#: ../../src/logic/warehouse.cc:464
+#: ../../src/logic/warehouse.cc:454
#, c-format
msgid "A new %s was added to your economy."
msgstr ""
-#: ../../src/logic/worker.cc:109
+#: ../../src/logic/worker.cc:111
#, c-format
msgid ""
"should mine resource %s, which does not exist in world; tribe is not "
"compatible with world"
msgstr ""
-#: ../../src/logic/worker.cc:214
+#: ../../src/logic/worker.cc:216
#, c-format
msgid ""
"should breed resource type %s, which does not exist in world; tribe is not "
"compatible with world"
msgstr ""
-#: ../../src/logic/worker.cc:605
-msgid "Out of "
+#: ../../src/logic/worker.cc:607
+#, c-format
+msgid "Out of %s"
msgstr ""
-#: ../../src/logic/worker.cc:608
+#: ../../src/logic/worker.cc:610
msgid ""
"The worker of this building cannot find any more resources of the following "
"type: "
msgstr ""
-#: ../../src/logic/worker.cc:956
+#: ../../src/logic/worker.cc:958
msgid "A geologist found resources."
msgstr ""
-#: ../../src/logic/worker.cc:1867
+#: ../../src/logic/worker.cc:1872
#, c-format
msgid "Your %s can't find a way home and will likely die."
msgstr ""
-#: ../../src/logic/worker.cc:1874
+#: ../../src/logic/worker.cc:1879
msgid "Worker got lost!"
msgstr ""
-#: ../../src/logic/worker.cc:3088
+#: ../../src/logic/worker.cc:3094
#, c-format
msgid "loading worker: %s"
msgstr ""
@@ -1739,12 +1517,12 @@
msgid "%s: too many terrain types, can not be more than 16"
msgstr ""
-#: ../../src/map_io/widelands_map_allowed_building_types_data_packet.cc:95
+#: ../../src/map_io/widelands_map_allowed_building_types_data_packet.cc:94
#, c-format
msgid "allowed buildings: %s"
msgstr ""
-#: ../../src/map_io/widelands_map_allowed_worker_types_data_packet.cc:81
+#: ../../src/map_io/widelands_map_allowed_worker_types_data_packet.cc:80
#, c-format
msgid "allowed worker types: %s"
msgstr ""
@@ -1759,7 +1537,7 @@
msgid "tribe \"%s\" does not exist"
msgstr ""
-#: ../../src/map_io/widelands_map_bob_data_packet.cc:138
+#: ../../src/map_io/widelands_map_bob_data_packet.cc:137
#, c-format
msgid "bobs: %s"
msgstr ""
@@ -1781,7 +1559,7 @@
#: ../../src/map_io/widelands_map_bobdata_data_packet.cc:367
#, c-format
-msgid "bob %u: %s"
+msgid "bob %1$u: %2$s"
msgstr ""
#: ../../src/map_io/widelands_map_bobdata_data_packet.cc:374
@@ -1804,7 +1582,7 @@
msgid "carrier: %s"
msgstr ""
-#: ../../src/map_io/widelands_map_building_data_packet.cc:113
+#: ../../src/map_io/widelands_map_building_data_packet.cc:112
#, c-format
msgid "buildings: %s"
msgstr ""
@@ -1838,111 +1616,111 @@
#: ../../src/map_io/widelands_map_buildingdata_data_packet.cc:651
#, c-format
msgid ""
-"%s %u has a next_spawn time for worker type \"%s\" set to %u, but it was "
-"previously set to %u\n"
+"%1$s %2$u has a next_spawn time for worker type \"%3$s\" set to %4$u, but it "
+"was previously set to %5$u\n"
msgstr ""
-#: ../../src/map_io/widelands_map_buildingdata_data_packet.cc:765
+#: ../../src/map_io/widelands_map_buildingdata_data_packet.cc:736
#, c-format
msgid "warehouse: %s"
msgstr ""
-#: ../../src/map_io/widelands_map_buildingdata_data_packet.cc:889
+#: ../../src/map_io/widelands_map_buildingdata_data_packet.cc:860
#, c-format
msgid "militarysite: %s"
msgstr ""
-#: ../../src/map_io/widelands_map_buildingdata_data_packet.cc:1046
+#: ../../src/map_io/widelands_map_buildingdata_data_packet.cc:1017
#, c-format
-msgid "program %s was skipped at time %u, but time is only %u"
+msgid "program %1$s was skipped at time %2$u, but time is only %3$u"
msgstr ""
-#: ../../src/map_io/widelands_map_buildingdata_data_packet.cc:1264
+#: ../../src/map_io/widelands_map_buildingdata_data_packet.cc:1235
#, c-format
msgid "trainingsite: %s"
msgstr ""
-#: ../../src/map_io/widelands_map_elemental_data_packet.cc:70
+#: ../../src/map_io/widelands_map_elemental_data_packet.cc:69
#, c-format
msgid "elemental data: %s"
msgstr ""
-#: ../../src/map_io/widelands_map_exploration_data_packet.cc:94
+#: ../../src/map_io/widelands_map_exploration_data_packet.cc:93
#, c-format
msgid "seen: %s"
msgstr ""
-#: ../../src/map_io/widelands_map_extradata_data_packet.cc:101
+#: ../../src/map_io/widelands_map_extradata_data_packet.cc:100
#, c-format
msgid "extradata: %s"
msgstr ""
-#: ../../src/map_io/widelands_map_flag_data_packet.cc:66
+#: ../../src/map_io/widelands_map_flag_data_packet.cc:67
#, c-format
msgid "the node is owned by player %u"
msgstr ""
-#: ../../src/map_io/widelands_map_flag_data_packet.cc:80
+#: ../../src/map_io/widelands_map_flag_data_packet.cc:81
#, c-format
msgid "is owned by player %u"
msgstr ""
-#: ../../src/map_io/widelands_map_flag_data_packet.cc:89
+#: ../../src/map_io/widelands_map_flag_data_packet.cc:90
#, c-format
msgid "has a flag (%u)"
msgstr ""
-#: ../../src/map_io/widelands_map_flag_data_packet.cc:92
+#: ../../src/map_io/widelands_map_flag_data_packet.cc:93
#, c-format
-msgid "neighbour node (%i, %i): %s"
+msgid "neighbour node (%1$i, %2$i): %3$s"
msgstr ""
-#: ../../src/map_io/widelands_map_flag_data_packet.cc:120
+#: ../../src/map_io/widelands_map_flag_data_packet.cc:121
#, c-format
msgid "flags: %s"
msgstr ""
-#: ../../src/map_io/widelands_map_flagdata_data_packet.cc:85
-#, c-format
-msgid "wrong flag (%u) at given position (%i, %i)"
-msgstr ""
-
-#: ../../src/map_io/widelands_map_flagdata_data_packet.cc:90
-#, c-format
-msgid "no flag at given position (%i, %i)"
-msgstr ""
-
-#: ../../src/map_io/widelands_map_flagdata_data_packet.cc:110
-#, c-format
-msgid "has building %u at (%i, %i), which is not at the top left node"
-msgstr ""
-
-#: ../../src/map_io/widelands_map_flagdata_data_packet.cc:117
-#, c-format
-msgid "building (%u): %s"
-msgstr ""
-
-#: ../../src/map_io/widelands_map_flagdata_data_packet.cc:216
-#: ../../src/map_io/widelands_map_ware_data_packet.cc:69
-#, c-format
-msgid "%u: %s"
-msgstr ""
-
-#: ../../src/map_io/widelands_map_flagdata_data_packet.cc:223
+#: ../../src/map_io/widelands_map_flagdata_data_packet.cc:84
+#, c-format
+msgid "wrong flag (%1$u) at given position (%2$i, %3$i)"
+msgstr ""
+
+#: ../../src/map_io/widelands_map_flagdata_data_packet.cc:89
+#, c-format
+msgid "no flag at given position (%1$i, %2$i)"
+msgstr ""
+
+#: ../../src/map_io/widelands_map_flagdata_data_packet.cc:109
+#, c-format
+msgid "has building %1$u at (%2$i, %3$i), which is not at the top left node"
+msgstr ""
+
+#: ../../src/map_io/widelands_map_flagdata_data_packet.cc:116
+#, c-format
+msgid "building (%1$u): %2$s"
+msgstr ""
+
+#: ../../src/map_io/widelands_map_flagdata_data_packet.cc:215
+#: ../../src/map_io/widelands_map_ware_data_packet.cc:68
+#, c-format
+msgid "%1$u: %2$s"
+msgstr ""
+
+#: ../../src/map_io/widelands_map_flagdata_data_packet.cc:222
#, c-format
msgid "flagdata: %s"
msgstr ""
-#: ../../src/map_io/widelands_map_heights_data_packet.cc:53
+#: ../../src/map_io/widelands_map_heights_data_packet.cc:52
#, c-format
msgid "heights: %s"
msgstr ""
-#: ../../src/map_io/widelands_map_loader.cc:85
+#: ../../src/map_io/widelands_map_loader.cc:86
msgid "Invalid World"
msgstr ""
-#: ../../src/map_io/widelands_map_loader.cc:87
+#: ../../src/map_io/widelands_map_loader.cc:88
#, c-format
msgid "The world \"%s\" set by the map, does not exist on your filesystem."
msgstr ""
@@ -1962,34 +1740,35 @@
msgid "map objects: %s"
msgstr ""
-#: ../../src/map_io/widelands_map_objective_data_packet.cc:66
+#: ../../src/map_io/widelands_map_objective_data_packet.cc:65
#, c-format
-msgid "%s: %s"
+msgid "%1$s: %2$s"
msgstr ""
-#: ../../src/map_io/widelands_map_objective_data_packet.cc:73
+#: ../../src/map_io/widelands_map_objective_data_packet.cc:72
#, c-format
msgid "Objectives: %s"
msgstr ""
-#: ../../src/map_io/widelands_map_player_names_and_tribes_data_packet.cc:81
+#: ../../src/map_io/widelands_map_player_names_and_tribes_data_packet.cc:80
#, c-format
msgid "player names and tribes: %s"
msgstr ""
-#: ../../src/map_io/widelands_map_player_position_data_packet.cc:61
+#: ../../src/map_io/widelands_map_player_position_data_packet.cc:60
#, c-format
msgid "player positions: %s"
msgstr ""
#: ../../src/map_io/widelands_map_players_messages_data_packet.cc:89
#, c-format
-msgid "messages are not ordered: sent at %u but previous message sent at %u"
+msgid ""
+"messages are not ordered: sent at %1$u but previous message sent at %2$u"
msgstr ""
#: ../../src/map_io/widelands_map_players_messages_data_packet.cc:95
#, c-format
-msgid "message is sent in the future: sent at %u but gametime is only %u"
+msgid "message is sent in the future: sent at %1$u but gametime is only %2$u"
msgstr ""
#: ../../src/map_io/widelands_map_players_messages_data_packet.cc:104
@@ -2003,24 +1782,25 @@
#: ../../src/map_io/widelands_map_players_messages_data_packet.cc:112
#, c-format
msgid ""
-"duration %u is too large; causes numeric overflow when added to sent time %u"
+"duration %1$u is too large; causes numeric overflow when added to sent time "
+"%2$u"
msgstr ""
#: ../../src/map_io/widelands_map_players_messages_data_packet.cc:118
#, c-format
msgid ""
-"message should have expired at %u; sent at %u with duration %u but gametime "
-"is already %u"
+"message should have expired at %1$u; sent at %2$u with duration %3$u but "
+"gametime is already %4$u"
msgstr ""
#: ../../src/map_io/widelands_map_players_messages_data_packet.cc:161
#, c-format
-msgid "\"%s\": %s"
+msgid "\"%1$s\": %2$s"
msgstr ""
#: ../../src/map_io/widelands_map_players_messages_data_packet.cc:166
#, c-format
-msgid "messages for player %u: %s"
+msgid "messages for player %1$u: %2$s"
msgstr ""
#: ../../src/map_io/widelands_map_players_view_data_packet.cc:216
@@ -2033,149 +1813,158 @@
msgid "port_spaces data: %s"
msgstr ""
-#: ../../src/map_io/widelands_map_road_data_packet.cc:69
+#: ../../src/map_io/widelands_map_road_data_packet.cc:68
#, c-format
msgid "road: %s"
msgstr ""
-#: ../../src/map_io/widelands_map_roaddata_data_packet.cc:129
+#: ../../src/map_io/widelands_map_roaddata_data_packet.cc:128
msgid "no carrier slot"
msgstr ""
-#: ../../src/map_io/widelands_map_roaddata_data_packet.cc:133
+#: ../../src/map_io/widelands_map_roaddata_data_packet.cc:132
#, c-format
msgid ""
"expected 1 but found %u carrier slots in road saved with packet version 2 "
"(old)"
msgstr ""
-#: ../../src/map_io/widelands_map_roaddata_data_packet.cc:202
+#: ../../src/map_io/widelands_map_roaddata_data_packet.cc:201
#, c-format
-msgid "road %u: %s"
+msgid "road %1$u: %2$s"
msgstr ""
-#: ../../src/map_io/widelands_map_roaddata_data_packet.cc:209
+#: ../../src/map_io/widelands_map_roaddata_data_packet.cc:208
#, c-format
msgid "roaddata: %s"
msgstr ""
-#: ../../src/map_io/widelands_map_terrain_data_packet.cc:80
+#: ../../src/map_io/widelands_map_terrain_data_packet.cc:79
#, c-format
msgid "terrain: %s"
msgstr ""
-#: ../../src/map_io/widelands_map_version_data_packet.cc:76
+#: ../../src/map_io/widelands_map_version_data_packet.cc:75
#, c-format
msgid "version: %s"
msgstr ""
-#: ../../src/map_io/widelands_map_ware_data_packet.cc:76
-#: ../../src/map_io/widelands_map_waredata_data_packet.cc:208
+#: ../../src/map_io/widelands_map_ware_data_packet.cc:75
+#: ../../src/map_io/widelands_map_waredata_data_packet.cc:207
#, c-format
msgid "ware data: %s"
msgstr ""
-#: ../../src/map_io/widelands_map_waredata_data_packet.cc:131
-#: ../../src/map_io/widelands_map_waredata_data_packet.cc:201
+#: ../../src/map_io/widelands_map_waredata_data_packet.cc:130
+#: ../../src/map_io/widelands_map_waredata_data_packet.cc:200
#, c-format
-msgid "item %u: %s"
+msgid "item %1$u: %2$s"
msgstr ""
-#: ../../src/network/internet_gaming.cc:116
-#: ../../src/ui_fsmenu/internet_lobby.cc:409
+#: ../../src/network/internet_gaming.cc:117
+#: ../../src/ui_fsmenu/internet_lobby.cc:410
msgid "Connection problem"
msgstr ""
-#: ../../src/network/internet_gaming.cc:116
+#: ../../src/network/internet_gaming.cc:117
msgid "Widelands could not connect to the metaserver."
msgstr ""
-#: ../../src/network/internet_gaming.cc:122 ../../src/network/netclient.cc:102
+#: ../../src/network/internet_gaming.cc:123 ../../src/network/netclient.cc:102
msgid "Could not establish connection to host"
msgstr ""
-#: ../../src/network/internet_gaming.cc:124
+#: ../../src/network/internet_gaming.cc:125
msgid ""
"Widelands could not establish a connection to the given address.\n"
"Either there was no metaserver running at the supposed port or\n"
"your network setup is broken."
msgstr ""
-#: ../../src/network/internet_gaming.cc:171
+#: ../../src/network/internet_gaming.cc:172
msgid "For hosting a game, please take a look at the notes at:"
msgstr ""
-#: ../../src/network/internet_gaming.cc:302
+#: ../../src/network/internet_gaming.cc:303
msgid "Something went wrong: "
msgstr ""
-#: ../../src/network/internet_gaming.cc:392
+#: ../../src/network/internet_gaming.cc:393
msgid "Successfully reconnected to the metaserver!"
msgstr ""
-#: ../../src/network/internet_gaming.cc:399
+#: ../../src/network/internet_gaming.cc:400
msgid "Mixed up"
msgstr ""
-#: ../../src/network/internet_gaming.cc:399
+#: ../../src/network/internet_gaming.cc:400
msgid "The metaserver sent a strange ERROR during connection"
msgstr ""
-#: ../../src/network/internet_gaming.cc:410
+#: ../../src/network/internet_gaming.cc:411
msgid "Unexpected packet"
msgstr ""
-#: ../../src/network/internet_gaming.cc:412
+#: ../../src/network/internet_gaming.cc:413
#, c-format
msgid ""
"Expected a LOGIN, RELOGIN or REJECTED packet from server, but received "
"command %s. Maybe the metaserver is using a different protocol version ?"
msgstr ""
-#: ../../src/network/internet_gaming.cc:425
+#: ../../src/network/internet_gaming.cc:426
#, c-format
msgid "WARNING: Received a %s command although we are not in CONNECTING state."
msgstr ""
-#: ../../src/network/internet_gaming.cc:434
-#, c-format
-msgid "Server time offset is %i seconds."
-msgstr ""
-
-#: ../../src/network/internet_gaming.cc:454
+#: ../../src/network/internet_gaming.cc:436
+#, c-format
+msgid "InternetGaming: Server time offset is %u second."
+msgid_plural "InternetGaming: Server time offset is %u seconds."
+msgstr[0] ""
+msgstr[1] ""
+
+#: ../../src/network/internet_gaming.cc:441
+#, c-format
+msgid "Server time offset is %u second."
+msgid_plural "Server time offset is %u seconds."
+msgstr[0] ""
+msgstr[1] ""
+
+#: ../../src/network/internet_gaming.cc:464
msgid "Invalid message type"
msgstr ""
-#: ../../src/network/internet_gaming.cc:454
+#: ../../src/network/internet_gaming.cc:464
#, c-format
msgid "Invalid chat message type \"%s\"."
msgstr ""
-#: ../../src/network/internet_gaming.cc:535
+#: ../../src/network/internet_gaming.cc:545
msgid "ERROR: "
msgstr ""
-#: ../../src/network/internet_gaming.cc:539
+#: ../../src/network/internet_gaming.cc:549
msgid "Chat message could not be sent. "
msgstr ""
-#: ../../src/network/internet_gaming.cc:560
+#: ../../src/network/internet_gaming.cc:570
msgid "Received an unknown command from the metaserver: "
msgstr ""
-#: ../../src/network/internet_gaming.cc:692
+#: ../../src/network/internet_gaming.cc:702
msgid "Message could not be sent: You are not connected to the metaserver!"
msgstr ""
-#: ../../src/network/internet_gaming.cc:704
+#: ../../src/network/internet_gaming.cc:714
msgid "Message could not be sent: Was this supposed to be a private message?"
msgstr ""
-#: ../../src/network/internet_gaming.cc:778
+#: ../../src/network/internet_gaming.cc:788
msgid "Conversion error"
msgstr ""
-#: ../../src/network/internet_gaming.cc:779
+#: ../../src/network/internet_gaming.cc:789
#, c-format
msgid "Conversion from std::string to bool failed. String was \"%s\""
msgstr ""
@@ -2186,7 +1975,7 @@
msgstr ""
#: ../../src/network/internet_gaming_messages.cc:43
-#: ../../src/network/nethost.cc:1260
+#: ../../src/network/nethost.cc:1268
msgid "The sent password was incorrect!"
msgstr ""
@@ -2251,25 +2040,25 @@
"the server shut down as you tried to connect."
msgstr ""
-#: ../../src/network/netclient.cc:863
+#: ../../src/network/netclient.cc:864
msgid "/me 's file failed md5 checksumming."
msgstr ""
-#: ../../src/network/netclient.cc:893
+#: ../../src/network/netclient.cc:894
msgid ""
"/me checked the received file. Although md5 check summing succeeded, I can "
"not handle the file."
msgstr ""
-#: ../../src/network/netclient.cc:1108
+#: ../../src/network/netclient.cc:1109
msgid " An automatic savegame will be created."
msgstr ""
-#: ../../src/network/netclient.cc:1112
+#: ../../src/network/netclient.cc:1113
msgid "Disconnected from Host"
msgstr ""
-#: ../../src/network/nethost.cc:368
+#: ../../src/network/nethost.cc:369
msgid ""
"<br>Available host commands are:<br>/help - Shows this help<br>/announce "
"<msg> - Send a chatmessage as announcement (system chat)<br>/warn <name> "
@@ -2279,155 +2068,162 @@
"- Puts game back to normal speed."
msgstr ""
-#: ../../src/network/nethost.cc:382
+#: ../../src/network/nethost.cc:383
msgid "Wrong use, should be: /announce <message>"
msgstr ""
-#: ../../src/network/nethost.cc:395
+#: ../../src/network/nethost.cc:396
msgid "Wrong use, should be: /warn <name> <reason>"
msgstr ""
-#: ../../src/network/nethost.cc:403
+#: ../../src/network/nethost.cc:404
msgid "Why would you warn yourself?"
msgstr ""
-#: ../../src/network/nethost.cc:405
+#: ../../src/network/nethost.cc:406
msgid "Why would you want to warn the dedicated server?"
msgstr ""
-#: ../../src/network/nethost.cc:409 ../../src/network/nethost.cc:435
+#: ../../src/network/nethost.cc:410 ../../src/network/nethost.cc:436
#, c-format
msgid "The client %s could not be found."
msgstr ""
-#: ../../src/network/nethost.cc:420
+#: ../../src/network/nethost.cc:421
msgid "Wrong use, should be: /kick <name> <reason>"
msgstr ""
-#: ../../src/network/nethost.cc:431
+#: ../../src/network/nethost.cc:432
msgid "You can not kick yourself!"
msgstr ""
-#: ../../src/network/nethost.cc:433
+#: ../../src/network/nethost.cc:434
msgid "You can not kick the dedicated server"
msgstr ""
-#: ../../src/network/nethost.cc:438
+#: ../../src/network/nethost.cc:439
#, c-format
msgid "Are you sure you want to kick %s?<br>"
msgstr ""
-#: ../../src/network/nethost.cc:439
+#: ../../src/network/nethost.cc:440
#, c-format
msgid "The stated reason was: %s<br>"
msgstr ""
-#: ../../src/network/nethost.cc:440
+#: ../../src/network/nethost.cc:441
#, c-format
msgid "If yes, type: /ack_kick %s"
msgstr ""
-#: ../../src/network/nethost.cc:451
+#: ../../src/network/nethost.cc:452
msgid "kick acknowledgement cancelled: No name given!"
msgstr ""
-#: ../../src/network/nethost.cc:453
+#: ../../src/network/nethost.cc:454
msgid "Wrong use, should be: /ack_kick <name>"
msgstr ""
-#: ../../src/network/nethost.cc:459
+#: ../../src/network/nethost.cc:460
msgid "kick acknowledgement cancelled: Wrong name given!"
msgstr ""
-#: ../../src/network/nethost.cc:470
+#: ../../src/network/nethost.cc:471
msgid "Pause was already forced - game should be paused."
msgstr ""
-#: ../../src/network/nethost.cc:482
+#: ../../src/network/nethost.cc:483
msgid "There is no forced pause - nothing to end."
msgstr ""
-#: ../../src/network/nethost.cc:493
+#: ../../src/network/nethost.cc:494
msgid "Invalid command! Type /help for a list of commands."
msgstr ""
-#: ../../src/network/nethost.cc:733
+#: ../../src/network/nethost.cc:734
#, c-format
msgid ""
"This is a dedicated server. Send \"@%s help\" to get a full list of "
"available commands."
msgstr ""
-#: ../../src/network/nethost.cc:1201
+#: ../../src/network/nethost.cc:1206
msgid ""
"<br>Available host commands are:<br>help - Shows this help<br>host $ - "
"Tries to run the host command $<br>save $ - Saves the current game state as "
"$.wgf"
msgstr ""
-#: ../../src/network/nethost.cc:1208
+#: ../../src/network/nethost.cc:1213
msgid ""
"<br>Available host commands are:<br>help - Shows this "
"help<br>host $ - Tries to run the host command $"
msgstr ""
-#: ../../src/network/nethost.cc:1213
+#: ../../src/network/nethost.cc:1218
msgid "pwd $ - Sends the password $ to the host"
msgstr ""
-#: ../../src/network/nethost.cc:1220
+#: ../../src/network/nethost.cc:1225
msgid ""
"Access to host commands denied. To gain access, send the password with pwd "
"command."
msgstr ""
-#: ../../src/network/nethost.cc:1225
+#: ../../src/network/nethost.cc:1230
#, c-format
-msgid "%s told me to run the command: \"%s\""
+msgid "%1$s told me to run the command: \"%2$s\""
msgstr ""
-#: ../../src/network/nethost.cc:1234
+#: ../../src/network/nethost.cc:1239
msgid "Sorry! Saving was deactivated on this dedicated server!"
msgstr ""
-#: ../../src/network/nethost.cc:1237
+#: ../../src/network/nethost.cc:1242
msgid "Can not save, as long as no game is running!"
msgstr ""
-#: ../../src/network/nethost.cc:1248
+#: ../../src/network/nethost.cc:1253
msgid "Game successfully saved!"
msgstr ""
-#: ../../src/network/nethost.cc:1250
+#: ../../src/network/nethost.cc:1256
#, c-format
-msgid "Could not save the game to the file \"%s\"! (%s)"
+msgid "Could not save the game to the file \"%1$s\"! (%2$s)"
msgstr ""
-#: ../../src/network/nethost.cc:1257
+#: ../../src/network/nethost.cc:1265
msgid "This server is not password protected!"
msgstr ""
-#: ../../src/network/nethost.cc:1273
+#: ../../src/network/nethost.cc:1281
msgid "The password was correct, access was granted!"
msgstr ""
-#: ../../src/network/nethost.cc:1279
+#: ../../src/network/nethost.cc:1287
#, c-format
msgid "Unknown dedicated server command \"%s\"!"
msgstr ""
-#: ../../src/network/nethost.cc:1984
+#: ../../src/network/nethost.cc:1992
#, c-format
msgid "Computer%u"
msgstr ""
-#: ../../src/network/nethost.cc:2147
+#: ../../src/network/nethost.cc:2155
#, c-format
msgid ""
"This server is password protected. You can send the password with: \"@%s pwd "
"PASSWORD\""
msgstr ""
+#: ../../src/network/nethost.cc:2255
+#, c-format
+msgid "%li second"
+msgid_plural "%li seconds"
+msgstr[0] ""
+msgstr[1] ""
+
#: ../../src/network/network_gaming_messages.cc:122
msgid "Client has left the game."
msgstr ""
@@ -2477,7 +2273,7 @@
#: ../../src/network/network_gaming_messages.cc:133
#, c-format
-msgid "%s has left the game (%s)"
+msgid "%1$s has left the game (%2$s)"
msgstr ""
#: ../../src/network/network_gaming_messages.cc:134
@@ -2567,51 +2363,51 @@
msgid "Host sent player %s to the lobby!"
msgstr ""
-#: ../../src/network/network_gaming_messages.cc:155
-#, c-format
-msgid "WARNING: %s uses version: %s, while Host uses version: %s"
-msgstr ""
-
#: ../../src/network/network_gaming_messages.cc:156
#, c-format
+msgid "WARNING: %1$s uses version: %2$s, while Host uses version: %3$s"
+msgstr ""
+
+#: ../../src/network/network_gaming_messages.cc:157
+#, c-format
msgid "%s has joined the game"
msgstr ""
-#: ../../src/network/network_gaming_messages.cc:157
+#: ../../src/network/network_gaming_messages.cc:158
#, c-format
msgid "Game was saved as %s."
msgstr ""
-#: ../../src/network/network_gaming_messages.cc:158
-#, c-format
-msgid "Started to send file %s to %s!"
-msgstr ""
-
#: ../../src/network/network_gaming_messages.cc:159
#, c-format
-msgid "Completed transfer of file %s to %s"
+msgid "Started to send file %1$s to %2$s!"
msgstr ""
#: ../../src/network/network_gaming_messages.cc:160
#, c-format
-msgid "Sending part %s of file %s to %s"
+msgid "Completed transfer of file %1$s to %2$s"
msgstr ""
#: ../../src/network/network_gaming_messages.cc:161
#, c-format
+msgid "Sending part %1$s of file %2$s to %3$s"
+msgstr ""
+
+#: ../../src/network/network_gaming_messages.cc:162
+#, c-format
msgid "The player \"%s\" was defeated and became spectator."
msgstr ""
-#: ../../src/network/network_gaming_messages.cc:162
+#: ../../src/network/network_gaming_messages.cc:163
#, c-format
-msgid "Client %s did not answer for more than %s seconds."
+msgid "Client %1$s did not answer for more than %2$s."
msgstr ""
-#: ../../src/network/network_gaming_messages.cc:164
+#: ../../src/network/network_gaming_messages.cc:165
#, c-format
msgid ""
-"Client %s will automatically be kicked, if no answer is received within %s "
-"seconds."
+"Client %1$s will automatically be kicked, if no answer is received within "
+"%2$s."
msgstr ""
#: ../../src/scripting/lua_game.cc:444 ../../src/ui_basic/helpwindow.cc:83
@@ -2619,7 +2415,7 @@
#: ../../src/ui_fsmenu/campaign_select.cc:74
#: ../../src/ui_fsmenu/campaign_select.cc:281
#: ../../src/ui_fsmenu/editor_mapselect.cc:96
-#: ../../src/ui_fsmenu/loadgame.cc:67 ../../src/ui_fsmenu/loadreplay.cc:50
+#: ../../src/ui_fsmenu/loadgame.cc:69 ../../src/ui_fsmenu/loadreplay.cc:52
#: ../../src/ui_fsmenu/mapselect.cc:110
#: ../../src/wui/game_main_menu_save_game.cc:96
#: ../../src/editor/ui_menus/editor_main_menu_load_map.cc:121
@@ -2635,7 +2431,7 @@
#: ../../src/sound/sound_handler.cc:147
#, c-format
-msgid "Sound_Handler closing times %i, freq %i, format %i, chan %i\n"
+msgid "Sound_Handler closing times %1$i, freq %2$i, format %3$i, chan %4$i\n"
msgstr ""
#: ../../src/sound/sound_handler.cc:165
@@ -2646,6 +2442,18 @@
msgid "Help: "
msgstr ""
+#: ../../src/ui_basic/messagebox.cc:99
+#: ../../src/editor/tools/editor_info_tool.cc:75
+#: ../../src/editor/tools/editor_info_tool.cc:76
+msgid "Yes"
+msgstr ""
+
+#: ../../src/ui_basic/messagebox.cc:106
+#: ../../src/editor/tools/editor_info_tool.cc:75
+#: ../../src/editor/tools/editor_info_tool.cc:76
+msgid "No"
+msgstr ""
+
#: ../../src/ui_basic/progresswindow.cc:51
msgid "Preparing..."
msgstr ""
@@ -2687,8 +2495,8 @@
#: ../../src/ui_fsmenu/campaign_select.cc:286 ../../src/ui_fsmenu/editor.cc:53
#: ../../src/ui_fsmenu/editor_mapselect.cc:91
#: ../../src/ui_fsmenu/internet_lobby.cc:91
-#: ../../src/ui_fsmenu/launchMPG.cc:131 ../../src/ui_fsmenu/launchSPG.cc:64
-#: ../../src/ui_fsmenu/loadgame.cc:62 ../../src/ui_fsmenu/loadreplay.cc:45
+#: ../../src/ui_fsmenu/launchMPG.cc:132 ../../src/ui_fsmenu/launchSPG.cc:64
+#: ../../src/ui_fsmenu/loadgame.cc:64 ../../src/ui_fsmenu/loadreplay.cc:47
#: ../../src/ui_fsmenu/mapselect.cc:105 ../../src/ui_fsmenu/multiplayer.cc:58
#: ../../src/ui_fsmenu/netsetup_lan.cc:71
#: ../../src/ui_fsmenu/singleplayer.cc:62
@@ -2760,7 +2568,7 @@
msgstr ""
#: ../../src/ui_fsmenu/editor_mapselect.cc:76
-#: ../../src/ui_fsmenu/loadgame.cc:97 ../../src/ui_fsmenu/loadreplay.cc:81
+#: ../../src/ui_fsmenu/loadgame.cc:99 ../../src/ui_fsmenu/loadreplay.cc:83
#: ../../src/ui_fsmenu/mapselect.cc:88
msgid "Players:"
msgstr ""
@@ -2810,6 +2618,11 @@
msgid "Open a new game"
msgstr ""
+#: ../../src/ui_fsmenu/internet_lobby.cc:155
+#: ../../src/wui/building_statistics_menu.cc:110
+msgid "Name"
+msgstr ""
+
#: ../../src/ui_fsmenu/internet_lobby.cc:156
msgid "Points"
msgstr ""
@@ -2818,18 +2631,18 @@
msgid "Game"
msgstr ""
-#: ../../src/ui_fsmenu/internet_lobby.cc:379
+#: ../../src/ui_fsmenu/internet_lobby.cc:380
msgid "Connection timed out"
msgstr ""
-#: ../../src/ui_fsmenu/internet_lobby.cc:382
+#: ../../src/ui_fsmenu/internet_lobby.cc:383
msgid ""
"Widelands has not been able to get the IP address of the server in time.\n"
"There seems to be a network problem, either on your side or on the side\n"
"of the server.\n"
msgstr ""
-#: ../../src/ui_fsmenu/internet_lobby.cc:410
+#: ../../src/ui_fsmenu/internet_lobby.cc:411
msgid "Widelands has not been able to connect to the host."
msgstr ""
@@ -2837,28 +2650,28 @@
msgid "Press ESC or click to continue ..."
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:51
+#: ../../src/ui_fsmenu/launchMPG.cc:52
msgid "Please select"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:64 ../../src/ui_fsmenu/launchMPG.cc:164
-#: ../../src/ui_fsmenu/netsetup_lan.cc:126 ../../src/wui/minimap.cc:146
+#: ../../src/ui_fsmenu/launchMPG.cc:65 ../../src/ui_fsmenu/launchMPG.cc:166
+#: ../../src/ui_fsmenu/netsetup_lan.cc:126 ../../src/wui/minimap.cc:145
msgid "Map"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:64
+#: ../../src/ui_fsmenu/launchMPG.cc:65
msgid "Select a map"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:74
+#: ../../src/ui_fsmenu/launchMPG.cc:75
msgid "Saved game"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:74
+#: ../../src/ui_fsmenu/launchMPG.cc:75
msgid "Select a saved game"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:84 ../../src/ui_fsmenu/options.cc:56
+#: ../../src/ui_fsmenu/launchMPG.cc:85 ../../src/ui_fsmenu/options.cc:56
#: ../../src/ui_fsmenu/options.cc:400
#: ../../src/wui/game_main_menu_save_game.cc:106 ../../src/wui/login_box.cc:70
#: ../../src/editor/ui_menus/editor_main_menu_load_map.cc:130
@@ -2867,60 +2680,60 @@
msgid "Cancel"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:84
+#: ../../src/ui_fsmenu/launchMPG.cc:85
msgid "Cancel selection"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:121
+#: ../../src/ui_fsmenu/launchMPG.cc:122
msgid "Change map or saved game"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:126 ../../src/ui_fsmenu/launchSPG.cc:69
+#: ../../src/ui_fsmenu/launchMPG.cc:127 ../../src/ui_fsmenu/launchSPG.cc:69
msgid "Start game"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:142
+#: ../../src/ui_fsmenu/launchMPG.cc:143
msgid "Show the help window"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:148 ../../src/ui_fsmenu/launchMPG.cc:666
+#: ../../src/ui_fsmenu/launchMPG.cc:149 ../../src/ui_fsmenu/launchMPG.cc:668
msgid "Multiplayer Game Setup"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:156
+#: ../../src/ui_fsmenu/launchMPG.cc:158
msgid "Clients"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:168 ../../src/ui_fsmenu/launchSPG.cc:103
+#: ../../src/ui_fsmenu/launchMPG.cc:170 ../../src/ui_fsmenu/launchSPG.cc:104
msgid "Type of game"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:214 ../../src/ui_fsmenu/launchSPG.cc:284
+#: ../../src/ui_fsmenu/launchMPG.cc:216 ../../src/ui_fsmenu/launchSPG.cc:286
msgid "(no map)"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:215
+#: ../../src/ui_fsmenu/launchMPG.cc:217
msgid "The host has not yet selected a map or saved game."
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:288 ../../src/ui_fsmenu/launchSPG.cc:232
+#: ../../src/ui_fsmenu/launchMPG.cc:290 ../../src/ui_fsmenu/launchSPG.cc:234
msgid "Win condition is set through the scenario"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:290
+#: ../../src/ui_fsmenu/launchMPG.cc:292
#: ../../src/wui/multiplayersetupgroup.cc:358
msgid "Savegame"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:292
+#: ../../src/ui_fsmenu/launchMPG.cc:294
msgid "The game is a saved game - the win condition was set before."
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:393
+#: ../../src/ui_fsmenu/launchMPG.cc:395
msgid "Saved game is directory"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:395
+#: ../../src/ui_fsmenu/launchMPG.cc:397
msgid ""
"WARNING:\n"
"The saved game you selected is a directory. This happens, if you set the "
@@ -2929,11 +2742,11 @@
"please select another saved game or zip the directories content."
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:423 ../../src/ui_fsmenu/launchSPG.cc:258
+#: ../../src/ui_fsmenu/launchMPG.cc:425 ../../src/ui_fsmenu/launchSPG.cc:260
msgid "File not found"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:425
+#: ../../src/ui_fsmenu/launchMPG.cc:427
#, c-format
msgid ""
"Widelands tried to start a game with a file that could not be found at given "
@@ -2944,137 +2757,139 @@
"transfer was not yet finished!?!"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:449
+#: ../../src/ui_fsmenu/launchMPG.cc:451
msgid ""
"The selected file can not be found. If it is not automatically transferred "
"to you, please write the host about this problem."
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:481
+#: ../../src/ui_fsmenu/launchMPG.cc:483
#: ../../src/wui/multiplayersetupgroup.cc:120
#: ../../src/wui/multiplayersetupgroup.cc:286
#, c-format
msgid "Player %i"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:483
+#: ../../src/ui_fsmenu/launchMPG.cc:485
#: ../../src/wui/multiplayersetupgroup.cc:122
#, c-format
msgid "Spectator"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:484
+#: ../../src/ui_fsmenu/launchMPG.cc:486
#, c-format
msgid ""
"At the moment you are %s\n"
"\n"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:485
+#: ../../src/ui_fsmenu/launchMPG.cc:487
msgid "Click on the \"?\" in the right top corner to get help."
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:546
+#: ../../src/ui_fsmenu/launchMPG.cc:548
msgid "Saved players are:"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:562
+#: ../../src/ui_fsmenu/launchMPG.cc:564
#, c-format
msgid "Player %u"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:566
+#: ../../src/ui_fsmenu/launchMPG.cc:568
msgid "closed"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:630
+#: ../../src/ui_fsmenu/launchMPG.cc:632
msgid "There was an error!"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:630
+#: ../../src/ui_fsmenu/launchMPG.cc:632
msgid "The map file seems to be invalid!"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:647
+#: ../../src/ui_fsmenu/launchMPG.cc:649
msgid "Map informations:\n"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:648
-#, c-format
-msgid "* Size: %ux%u\n"
-msgstr ""
-
-#: ../../src/ui_fsmenu/launchMPG.cc:649
-#, c-format
-msgid "* %i Players\n"
-msgstr ""
-
#: ../../src/ui_fsmenu/launchMPG.cc:650
#, c-format
+msgid "* Size: %1$ux%2$u\n"
+msgstr ""
+
+#: ../../src/ui_fsmenu/launchMPG.cc:651
+#, c-format
+msgid "* %u Player\n"
+msgid_plural "* %u Players\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: ../../src/ui_fsmenu/launchMPG.cc:652
+#, c-format
msgid "* World type: %s\n"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:652
+#: ../../src/ui_fsmenu/launchMPG.cc:654
msgid "* Scenario mode selected\n"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:667
+#: ../../src/ui_fsmenu/launchMPG.cc:669
msgid "You are in the multiplayer launch game menu."
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:668
+#: ../../src/ui_fsmenu/launchMPG.cc:670
msgid "Client settings"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:671
+#: ../../src/ui_fsmenu/launchMPG.cc:673
msgid ""
"On the left side is a list of all clients including you. With the button in "
"the rear of your nickname, you can set your role. Available roles are:"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:675
+#: ../../src/ui_fsmenu/launchMPG.cc:677
msgid ""
"The player with the color of the flag. If more than one client selected the "
"same color, these share the control over the player (\"shared kingdom mode"
"\")."
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:679
+#: ../../src/ui_fsmenu/launchMPG.cc:681
msgid ""
"And spectator mode, meaning you can see everything, but can not control any "
"player"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:681
+#: ../../src/ui_fsmenu/launchMPG.cc:683
msgid "Player settings"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:684
+#: ../../src/ui_fsmenu/launchMPG.cc:686
msgid ""
"In the middle are the settings for the players. To start a game, each player "
"must be one of the following:"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:687
+#: ../../src/ui_fsmenu/launchMPG.cc:689
msgid "Connected to one or more clients (see \"Client settings\")."
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:690
+#: ../../src/ui_fsmenu/launchMPG.cc:692
msgid ""
"Connected to a computer player (the face in the picture as well as the mouse "
"hover texts indicates the strength of the currently selected computer "
"player)."
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:693
+#: ../../src/ui_fsmenu/launchMPG.cc:695
msgid "Set as shared in starting position for another player."
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:694
+#: ../../src/ui_fsmenu/launchMPG.cc:696
msgid "Closed."
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:697
+#: ../../src/ui_fsmenu/launchMPG.cc:699
msgid ""
"The later three are only settable by the hosting client by left clicking the "
"\"type\" button of a player. Hosting players can further set the "
@@ -3082,17 +2897,17 @@
"player starts with) and the tribe an team for computer players"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:702
+#: ../../src/ui_fsmenu/launchMPG.cc:704
msgid ""
"Every client connected to a player (the set \"role\" player) can set the "
"tribe and the team for that player"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:704
+#: ../../src/ui_fsmenu/launchMPG.cc:706
msgid "Map informations"
msgstr ""
-#: ../../src/ui_fsmenu/launchMPG.cc:707
+#: ../../src/ui_fsmenu/launchMPG.cc:709
msgid ""
"On the right side are informations about the selected map or savegame. A "
"button right to the map name allows the host to change to a different one. "
@@ -3112,28 +2927,28 @@
msgid "Player's name"
msgstr ""
-#: ../../src/ui_fsmenu/launchSPG.cc:87
+#: ../../src/ui_fsmenu/launchSPG.cc:88
msgid "Player's type"
msgstr ""
-#: ../../src/ui_fsmenu/launchSPG.cc:91 ../../src/wui/game_summary.cc:91
+#: ../../src/ui_fsmenu/launchSPG.cc:92 ../../src/wui/game_summary.cc:91
#: ../../src/wui/multiplayersetupgroup.cc:462
msgid "Team"
msgstr ""
-#: ../../src/ui_fsmenu/launchSPG.cc:95
+#: ../../src/ui_fsmenu/launchSPG.cc:96
msgid "Player's tribe"
msgstr ""
-#: ../../src/ui_fsmenu/launchSPG.cc:99
+#: ../../src/ui_fsmenu/launchSPG.cc:100
msgid "Start type"
msgstr ""
-#: ../../src/ui_fsmenu/launchSPG.cc:159
+#: ../../src/ui_fsmenu/launchSPG.cc:160
msgid "Switch to position"
msgstr ""
-#: ../../src/ui_fsmenu/launchSPG.cc:260
+#: ../../src/ui_fsmenu/launchSPG.cc:262
#, c-format
msgid ""
"Widelands tried to start a game with a file that could not be found at given "
@@ -3144,45 +2959,46 @@
"but perhaps the transfer was not yet finished!?!"
msgstr ""
-#: ../../src/ui_fsmenu/loadgame.cc:72 ../../src/ui_fsmenu/loadreplay.cc:55
+#: ../../src/ui_fsmenu/loadgame.cc:74 ../../src/ui_fsmenu/loadreplay.cc:57
#: ../../src/wui/game_main_menu_save_game.cc:114
msgid "Delete"
msgstr ""
-#: ../../src/ui_fsmenu/loadgame.cc:83
+#: ../../src/ui_fsmenu/loadgame.cc:85
msgid "Choose saved game"
msgstr ""
-#: ../../src/ui_fsmenu/loadgame.cc:87 ../../src/ui_fsmenu/loadreplay.cc:71
+#: ../../src/ui_fsmenu/loadgame.cc:89 ../../src/ui_fsmenu/loadreplay.cc:73
#: ../../src/editor/ui_menus/editor_main_menu_map_options.cc:57
msgid "Map Name:"
msgstr ""
-#: ../../src/ui_fsmenu/loadgame.cc:92 ../../src/ui_fsmenu/loadreplay.cc:76
+#: ../../src/ui_fsmenu/loadgame.cc:94 ../../src/ui_fsmenu/loadreplay.cc:78
msgid "Gametime:"
msgstr ""
-#: ../../src/ui_fsmenu/loadgame.cc:105
+#: ../../src/ui_fsmenu/loadgame.cc:107
msgid "Minimap:"
msgstr ""
-#: ../../src/ui_fsmenu/loadgame.cc:157 ../../src/ui_fsmenu/loadreplay.cc:138
+#: ../../src/ui_fsmenu/loadgame.cc:159 ../../src/ui_fsmenu/loadreplay.cc:140
msgid "Delete file"
msgstr ""
-#: ../../src/ui_fsmenu/loadgame.cc:158 ../../src/ui_fsmenu/loadreplay.cc:139
-msgid "Do you really want to delete "
+#: ../../src/ui_fsmenu/loadgame.cc:160 ../../src/ui_fsmenu/loadreplay.cc:141
+#, c-format
+msgid "Do you really want to delete %s?"
msgstr ""
-#: ../../src/ui_fsmenu/loadgame.cc:215
+#: ../../src/ui_fsmenu/loadgame.cc:217
msgid "Savegame from dedicated server"
msgstr ""
-#: ../../src/ui_fsmenu/loadgame.cc:216
+#: ../../src/ui_fsmenu/loadgame.cc:218
msgid "Unknown gametime"
msgstr ""
-#: ../../src/ui_fsmenu/loadreplay.cc:67
+#: ../../src/ui_fsmenu/loadreplay.cc:69
msgid "Choose a replay"
msgstr ""
@@ -3202,7 +3018,7 @@
msgid "Watch Replay"
msgstr ""
-#: ../../src/ui_fsmenu/main.cc:65 ../../src/wui/game_options_menu.cc:47
+#: ../../src/ui_fsmenu/main.cc:65 ../../src/wui/game_options_menu.cc:46
#: ../../src/wui/interactive_player.cc:110
#: ../../src/wui/interactive_spectator.cc:57
msgid "Options"
@@ -3213,11 +3029,11 @@
msgid "View Readme"
msgstr ""
-#: ../../src/ui_fsmenu/main.cc:75 ../../src/wui/game_options_menu.cc:63
+#: ../../src/ui_fsmenu/main.cc:75 ../../src/wui/game_options_menu.cc:62
msgid "License"
msgstr ""
-#: ../../src/ui_fsmenu/main.cc:80 ../../src/wui/game_options_menu.cc:94
+#: ../../src/ui_fsmenu/main.cc:80 ../../src/wui/game_options_menu.cc:93
msgid "Exit Game"
msgstr ""
@@ -3346,7 +3162,7 @@
#: ../../src/ui_fsmenu/netsetup_lan.cc:196
#: ../../src/wui/multiplayersetupgroup.cc:270
-#: ../../src/wui/playerdescrgroup.cc:157
+#: ../../src/wui/playerdescrgroup.cc:158
msgid "Open"
msgstr ""
@@ -3449,7 +3265,7 @@
#: ../../src/ui_fsmenu/options.cc:265
#, c-format
-msgid "%ix%i %i bit"
+msgid "%1$ix%2$i %3$i bit"
msgstr ""
#: ../../src/ui_fsmenu/options.cc:287
@@ -3612,6 +3428,10 @@
msgid "Jump to unproductive: "
msgstr ""
+#: ../../src/wui/building_statistics_menu.cc:111
+msgid "Size"
+msgstr ""
+
#: ../../src/wui/building_statistics_menu.cc:112
msgid "Prod"
msgstr ""
@@ -3710,6 +3530,10 @@
msgid "Quantity"
msgstr ""
+#: ../../src/wui/encyclopedia_window.cc:198
+msgid " or "
+msgstr ""
+
#: ../../src/wui/fieldaction.cc:247
msgid "Build small buildings"
msgstr ""
@@ -3817,7 +3641,7 @@
#: ../../src/wui/game_debug_ui.cc:381
#, c-format
-msgid " Amount: %i/%i\n"
+msgid " Amount: %1$i/%2$i\n"
msgstr ""
#: ../../src/wui/game_main_menu.cc:42
@@ -3841,7 +3665,7 @@
msgstr ""
#: ../../src/wui/game_main_menu_save_game.cc:66
-#: ../../src/wui/game_options_menu.cc:85
+#: ../../src/wui/game_options_menu.cc:84
#: ../../src/wui/interactive_spectator.cc:55
msgid "Save Game"
msgstr ""
@@ -3974,15 +3798,15 @@
msgid "Restart Mission"
msgstr ""
-#: ../../src/wui/game_options_menu.cc:56
+#: ../../src/wui/game_options_menu.cc:55
msgid "README"
msgstr ""
-#: ../../src/wui/game_options_menu.cc:70
+#: ../../src/wui/game_options_menu.cc:69
msgid "Authors"
msgstr ""
-#: ../../src/wui/game_options_menu.cc:77
+#: ../../src/wui/game_options_menu.cc:76
#: ../../src/wui/game_options_sound_menu.cc:29
msgid "Sound Options"
msgstr ""
@@ -4068,7 +3892,13 @@
msgid "Land"
msgstr ""
-#: ../../src/wui/general_statistics_menu.cc:188 ../../src/wui/minimap.cc:178
+#: ../../src/wui/general_statistics_menu.cc:180
+#: ../../src/wui/productionsitewindow.cc:106 ../../src/wui/transport_ui.cc:66
+#: ../../src/wui/warehousewindow.cc:211
+msgid "Workers"
+msgstr ""
+
+#: ../../src/wui/general_statistics_menu.cc:188 ../../src/wui/minimap.cc:177
msgid "Buildings"
msgstr ""
@@ -4108,7 +3938,7 @@
#: ../../src/wui/interactive_base.cc:316
#, c-format
-msgid "%u.%ux"
+msgid "%1$u.%2$ux"
msgstr ""
#: ../../src/wui/interactive_base.cc:319
@@ -4117,7 +3947,7 @@
#: ../../src/wui/interactive_base.cc:339
#, c-format
-msgid "%s (%s)"
+msgid "%1$s (%2$s)"
msgstr ""
#: ../../src/wui/interactive_base.cc:344
@@ -4214,24 +4044,24 @@
msgid "Soldiers"
msgstr ""
-#: ../../src/wui/minimap.cc:154
+#: ../../src/wui/minimap.cc:153
#: ../../src/editor/ui_menus/editor_tool_menu.cc:67
msgid "Terrain"
msgstr ""
-#: ../../src/wui/minimap.cc:160
+#: ../../src/wui/minimap.cc:159
msgid "Owner"
msgstr ""
-#: ../../src/wui/minimap.cc:166
+#: ../../src/wui/minimap.cc:165
msgid "Flags"
msgstr ""
-#: ../../src/wui/minimap.cc:172
+#: ../../src/wui/minimap.cc:171
msgid "Roads"
msgstr ""
-#: ../../src/wui/minimap.cc:184
+#: ../../src/wui/minimap.cc:183
msgid "Zoom"
msgstr ""
@@ -4244,23 +4074,23 @@
msgstr ""
#: ../../src/wui/multiplayersetupgroup.cc:301
-#: ../../src/wui/playerdescrgroup.cc:170
+#: ../../src/wui/playerdescrgroup.cc:171
msgid "Computer"
msgstr ""
#: ../../src/wui/multiplayersetupgroup.cc:304
-#: ../../src/wui/playerdescrgroup.cc:172
+#: ../../src/wui/playerdescrgroup.cc:173
msgid "AI: "
msgstr ""
#: ../../src/wui/multiplayersetupgroup.cc:306
#: ../../src/wui/multiplayersetupgroup.cc:320
-#: ../../src/wui/playerdescrgroup.cc:174 ../../src/wui/playerdescrgroup.cc:192
+#: ../../src/wui/playerdescrgroup.cc:175 ../../src/wui/playerdescrgroup.cc:193
msgid "Random"
msgstr ""
#: ../../src/wui/multiplayersetupgroup.cc:314
-#: ../../src/wui/playerdescrgroup.cc:180
+#: ../../src/wui/playerdescrgroup.cc:181
msgid "Human"
msgstr ""
@@ -4285,7 +4115,7 @@
msgstr ""
#: ../../src/wui/multiplayersetupgroup.cc:458
-#: ../../src/wui/playerdescrgroup.cc:101
+#: ../../src/wui/playerdescrgroup.cc:102
msgid "Initialization"
msgstr ""
@@ -4447,6 +4277,10 @@
msgid "Reset to default"
msgstr ""
+#: ../../src/wui/ware_statistics_menu.cc:177
+msgid "Production"
+msgstr ""
+
#: ../../src/wui/ware_statistics_menu.cc:188
msgid "Consumption"
msgstr ""
@@ -4519,8 +4353,8 @@
#, c-format
msgid ""
"1) Node info\n"
-" Coordinates: (%i, %i)\n"
-" Height: %u\n"
+" Coordinates: (%1$i, %2$i)\n"
+" Height: %3$u\n"
" Caps: "
msgstr ""
@@ -4548,9 +4382,9 @@
#, c-format
msgid ""
"\n"
-" Owned by %i\n"
-" Has base immovable: %s\n"
-" Has bobs: %s\n"
+" Owned by %1$i\n"
+" Has base immovable: %2$s\n"
+" Has bobs: %3$s\n"
msgstr ""
#: ../../src/editor/tools/editor_info_tool.cc:79
@@ -4595,7 +4429,7 @@
#, c-format
msgid ""
"\n"
-" Size: %ix%i\n"
+" Size: %1$ix%2$i\n"
" Author: "
msgstr ""
@@ -4955,7 +4789,7 @@
msgid "Defensive"
msgstr ""
-#: ../../src/logic/map.h:168
+#: ../../src/logic/map.h:170
msgid "no description defined"
msgstr ""
=== modified file 'po/win_conditions/gd.po'
--- po/win_conditions/gd.po 2013-10-09 05:12:14 +0000
+++ po/win_conditions/gd.po 2013-10-23 05:48:49 +0000
@@ -25,13 +25,20 @@
msgid "%s %s %i%% of the land (%i of %i)."
msgstr ""
+
+msgid " %1s (%2i P) x %3i = %4i P<br>"
+msgstr " reversed string? %4i = %3i x (%2i P) %1sP<br>"
+
+
+
+
#: ../../scripting/win_condition_texts.lua:30
-msgid "%s had "
-msgstr ""
+msgid "%1s had %2s."
+msgstr "Bha %2s aig %1s"
#: ../../scripting/win_condition_texts.lua:28
-msgid "%s has %i trees at the moment."
-msgstr ""
+msgid "%1s has %2s at the moment."
+msgstr "Tha %2s aig %1s an-dràsta."
#: ../../scripting/win_condition_texts.lua:46
msgid "%s owns more than half of the maps area."
=== modified file 'po/win_conditions/win_conditions.pot'
--- po/win_conditions/win_conditions.pot 2013-09-15 17:41:36 +0000
+++ po/win_conditions/win_conditions.pot 2013-10-23 05:48:49 +0000
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: Widelands svnVERSION\n"
"Report-Msgid-Bugs-To: widelands-public@xxxxxxxxxxxxxxxxxxxxx\n"
-"POT-Creation-Date: 2013-09-15 17:41+0000\n"
+"POT-Creation-Date: 2013-10-23 05:46+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"
@@ -14,27 +14,49 @@
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../../scripting/win_condition_texts.lua:31
-msgid ""
-"%i trees."
-msgstr ""
-
-#: ../../scripting/win_condition_texts.lua:55
-msgid ""
-"%s %s %i%% of the land (%i of %i)."
-msgstr ""
-
-#: ../../scripting/win_condition_texts.lua:30
-msgid ""
-"%s had "
-msgstr ""
-
-#: ../../scripting/win_condition_texts.lua:28
-msgid ""
-"%s has %i trees at the moment."
-msgstr ""
-
-#: ../../scripting/win_condition_texts.lua:46
+#: ../../scripting/win_conditions/02_collectors.lua:103
+msgid ""
+" %s (%i P) x %i = %i P<br>"
+msgstr ""
+
+#: ../../scripting/win_conditions/04_wood_gnome.lua:142
+msgid ""
+"%1s had %2s."
+msgstr ""
+
+#: ../../scripting/win_conditions/04_wood_gnome.lua:89
+#: ../../scripting/win_conditions/04_wood_gnome.lua:141
+#: ../../scripting/win_conditions/04_wood_gnome.lua:146
+msgid ""
+"%i trees"
+msgstr ""
+
+#: ../../scripting/win_conditions/02_collectors.lua:119
+msgid ""
+"%ih%02im"
+msgstr ""
+
+#: ../../scripting/win_conditions/03_territorial_time.lua:184
+msgid ""
+"%s had %i%% of the land (%i of %i)."
+msgstr ""
+
+#: ../../scripting/win_conditions/03_territorial_time.lua:177
+msgid ""
+"%s has %i%% of the land (%i of %i)."
+msgstr ""
+
+#: ../../scripting/win_conditions/04_wood_gnome.lua:90
+msgid ""
+"%s has %s at the moment."
+msgstr ""
+
+#: ../../scripting/win_conditions/03_territorial_lord.lua:155
+msgid ""
+"%s owns more than half of the map's area."
+msgstr ""
+
+#: ../../scripting/win_conditions/03_territorial_time.lua:196
msgid ""
"%s owns more than half of the maps area."
msgstr ""
@@ -61,12 +83,12 @@
"Congratulations!"
msgstr ""
-#: ../../scripting/win_conditions/03_territorial_time.lua:15
+#: ../../scripting/win_conditions/03_territorial_time.lua:16
msgid ""
"Each player or team tries to obtain more than half of the maps' area. The winner will be the player or the team that is able to keep that area for at least 20 minutes or the one with the most territory after 4 hours, whichever comes first."
msgstr ""
-#: ../../scripting/win_conditions/03_territorial_lord.lua:15
+#: ../../scripting/win_conditions/03_territorial_lord.lua:16
msgid ""
"Each player or team tries to obtain more than half of the maps' area. The winner will be the player or the team that is able to keep that area for at least 20 minutes."
msgstr ""
@@ -81,23 +103,23 @@
"Endless Game (no fog)"
msgstr ""
-#: ../../scripting/win_condition_texts.lua:49
+#: ../../scripting/win_conditions/03_territorial_lord.lua:163
+#: ../../scripting/win_conditions/03_territorial_time.lua:204
msgid ""
"Keep it for %i more minutes to win the game."
msgstr ""
-#: ../../scripting/win_condition_texts.lua:54
+#: ../../scripting/win_conditions/03_territorial_time.lua:217
msgid ""
"Otherwise the game will end in %i minutes."
msgstr ""
#: ../../scripting/win_condition_texts.lua:23
-#: ../../scripting/win_condition_texts.lua:29
msgid ""
"Player overview:"
msgstr ""
-#: ../../scripting/win_condition_texts.lua:41
+#: ../../scripting/win_conditions/02_collectors.lua:154
msgid ""
"Points"
msgstr ""
@@ -107,12 +129,13 @@
"Status"
msgstr ""
-#: ../../scripting/win_condition_texts.lua:38
+#: ../../scripting/win_conditions/02_collectors.lua:93
msgid ""
-"Status for %s<br>"
+"Status for %s"
msgstr ""
-#: ../../scripting/win_condition_texts.lua:45
+#: ../../scripting/win_conditions/03_territorial_lord.lua:153
+#: ../../scripting/win_conditions/03_territorial_time.lua:21
msgid ""
"Team %i"
msgstr ""
@@ -127,13 +150,13 @@
"Territorial Time"
msgstr ""
-#: ../../scripting/win_condition_texts.lua:27
-#: ../../scripting/win_condition_texts.lua:53
+#: ../../scripting/win_conditions/03_territorial_time.lua:220
+#: ../../scripting/win_conditions/04_wood_gnome.lua:83
msgid ""
"The game will end in %i minutes."
msgstr ""
-#: ../../scripting/win_condition_texts.lua:40
+#: ../../scripting/win_conditions/02_collectors.lua:123
msgid ""
"The game will end in %s."
msgstr ""
@@ -143,9 +166,9 @@
"The tribe or team that can defeat all others wins the game!"
msgstr ""
-#: ../../scripting/win_condition_texts.lua:32
+#: ../../scripting/win_conditions/04_wood_gnome.lua:147
msgid ""
-"The winner is %s "
+"The winner is %1s with %2s."
msgstr ""
#: ../../scripting/win_conditions/00_endless_game.lua:14
@@ -158,12 +181,15 @@
"This is an endless game without rules. Fog of war is disabled."
msgstr ""
-#: ../../scripting/win_condition_texts.lua:39
+#: ../../scripting/win_conditions/02_collectors.lua:107
msgid ""
+"Total: %i point"
+msgid_plural ""
"Total: %i points"
-msgstr ""
+msgstr[0] ""
+msgstr[1] ""
-#: ../../scripting/win_condition_texts.lua:34
+#: ../../scripting/win_conditions/04_wood_gnome.lua:105
msgid ""
"Trees owned"
msgstr ""
@@ -183,7 +209,7 @@
"You are the winner!"
msgstr ""
-#: ../../scripting/win_conditions/02_collectors.lua:15
+#: ../../scripting/win_conditions/02_collectors.lua:16
msgid ""
"You get points for precious wares in your warehouses, the player with the highest number of wares at the end of 4 hours wins the game."
msgstr ""
@@ -203,12 +229,18 @@
"You lost your last warehouse and are therefore defeated. You may continue as spectator if you want."
msgstr ""
-#: ../../scripting/win_condition_texts.lua:48
+#: ../../scripting/win_conditions/03_territorial_lord.lua:160
+msgid ""
+"You own more than half of the map's area."
+msgstr ""
+
+#: ../../scripting/win_conditions/03_territorial_time.lua:201
msgid ""
"You own more than half of the maps area."
msgstr ""
-#: ../../scripting/win_condition_texts.lua:47
+#: ../../scripting/win_conditions/03_territorial_lord.lua:158
+#: ../../scripting/win_conditions/03_territorial_time.lua:199
msgid ""
"You still got %i minutes to prevent a victory."
msgstr ""
@@ -223,8 +255,3 @@
"You've lost this game!"
msgstr ""
-#: ../../scripting/win_condition_texts.lua:33
-msgid ""
-"with %i trees."
-msgstr ""
-
=== modified file 'po/world_blackland/world_blackland.pot'
--- po/world_blackland/world_blackland.pot 2013-09-15 17:41:36 +0000
+++ po/world_blackland/world_blackland.pot 2013-10-23 05:48:49 +0000
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: Widelands svnVERSION\n"
"Report-Msgid-Bugs-To: widelands-public@xxxxxxxxxxxxxxxxxxxxx\n"
-"POT-Creation-Date: 2013-09-15 17:41+0000\n"
+"POT-Creation-Date: 2013-10-23 05:46+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"
=== modified file 'po/world_desert/world_desert.pot'
--- po/world_desert/world_desert.pot 2013-09-15 17:41:36 +0000
+++ po/world_desert/world_desert.pot 2013-10-23 05:48:49 +0000
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: Widelands svnVERSION\n"
"Report-Msgid-Bugs-To: widelands-public@xxxxxxxxxxxxxxxxxxxxx\n"
-"POT-Creation-Date: 2013-09-15 17:41+0000\n"
+"POT-Creation-Date: 2013-10-23 05:46+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"
=== modified file 'po/world_greenland/world_greenland.pot'
--- po/world_greenland/world_greenland.pot 2013-09-15 17:41:36 +0000
+++ po/world_greenland/world_greenland.pot 2013-10-23 05:48:49 +0000
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: Widelands svnVERSION\n"
"Report-Msgid-Bugs-To: widelands-public@xxxxxxxxxxxxxxxxxxxxx\n"
-"POT-Creation-Date: 2013-09-15 17:41+0000\n"
+"POT-Creation-Date: 2013-10-23 05:46+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"
=== modified file 'po/world_winterland/world_winterland.pot'
--- po/world_winterland/world_winterland.pot 2013-09-15 17:41:36 +0000
+++ po/world_winterland/world_winterland.pot 2013-10-23 05:48:49 +0000
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: Widelands svnVERSION\n"
"Report-Msgid-Bugs-To: widelands-public@xxxxxxxxxxxxxxxxxxxxx\n"
-"POT-Creation-Date: 2013-09-15 17:41+0000\n"
+"POT-Creation-Date: 2013-10-23 05:46+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"
=== modified file 'scripting/win_condition_texts.lua'
--- scripting/win_condition_texts.lua 2013-07-18 14:36:20 +0000
+++ scripting/win_condition_texts.lua 2013-10-23 05:48:49 +0000
@@ -23,34 +23,3 @@
body = _ "Player overview:"
}
-game_status_woodgnome = {
- end_in = _ "The game will end in %i minutes.",
- trees = _ "%s has %i trees at the moment.",
- overview = _ "Player overview:",
- had1 = _ "%s had ",
- had2 = _ "%i trees.",
- winner1 = _ "The winner is %s ",
- winner2 = _ "with %i trees.",
- owned = _ "Trees owned"
-}
-
-game_status_collectors = {
- title = _ "Status for %s<br>",
- total = _ "Total: %i points",
- end_in = _ "The game will end in %s.",
- points = _ "Points"
-}
-
-game_status_territoral_lord = {
- team = _ "Team %i",
- other1 = _ "%s owns more than half of the maps area.",
- other2 = _ "You still got %i minutes to prevent a victory.",
- player1 = _ "You own more than half of the maps area.",
- player2 = _ "Keep it for %i more minutes to win the game."
-}
-
-game_status_territoral_lord_time = {
- end_in = _ "The game will end in %i minutes.",
- end_in_or = _ "Otherwise the game will end in %i minutes.",
- land = _ "%s %s %i%% of the land (%i of %i)."
-}
=== modified file 'scripting/win_conditions/02_collectors.lua'
--- scripting/win_conditions/02_collectors.lua 2013-07-26 15:57:34 +0000
+++ scripting/win_conditions/02_collectors.lua 2013-10-23 05:48:49 +0000
@@ -90,7 +90,7 @@
)
local points = 0
- local descr = { game_status_collectors.title:format(plr.name) }
+ local descr = { (_"Status for %s"):format(plr.name) .. "<br>"}
for idx, ware in ipairs(point_table[plr.tribe_name .. "_order"]) do
local value = point_table[plr.tribe_name][ware]
local count = 0
@@ -99,11 +99,12 @@
end
local lpoints = count * value
points = points + lpoints
- descr[#descr+1] = (" %s (%i P) x %i = %i P<br>"):format(
+ -- TRANSLATORS: For example: "gold (3 P) x 4 = 12 P", P meaning "Points"
+ descr[#descr+1] = (_" %s (%i P) x %i = %i P<br>"):format(
ware, value, count, lpoints
)
end
- descr[#descr+1] = game_status_collectors.total:format(points)
+ descr[#descr+1] = ngettext("Total: %i point", "Total: %i points", points):format(points)
return points, p(table.concat(descr, "\n"))
end
@@ -114,11 +115,12 @@
local m = remaining_time % 60
local time = ""
if h > 0 then
- time = ("%ih%02im"):format(h,m)
+ -- TRANSLATORS: Context: "The game will end in %s."
+ time = (_"%ih%02im"):format(h,m)
else
time = ("%i minutes"):format(m)
end
- local msg = p(game_status_collectors.end_in):format(time)
+ local msg = p(_"The game will end in %s."):format(time)
msg = msg .. "\n\n"
for idx, plr in ipairs(plrs) do
@@ -149,7 +151,7 @@
-- Instantiate the hook to calculate points
if hooks == nil then hooks = {} end
hooks.custom_statistic = {
- name = game_status_collectors.points,
+ name = _("Points"),
pic = "pics/genstats_points.png",
calculator = function(p)
local pts = _calc_points(p)
=== modified file 'scripting/win_conditions/03_territorial_lord.lua'
--- scripting/win_conditions/03_territorial_lord.lua 2013-07-26 15:57:34 +0000
+++ scripting/win_conditions/03_territorial_lord.lua 2013-10-23 05:48:49 +0000
@@ -146,18 +146,21 @@
end
end
+ -- TODO test this
function _send_state()
- local msg1 = game_status_territoral_lord.other1:format(currentcandidate)
+ local candidate = currentcandidate
if candidateisteam then
- local teamstr = game_status_territoral_lord.team:format(currentcandidate)
- msg1 = game_status_territoral_lord.other1:format(teamstr)
+ candidate = (_"Team %i"):format(currentcandidate)
end
+ local msg1 = (_"%s owns more than half of the map's area."):format(candidate)
msg1 = msg1 .. "\n"
- msg1 = msg1 .. game_status_territoral_lord.other2:format(remaining_time / 60)
+ -- TODO needs ngettext
+ msg1 = msg1 .. (_"You still got %i minutes to prevent a victory."):format(remaining_time / 60)
- local msg2 = game_status_territoral_lord.player1
+ local msg2 = _"You own more than half of the map's area."
msg2 = msg2 .. "\n"
- msg2 = msg2 .. game_status_territoral_lord.player2:format(remaining_time / 60)
+ -- TODO needs ngettext
+ msg2 = msg2 .. (_"Keep it for %i more minutes to win the game."):format(remaining_time / 60)
for idx, p in ipairs(plrs) do
if candidateisteam and currentcandidate == p.team
=== modified file 'scripting/win_conditions/03_territorial_time.lua'
--- scripting/win_conditions/03_territorial_time.lua 2013-07-26 15:57:34 +0000
+++ scripting/win_conditions/03_territorial_time.lua 2013-10-23 05:48:49 +0000
@@ -18,6 +18,8 @@
"that area for at least 20 minutes or the one with the most territory " ..
"after 4 hours, whichever comes first."
)
+local team_str = _"Team %i"
+
return {
name = wc_name,
description = wc_desc,
@@ -135,15 +137,15 @@
if teampoints[t] > ( #fields / 2 ) then
-- this team owns more than half of the map's area
foundcandidate = true
- if candidateisteam == true and currentcandidate == game_status_territoral_lord.team:format(t) then
+ if candidateisteam == true and currentcandidate == team_str:format(t) then
remaining_time = remaining_time - 30
else
- currentcandidate = game_status_territoral_lord.team:format(t)
+ currentcandidate = team_str:format(t)
candidateisteam = true
remaining_time = 20 * 60 -- 20 minutes
end
end
- points[#points + 1] = { game_status_territoral_lord.team:format(t), teampoints[t] }
+ points[#points + 1] = { team_str:format(t), teampoints[t] }
end
if not foundcandidate then
remaining_time = 10
@@ -170,39 +172,52 @@
local msg = ""
for i=1,#points do
msg = msg .. "\n"
- msg = msg ..
- game_status_territoral_lord_time.land:format(
- points[i][1],
- has_had,
- _percent(points[i][2], #fields),
- points[i][2],
- #fields)
+ if (has_had == "has") then
+ msg = msg ..
+ (_("%s has %i%% of the land (%i of %i).")):format(
+ points[i][1],
+ _percent(points[i][2], #fields),
+ points[i][2],
+ #fields)
+ else
+ msg = msg ..
+ (_("%s had %i%% of the land (%i of %i).")):format(
+ points[i][1],
+ _percent(points[i][2], #fields),
+ points[i][2],
+ #fields)
+ end
+
end
return msg
end
function _send_state(points)
- local msg1 = game_status_territoral_lord.other1:format(currentcandidate)
+ local msg1 = (_"%s owns more than half of the maps area."):format(currentcandidate)
msg1 = msg1 .. "\n"
- msg1 = msg1 .. game_status_territoral_lord.other2:format(remaining_time / 60)
+ -- TODO needs ngettext
+ msg1 = msg1 .. (_"You still got %i minutes to prevent a victory."):format(remaining_time / 60)
- local msg2 = game_status_territoral_lord.player1
+ local msg2 = _"You own more than half of the maps area."
msg2 = msg2 .. "\n"
- msg2 = msg2 .. game_status_territoral_lord.player2:format(remaining_time / 60)
+ -- TODO needs ngettext
+ msg2 = msg2 .. (_"Keep it for %i more minutes to win the game."):format(remaining_time / 60)
for idx, p in ipairs(plrs) do
local msg = ""
if remaining_time < remaining_max_time and _maxpoints(points) > ( #fields / 2 ) then
- if candidateisteam and currentcandidate == game_status_territoral_lord.team:format(p.team)
+ if candidateisteam and currentcandidate == team_str:format(p.team)
or not candidateisteam and currentcandidate == p.name then
msg = msg .. msg2 .. "\n\n"
else
msg = msg .. msg1 .. "\n\n"
end
- msg = msg .. game_status_territoral_lord_time.end_in_or:format(remaining_max_time/60)
+ -- TODO needs ngettext
+ msg = msg .. (_"Otherwise the game will end in %i minutes."):format(remaining_max_time/60)
else
- msg = msg .. game_status_territoral_lord_time.end_in:format(remaining_max_time/60)
+ -- TODO needs ngettext
+ msg = msg .. (_"The game will end in %i minutes."):format(remaining_max_time/60)
end
msg = msg .. "\n\n"
msg = msg .. game_status.body
@@ -256,7 +271,7 @@
local lostmsg = lost_game_over.body
lostmsg = lostmsg .. "\n\n" .. game_status.body
for i=1,#points do
- if points[i][1] == game_status_territoral_lord.team:format(p.team) or points[i][1] == p.name then
+ if points[i][1] == team_str:format(p.team) or points[i][1] == p.name then
if points[i][2] >= maxpoints then
p:send_message(won_game_over.title, wonmsg .. _status(points, "had"))
wl.game.report_result(p, 1, make_extra_data(p, wc_name, wc_version, {score=_landsizes[p.number]}))
=== modified file 'scripting/win_conditions/04_wood_gnome.lua'
--- scripting/win_conditions/04_wood_gnome.lua 2013-07-26 15:57:34 +0000
+++ scripting/win_conditions/04_wood_gnome.lua 2013-10-23 05:48:49 +0000
@@ -79,12 +79,15 @@
local function _send_state()
local playerpoints = _calc_points()
- local msg = game_status_woodgnome.end_in:format(remaining_time)
+ -- TODO needs ngettext
+ local msg = (_"The game will end in %i minutes."):format(remaining_time)
msg = msg .. "\n\n"
msg = msg .. game_status.body
for idx,plr in ipairs(plrs) do
msg = msg .. "\n"
- msg = msg .. game_status_woodgnome.trees:format(plr.name, playerpoints[plr.number])
+ -- TODO needs ngettext
+ local trees = (_"%i trees"):format(playerpoints[plr.number])
+ msg = msg .. (_"%s has %s at the moment."):format(plr.name,playerpoints[plr.number])
end
broadcast(plrs, game_status.title, msg)
@@ -99,7 +102,7 @@
-- Install statistics hook
if hooks == nil then hooks = {} end
hooks.custom_statistic = {
- name = game_status_woodgnome.owned,
+ name = _"Trees owned",
pic = "pics/genstats_trees.png",
calculator = function(p)
local pts = _calc_points(p)
@@ -134,12 +137,15 @@
msg = msg .. game_status.body
for idx,plr in ipairs(plrs) do
msg = msg .. "\n"
- msg = msg .. game_status_woodgnome.had1:format(plr.name)
- msg = msg .. game_status_woodgnome.had2:format(playerpoints[plr.number])
+ -- TODO needs ngettext
+ local trees = (_"%i trees"):format(playerpoints[plr.number])
+ msg = msg .. (_"%1s had %2s."):format(plr.name,trees)
end
msg = msg .. "\n\n"
- msg = msg .. game_status_woodgnome.winner1:format(points[#points][1].name)
- msg = msg .. game_status_woodgnome.winner2:format(playerpoints[points[#points][1].number])
+ -- TODO needs ngettext
+ local trees = (_"%i trees"):format(playerpoints[points[#points][1].number])
+ msg = msg .. (_"The winner is %1s with %2s."):format(points[#points][1].name, trees)
+
local privmsg = ""
for i=1,#points-1 do
privmsg = lost_game_over.title
=== modified file 'src/editor/tools/editor_info_tool.cc'
--- src/editor/tools/editor_info_tool.cc 2013-07-26 20:19:36 +0000
+++ src/editor/tools/editor_info_tool.cc 2013-10-23 05:48:49 +0000
@@ -51,7 +51,7 @@
snprintf
(buf1, sizeof(buf1),
- _("1) Node info\n Coordinates: (%i, %i)\n Height: %u\n Caps: "),
+ _("1) Node info\n Coordinates: (%1$i, %2$i)\n Height: %3$u\n Caps: "),
center.node.x, center.node.y, f.get_height());
buf += buf1;
{
@@ -70,7 +70,7 @@
}
snprintf
(buf1, sizeof(buf1),
- _("\n Owned by %i\n Has base immovable: %s\n Has bobs: %s\n"),
+ _("\n Owned by %1$i\n Has base immovable: %2$s\n Has bobs: %3$s\n"),
f.get_owned_by(),
f.get_immovable() ? _("Yes") : _("No"),
f.get_first_bob() ? _("Yes") : _("No"));
@@ -115,7 +115,7 @@
buf += map.get_name();
snprintf
(buf1, sizeof(buf1),
- _("\n Size: %ix%i\n Author: "), map.get_width(), map.get_height());
+ _("\n Size: %1$ix%2$i\n Author: "), map.get_width(), map.get_height());
buf += buf1;
buf += map.get_author();
buf += _("\n Descr: ");
=== modified file 'src/game_io/game_player_economies_data_packet.cc'
--- src/game_io/game_player_economies_data_packet.cc 2013-10-12 16:18:04 +0000
+++ src/game_io/game_player_economies_data_packet.cc 2013-10-23 05:48:49 +0000
@@ -80,7 +80,7 @@
}
}
} catch (const _wexception & e) {
- throw game_data_error(_("player %u: %s"), p, e.what());
+ throw game_data_error(_("player %1$u: %2$s"), p, e.what());
}
} else
throw game_data_error
=== modified file 'src/game_io/game_player_info_data_packet.cc'
--- src/game_io/game_player_info_data_packet.cc 2013-07-26 20:19:36 +0000
+++ src/game_io/game_player_info_data_packet.cc 2013-10-23 05:48:49 +0000
@@ -51,7 +51,7 @@
packet_version < 7 ? fr.Signed32() : fr.Player_Number8();
if (plnum < 1 or MAX_PLAYERS < plnum)
throw game_data_error
- (_("player number (%i) is out of range (1 .. %u)"),
+ (_("player number (%1$i) is out of range (1 .. %2$u)"),
plnum, MAX_PLAYERS);
Widelands::TeamNumber team = 0;
if (packet_version >= 9)
@@ -87,9 +87,9 @@
tribe.frontier_style_index(frontier_style_name) : 0;
} catch (Tribe_Descr::Nonexistent) {
log
- ("WARNING: player %u has frontier style index \"%s\", "
- "which does not exist in his tribe %s; will use "
- "default frontier style \"%s\" instead\n",
+ ("WARNING: player %1$u has frontier style index \"%2$s\", "
+ "which does not exist in his tribe %3$s; will use "
+ "default frontier style \"%4$s\" instead\n",
plnum, frontier_style_name, tribe.name().c_str(),
tribe.frontier_style_name(0).c_str());
}
@@ -99,9 +99,9 @@
tribe.flag_style_index(flag_style_name) : 0;
} catch (Tribe_Descr::Nonexistent) {
log
- ("WARNING: player %u has flag style index \"%s\", "
- "which does not exist in his tribe %s; will use "
- "default flag style \"%s\" instead\n",
+ ("WARNING: player %1$u has flag style index \"%2$s\", "
+ "which does not exist in his tribe %3$s; will use "
+ "default flag style \"%4$s\" instead\n",
plnum, flag_style_name, tribe.name().c_str(),
tribe.flag_style_name(0).c_str());
}
=== modified file 'src/graphic/animation.cc'
--- src/graphic/animation.cc 2013-07-26 20:19:36 +0000
+++ src/graphic/animation.cc 2013-10-23 05:48:49 +0000
@@ -134,7 +134,7 @@
try {
if (endp == parameters or frame_number != value)
throw wexception
- (_("expected %s but found \"%s\""),
+ (_("expected %1$s but found \"%2$s\""),
_("frame number"), parameters);
parameters = endp;
force_skip(parameters);
@@ -144,8 +144,8 @@
ad.sfx_cues.find(frame_number);
if (it != ad.sfx_cues.end())
throw wexception
- ("redefinition for frame %u to \"%s\" (previously defined to "
- "\"%s\")",
+ ("redefinition for frame %1$u to \"%2$s\" (previously defined to "
+ "\"%3$s\")",
frame_number, parameters, it->second.c_str());
} catch (const _wexception & e) {
throw wexception("sfx: %s", e.what());
=== modified file 'src/logic/building.cc'
--- src/logic/building.cc 2013-10-08 20:13:35 +0000
+++ src/logic/building.cc 2013-10-23 05:48:49 +0000
@@ -85,7 +85,7 @@
m_port = true;
} else
throw game_data_error
- (_("expected %s but found \"%s\""),
+ (_("expected %1$s but found \"%2$s\""),
"{\"small\"|\"medium\"|\"big\"|\"port\"|\"mine\"}", string);
} catch (const _wexception & e) {
throw game_data_error("size: %s", e.what());
@@ -128,7 +128,7 @@
("\"%s\" has not been defined as a building type (wrong declaration order?)",
target_name.c_str());
} catch (const _wexception & e) {
- throw wexception("\"enhancements=%s\": %s", v->get_string(), e.what());
+ throw wexception("\"enhancements=%1$s\": %2$s", v->get_string(), e.what());
}
m_enhanced_building = global_s.get_bool("enhanced_building", false);
m_global = directory.find("global/") < directory.size();
@@ -295,8 +295,8 @@
(worker_location.serial() != serial() and
worker_location.serial() != base_flag().serial())
log
- ("WARNING: worker %u is in the leave queue of building %u with "
- "base flag %u but is neither inside the building nor at the "
+ ("WARNING: worker %1$u is in the leave queue of building %2$u with "
+ "base flag %3$u but is neither inside the building nor at the "
"flag!\n",
worker.serial(), serial(), base_flag().serial());
}
@@ -304,13 +304,13 @@
worker.get_state(Worker::taskLeavebuilding);
if (not state)
log
- ("WARNING: worker %u is in the leave queue of building %u but "
+ ("WARNING: worker %1$u is in the leave queue of building %2$u but "
"does not have a leavebuilding task! Removing from queue.\n",
worker.serial(), serial());
else if (state->objvar1 != this)
log
- ("WARNING: worker %u is in the leave queue of building %u but its "
- "leavebuilding task is for map object %u! Removing from queue.\n",
+ ("WARNING: worker %1$u is in the leave queue of building %2$u but its "
+ "leavebuilding task is for map object %3$u! Removing from queue.\n",
worker.serial(), serial(), state->objvar1.serial());
else {
++i;
@@ -596,7 +596,7 @@
WaresQueue & Building::waresqueue(Ware_Index const wi) {
throw wexception
- ("%s (%u) has no WaresQueue for %u",
+ ("%1$s (%2$u) has no WaresQueue for %3$u",
name().c_str(), serial(), wi.value());
}
@@ -612,7 +612,7 @@
bool Building::get_building_work(Game &, Worker & worker, bool)
{
throw wexception
- ("MO(%u): get_building_work() for unknown worker %u",
+ ("MO(%1$u): get_building_work() for unknown worker %2$u",
serial(), worker.serial());
}
@@ -835,10 +835,10 @@
void Building::log_general_info(const Editor_Game_Base & egbase) {
PlayerImmovable::log_general_info(egbase);
- molog("m_position: (%i, %i)\n", m_position.x, m_position.y);
+ molog("m_position: (%1$i, %2$i)\n", m_position.x, m_position.y);
molog("m_flag: %p\n", m_flag);
molog
- ("* position: (%i, %i)\n",
+ ("* position: (%1$i, %2$i)\n",
m_flag->get_position().x, m_flag->get_position().y);
molog("m_anim: %s\n", descr().get_animation_name(m_anim).c_str());
=== modified file 'src/logic/cmd_queue.cc'
--- src/logic/cmd_queue.cc 2013-10-12 15:37:06 +0000
+++ src/logic/cmd_queue.cc 2013-10-23 05:48:49 +0000
@@ -178,7 +178,7 @@
int32_t const gametime = egbase.get_gametime();
if (duetime() < gametime)
throw game_data_error
- (_("duetime (%i) < gametime (%i)"), duetime(), gametime);
+ (_("duetime (%1$i) < gametime (%2$i)"), duetime(), gametime);
} else
throw game_data_error
(_("unknown/unhandled version %u"), packet_version);
=== modified file 'src/logic/constructionsite.cc'
--- src/logic/constructionsite.cc 2013-08-09 09:52:16 +0000
+++ src/logic/constructionsite.cc 2013-10-23 05:48:49 +0000
@@ -88,7 +88,9 @@
{
unsigned int percent = (get_built_per64k() * 100) >> 16;
std::string perc_s =
- (boost::format("<font color=%1$s>%2$i%% built</font>") % UI_FONT_CLR_DARK_HEX % percent).str();
+ (boost::format("<font color=%s>%s</font>")
+ % UI_FONT_CLR_DARK_HEX % (boost::format(_("%1$i%% built")) % percent).str())
+ .str();
return perc_s;
}
=== modified file 'src/logic/immovable.cc'
--- src/logic/immovable.cc 2013-10-08 20:13:35 +0000
+++ src/logic/immovable.cc 2013-10-23 05:48:49 +0000
@@ -189,7 +189,7 @@
m_size = BaseImmovable::BIG;
else
throw game_data_error
- (_("expected %s but found \"%s\""),
+ (_("expected %1$s but found \"%2$s\""),
"{\"small\"|\"medium\"|\"big\"}", string);
} catch (const _wexception & e) {
throw game_data_error("size: %s", e.what());
@@ -221,7 +221,7 @@
} catch (const std::exception & e) {
delete program;
throw game_data_error
- (_("program %s: %s"), program_name.c_str(), e.what());
+ (_("program %1$s: %2$s"), program_name.c_str(), e.what());
}
}
@@ -258,7 +258,7 @@
throw game_data_error(_("duplicated"));
} catch (const _wexception & e) {
throw game_data_error
- ("[terrain affinity] %s: %s", terrain_type_name, e.what());
+ ("[terrain affinity] %1$s: %2$s", terrain_type_name, e.what());
}
}
if (owner_tribe) {
@@ -273,7 +273,7 @@
throw game_data_error(_("duplicated"));
} catch (const _wexception & e) {
throw game_data_error
- (_("[terrain affinity] \"%s\" (not in current world): %s"),
+ (_("[terrain affinity] \"%1$s\" (not in current world): %2$s"),
v->get_name(), e.what());
}
}
@@ -309,7 +309,7 @@
if (it == m_programs.end())
throw game_data_error
- (_("immovable %s has no program \"%s\""),
+ (_("immovable %1$s has no program \"%2$s\""),
name().c_str(), programname.c_str());
return it->second;
@@ -614,7 +614,7 @@
} catch (const Map_Object_Descr::Animation_Nonexistent &) {
imm.m_anim = imm.descr().main_animation();
log
- ("Warning: Animation \"%s\" not found, using animation %s).\n",
+ ("Warning: Animation \"%1$s\" not found, using animation %2$s).\n",
animname, imm.descr().get_animation_name(imm.m_anim).c_str());
}
imm.m_animstart = fr.Signed32();
@@ -649,7 +649,7 @@
// Note that in some cases, the immovable may end up broken despite
// the fixup, but there isn't really anything we can do against that.
log
- ("Warning: Immovable '%s', size of program '%s' seems to have "
+ ("Warning: Immovable '%1$s', size of program '%2$s' seems to have "
"changed.\n",
imm.descr().name().c_str(), imm.m_program->name().c_str());
imm.m_program_ptr = 0;
@@ -764,7 +764,7 @@
effective_name = compat[1];
} else
throw game_data_error
- ("bad compatibility_immovable code %s for %s",
+ ("bad compatibility_immovable code %1$s for %2$s",
compat[0].c_str(), name);
}
@@ -773,7 +773,7 @@
imm = new Immovable(*tribe->get_immovable_descr(idx));
else
throw game_data_error
- (_("tribe %s does not define immovable type \"%s\""),
+ (_("tribe %1$s does not define immovable type \"%2$s\""),
owner, effective_name.c_str());
} else
throw wexception(_("unknown tribe %s"), owner);
@@ -825,7 +825,7 @@
long int const value = strtol(parameters, &endp, 0);
if (*endp or value <= 0)
throw game_data_error
- (_("expected %s but found \"%s\""),
+ (_("expected %1$s but found \"%2$s\""),
_("duration in ms"), parameters);
m_duration = value;
} else
@@ -865,7 +865,7 @@
priority = value;
if (*endp or priority != value)
throw game_data_error
- (_("expected %s but found \"%s\""), _("priority"), parameters);
+ (_("expected %1$s but found \"%2$s\""), _("priority"), parameters);
} else
priority = 127;
@@ -1030,7 +1030,7 @@
long int const value = strtol(parameters, &endp, 0);
if (*endp or value < 1 or 254 < value)
throw game_data_error
- (_("expected %s but found \"%s\""),
+ (_("expected %1$s but found \"%2$s\""),
_("probability in range [1, 254]"), parameters);
probability = value;
} else
@@ -1290,7 +1290,7 @@
m_anim_construction_done = d->delivered.total();
m_animstart = game.get_gametime();
- molog("construct_ware_item: total %u delivered: %u", index.value(), d->delivered[index]);
+ molog("construct_ware_item: total %1$u delivered: %2$u", index.value(), d->delivered[index]);
Buildcost remaining;
construct_remaining_buildcost(game, &remaining);
@@ -1428,7 +1428,7 @@
void PlayerImmovable::receive_ware(Game &, Ware_Index ware)
{
throw wexception
- ("MO(%u): Received a ware(%u), do not know what to do with it",
+ ("MO(%1$u): Received a ware(%2$u), do not know what to do with it",
serial(), ware.value());
}
@@ -1439,7 +1439,7 @@
void PlayerImmovable::receive_worker(Game &, Worker & worker)
{
throw wexception
- ("MO(%u): Received a worker(%u), do not know what to do with it",
+ ("MO(%1$u): Received a worker(%2$u), do not know what to do with it",
serial(), worker.serial());
}
@@ -1477,7 +1477,7 @@
if (!owner_number || owner_number > egbase().map().get_nrplayers())
throw game_data_error
- ("owner number is %u but there are only %u players",
+ ("owner number is %1$u but there are only %2$u players",
owner_number, egbase().map().get_nrplayers());
Player * owner = egbase().get_player(owner_number);
=== modified file 'src/logic/instances.cc'
--- src/logic/instances.cc 2013-10-08 20:13:35 +0000
+++ src/logic/instances.cc 2013-10-23 05:48:49 +0000
@@ -62,7 +62,7 @@
try {
obj_serial = mol.get<Map_Object>(serial).serial();
} catch (const _wexception & e) {
- throw game_data_error("%u: %s", serial, e.what());
+ throw game_data_error("%1$u: %2$s", serial, e.what());
}
else
obj_serial = 0;
@@ -119,7 +119,7 @@
obj_serial = mol.get<Map_Object>(object_serial).serial();
} catch (const _wexception & e) {
throw game_data_error
- (_("object %u: %s"), object_serial, e.what());
+ (_("object %1$u: %2$s"), object_serial, e.what());
}
else
obj_serial = 0;
@@ -488,7 +488,7 @@
uint8_t const header = fr.Unsigned8();
if (header != header_Map_Object)
throw wexception
- ("header is %u, expected %u", header, header_Map_Object);
+ ("header is %1$u, expected %2$u", header, header_Map_Object);
uint8_t const version = fr.Unsigned8();
if (version != CURRENT_SAVEGAME_VERSION)
@@ -498,7 +498,7 @@
try {
mol().register_object<Map_Object>(serial, *get_object());
} catch (const _wexception & e) {
- throw wexception("%u: %s", serial, e.what());
+ throw wexception("%1$u: %2$s", serial, e.what());
}
} catch (const _wexception & e) {
throw wexception("map object: %s", e.what());
=== modified file 'src/logic/military_data.cc'
--- src/logic/military_data.cc 2013-07-26 20:19:36 +0000
+++ src/logic/military_data.cc 2013-10-23 05:48:49 +0000
@@ -48,19 +48,19 @@
std::vector<std::string> list(split_string(interval, "-"));
if (list.size() != 2)
throw game_data_error
- (_("expected %s but found \"%s\""), _("\"min-max\""), interval);
+ (_("expected %1$s but found \"%2$s\""), _("\"min-max\""), interval);
container_iterate(std::vector<std::string>, list, i)
remove_spaces(*i.current);
char * endp;
m_min_retreat = strtol(list[0].c_str(), &endp, 0);
if (*endp or m_min_retreat > 100)
throw game_data_error
- (_("expected %s but found \"%s\""),
+ (_("expected %1$s but found \"%2$s\""),
_("positive integer <= 100"), list[0].c_str());
m_max_retreat = strtol(list[1].c_str(), &endp, 0);
if (*endp or m_max_retreat > 100 or m_max_retreat < m_min_retreat)
throw game_data_error
- (_("expected positive integer >= %u <= 100 but found \"%s\""),
+ (_("expected positive integer >= %1$u <= 100 but found \"%2$s\""),
m_min_retreat, list[1].c_str());
// That is default value for retreat
@@ -72,7 +72,7 @@
if (m_retreat < m_min_retreat or m_retreat > m_max_retreat)
throw game_data_error
- (_("expected positive integer >= %u <= %u but found \"%u\""),
+ (_("expected positive integer >= %1$u <= %2$u but found \"%3$u\""),
m_min_retreat,
m_max_retreat,
m_retreat);
=== modified file 'src/logic/militarysite.cc'
--- src/logic/militarysite.cc 2013-09-23 18:47:02 +0000
+++ src/logic/militarysite.cc 2013-10-23 05:48:49 +0000
@@ -122,7 +122,7 @@
} else {
snprintf
(buffer, sizeof(buffer),
- ngettext("%u(+%u) soldier", "%u(+%u) soldiers", total),
+ ngettext("%1$u(+%2$u) soldier", "%1$u(+%2$u) soldiers", total),
present, total - present);
}
str = buffer;
=== modified file 'src/logic/playercommand.cc'
--- src/logic/playercommand.cc 2013-10-13 15:37:15 +0000
+++ src/logic/playercommand.cc 2013-10-23 05:48:49 +0000
@@ -192,7 +192,7 @@
recurse = 2 <= packet_version ? fr.Unsigned8() : false;
} catch (const _wexception & e) {
throw game_data_error
- (_("player immovable %u: %s"), pimm_serial, e.what());
+ (_("player immovable %1$u: %2$s"), pimm_serial, e.what());
}
} else
throw game_data_error
@@ -441,7 +441,7 @@
try {
serial = mol.get<Map_Object>(flag_serial).serial();
} catch (const _wexception & e) {
- throw game_data_error(_("flag %u: %s"), flag_serial, e.what());
+ throw game_data_error(_("flag %1$u: %2$s"), flag_serial, e.what());
}
} else
throw game_data_error
@@ -498,7 +498,7 @@
serial = mol.get<Map_Object>(building_serial).serial();
} catch (const _wexception & e) {
throw game_data_error
- (_("building %u: %s"), building_serial, e.what());
+ (_("building %1$u: %2$s"), building_serial, e.what());
}
} else
throw game_data_error
@@ -572,7 +572,7 @@
serial = mol.get<Map_Object>(building_serial).serial();
} catch (const _wexception & e) {
throw game_data_error
- (_("building %u: %s"), building_serial, e.what());
+ (_("building %1$u: %2$s"), building_serial, e.what());
}
} else
throw game_data_error
@@ -616,7 +616,7 @@
serial = mol.get<Map_Object>(building_serial).serial();
} catch (const _wexception & e) {
throw game_data_error
- (_("building %u: %s"), building_serial, e.what());
+ (_("building %1$u: %2$s"), building_serial, e.what());
}
} else
throw game_data_error
@@ -674,7 +674,7 @@
serial = mol.get<Map_Object>(building_serial).serial();
} catch (const _wexception & e) {
throw game_data_error
- (_("building %u: %s"), building_serial, e.what());
+ (_("building %1$u: %2$s"), building_serial, e.what());
}
bi =
Building_Index
@@ -735,7 +735,7 @@
serial = mol.get<Map_Object>(building_serial).serial();
} catch (const _wexception & e) {
throw game_data_error
- ("building %u: %s", building_serial, e.what());
+ ("building %1$u: %2$s", building_serial, e.what());
}
} else
throw game_data_error
@@ -791,7 +791,7 @@
serial = mol.get<Map_Object>(worker_serial).serial();
} catch (const _wexception & e) {
throw game_data_error
- ("worker %u: %s", worker_serial, e.what());
+ ("worker %1$u: %2$s", worker_serial, e.what());
}
} else
throw game_data_error
@@ -850,7 +850,7 @@
try {
serial = mol.get<Map_Object>(ship_serial).serial();
} catch (const _wexception & e) {
- throw game_data_error("Ship %u: %s", ship_serial, e.what());
+ throw game_data_error("Ship %1$u: %2$s", ship_serial, e.what());
}
// direction
dir = fr.Unsigned8();
@@ -913,7 +913,7 @@
try {
serial = mol.get<Map_Object>(ship_serial).serial();
} catch (const _wexception & e) {
- throw game_data_error("Ship %u: %s", ship_serial, e.what());
+ throw game_data_error("Ship %1$u: %2$s", ship_serial, e.what());
}
// Coords
coords = fr.Coords32();
@@ -976,7 +976,7 @@
try {
serial = mol.get<Map_Object>(ship_serial).serial();
} catch (const _wexception & e) {
- throw game_data_error("Ship %u: %s", ship_serial, e.what());
+ throw game_data_error("Ship %1$u: %2$s", ship_serial, e.what());
}
clockwise = fr.Unsigned8() == 1;
} else
@@ -1036,7 +1036,7 @@
try {
serial = mol.get<Map_Object>(ship_serial).serial();
} catch (const _wexception & e) {
- throw game_data_error("Ship %u: %s", ship_serial, e.what());
+ throw game_data_error("Ship %1$u: %2$s", ship_serial, e.what());
}
} else
throw game_data_error("unknown/unhandled version %u", packet_version);
@@ -1092,7 +1092,7 @@
try {
serial = mol.get<Map_Object>(ship_serial).serial();
} catch (const _wexception & e) {
- throw game_data_error("Ship %u: %s", ship_serial, e.what());
+ throw game_data_error("Ship %1$u: %2$s", ship_serial, e.what());
}
} else
throw game_data_error("unknown/unhandled version %u", packet_version);
@@ -1166,7 +1166,7 @@
try {
m_serial = mol.get<Map_Object>(serial).serial();
} catch (const _wexception & e) {
- throw game_data_error(_("site %u: %s"), serial, e.what());
+ throw game_data_error(_("site %1$u: %2$s"), serial, e.what());
}
m_type = fr.Unsigned8();
@@ -1248,7 +1248,7 @@
try {
m_serial = mol.get<Map_Object>(serial).serial();
} catch (const _wexception & e) {
- throw game_data_error("site %u: %s", serial, e.what());
+ throw game_data_error("site %1$u: %2$s", serial, e.what());
}
m_index = Ware_Index(static_cast<Ware_Index::value_t>(fr.Signed32()));
@@ -1606,7 +1606,7 @@
serial = mol.get<Map_Object>(trainingsite_serial).serial();
} catch (const _wexception & e) {
throw game_data_error
- ("trainingsite %u: %s", trainingsite_serial, e.what());
+ ("trainingsite %1$u: %2$s", trainingsite_serial, e.what());
}
attribute = fr.Unsigned16();
value = fr.Unsigned16();
@@ -1671,14 +1671,14 @@
serial = mol.get<PlayerImmovable>(site_serial).serial();
} catch (const _wexception & e) {
throw game_data_error
- (_("site %u: %s"), site_serial, e.what());
+ (_("site %1$u: %2$s"), site_serial, e.what());
}
const uint32_t soldier_serial = fr.Unsigned32();
try {
soldier = mol.get<Soldier> (soldier_serial).serial();
} catch (const _wexception & e) {
throw game_data_error
- (_("soldier %u: %s"), soldier_serial, e.what());
+ (_("soldier %1$u: %2$s"), soldier_serial, e.what());
}
} else
throw game_data_error
@@ -1749,7 +1749,7 @@
serial = mol.get<Map_Object>(militarysite_serial).serial();
} catch (const _wexception & e) {
throw game_data_error
- (_("site %u: %s"), militarysite_serial, e.what());
+ (_("site %1$u: %2$s"), militarysite_serial, e.what());
}
val = fr.Signed16();
} else
@@ -1795,8 +1795,8 @@
if (upcast(Flag, flag, game.objects().get_object(serial))) {
log
- ("Cmd_EnemyFlagAction::execute player(%u): flag->owner(%d) "
- "number=%u\n",
+ ("Cmd_EnemyFlagAction::execute player(%1$u): flag->owner(%2$d) "
+ "number=%3$u\n",
player.player_number(), flag->owner().player_number(), number);
if (const Building * const building = flag->get_building()) {
@@ -1845,7 +1845,7 @@
try {
serial = flag_serial ? mol.get<Map_Object>(flag_serial).serial() : 0;
} catch (const _wexception & e) {
- throw game_data_error("flag %u: %s", flag_serial, e.what());
+ throw game_data_error("flag %1$u: %2$s", flag_serial, e.what());
}
fr .Unsigned8 ();
number = fr.Unsigned8 ();
@@ -1921,7 +1921,7 @@
or
retreat > plr->tribe().get_military_data().get_max_retreat())
throw game_data_error
- (_("retreat: value out of range. Received %u expected %u-%u"),
+ (_("retreat: value out of range. Received %1$u expected %2$u-%3$u"),
retreat,
plr->tribe().get_military_data().get_min_retreat(),
plr->tribe().get_military_data().get_max_retreat());
@@ -2051,7 +2051,7 @@
{
if (&warehouse->owner() != plr) {
log
- ("Cmd_SetStockPolicy: sender %u, but warehouse owner %u\n",
+ ("Cmd_SetStockPolicy: sender %1$u, but warehouse owner %2$u\n",
sender(), warehouse->owner().player_number());
return;
}
@@ -2064,7 +2064,7 @@
break;
default:
log
- ("Cmd_SetStockPolicy: sender %u, bad policy %u\n",
+ ("Cmd_SetStockPolicy: sender %1$u, bad policy %2$u\n",
sender(), m_policy);
return;
}
@@ -2073,7 +2073,7 @@
if (m_isworker) {
if (!(m_ware < tribe.get_nrworkers())) {
log
- ("Cmd_SetStockPolicy: sender %u, worker %u out of bounds\n",
+ ("Cmd_SetStockPolicy: sender %1$u, worker %2$u out of bounds\n",
sender(), m_ware.value());
return;
}
@@ -2081,7 +2081,7 @@
} else {
if (!(m_ware < tribe.get_nrwares())) {
log
- ("Cmd_SetStockPolicy: sender %u, ware %u out of bounds\n",
+ ("Cmd_SetStockPolicy: sender %1$u, ware %2$u out of bounds\n",
sender(), m_ware.value());
return;
}
=== modified file 'src/logic/production_program.cc'
--- src/logic/production_program.cc 2013-08-14 10:39:59 +0000
+++ src/logic/production_program.cc 2013-10-23 05:48:49 +0000
@@ -84,7 +84,7 @@
if (i.empty())
throw game_data_error
(_
- ("%s is not declared as an input (\"%s=<count>\" was not "
+ ("%1$s is not declared as an input (\"%2$s=<count>\" was not "
"found in the [inputs] section)"),
ware, ware);
else if (i->first == ware_index) {
@@ -97,8 +97,8 @@
ware_index.value() <= group.first.begin()->value())
throw game_data_error
(_
- ("wrong order of ware types within group: ware type %s appears "
- "after ware type %s (fix order!)"),
+ ("wrong order of ware types within group: ware type %1$s appears "
+ "after ware type %2$s (fix order!)"),
ware,
tribe.get_ware_descr(*group.first.begin())->name().c_str());
last_insert_pos = group.first.insert(last_insert_pos, ware_index);
@@ -111,13 +111,13 @@
count = value;
if ((*endp and *endp != ' ') or value < 1 or count != value)
throw game_data_error
- (_("expected %s but found \"%s\""), _("count"), parameters);
+ (_("expected %1$s but found \"%2$s\""), _("count"), parameters);
parameters = endp;
if (count_max < count)
throw game_data_error
(_
- ("group count is %u but (total) input storage capacity of "
- "the specified ware type(s) is only %u, so the group can "
+ ("group count is %1$u but (total) input storage capacity of "
+ "the specified ware type(s) is only %2$u, so the group can "
"never be fulfilled by the site"),
count, count_max);
// fallthrough
@@ -151,7 +151,8 @@
std::string ProductionProgram::ActReturn::Negation::description
(const Tribe_Descr & tribe) const
{
- return _("not ") + operand->description(tribe);
+ /** TRANSLATORS: %s = e.g. "economy needs ..." Context: "and/or not %s" */
+ return (boost::format(_("not %s")) % operand->description(tribe)).str();
}
@@ -173,7 +174,8 @@
std::string ProductionProgram::ActReturn::Economy_Needs_Ware::description
(const Tribe_Descr & tribe) const
{
- return _("economy needs ") + tribe.get_ware_descr(ware_type)->descname();
+ /** TRANSLATORS: e.g. "economy needs water" Context: "and/or (not) economy needs %s" */
+ return (boost::format(_("economy needs %s")) % tribe.get_ware_descr(ware_type)->descname()).str();
}
bool ProductionProgram::ActReturn::Economy_Needs_Worker::evaluate
@@ -194,7 +196,8 @@
std::string ProductionProgram::ActReturn::Economy_Needs_Worker::description
(const Tribe_Descr & tribe) const
{
- return _("economy needs ") + tribe.get_worker_descr(worker_type)->descname();
+ /** TRANSLATORS: e.g. "economy needs worker" Context: "and/or (not) economy needs %s" */
+ return (boost::format(_("economy needs %s")) % tribe.get_ware_descr(worker_type)->descname()).str();
}
ProductionProgram::ActReturn::Site_Has::Site_Has
@@ -223,17 +226,22 @@
std::string ProductionProgram::ActReturn::Site_Has::description
(const Tribe_Descr & tribe) const
{
- std::string result = _("site has ");
+ std::string condition = "";
container_iterate_const(std::set<Ware_Index>, group.first, i) {
- result += tribe.get_ware_descr(*i.current)->descname();
- result += ',';
+ /** TRANSLATORS: Adds a ware to list of wares in "Failed/Skipped ..." messages. */
+ condition =
+ (boost::format(_("%1$s %2$s")) % condition % tribe.get_ware_descr(*i.current)->descname())
+ .str();
+ /** TRANSLATORS: Separator for list of wares in "Failed/Skipped ..." messages. */
+ condition = (boost::format(_("%s,")) % condition).str();
}
- result.resize(result.size() - 1);
if (1 < group.second) {
- char buffer[32];
- sprintf(buffer, ":%u", group.second);
- result += buffer;
+ // TODO this should be done with ngettext
+ condition =
+ (boost::format(_("%1$s (%2$i)")) % condition % static_cast<unsigned int>(group.second)).str();
}
+ /** TRANSLATORS: %s is a list of wares*/
+ std::string result = (boost::format(_("site has%s")) % condition).str();
return result;
}
@@ -273,14 +281,14 @@
(index);
} else
throw game_data_error
- (_("expected %s but found \"%s\""),
+ (_("expected %1$s but found \"%2$s\""),
_("ware type or worker type"), type_name);
} catch (const _wexception & e) {
throw game_data_error("needs: %s", e.what());
}
else
throw game_data_error
- (_("expected %s but found \"%s\""), "\"needs\"", parameters);
+ (_("expected %1$s but found \"%2$s\""), "\"needs\"", parameters);
} catch (const _wexception & e) {
throw game_data_error("economy: %s", e.what());
}
@@ -298,7 +306,7 @@
new ProductionProgram::ActReturn::Site_Has(parameters, descr);
else
throw game_data_error
- (_("expected %s but found \"%s\""), "\"has\"", parameters);
+ (_("expected %1$s but found \"%2$s\""), "\"has\"", parameters);
} catch (const _wexception & e) {
throw game_data_error("site: %s", e.what());
}
@@ -315,7 +323,7 @@
return new ProductionProgram::ActReturn::Workers_Need_Experience;
else
throw game_data_error
- (_("expected %s but found \"%s\""),
+ (_("expected %1$s but found \"%2$s\""),
"\"need experience\"", parameters);
} catch (const _wexception & e) {
throw game_data_error("workers: %s", e.what());
@@ -340,7 +348,7 @@
return create_workers_condition(parameters);
else
throw game_data_error
- ("expected %s but found \"%s\"",
+ (_("expected %1$s but found \"%2$s\""),
"{\"not\"|\"economy\"|\"workers\"}", parameters);
} catch (const _wexception & e) {
throw game_data_error(_("invalid condition: %s"), e.what());
@@ -359,10 +367,8 @@
else if (match(parameters, "skipped")) m_result = Skipped;
else
throw game_data_error
- (_
- ("expected {\"failed\"|\"completed\"|\"skipped\"} but found "
- "\"%s\""),
- parameters);
+ (_("expected %1$s but found \"%2$s\""),
+ "{\"failed\"|\"completed\"|\"skipped\"}", parameters);
if (skip(parameters)) {
if (match_force_skip(parameters, "when")) {
@@ -373,7 +379,7 @@
skip(parameters);
if (not match_force_skip(parameters, "and"))
throw game_data_error
- (_("expected \"and\" or end of input"));
+ (_("expected \"%s\" or end of input"), "and");
} else
break;
}
@@ -388,17 +394,17 @@
skip(parameters);
if (not match_force_skip(parameters, "or"))
throw game_data_error
- (_("expected \"or\" or end of input"));
+ (_("expected \"%s\" or end of input"), "or");
} else
break;
}
} else
throw game_data_error
- (_("expected %s but found \"%s\""),
+ (_("expected %1$s but found \"%2$s\""),
"{\"when\"|\"unless\"}", parameters);
} else if (*parameters)
throw game_data_error
- (_("expected %s but found \"%s\""),
+ (_("expected %1$s but found \"%2$s\""),
("space or end of input"), parameters);
else
m_is_when = true;
@@ -416,41 +422,50 @@
void ProductionProgram::ActReturn::execute
(Game & game, ProductionSite & ps) const
{
- // TODO Fix this part with boost::format, so translators are able
- // TODO to translate these texts.
- // TODO Unfortunally gramatics are not as easy as mathematics in most
- // TODO languages.
std::string statistics_string =
- m_result == Failed ? _("failed") :
- m_result == Completed ? _("completed") : _("skipped");
- statistics_string += ' ';
- statistics_string += ps.top_state().program->descname();
+ /** TRANSLATORS: "Failed %s because (not): %s {and/or %s}" */
+ m_result == Failed ? (boost::format(_("Failed %s")) % ps.top_state().program->descname()).str() :
+ /** TRANSLATORS: "Completed %s because (not): %s {and/or %s}" */
+ m_result == Completed ? (boost::format(_("Completed %s")) % ps.top_state().program->descname()).str() :
+ /** TRANSLATORS: "Skipped %s because (not): %s {and/or %s}" */
+ (boost::format(_("Skipped %s")) % ps.top_state().program->descname()).str();
+
if (!m_conditions.empty()) {
std::string result_string = statistics_string;
if (m_is_when) { // "when a and b and ..." (all conditions must be true)
- char const * const operator_string = _(" and ");
- result_string += _(" because: ");
+ std::string condition_string = "";
for (wl_const_range<Conditions> i(m_conditions); i;)
{
if (not (i.front()->evaluate(ps))) // A condition is false,
return ps.program_step(game); // continue program.
- result_string += i.front()->description(ps.owner().tribe());
+
+ condition_string += i.front()->description(ps.owner().tribe());
if (i.advance().empty())
break;
- result_string += operator_string;
+ // TODO Would prefer "%1$s and %2$s" but getting segfaults, so leaving this for now
+ /** TRANSLATORS: "Failed/Completed/Skipped %s because: %s {and %s}" */
+ condition_string = (boost::format(_("%s and ")) % condition_string).str();
}
+ /** TRANSLATORS: "Failed/Completed/Skipped %s because: %s {and %s}" */
+ result_string =
+ (boost::format(_("%1$s because: %2$s")) % statistics_string % condition_string).str();
} else { // "unless a or b or ..." (all conditions must be false)
- char const * const operator_string = _(" or ");
- result_string += _(" because not: ");
+ std::string condition_string = "";
for (wl_const_range<Conditions> i(m_conditions); i;)
{
if ((*i.current)->evaluate(ps)) // A condition is true,
return ps.program_step(game); // continue program.
- result_string += i.front()->description(ps.owner().tribe());
+
+ condition_string += i.front()->description(ps.owner().tribe());
if (i.advance().empty())
break;
- result_string += operator_string;
+ // TODO Would prefer "%1$s or %2$s" but getting segfaults, so leaving this for now
+ /** TRANSLATORS: "Failed/Completed/Skipped %s because not: %s {or %s}" */
+ condition_string = (boost::format(_("%s or ")) % condition_string).str();
}
+ /** TRANSLATORS: "Failed/Completed/Skipped %s because not: %s {or %s}" */
+ result_string =
+ (boost::format(_("%1$s because not: %2$s")) % statistics_string % condition_string).str();
}
snprintf
(ps.m_result_buffer, sizeof(ps.m_result_buffer),
@@ -490,7 +505,7 @@
if (it == programs.end())
throw game_data_error
(_
- ("the program \"%s\" has not (yet) been declared in %s "
+ ("the program \"%1$s\" has not (yet) been declared in %2$s "
"(wrong declaration order?)"),
program_name, descr.descname().c_str());
m_program = it->second;
@@ -526,8 +541,8 @@
result_to_set_method_for = Skipped;
} else
throw game_data_error
- (_("expected %s but found \"%s\""),
- _("{\"failure\"|\"completion\"|\"skip\"}"), parameters);
+ (_("expected %1$s but found \"%2$s\""),
+ "{\"failure\"|\"completion\"|\"skip\"}", parameters);
Program_Result_Handling_Method handling_method;
if (match(parameters, "fail"))
@@ -540,14 +555,14 @@
handling_method = Repeat;
else
throw game_data_error
- (_("expected %s but found \"%s\""),
- _("{\"fail\"|\"complete\"|\"skip\"|\"repeat\"}"),
+ (_("expected %1$s but found \"%2$s\""),
+ "{\"fail\"|\"complete\"|\"skip\"|\"repeat\"}",
parameters);
m_handling_methods[result_to_set_method_for - 1] = handling_method;
reached_end = not *parameters;
log
- ("read handling method for result %u: %u, parameters = \"%s\", "
- "reached_end = %u\n",
+ ("read handling method for result %1$u: %2$u, parameters = \"%3$s\", "
+ "reached_end = %4$u\n",
result_to_set_method_for, handling_method,
parameters, reached_end);
}
@@ -563,7 +578,7 @@
static_cast<Program_Result>(ps.top_state().phase);
if (program_result == None) // The program has not yet been called.
- //ps.molog("%s Call %s\n", ps.descname().c_str(),
+ //ps.molog("%1$s Call %2$s\n", ps.descname().c_str(),
// m_program->get_name().c_str());
return ps.program_start(game, m_program->name());
@@ -658,7 +673,7 @@
m_duration = value;
if (*endp or value <= 0 or m_duration != value)
throw game_data_error
- (_("expected %s but found \"%s\""),
+ (_("expected %1$s but found \"%2$s\""),
_("duration in ms"), parameters);
} else
m_duration = 0; // Get duration from the result of a previous action.
@@ -732,7 +747,7 @@
m_duration = value;
if (*endp or value <= 0 or m_duration != value)
throw game_data_error
- (_("expected %s but found \"%s\""),
+ (_("expected %1$s but found \"%2$s\""),
_("duration in ms"), parameters);
} else
m_duration = 0; // Get duration from the result of a previous action.
@@ -812,34 +827,46 @@
if (uint8_t const nr_missing_groups = l_groups.size()) {
const Tribe_Descr & tribe = ps.owner().tribe();
- std::string result_string = _("failed");
- result_string += ' ';
- result_string += ps.top_state().program->descname();
- result_string += _(" because: ");
+ /** Translators: e.g. "Failed work because: water, wheat (2) are missing" */
+ std::string result_string =
+ (boost::format(_("Failed %s because:")) % ps.top_state().program->descname()).str();
+
for (wl_const_range<Groups> i(l_groups); i;)
{
assert(i.current->first.size());
for (wl_const_range<std::set<Ware_Index> > j(i.current->first); j;)
{
- result_string += tribe.get_ware_descr(j.front())->descname();
+ /** TRANSLATORS: Adds a ware to list of wares in "Failed/Skipped ..." messages. */
+ result_string =
+ (boost::format(_("%1$s %2$s")) % result_string
+ % tribe.get_ware_descr(j.front())->descname())
+ .str();
if (j.advance().empty())
break;
- result_string += ',';
+ /** TRANSLATORS: Separator for list of wares in "Failed/Skipped ..." messages. */
+ result_string = (boost::format(_("%s,")) % result_string).str();
}
{
uint8_t const count = i.current->second;
if (1 < count) {
- char buffer[5];
- sprintf(buffer, ":%u", count);
- result_string += buffer;
+ // TODO this should be done with ngettext
+ /** Translators: e.g. "Failed work because: water, wheat (2) are missing" */
+ result_string =
+ (boost::format(_("%1$s (%2$i)")) % result_string
+ % static_cast<unsigned int>(count))
+ .str();
}
}
if (i.advance().empty())
break;
- result_string += _(" and ");
+ result_string = (boost::format(_("%s and")) % result_string).str();
}
- result_string +=
- ngettext(" is missing", " are missing", nr_missing_groups);
+ result_string =
+ /** Translators: e.g. "Failed work because: water, wheat (2) are missing" */
+ (boost::format(_("%1$s %2$s")) % result_string
+ % ngettext(" is missing", " are missing", nr_missing_groups))
+ .str();
+
snprintf
(ps.m_result_buffer, sizeof(ps.m_result_buffer),
"%s", result_string.c_str());
@@ -888,7 +915,7 @@
or
value < 1 or item.second != value)
throw game_data_error
- (_("expected %s but found \"%s\""),
+ (_("expected %1$s but found \"%2$s\""),
_("count"), parameters);
parameters = endp;
goto item_end;
@@ -904,7 +931,7 @@
(item.first = tribe.safe_ware_index(ware)))
throw game_data_error
(_
- ("%s is not declared as an output (\"output=%s\" was not "
+ ("%1$s is not declared as an output (\"output=%2$s\" was not "
"found in the [global] section)"),
ware, ware);
}
@@ -986,7 +1013,7 @@
or
value < 1 or item.second != value)
throw game_data_error
- (_("expected %s but found \"%s\""),
+ (_("expected %1$s but found \"%2$s\""),
_("count"), parameters);
parameters = endp;
goto item_end;
@@ -1002,7 +1029,7 @@
(item.first = tribe.safe_worker_index(worker)))
throw game_data_error
(_
- ("%s is not declared as an output (\"output=%s\" was not "
+ ("%1$s is not declared as an output (\"output=%2$s\" was not "
"found in the [global] section)"),
worker, worker);
}
@@ -1019,7 +1046,7 @@
ps.m_working_positions[0].worker->update_task_buildingwork(game);
const Tribe_Descr & tribe = ps.owner().tribe();
- std::string result_string = _("Recruited ");
+ std::string unit_string = ("");
assert(m_items.size());
for (wl_const_range<Items> i(m_items); i;)
{
@@ -1028,14 +1055,15 @@
if (1 < count) {
char buffer[5];
sprintf(buffer, _("%u "), count);
- result_string += buffer;
+ unit_string += buffer;
}
}
- result_string += tribe.get_worker_descr(i.current->first)->descname();
+ unit_string += tribe.get_worker_descr(i.current->first)->descname();
if (i.advance().empty())
break;
- result_string += _(", ");
+ unit_string += _(", ");
}
+ std::string result_string = (boost::format(_("Recruited %s?")) % unit_string).str();
snprintf
(ps.m_result_buffer, sizeof(ps.m_result_buffer),
"%s", result_string.c_str());
@@ -1066,7 +1094,7 @@
m_distance = value;
if (*endp != ' ' or m_distance != value)
throw game_data_error
- (_("expected %s but found \"%s\""), _("distance"), parameters);
+ (_("expected %1$s but found \"%2$s\""), _("distance"), parameters);
parameters = endp;
}
@@ -1076,7 +1104,7 @@
m_max = value;
if (*endp != ' ' or value < 1 or 100 < value)
throw game_data_error
- (_("expected %s but found \"%s\""),
+ (_("expected %1$s but found \"%2$s\""),
_("percentage"), parameters);
parameters = endp;
}
@@ -1087,15 +1115,15 @@
m_chance = value;
if (*endp or value < 1 or 100 < value)
throw game_data_error
- (_("expected %s but found \"%s\""),
+ (_("expected %1$s but found \"%2$s\""),
_("percentage"), parameters);
}
+ std::string description =
+ /** TRANSLATORS: %1$s = name, %2$s = production program, %3$s = resource*/
+ (boost::format(_("%1$s %2$s mine %3$s")) % descr.descname() % production_program_name
+ % world.get_resource(m_resource)->descname())
+ .str();
- std::string description = descr.descname();
- description += ' ';
- description += production_program_name;
- description += " mine ";
- description += world.get_resource(m_resource)->descname();
descr.m_workarea_info[m_distance].insert(description);
} catch (const _wexception & e) {
throw game_data_error("mine: %s", e.what());
@@ -1243,7 +1271,7 @@
// FIXME soldier type name.
if (not match_force_skip(parameters, "soldier"))
throw game_data_error
- (_("expected %s but found \"%s\""), _("soldier type"), parameters);
+ (_("expected %1$s but found \"%2$s\""), _("soldier type"), parameters);
try {
if (match_force_skip(parameters, "hp"))
attribute = atrHP;
@@ -1255,17 +1283,15 @@
attribute = atrEvade;
else
throw game_data_error
- (_
- ("expected {\"hp\"|\"attack\"|\"defense\"|\"evade\"} but found "
- "\"%s\""),
- parameters);
+ (_("expected %1$s but found \"%2$s\""),
+ "{\"hp\"|\"attack\"|\"defense\"|\"evade\"}", parameters);
char * endp;
unsigned long long int const value = strtoull(parameters, &endp, 0);
level = value;
if (*endp or level != value)
throw game_data_error
- (_("expected %s but found \"%s\""), _("level"), parameters);
+ (_("expected %1$s but found \"%2$s\""), _("level"), parameters);
} catch (const _wexception & e) {
throw game_data_error("check_soldier: %s", e.what());
}
@@ -1282,7 +1308,7 @@
_("No soldier to train!"));
return ps.program_end(game, Skipped);
}
- ps.molog(" Checking soldier (%u) level %d)\n", attribute, level);
+ ps.molog(" Checking soldier (%1$u) level %2$d)\n", attribute, level);
const std::vector<Soldier *>::const_iterator soldiers_end = soldiers.end();
for (std::vector<Soldier *>::const_iterator it = soldiers.begin();; ++it) {
@@ -1324,7 +1350,7 @@
// FIXME soldier type name.
if (not match_force_skip(parameters, "soldier"))
throw game_data_error
- (_("expected %s but found \"%s\""), _("soldier type"), parameters);
+ (_("expected %1$s but found \"%2$s\""), _("soldier type"), parameters);
try {
if (match_force_skip(parameters, "hp"))
attribute = atrHP;
@@ -1336,7 +1362,7 @@
attribute = atrEvade;
else
throw game_data_error
- (_("expected %s but found \"%s\""),
+ (_("expected %1$s but found \"%2$s\""),
"{\"hp\"|\"attack\"|\"defense\"|\"evade\"}", parameters);
{
@@ -1345,7 +1371,7 @@
level = value;
if (*endp != ' ' or level != value)
throw game_data_error
- (_("expected %s but found \"%s\""), _("level"), parameters);
+ (_("expected %1$s but found \"%2$s\""), _("level"), parameters);
parameters = endp;
}
@@ -1355,7 +1381,8 @@
target_level = value;
if (*endp or target_level != value or target_level <= level)
throw game_data_error
- (_("expected level > %u but found \"%s\""), level, parameters);
+ /** TRANSLATORS: Do not translate "level" */
+ (_("expected level > %1$u but found \"%2$s\""), level, parameters);
}
} catch (const _wexception & e) {
throw game_data_error("train: %s", e.what());
@@ -1372,7 +1399,7 @@
std::vector<Soldier *>::const_iterator it = soldiers.begin();
ps.molog
- (" Training soldier's %u (%d to %d)",
+ (" Training soldier's %1$u (%2$d to %3$d)",
attribute, level, target_level);
for (;; ++it) {
@@ -1435,7 +1462,7 @@
priority = value;
if (*endp or priority != value)
throw game_data_error
- (_("expected %s but found \"%s\""), _("priority"), parameters);
+ (_("expected %1$s but found \"%2$s\""), _("priority"), parameters);
} else
priority = 127;
=== modified file 'src/logic/requirements.cc'
--- src/logic/requirements.cc 2013-07-26 20:19:36 +0000
+++ src/logic/requirements.cc 2013-10-23 05:48:49 +0000
@@ -230,8 +230,8 @@
at != atrTotal)
throw game_data_error
(_
- ("expected atrHP (%u), atrAttack (%u), atrDefense (%u), atrEvade "
- "(%u) or atrTotal (%u) but found unknown attribute value (%u)"),
+ ("expected atrHP (%1$u), atrAttack (%2$u), atrDefense (%3$u), atrEvade "
+ "(%4$u) or atrTotal (%5$u) but found unknown attribute value (%6$u)"),
atrHP, atrAttack, atrDefense, atrEvade, atrTotal, at);
int32_t const min = fr.Signed32();
int32_t const max = fr.Signed32();
=== modified file 'src/logic/soldier.cc'
--- src/logic/soldier.cc 2013-09-14 14:52:25 +0000
+++ src/logic/soldier.cc 2013-10-23 05:48:49 +0000
@@ -67,19 +67,19 @@
std::vector<std::string> list(split_string(attack, "-"));
if (list.size() != 2)
throw game_data_error
- (_("expected %s but found \"%s\""), _("\"min-max\""), attack);
+ (_("expected %1$s but found \"%2$s\""), _("\"min-max\""), attack);
container_iterate(std::vector<std::string>, list, i)
remove_spaces(*i.current);
char * endp;
m_min_attack = strtol(list[0].c_str(), &endp, 0);
if (*endp or 0 == m_min_attack)
throw game_data_error
- (_("expected %s but found \"%s\""),
+ (_("expected %1$s but found \"%2$s\""),
_("positive integer"), list[0].c_str());
m_max_attack = strtol(list[1].c_str(), &endp, 0);
if (*endp or m_max_attack < m_min_attack)
throw game_data_error
- (_("expected positive integer >= %u but found \"%s\""),
+ (_("expected positive integer >= %1$u but found \"%2$s\""),
m_min_attack, list[1].c_str());
} catch (const _wexception & e) {
throw game_data_error("attack: %s", e.what());
@@ -182,7 +182,7 @@
list = split_string(anim_string, ",");
if (list.size() < 1)
throw game_data_error
- (_("expected %s but found \"%s\""),
+ (_("expected %1$s but found \"%2$s\""),
_("\"anim_name[,another_anim,...]\""), anim_string);
// Sanitation
@@ -198,7 +198,7 @@
g_anim.get (directory, anim_s, "idle_00.png"));
}
} catch (const _wexception & e) {
- throw game_data_error("%s : %s", anim_name, e.what());
+ throw game_data_error("%1$s : %2$s", anim_name, e.what());
}
return list;
@@ -461,7 +461,7 @@
// Unsignedness ensures that we can only heal, not hurt through this method.
void Soldier::heal (const uint32_t hp) {
molog
- ("[soldier] healing (%d+)%d/%d\n", hp, m_hp_current, get_max_hitpoints());
+ ("[soldier] healing (%1$d+)%2$d/%3$d\n", hp, m_hp_current, get_max_hitpoints());
assert(hp);
assert(m_hp_current < get_max_hitpoints());
m_hp_current += std::min(hp, get_max_hitpoints() - m_hp_current);
@@ -476,7 +476,7 @@
assert (m_hp_current > 0);
molog
- ("[soldier] damage %d(-%d)/%d\n",
+ ("[soldier] damage %1$d(-%2$d)/%3$d\n",
m_hp_current, value, get_max_hitpoints());
if (m_hp_current < value)
m_hp_current = 0;
@@ -1371,7 +1371,7 @@
Map & map = game.map();
int32_t const tdelta = (map.calc_cost(get_position(), mapdir)) / 2;
- molog("[move_in_battle] dir: (%d) tdelta: (%d)\n", dir, tdelta);
+ molog("[move_in_battle] dir: (%1$d) tdelta: (%2$d)\n", dir, tdelta);
m_combat_walking = dir;
m_combat_walkstart = game.get_gametime();
m_combat_walkend = m_combat_walkstart + tdelta;
@@ -1447,7 +1447,7 @@
{
std::string signal = get_signal();
molog
- ("[battle] update for player %u's soldier: signal = \"%s\"\n",
+ ("[battle] update for player %1$u's soldier: signal = \"%2$s\"\n",
owner().player_number(), signal.c_str());
if (signal.size()) {
@@ -1535,7 +1535,7 @@
false, (dist + 3) / 4))
{
molog
- ("[battle] player %u's soldier started task_movepath to (%i,%i)\n",
+ ("[battle] player %1$u's soldier started task_movepath to (%2$i,%3$i)\n",
owner().player_number(), dest.x, dest.y);
return;
} else {
@@ -1546,10 +1546,10 @@
char buffer[2048];
snprintf
(buffer, sizeof(buffer),
- "The game engine has encountered a logic error. The %s "
- "#%u of player %u could not find a way from (%i, %i) "
- "(with %s immovable) to the opponent (%s #%u of player "
- "%u) at (%i, %i) (with %s immovable). The %s will now "
+ "The game engine has encountered a logic error. The %1$s "
+ "#%2$u of player %3$u could not find a way from (%4$i, %5$i) "
+ "(with %6$s immovable) to the opponent (%7$s #%8$u of player "
+ "%9$u) at (%10$i, %11$i) (with %12$s immovable). The %13$s will now "
"desert (but will not be executed). Strange things may "
"happen. No solution for this problem has been "
"implemented yet. (bug #536066) (The game has been "
@@ -1651,7 +1651,7 @@
{
std::string signal = get_signal();
molog
- ("[die] update for player %u's soldier: signal = \"%s\"\n",
+ ("[die] update for player %1$u's soldier: signal = \"%2$s\"\n",
owner().player_number(), signal.c_str());
if (signal.size()) {
@@ -1811,10 +1811,10 @@
Worker::log_general_info(egbase);
molog("[Soldier]\n");
molog
- ("Levels: %d/%d/%d/%d\n",
+ ("Levels: %1$d/%2$d/%3$d/%4$d\n",
m_hp_level, m_attack_level, m_defense_level, m_evade_level);
- molog ("HitPoints: %d/%d\n", m_hp_current, get_max_hitpoints());
- molog ("Attack : %d-%d\n", get_min_attack(), get_max_attack());
+ molog ("HitPoints: %1$d/%2$d\n", m_hp_current, get_max_hitpoints());
+ molog ("Attack : %1$d-%2$d\n", get_min_attack(), get_max_attack());
molog ("Defense : %d%%\n", get_defense());
molog ("Evade: %d%%\n", get_evade());
molog ("CombatWalkingDir: %i\n", m_combat_walking);
=== modified file 'src/logic/tribe.cc'
--- src/logic/tribe.cc 2013-10-08 20:13:35 +0000
+++ src/logic/tribe.cc 2013-10-23 05:48:49 +0000
@@ -96,7 +96,7 @@
// Read compatibility wares (removed wares existing in saved games from older builds
if (Section * const section = root_conf.get_section("compatibility_wares")) {
while (Section::Value const * const v = section->get_next_val()) {
- log("Compatibility ware \"%s\"=\"%s\" loaded.\n", v->get_name(), v->get_string());
+ log("Compatibility ware \"%1$s\"=\"%2$s\" loaded.\n", v->get_name(), v->get_string());
m_compatibility_wares[v->get_name()] = v->get_string();
}
}
@@ -318,7 +318,7 @@
throw game_data_error("duplicated");
} catch (const _wexception & e) {
throw game_data_error
- ("Initializations: \"%s\": %s",
+ ("Initializations: \"%1$s\": %2$s",
init.name.c_str(), e.what());
}
}
@@ -331,7 +331,7 @@
m_compatibility_immovable[v->get_name()] = split_string(v->get_string(), " ");
}
} catch (const _wexception & e) {
- throw game_data_error(_("tribe %s: %s"), tribename.c_str(), e.what());
+ throw game_data_error(_("tribe %1$s: %2$s"), tribename.c_str(), e.what());
}
}
@@ -404,7 +404,7 @@
} catch (const _wexception & e) {
delete lua;
throw game_data_error
- ("reading basic info for tribe \"%s\": %s",
+ ("reading basic info for tribe \"%1$s\": %2$s",
name.c_str(), e.what());
}
@@ -490,7 +490,7 @@
int32_t i = 1;
int32_t num_indicators = 0;
for (;;) {
- snprintf(buffer, sizeof(buffer), "resi_%s%i", res->name().c_str(), i);
+ snprintf(buffer, sizeof(buffer), "resi_%1$s%2$i", res->name().c_str(), i);
if (get_immovable_index(buffer) == -1)
break;
++i;
@@ -499,7 +499,7 @@
if (not num_indicators)
throw game_data_error
- ("tribe %s does not declare a resource indicator for resource %s",
+ ("tribe %1$s does not declare a resource indicator for resource %2$s",
name().c_str(),
res->name().c_str());
@@ -510,7 +510,7 @@
num_indicators);
if (bestmatch > num_indicators)
throw game_data_error
- ("Amount of %s is %i but max amount is %i",
+ ("Amount of %1$s is %2$i but max amount is %3$i",
res->name().c_str(),
amount,
res->get_max_amount());
@@ -518,9 +518,9 @@
bestmatch += 1; // Resi start with 1, not 0
snprintf
- (buffer, sizeof(buffer), "resi_%s%i", res->name().c_str(), bestmatch);
+ (buffer, sizeof(buffer), "resi_%1$s%2$i", res->name().c_str(), bestmatch);
- // NoLog("Resource(%s): Indicator '%s' for amount = %u\n",
+ // NoLog("Resource(%1$s): Indicator '%2$s' for amount = %3$u\n",
//res->get_name(), buffer, amount);
@@ -536,14 +536,15 @@
return result;
else
// If this point is reached, the defined ware is neither defined as normal ware nor as a compatibility.
- throw game_data_error("tribe %s does not define ware type \"%s\"", name().c_str(), warename.c_str());
+ throw game_data_error
+ ("tribe %1$s does not define ware type \"%2$s\"", name().c_str(), warename.c_str());
}
Ware_Index Tribe_Descr::safe_ware_index(const char * const warename) const {
if (Ware_Index const result = ware_index(warename))
return result;
else
// If this point is reached, the defined ware is neither defined as normal ware nor as a compatibility.
- throw game_data_error("tribe %s does not define ware type \"%s\"", name().c_str(), warename);
+ throw game_data_error("tribe %1$s does not define ware type \"%2$s\"", name().c_str(), warename);
}
Ware_Index Tribe_Descr::ware_index(const std::string & warename) const {
@@ -552,7 +553,7 @@
// try to find the ware in compatibility wares std::map
std::map<std::string, std::string>::const_iterator it = m_compatibility_wares.find(warename);
if (m_compatibility_wares.find(warename) != m_compatibility_wares.end()) {
- log ("ware %s found in compatibility map: %s!\n", warename.c_str(), it->second.c_str());
+ log ("ware %1$s found in compatibility map: %2$s!\n", warename.c_str(), it->second.c_str());
if (Ware_Index const result = m_wares.get_index(it->second))
return result;
}
@@ -565,7 +566,7 @@
// try to find the ware in compatibility wares std::map
std::map<std::string, std::string>::const_iterator it = m_compatibility_wares.find(warename);
if (m_compatibility_wares.find(warename) != m_compatibility_wares.end()) {
- log ("ware %s found in compatibility map: %s!\n", warename, it->second.c_str());
+ log ("ware %1$s found in compatibility map: %2$s!\n", warename, it->second.c_str());
if (Ware_Index const result = m_wares.get_index(it->second))
return result;
}
@@ -583,7 +584,7 @@
return result;
else
throw game_data_error
- ("tribe %s does not define worker type \"%s\"",
+ ("tribe %1$s does not define worker type \"%2$s\"",
name().c_str(), workername.c_str());
}
Ware_Index Tribe_Descr::safe_worker_index(const char * const workername) const {
@@ -591,7 +592,7 @@
return result;
else
throw game_data_error
- ("tribe %s does not define worker type \"%s\"",
+ ("tribe %1$s does not define worker type \"%2$s\"",
name().c_str(), workername);
}
@@ -605,7 +606,7 @@
if (not result)
throw game_data_error
- ("tribe %s does not define building type \"%s\"",
+ ("tribe %1$s does not define building type \"%2$s\"",
name().c_str(), buildingname);
return result;
}
=== modified file 'src/logic/worker.cc'
--- src/logic/worker.cc 2013-10-12 15:37:06 +0000
+++ src/logic/worker.cc 2013-10-23 05:48:49 +0000
@@ -19,6 +19,8 @@
#include "logic/worker.h"
+#include <boost/format.hpp>
+
#include "economy/economy.h"
#include "economy/flag.h"
#include "economy/portdock.h"
@@ -602,7 +604,7 @@
building.send_message
(game,
"mine",
- _("Out of ") + res_type,
+ (boost::format(_("Out of %s")) % res_type).str(),
std::string
(_
("The worker of this building cannot find any more resources "
=== modified file 'src/map_io/widelands_map_bobdata_data_packet.cc'
--- src/map_io/widelands_map_bobdata_data_packet.cc 2013-09-23 18:47:02 +0000
+++ src/map_io/widelands_map_bobdata_data_packet.cc 2013-10-23 05:48:49 +0000
@@ -91,7 +91,7 @@
if (Player_Number const read_owner = fr.Player_Number8()) {
if (nr_players < read_owner)
throw game_data_error
- ("owner number is %u but there are only %u players",
+ ("owner number is %1$u but there are only %2$u players",
read_owner, nr_players);
if (Player * const owner = egbase.get_player(read_owner))
bob.set_owner(owner);
@@ -145,7 +145,7 @@
bob.m_walkend = fr.Signed32();
if (bob.m_walkend < bob.m_walkstart)
throw game_data_error
- ("walkend (%i) < walkstart (%i)",
+ ("walkend (%1$i) < walkstart (%2$i)",
bob.m_walkend, bob.m_walkstart);
uint16_t const old_stacksize = bob.m_stack.size();
@@ -243,7 +243,7 @@
&mol.get<Map_Object>(objvar1_serial);
} catch (const _wexception & e) {
throw game_data_error
- ("objvar1 (%u): %s", objvar1_serial, e.what());
+ ("objvar1 (%1$u): %2$s", objvar1_serial, e.what());
}
} else
state.objvar1 = 0;
@@ -254,7 +254,7 @@
state.coords = Coords(x, y);
if (state.coords and (extent.w <= x or extent.h <= y))
throw game_data_error
- ("invalid coordinates (%i, %i)", x, y);
+ ("invalid coordinates (%1$i, %2$i)", x, y);
} else
state.coords = fr.Coords32_allow_null(extent);
@@ -296,7 +296,7 @@
state.path->append(map, fr.Direction8());
} catch (const _wexception & e) {
throw game_data_error
- ("step #%u: %s",
+ ("step #%1$u: %2$s",
pathsteps - step, e.what());
}
} catch (const _wexception & e) {
@@ -343,7 +343,7 @@
} catch (const _wexception & e) {
throw game_data_error
- ("(%s) reading state %u: %s",
+ ("(%1$s) reading state %2$u: %3$s",
bob.descr().descname().c_str(), i, e.what());
}
}
@@ -364,7 +364,7 @@
mol.mark_object_as_loaded(bob);
} catch (const _wexception & e) {
- throw game_data_error(_("bob %u: %s"), serial, e.what());
+ throw game_data_error(_("bob %1$u: %2$s"), serial, e.what());
}
}
} else
@@ -472,7 +472,7 @@
(soldier->m_combat_walkend <
soldier->m_combat_walkstart)
throw game_data_error
- ("combat_walkend (%i) < combat_walkstart (%i)",
+ ("combat_walkend (%1$i) < combat_walkstart (%2$i)",
soldier->m_combat_walkend,
soldier->m_combat_walkstart);
}
@@ -506,7 +506,7 @@
worker.set_location(&mol.get<PlayerImmovable>(location_serial));
} catch (const _wexception & e) {
throw game_data_error
- ("location (%u): %s", location_serial, e.what());
+ ("location (%1$u): %2$s", location_serial, e.what());
}
} else
worker.m_location = 0;
@@ -517,7 +517,7 @@
&mol.get<WareInstance>(carried_item_serial);
} catch (const _wexception & e) {
throw game_data_error
- ("carried item (%u): %s", carried_item_serial, e.what());
+ ("carried item (%1$u): %2$s", carried_item_serial, e.what());
}
} else
worker.m_carried_item = 0;
@@ -549,7 +549,7 @@
(_("unknown/unhandled version %u"), packet_version);
} catch (const _wexception & e) {
throw game_data_error
- ("worker %p (%u): %s", &worker, worker.serial(), e.what());
+ ("worker %1$p (%2$u): %3$s", &worker, worker.serial(), e.what());
}
}
=== modified file 'src/map_io/widelands_map_buildingdata_data_packet.cc'
--- src/map_io/widelands_map_buildingdata_data_packet.cc 2013-10-08 20:13:35 +0000
+++ src/map_io/widelands_map_buildingdata_data_packet.cc 2013-10-23 05:48:49 +0000
@@ -101,7 +101,7 @@
building.descr().get_animation(animation_name);
} catch (const Map_Object_Descr::Animation_Nonexistent &) {
log
- ("WARNING: %s %s does not have animation \"%s\"; "
+ ("WARNING: %1$s %2$s does not have animation \"%3$s\"; "
"using animation \"idle\" instead\n",
building.descr().tribe().name().c_str(),
building.descname().c_str(),
@@ -126,7 +126,7 @@
*i.current = &mol.get<Worker>(leaver_serial);
} catch (const _wexception & e) {
throw game_data_error
- ("leave queue item #%lu (%u): %s",
+ ("leave queue item #%1$lu (%2$u): %3$s",
static_cast<long int>
(i.current - leave_queue.begin()),
leaver_serial, e.what());
@@ -143,7 +143,7 @@
&mol.get<Map_Object>(leaver_serial);
} catch (const _wexception & e) {
throw game_data_error
- ("leave allow item (%u): %s", leaver_serial, e.what());
+ ("leave allow item (%1$u): %2$s", leaver_serial, e.what());
}
else {
building.m_leave_allow = 0;
@@ -159,7 +159,7 @@
// Only construction sites may have an empty list
if (building.m_old_buildings.empty() && !is_a(ConstructionSite, &building)) {
throw game_data_error
- ("Failed to read %s %u: No former buildings informations.\n"
+ ("Failed to read %1$s %2$u: No former buildings informations.\n"
"Your savegame is corrupted", building.descr().descname().c_str(), building.serial());
}
}
@@ -167,7 +167,7 @@
if (upcast(ProductionSite, productionsite, &building))
if (dynamic_cast<MilitarySite const *>(productionsite)) {
log
- ("WARNING: Found a stopped %s at (%i, %i) in the "
+ ("WARNING: Found a stopped %1$s at (%2$i, %3$i) in the "
"savegame. Militarysites are not stoppable. "
"Ignoring.",
building.descname().c_str(),
@@ -178,7 +178,7 @@
}
else
log
- ("WARNING: Found a stopped %s at (%i, %i) in the "
+ ("WARNING: Found a stopped %1$s at (%2$i, %3$i) in the "
"savegame. Only productionsites are stoppable. "
"Ignoring.",
building.descname().c_str(),
@@ -239,7 +239,7 @@
mol.mark_object_as_loaded(building);
} catch (const _wexception & e) {
- throw game_data_error(_("building %u: %s"), serial, e.what());
+ throw game_data_error(_("building %1$u: %2$s"), serial, e.what());
}
}
} else
@@ -320,7 +320,7 @@
pfb.m_builder = &mol.get<Worker>(builder_serial);
} catch (const _wexception & e) {
throw game_data_error
- ("builder (%u): %s", builder_serial, e.what());
+ ("builder (%1$u): %2$s", builder_serial, e.what());
}
} else
pfb.m_builder = 0;
@@ -419,7 +419,7 @@
constructionsite.m_builder = &mol.get<Worker>(builder_serial);
} catch (const _wexception & e) {
throw game_data_error
- ("builder (%u): %s", builder_serial, e.what());
+ ("builder (%1$u): %2$s", builder_serial, e.what());
}
} else
constructionsite.m_builder = 0;
@@ -554,7 +554,7 @@
char const * const name = fr.CString();
if (name != worker.name())
throw game_data_error
- (_("expected %s but found \"%s\""),
+ (_("expected %1$s but found \"%2$s\""),
worker.name().c_str(), name);
}
Ware_Index worker_index = tribe.worker_index(worker.name().c_str());
@@ -563,7 +563,7 @@
warehouse.m_incorporated_workers[worker_index].push_back(&worker);
} catch (const _wexception & e) {
throw game_data_error
- ("incorporated worker #%u (%u): %s",
+ ("incorporated worker #%1$u (%2$u): %3$s",
i, worker_serial, e.what());
}
}
@@ -578,16 +578,16 @@
tribe.safe_worker_index("carrier");
if (not worker_index) {
log
- ("WARNING: %s %u has a next_spawn time for nonexistent "
- "worker type \"%s\" set to %u, ignoring\n",
+ ("WARNING: %1$s %2$u has a next_spawn time for nonexistent "
+ "worker type \"%3$s\" set to %4$u, ignoring\n",
warehouse.descname().c_str(), warehouse.serial(),
"carrier", next_spawn);
} else if
(tribe.get_worker_descr(worker_index)->buildcost().size())
{
log
- ("WARNING: %s %u has a next_spawn time for worker type "
- "\"%s\", that costs something to build, set to %u, "
+ ("WARNING: %1$s %2$u has a next_spawn time for worker type "
+ "\"%3$s\", that costs something to build, set to %4$u, "
"ignoring\n",
warehouse.descname().c_str(), warehouse.serial(),
"carrier", next_spawn);
@@ -602,7 +602,7 @@
{
warehouse.molog
("read_warehouse: "
- "m_next_worker_without_cost_spawn[%u] = %u\n",
+ "m_next_worker_without_cost_spawn[%1$u] = %2$u\n",
i, warehouse.m_next_worker_without_cost_spawn[i]);
}
assert
@@ -624,16 +624,16 @@
tribe.safe_worker_index(worker_typename);
if (not worker_index) {
log
- ("WARNING: %s %u has a next_spawn time for nonexistent "
- "worker type \"%s\" set to %u, ignoring\n",
+ ("WARNING: %1$s %2$u has a next_spawn time for nonexistent "
+ "worker type \"%3$s\" set to %4$u, ignoring\n",
warehouse.descname().c_str(), warehouse.serial(),
worker_typename, next_spawn);
continue;
}
if (tribe.get_worker_descr(worker_index)->buildcost().size()) {
log
- ("WARNING: %s %u has a next_spawn time for worker type "
- "\"%s\", that costs something to build, set to %u, "
+ ("WARNING: %1$s %2$u has a next_spawn time for worker type "
+ "\"%3$s\", that costs something to build, set to %4$u, "
"ignoring\n",
warehouse.descname().c_str(), warehouse.serial(),
worker_typename, next_spawn);
@@ -648,9 +648,9 @@
static_cast<uint32_t>(Never()))
throw game_data_error
(_
- ("%s %u has a next_spawn time for worker type "
- "\"%s\" set to %u, but it was previously set "
- "to %u\n"),
+ ("%1$s %2$u has a next_spawn time for worker type "
+ "\"%3$s\" set to %4$u, but it was previously set "
+ "to %5$u\n"),
warehouse.descname().c_str(), warehouse.serial(),
worker_typename, next_spawn,
warehouse.m_next_worker_without_cost_spawn[i]);
@@ -841,16 +841,16 @@
// yet and will be cleared before it is read.
if (militarysite.m_capacity < militarysite.minSoldierCapacity()) {
log
- ("WARNING: militarysite %u of player %u at (%i, %i) has capacity "
- "set to %u but it must be at least %u. Changing to that value.\n",
+ ("WARNING: militarysite %1$u of player %2$u at (%3$i, %4$i) has capacity "
+ "set to %5$u but it must be at least %6$u. Changing to that value.\n",
militarysite.serial(), militarysite.owner().player_number(),
militarysite.get_position().x, militarysite.get_position().y,
militarysite.m_capacity, militarysite.minSoldierCapacity());
militarysite.m_capacity = militarysite.minSoldierCapacity();
} else if (militarysite.maxSoldierCapacity() < militarysite.m_capacity) {
log
- ("WARNING: militarysite %u of player %u at (%i, %i) has capacity "
- "set to %u but it can be at most %u. Changing to that value.\n",
+ ("WARNING: militarysite %1$u of player %2$u at (%3$i, %4$i) has capacity "
+ "set to %5$u but it can be at most %6$u. Changing to that value.\n",
militarysite.serial(), militarysite.owner().player_number(),
militarysite.get_position().x, militarysite.get_position().y,
militarysite.m_capacity, militarysite.maxSoldierCapacity());
@@ -945,7 +945,7 @@
const Tribe_Descr & tribe = worker->tribe();
log
- ("COMPAT(%s): replace '%s' (%u) by '%s' in '%s' (%u)\n",
+ ("COMPAT(%1$s): replace '%2$s' (%3$u) by '%4$s' in '%5$s' (%6$u)\n",
tribe.name().c_str(),
worker->descr().name().c_str(), worker->serial(),
compat[1].c_str(),
@@ -965,7 +965,7 @@
mol.schedule_act(*worker);
} else
throw game_data_error
- ("unknown compat '%s' for working position '%s'",
+ ("unknown compat '%1$s' for working position '%2$s'",
compat[0].c_str(), worker->descr().name().c_str());
}
@@ -1014,8 +1014,8 @@
if (gametime < skip_time)
throw game_data_error
(_
- ("program %s was skipped at time %u, but time is only "
- "%u"),
+ ("program %1$s was skipped at time %2$u, but time is only "
+ "%3$u"),
program_name, skip_time, gametime);
productionsite.m_skipped_programs[program_name] = skip_time;
} else {
@@ -1046,7 +1046,7 @@
program_name = compat[1];
} else
throw game_data_error
- ("Unknown compatibility code '%s' for program '%s'",
+ ("Unknown compatibility code '%1$s' for program '%2$s'",
compat[0].c_str(), program_name.c_str());
}
@@ -1130,7 +1130,7 @@
(_("unknown/unhandled version %u"), packet_version);
} catch (const _wexception & e) {
throw game_data_error
- ("productionsite (%s): %s",
+ ("productionsite (%1$s): %2$s",
productionsite.descname().c_str(), e.what());
}
}
@@ -1216,16 +1216,16 @@
// yet and will be cleared before it is read.
if (trainingsite.m_capacity < trainingsite.minSoldierCapacity()) {
log
- ("WARNING: trainingsite %u of player %u at (%i, %i) has capacity "
- "set to %u but it must be at least %u. Changing to that value.\n",
+ ("WARNING: trainingsite %1$u of player %2$u at (%3$i, %4$i) has capacity "
+ "set to %5$u but it must be at least %6$u. Changing to that value.\n",
trainingsite.serial(), trainingsite.owner().player_number(),
trainingsite.get_position().x, trainingsite.get_position().y,
trainingsite.m_capacity, trainingsite.minSoldierCapacity());
trainingsite.m_capacity = trainingsite.minSoldierCapacity();
} else if (trainingsite.maxSoldierCapacity() < trainingsite.m_capacity) {
log
- ("WARNING: trainingsite %u of player %u at (%i, %i) has capacity "
- "set to %u but it can be at most %u. Changing to that value.\n",
+ ("WARNING: trainingsite %1$u of player %2$u at (%3$i, %4$i) has capacity "
+ "set to %5$u but it can be at most %6$u. Changing to that value.\n",
trainingsite.serial(), trainingsite.owner().player_number(),
trainingsite.get_position().x, trainingsite.get_position().y,
trainingsite.m_capacity, trainingsite.maxSoldierCapacity());
=== modified file 'src/map_io/widelands_map_flag_data_packet.cc'
--- src/map_io/widelands_map_flag_data_packet.cc 2013-09-23 18:47:02 +0000
+++ src/map_io/widelands_map_flag_data_packet.cc 2013-10-23 05:48:49 +0000
@@ -21,6 +21,8 @@
#include <map>
+#include <boost/format.hpp>
+
#include "economy/flag.h"
#include "logic/game.h"
#include "logic/map.h"
@@ -88,7 +90,7 @@
(_("has a flag (%u)"), nf->serial());
} catch (const _wexception & e) {
throw game_data_error
- (_("neighbour node (%i, %i): %s"),
+ (_("neighbour node (%1$i, %2$i): %3$s"),
n.x, n.y, e.what());
}
}
@@ -108,7 +110,7 @@
fc));
} catch (const _wexception & e) {
throw game_data_error
- ("%u (at (%i, %i), owned by player %u): %s",
+ ("%1$u (at (%2$i, %3$i), owned by player %4$u): %5$s",
serial, fc.x, fc.y, owner, e.what());
}
}
=== modified file 'src/map_io/widelands_map_flagdata_data_packet.cc'
--- src/map_io/widelands_map_flagdata_data_packet.cc 2013-09-23 18:47:02 +0000
+++ src/map_io/widelands_map_flagdata_data_packet.cc 2013-10-23 05:48:49 +0000
@@ -81,12 +81,12 @@
{
if (mf != &flag)
throw game_data_error
- (_("wrong flag (%u) at given position (%i, %i)"),
+ (_("wrong flag (%1$u) at given position (%2$i, %3$i)"),
mf->serial(),
flag.m_position.x, flag.m_position.y);
} else
throw game_data_error
- (_("no flag at given position (%i, %i)"),
+ (_("no flag at given position (%1$i, %2$i)"),
flag.m_position.x, flag.m_position.y);
}
flag.m_animstart = fr.Unsigned16();
@@ -106,14 +106,14 @@
if (flag.m_building != &building)
throw game_data_error
(_
- ("has building %u at (%i, %i), which is not "
+ ("has building %1$u at (%2$i, %3$i), which is not "
"at the top left node"),
building_serial,
building.get_position().x,
building.get_position().y);
} catch (const _wexception & e) {
throw game_data_error
- (_("building (%u): %s"), building_serial, e.what());
+ (_("building (%1$u): %2$s"), building_serial, e.what());
}
else
flag.m_building = 0;
@@ -148,14 +148,14 @@
&mol.get<PlayerImmovable>(nextstep_serial);
} catch (const _wexception & e) {
throw game_data_error
- ("next step (%u): %s",
+ ("next step (%1$u): %2$s",
nextstep_serial, e.what());
}
} else
flag.m_items[i].nextstep = 0;
} catch (const _wexception & e) {
throw game_data_error
- ("item #%u (%u): %s", i, item_serial, e.what());
+ ("item #%1$u (%2$u): %3$s", i, item_serial, e.what());
}
}
@@ -165,7 +165,7 @@
&mol.get<Flag>(always_call_serial);
} catch (const _wexception & e) {
throw game_data_error
- ("always_call (%u): %s",
+ ("always_call (%1$u): %2$s",
always_call_serial, e.what());
}
else
@@ -184,7 +184,7 @@
(&mol.get<Worker>(worker_serial));
} catch (const _wexception & e) {
throw game_data_error
- ("worker #%u (%u): %s", i, worker_serial, e.what());
+ ("worker #%1$u (%2$u): %3$s", i, worker_serial, e.what());
}
}
@@ -212,7 +212,7 @@
mol.mark_object_as_loaded(flag);
}
} catch (const _wexception & e) {
- throw game_data_error(_("%u: %s"), serial, e.what());
+ throw game_data_error(_("%1$u: %2$s"), serial, e.what());
}
}
} else
=== modified file 'src/map_io/widelands_map_objective_data_packet.cc'
--- src/map_io/widelands_map_objective_data_packet.cc 2013-09-23 18:47:02 +0000
+++ src/map_io/widelands_map_objective_data_packet.cc 2013-10-23 05:48:49 +0000
@@ -62,7 +62,7 @@
objective.set_visible (s->get_safe_bool ("visible"));
objective.set_done (s->get_bool ("done", false));
} catch (const _wexception & e) {
- throw game_data_error(_("%s: %s"), name, e.what());
+ throw game_data_error(_("%1$s: %2$s"), name, e.what());
}
}
} else
=== modified file 'src/map_io/widelands_map_player_position_data_packet.cc'
--- src/map_io/widelands_map_player_position_data_packet.cc 2013-09-23 18:47:02 +0000
+++ src/map_io/widelands_map_player_position_data_packet.cc 2013-10-23 05:48:49 +0000
@@ -51,7 +51,7 @@
snprintf(buffer, sizeof(buffer), "player_%u", p);
map.set_starting_pos(p, s.get_safe_Coords(buffer, extent));
} catch (const _wexception & e) {
- throw game_data_error(_("player %u: %s"), p, e.what());
+ throw game_data_error(_("player %1$u: %2$s"), p, e.what());
}
} else
throw game_data_error
=== modified file 'src/map_io/widelands_map_players_messages_data_packet.cc'
--- src/map_io/widelands_map_players_messages_data_packet.cc 2013-09-23 18:47:02 +0000
+++ src/map_io/widelands_map_players_messages_data_packet.cc 2013-10-23 05:48:49 +0000
@@ -54,19 +54,19 @@
MessageQueue::const_iterator const begin = messages.begin();
if (begin != messages.end()) {
log
- ("ERROR: The message queue for player %u contains a message "
+ ("ERROR: The message queue for player %1$u contains a message "
"before any messages have been loade into it. This is a bug "
"in the savegame loading code. It created a new message and "
"added it to the queue. This is only allowed during "
"simulation, not at load. The following messge will be "
"removed when the queue is reset:\n"
- "\tsender : %s\n"
- "\ttitle : %s\n"
- "\tsent : %u\n"
- "\tduration: %u\n"
- "\tposition: (%i, %i)\n"
- "\tstatus : %u\n"
- "\tbody : %s\n",
+ "\tsender : %2$s\n"
+ "\ttitle : %3$s\n"
+ "\tsent : %4$u\n"
+ "\tduration: %5$u\n"
+ "\tposition: (%6$i, %7$i)\n"
+ "\tstatus : %8$u\n"
+ "\tbody : %9$s\n",
p,
begin->second->sender ().c_str(),
begin->second->title ().c_str(),
@@ -86,14 +86,14 @@
if (sent < previous_message_sent)
throw game_data_error
(_
- ("messages are not ordered: sent at %u but previous "
- "message sent at %u"),
+ ("messages are not ordered: sent at %1$u but previous "
+ "message sent at %2$u"),
sent, previous_message_sent);
if (gametime < sent)
throw game_data_error
(_
- ("message is sent in the future: sent at %u but "
- "gametime is only %u"),
+ ("message is sent in the future: sent at %1$u but "
+ "gametime is only %2$u"),
sent, gametime);
uint32_t duration = Forever(); // default duration
if (Section::Value const * const dv = s->get_val("duration")) {
@@ -109,14 +109,14 @@
if (sent + duration < sent)
throw game_data_error
(_
- ("duration %u is too large; causes numeric "
- "overflow when added to sent time %u"),
+ ("duration %1$u is too large; causes numeric "
+ "overflow when added to sent time %2$u"),
duration, sent);
if (sent + duration < gametime)
throw game_data_error
(_
- ("message should have expired at %u; sent at %u "
- "with duration %u but gametime is already %u"),
+ ("message should have expired at %1$u; sent at %2$u "
+ "with duration %3$u but gametime is already %4$u"),
sent + duration, sent, duration, gametime);
}
Message::Status status = Message::Archived; // default status
@@ -128,7 +128,7 @@
status = Message::Read;
else
throw game_data_error
- (_("expected %s but found \"%s\""),
+ (_("expected %1$s but found \"%2$s\""),
"{new|read}", status_string);
} catch (const _wexception & e) {
throw game_data_error("status: %s", e.what());
@@ -158,12 +158,12 @@
previous_message_sent = sent;
} catch (const _wexception & e) {
throw game_data_error
- (_("\"%s\": %s"), s->get_name(), e.what());
+ (_("\"%1$s\": %2$s"), s->get_name(), e.what());
}
prof.check_used();
} catch (const _wexception & e) {
throw game_data_error
- (_("messages for player %u: %s"), p, e.what());
+ (_("messages for player %1$u: %2$s"), p, e.what());
}
}
@@ -192,12 +192,12 @@
static_cast<uint32_t>(egbase.get_gametime()))
log
("ERROR: Trying to save a message that should have expired:\n"
- "\tsent = %u, duration = %u, expiry = %u, gametime = %u\n"
- "\tsender = \"%s\"\n"
- "\ttitle: %s\n"
- "\tbody: %s\n"
- "\tposition: (%i, %i)\n"
- "\tstatus: %s\n",
+ "\tsent = %1$u, duration = %2$u, expiry = %3$u, gametime = %4$u\n"
+ "\tsender = \"%5$s\"\n"
+ "\ttitle: %6$s\n"
+ "\tbody: %7$s\n"
+ "\tposition: (%8$i, %9$i)\n"
+ "\tstatus: %10$s\n",
message.sent(), message.duration(),
message.sent() + message.duration(), egbase.get_gametime(),
message.sender().c_str(), message.title().c_str(),
=== modified file 'src/map_io/widelands_map_roaddata_data_packet.cc'
--- src/map_io/widelands_map_roaddata_data_packet.cc 2013-09-23 18:47:02 +0000
+++ src/map_io/widelands_map_roaddata_data_packet.cc 2013-10-23 05:48:49 +0000
@@ -85,7 +85,7 @@
road.m_flags[0] = &mol.get<Flag>(flag_0_serial);
} catch (const _wexception & e) {
throw game_data_error
- ("flag 0 (%u): %s", flag_0_serial, e.what());
+ ("flag 0 (%1$u): %2$s", flag_0_serial, e.what());
}
}
{
@@ -94,7 +94,7 @@
road.m_flags[1] = &mol.get<Flag>(flag_1_serial);
} catch (const _wexception & e) {
throw game_data_error
- ("flag 1 (%u): %s", flag_1_serial, e.what());
+ ("flag 1 (%1$u): %2$s", flag_1_serial, e.what());
}
}
road.m_flagidx[0] = fr.Unsigned32();
@@ -111,7 +111,7 @@
p.append(egbase.map(), fr.Direction8());
} catch (const _wexception & e) {
throw game_data_error
- ("step #%lu: %s",
+ ("step #%1$lu: %2$s",
static_cast<long unsigned int>(nr_steps - i),
e.what());
}
@@ -144,7 +144,7 @@
carrier = &mol.get<Carrier>(carrier_serial);
} catch (const _wexception & e) {
throw game_data_error
- ("carrier (%u): %s", carrier_serial, e.what());
+ ("carrier (%1$u): %2$s", carrier_serial, e.what());
}
else {
carrier = 0;
@@ -198,7 +198,7 @@
mol.mark_object_as_loaded(road);
} catch (const _wexception & e) {
- throw game_data_error(_("road %u: %s"), serial, e.what());
+ throw game_data_error(_("road %1$u: %2$s"), serial, e.what());
}
}
} else
=== modified file 'src/map_io/widelands_map_ware_data_packet.cc'
--- src/map_io/widelands_map_ware_data_packet.cc 2013-09-23 18:47:02 +0000
+++ src/map_io/widelands_map_ware_data_packet.cc 2013-10-23 05:48:49 +0000
@@ -65,7 +65,7 @@
*new WareInstance(Ware_Index::Null(), 0))
.init(egbase);
} catch (const _wexception & e) {
- throw game_data_error(_("%u: %s"), serial, e.what());
+ throw game_data_error(_("%1$u: %2$s"), serial, e.what());
}
}
} else
=== modified file 'src/map_io/widelands_map_waredata_data_packet.cc'
--- src/map_io/widelands_map_waredata_data_packet.cc 2013-09-23 18:47:02 +0000
+++ src/map_io/widelands_map_waredata_data_packet.cc 2013-10-23 05:48:49 +0000
@@ -112,7 +112,7 @@
&mol.get<PlayerImmovable>(nextstep_serial);
} catch (const _wexception & e) {
throw game_data_error
- ("nextstep %u: %s", nextstep_serial, e.what());
+ ("nextstep %1$u: %2$s", nextstep_serial, e.what());
}
else
ware.m_transfer_nextstep =
@@ -123,11 +123,11 @@
(ref_cast<Game, Editor_Game_Base>(egbase), &location);
} catch (const _wexception & e) {
throw game_data_error
- ("location %u: %s", location_serial, e.what());
+ ("location %1$u: %2$s", location_serial, e.what());
}
mol.mark_object_as_loaded(ware);
} catch (const _wexception & e) {
- throw game_data_error(_("item %u: %s"), serial, e.what());
+ throw game_data_error(_("item %1$u: %2$s"), serial, e.what());
}
}
} else if
@@ -182,7 +182,7 @@
&mol.get<PlayerImmovable>(nextstep_serial);
} catch (const _wexception & e) {
throw game_data_error
- ("nextstep %u: %s", nextstep_serial, e.what());
+ ("nextstep %1$u: %2$s", nextstep_serial, e.what());
}
else
ware.m_transfer_nextstep =
@@ -193,11 +193,11 @@
(ref_cast<Game, Editor_Game_Base>(egbase), &location);
} catch (const _wexception & e) {
throw game_data_error
- ("location %u: %s", location_serial, e.what());
+ ("location %1$u: %2$s", location_serial, e.what());
}
mol.mark_object_as_loaded(ware);
} catch (const _wexception & e) {
- throw game_data_error(_("item %u: %s"), serial, e.what());
+ throw game_data_error(_("item %1$u: %2$s"), serial, e.what());
}
}
} else
=== modified file 'src/network/internet_gaming.cc'
--- src/network/internet_gaming.cc 2013-08-06 13:21:52 +0000
+++ src/network/internet_gaming.cc 2013-10-23 05:48:49 +0000
@@ -21,6 +21,7 @@
#include <boost/format.hpp>
#include <boost/lexical_cast.hpp>
+#include <libintl.h>
#include "compile_diagnostics.h"
#include "i18n.h"
@@ -430,8 +431,17 @@
else if (cmd == IGPCMD_TIME) {
// Client received the server time
time_offset = boost::lexical_cast<int>(packet.String()) - time(0);
- dedicatedlog("InternetGaming: Server time offset is %i seconds.\n", time_offset);
- std::string temp = (boost::format(_("Server time offset is %i seconds.")) % time_offset).str();
+ dedicatedlog
+ (ngettext
+ ("InternetGaming: Server time offset is %u second.",
+ "InternetGaming: Server time offset is %u seconds.", time_offset),
+ time_offset);
+ std::string temp =
+ (boost::format
+ (ngettext("Server time offset is %u second.",
+ "Server time offset is %u seconds.", time_offset))
+ % time_offset)
+ .str();
formatAndAddChat("", "", true, temp);
}
@@ -809,4 +819,3 @@
ingame_system_chat.push_back(c);
}
}
-
=== modified file 'src/network/nethost.cc'
--- src/network/nethost.cc 2013-10-08 20:13:35 +0000
+++ src/network/nethost.cc 2013-10-23 05:48:49 +0000
@@ -23,6 +23,7 @@
#include <boost/format.hpp>
#include <boost/lexical_cast.hpp>
+#include <libintl.h>
#ifndef _WIN32
#include <unistd.h> // for usleep
#endif
@@ -348,7 +349,7 @@
std::string cmd, arg1, arg2;
std::string temp = c.msg.substr(1); // cut off '/'
h->splitCommandArray(temp, cmd, arg1, arg2);
- dedicatedlog("%s + \"%s\" + \"%s\"\n", cmd.c_str(), arg1.c_str(), arg2.c_str());
+ dedicatedlog("%1$s + \"%2$s\" + \"%3$s\"\n", cmd.c_str(), arg1.c_str(), arg2.c_str());
// let "/me" pass - handled by chat
if (cmd == "me") {
@@ -1040,7 +1041,9 @@
s.Unsigned8(1);
s.String(msg.recipient);
s.send(d->clients.at(clientnum).sock);
- dedicatedlog("[Host]: personal chat: from %s to %s\n", msg.sender.c_str(), msg.recipient.c_str());
+ dedicatedlog
+ ("[Host]: personal chat: from %1$s to %2$s\n",
+ msg.sender.c_str(), msg.recipient.c_str());
} else {
std::string fail = "Failed to send message: Recipient \"";
fail += msg.recipient + "\" could not be found!";
@@ -1224,7 +1227,7 @@
return;
}
std::string temp = arg1 + " " + arg2;
- c.msg = (format(_("%s told me to run the command: \"%s\"")) % sender % temp).str();
+ c.msg = (format(_("%1$s told me to run the command: \"%2$s\"")) % sender % temp).str();
c.recipient = "";
send(c);
d->chat.send(temp);
@@ -1249,7 +1252,10 @@
if (sh.save_game(*d->game, savename, error))
c.msg = _("Game successfully saved!");
else
- c.msg = (format(_("Could not save the game to the file \"%s\"! (%s)")) % savename % error).str();
+ c.msg =
+ (format(_("Could not save the game to the file \"%1$s\"! (%2$s)"))
+ % savename % error)
+ .str();
send(c);
delete error;
}
@@ -1645,7 +1651,7 @@
return;
}
log
- ("Player %u attempted to change to tribe %s; not a valid tribe\n",
+ ("Player %1$u attempted to change to tribe %2$s; not a valid tribe\n",
number, tribe.c_str());
}
@@ -2234,7 +2240,7 @@
1000)
{
log
- ("[Host]: Client %i (%s) hung\n",
+ ("[Host]: Client %1$i (%2$s) hung\n",
i, d->settings.users.at(d->clients.at(i).usernum).name.c_str());
++nrhung;
if (d->clients.at(i).hung_since == 0) {
@@ -2245,7 +2251,8 @@
// inform the other clients about the problem regulary
if (deltanow - d->clients.at(i).lastdelta > 30) {
char buf[5];
- snprintf(buf, sizeof(buf), "%li", deltanow);
+ //snprintf(buf, sizeof(buf), "%li", deltanow);
+ snprintf(buf, sizeof(buf), ngettext("%li second", "%li seconds", deltanow), deltanow);
sendSystemMessageCode
("CLIENT_HUNG", d->settings.users.at(d->clients.at(i).usernum).name, buf);
d->clients.at(i).lastdelta = deltanow;
@@ -2428,9 +2435,9 @@
if (client.syncreport != d->syncreport) {
log
- ("[Host]: lost synchronization with client %u!\n"
- "I have: %s\n"
- "Client has: %s\n",
+ ("[Host]: lost synchronization with client %1$u!\n"
+ "I have: %2$s\n"
+ "Client has: %3$s\n",
i, d->syncreport.str().c_str(), client.syncreport.str().c_str());
d->game->save_syncstream(true);
@@ -2751,7 +2758,7 @@
int32_t time = r.Signed32();
Widelands::PlayerCommand & plcmd = *Widelands::PlayerCommand::deserialize(r);
log
- ("[Host]: Client %u (%u) sent player command %i for %i, time = %i\n",
+ ("[Host]: Client %1$u (%2$u) sent player command %3$i for %4$i, time = %5$i\n",
i, client.playernum, plcmd.id(), plcmd.sender(), time);
recvClientTime(i, time);
if (plcmd.sender() != client.playernum + 1)
@@ -2816,7 +2823,9 @@
uint32_t part = r.Unsigned32();
std::string x = r.String();
if (x != file->md5sum) {
- dedicatedlog("[Host]: File transfer checksum missmatch %s != %s\n", x.c_str(), file->md5sum.c_str());
+ dedicatedlog
+ ("[Host]: File transfer checksum missmatch %1$s != %2$s\n",
+ x.c_str(), file->md5sum.c_str());
return; // Surely the file was changed, so we cancel here.
}
if (part >= file->parts.size())
@@ -2836,7 +2845,7 @@
if (part % 100 == 0)
sendSystemMessageCode
("SENDING_FILE_PART",
- (boost::format("%i/%i") % part % (file->parts.size() + 1)).str(),
+ (boost::format("%1$i/%2$i") % part % (file->parts.size() + 1)).str(),
file->filename, d->settings.users.at(client.usernum).name);
sendFilePart(client.sock, part);
break;
@@ -2865,7 +2874,7 @@
void NetHost::disconnectPlayerController(uint8_t const number, const std::string & name)
{
- dedicatedlog("[Host]: disconnectPlayerController(%u, %s)\n", number, name.c_str());
+ dedicatedlog("[Host]: disconnectPlayerController(%1$u, %2$s)\n", number, name.c_str());
for (uint32_t i = 0; i < d->settings.users.size(); ++i) {
if (d->settings.users.at(i).position == number) {
@@ -2922,7 +2931,7 @@
} else
sendSystemMessageCode("UNKNOWN_LEFT_GAME", reason, arg);
- dedicatedlog("[Host]: disconnectClient(%u, %s, %s)\n", number, reason.c_str(), arg.c_str());
+ dedicatedlog("[Host]: disconnectClient(%1$u, %2$s, %3$s)\n", number, reason.c_str(), arg.c_str());
if (client.sock) {
if (sendreason) {
@@ -2999,6 +3008,6 @@
}
dedicatedlog
- ("NetHost::report_result(%d, %u, %s)\n",
+ ("NetHost::report_result(%1$d, %2$u, %3$s)\n",
player->player_number(), static_cast<uint8_t>(result), info.c_str());
}
=== modified file 'src/network/network_gaming_messages.cc'
--- src/network/network_gaming_messages.cc 2013-07-26 20:19:36 +0000
+++ src/network/network_gaming_messages.cc 2013-10-23 05:48:49 +0000
@@ -130,7 +130,7 @@
ngmessages["KICKED"] = _("Kicked by the host: %s");
ngmessages["MALFORMED_COMMANDS"] = _("Client sent malformed commands: %s");
ngmessages["SOMETHING_WRONG"] = _("Something went wrong: %s");
- ngmessages["CLIENT_X_LEFT_GAME"] = _("%s has left the game (%s)");
+ ngmessages["CLIENT_X_LEFT_GAME"] = _("%1$s has left the game (%2$s)");
ngmessages["UNKNOWN_LEFT_GAME"] = _("Unknown user has left the game (%s)");
ngmessages["SYNCREQUEST_WO_GAME"] = _("Server sent a SYNCREQUEST even though no game is running.");
ngmessages["PLAYERCMD_WO_GAME"] = _("Received a PLAYERCOMMAND even though no game is running.");
@@ -152,15 +152,16 @@
ngmessages["REQUEST_OF_N_E_FILE"] = _("Client requests file although none is available to send.");
ngmessages["REQUEST_OF_N_E_FILEPART"] = _("Client requests file part that does not exist.");
ngmessages["SENT_PLAYER_TO_LOBBY"] = _("Host sent player %s to the lobby!");
- ngmessages["DIFFERENT_WL_VERSION"] = _("WARNING: %s uses version: %s, while Host uses version: %s");
+ ngmessages["DIFFERENT_WL_VERSION"] =
+ _("WARNING: %1$s uses version: %2$s, while Host uses version: %3$s");
ngmessages["CLIENT_HAS_JOINED_GAME"] = _("%s has joined the game");
ngmessages["GAME_SAVED_AS"] = _("Game was saved as %s.");
- ngmessages["STARTED_SENDING_FILE"] = _("Started to send file %s to %s!");
- ngmessages["COMPLETED_FILE_TRANSFER"] = _("Completed transfer of file %s to %s");
- ngmessages["SENDING_FILE_PART"] = _("Sending part %s of file %s to %s");
+ ngmessages["STARTED_SENDING_FILE"] = _("Started to send file %1$s to %2$s!");
+ ngmessages["COMPLETED_FILE_TRANSFER"] = _("Completed transfer of file %1$s to %2$s");
+ ngmessages["SENDING_FILE_PART"] = _("Sending part %1$s of file %2$s to %3$s");
ngmessages["PLAYER_DEFEATED"] = _("The player \"%s\" was defeated and became spectator.");
- ngmessages["CLIENT_HUNG"] = _("Client %s did not answer for more than %s seconds.");
+ ngmessages["CLIENT_HUNG"] = _("Client %1$s did not answer for more than %2$s.");
ngmessages["CLIENT_HUNG_AUTOKICK"] =
- _("Client %s will automatically be kicked, if no answer is received within %s seconds.");
+ _("Client %1$s will automatically be kicked, if no answer is received within %2$s.");
}
=== modified file 'src/scripting/lua_globals.cc'
--- src/scripting/lua_globals.cc 2013-07-26 20:19:36 +0000
+++ src/scripting/lua_globals.cc 2013-10-23 05:48:49 +0000
@@ -19,6 +19,8 @@
#include "scripting/lua_globals.h"
+#include <boost/format.hpp>
+#include <libintl.h>
#include <lua.hpp>
#include "build_info.h"
@@ -52,6 +54,64 @@
* MODULE FUNCTIONS
* ========================================================================
*/
+
+/* RST
+.. function:: string.bformat
+
+ Not really a global function. But we add a method to string built in type in
+ Lua that has similar functionality to the built in string.format, but
+ instead uses boost::format. This allows for better control of the formatting
+ as well as reordering of arguments which is needed for proper localisation.
+
+ :returns: :const:`nil`
+*/
+static int L_string_bformat(lua_State * L) {
+ try {
+ boost::format fmt(luaL_checkstring(L, 1));
+ const int nargs = lua_gettop(L);
+
+ // Start with argument, the first is already consumed
+ for (int i = 2; i <= nargs; ++i) {
+ switch (lua_type(L, i)) {
+ case LUA_TNIL:
+ fmt % "nil";
+ break;
+
+ case LUA_TNUMBER:
+ {
+ int d = lua_tointeger(L, i);
+ if (d == 0 && !lua_isnumber(L, 1)) {
+ fmt % d;
+ } else {
+ fmt % luaL_checknumber(L, i);
+ }
+ }
+ break;
+
+ case LUA_TBOOLEAN:
+ fmt % luaL_checkboolean(L, i);
+ break;
+
+ case LUA_TSTRING:
+ fmt % luaL_checkstring(L, i);
+ break;
+
+ case LUA_TTABLE:
+ case LUA_TFUNCTION:
+ case LUA_TUSERDATA:
+ case LUA_TTHREAD:
+ case LUA_TLIGHTUSERDATA:
+ report_error(L, "Cannot format the given type %s at index %i", lua_typename(L, i), i);
+ break;
+ }
+ }
+
+ lua_pushstring(L, fmt.str());
+ return 1;
+ } catch (const boost::io::format_error& err) {
+ return report_error(L, "Error in bformat: %s", err.what());
+ }
+}
/* RST
.. function:: set_textdomain(domain)
@@ -82,7 +142,7 @@
:arg str: text to translate.
:type str: :class:`string`
- :returns: :const:`nil`
+ :returns: The translated string.
*/
static int L__(lua_State * L) {
lua_getglobal(L, "__TEXTDOMAIN");
@@ -97,6 +157,38 @@
}
/* RST
+.. function:: ngettext(msgid, msgid_plural, n)
+
+ A wrapper for the ngettext() function, needed for translations of numbered
+ strings.
+
+ :arg msgid: text to translate (singular)
+ :type msgid: :class:`string`
+ :arg msgid_plural: text to translate (plural)
+ :type msgid:_plural :class:`string`
+ :arg n: The number of elements.
+ :type n: An unsigned integer.
+
+ :returns: The translated string.
+*/
+// UNTESTED
+static int L_ngettext(lua_State * L) {
+ // S: msgid msgid_plural n
+ const std::string msgid = luaL_checkstring(L, 1);
+ const std::string msgid_plural = luaL_checkstring(L, 2);
+ const uint32_t n = luaL_checkuint32(L, 3);
+
+ lua_getglobal(L, "__TEXTDOMAIN");
+ if (not lua_isnil(L, -1)) {
+ i18n::Textdomain dom(luaL_checkstring(L, -1));
+ lua_pushstring(L, ngettext(msgid.c_str(), msgid_plural.c_str(), n));
+ } else {
+ lua_pushstring(L, ngettext(msgid.c_str(), msgid_plural.c_str(), n));
+ }
+ return 1;
+}
+
+/* RST
.. function:: use(ns, script)
Includes the script referenced at the caller location. Use this
@@ -150,6 +242,7 @@
{"use", &L_use},
{"get_build_id", &L_get_build_id},
{"_", &L__},
+ {"ngettext", &L_ngettext},
{0, 0}
};
@@ -158,8 +251,14 @@
luaL_register(L, 0, globals);
lua_pop(L, 1);
+ // Also add in string.bformat to use boost::format instead, so that we get
+ // proper localisation.
+ lua_getglobal(L, "string"); // S: string_lib
+ lua_pushstring(L, "bformat"); // S: string_lib "bformat"
+ lua_pushcfunction(L, &L_string_bformat); // S: string_lib "bformat" function
+ lua_settable(L, -3); // S: string_lib
+ lua_pop(L, 1);
}
};
-
=== modified file 'src/scripting/persistence.cc'
--- src/scripting/persistence.cc 2013-10-10 20:39:19 +0000
+++ src/scripting/persistence.cc 2013-10-23 05:48:49 +0000
@@ -140,7 +140,7 @@
"os", "package", "pairs", "pcall", "print", "rawequal",
"rawget", "rawset", "require", "select", "setfenv", "setmetatable",
"table", "tonumber", "tostring", "type", "unpack", "wl", "xpcall",
- "string", "use", "_", "set_textdomain", "get_build_id", "coroutine.yield", 0
+ "string", "use", "_", "set_textdomain", "get_build_id", "coroutine.yield", "ngettext", 0
};
/**
=== modified file 'src/sound/sound_handler.cc'
--- src/sound/sound_handler.cc 2013-09-23 18:47:02 +0000
+++ src/sound/sound_handler.cc 2013-10-23 05:48:49 +0000
@@ -144,7 +144,7 @@
Uint16 format;
numtimesopened = Mix_QuerySpec(&frequency, &format, &channels);
log
- (_("Sound_Handler closing times %i, freq %i, format %i, chan %i\n"),
+ (_("Sound_Handler closing times %1$i, freq %2$i, format %3$i, chan %4$i\n"),
numtimesopened, frequency, format, channels);
if (!numtimesopened)
@@ -311,8 +311,8 @@
m_fxs[fx_name]->add_fx(m);
} else
log
- ("Sound_Handler: loading sound effect \"%s\" for FXset \"%s\" "
- "failed: %s\n",
+ ("Sound_Handler: loading sound effect \"%1$s\" for FXset \"%2$s\" "
+ "failed: %3$s\n",
path, fx_name.c_str(), Mix_GetError());
}
=== modified file 'src/ui_basic/messagebox.cc'
--- src/ui_basic/messagebox.cc 2013-07-26 20:19:36 +0000
+++ src/ui_basic/messagebox.cc 2013-10-23 05:48:49 +0000
@@ -87,21 +87,21 @@
if (type == OK) {
UI::Button * okbtn = new Button
(this, "ok",
- (get_inner_w() - 60) / 2, get_inner_h() - 30, 60, 20,
+ (get_inner_w() - 120) / 2, get_inner_h() - 30, 120, 20,
g_gr->images().get("pics/but0.png"),
_("OK"));
okbtn->sigclicked.connect(boost::bind(&WLMessageBox::pressedOk, boost::ref(*this)));
} else if (type == YESNO) {
UI::Button * yesbtn = new Button
(this, "yes",
- (get_inner_w() / 2 - 60) / 2, get_inner_h() - 30, 60, 20,
+ (get_inner_w() / 2 - 120) / 2, get_inner_h() - 30, 120, 20,
g_gr->images().get("pics/but0.png"),
_("Yes"));
yesbtn->sigclicked.connect(boost::bind(&WLMessageBox::pressedYes, boost::ref(*this)));
UI::Button * nobtn = new Button
(this, "no",
- (get_inner_w() / 2 - 60) / 2 + get_inner_w() / 2, get_inner_h() - 30,
- 60, 20,
+ (get_inner_w() / 2 - 120) / 2 + get_inner_w() / 2, get_inner_h() - 30,
+ 120, 20,
g_gr->images().get("pics/but1.png"),
_("No"));
nobtn->sigclicked.connect(boost::bind(&WLMessageBox::pressedNo, boost::ref(*this)));
=== modified file 'src/ui_fsmenu/launchMPG.cc'
--- src/ui_fsmenu/launchMPG.cc 2013-07-26 20:19:36 +0000
+++ src/ui_fsmenu/launchMPG.cc 2013-10-23 05:48:49 +0000
@@ -20,6 +20,7 @@
#include "ui_fsmenu/launchMPG.h"
#include <boost/format.hpp>
+#include <libintl.h>
#include "gamecontroller.h"
#include "gamesettings.h"
@@ -54,9 +55,9 @@
center_to_parent();
uint32_t y = get_inner_h() / 10;
- uint32_t space = get_inner_w() / 40;
- uint32_t butw = get_inner_w() * 3 / 10;
- uint32_t buth = get_inner_h() * 8 / 10;
+ uint32_t space = y;
+ uint32_t butw = get_inner_w() - 2 * space;
+ uint32_t buth = (get_inner_h() - 2 * space) / 5;
UI::Button * btn = new UI::Button
(this, "map",
space, y, butw, buth,
@@ -69,7 +70,7 @@
btn = new UI::Button
(this, "saved_game",
- 2 * space + butw, y, butw, buth,
+ space, y + buth + space, butw, buth,
g_gr->images().get("pics/but0.png"),
_("Saved game"), _("Select a saved game"), true, false);
btn->sigclicked.connect
@@ -79,7 +80,7 @@
btn = new UI::Button
(this, "cancel",
- 3 * space + 2 * butw, y, butw, buth,
+ space + butw / 4, y + 3 * buth + 2 * space, butw / 2, buth,
g_gr->images().get("pics/but1.png"),
_("Cancel"), _("Cancel selection"), true, false);
btn->sigclicked.connect
@@ -152,16 +153,17 @@
std::string()),
m_clients
(this,
- get_w() / 10, get_h() / 10,
- _("Clients")),
+ // (get_w() * 57 / 80) is the width of the MultiPlayerSetupGroup
+ get_w() / 50, get_h() / 10, (get_w() * 57 / 80) / 3, get_h() / 10,
+ _("Clients"), UI::Align_HCenter),
m_players
(this,
- get_w() / 2, get_h() / 10,
- _("Players")),
+ get_w() / 50 + (get_w() * 57 / 80) * 6 / 15, get_h() / 10, (get_w() * 57 / 80) * 9 / 15, get_h() / 10,
+ _("Players"), UI::Align_HCenter),
m_map
(this,
- get_w() * 8 / 10, get_h() / 10,
- _("Map")),
+ get_w() * 37 / 50, 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,
@@ -311,7 +313,7 @@
/// Opens a popup window to select a map or saved game
void Fullscreen_Menu_LaunchMPG::change_map_or_save() {
MapOrSaveSelectionWindow selection_window
- (this, m_ctrl, get_w() / 2, get_h() / 20, font_small());
+ (this, m_ctrl, get_w() / 3, get_h() / 4, font_small());
switch (selection_window.run()) {
case 1:
select_map();
@@ -645,8 +647,8 @@
std::string infotext;
infotext += _("Map informations:\n");
- infotext += (format(_("* Size: %ux%u\n")) % map.get_width() % map.get_height()).str();
- infotext += (format(_("* %i Players\n")) % m_nr_players).str();
+ infotext += (format(_("* Size: %1$ux%2$u\n")) % map.get_width() % map.get_height()).str();
+ infotext += (format(ngettext("* %u Player\n", "* %u Players\n", m_nr_players)) % m_nr_players).str();
infotext += (format(_("* World type: %s\n")) % world).str();
if (m_settings->settings().scenario)
infotext += (format(_("* Scenario mode selected\n"))).str();
=== modified file 'src/ui_fsmenu/launchSPG.cc'
--- src/ui_fsmenu/launchSPG.cc 2013-07-26 20:19:36 +0000
+++ src/ui_fsmenu/launchSPG.cc 2013-10-23 05:48:49 +0000
@@ -54,17 +54,17 @@
_("Select map"), std::string(), false, false),
m_wincondition
(this, "win_condition",
- get_w() * 7 / 10, get_h() * 4 / 10, m_butw, m_buth,
+ get_w() * 7 / 10, get_h() * 4 / 10 + m_buth, m_butw, m_buth,
g_gr->images().get("pics/but1.png"),
"", std::string(), false, false),
m_back
(this, "back",
- get_w() * 7 / 10, get_h() * 9 / 20, m_butw, m_buth,
+ get_w() * 7 / 10, 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() * 7 / 10, get_h() * 1 / 2, m_butw, m_buth,
+ get_w() * 7 / 10, get_h() * 9 / 10, m_butw, m_buth,
g_gr->images().get("pics/but2.png"),
_("Start game"), std::string(), false, false),
@@ -75,31 +75,32 @@
_("Launch Game"), UI::Align_HCenter),
m_mapname
(this,
- get_w() * 7 / 10 + m_butw / 2, get_h() * 5 / 20,
+ get_w() * 7 / 10 + m_butw / 2, get_h() * 53 / 200 - 15,
std::string(), UI::Align_HCenter),
m_name
(this,
- get_w() * 1 / 25, get_h() * 53 / 200,
+ get_w() * 1 / 25, get_h() * 53 / 200 - 15,
_("Player's name"), UI::Align_Left),
m_type
(this,
- get_w() * 19 / 100, get_h() * 53 / 200,
+ // (Element x) + (PlayerDescriptionGroup x) + border
+ ((get_w() * 16 / 25) * 35 / 125) + (get_w() / 25) + 2, get_h() * 53 / 200 - 15,
_("Player's type"), UI::Align_Left),
m_team
(this,
- get_w() * 31 / 100, get_h() * 53 / 200,
+ ((get_w() * 16 / 25) * 35 / 125) + (get_w() / 25) + 2, get_h() * 53 / 200,
_("Team"), UI::Align_Left),
m_tribe
(this,
- get_w() * 36 / 100, get_h() * 53 / 200,
+ ((get_w() * 16 / 25) * 80 / 125) + (get_w() / 25) + 2, get_h() * 53 / 200 - 15,
_("Player's tribe"), UI::Align_Left),
m_init
(this,
- get_w() * 51 / 100, get_h() * 53 / 200,
+ ((get_w() * 16 / 25) * 55 / 125) + (get_w() / 25) + 2, get_h() * 53 / 200,
_("Start type"), UI::Align_Left),
m_wincondition_type
(this,
- get_w() * 7 / 10 + (m_butw / 2), get_h() * 7 / 20,
+ get_w() * 7 / 10 + (m_butw / 2), get_h() * 7 / 20 + m_buth,
_("Type of game"), UI::Align_HCenter),
// Variables and objects used in the menu
@@ -146,7 +147,7 @@
m_back.set_font(font_small());
m_ok.set_font(font_small());
- uint32_t y = get_h() / 4;
+ uint32_t y = get_h() * 3 / 10 - m_buth;
char posIco[42];
for (uint32_t i = 0; i < MAX_PLAYERS; ++i) {
sprintf(posIco, "pics/fsel_editor_set_player_0%i_pos.png", i + 1);
@@ -162,8 +163,9 @@
m_players[i] =
new PlayerDescriptionGroup
(this,
- get_w() / 25, y, get_w() * 16 / 25, get_h() * 17 / 500,
+ get_w() / 25, y, get_w() * 16 / 25, get_h() * 17 / 500 * 2,
settings, i, font_small());
+ y += m_buth / 1.17;
}
}
=== modified file 'src/ui_fsmenu/loadgame.cc'
--- src/ui_fsmenu/loadgame.cc 2013-08-12 09:06:15 +0000
+++ src/ui_fsmenu/loadgame.cc 2013-10-23 05:48:49 +0000
@@ -21,6 +21,8 @@
#include <cstdio>
+#include <boost/format.hpp>
+
#include "game_io/game_loader.h"
#include "game_io/game_preload_data_packet.h"
#include "gamecontroller.h"
@@ -155,7 +157,7 @@
UI::WLMessageBox confirmationBox
(this,
_("Delete file"),
- _("Do you really want to delete ") + fname + "?",
+ (boost::format(_("Do you really want to delete %s?")) % fname).str(),
UI::WLMessageBox::YESNO);
if (confirmationBox.run()) {
g_fs->Unlink(m_list.get_selected());
=== modified file 'src/ui_fsmenu/loadreplay.cc'
--- src/ui_fsmenu/loadreplay.cc 2013-08-02 10:45:32 +0000
+++ src/ui_fsmenu/loadreplay.cc 2013-10-23 05:48:49 +0000
@@ -19,6 +19,8 @@
#include "ui_fsmenu/loadreplay.h"
+#include <boost/format.hpp>
+
#include "game_io/game_loader.h"
#include "game_io/game_preload_data_packet.h"
#include "graphic/graphic.h"
@@ -136,7 +138,7 @@
UI::WLMessageBox confirmationBox
(this,
_("Delete file"),
- _("Do you really want to delete ") + fname + "?",
+ (boost::format(_("Do you really want to delete %s?")) % fname).str(),
UI::WLMessageBox::YESNO);
if (confirmationBox.run()) {
g_fs->Unlink(m_list.get_selected());
=== modified file 'src/ui_fsmenu/mapselect.cc'
--- src/ui_fsmenu/mapselect.cc 2013-08-12 11:07:40 +0000
+++ src/ui_fsmenu/mapselect.cc 2013-10-23 05:48:49 +0000
@@ -50,7 +50,7 @@
// Text labels
m_title
(this,
- get_w() / 2, get_h() * 7 / 50,
+ get_w() / 2, get_h() / 10,
_("Choose a map"),
UI::Align_HCenter),
m_label_load_map_as_scenario
=== modified file 'src/ui_fsmenu/options.cc'
--- src/ui_fsmenu/options.cc 2013-07-26 20:19:36 +0000
+++ src/ui_fsmenu/options.cc 2013-10-23 05:48:49 +0000
@@ -74,7 +74,7 @@
m_sb_remove_replays
(this,
- get_w() * 6767 / 10000, get_h() * 8631 / 10000, get_w() / 4, m_vbutw,
+ get_w() * 6767 / 10000, get_h() * 8631 / 10000, get_w() / 4, m_vbutw,
opt.remove_replays, 0, 365, _("days"),
g_gr->images().get("pics/but1.png"), true),
@@ -262,7 +262,7 @@
for (uint32_t i = 0; i < m_resolutions.size(); ++i) {
char buf[32];
sprintf
- (buf, _("%ix%i %i bit"), m_resolutions[i].xres,
+ (buf, _("%1$ix%2$i %3$i bit"), m_resolutions[i].xres,
m_resolutions[i].yres, m_resolutions[i].depth);
const bool selected =
m_resolutions[i].xres == opt.xres and
@@ -273,7 +273,7 @@
}
if (not did_select_a_res) {
char buf[32];
- sprintf(buf, "%ix%i %i bit", opt.xres, opt.yres, opt.depth);
+ sprintf(buf, "%1$ix%2$i %3$i bit", opt.xres, opt.yres, opt.depth);
m_reslist.add(buf, 0, nullptr, true);
uint32_t entry = m_resolutions.size();
m_resolutions.resize(entry + 1);
=== modified file 'src/wui/building_statistics_menu.cc'
--- src/wui/building_statistics_menu.cc 2013-07-26 20:19:36 +0000
+++ src/wui/building_statistics_menu.cc 2013-10-23 05:48:49 +0000
@@ -36,7 +36,7 @@
#include "wui/mapviewpixelconstants.h"
#include "wui/plot_area.h"
-#define WINDOW_WIDTH 440
+#define WINDOW_WIDTH 625
#define WINDOW_HEIGHT 440
#define VMARGIN 5
#define HMARGIN 5
@@ -44,8 +44,8 @@
#define HSPACING 5
#define BUILDING_LIST_HEIGHT 285
#define BUILDING_LIST_WIDTH (WINDOW_WIDTH - HMARGIN - HMARGIN)
-#define LABEL_X 178
-#define LABEL_WIDTH 122
+#define LABEL_X 200
+#define LABEL_WIDTH 150
#define VALUE_X (LABEL_X + LABEL_WIDTH)
#define JUMP_PREV_BUTTON_X (WINDOW_WIDTH - HMARGIN - 24 - HSPACING - 24)
#define JUMP_NEXT_BUTTON_X (WINDOW_WIDTH - HMARGIN - 24)
@@ -107,11 +107,11 @@
m_last_table_index (0)
{
// building list
- m_table.add_column(206, _("Name"));
- m_table.add_column (50, _("Size"), UI::Align_HCenter);
- m_table.add_column (50, _("Prod"), UI::Align_Right);
- m_table.add_column (50, _("Owned"), UI::Align_Right);
- m_table.add_column (50, _("Build"), UI::Align_HCenter);
+ m_table.add_column(310, _("Name"));
+ m_table.add_column (70, _("Size"), UI::Align_HCenter);
+ m_table.add_column (70, _("Prod"), UI::Align_Right);
+ m_table.add_column (70, _("Owned"), UI::Align_Right);
+ m_table.add_column (70, _("Build"), UI::Align_Right);
m_table.selected.connect(boost::bind(&Building_Statistics_Menu::table_changed, this, _1));
m_table.set_column_compare
(Columns::Size,
=== modified file 'src/wui/game_debug_ui.cc'
--- src/wui/game_debug_ui.cc 2013-08-07 03:51:32 +0000
+++ src/wui/game_debug_ui.cc 2013-10-23 05:48:49 +0000
@@ -281,7 +281,7 @@
{
Widelands::Player_Number const owner = m_coords.field->get_owned_by();
snprintf
- (buffer, sizeof(buffer), "(%i, %i)\nheight: %u\nowner: %u\n",
+ (buffer, sizeof(buffer), "(%1$i, %2$i)\nheight: %3$u\nowner: %4$u\n",
m_coords.x, m_coords.y, m_coords.field->get_height(), owner);
str += buffer;
if (owner) {
@@ -324,7 +324,7 @@
if (time_last_surveyed != Widelands::Never()) {
snprintf
(buffer, sizeof(buffer),
- " D triangle last surveyed at %u: amount %u\n",
+ " D triangle last surveyed at %1$u: amount %2$u\n",
time_last_surveyed, player_field.resource_amounts.d);
str += buffer;
} else str += " D triangle never surveyed\n";
@@ -335,7 +335,7 @@
if (time_last_surveyed != Widelands::Never()) {
snprintf
(buffer, sizeof(buffer),
- " R triangle last surveyed at %u: amount %u\n",
+ " R triangle last surveyed at %1$u: amount %2$u\n",
time_last_surveyed, player_field.resource_amounts.r);
str += buffer;
} else str += " R triangle never surveyed\n";
@@ -351,9 +351,9 @@
snprintf
(buffer, sizeof(buffer),
- " last seen at %u:\n"
- " owner: %u\n"
- " immovable animation:\n%s\n"
+ " last seen at %1$u:\n"
+ " owner: %2$u\n"
+ " immovable animation:\n%3$s\n"
" ",
player_field.time_node_last_unseen,
player_field.owner,
@@ -378,7 +378,7 @@
str += buffer;
snprintf
- (buffer, sizeof(buffer), _(" Amount: %i/%i\n"), ramount, startingAmount);
+ (buffer, sizeof(buffer), _(" Amount: %1$i/%2$i\n"), ramount, startingAmount);
str += buffer;
}
@@ -389,7 +389,7 @@
{
snprintf
(buffer, sizeof(buffer),
- "%s (%u)", imm->name().c_str(), imm->serial());
+ "%1$s (%2$u)", imm->name().c_str(), imm->serial());
m_ui_immovable.set_title(buffer);
m_ui_immovable.set_enabled(true);
} else {
@@ -430,7 +430,7 @@
container_iterate_const(std::vector<Widelands::Bob *>, bobs, j) {
snprintf
(buffer, sizeof(buffer),
- "%s (%u)", (*j.current)->name().c_str(), (*j.current)->serial());
+ "%1$s (%2$u)", (*j.current)->name().c_str(), (*j.current)->serial());
m_ui_bobs.add(buffer, (*j.current)->serial());
}
}
=== modified file 'src/wui/game_message_menu.cc'
--- src/wui/game_message_menu.cc 2013-07-27 15:09:18 +0000
+++ src/wui/game_message_menu.cc 2013-10-23 05:48:49 +0000
@@ -43,25 +43,25 @@
(Interactive_Player & plr, UI::UniqueWindow::Registry & registry)
:
UI::UniqueWindow
- (&plr, "messages", ®istry, 370, 375, _("Message Menu: Inbox")),
+ (&plr, "messages", ®istry, 580, 375, _("Message Menu: Inbox")),
message_body
(this,
- 5, 150, 360, 220,
+ 5, 150, 570, 220,
"", UI::Align_Left, 1),
mode(Inbox)
{
- list = new UI::Table<uintptr_t>(this, 5, 35, 360, 110);
+ list = new UI::Table<uintptr_t>(this, 5, 35, 570, 110);
list->selected.connect(boost::bind(&GameMessageMenu::selected, this, _1));
list->double_clicked.connect(boost::bind(&GameMessageMenu::double_clicked, this, _1));
- list->add_column (50, _("Select"), UI::Align_HCenter, true);
- list->add_column (50, _("Status"), UI::Align_HCenter);
- list->add_column(136, _("Title"));
- list->add_column(100, _("Time sent"));
+ list->add_column (60, _("Select"), UI::Align_HCenter, true);
+ list->add_column (60, _("Status"), UI::Align_HCenter);
+ list->add_column(330, _("Title"));
+ list->add_column(120, _("Time sent"));
UI::Button * clearselectionbtn =
new UI::Button
(this, "clear_selection",
- 5, 5, 70, 25,
+ 5, 5, 140, 25,
g_gr->images().get("pics/but0.png"),
_("Clear"), _("Clear selection"));
clearselectionbtn->sigclicked.connect
@@ -70,7 +70,7 @@
UI::Button * invertselectionbtn =
new UI::Button
(this, "invert_selection",
- 80, 5, 70, 25,
+ 150, 5, 140, 25,
g_gr->images().get("pics/but0.png"),
_("Invert"), _("Invert selection"));
invertselectionbtn->sigclicked.connect
@@ -79,7 +79,7 @@
m_archivebtn =
new UI::Button
(this, "archive_or_restore_selected_messages",
- 155, 5, 25, 25,
+ 295, 5, 25, 25,
g_gr->images().get("pics/but2.png"),
g_gr->images().get("pics/message_archive.png"),
_("Archive selected messages"));
@@ -89,7 +89,7 @@
m_togglemodebtn =
new UI::Button
(this, "toggle_between_inbox_or_archive",
- 185, 5, 100, 25,
+ 325, 5, 190, 25,
g_gr->images().get("pics/but2.png"),
_("Show Archive"));
m_togglemodebtn->sigclicked.connect
@@ -98,7 +98,7 @@
m_centerviewbtn =
new UI::Button
(this, "center_main_mapview_on_location",
- 340, 5, 25, 25,
+ 550, 5, 25, 25,
g_gr->images().get("pics/but2.png"),
g_gr->images().get("pics/menu_goto.png"),
_("center main mapview on location"),
=== modified file 'src/wui/game_options_menu.cc'
--- src/wui/game_options_menu.cc 2013-09-15 10:17:49 +0000
+++ src/wui/game_options_menu.cc 2013-10-23 05:48:49 +0000
@@ -31,7 +31,6 @@
#include "wui/game_main_menu_save_game.h"
#include "wui/game_options_sound_menu.h"
-
GameOptionsMenu::GameOptionsMenu
(Interactive_GameBase & gb,
UI::UniqueWindow::Registry & registry,
@@ -39,7 +38,7 @@
:
UI::UniqueWindow
(&gb, "options", ®istry,
- 102,
+ 145,
vmargin()
+ 4 * (20 + vspacing()) + 2 * vgap() +
35 + vspacing() + 35 +
=== modified file 'src/wui/interactive_base.cc'
--- src/wui/interactive_base.cc 2013-09-23 18:47:02 +0000
+++ src/wui/interactive_base.cc 2013-10-23 05:48:49 +0000
@@ -313,7 +313,7 @@
if (speed) {
char buffer[32];
snprintf
- (buffer, sizeof(buffer), _("%u.%ux"), speed / 1000, speed / 100 % 10);
+ (buffer, sizeof(buffer), _("%1$u.%2$ux"), speed / 1000, speed / 100 % 10);
return buffer;
}
return _("PAUSE");
@@ -336,7 +336,7 @@
char buffer[128];
snprintf
(buffer, sizeof(buffer),
- _("%s (%s)"),
+ _("%1$s (%2$s)"),
speedString(real).c_str(), speedString(desired).c_str());
m_label_speed.set_text(buffer);
}
=== modified file 'src/wui/login_box.cc'
--- src/wui/login_box.cc 2013-07-26 20:19:36 +0000
+++ src/wui/login_box.cc 2013-10-23 05:48:49 +0000
@@ -43,10 +43,10 @@
g_gr->images().get("pics/but2.png"), UI::Align_Left);
pwd_warning =
- new UI::Textarea
- (this, 250, 85,
+ new UI::Multiline_Textarea
+ (this, 10, 65, 505, 50,
_("WARNING: Password will be shown and saved readable!"),
- UI::Align_Center);
+ UI::Align_Left);
cb_register = new UI::Checkbox(this, Point(10, 110));
ta_register =
=== modified file 'src/wui/login_box.h'
--- src/wui/login_box.h 2012-02-15 21:25:34 +0000
+++ src/wui/login_box.h 2013-10-23 05:48:49 +0000
@@ -23,6 +23,7 @@
#include "ui_basic/checkbox.h"
#include "ui_basic/editbox.h"
#include "ui_basic/textarea.h"
+#include "ui_basic/multilinetextarea.h"
#include "ui_basic/window.h"
struct LoginBox : public UI::Window {
@@ -46,7 +47,7 @@
UI::Textarea * ta_password;
UI::Textarea * ta_register;
UI::Textarea * ta_auto_log;
- UI::Textarea * pwd_warning;
+ UI::Multiline_Textarea * pwd_warning;
};
#endif
=== modified file 'src/wui/multiplayersetupgroup.cc'
--- src/wui/multiplayersetupgroup.cc 2013-07-26 20:19:36 +0000
+++ src/wui/multiplayersetupgroup.cc 2013-10-23 05:48:49 +0000
@@ -437,7 +437,7 @@
labels.push_back
(new UI::Textarea
(this,
- w * 6 / 15 + buth, buth / 3,
+ w * 6 / 15 + buth, buth / 3 - 10,
buth, buth));
labels.back()->set_text(_("Type"));
labels.back()->set_textstyle(tsmaller);
@@ -458,7 +458,7 @@
labels.back()->set_text(_("Initialization"));
labels.back()->set_textstyle(tsmaller);
- labels.push_back(new UI::Textarea(this, w - buth, buth / 3, buth, buth));
+ labels.push_back(new UI::Textarea(this, w - buth, buth / 3, buth, buth, UI::Align_Right));
labels.back()->set_text(_("Team"));
labels.back()->set_textstyle(tsmaller);
=== modified file 'src/wui/playerdescrgroup.cc'
--- src/wui/playerdescrgroup.cc 2013-07-26 20:19:36 +0000
+++ src/wui/playerdescrgroup.cc 2013-10-23 05:48:49 +0000
@@ -58,10 +58,11 @@
d->plnum = plnum;
int32_t xplrname = 0;
- int32_t xplayertype = w * 28 / 125;
- int32_t xplayerteam = w * 55 / 125;
- int32_t xplayertribe = w * 60 / 125;
- int32_t xplayerinit = w * 85 / 125;
+ int32_t xplayertype = w * 35 / 125;
+ int32_t xplayerteam = w * 35 / 125;
+ //int32_t xplayerteam = w * 55 / 125;
+ int32_t xplayertribe = w * 80 / 125;
+ int32_t xplayerinit = w * 55 / 125;
d->plr_name = new UI::Textarea(this, xplrname, 0, xplayertype - xplrname, h);
d->plr_name->set_textstyle(UI::TextStyle::makebold(font, UI_FONT_CLR_FG));
d->btnEnablePlayer = new UI::Checkbox(this, Point(xplayertype - 23, 0));
@@ -69,7 +70,7 @@
(boost::bind(&PlayerDescriptionGroup::enable_player, this, _1));
d->btnPlayerType = new UI::Button
(this, "player_type",
- xplayertype, 0, xplayerteam - xplayertype - 2, h,
+ xplayertype, 0, xplayertribe - xplayertype - 2, h / 2,
g_gr->images().get("pics/but1.png"),
std::string(), std::string(),
true, false);
@@ -78,7 +79,7 @@
d->btnPlayerType->set_font(font);
d->btnPlayerTeam = new UI::Button
(this, "player_team",
- xplayerteam, 0, xplayertribe - xplayerteam - 2, h,
+ xplayerteam, h / 2, xplayerinit - xplayerteam - 2, h / 2,
g_gr->images().get("pics/but1.png"),
std::string(), std::string(),
true, false);
@@ -87,7 +88,7 @@
d->btnPlayerTeam->set_font(font);
d->btnPlayerTribe = new UI::Button
(this, "player_tribe",
- xplayertribe, 0, xplayerinit - xplayertribe - 2, h,
+ xplayertribe, 0, w - xplayertribe, h / 2,
g_gr->images().get("pics/but1.png"),
std::string(), std::string(),
true, false);
@@ -96,7 +97,7 @@
d->btnPlayerTribe->set_font(font);
d->btnPlayerInit = new UI::Button
(this, "player_initialization",
- xplayerinit, 0, w - xplayerinit, h,
+ xplayerinit, h / 2, w - xplayerinit, h / 2,
g_gr->images().get("pics/but1.png"),
std::string(), _("Initialization"),
true, false);
=== modified file 'src/wui/story_message_box.cc'
--- src/wui/story_message_box.cc 2013-07-26 20:19:36 +0000
+++ src/wui/story_message_box.cc 2013-10-23 05:48:49 +0000
@@ -55,7 +55,7 @@
if (m_text)
m_text->set_text(body);
- int32_t const but_width = 80;
+ int32_t const but_width = 120;
int32_t space = get_inner_w() - 2 * spacing;
space -= but_width;
space /= 2; // center button
=== modified file 'test/maps/lua_testsuite.wmf/scripting/init.lua'
--- test/maps/lua_testsuite.wmf/scripting/init.lua 2013-09-15 17:15:23 +0000
+++ test/maps/lua_testsuite.wmf/scripting/init.lua 2013-10-23 05:48:49 +0000
@@ -24,6 +24,7 @@
include "test_egbase"
include "test_math_random"
+include "test_string_bformat"
include "test_map"
include "test_cplayer"
include "test_cfield"
=== added file 'test/maps/lua_testsuite.wmf/scripting/test_string_bformat.lua'
--- test/maps/lua_testsuite.wmf/scripting/test_string_bformat.lua 1970-01-01 00:00:00 +0000
+++ test/maps/lua_testsuite.wmf/scripting/test_string_bformat.lua 2013-10-23 05:48:49 +0000
@@ -0,0 +1,27 @@
+-- =============================
+-- Test string.bformat
+-- =============================
+string_bformat_test = lunit.TestCase("math.random test")
+function string_bformat_test:test_simple()
+ local str = ("%s %s"):bformat("Hello", "World")
+ assert_equal("Hello World", str)
+end
+function string_bformat_test:test_reordering()
+ local str = ("%2% %1%"):bformat("Hello", "World")
+ assert_equal("World Hello", str)
+end
+function string_bformat_test:test_integer()
+ assert_equal("1", ("%i"):bformat(1))
+end
+function string_bformat_test:test_float()
+ assert_equal("1.00", ("%.2f"):bformat(1))
+ assert_equal("3.14", ("%.2f"):bformat(3.14151))
+end
+function string_bformat_test:test_wrong_number_of_args()
+ assert_error("too few", function()
+ ("%s %s"):bformat(3.14151)
+ end)
+ assert_error("too many", function()
+ ("%s %s"):bformat(3.14151, 1, 2)
+ end)
+end
=== modified file 'tribes/barbarians/trainingscamp/help.lua'
--- tribes/barbarians/trainingscamp/help.lua 2012-03-17 21:45:46 +0000
+++ tribes/barbarians/trainingscamp/help.lua 2013-10-23 05:48:49 +0000
@@ -24,12 +24,12 @@
dependencies({"tribes/barbarians/soldier/untrained+evade.png","tribes/barbarians/trainingscamp/menu.png","tribes/barbarians/soldier/fulltrained.png"}) ..
rt(h3(_"Attack Training:")) ..
dependencies({"tribes/barbarians/axefactory/menu.png","tribes/barbarians/sharpaxe/menu.png;tribes/barbarians/broadaxe/menu.png","tribes/barbarians/trainingscamp/menu.png"}) ..
- rt(p(_"Provided by the " .. _"Axefactory")) ..
+ rt(p(_"Provided by the Axefactory")) ..
dependencies({"tribes/barbarians/warmill/menu.png","tribes/barbarians/sharpaxe/menu.png;tribes/barbarians/broadaxe/menu.png;tribes/barbarians/bronzeaxe/menu.png;tribes/barbarians/battleaxe/menu.png;tribes/barbarians/warriorsaxe/menu.png","tribes/barbarians/trainingscamp/menu.png"}) ..
- rt(p(_"Provided by the " .. _"War Mill")) ..
+ rt(p(_"Provided by the War Mill")) ..
rt(h3(_"Hitpoints Training:")) ..
dependencies({"tribes/barbarians/helmsmithy/menu.png","tribes/barbarians/helm/menu.png;tribes/barbarians/mask/menu.png;tribes/barbarians/warhelmet/menu.png","tribes/barbarians/trainingscamp/menu.png"}) ..
- rt(p(_"Provided by the " .. _"Helmsmithy")) ..
+ rt(p(_"Provided by the Helmsmithy")) ..
rt(h3(_"Both Trainings:")) ..
image_line("tribes/barbarians/pittabread/menu.png",1,p(_"%s and":format(_"Pitta Bread"))) ..
image_line("tribes/barbarians/fish/menu.png;tribes/barbarians/meat/menu.png",1,p(_"%s or %s":format(_"Fish",_"Meat"))) ..
@@ -58,5 +58,5 @@
text_line(_"Experience levels:", "n/a") ..
--Production Section
rt(h2(_"Production")) ..
- text_line(_"Performance:", _"If all needed wares are delivered in time, a %s can train one new soldier in %s and %s to the final level in %s on average.":format(_"Trainingscamp",_"Attack",_"Hitpoints","4m40s"))
+ text_line(_"Performance:", _"If all needed wares are delivered in time, a %1s can train one new soldier in %2s and %3s to the final level in %4s on average.":format(_"Trainingscamp",_"Attack",_"Hitpoints","4m40s"))
}
=== modified file 'utils/lua_xgettext.py'
--- utils/lua_xgettext.py 2012-05-25 18:19:19 +0000
+++ utils/lua_xgettext.py 2013-10-23 05:48:49 +0000
@@ -1,53 +1,217 @@
#!/usr/bin/env python
# encoding: utf-8
-from collections import defaultdict
+from collections import defaultdict, namedtuple
import re
from confgettext import head
+Token = namedtuple('Token', ['type', 'data'])
+
+class ParsingNode(list):
+ def __init__(self, parent=None):
+ self.parent = parent
+ self.type = "NODE"
+
+ def __str__(self):
+ return "N%s" % list.__str__(self)
+
+
+class LuaParser(object):
+ def __init__(self):
+ self.scanner = re.Scanner([
+ (r"\-\-", self._Tcomment),
+ (r"\(", self._Tleft),
+ (r"\)", self._Tright),
+ (r"\.\.", self._Tconcat),
+ (r"(?<!\\)[\"']", self._Ttoggle_string),
+ (r"\[\[", self._Topen_multiline_string),
+ (r"\]\]", self._Tclose_multiline_string),
+ (r"\b_\b", self._Ttranslate_next_string),
+ (r"[^\d\W]\w*", self._Tidentifier),
+ (r"\n", self._Tnewline),
+ (r"[ \t]+", self._Twhitespace),
+ (r".", self._Tidentifier),
+ ], re.MULTILINE | re.DOTALL)
+ self.in_string = False
+ self.current_line = 1
+ self.current_string = ""
+ self.result = ParsingNode()
+ self.in_comment = False
+ self.current = self.result
+
+ def parse(self, content):
+ self.scanner.scan(content)
+
+ def _recurse_lists(original_list, func):
+ def _internal(l):
+ new_l = ParsingNode()
+ for entry in l:
+ if isinstance(entry, list):
+ entry = _recurse_lists(entry, func)
+ new_l.append(entry)
+ return func(new_l)
+ return _internal(original_list)
+
+ def _combine_concatenated_strings(l):
+ for i in range(len(l)):
+ if i > 0 and l[i].type == "..":
+ if l[i-1].type != "STRING" or l[i+1].type != "STRING":
+ continue
+ # Do not concatenate translated and untranslated string.
+ if i-2 >= 0 and l[i-2].type == "_":
+ continue
+ first_string, line = l[i-1].data
+ second_string, unused = l[i+1].data
+ l[i-1:i+2] = [ Token("STRING", (first_string + second_string, line)) ]
+ return _combine_concatenated_strings(l)
+ return l
+
+ strings = []
+ def _find_translatable_strings(l):
+ for i in range(len(l)):
+ if l[i].type == "_":
+ if l[i+1].type == "NODE":
+ strings.append(l[i+1][0].data)
+ else:
+ strings.append(l[i+1].data)
+ if l[i].type == "ngettext":
+ assert l[i+1].type == "NODE"
+ assert len(l[i+1]) >= 4
+ data = l[i+1][0].data + (l[i+1][2].data[0],)
+ strings.append(data)
+ return l
+
+ def _remove_empties(l):
+ rv = ParsingNode()
+ for a in l:
+ if isinstance(a, list) and not a:
+ continue
+ rv.append(a)
+ return rv
+
+ self.result = _recurse_lists(self.result, _remove_empties)
+ self.result = _recurse_lists(self.result, _combine_concatenated_strings)
+
+ _recurse_lists(self.result, _find_translatable_strings)
+ return strings
+
+ def _skip_token(self, scanner, token):
+ if self.in_string:
+ self.current_string += token
+
+ def _string_done(self):
+ text = eval('str(""" %s """)' % self.current_string)[1:-1]
+ self.current.append(Token("STRING", (text, self.string_started)))
+ self.current_string = ""
+ del self.string_started
+ self.in_string = None
+
+ def _Tleft(self, scanner, token):
+ if self.in_comment:
+ self._skip_token(scanner, token)
+ elif self.in_string:
+ self._skip_token(scanner, token)
+ else:
+ new = ParsingNode(self.current)
+ self.current.append(new)
+ self.current = new
+
+ def _Tright(self, scanner, token):
+ if self.in_comment:
+ self._skip_token(scanner, token)
+ elif self.in_string:
+ self._skip_token(scanner, token)
+ else:
+ self.current = self.current.parent
+
+ def _Ttranslate_next_string(self, scanner, token):
+ if self.in_comment:
+ self._skip_token(scanner, token)
+ elif self.in_string:
+ self._skip_token(scanner, token)
+ else:
+ self.current.append(Token("_", None))
+
+ def _Topen_multiline_string(self, scanner, token):
+ if self.in_comment:
+ self._skip_token(scanner, token)
+ elif self.in_string:
+ self._skip_token(scanner, token)
+ else:
+ self.string_started = self.current_line
+ self.in_string = "[["
+
+ def _Tclose_multiline_string(self, scanner, token):
+ if self.in_comment:
+ self._skip_token(scanner, token)
+ elif self.in_string and self.in_string != "[[":
+ self._skip_token(scanner, token)
+ else:
+ assert(self.in_string == "[[")
+ self._string_done()
+
+ def _Ttoggle_string(self, scanner, token):
+ if self.in_comment:
+ self._skip_token(scanner, token)
+ elif not self.in_string:
+ self.in_string = token
+ self.string_started = self.current_line
+ elif self.in_string != token:
+ self._skip_token(scanner, token)
+ else:
+ self._string_done()
+
+ def _Tconcat(self, scanner, token):
+ if self.in_comment:
+ self._skip_token(scanner, token)
+ elif self.in_string:
+ self._skip_token(scanner, token)
+ else:
+ self.current.append(Token("..", None))
+
+ def _Tidentifier(self, scanner, token):
+ if self.in_comment:
+ self._skip_token(scanner, token)
+ elif self.in_string:
+ self._skip_token(scanner, token)
+ else:
+ self.current.append(Token(token, None))
+
+ def _Tnewline(self, scanner, token):
+ self.current_line += 1
+ self._skip_token(scanner, token)
+ self.in_comment = False
+
+ def _Twhitespace(self, scanner, token):
+ self._skip_token(scanner, token)
+
+ def _Tcomment(self, scanner, token):
+ if self.in_comment:
+ self._skip_token(scanner, token)
+ elif self.in_string:
+ self._skip_token(scanner, token)
+ else:
+ self.in_comment = True
+
class Lua_GetText(object):
- _SIMPLE_STRING = re.compile(
- r'''_\s*
- (?P<paren>[(])?\s* # opening parenthesis?
- (?P<all_text>(
- ((?P<quote>["'])|(?P<doublep>\[\[)) # opening string mark?
- (?P<text>.*?(?<!\\))
- (?(quote)(?P=quote)|\]\])\s*
- (?(paren)(?P<concat>\.\.\s*))?
- )+)
- (?(paren)\)) # if opening parenthese was found, find closing one
- ''', re.M | re.DOTALL | re.VERBOSE
- )
- _CONCATENATION = re.compile(
- r'''(['"]|(\]\]))\s*\.\.\s*(['"]|\[\[)? # a " .. ' continuation
- ''', re.M | re.DOTALL | re.VERBOSE
- )
def __init__(self):
self.findings = defaultdict(list)
def parse(self, contents, filename):
- for m in self._SIMPLE_STRING.finditer(contents):
- if m.group("concat"):
- text = m.group("all_text").strip()
- text = self._CONCATENATION.subn("", text)[0]
- if text.startswith('[['): text = text[2:]
- elif text[0] in '\'"': text = text[1:]
- if text.endswith(']]'): text = text[:-2]
- elif text[-1] in '\'"': text = text[:-1]
- start = m.start('paren') or m.start("all_text")
- else:
- text = m.group("text")
- start = m.start('text')
-
- # Lua uses the same escaping as python. Let's use this to our
- # advantage.
- text = eval('str(""" %s """)' % text)[1:-1]
-
- self.findings[text].append(
- (filename, contents[:start].count('\n') + 1)
- )
+ items = LuaParser().parse(contents)
+ for item in items:
+ if len(item) == 2:
+ msg_id, line = item
+ self.findings[msg_id].append(
+ (filename, line)
+ )
+ elif len(item) == 3:
+ msg_id, line, plural_id = item
+ self.findings[msg_id].append(
+ (filename, line, plural_id)
+ )
@property
def found_something_to_translate(self):
@@ -60,24 +224,40 @@
def __str__(self):
s = head
+ def _output_string(description, string):
+ # there was a bug in this code that would never output single line
+ # msg_id's. For consistency, I decided to not fix this bug, but
+ # instead keep it around.
+ # if not string.count('\n'): <== this was s.count
+ # s += 'msgid "%s"\n' % string
+ # else:
+ output = ""
+ string = string.replace('\\', '\\\\').replace('"', '\\"')
+ output += '%s ""\n' % description
+ lines = string.split('\n')
+ output += ''.join('"%s\\n"\n' % l for l in lines[:-1])
+ output += '"%s"\n' % lines[-1]
+ return output
+
for string in sorted(self.findings.keys()):
occurences = self.findings[string]
- occurences.sort( lambda o1,o2: cmp(o1[0], o2[0])) # Sort by filename
-
- for filename, lineno in occurences:
- s += "#: %s:%i\n" % (filename, lineno)
- string = string.replace('\\', '\\\\').replace('"', '\\"')
- if not s.count('\n'):
- s += 'msgid "%s"\n' % string
- else:
- s += 'msgid ""\n'
- lines = string.split('\n')
- s += ''.join('"%s\\n"\n' % l for l in lines[:-1])
- s += '"%s"\n' % lines[-1]
- s += 'msgstr ""\n\n'
-
+ occurences.sort() # Sort by filename and lines
+
+ for occurence in occurences:
+ assert(len(occurence) == len(occurences[0]))
+ s += "#: %s:%i\n" % (occurence[0], occurence[1])
+
+ if len(occurence) == 2:
+ s += _output_string("msgid", string)
+ s += 'msgstr ""\n\n'
+ if len(occurence) == 3:
+ s += _output_string("msgid", string)
+ s += _output_string("msgid_plural", occurence[2])
+ s += 'msgstr[0] ""\n'
+ s += 'msgstr[1] ""\n\n'
return s
+
def gettext(text, filename):
t = Lua_GetText()
t.parse(text, filename)
=== modified file 'utils/test/test_lua-xgettext.py'
--- utils/test/test_lua-xgettext.py 2012-05-25 18:19:19 +0000
+++ utils/test/test_lua-xgettext.py 2013-10-23 05:48:49 +0000
@@ -30,11 +30,19 @@
nfindings = sum(len(self.p.findings[i]) for i in self.p.findings.keys())
self.assertEqual(len(self.items), nfindings)
- for entry, count, line in self.items:
- self.assertTrue(entry in self.p.findings, "'%s' not found!" % entry)
- self.assertEqual(self.p.findings[entry][count],
- (self.filename, line)
- )
+ for item in self.items:
+ if len(item) == 3:
+ msg_id, count, line = item
+ self.assertTrue(msg_id in self.p.findings, "'%s' not found!" % msg_id)
+ self.assertEqual(self.p.findings[msg_id][count],
+ (self.filename, line)
+ )
+ elif len(item) == 4:
+ msg_id, count, plural_id, line = item
+ self.assertTrue(msg_id in self.p.findings, "'%s' not found!" % msg_id)
+ self.assertEqual(self.p.findings[msg_id][count],
+ (self.filename, line, plural_id)
+ )
##################
@@ -155,7 +163,7 @@
'''
class TestConcatStrings_Difficult(_TestLua_GetText_SingleFile):
items = [
- ("a lumberjack'ssecond linethird line.", 0, 3),
+ ("a lumberjack'ssecond linethird line.", 0, 4),
]
code = '''
@@ -254,6 +262,16 @@
]
code = """_ [[ "There is an old saying:<br> blah ]]"""
+class TestNgettextStuff(_TestLua_GetText_SingleFile):
+ items = [
+ (),
+ ]
+ code = """
+function a()
+ local p = ngettext("car", "cars", item)
+ end
+"""
+
class TestRealWorldExample(_TestLua_GetText_SingleFile):
items = [
("A young man approaches", 0, 2),
@@ -270,8 +288,30 @@
},
"""
+class TestRealWorldExample1(_TestLua_GetText_SingleFile):
+ items = [
+ ("%s has been King of the Hill since %s!", 0, 1)
+ ]
+ code = """had_control_for = rt(p(_[[%s has been King of the Hill since %s!]]))"""
+
+class TestRealWorldExample2(_TestLua_GetText_SingleFile):
+ items = [
+ ("An old man says...", 0, 5),
+ (' "Hail, chieftain. I am Khantrukh and have seen many winters pass. Please allow me to aid you with my counsel through these darkened days." ', 0, 7)
+ ]
+ code = """
+-- Khantruth's texts
+-- Khantruth"s texts
+khantrukh_1="<rt><p font-size=24 font-face=DejaVuSerif font-weight=bold font-color=8080FF>" ..
+_"An old man says..." ..
+"</p></rt><rt image=map:khantrukh.png><p line-spacing=3 font-size=12>" ..
+_[[ "Hail, chieftain. I am Khantrukh and have seen many winters pass. Please allow me to aid you with my counsel through these darkened days." ]] ..
+"</p></rt>"
+"""
+
+
+
if __name__ == '__main__':
unittest.main()
- # k = SomeTestClass()
- # unittest.TextTestRunner().run(k)
-
+ k = SomeTestClass()
+ unittest.TextTestRunner().run(k)
Follow ups
-
Re: [Merge] lp:~widelands-dev/widelands/gci18nfixes into lp:widelands
From: SirVer, 2014-03-05
-
[Merge] lp:~widelands-dev/widelands/gci18nfixes into lp:widelands
From: SirVer, 2014-03-05
-
Re: [Merge] lp:~widelands-dev/widelands/gci18nfixes into lp:widelands
From: SirVer, 2014-03-04
-
Re: [Merge] lp:~widelands-dev/widelands/gci18nfixes into lp:widelands
From: GunChleoc, 2014-03-03
-
Re: [Merge] lp:~widelands-dev/widelands/gci18nfixes into lp:widelands
From: SirVer, 2014-03-03
-
Re: [Merge] lp:~widelands-dev/widelands/gci18nfixes into lp:widelands
From: SirVer, 2014-03-03
-
Re: [Merge] lp:~widelands-dev/widelands/gci18nfixes into lp:widelands
From: GunChleoc, 2014-03-01
-
Re: [Merge] lp:~widelands-dev/widelands/gci18nfixes into lp:widelands
From: GunChleoc, 2014-03-01
-
Re: [Merge] lp:~widelands-dev/widelands/gci18nfixes into lp:widelands
From: SirVer, 2014-03-01
-
Re: [Merge] lp:~widelands-dev/widelands/gci18nfixes into lp:widelands
From: GunChleoc, 2014-02-28
-
Re: [Merge] lp:~widelands-dev/widelands/gci18nfixes into lp:widelands
From: GunChleoc, 2014-01-15
-
Re: [Merge] lp:~widelands-dev/widelands/gci18nfixes into lp:widelands
From: SirVer, 2014-01-15
-
Re: [Merge] lp:~widelands-dev/widelands/gci18nfixes into lp:widelands
From: SirVer, 2013-12-27
-
Re: [Merge] lp:~widelands-dev/widelands/gci18nfixes into lp:widelands
From: Hans Joachim Desserud, 2013-12-27