diff options
author | tatiana-yan <tatiana.kondakova@gmail.com> | 2018-12-06 13:31:39 +0300 |
---|---|---|
committer | mpimenov <mpimenov@users.noreply.github.com> | 2018-12-06 16:57:22 +0300 |
commit | 9eba4a36ce884163dcda05ec53e978f801d656df (patch) | |
tree | 56a9a16cff37089eaf3f47cb2cb85dd51d4dacd9 /platform | |
parent | fc493839a429fe032391101851eeab2b54a0b193 (diff) |
[search][ios][android] Display brand name in search results
Diffstat (limited to 'platform')
-rw-r--r-- | platform/localization.hpp | 1 | ||||
-rw-r--r-- | platform/localization.mm | 6 | ||||
-rw-r--r-- | platform/localization_dummy.cpp | 2 |
3 files changed, 9 insertions, 0 deletions
diff --git a/platform/localization.hpp b/platform/localization.hpp index 22f20dbd0d..2ceea64655 100644 --- a/platform/localization.hpp +++ b/platform/localization.hpp @@ -5,4 +5,5 @@ namespace platform { extern std::string GetLocalizedTypeName(std::string const & type); +extern std::string GetLocalizedBrandName(std::string const & brand); } // namespace platform diff --git a/platform/localization.mm b/platform/localization.mm index c511228a66..06f779e207 100644 --- a/platform/localization.mm +++ b/platform/localization.mm @@ -13,4 +13,10 @@ std::string GetLocalizedTypeName(std::string const & type) return [NSLocalizedString(@(key.c_str()), @"") UTF8String]; } + +std::string GetLocalizedBrandName(std::string const & brand) +{ + auto const key = "brand." + brand; + return [NSLocalizedString(@(key.c_str()), @"") UTF8String]; +} } // namespace platform diff --git a/platform/localization_dummy.cpp b/platform/localization_dummy.cpp index efd714524d..9d40587cce 100644 --- a/platform/localization_dummy.cpp +++ b/platform/localization_dummy.cpp @@ -6,4 +6,6 @@ std::string GetLocalizedTypeName(std::string const & type) { return type; } + +std::string GetLocalizedBrandName(std::string const & brand) { return brand; } } // namespace platform |