Skip to content

Commit a22ac08

Browse files
authored
Add localized strings to the UIAlert (#6190)
* Add localized strings to the UIAlert * Make the comment refer to the new build alert context
1 parent ec54ab7 commit a22ac08

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

FirebaseAppDistribution/Sources/FIRAppDistributionUIService.m

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -142,22 +142,29 @@ - (void)showUIAlert:(UIAlertController *)alertController {
142142

143143
- (void)showUIAlertWithCompletion:(FIRFADUIActionCompletion)completion {
144144
UIAlertController *alert = [UIAlertController
145-
alertControllerWithTitle:@"Enable new build alerts"
146-
message:@"Get in-app alerts when new builds are ready to test."
145+
alertControllerWithTitle:NSLocalizedString(
146+
@"Enable new build alerts",
147+
@"Title for App Distribution New Build Alerts UIAlert.")
148+
message:NSLocalizedString(
149+
@"Get in-app alerts when new builds are ready to test.",
150+
@"Description for enabling new build alerts will do.")
147151
preferredStyle:UIAlertControllerStyleAlert];
148152

149-
UIAlertAction *yesButton = [UIAlertAction actionWithTitle:@"Turn on"
150-
style:UIAlertActionStyleDefault
151-
handler:^(UIAlertAction *action) {
152-
completion(YES);
153-
}];
154-
155-
UIAlertAction *noButton = [UIAlertAction actionWithTitle:@"Not now"
156-
style:UIAlertActionStyleDefault
157-
handler:^(UIAlertAction *action) {
158-
[self resetUIState];
159-
completion(NO);
160-
}];
153+
UIAlertAction *yesButton = [UIAlertAction
154+
actionWithTitle:NSLocalizedString(@"Turn on", @"Button for turning on new build alerts.")
155+
style:UIAlertActionStyleDefault
156+
handler:^(UIAlertAction *action) {
157+
completion(YES);
158+
}];
159+
160+
UIAlertAction *noButton = [UIAlertAction
161+
actionWithTitle:NSLocalizedString(@"Not now",
162+
@"Button for dismissing the new build alerts UIAlert")
163+
style:UIAlertActionStyleDefault
164+
handler:^(UIAlertAction *action) {
165+
[self resetUIState];
166+
completion(NO);
167+
}];
161168

162169
[alert addAction:noButton];
163170
[alert addAction:yesButton];

0 commit comments

Comments
 (0)