[ios] Added localized keys to p2p's ui.

This commit is contained in:
VladiMihaylenko 2015-11-20 17:41:59 +03:00
parent 6c37b0e2ef
commit 6e7ff0438b
8 changed files with 27 additions and 15 deletions

View file

@ -113,13 +113,13 @@ static NSString * const kDefaultAlertNibName = @"MWMDefaultAlert";
{
if (needToRebuild)
{
return [self defaultAlertWithTitle:@"Navigation is available only from your current location."
message:@"Do you want us to recreate/rebuild/ plan the route?"
return [self defaultAlertWithTitle:@"p2p_only_from_current"
message:@"p2p_reroute_from_current"
rightButtonTitle:@"ok" leftButtonTitle:@"cancel" rightButtonAction:block];
}
else
{
return [self defaultAlertWithTitle:@"dialog_routing_location_unknown"
return [self defaultAlertWithTitle:@"p2p_only_from_current"
message:nil rightButtonTitle:@"ok" leftButtonTitle:nil rightButtonAction:nil];
}
}

View file

@ -7,7 +7,7 @@ public:
MWMRoutePoint(m2::PointD const & p, NSString * n) : m_point(p), m_name(n), m_isMyPosition(false) {}
explicit MWMRoutePoint(m2::PointD const & p) : m_point(p), m_name(L(@"my_position")), m_isMyPosition(true) {}
explicit MWMRoutePoint(m2::PointD const & p) : m_point(p), m_name(L(@"p2p_your_location")), m_isMyPosition(true) {}
bool operator ==(MWMRoutePoint const & p) const
{

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9060" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9059" systemVersion="15A284" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
</dependencies>
<customFonts key="customFonts">
<mutableArray key="HelveticaNeue.ttc">
@ -125,7 +125,7 @@
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="4"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="routing_go"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="p2p_start"/>
<userDefinedRuntimeAttribute type="string" keyPath="textColorName" value="whiteColor"/>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="linkBlue"/>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundHighlightedColorName" value="linkBlueDark"/>

View file

@ -37,7 +37,7 @@
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="my_position"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="p2p_your_location"/>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular17"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
</userDefinedRuntimeAttributes>

View file

@ -408,12 +408,12 @@ static CGFloat const kAdditionalHeight = 20.;
if (indexPath.row == 0)
{
cell.title.text = self.dataSource.source;
cell.title.placeholder = L(@"choose_from");
cell.title.placeholder = L(@"p2p_from");
}
else
{
cell.title.text = self.dataSource.destination;
cell.title.placeholder = L(@"choose_to");
cell.title.placeholder = L(@"p2p_to");
}
cell.delegate = self;
return cell;

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9060" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9059" systemVersion="15A284" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
</dependencies>
<customFonts key="customFonts">
<mutableArray key="HelveticaNeue.ttc">
@ -48,6 +48,9 @@
<fontDescription key="fontDescription" name="HelveticaNeue-Medium" family="Helvetica Neue" pointSize="17"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="p2p_route_planning"/>
</userDefinedRuntimeAttributes>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_arrow_up_and_down" translatesAutoresizingMaskIntoConstraints="NO" id="y8P-JL-riK">
<rect key="frame" x="128" y="9" width="8" height="8"/>
@ -125,7 +128,7 @@
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.26000000000000001" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="routing_planning"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="p2p_planning"/>
</userDefinedRuntimeAttributes>
</label>
</subviews>

View file

@ -42,6 +42,9 @@
<fontDescription key="fontDescription" name="HelveticaNeue-Medium" family="Helvetica Neue" pointSize="17"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="p2p_route_planning"/>
</userDefinedRuntimeAttributes>
</label>
<collectionView multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="TC0-58-PO9">
<rect key="frame" x="8" y="48" width="304" height="80"/>
@ -142,7 +145,7 @@
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.26000000000000001" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="routing_planning"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="p2p_planning"/>
</userDefinedRuntimeAttributes>
</label>
</subviews>
@ -256,7 +259,7 @@
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="4"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="routing_go"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="p2p_start"/>
<userDefinedRuntimeAttribute type="string" keyPath="textColorName" value="whiteColor"/>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="linkBlue"/>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundHighlightedColorName" value="linkBlueDark"/>

View file

@ -154,6 +154,9 @@
<state key="normal" title="From">
<color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="p2p_from_here"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="fromTap" destination="2HF-YO-IQi" eventType="touchUpInside" id="TlT-QT-gt8"/>
</connections>
@ -166,6 +169,9 @@
<state key="normal" title="To">
<color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="p2p_to_here"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="toTap" destination="2HF-YO-IQi" eventType="touchUpInside" id="cv9-Vs-6EE"/>
</connections>