forked from organicmaps/organicmaps-tmp
Merge pull request #2489 from igrechuhin/ig-master
[ios] Updated strings.
This commit is contained in:
commit
dbdb51414a
4 changed files with 16 additions and 4 deletions
|
@ -11,6 +11,7 @@ enum class MWMMigrationViewState
|
|||
@interface MWMMigrationView : UIView
|
||||
|
||||
@property (nonatomic) MWMMigrationViewState state;
|
||||
@property (copy, nonatomic) NSString * nodeLocalName;
|
||||
@property (weak, nonatomic) id<MWMCircularProgressProtocol> delegate;
|
||||
|
||||
- (void)setProgress:(CGFloat)progress;
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
break;
|
||||
case MWMMigrationViewState::Processing:
|
||||
self.info.hidden = NO;
|
||||
self.info.text = L(@"migration_prefetch_status");
|
||||
self.info.text = [NSString stringWithFormat:@"%@ %@", L(@"downloader_downloading"), self.nodeLocalName];
|
||||
[self startSpinner];
|
||||
self.primaryButton.enabled = NO;
|
||||
self.primaryButton.hidden = YES;
|
||||
|
|
|
@ -139,8 +139,19 @@ using namespace storage;
|
|||
|
||||
- (void)setState:(MWMMigrationViewState)state
|
||||
{
|
||||
static_cast<MWMMigrationView *>(self.view).state = state;
|
||||
self.navigationItem.leftBarButtonItem.enabled = (state != MWMMigrationViewState::Processing);
|
||||
MWMMigrationView * migrationView = static_cast<MWMMigrationView *>(self.view);
|
||||
if (state == MWMMigrationViewState::Processing)
|
||||
{
|
||||
NodeAttrs nodeAttrs;
|
||||
GetFramework().Storage().GetPrefetchStorage()->GetNodeAttrs(m_countryId, nodeAttrs);
|
||||
migrationView.nodeLocalName = @(nodeAttrs.m_nodeLocalName.c_str());
|
||||
self.navigationItem.leftBarButtonItem.enabled = NO;
|
||||
}
|
||||
else
|
||||
{
|
||||
self.navigationItem.leftBarButtonItem.enabled = YES;
|
||||
}
|
||||
migrationView.state = state;
|
||||
}
|
||||
|
||||
#pragma mark - MWMCircularProgressProtocol
|
||||
|
|
|
@ -225,7 +225,7 @@ using namespace storage;
|
|||
- (void)showDownloading:(CGFloat)progress
|
||||
{
|
||||
self.nodeSize.textColor = [UIColor blackSecondaryText];
|
||||
self.nodeSize.text = [@(static_cast<NSUInteger>(progress * 100)).stringValue stringByAppendingString:@"%"];
|
||||
self.nodeSize.text = [NSString stringWithFormat:@"%@ %@%%", L(@"downloader_downloading"), @(static_cast<NSUInteger>(progress * 100))];
|
||||
self.downloadButton.hidden = YES;
|
||||
self.progressWrapper.hidden = NO;
|
||||
self.progress.progress = progress;
|
||||
|
|
Loading…
Add table
Reference in a new issue