Skip to content

Commit 4edaa51

Browse files
ahmed1hishamAli AbdelfattahTheBuggedYRN
authored
[INSD-6505] Add missing string keys (#661)
* Add missing string keys * Update CHANGELOG.md * Add more string keys - videoPressRecord - reproStepsListItemTitle Co-authored-by: Ali Abdelfattah <[email protected]> Co-authored-by: Youssef Raafat <[email protected]>
1 parent e2da956 commit 4edaa51

File tree

6 files changed

+68
-4
lines changed

6 files changed

+68
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Breaking: Removes the deprecated APIs. Check the migration guide referenced in our README
55
* Adds the ability to opt out of iOS source maps auto upload through the INSTABUG_SOURCEMAPS_UPLOAD_DISABLE env variable
66
* Adds dynamic entry file support through the INSTABUG_ENTRY_FILE env variable
7+
* Adds string keys for the Repro Steps
78
* Fixes an issue with setRequestFilterExpression API not working with Hermes
89
* Fixes an issue with swipe invocation event not working on Android
910

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ static void registerCustomTextPlaceHolderKeysArgs(Map<String, Object> args) {
194194
args.put("reportSuccessfullySent", InstabugCustomTextPlaceHolder.Key.REPORT_SUCCESSFULLY_SENT);
195195
args.put("successDialogHeader", InstabugCustomTextPlaceHolder.Key.SUCCESS_DIALOG_HEADER);
196196
args.put("addVideoMessage", InstabugCustomTextPlaceHolder.Key.ADD_VIDEO);
197+
args.put("videoPressRecord", InstabugCustomTextPlaceHolder.Key.VIDEO_RECORDING_FAB_BUBBLE_HINT);
197198
args.put("betaWelcomeMessageWelcomeStepTitle", InstabugCustomTextPlaceHolder.Key.BETA_WELCOME_MESSAGE_WELCOME_STEP_TITLE);
198199
args.put("betaWelcomeMessageWelcomeStepContent", InstabugCustomTextPlaceHolder.Key.BETA_WELCOME_MESSAGE_WELCOME_STEP_CONTENT);
199200
args.put("betaWelcomeMessageHowToReportStepTitle", InstabugCustomTextPlaceHolder.Key.BETA_WELCOME_MESSAGE_HOW_TO_REPORT_STEP_TITLE);
@@ -207,6 +208,13 @@ static void registerCustomTextPlaceHolderKeysArgs(Map<String, Object> args) {
207208
args.put("discardAlertCancel", InstabugCustomTextPlaceHolder.Key.REPORT_DISCARD_DIALOG_NEGATIVE_ACTION);
208209
args.put("discardAlertAction", InstabugCustomTextPlaceHolder.Key.REPORT_DISCARD_DIALOG_POSITIVE_ACTION);
209210
args.put("addAttachmentButtonTitleStringName", InstabugCustomTextPlaceHolder.Key.REPORT_ADD_ATTACHMENT_HEADER);
211+
args.put("reportReproStepsDisclaimerBody", InstabugCustomTextPlaceHolder.Key.REPORT_REPRO_STEPS_DISCLAIMER_BODY);
212+
args.put("reportReproStepsDisclaimerLink", InstabugCustomTextPlaceHolder.Key.REPORT_REPRO_STEPS_DISCLAIMER_LINK);
213+
args.put("reproStepsProgressDialogBody", InstabugCustomTextPlaceHolder.Key.REPRO_STEPS_PROGRESS_DIALOG_BODY);
214+
args.put("reproStepsListHeader", InstabugCustomTextPlaceHolder.Key.REPRO_STEPS_LIST_HEADER);
215+
args.put("reproStepsListDescription", InstabugCustomTextPlaceHolder.Key.REPRO_STEPS_LIST_DESCRIPTION);
216+
args.put("reproStepsListEmptyStateDescription", InstabugCustomTextPlaceHolder.Key.REPRO_STEPS_LIST_EMPTY_STATE_DESCRIPTION);
217+
args.put("reproStepsListItemTitle", InstabugCustomTextPlaceHolder.Key.REPRO_STEPS_LIST_ITEM_NUMBERING_TITLE);
210218
}
211219

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

android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule {
198198
private final String ADD_IMAGE_FROM_GALLERY = "addImageFromGallery";
199199
private final String ADD_EXTRA_SCREENSHOT = "addExtraScreenshot";
200200
private final String ADD_VIDEO = "addVideoMessage";
201+
private final String VIDEO_PRESS_RECORD = "videoPressRecord";
201202

202203
private final String AUDIO_RECORDING_PERMISSION_DENIED = "audioRecordingPermissionDenied";
203204

@@ -233,6 +234,13 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule {
233234
private final String REPORT_DISCARD_DIALOG_NEGATIVE_ACTION = "discardAlertCancel";
234235
private final String REPORT_DISCARD_DIALOG_POSITIVE_ACTION = "discardAlertAction";
235236
private final String REPORT_ADD_ATTACHMENT_HEADER = "addAttachmentButtonTitleStringName";
237+
private final String REPORT_REPRO_STEPS_DISCLAIMER_BODY = "reportReproStepsDisclaimerBody";
238+
private final String REPORT_REPRO_STEPS_DISCLAIMER_LINK = "reportReproStepsDisclaimerLink";
239+
private final String REPRO_STEPS_PROGRESS_DIALOG_BODY = "reproStepsProgressDialogBody";
240+
private final String REPRO_STEPS_LIST_HEADER = "reproStepsListHeader";
241+
private final String REPRO_STEPS_LIST_DESCRIPTION = "reproStepsListDescription";
242+
private final String REPRO_STEPS_LIST_EMPTY_STATE_DESCRIPTION = "reproStepsListEmptyStateDescription";
243+
private final String REPRO_STEPS_LIST_ITEM_TITLE = "reproStepsListItemTitle";
236244

237245
private InstabugCustomTextPlaceHolder placeHolders;
238246
private Report currentReport;
@@ -2038,6 +2046,8 @@ private InstabugCustomTextPlaceHolder.Key getStringToKeyConstant(String key) {
20382046
return InstabugCustomTextPlaceHolder.Key.ADD_EXTRA_SCREENSHOT;
20392047
case ADD_VIDEO:
20402048
return InstabugCustomTextPlaceHolder.Key.ADD_VIDEO;
2049+
case VIDEO_PRESS_RECORD:
2050+
return InstabugCustomTextPlaceHolder.Key.VIDEO_RECORDING_FAB_BUBBLE_HINT;
20412051
case AUDIO_RECORDING_PERMISSION_DENIED:
20422052
return InstabugCustomTextPlaceHolder.Key.AUDIO_RECORDING_PERMISSION_DENIED;
20432053
case VOICE_MESSAGE_PRESS_AND_HOLD_TO_RECORD:
@@ -2090,6 +2100,20 @@ private InstabugCustomTextPlaceHolder.Key getStringToKeyConstant(String key) {
20902100
return InstabugCustomTextPlaceHolder.Key.REPORT_DISCARD_DIALOG_POSITIVE_ACTION;
20912101
case REPORT_ADD_ATTACHMENT_HEADER:
20922102
return InstabugCustomTextPlaceHolder.Key.REPORT_ADD_ATTACHMENT_HEADER;
2103+
case REPORT_REPRO_STEPS_DISCLAIMER_BODY:
2104+
return InstabugCustomTextPlaceHolder.Key.REPORT_REPRO_STEPS_DISCLAIMER_BODY;
2105+
case REPORT_REPRO_STEPS_DISCLAIMER_LINK:
2106+
return InstabugCustomTextPlaceHolder.Key.REPORT_REPRO_STEPS_DISCLAIMER_LINK;
2107+
case REPRO_STEPS_PROGRESS_DIALOG_BODY:
2108+
return InstabugCustomTextPlaceHolder.Key.REPRO_STEPS_PROGRESS_DIALOG_BODY;
2109+
case REPRO_STEPS_LIST_HEADER:
2110+
return InstabugCustomTextPlaceHolder.Key.REPRO_STEPS_LIST_HEADER;
2111+
case REPRO_STEPS_LIST_DESCRIPTION:
2112+
return InstabugCustomTextPlaceHolder.Key.REPRO_STEPS_LIST_DESCRIPTION;
2113+
case REPRO_STEPS_LIST_EMPTY_STATE_DESCRIPTION:
2114+
return InstabugCustomTextPlaceHolder.Key.REPRO_STEPS_LIST_EMPTY_STATE_DESCRIPTION;
2115+
case REPRO_STEPS_LIST_ITEM_TITLE:
2116+
return InstabugCustomTextPlaceHolder.Key.REPRO_STEPS_LIST_ITEM_NUMBERING_TITLE;
20932117
default:
20942118
return null;
20952119
}
@@ -2279,6 +2303,7 @@ public Map<String, Object> getConstants() {
22792303
constants.put("addImageFromGallery", ADD_IMAGE_FROM_GALLERY);
22802304
constants.put("addExtraScreenshot", ADD_EXTRA_SCREENSHOT);
22812305
constants.put("addVideoMessage", ADD_VIDEO);
2306+
constants.put("videoPressRecord", VIDEO_PRESS_RECORD);
22822307
constants.put("audioRecordingPermissionDeniedMessage", AUDIO_RECORDING_PERMISSION_DENIED);
22832308
constants.put("recordingMessageToHoldText", VOICE_MESSAGE_PRESS_AND_HOLD_TO_RECORD);
22842309
constants.put("recordingMessageToReleaseText", VOICE_MESSAGE_RELEASE_TO_ATTACH);
@@ -2309,6 +2334,13 @@ public Map<String, Object> getConstants() {
23092334
constants.put(REPORT_DISCARD_DIALOG_NEGATIVE_ACTION, REPORT_DISCARD_DIALOG_NEGATIVE_ACTION);
23102335
constants.put(REPORT_DISCARD_DIALOG_POSITIVE_ACTION, REPORT_DISCARD_DIALOG_POSITIVE_ACTION);
23112336
constants.put(REPORT_ADD_ATTACHMENT_HEADER, REPORT_ADD_ATTACHMENT_HEADER);
2337+
constants.put(REPORT_REPRO_STEPS_DISCLAIMER_BODY, REPORT_REPRO_STEPS_DISCLAIMER_BODY);
2338+
constants.put(REPORT_REPRO_STEPS_DISCLAIMER_LINK, REPORT_REPRO_STEPS_DISCLAIMER_LINK);
2339+
constants.put(REPRO_STEPS_PROGRESS_DIALOG_BODY, REPRO_STEPS_PROGRESS_DIALOG_BODY);
2340+
constants.put(REPRO_STEPS_LIST_HEADER, REPRO_STEPS_LIST_HEADER);
2341+
constants.put(REPRO_STEPS_LIST_DESCRIPTION, REPRO_STEPS_LIST_DESCRIPTION);
2342+
constants.put(REPRO_STEPS_LIST_EMPTY_STATE_DESCRIPTION, REPRO_STEPS_LIST_EMPTY_STATE_DESCRIPTION);
2343+
constants.put(REPRO_STEPS_LIST_ITEM_TITLE, REPRO_STEPS_LIST_ITEM_TITLE);
23122344

23132345
return constants;
23142346
}

index.d.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1070,6 +1070,7 @@ export enum strings {
10701070
commentFieldHintForBugReport,
10711071
commentFieldHintForFeedback,
10721072
commentFieldHintForQuestion,
1073+
videoPressRecord,
10731074
addVideoMessage,
10741075
addVoiceMessage,
10751076
addImageFromGallery,
@@ -1112,7 +1113,14 @@ export enum strings {
11121113
discardAlertMessage,
11131114
discardAlertCancel,
11141115
discardAlertAction,
1115-
addAttachmentButtonTitleStringName
1116+
addAttachmentButtonTitleStringName,
1117+
reportReproStepsDisclaimerBody,
1118+
reportReproStepsDisclaimerLink,
1119+
reproStepsProgressDialogBody,
1120+
reproStepsListHeader,
1121+
reproStepsListDescription,
1122+
reproStepsListEmptyStateDescription,
1123+
reproStepsListItemTitle
11161124
}
11171125

11181126
interface Report {

index.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,7 @@ const InstabugModule = {
764764
commentFieldHintForBugReport: Instabug.commentFieldHintForBugReport,
765765
commentFieldHintForFeedback: Instabug.commentFieldHintForFeedback,
766766
commentFieldHintForQuestion: Instabug.commentFieldHintForQuestion,
767+
videoPressRecord: Instabug.videoPressRecord,
767768
addVideoMessage: Instabug.addVideoMessage,
768769
addVoiceMessage: Instabug.addVoiceMessage,
769770
addImageFromGallery: Instabug.addImageFromGallery,
@@ -817,7 +818,14 @@ const InstabugModule = {
817818
discardAlertMessage: Instabug.discardAlertMessage,
818819
discardAlertCancel: Instabug.discardAlertCancel,
819820
discardAlertAction: Instabug.discardAlertAction,
820-
addAttachmentButtonTitleStringName: Instabug.addAttachmentButtonTitleStringName
821+
addAttachmentButtonTitleStringName: Instabug.addAttachmentButtonTitleStringName,
822+
reportReproStepsDisclaimerBody: Instabug.reportReproStepsDisclaimerBody,
823+
reportReproStepsDisclaimerLink: Instabug.reportReproStepsDisclaimerLink,
824+
reproStepsProgressDialogBody: Instabug.reproStepsProgressDialogBody,
825+
reproStepsListHeader: Instabug.reproStepsListHeader,
826+
reproStepsListDescription: Instabug.reproStepsListDescription,
827+
reproStepsListEmptyStateDescription: Instabug.reproStepsListEmptyStateDescription,
828+
reproStepsListItemTitle: Instabug.reproStepsListItemTitle,
821829
},
822830

823831
};

ios/RNInstabug/InstabugReactBridge.m

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ - (NSDictionary *)constantsToExport
574574
@"screenRecording": kIBGScreenRecordingStringName,
575575
@"image": kIBGImageStringName,
576576
@"surveyEnterYourAnswer": kIBGSurveyEnterYourAnswerTextPlaceholder,
577-
@"videPressRecord": kIBGVideoPressRecordTitle,
577+
@"videoPressRecord": kIBGVideoPressRecordTitle,
578578
@"collectingDataText": kIBGCollectingDataText,
579579
@"thankYouAlertText": kIBGThankYouAlertMessageStringName,
580580

@@ -599,7 +599,14 @@ - (NSDictionary *)constantsToExport
599599
@"discardAlertMessage": kIBGDiscardAlertMessage,
600600
@"discardAlertCancel": kIBGDiscardAlertCancel,
601601
@"discardAlertAction": kIBGDiscardAlertAction,
602-
@"addAttachmentButtonTitleStringName": kIBGAddAttachmentButtonTitleStringName
602+
@"addAttachmentButtonTitleStringName": kIBGAddAttachmentButtonTitleStringName,
603+
@"reportReproStepsDisclaimerBody": kIBGReproStepsDisclaimerBody,
604+
@"reportReproStepsDisclaimerLink": kIBGReproStepsDisclaimerLink,
605+
@"reproStepsProgressDialogBody": kIBGProgressViewTitle,
606+
@"reproStepsListHeader": kIBGReproStepsListTitle,
607+
@"reproStepsListDescription": kIBGReproStepsListHeader,
608+
@"reproStepsListEmptyStateDescription": kIBGReproStepsListEmptyStateLabel,
609+
@"reproStepsListItemTitle": kIBGReproStepsListItemName
603610
};
604611
};
605612

0 commit comments

Comments
 (0)