forked from organicmaps/organicmaps
[ios] Moved cross-platform strings initialisation to more obvious place
This commit is contained in:
parent
6c29ce8563
commit
82eb0eef4a
2 changed files with 14 additions and 6 deletions
|
@ -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;
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Add table
Reference in a new issue