forked from organicmaps/organicmaps
Merge pull request #3709 from Zverik/from_release
My pull requests to the master branch
This commit is contained in:
commit
66eff8335d
3 changed files with 23 additions and 3 deletions
|
@ -49,6 +49,9 @@ string GetTypeForFeature(XMLFeature const & node)
|
|||
return key;
|
||||
else if (key == "shop" || key == "office" || key == "building" || key == "entrance")
|
||||
return value + " " + key; // "convenience shop"
|
||||
else if (!value.empty() && value.back() == 's')
|
||||
// Remove 's' from the tail: "toilets" -> "toilet".
|
||||
return value.substr(0, value.size() - 1);
|
||||
else
|
||||
return value;
|
||||
}
|
||||
|
@ -301,10 +304,22 @@ string ChangesetWrapper::TypeCountToString(TTypeCount const & typeCount)
|
|||
|
||||
// Format a count: "a shop" for single shop, "4 shops" for multiple.
|
||||
if (currentPair.second == 1)
|
||||
ss << "a ";
|
||||
{
|
||||
switch (currentPair.first.front())
|
||||
{
|
||||
case 'a':
|
||||
case 'e':
|
||||
case 'i':
|
||||
case 'y':
|
||||
case 'o': ss << "an"; break;
|
||||
default: ss << "a";
|
||||
}
|
||||
}
|
||||
else
|
||||
ss << currentPair.second << ' ';
|
||||
ss << currentPair.first;
|
||||
{
|
||||
ss << currentPair.second;
|
||||
}
|
||||
ss << ' ' << currentPair.first;
|
||||
if (currentPair.second > 1)
|
||||
ss << 's';
|
||||
}
|
||||
|
|
|
@ -82,6 +82,9 @@ UserStatsLoader::UserStatsLoader()
|
|||
|
||||
bool UserStatsLoader::Update(string const & userName)
|
||||
{
|
||||
if (userName.empty())
|
||||
return false;
|
||||
|
||||
{
|
||||
lock_guard<mutex> g(m_mutex);
|
||||
m_userName = userName;
|
||||
|
|
|
@ -529,6 +529,8 @@ namespace ftype
|
|||
{ "bicycle", "!", [¶ms] { params.AddType(types.Get(CachedTypes::NOBICYCLE)); }},
|
||||
{ "bicycle", "~", [¶ms] { params.AddType(types.Get(CachedTypes::YESBICYCLE)); }},
|
||||
{ "cycleway", "~", [¶ms] { params.AddType(types.Get(CachedTypes::YESBICYCLE)); }},
|
||||
{ "cycleway:right", "~", [¶ms] { params.AddType(types.Get(CachedTypes::YESBICYCLE)); }},
|
||||
{ "cycleway:left", "~", [¶ms] { params.AddType(types.Get(CachedTypes::YESBICYCLE)); }},
|
||||
{ "oneway:bicycle", "!", [¶ms] { params.AddType(types.Get(CachedTypes::BICYCLE_BIDIR)); }},
|
||||
{ "cycleway", "opposite", [¶ms] { params.AddType(types.Get(CachedTypes::BICYCLE_BIDIR)); }},
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue