Skip to content

Commit ec60282

Browse files
DavidMina96HeshamMegid
authored andcommitted
[MOB-10637] Add Overridable String Keys (#305)
* Add more string keys * Update CHANGELOG.md
1 parent 119fd55 commit ec60282

File tree

5 files changed

+30
-0
lines changed

5 files changed

+30
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Fixes APM network logging on Android
55
* Fixes a NullPointerException when overriding a string key that doesn't exist on Android
66
* Removes redundant native logs
7+
* Adds new string keys: okButtonText, audio, image, screenRecording, messagesNotificationAndOthers, insufficientContentTitle, insufficientContentMessage
78

89
## 11.5.0 (2022-11-24)
910

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,5 +193,12 @@ public T get(Object key) {
193193
put("CustomTextPlaceHolderKey.repliesNotificationTeamName", Key.CHATS_TEAM_STRING_NAME);
194194
put("CustomTextPlaceHolderKey.repliesNotificationReplyButton", Key.REPLIES_NOTIFICATION_REPLY_BUTTON);
195195
put("CustomTextPlaceHolderKey.repliesNotificationDismissButton", Key.REPLIES_NOTIFICATION_DISMISS_BUTTON);
196+
197+
put("CustomTextPlaceHolderKey.okButtonText", Key.BUG_ATTACHMENT_DIALOG_OK_BUTTON);
198+
put("CustomTextPlaceHolderKey.audio", Key.CHATS_TYPE_AUDIO);
199+
put("CustomTextPlaceHolderKey.image", Key.CHATS_TYPE_IMAGE);
200+
put("CustomTextPlaceHolderKey.screenRecording", Key.CHATS_TYPE_VIDEO);
201+
put("CustomTextPlaceHolderKey.messagesNotificationAndOthers", Key.CHATS_MULTIPLE_MESSAGE_NOTIFICATION);
202+
put("CustomTextPlaceHolderKey.insufficientContentMessage", Key.COMMENT_FIELD_INSUFFICIENT_CONTENT);
196203
}};
197204
}

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,13 @@ public void testPlaceholder() {
281281
Key.CHATS_TEAM_STRING_NAME,
282282
Key.REPLIES_NOTIFICATION_REPLY_BUTTON,
283283
Key.REPLIES_NOTIFICATION_DISMISS_BUTTON,
284+
285+
Key.BUG_ATTACHMENT_DIALOG_OK_BUTTON,
286+
Key.CHATS_TYPE_AUDIO,
287+
Key.CHATS_TYPE_IMAGE,
288+
Key.CHATS_TYPE_VIDEO,
289+
Key.CHATS_MULTIPLE_MESSAGE_NOTIFICATION,
290+
Key.COMMENT_FIELD_INSUFFICIENT_CONTENT,
284291
};
285292

286293
for (Key value : values) {

ios/Classes/Util/ArgsRegistry.m

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,14 @@ + (ArgsDictionary *)locales {
199199
@"CustomTextPlaceHolderKey.reproStepsListDescription" : kIBGReproStepsListHeader,
200200
@"CustomTextPlaceHolderKey.reproStepsListEmptyStateDescription" : kIBGReproStepsListEmptyStateLabel,
201201
@"CustomTextPlaceHolderKey.reproStepsListItemTitle" : kIBGReproStepsListItemName,
202+
203+
@"CustomTextPlaceHolderKey.okButtonText" : kIBGOkButtonTitleStringName,
204+
@"CustomTextPlaceHolderKey.audio" : kIBGAudioStringName,
205+
@"CustomTextPlaceHolderKey.image" : kIBGImageStringName,
206+
@"CustomTextPlaceHolderKey.screenRecording" : kIBGScreenRecordingStringName,
207+
@"CustomTextPlaceHolderKey.messagesNotificationAndOthers" : kIBGMessagesNotificationTitleMultipleMessagesStringName,
208+
@"CustomTextPlaceHolderKey.insufficientContentTitle" : kIBGInsufficientContentTitleStringName,
209+
@"CustomTextPlaceHolderKey.insufficientContentMessage" : kIBGInsufficientContentMessageStringName,
202210
};
203211
}
204212

lib/src/modules/instabug.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,13 @@ enum CustomTextPlaceHolderKey {
111111
reproStepsListDescription,
112112
reproStepsListEmptyStateDescription,
113113
reproStepsListItemTitle,
114+
okButtonText,
115+
audio,
116+
image,
117+
screenRecording,
118+
messagesNotificationAndOthers,
119+
insufficientContentTitle,
120+
insufficientContentMessage,
114121
}
115122

116123
enum ReproStepsMode { enabled, disabled, enabledWithNoScreenshots }

0 commit comments

Comments
 (0)