add remaining translation strings

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2021-07-12 15:01:36 +05:30
committed by xsahil03x
parent ffb46ecdca
commit a48389a814
35 changed files with 1104 additions and 301 deletions
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:stream_chat_flutter/src/upload_progress_indicator.dart';
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
import 'package:stream_chat_flutter/src/extension.dart';
/// Widget to build in progress
typedef InProgressBuilder = Widget Function(BuildContext, int, int);
@@ -226,7 +227,7 @@ class _FailedState extends StatelessWidget {
horizontal: 12,
),
child: Text(
'UPLOAD ERROR',
context.translations.uploadErrorLabel,
style: theme.textTheme.footnote.copyWith(
color: theme.colorTheme.white,
),
@@ -7,9 +7,9 @@ import 'package:stream_chat_flutter/src/upload_progress_indicator.dart';
import 'package:stream_chat_flutter/src/utils.dart';
import 'package:stream_chat_flutter/src/video_thumbnail_image.dart';
import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';
import 'package:stream_chat_flutter/src/extension.dart';
// ignore: always_use_package_imports
import 'attachment_widget.dart';
import 'package:stream_chat_flutter/src/attachment/attachment_widget.dart';
/// Widget for displaying file attachments
class FileAttachment extends AttachmentWidget {
@@ -285,7 +285,10 @@ class FileAttachment extends AttachmentWidget {
progressIndicatorColor: theme.colorTheme.accentBlue,
),
success: () => Text(fileSize(size), style: textStyle),
failed: (_) => Text('UPLOAD ERROR', style: textStyle),
failed: (_) => Text(
context.translations.uploadErrorLabel,
style: textStyle,
),
);
}
}
@@ -4,6 +4,7 @@ import 'package:shimmer/shimmer.dart';
import 'package:stream_chat_flutter/src/attachment/attachment_widget.dart';
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';
import 'package:stream_chat_flutter/src/extension.dart';
/// Widget for showing a GIF attachment
class GiphyAttachment extends AttachmentWidget {
@@ -71,9 +72,9 @@ class GiphyAttachment extends AttachmentWidget {
children: [
StreamSvgIcon.giphyIcon(),
const SizedBox(width: 8),
const Text(
'Giphy',
style: TextStyle(fontWeight: FontWeight.bold),
Text(
context.translations.giphyLabel,
style: const TextStyle(fontWeight: FontWeight.bold),
),
const SizedBox(width: 8),
if (attachment.title != null)
@@ -134,7 +135,7 @@ class GiphyAttachment extends AttachmentWidget {
});
},
child: Text(
'Cancel',
context.translations.cancelLabel.toLowerCase(),
style: StreamChatTheme.of(context)
.textTheme
.bodyBold
@@ -166,7 +167,7 @@ class GiphyAttachment extends AttachmentWidget {
});
},
child: Text(
'Shuffle',
context.translations.shuffleLabel,
style: StreamChatTheme.of(context)
.textTheme
.bodyBold
@@ -199,7 +200,7 @@ class GiphyAttachment extends AttachmentWidget {
});
},
child: Text(
'Send',
context.translations.sendLabel,
style: TextStyle(
color: StreamChatTheme.of(context)
.colorTheme
@@ -234,7 +235,7 @@ class GiphyAttachment extends AttachmentWidget {
width: 8,
),
Text(
'Only visible to you',
context.translations.onlyVisibleToYouText,
style: StreamChatTheme.of(context)
.textTheme
.footnote
@@ -339,7 +340,7 @@ class GiphyAttachment extends AttachmentWidget {
size: 16,
),
Text(
'GIPHY',
context.translations.giphyLabel.toUpperCase(),
style: TextStyle(
color: StreamChatTheme.of(context).colorTheme.white,
fontWeight: FontWeight.bold,