diff --git a/editor/changeset_wrapper.cpp b/editor/changeset_wrapper.cpp index 467d3dd6d6..22b6000b24 100644 --- a/editor/changeset_wrapper.cpp +++ b/editor/changeset_wrapper.cpp @@ -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'; } diff --git a/editor/user_stats.cpp b/editor/user_stats.cpp index 22b5eddec6..17e505dd9a 100644 --- a/editor/user_stats.cpp +++ b/editor/user_stats.cpp @@ -82,6 +82,9 @@ UserStatsLoader::UserStatsLoader() bool UserStatsLoader::Update(string const & userName) { + if (userName.empty()) + return false; + { lock_guard g(m_mutex); m_userName = userName; diff --git a/generator/osm2type.cpp b/generator/osm2type.cpp index f8069dbe71..69adbb490e 100644 --- a/generator/osm2type.cpp +++ b/generator/osm2type.cpp @@ -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)); }}, });