Skip to content

Commit

Permalink
Merge pull request #104 from mckaskle/localize_with_tables
Browse files Browse the repository at this point in the history
Splitting RMStore's localized strings into their own table.
  • Loading branch information
hpique committed Aug 30, 2014
2 parents b8de103 + 1897810 commit d0347f3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions RMStore/Optional/RMStoreAppReceiptVerificator.m
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ - (BOOL)verifyTransaction:(SKPaymentTransaction*)transaction
const BOOL receiptVerified = [self verifyAppReceipt:receipt];
if (!receiptVerified)
{
[self failWithBlock:failureBlock message:NSLocalizedString(@"The app receipt failed verification", @"")];
[self failWithBlock:failureBlock message:NSLocalizedStringFromTable(@"The app receipt failed verification", @"RMStore", nil)];
return NO;
}
SKPayment *payment = transaction.payment;
const BOOL transactionVerified = [receipt containsInAppPurchaseOfProductIdentifier:payment.productIdentifier];
if (!transactionVerified)
{
[self failWithBlock:failureBlock message:NSLocalizedString(@"The app receipt does not contain the given product", @"")];
[self failWithBlock:failureBlock message:NSLocalizedStringFromTable(@"The app receipt does not contain the given product", @"RMStore", nil)];
return NO;
}
if (successBlock)
Expand Down
2 changes: 1 addition & 1 deletion RMStore/Optional/RMStoreTransactionReceiptVerificator.m
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ - (void)verifyRequestData:(NSData*)requestData
if (!data)
{
RMStoreLog(@"Server Connection Failed");
NSError *wrapperError = [NSError errorWithDomain:RMStoreErrorDomain code:RMStoreErrorCodeUnableToCompleteVerification userInfo:@{NSUnderlyingErrorKey : error, NSLocalizedDescriptionKey : NSLocalizedString(@"Connection to Apple failed. Check the underlying error for more info.", @"Error description")}];
NSError *wrapperError = [NSError errorWithDomain:RMStoreErrorDomain code:RMStoreErrorCodeUnableToCompleteVerification userInfo:@{NSUnderlyingErrorKey : error, NSLocalizedDescriptionKey : NSLocalizedStringFromTable(@"Connection to Apple failed. Check the underlying error for more info.", @"RMStore", @"Error description")}];
if (failureBlock != nil)
{
failureBlock(wrapperError);
Expand Down
4 changes: 2 additions & 2 deletions RMStore/RMStore.m
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ - (void)addPayment:(NSString*)productIdentifier
RMStoreLog(@"unknown product id %@", productIdentifier)
if (failureBlock != nil)
{
NSError *error = [NSError errorWithDomain:RMStoreErrorDomain code:RMStoreErrorCodeUnknownProductIdentifier userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@"Unknown product identifier", "Error description")}];
NSError *error = [NSError errorWithDomain:RMStoreErrorDomain code:RMStoreErrorCodeUnknownProductIdentifier userInfo:@{NSLocalizedDescriptionKey: NSLocalizedStringFromTable(@"Unknown product identifier", @"RMStore", @"Error description")}];
failureBlock(nil, error);
}
return;
Expand Down Expand Up @@ -433,7 +433,7 @@ - (void)didCancelDownload:(SKDownload*)download queue:(SKPaymentQueue*)queue

[self postNotificationWithName:RMSKDownloadCanceled download:download userInfoExtras:nil];

NSError *error = [NSError errorWithDomain:RMStoreErrorDomain code:RMStoreErrorCodeDownloadCanceled userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@"Download canceled", "Error description")}];
NSError *error = [NSError errorWithDomain:RMStoreErrorDomain code:RMStoreErrorCodeDownloadCanceled userInfo:@{NSLocalizedDescriptionKey: NSLocalizedStringFromTable(@"Download canceled", @"RMStore", @"Error description")}];

const BOOL hasPendingDownloads = [self.class hasPendingDownloadsInTransaction:transaction];
if (!hasPendingDownloads)
Expand Down

0 comments on commit d0347f3

Please sign in to comment.