[Widelands-dev] [Merge] lp:~widelands-dev/widelands/fix-language-entry-ms into lp:widelands

2018-11-10 Thread bunnybot
Refusing to merge, since Travis is not green. Use @bunnybot merge force for 
merging anyways.

Travis build 4207. State: failed. Details: 
https://travis-ci.org/widelands/widelands/builds/453365089.
-- 
https://code.launchpad.net/~widelands-dev/widelands/fix-language-entry-ms/+merge/358597
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/fix-language-entry-ms into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bugfix-1801208 into lp:widelands

2018-11-10 Thread GunChleoc
The proposal to merge lp:~widelands-dev/widelands/bugfix-1801208 into 
lp:widelands has been updated.

Commit message changed to:

Changed some types from uint to int to avoid overflows in calculations.

Forced the text anchor for drawing multiline text areas to be non-negative, so 
that text alignment wouldn't be based on overlong lines. (Otherwise short lines 
wouldn't be aligned properly, possibly even be outside the visible area.)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bugfix-1801208/+merge/358594
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bugfix-1801208 into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/fix-language-entry-ms into lp:widelands

2018-11-10 Thread GunChleoc
Good spot - we don't have an active translator at the moment for this language. 
I double-checked on Transifex and all translations are indeed in Latin script.

I have echoed this fix on Transifex so it won't regress with the next 
translations pull.

@bunnybot merge
-- 
https://code.launchpad.net/~widelands-dev/widelands/fix-language-entry-ms/+merge/358597
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/fix-language-entry-ms into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/RTL-alignment-fix into lp:widelands

2018-11-10 Thread bunnybot
Continuous integration builds have changed state:

Travis build 4208. State: passed. Details: 
https://travis-ci.org/widelands/widelands/builds/453366074.
Appveyor build 4004. State: failed. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_RTL_alignment_fix-4004.
-- 
https://code.launchpad.net/~widelands-dev/widelands/RTL-alignment-fix/+merge/358596
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/RTL-alignment-fix into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/fix-language-entry-ms into lp:widelands

2018-11-10 Thread bunnybot
Continuous integration builds have changed state:

Travis build 4207. State: failed. Details: 
https://travis-ci.org/widelands/widelands/builds/453365089.
Appveyor build 4003. State: failed. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_fix_language_entry_ms-4003.
-- 
https://code.launchpad.net/~widelands-dev/widelands/fix-language-entry-ms/+merge/358597
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/fix-language-entry-ms into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bugfix-1801208 into lp:widelands

2018-11-10 Thread bunnybot
Continuous integration builds have changed state:

Travis build 4206. State: errored. Details: 
https://travis-ci.org/widelands/widelands/builds/453338126.
Appveyor build 4002. State: failed. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bugfix_1801208-4002.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bugfix-1801208/+merge/358594
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bugfix-1801208 into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/fix-language-entry-ms into lp:widelands

2018-11-10 Thread Arty
Disclosure: I actually don't speak the language nor do I know anyone who does.

I only stumbled upon this by accident when I checked RTL stuff and found weird 
behaviour: The language entry in the options menu was arabic looking and RTL, 
but all the translations were in Latin script and - even though aligned right 
(probably because if the font setting) - seemed to be meant for reading 
left-to-right.

Acording to Google+Wikipedia there still is an arabic script for the language 
but also Latin one, which is much more widespread and also the official script. 
And it's not RTL. Given that (as far as I could see) all our existing ms 
translations use the Latin script, I thought we should change the entry in the 
lua file, so the options menu shows the Latin name and the alignment is not 
automatically switched.
-- 
https://code.launchpad.net/~widelands-dev/widelands/fix-language-entry-ms/+merge/358597
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/fix-language-entry-ms into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/fix-language-entry-ms into lp:widelands

2018-11-10 Thread Arty
Arty has proposed merging lp:~widelands-dev/widelands/fix-language-entry-ms 
into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/fix-language-entry-ms/+merge/358597
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/fix-language-entry-ms into lp:widelands.
=== modified file 'data/i18n/locales.lua'
--- data/i18n/locales.lua	2018-11-10 09:20:09 +
+++ data/i18n/locales.lua	2018-11-10 18:49:34 +
@@ -249,9 +249,9 @@
},
 
ms = {
-  name = "بهاس ملايو",
+  name = "Bahasa Melayu",
   sort_name = "Melayu",
-  font = "arabic"
+  font = "default"
},
 
my = {

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/RTL-alignment-fix into lp:widelands

2018-11-10 Thread Arty
Arty has proposed merging lp:~widelands-dev/widelands/RTL-alignment-fix into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/RTL-alignment-fix/+merge/358596
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/RTL-alignment-fix into lp:widelands.
=== modified file 'src/ui_basic/textarea.cc'
--- src/ui_basic/textarea.cc	2018-07-08 13:53:45 +
+++ src/ui_basic/textarea.cc	2018-11-10 18:48:51 +
@@ -125,9 +125,10 @@
  */
 void Textarea::draw(RenderTarget& dst) {
 	if (!text_.empty()) {
+		Align alignment = mirror_alignment(align_, text_);
 		Vector2i anchor(
-		   (align_ == Align::kCenter) ? get_w() / 2 : (align_ == UI::Align::kRight) ? get_w() : 0, 0);
-		rendered_text_->draw(dst, anchor, align_);
+		   (alignment == Align::kCenter) ? get_w() / 2 : (alignment == UI::Align::kRight) ? get_w() : 0, 0);
+		rendered_text_->draw(dst, anchor, alignment);
 	}
 }
 

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bugfix-1801208 into lp:widelands

