Skip to content

Commit d06dd17

Browse files
authored
[MOB-10338] Add Missing String Keys (#274)
* Add string keys on Dart * Add string keys on Android * Add string keys on iOS * Update CHANGELOG.md
1 parent f19794a commit d06dd17

File tree

5 files changed

+101
-1
lines changed

5 files changed

+101
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## Unreleased
22

33
* Adds BugReporting.setVideoRecordingFloatingButtonPosition API
4+
* Adds some missing string keys and their mappings on iOS and Android
45
* Fixes an issue with some string keys not working on Android
56

67
## 11.2.0 (2022-09-08)

android/src/main/java/com/instabug/flutter/ArgsRegistry.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ static void registerCustomTextPlaceHolderKeysArgs(Map<String, Object> args) {
193193
args.put("CustomTextPlaceHolderKey.reportSuccessfullySent", InstabugCustomTextPlaceHolder.Key.REPORT_SUCCESSFULLY_SENT);
194194
args.put("CustomTextPlaceHolderKey.successDialogHeader", InstabugCustomTextPlaceHolder.Key.SUCCESS_DIALOG_HEADER);
195195
args.put("CustomTextPlaceHolderKey.addVideo", InstabugCustomTextPlaceHolder.Key.ADD_VIDEO);
196+
args.put("CustomTextPlaceHolderKey.videoPressRecord", InstabugCustomTextPlaceHolder.Key.VIDEO_RECORDING_FAB_BUBBLE_HINT);
196197
args.put("CustomTextPlaceHolderKey.betaWelcomeMessageWelcomeStepTitle", InstabugCustomTextPlaceHolder.Key.BETA_WELCOME_MESSAGE_WELCOME_STEP_TITLE);
197198
args.put("CustomTextPlaceHolderKey.betaWelcomeMessageWelcomeStepContent", InstabugCustomTextPlaceHolder.Key.BETA_WELCOME_MESSAGE_WELCOME_STEP_CONTENT);
198199
args.put("CustomTextPlaceHolderKey.betaWelcomeMessageHowToReportStepTitle", InstabugCustomTextPlaceHolder.Key.BETA_WELCOME_MESSAGE_HOW_TO_REPORT_STEP_TITLE);
@@ -204,6 +205,24 @@ static void registerCustomTextPlaceHolderKeysArgs(Map<String, Object> args) {
204205
args.put("CustomTextPlaceHolderKey.repliesNotificationTeamName", InstabugCustomTextPlaceHolder.Key.CHATS_TEAM_STRING_NAME);
205206
args.put("CustomTextPlaceHolderKey.repliesNotificationReplyButton", InstabugCustomTextPlaceHolder.Key.REPLIES_NOTIFICATION_REPLY_BUTTON);
206207
args.put("CustomTextPlaceHolderKey.repliesNotificationDismissButton", InstabugCustomTextPlaceHolder.Key.REPLIES_NOTIFICATION_DISMISS_BUTTON);
208+
args.put("CustomTextPlaceHolderKey.surveysStoreRatingThanksTitle", InstabugCustomTextPlaceHolder.Key.SURVEYS_STORE_RATING_THANKS_TITLE);
209+
args.put("CustomTextPlaceHolderKey.surveysStoreRatingThanksSubtitle", InstabugCustomTextPlaceHolder.Key.SURVEYS_STORE_RATING_THANKS_SUBTITLE);
210+
args.put("CustomTextPlaceHolderKey.reportBugDescription", InstabugCustomTextPlaceHolder.Key.REPORT_BUG_DESCRIPTION);
211+
args.put("CustomTextPlaceHolderKey.reportFeedbackDescription", InstabugCustomTextPlaceHolder.Key.REPORT_FEEDBACK_DESCRIPTION);
212+
args.put("CustomTextPlaceHolderKey.reportQuestionDescription", InstabugCustomTextPlaceHolder.Key.REPORT_QUESTION_DESCRIPTION);
213+
args.put("CustomTextPlaceHolderKey.requestFeatureDescription", InstabugCustomTextPlaceHolder.Key.REQUEST_FEATURE_DESCRIPTION);
214+
args.put("CustomTextPlaceHolderKey.discardAlertTitle", InstabugCustomTextPlaceHolder.Key.REPORT_DISCARD_DIALOG_TITLE);
215+
args.put("CustomTextPlaceHolderKey.discardAlertMessage", InstabugCustomTextPlaceHolder.Key.REPORT_DISCARD_DIALOG_BODY);
216+
args.put("CustomTextPlaceHolderKey.discardAlertCancel", InstabugCustomTextPlaceHolder.Key.REPORT_DISCARD_DIALOG_NEGATIVE_ACTION);
217+
args.put("CustomTextPlaceHolderKey.discardAlertAction", InstabugCustomTextPlaceHolder.Key.REPORT_DISCARD_DIALOG_POSITIVE_ACTION);
218+
args.put("CustomTextPlaceHolderKey.addAttachmentButtonTitleStringName", InstabugCustomTextPlaceHolder.Key.REPORT_ADD_ATTACHMENT_HEADER);
219+
args.put("CustomTextPlaceHolderKey.reportReproStepsDisclaimerBody", InstabugCustomTextPlaceHolder.Key.REPORT_REPRO_STEPS_DISCLAIMER_BODY);
220+
args.put("CustomTextPlaceHolderKey.reportReproStepsDisclaimerLink", InstabugCustomTextPlaceHolder.Key.REPORT_REPRO_STEPS_DISCLAIMER_LINK);
221+
args.put("CustomTextPlaceHolderKey.reproStepsProgressDialogBody", InstabugCustomTextPlaceHolder.Key.REPRO_STEPS_PROGRESS_DIALOG_BODY);
222+
args.put("CustomTextPlaceHolderKey.reproStepsListHeader", InstabugCustomTextPlaceHolder.Key.REPRO_STEPS_LIST_HEADER);
223+
args.put("CustomTextPlaceHolderKey.reproStepsListDescription", InstabugCustomTextPlaceHolder.Key.REPRO_STEPS_LIST_DESCRIPTION);
224+
args.put("CustomTextPlaceHolderKey.reproStepsListEmptyStateDescription", InstabugCustomTextPlaceHolder.Key.REPRO_STEPS_LIST_EMPTY_STATE_DESCRIPTION);
225+
args.put("CustomTextPlaceHolderKey.reproStepsListItemTitle", InstabugCustomTextPlaceHolder.Key.REPRO_STEPS_LIST_ITEM_NUMBERING_TITLE);
207226
}
208227

209228
static void registerInstabugReportTypesArgs(Map<String, Object> args) {

android/src/test/java/com/instabug/flutter/ArgsRegistryTest.java

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ private List<InstabugCustomTextPlaceHolder.Key> getCurrentlySupportedKeysBySDK()
271271
keys.add(InstabugCustomTextPlaceHolder.Key.REPORT_SUCCESSFULLY_SENT);
272272
keys.add(InstabugCustomTextPlaceHolder.Key.SUCCESS_DIALOG_HEADER);
273273
keys.add(InstabugCustomTextPlaceHolder.Key.ADD_VIDEO);
274+
keys.add(InstabugCustomTextPlaceHolder.Key.VIDEO_RECORDING_FAB_BUBBLE_HINT);
274275
keys.add(InstabugCustomTextPlaceHolder.Key.BETA_WELCOME_MESSAGE_WELCOME_STEP_TITLE);
275276
keys.add(InstabugCustomTextPlaceHolder.Key.BETA_WELCOME_MESSAGE_WELCOME_STEP_CONTENT);
276277
keys.add(InstabugCustomTextPlaceHolder.Key.BETA_WELCOME_MESSAGE_HOW_TO_REPORT_STEP_TITLE);
@@ -282,6 +283,24 @@ private List<InstabugCustomTextPlaceHolder.Key> getCurrentlySupportedKeysBySDK()
282283
keys.add(InstabugCustomTextPlaceHolder.Key.CHATS_TEAM_STRING_NAME);
283284
keys.add(InstabugCustomTextPlaceHolder.Key.REPLIES_NOTIFICATION_REPLY_BUTTON);
284285
keys.add(InstabugCustomTextPlaceHolder.Key.REPLIES_NOTIFICATION_DISMISS_BUTTON);
286+
keys.add(InstabugCustomTextPlaceHolder.Key.SURVEYS_STORE_RATING_THANKS_TITLE);
287+
keys.add(InstabugCustomTextPlaceHolder.Key.SURVEYS_STORE_RATING_THANKS_SUBTITLE);
288+
keys.add(InstabugCustomTextPlaceHolder.Key.REPORT_BUG_DESCRIPTION);
289+
keys.add(InstabugCustomTextPlaceHolder.Key.REPORT_FEEDBACK_DESCRIPTION);
290+
keys.add(InstabugCustomTextPlaceHolder.Key.REPORT_QUESTION_DESCRIPTION);
291+
keys.add(InstabugCustomTextPlaceHolder.Key.REQUEST_FEATURE_DESCRIPTION);
292+
keys.add(InstabugCustomTextPlaceHolder.Key.REPORT_DISCARD_DIALOG_TITLE);
293+
keys.add(InstabugCustomTextPlaceHolder.Key.REPORT_DISCARD_DIALOG_BODY);
294+
keys.add(InstabugCustomTextPlaceHolder.Key.REPORT_DISCARD_DIALOG_NEGATIVE_ACTION);
295+
keys.add(InstabugCustomTextPlaceHolder.Key.REPORT_DISCARD_DIALOG_POSITIVE_ACTION);
296+
keys.add(InstabugCustomTextPlaceHolder.Key.REPORT_ADD_ATTACHMENT_HEADER);
297+
keys.add(InstabugCustomTextPlaceHolder.Key.REPORT_REPRO_STEPS_DISCLAIMER_BODY);
298+
keys.add(InstabugCustomTextPlaceHolder.Key.REPORT_REPRO_STEPS_DISCLAIMER_LINK);
299+
keys.add(InstabugCustomTextPlaceHolder.Key.REPRO_STEPS_PROGRESS_DIALOG_BODY);
300+
keys.add(InstabugCustomTextPlaceHolder.Key.REPRO_STEPS_LIST_HEADER);
301+
keys.add(InstabugCustomTextPlaceHolder.Key.REPRO_STEPS_LIST_DESCRIPTION);
302+
keys.add(InstabugCustomTextPlaceHolder.Key.REPRO_STEPS_LIST_EMPTY_STATE_DESCRIPTION);
303+
keys.add(InstabugCustomTextPlaceHolder.Key.REPRO_STEPS_LIST_ITEM_NUMBERING_TITLE);
285304
return keys;
286305
}
287306

@@ -309,6 +328,7 @@ private List<InstabugCustomTextPlaceHolder.Key> getAllCustomTextPlaceHolderKeys(
309328
keys.add(InstabugCustomTextPlaceHolder.Key.REPORT_SUCCESSFULLY_SENT);
310329
keys.add(InstabugCustomTextPlaceHolder.Key.SUCCESS_DIALOG_HEADER);
311330
keys.add(InstabugCustomTextPlaceHolder.Key.ADD_VIDEO);
331+
keys.add(InstabugCustomTextPlaceHolder.Key.VIDEO_RECORDING_FAB_BUBBLE_HINT);
312332
keys.add(InstabugCustomTextPlaceHolder.Key.BETA_WELCOME_MESSAGE_WELCOME_STEP_TITLE);
313333
keys.add(InstabugCustomTextPlaceHolder.Key.BETA_WELCOME_MESSAGE_WELCOME_STEP_CONTENT);
314334
keys.add(InstabugCustomTextPlaceHolder.Key.BETA_WELCOME_MESSAGE_HOW_TO_REPORT_STEP_TITLE);
@@ -328,6 +348,24 @@ private List<InstabugCustomTextPlaceHolder.Key> getAllCustomTextPlaceHolderKeys(
328348
keys.add(InstabugCustomTextPlaceHolder.Key.CHATS_TEAM_STRING_NAME);
329349
keys.add(InstabugCustomTextPlaceHolder.Key.REPLIES_NOTIFICATION_REPLY_BUTTON);
330350
keys.add(InstabugCustomTextPlaceHolder.Key.REPLIES_NOTIFICATION_DISMISS_BUTTON);
351+
keys.add(InstabugCustomTextPlaceHolder.Key.SURVEYS_STORE_RATING_THANKS_TITLE);
352+
keys.add(InstabugCustomTextPlaceHolder.Key.SURVEYS_STORE_RATING_THANKS_SUBTITLE);
353+
keys.add(InstabugCustomTextPlaceHolder.Key.REPORT_BUG_DESCRIPTION);
354+
keys.add(InstabugCustomTextPlaceHolder.Key.REPORT_FEEDBACK_DESCRIPTION);
355+
keys.add(InstabugCustomTextPlaceHolder.Key.REPORT_QUESTION_DESCRIPTION);
356+
keys.add(InstabugCustomTextPlaceHolder.Key.REQUEST_FEATURE_DESCRIPTION);
357+
keys.add(InstabugCustomTextPlaceHolder.Key.REPORT_DISCARD_DIALOG_TITLE);
358+
keys.add(InstabugCustomTextPlaceHolder.Key.REPORT_DISCARD_DIALOG_BODY);
359+
keys.add(InstabugCustomTextPlaceHolder.Key.REPORT_DISCARD_DIALOG_NEGATIVE_ACTION);
360+
keys.add(InstabugCustomTextPlaceHolder.Key.REPORT_DISCARD_DIALOG_POSITIVE_ACTION);
361+
keys.add(InstabugCustomTextPlaceHolder.Key.REPORT_ADD_ATTACHMENT_HEADER);
362+
keys.add(InstabugCustomTextPlaceHolder.Key.REPORT_REPRO_STEPS_DISCLAIMER_BODY);
363+
keys.add(InstabugCustomTextPlaceHolder.Key.REPORT_REPRO_STEPS_DISCLAIMER_LINK);
364+
keys.add(InstabugCustomTextPlaceHolder.Key.REPRO_STEPS_PROGRESS_DIALOG_BODY);
365+
keys.add(InstabugCustomTextPlaceHolder.Key.REPRO_STEPS_LIST_HEADER);
366+
keys.add(InstabugCustomTextPlaceHolder.Key.REPRO_STEPS_LIST_DESCRIPTION);
367+
keys.add(InstabugCustomTextPlaceHolder.Key.REPRO_STEPS_LIST_EMPTY_STATE_DESCRIPTION);
368+
keys.add(InstabugCustomTextPlaceHolder.Key.REPRO_STEPS_LIST_ITEM_NUMBERING_TITLE);
331369
return keys;
332370
}
333371
}

ios/Classes/InstabugFlutterPlugin.m

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,6 +1087,7 @@ + (NSDictionary *)constants {
10871087
@"CustomTextPlaceHolderKey.reportSuccessfullySent": kIBGThankYouAlertMessageStringName,
10881088
@"CustomTextPlaceHolderKey.successDialogHeader": kIBGThankYouAlertTitleStringName,
10891089
@"CustomTextPlaceHolderKey.addVideo": kIBGAddScreenRecordingMessageStringName,
1090+
@"CustomTextPlaceHolderKey.videoPressRecord": kIBGVideoPressRecordTitle,
10901091
@"CustomTextPlaceHolderKey.betaWelcomeMessageWelcomeStepTitle": kIBGBetaWelcomeMessageWelcomeStepTitle,
10911092
@"CustomTextPlaceHolderKey.betaWelcomeMessageWelcomeStepContent": kIBGBetaWelcomeMessageWelcomeStepContent,
10921093
@"CustomTextPlaceHolderKey.betaWelcomeMessageHowToReportStepTitle": kIBGBetaWelcomeMessageHowToReportStepTitle,
@@ -1100,6 +1101,28 @@ + (NSDictionary *)constants {
11001101
@"CustomTextPlaceHolderKey.repliesNotificationReplyButton": kIBGReplyButtonTitleStringName,
11011102
@"CustomTextPlaceHolderKey.repliesNotificationDismissButton": kIBGDismissButtonTitleStringName,
11021103

1104+
@"CustomTextPlaceHolderKey.surveysStoreRatingThanksTitle": kIBGStoreRatingThankYouTitleText,
1105+
@"CustomTextPlaceHolderKey.surveysStoreRatingThanksSubtitle": kIBGStoreRatingThankYouDescriptionText,
1106+
1107+
@"CustomTextPlaceHolderKey.reportBugDescription": kIBGReportBugDescriptionStringName,
1108+
@"CustomTextPlaceHolderKey.reportFeedbackDescription": kIBGReportFeedbackDescriptionStringName,
1109+
@"CustomTextPlaceHolderKey.reportQuestionDescription": kIBGReportQuestionDescriptionStringName,
1110+
@"CustomTextPlaceHolderKey.requestFeatureDescription": kIBGRequestFeatureDescriptionStringName,
1111+
1112+
@"CustomTextPlaceHolderKey.discardAlertTitle": kIBGDiscardAlertTitle,
1113+
@"CustomTextPlaceHolderKey.discardAlertMessage": kIBGDiscardAlertMessage,
1114+
@"CustomTextPlaceHolderKey.discardAlertCancel": kIBGDiscardAlertCancel,
1115+
@"CustomTextPlaceHolderKey.discardAlertAction": kIBGDiscardAlertAction,
1116+
@"CustomTextPlaceHolderKey.addAttachmentButtonTitleStringName": kIBGAddAttachmentButtonTitleStringName,
1117+
1118+
@"CustomTextPlaceHolderKey.reportReproStepsDisclaimerBody": kIBGReproStepsDisclaimerBody,
1119+
@"CustomTextPlaceHolderKey.reportReproStepsDisclaimerLink": kIBGReproStepsDisclaimerLink,
1120+
@"CustomTextPlaceHolderKey.reproStepsProgressDialogBody": kIBGProgressViewTitle,
1121+
@"CustomTextPlaceHolderKey.reproStepsListHeader": kIBGReproStepsListTitle,
1122+
@"CustomTextPlaceHolderKey.reproStepsListDescription": kIBGReproStepsListHeader,
1123+
@"CustomTextPlaceHolderKey.reproStepsListEmptyStateDescription": kIBGReproStepsListEmptyStateLabel,
1124+
@"CustomTextPlaceHolderKey.reproStepsListItemTitle": kIBGReproStepsListItemName,
1125+
11031126
@"ReportType.bug": @(IBGBugReportingReportTypeBug),
11041127
@"ReportType.feedback": @(IBGBugReportingReportTypeFeedback),
11051128
@"ReportType.question": @(IBGBugReportingReportTypeQuestion),

lib/src/modules/instabug.dart

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ enum CustomTextPlaceHolderKey {
7575
reportSuccessfullySent,
7676
successDialogHeader,
7777
addVideo,
78+
videoPressRecord,
7879
betaWelcomeMessageWelcomeStepTitle,
7980
betaWelcomeMessageWelcomeStepContent,
8081
betaWelcomeMessageHowToReportStepTitle,
@@ -85,7 +86,25 @@ enum CustomTextPlaceHolderKey {
8586
liveWelcomeMessageContent,
8687
repliesNotificationTeamName,
8788
repliesNotificationReplyButton,
88-
repliesNotificationDismissButton
89+
repliesNotificationDismissButton,
90+
surveysStoreRatingThanksTitle,
91+
surveysStoreRatingThanksSubtitle,
92+
reportBugDescription,
93+
reportFeedbackDescription,
94+
reportQuestionDescription,
95+
requestFeatureDescription,
96+
discardAlertTitle,
97+
discardAlertMessage,
98+
discardAlertCancel,
99+
discardAlertAction,
100+
addAttachmentButtonTitleStringName,
101+
reportReproStepsDisclaimerBody,
102+
reportReproStepsDisclaimerLink,
103+
reproStepsProgressDialogBody,
104+
reproStepsListHeader,
105+
reproStepsListDescription,
106+
reproStepsListEmptyStateDescription,
107+
reproStepsListItemTitle,
89108
}
90109

91110
enum ReproStepsMode { enabled, disabled, enabledWithNoScreenshots }

0 commit comments

Comments
 (0)