← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands/is_value_terms into lp:widelands

 

OK for me, only look at my question in diff

Diff comments:

> 
> === modified file 'src/editor/tools/editor_info_tool.cc'
> --- src/editor/tools/editor_info_tool.cc	2015-11-27 14:42:11 +0000
> +++ src/editor/tools/editor_info_tool.cc	2015-12-05 10:59:45 +0000
> @@ -107,28 +107,13 @@
>  
>  	buf += "• " + (boost::format(pgettext("terrain_name", "Name: %s")) % ter.descname()).str() + "\n";
>  
> -	Widelands::TerrainDescription::Type terrain_is = ter.get_is();
>  	std::vector<std::string> terrain_is_strings;
> -
> -	if (terrain_is == Widelands::TerrainDescription::Type::kGreen) {
> -		terrain_is_strings.push_back(_("arable"));
> -	}
> -	if (terrain_is & Widelands::TerrainDescription::Type::kDry) {
> -		terrain_is_strings.push_back(_("treeless"));
> -	}
> -	if (terrain_is & Widelands::TerrainDescription::Type::kWater) {
> -		terrain_is_strings.push_back(_("aquatic"));
> -	}
> -	if (terrain_is & Widelands::TerrainDescription::Type::kDead) {
> -		terrain_is_strings.push_back(_("dead"));
> -	}
> -	if (terrain_is & Widelands::TerrainDescription::Type::kMountain) {
> -		terrain_is_strings.push_back(_("mountainous"));
> -	}
> -	if (terrain_is & Widelands::TerrainDescription::Type::kImpassable) {
> -		terrain_is_strings.push_back(_("impassable"));
> -	}
> -	buf += "• " + (boost::format(_("Category: %s"))
> +	for (const Widelands::TerrainDescription::Type& terrain_type : ter.get_types()) {
> +		terrain_is_strings.push_back(terrain_type.descname);
> +	}
> +	/** TRANSLATORS: "Is" is a list of terrain properties, e.g. "arable", "unreachable and unwalkable" */
> +	/** TRANSLATORS: You can also translate this as "Category: %s" or "Property: %s" */
> +	buf += "• " + (boost::format(_("Is: %s"))

Should not be that buf few lines above within 'for' loop?

>  						% i18n::localize_list(terrain_is_strings, i18n::ConcatenateWith::AMPERSAND)).str() + "\n";
>  	buf += "• " + (boost::format(_("Editor Category: %s")) % ter.editor_category().descname()).str() + "\n";
>  


-- 
https://code.launchpad.net/~widelands-dev/widelands/is_value_terms/+merge/279205
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/is_value_terms.


References