2018-11-10 Thread Arty
Arty has proposed merging lp:~widelands-dev/widelands/bugfix-1801208 into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1801208 in widelands: "Message boxes with long unbreakable strings show 
empty "
  https://bugs.launchpad.net/widelands/+bug/1801208

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bugfix-1801208/+merge/358594
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bugfix-1801208 into lp:widelands.
=== modified file 'src/ui_basic/multilinetextarea.cc'
--- src/ui_basic/multilinetextarea.cc	2018-08-12 16:35:30 +
+++ src/ui_basic/multilinetextarea.cc	2018-11-10 17:41:58 +
@@ -30,7 +30,8 @@
 
 namespace UI {
 
-static const uint32_t RICHTEXT_MARGIN = 2;
+// int instead of uint because of overflow situations
+static const int32_t RICHTEXT_MARGIN = 2;
 
 MultilineTextarea::MultilineTextarea(Panel* const parent,
  const int32_t x,
@@ -141,11 +142,19 @@
 	int anchor = 0;
 	Align alignment = mirror_alignment(align_, text_);
 	switch (alignment) {
+	// TODO(Arty): We might want to revisit this after the font renderer can handle long strings
+	// without whitespaces differently.
+	// Currently, such long unbreakable strings are silently assumed to fit the line exactly,
+	// which means that rendered_text_->width() might actually be larger than the effective width
+	// of the textarea. If we'd allow the anchor here to become negative in this case, it would
+	// properly position the longest line (just truncated), BUT the positioning of shorter lines
+	// would be off (possibly even outside the textarea, thus invisible) because their positioning
+	// is calculated without regard for overlong lines.
 	case UI::Align::kCenter:
-		anchor = (get_eff_w() - rendered_text_->width()) / 2;
+		anchor = std::max(0, (get_eff_w() - rendered_text_->width()) / 2);
 		break;
 	case UI::Align::kRight:
-		anchor = get_eff_w() - rendered_text_->width() - RICHTEXT_MARGIN;
+		anchor = std::max(0, get_eff_w() - rendered_text_->width() - RICHTEXT_MARGIN);
 		break;
 	case UI::Align::kLeft:
 		anchor = RICHTEXT_MARGIN;

=== modified file 'src/ui_basic/multilinetextarea.h'
--- src/ui_basic/multilinetextarea.h	2018-07-08 09:18:33 +
+++ src/ui_basic/multilinetextarea.h	2018-11-10 17:41:58 +
@@ -60,7 +60,8 @@
 	}
 
 	void set_text(const std::string&);
-	uint32_t get_eff_w() const {
+	// int instead of uint because of overflow situations
+	int32_t get_eff_w() const {
 		return scrollbar_.is_enabled() ? get_w() - Scrollbar::kSize : get_w();
 	}
 

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/ai_wai_files_09112018 into lp:widelands

2018-11-10 Thread bunnybot
Continuous integration builds have changed state:

Travis build 4204. State: passed. Details: 
https://travis-ci.org/widelands/widelands/builds/452880410.
Appveyor build 4000. State: failed. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_ai_wai_files_09112018-4000.
-- 
https://code.launchpad.net/~widelands-dev/widelands/ai_wai_files_09112018/+merge/358544
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/ai_wai_files_09112018 into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1753230-working-with-tempfiles into lp:widelands

2018-11-10 Thread bunnybot
Refusing to merge, since Travis is not green. Use @bunnybot merge force for 
merging anyways.

Travis build 4203. State: errored. Details: 
https://travis-ci.org/widelands/widelands/builds/452768811.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1753230-working-with-tempfiles/+merge/357656
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1753230-working-with-tempfiles.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1753230-working-with-tempfiles into lp:widelands

2018-11-10 Thread bunnybot
Continuous integration builds have changed state:

Travis build 4203. State: errored. Details: 
https://travis-ci.org/widelands/widelands/builds/452768811.
Appveyor build 3999. State: failed. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1753230_working_with_tempfiles-3999.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1753230-working-with-tempfiles/+merge/357656
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1753230-working-with-tempfiles.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/filesystem-errors into lp:widelands

2018-11-10 Thread bunnybot
Continuous integration builds have changed state:

Travis build 4199. State: passed. Details: 
https://travis-ci.org/widelands/widelands/builds/452677304.
Appveyor build 3995. State: failed. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_filesystem_errors-3995.
-- 
https://code.launchpad.net/~widelands-dev/widelands/filesystem-errors/+merge/358219
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/filesystem-errors into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/empire04_unused_key_return_on_dismantle into lp:widelands

2018-11-10 Thread bunnybot
Continuous integration builds have changed state:

Travis build 4198. State: passed. Details: 
https://travis-ci.org/widelands/widelands/builds/452676639.
Appveyor build 3994. State: failed. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_empire04_unused_key_return_on_dismantle-3994.
-- 
https://code.launchpad.net/~widelands-dev/widelands/empire04_unused_key_return_on_dismantle/+merge/358273
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/empire04_unused_key_return_on_dismantle.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1753230-working-with-tempfiles into lp:widelands

2018-11-10 Thread GunChleoc
Don't worry about it - I know you're still finding your way around Launchpad 
and I'm happy to help.

If somebody decides to mess with the temp while playing, on their own head be 
it. At least everybody else will know it's temp files if they want to manually 
clean it out at a sensible point in time ;)
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1753230-working-with-tempfiles/+merge/357656
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1753230-working-with-tempfiles.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1800337-unlocalize-log into lp:widelands

2018-11-10 Thread GunChleoc
Thanks for the review! :)

@bunnybot merge
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1800337-unlocalize-log/+merge/358424
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1800337-unlocalize-log.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp