Skip to content

Commit

Permalink
chore: using ds_localization new names
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianoct42 committed Aug 27, 2024
1 parent 524b8ea commit d6bbb21
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class DSVideoMessageBubbleController {
mediaSize,
precision: PrecisionValue.One,
)
: 'message.download'.translate();
: 'video.download'.translate();
}

Future<void> getStoredVideo() async {
Expand Down Expand Up @@ -115,8 +115,8 @@ class DSVideoMessageBubbleController {

DSToastService.error(
DSToastProps(
title: 'message.download-title-error'.translate(),
message: 'message.download-message-error'.translate(),
title: 'video.download-title-error'.translate(),
message: 'video.download-message-error'.translate(),
),
);
} finally {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/widgets/chat/ds_delivery_report_icon.widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class DSDeliveryReportIcon extends StatelessWidget {

case DSDeliveryReportStatus.failed:
return DSCaptionSmallText(
'message.send-fail'.translate(),
'delivery.send-fail'.translate(),
color: DSColors.actionColorNegative,
);

Expand Down
4 changes: 2 additions & 2 deletions lib/src/widgets/chat/ds_location_message_bubble.widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class _DSLocationMessageBubbleState extends State<DSLocationMessageBubble> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
DSHeadlineLargeText(
'message.select-action'.translate(),
'location.select-action'.translate(),
),
DSIconButton(
onPressed: () {
Expand Down Expand Up @@ -198,7 +198,7 @@ class _DSLocationMessageBubbleState extends State<DSLocationMessageBubble> {
Get.back();
},
title: DSBodyText(
"message.open-with".translate() + " ${map.mapName}",
"location.open-with".translate() + " ${map.mapName}",
),
);
},
Expand Down
4 changes: 2 additions & 2 deletions lib/src/widgets/chat/ds_reply_container.widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class DSReplyContainer extends StatelessWidget {
),
const SizedBox(width: 8.0),
DSCaptionText(
'message.reply'.translate(),
'reply.text'.translate(),
fontStyle: FontStyle.italic,
color: style.isLightBubbleBackground(align)
? DSColors.neutralDarkCity
Expand Down Expand Up @@ -153,7 +153,7 @@ class DSReplyContainer extends StatelessWidget {
const SizedBox(width: 8.0),
Flexible(
child: DSBodyText(
'message.load-fail'.translate(),
'reply.load-fail'.translate(),
overflow: TextOverflow.visible,
color: _foregroundColor,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class DSRequestLocationBubble extends StatelessWidget {
),
if (showRequestLocationButton)
DSRequestLocationButton(
label: 'message.send-location'.translate(),
label: 'location.send'.translate(),
),
],
),
Expand Down
2 changes: 1 addition & 1 deletion lib/src/widgets/chat/ds_show_more_text.widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class DSShowMoreText extends StatelessWidget {
child: GestureDetector(
onTap: () => shouldShowFullText.value = true,
child: DSBodyText(
'message.show-more'.translate(),
'show-more.text'.translate(),
color: isLightBubbleBackground
? isDefaultBubbleColors
? DSColors.primaryNight
Expand Down
14 changes: 7 additions & 7 deletions lib/src/widgets/chat/ds_survey_message_bubble.widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,19 @@ class DSSurveyMessageBubble extends StatelessWidget {
_getTitlePreview() {
switch (type) {
case DSSurveyType.recommendation:
return "message.survey-recommendation".translate();
return "survey.recommendation".translate();
case DSSurveyType.solution:
return 'message.survey-solution'.translate();
return 'survey-solution'.translate();
case DSSurveyType.chatbot:
return 'message.survey-chatbot'.translate();
return 'survey-chatbot'.translate();
}
}

_getDescriptionPreview(bool positiveLabel) => positiveLabel
? type == DSSurveyType.recommendation
? 'message.survey-recommendation-answered-positive'.translate()
: 'message.survey-positive'.translate()
? 'survey-recommendation-answered-positive'.translate()
: 'survey-positive'.translate()
: type == DSSurveyType.recommendation
? "message.survey-recommendation-answered-negative".translate()
: 'message.survey-negative'.translate();
? "survey-recommendation-answered-negative".translate()
: 'survey-negative'.translate();
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class DSUnsupportedContentMessageBubble extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.only(left: 8.0),
child: DSBodyText(
text ?? 'message.unsupported'.translate(),
text ?? 'unsupported-content.text'.translate(),
color: color,
overflow: overflow,
),
Expand Down
4 changes: 2 additions & 2 deletions lib/src/widgets/chat/video/ds_video_error.dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ abstract class DSVideoErrorDialog {
final Map<String, String?>? httpHeaders,
}) async {
await DSDialogService(
title: 'message.error-video-reproduction-title'.translate(),
text: 'message.error-video-reproduction-message'.translate(),
title: 'video-error.reproduction-title'.translate(),
text: 'video-error.reproduction-message'.translate(),
primaryButton: DSPrimaryButton(
onPressed: () async {
Get.back();
Expand Down
2 changes: 1 addition & 1 deletion test/widgets/chat/ds_chat_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void main() {
await tester.pumpWidgetBuilder(messages);

final Finder findMessage = find.text(
'message.send-fail'.translate(),
'delivery.send-fail'.translate(),
findRichText: true,
);

Expand Down

0 comments on commit d6bbb21

Please sign in to comment.