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
path: root/iphone
diff options
context:
space:
mode:
authorAlex Zolotarev <deathbaba@gmail.com>2013-01-14 17:31:16 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:48:40 +0300
commit82eb0eef4a5a5550890881a611b9722abfa199c7 (patch)
tree2ba21ad5135a6eba41528709728fdcc5a6e5e9f5 /iphone
parent6c29ce8563a90ff3d630d7420d4f14a8b47f3aa8 (diff)
[ios] Moved cross-platform strings initialisation to more obvious place
Diffstat (limited to 'iphone')
-rw-r--r--iphone/Maps/Classes/MapViewController.mm6
-rw-r--r--iphone/Maps/Classes/MapsAppDelegate.mm14
2 files changed, 14 insertions, 6 deletions
diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm
index 4a1da152d2..10e1543415 100644
--- a/iphone/Maps/Classes/MapViewController.mm
+++ b/iphone/Maps/Classes/MapViewController.mm
@@ -378,12 +378,6 @@
shared_ptr<location::State> ls = f.GetLocationState();
ls->AddCompassStatusListener(bind(onCompassStatusChangedImpl, self, onCompassStatusChangedSel, _1));
- f.AddString("country_status_added_to_queue", [NSLocalizedString(@"country_status_added_to_queue", @"Message to display at the center of the screen when the country is added to the downloading queue") UTF8String]);
- f.AddString("country_status_downloading", [NSLocalizedString(@"country_status_downloading", @"Message to display at the center of the screen when the country is downloading") UTF8String]);
- f.AddString("country_status_download", [NSLocalizedString(@"country_status_download", @"Button text for the button at the center of the screen when the country is not downloaded") UTF8String]);
- f.AddString("country_status_download_failed", [NSLocalizedString(@"country_status_download_failed", @"Message to display at the center of the screen when the country download has failed") UTF8String]);
- f.AddString("try_again", [NSLocalizedString(@"try_again", @"Button text for the button under the country_status_download_failed message") UTF8String]);
-
m_StickyThreshold = 10;
m_CurrentAction = NOTHING;
diff --git a/iphone/Maps/Classes/MapsAppDelegate.mm b/iphone/Maps/Classes/MapsAppDelegate.mm
index db41aeec14..1ce5a158ba 100644
--- a/iphone/Maps/Classes/MapsAppDelegate.mm
+++ b/iphone/Maps/Classes/MapsAppDelegate.mm
@@ -9,6 +9,18 @@
#include "Framework.h"
#include "../../../platform/settings.hpp"
+/// Adds needed localized strings to C++ code
+/// @TODO Refactor localization mechanism to make it simpler
+void InitLocalizedStrings()
+{
+ Framework & f = GetFramework();
+ // Texts on the map screen when map is not downloaded or is downloading
+ f.AddString("country_status_added_to_queue", [NSLocalizedString(@"country_status_added_to_queue", @"Message to display at the center of the screen when the country is added to the downloading queue") UTF8String]);
+ f.AddString("country_status_downloading", [NSLocalizedString(@"country_status_downloading", @"Message to display at the center of the screen when the country is downloading") UTF8String]);
+ f.AddString("country_status_download", [NSLocalizedString(@"country_status_download", @"Button text for the button at the center of the screen when the country is not downloaded") UTF8String]);
+ f.AddString("country_status_download_failed", [NSLocalizedString(@"country_status_download_failed", @"Message to display at the center of the screen when the country download has failed") UTF8String]);
+ f.AddString("try_again", [NSLocalizedString(@"try_again", @"Button text for the button under the country_status_download_failed message") UTF8String]);
+}
@implementation MapsAppDelegate
@@ -96,6 +108,8 @@
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
+ InitLocalizedStrings();
+
[m_mapViewController OnEnterForeground];
[Preferences setup:m_mapViewController];