Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use NSLocalizedStringFromTable() instead of NSLocalizedString() #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions AAMFeedback/AAMFeedback/AAMFeedbackTopicsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ @implementation AAMFeedbackTopicsViewController
- (void)viewDidLoad
{
[super viewDidLoad];
self.title = NSLocalizedString(@"AAMFeedbackTopicsTitle", nil);
self.title = NSLocalizedStringFromTable(@"AAMFeedbackTopicsTitle", @"AAMFeedback", nil);
}

- (void)viewDidUnload
Expand Down Expand Up @@ -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;
}
Expand Down
14 changes: 7 additions & 7 deletions AAMFeedback/AAMFeedback/AAMFeedbackViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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];

Expand All @@ -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:
Expand Down