From b65de7b9f8ac1ceb641289246cb584b9b47d2fbb Mon Sep 17 00:00:00 2001 From: Jared Allen Date: Fri, 8 Mar 2013 13:31:58 -0600 Subject: [PATCH] using NSLocalizedStringFromTable() instead of NSLocalizedString() to avoid conflicts from other sources with a Localizable.strings file Signed-off-by: Jared Allen --- .../AAMFeedback/AAMFeedbackTopicsViewController.m | 4 ++-- .../AAMFeedback/AAMFeedbackViewController.m | 14 +++++++------- .../{Localizable.strings => AAMFeedback.strings} | 0 .../{Localizable.strings => AAMFeedback.strings} | 0 4 files changed, 9 insertions(+), 9 deletions(-) rename AAMFeedback/en.lproj/{Localizable.strings => AAMFeedback.strings} (100%) rename AAMFeedback/ja.lproj/{Localizable.strings => AAMFeedback.strings} (100%) diff --git a/AAMFeedback/AAMFeedback/AAMFeedbackTopicsViewController.m b/AAMFeedback/AAMFeedback/AAMFeedbackTopicsViewController.m index d0ffb47..d2ad2fa 100644 --- a/AAMFeedback/AAMFeedback/AAMFeedbackTopicsViewController.m +++ b/AAMFeedback/AAMFeedback/AAMFeedbackTopicsViewController.m @@ -26,7 +26,7 @@ @implementation AAMFeedbackTopicsViewController - (void)viewDidLoad { [super viewDidLoad]; - self.title = NSLocalizedString(@"AAMFeedbackTopicsTitle", nil); + self.title = NSLocalizedStringFromTable(@"AAMFeedbackTopicsTitle", @"AAMFeedback", nil); } - (void)viewDidUnload @@ -83,7 +83,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } - cell.textLabel.text = NSLocalizedString([[self _topics]objectAtIndex:indexPath.row],nil); + cell.textLabel.text = NSLocalizedStringFromTable([[self _topics]objectAtIndex:indexPath.row], @"AAMFeedback", nil); return cell; } diff --git a/AAMFeedback/AAMFeedback/AAMFeedbackViewController.m b/AAMFeedback/AAMFeedback/AAMFeedbackViewController.m index 49f7dc6..e324f51 100644 --- a/AAMFeedback/AAMFeedback/AAMFeedbackViewController.m +++ b/AAMFeedback/AAMFeedback/AAMFeedbackViewController.m @@ -91,10 +91,10 @@ - (void)dealloc { - (void)loadView { [super loadView]; - self.title = NSLocalizedString(@"AAMFeedbackTitle", nil); + self.title = NSLocalizedStringFromTable(@"AAMFeedbackTitle", @"AAMFeedback", nil); self.navigationItem.leftBarButtonItem = [[[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(cancelDidPress:)]autorelease]; - self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc]initWithTitle:NSLocalizedString(@"AAMFeedbackButtonMail", nil) style:UIBarButtonItemStyleDone target:self action:@selector(nextDidPress:)]autorelease]; + self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc]initWithTitle:NSLocalizedStringFromTable(@"AAMFeedbackButtonMail", @"AAMFeedback", nil) style:UIBarButtonItemStyleDone target:self action:@selector(nextDidPress:)]autorelease]; } - (void)viewDidLoad @@ -168,10 +168,10 @@ - (NSString*)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteg { switch (section) { case 0: - return NSLocalizedString(@"AAMFeedbackTableHeaderTopics", nil); + return NSLocalizedStringFromTable(@"AAMFeedbackTableHeaderTopics", @"AAMFeedback", nil); break; case 1: - return NSLocalizedString(@"AAMFeedbackTableHeaderBasicInfo", nil); + return NSLocalizedStringFromTable(@"AAMFeedbackTableHeaderBasicInfo", @"AAMFeedback", nil); break; default: break; @@ -208,7 +208,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N _descriptionPlaceHolder = [[[UITextField alloc]initWithFrame:CGRectMake(16, 8, 300, 20)]autorelease]; _descriptionPlaceHolder.font = [UIFont systemFontOfSize:16]; - _descriptionPlaceHolder.placeholder = NSLocalizedString(@"AAMFeedbackDescriptionPlaceholder", nil); + _descriptionPlaceHolder.placeholder = NSLocalizedStringFromTable(@"AAMFeedbackDescriptionPlaceholder", @"AAMFeedback", nil); _descriptionPlaceHolder.userInteractionEnabled = NO; [cell.contentView addSubview:_descriptionPlaceHolder]; @@ -223,8 +223,8 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N switch (indexPath.row) { case 0: - cell.textLabel.text = NSLocalizedString(@"AAMFeedbackTopicsTitle", nil); - cell.detailTextLabel.text = NSLocalizedString([self _selectedTopic],nil); + cell.textLabel.text = NSLocalizedStringFromTable(@"AAMFeedbackTopicsTitle", @"AAMFeedback", nil); + cell.detailTextLabel.text = NSLocalizedStringFromTable([self _selectedTopic], @"AAMFeedback", nil); break; case 1: default: diff --git a/AAMFeedback/en.lproj/Localizable.strings b/AAMFeedback/en.lproj/AAMFeedback.strings similarity index 100% rename from AAMFeedback/en.lproj/Localizable.strings rename to AAMFeedback/en.lproj/AAMFeedback.strings diff --git a/AAMFeedback/ja.lproj/Localizable.strings b/AAMFeedback/ja.lproj/AAMFeedback.strings similarity index 100% rename from AAMFeedback/ja.lproj/Localizable.strings rename to AAMFeedback/ja.lproj/AAMFeedback.strings