[ios] Using localized hotels type.

This commit is contained in:
VladiMihaylenko 2017-05-03 17:51:52 +03:00 committed by r.kuznetsov
parent 5448f24c66
commit 12ef86d1d2

View file

@ -10,6 +10,8 @@
namespace
{
static NSString * const kHotelTypePattern = @"search_hotel_filter_%@";
std::array<ftypes::IsHotelChecker::Type, static_cast<size_t>(ftypes::IsHotelChecker::Type::Count)> const kTypes = {{
ftypes::IsHotelChecker::Type::Hotel,
ftypes::IsHotelChecker::Type::Apartment,
@ -274,7 +276,8 @@ void configButton(UIButton * button, NSString * primaryText, NSString * secondar
MWMFilterTypeCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:[MWMFilterTypeCell className]
forIndexPath:indexPath];
auto const type = kTypes[indexPath.row];
cell.tagName.text = @(ftypes::IsHotelChecker::GetHotelTypeTag(type));
auto str = [NSString stringWithFormat:kHotelTypePattern, @(ftypes::IsHotelChecker::GetHotelTypeTag(type))];
cell.tagName.text = L(str);
cell.selected = find(m_selectedTypes.begin(), m_selectedTypes.end(), type) != m_selectedTypes.end();
return cell;
}