Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make the string table used configurable via a pre-processor define.

  • Loading branch information...
commit 76f4a049a091fe133ac33771184f75efeabf4074 1 parent 43db20c
@jum jum authored
Showing with 12 additions and 5 deletions.
  1. +12 −5 Appirater.h
View
17 Appirater.h
@@ -44,6 +44,13 @@ extern NSString *const kAppiraterRatedCurrentVersion;
extern NSString *const kAppiraterDeclinedToRate;
extern NSString *const kAppiraterReminderRequestDate;
+#define APPI_STRINGIZE(x) #x
+#define APPI_STRINGIZE2(x) APPI_STRINGIZE(x)
+
+#ifndef APPIRATER_STRINGS_TABLE
+#define APPIRATER_STRINGS_TABLE "AppiraterLocalizable"
+#endif
+
/*
Your localized app's name.
*/
@@ -58,30 +65,30 @@ extern NSString *const kAppiraterReminderRequestDate;
This is the message your users will see once they've passed the day+launches
threshold.
*/
-#define APPIRATER_LOCALIZED_MESSAGE NSLocalizedStringFromTable(@"If you enjoy using %@, would you mind taking a moment to rate it? It won't take more than a minute. Thanks for your support!", @"AppiraterLocalizable", nil)
+#define APPIRATER_LOCALIZED_MESSAGE NSLocalizedStringFromTable(@"If you enjoy using %@, would you mind taking a moment to rate it? It won't take more than a minute. Thanks for your support!", @APPI_STRINGIZE2(APPIRATER_STRINGS_TABLE), nil)
#define APPIRATER_MESSAGE [NSString stringWithFormat:APPIRATER_LOCALIZED_MESSAGE, APPIRATER_APP_NAME]
/*
This is the title of the message alert that users will see.
*/
-#define APPIRATER_LOCALIZED_MESSAGE_TITLE NSLocalizedStringFromTable(@"Rate %@", @"AppiraterLocalizable", nil)
+#define APPIRATER_LOCALIZED_MESSAGE_TITLE NSLocalizedStringFromTable(@"Rate %@", @APPI_STRINGIZE2(APPIRATER_STRINGS_TABLE), nil)
#define APPIRATER_MESSAGE_TITLE [NSString stringWithFormat:APPIRATER_LOCALIZED_MESSAGE_TITLE, APPIRATER_APP_NAME]
/*
The text of the button that rejects reviewing the app.
*/
-#define APPIRATER_CANCEL_BUTTON NSLocalizedStringFromTable(@"No, Thanks", @"AppiraterLocalizable", nil)
+#define APPIRATER_CANCEL_BUTTON NSLocalizedStringFromTable(@"No, Thanks", @APPI_STRINGIZE2(APPIRATER_STRINGS_TABLE), nil)
/*
Text of button that will send user to app review page.
*/
-#define APPIRATER_LOCALIZED_RATE_BUTTON NSLocalizedStringFromTable(@"Rate %@", @"AppiraterLocalizable", nil)
+#define APPIRATER_LOCALIZED_RATE_BUTTON NSLocalizedStringFromTable(@"Rate %@", @APPI_STRINGIZE2(APPIRATER_STRINGS_TABLE), nil)
#define APPIRATER_RATE_BUTTON [NSString stringWithFormat:APPIRATER_LOCALIZED_RATE_BUTTON, APPIRATER_APP_NAME]
/*
Text for button to remind the user to review later.
*/
-#define APPIRATER_RATE_LATER NSLocalizedStringFromTable(@"Remind me later", @"AppiraterLocalizable", nil)
+#define APPIRATER_RATE_LATER NSLocalizedStringFromTable(@"Remind me later", @APPI_STRINGIZE2(APPIRATER_STRINGS_TABLE), nil)
@interface Appirater : NSObject <UIAlertViewDelegate> {
Please sign in to comment.
Something went wrong with that request. Please try again.