diff --git a/ParseUI/Classes/Cells/PFPurchaseTableViewCell.m b/ParseUI/Classes/Cells/PFPurchaseTableViewCell.m index 4a7968b..6ff164c 100644 --- a/ParseUI/Classes/Cells/PFPurchaseTableViewCell.m +++ b/ParseUI/Classes/Cells/PFPurchaseTableViewCell.m @@ -125,7 +125,7 @@ - (void)setState:(PFPurchaseTableViewCellState)state { { self.detailTextLabel.numberOfLines = 1; self.priceLabel.backgroundColor = [UIColor colorWithRed:132.0f/255.0f green:175.0f/255.0f blue:230.0f/255.0f alpha:1.0f]; - NSString *downloadingText = NSLocalizedString(@"DOWNLOADING", @"DOWNLOADING"); + NSString *downloadingText = PFLocalizedString(@"DOWNLOADING", @"DOWNLOADING"); self.priceLabel.text = [NSString stringWithFormat:@" %@ ", downloadingText]; self.priceLabel.textColor = [UIColor whiteColor]; self.priceLabel.shadowColor = [UIColor blackColor]; @@ -136,7 +136,7 @@ - (void)setState:(PFPurchaseTableViewCellState)state { case PFPurchaseTableViewCellStateDownloaded: { self.detailTextLabel.numberOfLines = 2; - NSString *installedText = NSLocalizedString(@"INSTALLED", @"INSTALLED"); + NSString *installedText = PFLocalizedString(@"INSTALLED", @"INSTALLED"); self.priceLabel.text = [NSString stringWithFormat:@" %@ ", installedText]; self.priceLabel.textColor = [UIColor whiteColor]; self.priceLabel.shadowColor = [UIColor blackColor]; diff --git a/ParseUI/Classes/Internal/Extensions/PFUIAlertView.m b/ParseUI/Classes/Internal/Extensions/PFUIAlertView.m index e958829..b65b02e 100644 --- a/ParseUI/Classes/Internal/Extensions/PFUIAlertView.m +++ b/ParseUI/Classes/Internal/Extensions/PFUIAlertView.m @@ -39,7 +39,7 @@ + (void)showAlertViewWithTitle:(NSString *)title error:(NSError *)error { + (void)showAlertViewWithTitle:(NSString *)title message:(NSString *)message { [self showAlertViewWithTitle:title message:message - cancelButtonTitle:NSLocalizedString(@"OK", @"OK")]; + cancelButtonTitle:PFLocalizedString(@"OK", @"OK")]; } + (void)showAlertViewWithTitle:(NSString *)title diff --git a/ParseUI/Classes/Internal/PFLocalization.h b/ParseUI/Classes/Internal/PFLocalization.h index 8477d8f..7c0258b 100644 --- a/ParseUI/Classes/Internal/PFLocalization.h +++ b/ParseUI/Classes/Internal/PFLocalization.h @@ -22,8 +22,7 @@ #ifndef ParseUI_PFLocalization_h #define ParseUI_PFLocalization_h -#undef NSLocalizedString -#define NSLocalizedString(key, comment) \ +#define PFLocalizedString(key, comment) \ [[NSBundle bundleForClass:[self class]] localizedStringForKey:key value:nil table:@"ParseUI"] #endif diff --git a/ParseUI/Classes/Internal/Views/PFLoadingView.m b/ParseUI/Classes/Internal/Views/PFLoadingView.m index a9b7688..0e511e3 100644 --- a/ParseUI/Classes/Internal/Views/PFLoadingView.m +++ b/ParseUI/Classes/Internal/Views/PFLoadingView.m @@ -43,7 +43,7 @@ - (instancetype)initWithFrame:(CGRect)frame { [self addSubview:_activityIndicator]; _loadingLabel = [[UILabel alloc] initWithFrame:CGRectZero]; - _loadingLabel.text = NSLocalizedString(@"Loading...", @"Loading message of PFQueryTableViewController"); + _loadingLabel.text = PFLocalizedString(@"Loading...", @"Loading message of PFQueryTableViewController"); _loadingLabel.backgroundColor = [UIColor clearColor]; _loadingLabel.shadowOffset = CGSizeMake(0.0f, 1.0f); _loadingLabel.shadowColor = [UIColor whiteColor]; diff --git a/ParseUI/Classes/LogInViewController/PFLogInView.m b/ParseUI/Classes/LogInViewController/PFLogInView.m index 4aed98d..4298a44 100644 --- a/ParseUI/Classes/LogInViewController/PFLogInView.m +++ b/ParseUI/Classes/LogInViewController/PFLogInView.m @@ -44,7 +44,7 @@ @implementation PFLogInView + (PFActionButtonConfiguration *)_defaultSignUpButtonConfiguration { PFActionButtonConfiguration *configuration = [[PFActionButtonConfiguration alloc] initWithBackgroundImageColor:[PFColor signupButtonBackgroundColor] image:nil]; - NSString *title = NSLocalizedString(@"Sign Up", @"Sign Up"); + NSString *title = PFLocalizedString(@"Sign Up", @"Sign Up"); [configuration setTitle:title forButtonStyle:PFActionButtonStyleNormal]; [configuration setTitle:title forButtonStyle:PFActionButtonStyleWide]; @@ -55,9 +55,9 @@ + (PFActionButtonConfiguration *)_defaultFacebookButtonConfiguration { PFActionButtonConfiguration *configuration = [[PFActionButtonConfiguration alloc] initWithBackgroundImageColor:[PFColor facebookButtonBackgroundColor] image:[PFImage imageNamed:PFLogInViewDefaultFacebookButtonImageName]]; - [configuration setTitle:NSLocalizedString(@"Facebook", @"Facebook") + [configuration setTitle:PFLocalizedString(@"Facebook", @"Facebook") forButtonStyle:PFActionButtonStyleNormal]; - [configuration setTitle:NSLocalizedString(@"Log In with Facebook", @"Log In with Facebook") + [configuration setTitle:PFLocalizedString(@"Log In with Facebook", @"Log In with Facebook") forButtonStyle:PFActionButtonStyleWide]; @@ -68,9 +68,9 @@ + (PFActionButtonConfiguration *)_defaultTwitterButtonConfiguration { PFActionButtonConfiguration *configuration = [[PFActionButtonConfiguration alloc] initWithBackgroundImageColor:[PFColor twitterButtonBackgroundColor] image:[PFImage imageNamed:PFLogInViewDefaultTwitterButtonImageName]]; - [configuration setTitle:NSLocalizedString(@"Twitter", @"Twitter") + [configuration setTitle:PFLocalizedString(@"Twitter", @"Twitter") forButtonStyle:PFActionButtonStyleNormal]; - [configuration setTitle:NSLocalizedString(@"Log In with Twitter", @"Log In with Twitter") + [configuration setTitle:PFLocalizedString(@"Log In with Twitter", @"Log In with Twitter") forButtonStyle:PFActionButtonStyleWide]; @@ -131,7 +131,7 @@ - (void)_updateAllFields { if (!_passwordField) { _passwordField = [[PFTextField alloc] initWithFrame:CGRectZero separatorStyle:PFTextFieldSeparatorStyleBottom]; - _passwordField.placeholder = NSLocalizedString(@"Password", @"Password"); + _passwordField.placeholder = PFLocalizedString(@"Password", @"Password"); _passwordField.secureTextEntry = YES; _passwordField.autocorrectionType = UITextAutocorrectionTypeNo; _passwordField.autocapitalizationType = UITextAutocapitalizationTypeNone; @@ -160,7 +160,7 @@ - (void)_updateAllFields { if (_fields & PFLogInFieldsPasswordForgotten) { if (!_passwordForgottenButton) { _passwordForgottenButton = [[PFTextButton alloc] initWithFrame:CGRectZero]; - [_passwordForgottenButton setTitle:NSLocalizedString(@"Forgot Password?", "Forgot Password?") + [_passwordForgottenButton setTitle:PFLocalizedString(@"Forgot Password?", "Forgot Password?") forState:UIControlStateNormal]; [self addSubview:_passwordForgottenButton]; } @@ -172,7 +172,7 @@ - (void)_updateAllFields { if (_fields & PFLogInFieldsLogInButton) { if (!_logInButton) { _logInButton = [[PFPrimaryButton alloc] initWithBackgroundImageColor:[PFColor loginButtonBackgroundColor]]; - [_logInButton setTitle:NSLocalizedString(@"Log In", @"Log In") forState:UIControlStateNormal]; + [_logInButton setTitle:PFLocalizedString(@"Log In", @"Log In") forState:UIControlStateNormal]; [self addSubview:_logInButton]; } } else { @@ -475,10 +475,10 @@ - (void)_updateUsernameFieldStyle { NSString *usernamePlaceholder = nil; if (!_emailAsUsername) { keyboardType = UIKeyboardTypeDefault; - usernamePlaceholder = NSLocalizedString(@"Username", @"Username"); + usernamePlaceholder = PFLocalizedString(@"Username", @"Username"); } else { keyboardType = UIKeyboardTypeEmailAddress; - usernamePlaceholder = NSLocalizedString(@"Email", @"Email"); + usernamePlaceholder = PFLocalizedString(@"Email", @"Email"); } _usernameField.placeholder = usernamePlaceholder; diff --git a/ParseUI/Classes/LogInViewController/PFLogInViewController.m b/ParseUI/Classes/LogInViewController/PFLogInViewController.m index a6dceae..58035c9 100644 --- a/ParseUI/Classes/LogInViewController/PFLogInViewController.m +++ b/ParseUI/Classes/LogInViewController/PFLogInViewController.m @@ -289,18 +289,18 @@ - (void)_dismissAction { } - (void)_forgotPasswordAction PF_EXTENSION_UNAVAILABLE("") { - NSString *title = NSLocalizedString(@"Reset Password", @"Forgot password request title in PFLogInViewController"); - NSString *message = NSLocalizedString(@"Please enter the email address for your account.", + NSString *title = PFLocalizedString(@"Reset Password", @"Forgot password request title in PFLogInViewController"); + NSString *message = PFLocalizedString(@"Please enter the email address for your account.", @"Email request message in PFLogInViewController"); UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:title message:message delegate:self - cancelButtonTitle:NSLocalizedString(@"Cancel", @"Cancel") - otherButtonTitles:NSLocalizedString(@"OK", @"OK"), nil]; + cancelButtonTitle:PFLocalizedString(@"Cancel", @"Cancel") + otherButtonTitles:PFLocalizedString(@"OK", @"OK"), nil]; alertView.alertViewStyle = UIAlertViewStylePlainTextInput; UITextField *textField = [alertView textFieldAtIndex:0]; - textField.placeholder = NSLocalizedString(@"Email", @"Email"); + textField.placeholder = PFLocalizedString(@"Email", @"Email"); textField.keyboardType = UIKeyboardTypeEmailAddress; textField.returnKeyType = UIReturnKeyDone; @@ -310,15 +310,15 @@ - (void)_forgotPasswordAction PF_EXTENSION_UNAVAILABLE("") { - (void)_requestPasswordResetWithEmail:(NSString *)email { [PFUser requestPasswordResetForEmailInBackground:email block:^(BOOL success, NSError *error) { if (success) { - NSString *title = NSLocalizedString(@"Password Reset", + NSString *title = PFLocalizedString(@"Password Reset", @"Password reset success alert title in PFLogInViewController."); - NSString *message = [NSString stringWithFormat:NSLocalizedString(@"An email with reset instructions has been sent to '%@'.", + NSString *message = [NSString stringWithFormat:PFLocalizedString(@"An email with reset instructions has been sent to '%@'.", @"Password reset message in PFLogInViewController"), email]; [PFUIAlertView showAlertViewWithTitle:title message:message - cancelButtonTitle:NSLocalizedString(@"OK", @"OK")]; + cancelButtonTitle:PFLocalizedString(@"OK", @"OK")]; } else { - NSString *title = NSLocalizedString(@"Password Reset Failed", + NSString *title = PFLocalizedString(@"Password Reset Failed", @"Password reset error alert title in PFLogInViewController."); [PFUIAlertView showAlertViewWithTitle:title error:error]; } @@ -471,12 +471,12 @@ - (void)_loginDidFailWithError:(NSError *)error { if (_delegateExistingMethods.didFailToLogIn) { [_delegate logInViewController:self didFailToLogInWithError:error]; } else { - NSString *title = NSLocalizedString(@"Login Failed", @"Login failed alert title in PFLogInViewController"); + NSString *title = PFLocalizedString(@"Login Failed", @"Login failed alert title in PFLogInViewController"); NSString *message = nil; if (error.code == kPFErrorObjectNotFound) { - message = NSLocalizedString(@"The username and password you entered don't match", @"Invalid login credentials alert message in PFLogInViewController"); + message = PFLocalizedString(@"The username and password you entered don't match", @"Invalid login credentials alert message in PFLogInViewController"); } else { - message = NSLocalizedString(@"Please try again", @"Generic login failed alert message in PFLogInViewController"); + message = PFLocalizedString(@"Please try again", @"Generic login failed alert message in PFLogInViewController"); } [PFUIAlertView showAlertViewWithTitle:title message:message]; } diff --git a/ParseUI/Classes/ProductTableViewController/PFProductTableViewController.m b/ParseUI/Classes/ProductTableViewController/PFProductTableViewController.m index 34da3ca..6b9b37a 100644 --- a/ParseUI/Classes/ProductTableViewController/PFProductTableViewController.m +++ b/ParseUI/Classes/ProductTableViewController/PFProductTableViewController.m @@ -94,7 +94,7 @@ - (void)objectsDidLoad:(NSError *)error { } else { cell.state = PFPurchaseTableViewCellStateNormal; - NSString *title = NSLocalizedString(@"Download Error", + NSString *title = PFLocalizedString(@"Download Error", @"Download Error"); [PFUIAlertView showAlertViewWithTitle:title error:downloadError]; } @@ -174,7 +174,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath PFProduct *product = self.objects[indexPath.row]; [PFPurchase buyProduct:product.productIdentifier block:^(NSError *error) { if (error) { - NSString *title = NSLocalizedString(@"Purchase Error", @"Purchase Error"); + NSString *title = PFLocalizedString(@"Purchase Error", @"Purchase Error"); [PFUIAlertView showAlertViewWithTitle:title error:error]; } }]; diff --git a/ParseUI/Classes/QueryCollectionViewController/PFQueryCollectionViewController.m b/ParseUI/Classes/QueryCollectionViewController/PFQueryCollectionViewController.m index af1a52a..2ca9442 100644 --- a/ParseUI/Classes/QueryCollectionViewController/PFQueryCollectionViewController.m +++ b/ParseUI/Classes/QueryCollectionViewController/PFQueryCollectionViewController.m @@ -330,7 +330,7 @@ - (UICollectionReusableView *)collectionViewReusableViewForNextPageAction:(UICol _currentNextPageView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionFooter withReuseIdentifier:PFQueryCollectionViewNextPageReusableViewIdentifier forIndexPath:[self _indexPathForPaginationReusableView]]; - _currentNextPageView.textLabel.text = NSLocalizedString(@"Load more...", @"Load more..."); + _currentNextPageView.textLabel.text = PFLocalizedString(@"Load more...", @"Load more..."); [_currentNextPageView addTarget:self action:@selector(loadNextPage) forControlEvents:UIControlEventTouchUpInside]; _currentNextPageView.animating = self.loading; return _currentNextPageView; @@ -389,15 +389,15 @@ - (void)_handleDeletionError:(NSError *)error { [self loadObjects]; NSString *errorMessage = [NSString stringWithFormat:@"%@: \"%@\"", - NSLocalizedString(@"Error occurred during deletion", @"Error occurred during deletion"), + PFLocalizedString(@"Error occurred during deletion", @"Error occurred during deletion"), error.localizedDescription]; if ([UIAlertController class]) { - UIAlertController *errorController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Error", @"Error") + UIAlertController *errorController = [UIAlertController alertControllerWithTitle:PFLocalizedString(@"Error", @"Error") message:errorMessage preferredStyle:UIAlertControllerStyleAlert]; - [errorController addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"OK", @"OK") + [errorController addAction:[UIAlertAction actionWithTitle:PFLocalizedString(@"OK", @"OK") style:UIAlertActionStyleCancel handler:nil]]; @@ -405,10 +405,10 @@ - (void)_handleDeletionError:(NSError *)error { } else { // Cast to `id` is required for building succesfully for app extensions, // this code actually never runs in App Extensions, since they are iOS 8.0+, so we are good with just a hack - UIAlertView *alertView = [(id)[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Error", @"Error") + UIAlertView *alertView = [(id)[UIAlertView alloc] initWithTitle:PFLocalizedString(@"Error", @"Error") message:errorMessage delegate:nil - cancelButtonTitle:NSLocalizedString(@"OK", @"OK") + cancelButtonTitle:PFLocalizedString(@"OK", @"OK") otherButtonTitles:nil]; [alertView show]; diff --git a/ParseUI/Classes/QueryTableViewController/PFQueryTableViewController.m b/ParseUI/Classes/QueryTableViewController/PFQueryTableViewController.m index f9fad49..ee17366 100644 --- a/ParseUI/Classes/QueryTableViewController/PFQueryTableViewController.m +++ b/ParseUI/Classes/QueryTableViewController/PFQueryTableViewController.m @@ -408,7 +408,7 @@ - (PFTableViewCell *)tableView:(UITableView *)otherTableView cellForNextPageAtIn if (cell == nil) { cell = [[PFActivityIndicatorTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier]; - cell.textLabel.text = NSLocalizedString(@"Load more...", @"Load more..."); + cell.textLabel.text = PFLocalizedString(@"Load more...", @"Load more..."); } cell.animating = self.loading; @@ -517,15 +517,15 @@ - (void)_handleDeletionError:(NSError *)error { [self loadObjects]; NSString *errorMessage = [NSString stringWithFormat:@"%@: \"%@\"", - NSLocalizedString(@"Error occurred during deletion", @"Error occurred during deletion"), + PFLocalizedString(@"Error occurred during deletion", @"Error occurred during deletion"), error.localizedDescription]; if ([UIAlertController class]) { - UIAlertController *errorController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Error", @"Error") + UIAlertController *errorController = [UIAlertController alertControllerWithTitle:PFLocalizedString(@"Error", @"Error") message:errorMessage preferredStyle:UIAlertControllerStyleAlert]; - [errorController addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"OK", @"OK") + [errorController addAction:[UIAlertAction actionWithTitle:PFLocalizedString(@"OK", @"OK") style:UIAlertActionStyleCancel handler:nil]]; @@ -533,10 +533,10 @@ - (void)_handleDeletionError:(NSError *)error { } else { // Cast to `id` is required for building succesfully for app extensions, // this code actually never runs in App Extensions, since they are iOS 8.0+, so we are good with just a hack - UIAlertView *alertView = [(id)[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Error", @"Error") + UIAlertView *alertView = [(id)[UIAlertView alloc] initWithTitle:PFLocalizedString(@"Error", @"Error") message:errorMessage delegate:nil - cancelButtonTitle:NSLocalizedString(@"OK", @"OK") + cancelButtonTitle:PFLocalizedString(@"OK", @"OK") otherButtonTitles:nil]; [alertView show]; diff --git a/ParseUI/Classes/SignUpViewController/PFSignUpView.m b/ParseUI/Classes/SignUpViewController/PFSignUpView.m index b171404..c3f8c8e 100644 --- a/ParseUI/Classes/SignUpViewController/PFSignUpView.m +++ b/ParseUI/Classes/SignUpViewController/PFSignUpView.m @@ -66,7 +66,7 @@ - (instancetype)initWithFields:(PFSignUpFields)otherFields { _passwordField = [[PFTextField alloc] initWithFrame:CGRectZero separatorStyle:PFTextFieldSeparatorStyleBottom]; - _passwordField.placeholder = NSLocalizedString(@"Password", @"Password"); + _passwordField.placeholder = PFLocalizedString(@"Password", @"Password"); _passwordField.secureTextEntry = YES; _passwordField.autocorrectionType = UITextAutocorrectionTypeNo; _passwordField.autocapitalizationType = UITextAutocapitalizationTypeNone; @@ -83,7 +83,7 @@ - (instancetype)initWithFields:(PFSignUpFields)otherFields { _emailField.autocorrectionType = UITextAutocorrectionTypeNo; _emailField.autocapitalizationType = UITextAutocapitalizationTypeNone; _emailField.keyboardType = UIKeyboardTypeEmailAddress; - _emailField.placeholder = NSLocalizedString(@"Email", @"Email"); + _emailField.placeholder = PFLocalizedString(@"Email", @"Email"); if (!(_fields & PFSignUpFieldsAdditional)) { _emailField.returnKeyType = UIReturnKeyDone; } else { @@ -97,14 +97,14 @@ - (instancetype)initWithFields:(PFSignUpFields)otherFields { separatorStyle:PFTextFieldSeparatorStyleBottom]; _additionalField.autocorrectionType = UITextAutocorrectionTypeNo; _additionalField.autocapitalizationType = UITextAutocapitalizationTypeNone; - _additionalField.placeholder = NSLocalizedString(@"Additional", @"Additional"); + _additionalField.placeholder = PFLocalizedString(@"Additional", @"Additional"); _additionalField.returnKeyType = UIReturnKeyDone; [self addSubview:_additionalField]; } if (_fields & PFSignUpFieldsSignUpButton) { _signUpButton = [[PFPrimaryButton alloc] initWithBackgroundImageColor:[PFColor signupButtonBackgroundColor]]; - [_signUpButton setTitle:NSLocalizedString(@"Sign Up", @"Sign Up") forState:UIControlStateNormal]; + [_signUpButton setTitle:PFLocalizedString(@"Sign Up", @"Sign Up") forState:UIControlStateNormal]; [self addSubview:_signUpButton]; } @@ -305,10 +305,10 @@ - (void)_updateUsernameFieldStyle { UIKeyboardType keyboardType = UIKeyboardTypeDefault; NSString *placeholder = nil; if (!_emailAsUsername) { - placeholder = NSLocalizedString(@"Username", @"Username"); + placeholder = PFLocalizedString(@"Username", @"Username"); keyboardType = UIKeyboardTypeDefault; } else { - placeholder = NSLocalizedString(@"Email", @"Email"); + placeholder = PFLocalizedString(@"Email", @"Email"); keyboardType = UIKeyboardTypeEmailAddress; } diff --git a/ParseUI/Classes/SignUpViewController/PFSignUpViewController.m b/ParseUI/Classes/SignUpViewController/PFSignUpViewController.m index 257b5fb..053583a 100644 --- a/ParseUI/Classes/SignUpViewController/PFSignUpViewController.m +++ b/ParseUI/Classes/SignUpViewController/PFSignUpViewController.m @@ -269,7 +269,7 @@ - (void)_signUpAction { } if ([password length] < _minPasswordLength) { - NSString *errorMessage = NSLocalizedString(@"Password must be at least %d characters.", + NSString *errorMessage = PFLocalizedString(@"Password must be at least %d characters.", @"Password too short error message in PFSignUpViewController"); errorMessage = [NSString stringWithFormat:errorMessage, (unsigned long)_minPasswordLength]; NSError *error = [NSError errorWithDomain:PFParseErrorDomain @@ -324,7 +324,7 @@ - (void)_signUpDidFailWithError:(NSError *)error { } [[NSNotificationCenter defaultCenter] postNotificationName:PFSignUpFailureNotification object:self]; - NSString *title = NSLocalizedString(@"Sign Up Error", @"Sign Up Error"); + NSString *title = PFLocalizedString(@"Sign Up Error", @"Sign Up Error"); if ([[error domain] isEqualToString:PFParseErrorDomain]) { NSInteger errorCode = [error code]; @@ -332,31 +332,31 @@ - (void)_signUpDidFailWithError:(NSError *)error { UIResponder *responder = nil; if (errorCode == kPFErrorInvalidEmailAddress) { - message = NSLocalizedString(@"The email address is invalid. Please enter a valid email.", + message = PFLocalizedString(@"The email address is invalid. Please enter a valid email.", @"Invalid email address error message in PFSignUpViewControllers"); responder = _signUpView.emailField ?: _signUpView.usernameField; } else if (errorCode == kPFErrorUsernameMissing) { - message = NSLocalizedString(@"Please enter a username.", + message = PFLocalizedString(@"Please enter a username.", @"Username missing error message in PFSignUpViewController"); responder = _signUpView.usernameField; } else if (errorCode == kPFErrorUserPasswordMissing) { - message = NSLocalizedString(@"Please enter a password.", + message = PFLocalizedString(@"Please enter a password.", @"Password missing error message in PFSignUpViewController"); responder = _signUpView.passwordField; } else if (errorCode == kPFErrorUsernameTaken) { - NSString *format = NSLocalizedString(@"The username '%@' is taken. Please try choosing a different username.", + NSString *format = PFLocalizedString(@"The username '%@' is taken. Please try choosing a different username.", @"Username taken error format in PFSignUpViewController"); message = [NSString stringWithFormat:format, _signUpView.usernameField.text]; responder = _signUpView.usernameField; } else if (error.code == kPFErrorUserEmailTaken) { - NSString *format = NSLocalizedString(@"The email '%@' is taken. Please try using a different email.", + NSString *format = PFLocalizedString(@"The email '%@' is taken. Please try using a different email.", @"Email is taken error format in PFSignUpViewController."); UITextField *textField = self.emailAsUsername ? _signUpView.usernameField : _signUpView.emailField; message = [NSString stringWithFormat:format, textField.text]; responder = textField; } else if (error.code == kPFErrorUserEmailMissing) { - message = NSLocalizedString(@"Please enter an email.", + message = PFLocalizedString(@"Please enter an email.", @"Email missing error message in PFSignUpViewController"); responder = _signUpView.emailField; }