Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorАлександр Зацепин <az@mapswithme.com>2019-12-02 14:35:32 +0300
committerArsentiy Milchakov <milcars@mapswithme.com>2020-01-13 12:04:14 +0300
commitda83929bd84bddad58cbc9b49de28ff565721ce8 (patch)
treeb36b524ca7d210ceec03af79a66806d62a270de2 /map/onboarding.cpp
parent9dc15fe2b8b1adcb369e26cdca6a5152731ce996 (diff)
[core] Added lang to the onboarding tip url
Diffstat (limited to 'map/onboarding.cpp')
-rw-r--r--map/onboarding.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/map/onboarding.cpp b/map/onboarding.cpp
index 98b8d890c8..5a7a15d49c 100644
--- a/map/onboarding.cpp
+++ b/map/onboarding.cpp
@@ -3,6 +3,7 @@
#include "partners_api/utm.hpp"
#include "platform/platform.hpp"
+#include "platform/preferred_languages.hpp"
#include "base/url_helpers.hpp"
@@ -16,7 +17,7 @@ namespace
{
auto constexpr kTipsCount = static_cast<uint8_t>(onboarding::Tip::Type::Count);
-std::string const kBaseUrl = "/en/v2/mobilefront/";
+std::string const kBaseUrl = "/v2/mobilefront/";
std::array<std::string, kTipsCount> const kTipsLinks = {
InjectUTM(kBaseUrl, UTM::DiscoverCatalogOnboarding),
InjectUTM(kBaseUrl + "search/?tag=181", UTM::FreeSamplesOnboading),
@@ -28,10 +29,10 @@ namespace onboarding
Tip GetTip()
{
auto const tipIndex = std::time(nullptr) % kTipsCount;
- auto const url = kTipsLinks[tipIndex];
-
+ auto const link = kTipsLinks[tipIndex];
+ auto const catalogUrl = base::url::Join(BOOKMARKS_CATALOG_FRONT_URL, languages::GetCurrentNorm());
return {static_cast<Tip::Type>(tipIndex),
- url.empty() ? url : base::url::Join(BOOKMARKS_CATALOG_FRONT_URL, url)};
+ link.empty() ? link : base::url::Join(catalogUrl, link)};
}
bool CanShowTipButton() { return GetPlatform().IsConnected(); }