From e14258c3906554b659ad73439f27b9273308ad16 Mon Sep 17 00:00:00 2001 From: Sacha Arbonel Date: Mon, 2 Aug 2021 15:19:12 -0400 Subject: [PATCH 01/15] feat: support for japanese --- .../lib/src/stream_chat_localizations.dart | 5 + .../lib/src/stream_chat_localizations_ja.dart | 360 ++++++++++++++++++ 2 files changed, 365 insertions(+) create mode 100644 packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations.dart index a6a66b93..e65aab1f 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations.dart @@ -11,6 +11,8 @@ part 'stream_chat_localizations_fr.dart'; part 'stream_chat_localizations_it.dart'; +part 'stream_chat_localizations_ja.dart'; + part 'stream_chat_localizations_hi.dart'; /// The set of supported languages, as language code strings. @@ -27,6 +29,7 @@ const kStreamChatSupportedLanguages = { 'fr', 'it', 'es', + 'ja', }; /// Creates a [GlobalStreamChatLocalizations] instance for the given `locale`. @@ -59,6 +62,8 @@ GlobalStreamChatLocalizations? getStreamChatTranslation(Locale locale) { return const StreamChatLocalizationsIt(); case 'es': return const StreamChatLocalizationsEs(); + case 'ja': + return const StreamChatLocalizationsJa(); } } diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart new file mode 100644 index 00000000..96ffec25 --- /dev/null +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart @@ -0,0 +1,360 @@ +part of 'stream_chat_localizations.dart'; + +/// The translations for English (`ja`). +class StreamChatLocalizationsJa extends GlobalStreamChatLocalizations { + /// Create an instance of the translation bundle for Japanese. + const StreamChatLocalizationsJa({String localeName = 'ja'}) + : super(localeName: localeName); + + @override + String get launchUrlError => 'ユーアーレルの起動ができない'; + + @override + String get loadingUsersError => 'ユーザーの読み込みエラー'; + + @override + String get noUsersLabel => '現在、ユーザーはいません。'; + + @override + String get retryLabel => '再試行'; + + @override + String get userLastOnlineText => '前回のオンライン'; + + @override + String get userOnlineText => 'オンライン'; + + @override + String userTypingText(Iterable users) { + if (users.isEmpty) return ''; + final first = users.first; + if (users.length == 1) { + return '${first.name}がタイプしている'; + } + return '${first.name}とあと${users.length - 1}人が入力しています'; + } + + @override + String get threadReplyLabel => 'スレッド返信'; + + @override + String get onlyVisibleToYouText => '自分にしか見えない'; + + @override + String threadReplyCountText(int count) => '$countスレッドの返信'; + + @override + String attachmentsUploadProgressText({ + required int remaining, + required int total, + }) => + '$remaining/${total}mbのアップロード 。。。'; + + @override + String pinnedByUserText({ + required User pinnedBy, + required User currentUser, + }) { + final pinnedByCurrentUser = currentUser.id == pinnedBy.id; + if (pinnedByCurrentUser) return 'あなたのピン留'; + return '${pinnedBy.name}のピン留'; + } + + @override + String get emptyMessagesText => '現在、メッセージはありません。'; + + @override + String get genericErrorText => '何かが間違っていた'; + + @override + String get loadingMessagesError => 'メッセージの読み込みエラー'; + + @override + String resultCountText(int count) => '$countつの結果'; + + @override + String get messageDeletedText => 'このメッセージは削除されました。'; + + @override + String get messageDeletedLabel => 'メッセージ削除'; + + @override + String get messageReactionsLabel => 'メッセージに対する反応'; + + @override + String get emptyChatMessagesText => 'ここではまだ会話はありませんが。。。'; + + @override + String threadSeparatorText(int replyCount) { + if (replyCount == 1) return '1 回答'; + return '$replyCount件の返信'; + } + + @override + String get connectedLabel => 'コネクテッド'; + + @override + String get disconnectedLabel => '接続切れ'; + + @override + String get reconnectingLabel => 'リコネクティング。。。'; + + @override + String get alsoSendAsDirectMessageLabel => 'ダイレクトメッセージでも送信可能'; + + @override + String get addACommentOrSendLabel => 'コメントの追加や送信'; + + @override + String get searchGifLabel => '検索用GIF'; + + @override + String get writeAMessageLabel => 'メッセージを書く'; + + @override + String get instantCommandsLabel => 'インスタントコマンド'; + + @override + String fileTooLargeAfterCompressionError(double limitInMB) => + 'ファイルのサイズが大きすぎてアップロードできません。' + 'ファイルサイズの制限は${limitInMB}MBです。' + '圧縮してみましたが、十分ではありませんでした。'; + + @override + String fileTooLargeError(double limitInMB) => + 'ファイルが大きすぎてアップロードできません。ファイルサイズの制限は${limitInMB}MBです。'; + + @override + String emojiMatchingQueryText(String query) => '「"$query"」とお揃いの絵文字'; + + @override + String get addAFileLabel => 'ファイルの追加'; + + @override + String get photoFromCameraLabel => 'カメラからの写真'; + + @override + String get uploadAFileLabel => 'ファイルのアップロード'; + + @override + String get uploadAPhotoLabel => '写真のアップロード'; + + @override + String get uploadAVideoLabel => '動画のアップロード'; + + @override + String get videoFromCameraLabel => 'カメラからの動画'; + + @override + String get okLabel => 'よし'; + + @override + String get somethingWentWrongError => '何かが間違っていたのだ。'; + + @override + String get addMoreFilesLabel => 'ファイルの追加'; + + @override + String get enablePhotoAndVideoAccessMessage => 'お友達と共有できるように、写真' + '\nやビデオへのアクセスを有効にしてください。'; + @override + String get allowGalleryAccessMessage => 'お客様のギャラリーへのアクセスを許可する'; + + @override + String get flagMessageLabel => 'メッセージフラグが'; + + @override + String get flagMessageQuestion => 'このメッセージのコピーを' + '\nモデレーターに送って、さらに調査してもらいますか?'; + + @override + String get flagLabel => 'フラグが'; + + @override + String get cancelLabel => 'キャンセル'; + + @override + String get flagMessageSuccessfulLabel => 'フラグ付メッセージ'; + + @override + String get flagMessageSuccessfulText => + 'このメッセージはモデレーターに報告されました。'; + + @override + String get deleteLabel => '消す'; + + @override + String get deleteMessageLabel => 'メッセージを削除する '; + + @override + String get deleteMessageQuestion => + 'このメッセージ' + '\nを完全に削除してもよろしいですか?'; + + @override + String get operationCouldNotBeCompletedText => + '操作を完了できませんでした。'; + + @override + String get replyLabel => '返信'; + + @override + String togglePinUnpinText({required bool pinned}) { + if (pinned) return 'カンバセーションからピンを外す '; + return '会話へのピン'; + } + + @override + String toggleDeleteRetryDeleteMessageText({required bool isDeleteFailed}) { + if (isDeleteFailed) return 'メッセージの削除を再試行してください'; + return 'メッセージを削除する'; + } + + @override + String get copyMessageLabel => 'コピーメッセージ'; + + @override + String get editMessageLabel => 'メッセージの編集'; + + @override + String toggleResendOrResendEditedMessage({required bool isUpdateFailed}) { + if (isUpdateFailed) return '編集したメッセージの再送'; + return '再送'; + } + + @override + String get photosLabel => '写真'; + + String _getDay(DateTime dateTime) { + final now = DateTime.now(); + final today = DateTime(now.year, now.month, now.day); + final yesterday = DateTime(now.year, now.month, now.day - 1); + + final date = DateTime(dateTime.year, dateTime.month, dateTime.day); + + if (date == today) { + return '今日'; + } else if (date == yesterday) { + return '昨日'; + } else { + return '${Jiffy(date).MMMd}に'; + } + } + + @override + String sentAtText({required DateTime date, required DateTime time}) => + '${_getDay(date)} at ${Jiffy(time.toLocal()).format('HH:mm')}に送信 '; + + @override + String get todayLabel => '今日'; + + @override + String get yesterdayLabel => '昨日'; + + @override + String get channelIsMutedText => 'チャンネルがミュートされています'; + + @override + String get noTitleText => 'タイトル無し'; + + @override + String get letsStartChattingLabel => 'さあ、チャットを始めよう'; + + @override + String get sendingFirstMessageLabel => + 'どのように友人にあなたの最初のメッセージを送ることについてはどうですか?'; + + @override + String get startAChatLabel => 'チャットを開始する'; + + @override + String get loadingChannelsError => 'チャネルのロード中にエラーが発生しました'; + + @override + String get deleteConversationLabel => '会話を削除する'; + + @override + String get deleteConversationQuestion => + 'この会話を削除してもよろしいですか?'; + + @override + String get streamChatLabel => 'ストリームチャット'; + + @override + String get searchingForNetworkText => 'ネットワークの検索'; + + @override + String get offlineLabel => 'オフライン。。。'; + + @override + String get tryAgainLabel => '再試行する'; + + @override + String membersCountText(int count) { + if (count == 1) return '1人のメンバー'; + return '$count人のメンバー'; + } + + @override + String watchersCountText(int count) { + if (count == 1) return '1オンライン'; + return '$countオンライン'; + } + + @override + String get viewInfoLabel => '情報を見る'; + + @override + String get leaveGroupLabel => 'グループを離れる'; + + @override + String get leaveLabel => '離れる'; + + @override + String get leaveConversationLabel => '会話を離れる'; + + @override + String get leaveConversationQuestion => + 'この会話を離れてもよろしいですか?'; + + @override + String get showInChatLabel => 'チャットで表示'; + + @override + String get saveImageLabel => '画像を保存'; + + @override + String get saveVideoLabel => 'ビデオを保存'; + + @override + String get uploadErrorLabel => 'アップロードエラー'; + + @override + String get giphyLabel => 'ギフィー'; + + @override + String get shuffleLabel => 'ミックス'; + + @override + String get sendLabel => '送信'; + + @override + String get withText => 'と'; + + @override + String get inText => 'は'; + + @override + String get youText => '君'; + + @override + String get ofText => 'の';//TODO: break + // galleryPaginationText( + // {required int currentPage, required int totalPages}) + + @override + String get fileText => 'ファイル'; + + @override + String get replyToMessageLabel => 'メッセージに返信'; +} From e44a4ce3a1dc88ba89137f4c3baa3fcaabb4d794 Mon Sep 17 00:00:00 2001 From: Sacha Arbonel Date: Mon, 2 Aug 2021 15:19:55 -0400 Subject: [PATCH 02/15] update fr translation: discussion->conversation --- .../lib/src/stream_chat_localizations_fr.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_fr.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_fr.dart index 9d8586d5..373558b9 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_fr.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_fr.dart @@ -207,7 +207,7 @@ class StreamChatLocalizationsFr extends GlobalStreamChatLocalizations { @override String togglePinUnpinText({required bool pinned}) { if (pinned) return 'Décrocher de la conversation'; - return 'Épingler à la discussion'; + return 'Épingler à la conversation'; } @override @@ -354,7 +354,7 @@ class StreamChatLocalizationsFr extends GlobalStreamChatLocalizations { String get youText => 'Vous'; @override - String get ofText => 'de'; + String galleryPaginationText({required int currentPage, required int totalPages}) => '${currentPage+1} de $totalPages'; @override String get fileText => 'Fichier'; From 59b4f5568c77ccae4b56d919216bd82058050ffb Mon Sep 17 00:00:00 2001 From: Sacha Arbonel Date: Mon, 2 Aug 2021 15:30:58 -0400 Subject: [PATCH 03/15] breaking change: ofText->galleryPaginationText --- .../lib/src/gallery_footer.dart | 6 ++--- .../lib/src/localization/translations.dart | 9 ++++--- .../test/src/default_translations_test.dart | 2 +- .../example/lib/add_new_lang.dart | 4 +++- .../lib/src/stream_chat_localizations_en.dart | 4 +++- .../lib/src/stream_chat_localizations_es.dart | 7 ++++-- .../lib/src/stream_chat_localizations_fr.dart | 4 +++- .../lib/src/stream_chat_localizations_hi.dart | 8 ++++--- .../lib/src/stream_chat_localizations_it.dart | 4 +++- .../lib/src/stream_chat_localizations_ja.dart | 24 +++++++------------ .../test/translations_test.dart | 2 +- 11 files changed, 42 insertions(+), 32 deletions(-) diff --git a/packages/stream_chat_flutter/lib/src/gallery_footer.dart b/packages/stream_chat_flutter/lib/src/gallery_footer.dart index 03d575ae..6df301d3 100644 --- a/packages/stream_chat_flutter/lib/src/gallery_footer.dart +++ b/packages/stream_chat_flutter/lib/src/gallery_footer.dart @@ -136,9 +136,9 @@ class _GalleryFooterState extends State { mainAxisSize: MainAxisSize.min, children: [ Text( - '${widget.currentPage + 1} ' - '${context.translations.ofText} ' - '${widget.totalPages}', + context.translations.galleryPaginationText( + currentPage: widget.currentPage, + totalPages: widget.totalPages), style: galleryFooterThemeData.titleTextStyle, ), ], diff --git a/packages/stream_chat_flutter/lib/src/localization/translations.dart b/packages/stream_chat_flutter/lib/src/localization/translations.dart index d6e5add0..d3b3e8cb 100644 --- a/packages/stream_chat_flutter/lib/src/localization/translations.dart +++ b/packages/stream_chat_flutter/lib/src/localization/translations.dart @@ -296,8 +296,9 @@ abstract class Translations { /// The text shown for "You" String get youText; - /// The text shown for "Of" - String get ofText; + /// Gallery footer pagination text + String galleryPaginationText( + {required int currentPage, required int totalPages}); /// The text shown for "File" String get fileText; @@ -657,7 +658,9 @@ class DefaultTranslations implements Translations { String get youText => 'You'; @override - String get ofText => 'of'; + String galleryPaginationText( + {required int currentPage, required int totalPages}) => + '${currentPage + 1} of $totalPages'; @override String get fileText => 'File'; diff --git a/packages/stream_chat_flutter/test/src/default_translations_test.dart b/packages/stream_chat_flutter/test/src/default_translations_test.dart index e78c0115..14a4a318 100644 --- a/packages/stream_chat_flutter/test/src/default_translations_test.dart +++ b/packages/stream_chat_flutter/test/src/default_translations_test.dart @@ -167,7 +167,7 @@ void main() { expect(translations.withText, isNotNull); expect(translations.inText, isNotNull); expect(translations.youText, isNotNull); - expect(translations.ofText, isNotNull); + expect(translations.galleryPaginationText, isNotNull); expect(translations.fileText, isNotNull); expect(translations.replyToMessageLabel, isNotNull); }); diff --git a/packages/stream_chat_localizations/example/lib/add_new_lang.dart b/packages/stream_chat_localizations/example/lib/add_new_lang.dart index 1412f4e0..2f373691 100644 --- a/packages/stream_chat_localizations/example/lib/add_new_lang.dart +++ b/packages/stream_chat_localizations/example/lib/add_new_lang.dart @@ -374,7 +374,9 @@ class NnStreamChatLocalizations extends GlobalStreamChatLocalizations { String get youText => 'You'; @override - String get ofText => 'of'; + String galleryPaginationText( + {required int currentPage, required int totalPages}) => + '$currentPage of $totalPages'; @override String get fileText => 'File'; diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_en.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_en.dart index 5041d398..13de9729 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_en.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_en.dart @@ -350,7 +350,9 @@ class StreamChatLocalizationsEn extends GlobalStreamChatLocalizations { String get youText => 'You'; @override - String get ofText => 'of'; + String galleryPaginationText( + {required int currentPage, required int totalPages}) => + '${currentPage + 1} of $totalPages'; @override String get fileText => 'File'; diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_es.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_es.dart index 75bed1e3..f6cd5e7c 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_es.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_es.dart @@ -68,7 +68,8 @@ class StreamChatLocalizationsEs extends GlobalStreamChatLocalizations { String get genericErrorText => 'Hubo un problema'; @override - String get loadingMessagesError => 'Hubo un error mientras se cargaba el mensaje'; + String get loadingMessagesError => + 'Hubo un error mientras se cargaba el mensaje'; @override String resultCountText(int count) => '$count resultados'; @@ -354,7 +355,9 @@ class StreamChatLocalizationsEs extends GlobalStreamChatLocalizations { String get youText => 'Usted'; @override - String get ofText => 'de'; + String galleryPaginationText( + {required int currentPage, required int totalPages}) => + '${currentPage + 1} de $totalPages'; @override String get fileText => 'Archivo'; diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_fr.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_fr.dart index 373558b9..2331b522 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_fr.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_fr.dart @@ -354,7 +354,9 @@ class StreamChatLocalizationsFr extends GlobalStreamChatLocalizations { String get youText => 'Vous'; @override - String galleryPaginationText({required int currentPage, required int totalPages}) => '${currentPage+1} de $totalPages'; + String galleryPaginationText( + {required int currentPage, required int totalPages}) => + '${currentPage + 1} de $totalPages'; @override String get fileText => 'Fichier'; diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_hi.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_hi.dart index 850e481b..11d7d486 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_hi.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_hi.dart @@ -340,16 +340,18 @@ class StreamChatLocalizationsHi extends GlobalStreamChatLocalizations { String get sendLabel => 'भेजें'; @override - String get withText => 'विद'; + String get withText => 'विद';//TODO: break? @override - String get inText => 'इन'; + String get inText => 'इन';//TODO: break? @override String get youText => 'आप'; @override - String get ofText => 'ऑफ़'; + String galleryPaginationText( + {required int currentPage, required int totalPages}) => + '${currentPage + 1} ऑफ़ $totalPages'; @override String get fileText => 'फ़ाइल'; diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_it.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_it.dart index 8b2e1692..313e1e26 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_it.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_it.dart @@ -351,7 +351,9 @@ Il file è troppo grande per essere caricato. Il limite è di $limitInMB MB.'''; String get youText => 'te'; @override - String get ofText => 'di'; + String galleryPaginationText( + {required int currentPage, required int totalPages}) => + '${currentPage + 1} di $totalPages'; @override String get fileText => 'file'; diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart index 96ffec25..6522fbf7 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart @@ -177,8 +177,7 @@ class StreamChatLocalizationsJa extends GlobalStreamChatLocalizations { String get flagMessageSuccessfulLabel => 'フラグ付メッセージ'; @override - String get flagMessageSuccessfulText => - 'このメッセージはモデレーターに報告されました。'; + String get flagMessageSuccessfulText => 'このメッセージはモデレーターに報告されました。'; @override String get deleteLabel => '消す'; @@ -187,13 +186,11 @@ class StreamChatLocalizationsJa extends GlobalStreamChatLocalizations { String get deleteMessageLabel => 'メッセージを削除する '; @override - String get deleteMessageQuestion => - 'このメッセージ' + String get deleteMessageQuestion => 'このメッセージ' '\nを完全に削除してもよろしいですか?'; @override - String get operationCouldNotBeCompletedText => - '操作を完了できませんでした。'; + String get operationCouldNotBeCompletedText => '操作を完了できませんでした。'; @override String get replyLabel => '返信'; @@ -261,8 +258,7 @@ class StreamChatLocalizationsJa extends GlobalStreamChatLocalizations { String get letsStartChattingLabel => 'さあ、チャットを始めよう'; @override - String get sendingFirstMessageLabel => - 'どのように友人にあなたの最初のメッセージを送ることについてはどうですか?'; + String get sendingFirstMessageLabel => 'どのように友人にあなたの最初のメッセージを送ることについてはどうですか?'; @override String get startAChatLabel => 'チャットを開始する'; @@ -274,8 +270,7 @@ class StreamChatLocalizationsJa extends GlobalStreamChatLocalizations { String get deleteConversationLabel => '会話を削除する'; @override - String get deleteConversationQuestion => - 'この会話を削除してもよろしいですか?'; + String get deleteConversationQuestion => 'この会話を削除してもよろしいですか?'; @override String get streamChatLabel => 'ストリームチャット'; @@ -314,8 +309,7 @@ class StreamChatLocalizationsJa extends GlobalStreamChatLocalizations { String get leaveConversationLabel => '会話を離れる'; @override - String get leaveConversationQuestion => - 'この会話を離れてもよろしいですか?'; + String get leaveConversationQuestion => 'この会話を離れてもよろしいですか?'; @override String get showInChatLabel => 'チャットで表示'; @@ -348,9 +342,9 @@ class StreamChatLocalizationsJa extends GlobalStreamChatLocalizations { String get youText => '君'; @override - String get ofText => 'の';//TODO: break - // galleryPaginationText( - // {required int currentPage, required int totalPages}) + String galleryPaginationText( + {required int currentPage, required int totalPages}) => + '$totalPagesの${currentPage + 1}'; @override String get fileText => 'ファイル'; diff --git a/packages/stream_chat_localizations/test/translations_test.dart b/packages/stream_chat_localizations/test/translations_test.dart index 0e621159..c7314a58 100644 --- a/packages/stream_chat_localizations/test/translations_test.dart +++ b/packages/stream_chat_localizations/test/translations_test.dart @@ -174,7 +174,7 @@ void main() { expect(localizations.withText, isNotNull); expect(localizations.inText, isNotNull); expect(localizations.youText, isNotNull); - expect(localizations.ofText, isNotNull); + expect(localizations.galleryPaginationText, isNotNull); expect(localizations.fileText, isNotNull); expect(localizations.replyToMessageLabel, isNotNull); }); From 8ca7dab6da9d6f235f95dd476874b076c5baf988 Mon Sep 17 00:00:00 2001 From: Sacha Arbonel Date: Mon, 2 Aug 2021 15:36:43 -0400 Subject: [PATCH 04/15] update docs --- docusaurus/docs/Flutter/guides/adding_localization.mdx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docusaurus/docs/Flutter/guides/adding_localization.mdx b/docusaurus/docs/Flutter/guides/adding_localization.mdx index 9eb4dd68..3a81187a 100644 --- a/docusaurus/docs/Flutter/guides/adding_localization.mdx +++ b/docusaurus/docs/Flutter/guides/adding_localization.mdx @@ -26,7 +26,7 @@ At the moment we support the following languages: - [Italian](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_it.dart) - [French](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_fr.dart) - [Spanish](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_es.dart) - +- [Japanese](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart) More languages will be added in the future. Feel free to [contribute](https://github.com/GetStream/stream-chat-flutter/blob/master/CONTRIBUTING.md) to add more languages. ### Add dependency @@ -64,6 +64,7 @@ class MyApp extends StatelessWidget { Locale('fr'), Locale('it'), Locale('es'), + Locale('ja'), ], // Add GlobalStreamChatLocalizations.delegates localizationsDelegates: GlobalStreamChatLocalizations.delegates, @@ -133,6 +134,7 @@ Here is an example of how that would look like: Locale('fr'), Locale('it'), Locale('es'), + Locale('ja'), ], // locales are the locales of the device // supportedLocales are the app supported locales @@ -176,5 +178,6 @@ Example: fr it es + ja ``` From 95e3467ac49a19aea1e9cc3f8cf6af48e59f38cd Mon Sep 17 00:00:00 2001 From: Sacha Arbonel Date: Mon, 2 Aug 2021 16:50:57 -0400 Subject: [PATCH 05/15] support for korean --- .../lib/src/stream_chat_localizations.dart | 5 + .../lib/src/stream_chat_localizations_ko.dart | 360 ++++++++++++++++++ 2 files changed, 365 insertions(+) create mode 100644 packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations.dart index e65aab1f..4094dcaa 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations.dart @@ -13,6 +13,8 @@ part 'stream_chat_localizations_it.dart'; part 'stream_chat_localizations_ja.dart'; +part 'stream_chat_localizations_ko.dart'; + part 'stream_chat_localizations_hi.dart'; /// The set of supported languages, as language code strings. @@ -30,6 +32,7 @@ const kStreamChatSupportedLanguages = { 'it', 'es', 'ja', + 'ko' }; /// Creates a [GlobalStreamChatLocalizations] instance for the given `locale`. @@ -64,6 +67,8 @@ GlobalStreamChatLocalizations? getStreamChatTranslation(Locale locale) { return const StreamChatLocalizationsEs(); case 'ja': return const StreamChatLocalizationsJa(); + case 'ko': + return const StreamChatLocalizationsKo(); } } diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart new file mode 100644 index 00000000..6fe285b7 --- /dev/null +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart @@ -0,0 +1,360 @@ +part of 'stream_chat_localizations.dart'; + +/// The translations for Korean (`ko`). +class StreamChatLocalizationsKo extends GlobalStreamChatLocalizations { + /// Create an instance of the translation bundle for Korean. + const StreamChatLocalizationsKo({String localeName = 'ko'}) + : super(localeName: localeName); + + @override + String get launchUrlError => 'URL을 시작할 수 없습니다.'; + + @override + String get loadingUsersError => '사용자를 로드하는 중 오류 발생'; + + @override + String get noUsersLabel => '현재 사용자가 없습니다.'; + + @override + String get retryLabel => '다시 시도하십시오.'; + + @override + String get userLastOnlineText => '마지막 온라인입니다.'; + + @override + String get userOnlineText => '온라인.'; + + @override + String userTypingText(Iterable users) { + if (users.isEmpty) return ''; + final first = users.first; + if (users.length == 1) { + return '${first.name} 타이핑하고 있어요.'; + } + return '${first.name}스와 ${users.length - 1}명이 타자를 치고 있습니다'; + } + + @override + String get threadReplyLabel => '스레드 응답입니다.'; + + @override + String get onlyVisibleToYouText => '당신만 볼 수 있습니다.'; + + @override + String threadReplyCountText(int count) => '$count스레드 응답입니다.'; + + @override + String attachmentsUploadProgressText({ + required int remaining, + required int total, + }) => + '${total}mb 중 ${remaining}mb를 업로드하는 중입니다...'; + + @override + String pinnedByUserText({ + required User pinnedBy, + required User currentUser, + }) { + final pinnedByCurrentUser = currentUser.id == pinnedBy.id; + if (pinnedByCurrentUser) return '당신에 의해 고정됩니다.'; + return '${pinnedBy.name} 핀으로 고정했습니다.'; + } + + @override + String get emptyMessagesText => '현재 메시지가 없습니다.'; + + @override + String get genericErrorText => '뭔가 잘못됐어요'; + + @override + String get loadingMessagesError => '메시지를 로드하는 동안 오류가 발생했습니다.'; + + @override + String resultCountText(int count) => '$count개 결과입니다.'; + + @override + String get messageDeletedText => '이 메시지는 삭제되었습니다.'; + + @override + String get messageDeletedLabel => '메시지가 삭제되었습니다.'; + + @override + String get messageReactionsLabel => '메시지에 대한 응답.'; + + @override + String get emptyChatMessagesText => '아직 채팅이 없습니다...'; + + @override + String threadSeparatorText(int replyCount) { + if (replyCount == 1) return '1 회신합니다.'; + return '$replyCount개의 응답입니다.'; + } + + @override + String get connectedLabel => '연결된'; + + @override + String get disconnectedLabel => '연결이 끊겼습니다.'; + + @override + String get reconnectingLabel => '다시 연결하는 중...'; + + @override + String get alsoSendAsDirectMessageLabel => '다이렉트 메시지로도 보냅니다.'; + + @override + String get addACommentOrSendLabel => '주석을 추가하거나 보냅니다.'; + + @override + String get searchGifLabel => 'GIF를 검색합니다.'; + + @override + String get writeAMessageLabel => '메시지를 쓰세요.'; + + @override + String get instantCommandsLabel => '인스턴트 커맨즈'; + + @override + String fileTooLargeAfterCompressionError(double limitInMB) => + '파일이 너무 커서 업로드할 수 없습니다. ' + '파일 크기 제한은 ${limitInMB}MB입니다. ' + '우리는 압축해 보았지만 충분하지 않았습니다.'; + + @override + String fileTooLargeError(double limitInMB) => + '파일이 너무 커서 업로드할 수 없습니다. 파일 크기 제한은 ${limitInMB}MB입니다.'; + + @override + String emojiMatchingQueryText(String query) => '"$query"과 일치하는 이모티콘입니다.'; + + @override + String get addAFileLabel => '파일을 추가합니다.'; + + @override + String get photoFromCameraLabel => '카메라에서 찍은 사진입니다.'; + + @override + String get uploadAFileLabel => '파일을 업로드합니다.'; + + @override + String get uploadAPhotoLabel => '사진을 업로드합니다.'; + + @override + String get uploadAVideoLabel => '비디오를 업로드하세요'; + + @override + String get videoFromCameraLabel => '카메라의 비디오입니다.'; + + @override + String get okLabel => '알았지'; + + @override + String get somethingWentWrongError => '뭔가 잘못됐어요'; + + @override + String get addMoreFilesLabel => '파일을 추가합니다.'; + + @override + String get enablePhotoAndVideoAccessMessage => '친구와 공유할 수 있도록 사진과' + '\n동영상에 액세스할 수 있도록 설정하십시오.'; + + @override + String get allowGalleryAccessMessage => '갤러리에 대한 액세스를 허용합니다.'; + + @override + String get flagMessageLabel => '플래그 메시지'; + + @override + String get flagMessageQuestion => '추가 조사를 위해 진행자에게 이 메시지의 복사본을 전송하시겠습니까?'; + + @override + String get flagLabel => '플래그를 지정합니다.'; + + @override + String get cancelLabel => '취소하십시오.'; + + @override + String get flagMessageSuccessfulLabel => '메시지에 플래그가 지정되었습니다.'; + + @override + String get flagMessageSuccessfulText => + '메시지가 진행자에게 보고되었습니다.'; + + @override + String get deleteLabel => '삭제합니다.'; + + @override + String get deleteMessageLabel => '메시지를 삭제합니다.'; + + @override + String get deleteMessageQuestion => + '이 메시지를 완전히 삭제하시겠습니까?'; + + @override + String get operationCouldNotBeCompletedText => + '작업을 완료할 수 없습니다.'; + + @override + String get replyLabel => '답글'; + + @override + String togglePinUnpinText({required bool pinned}) { + if (pinned) return '대화에서 연결을 해제합니다.'; + return '대화에 고정합니다.'; + } + + @override + String toggleDeleteRetryDeleteMessageText({required bool isDeleteFailed}) { + if (isDeleteFailed) return '메시지 삭제를 다시 시도하십시오.'; + return '메시지를 삭제합니다.'; + } + + @override + String get copyMessageLabel => '메시지를 복사합니다.'; + + @override + String get editMessageLabel => '메시지를 편집합니다.'; + + @override + String toggleResendOrResendEditedMessage({required bool isUpdateFailed}) { + if (isUpdateFailed) return '편집된 메시지를 다시 보냅니다.'; + return '다시 보냅니다.'; + } + + @override + String get photosLabel => '사진들'; + + String _getDay(DateTime dateTime) { + final now = DateTime.now(); + final today = DateTime(now.year, now.month, now.day); + final yesterday = DateTime(now.year, now.month, now.day - 1); + + final date = DateTime(dateTime.year, dateTime.month, dateTime.day); + + if (date == today) { + return '오늘이요'; + } else if (date == yesterday) { + return '어제요'; + } else { + return '${Jiffy(date).MMMd}입니다.'; + } + } + + @override + String sentAtText({required DateTime date, required DateTime time}) => + '${_getDay(date)} 오전 ${Jiffy(time.toLocal()).format('HH:mm')}에 보냈습니다'; + + @override + String get todayLabel => '오늘이요'; + + @override + String get yesterdayLabel => '어제요'; + + @override + String get channelIsMutedText => '채널이 음소거됩니다.'; + + @override + String get noTitleText => '제목이 없습니다.'; + + @override + String get letsStartChattingLabel => '채팅 시작해요!'; + + @override + String get sendingFirstMessageLabel => + '친구에게 당신의 첫 번째 메시지를 보내는 것은 어떤가요?'; + + @override + String get startAChatLabel => '대화를 시작합니다.'; + + @override + String get loadingChannelsError => '채널을 로드하는 동안 오류가 발생했습니다.'; + + @override + String get deleteConversationLabel => '대화를 삭제합니다.'; + + @override + String get deleteConversationQuestion => + '이 대화를 삭제하시겠습니까?'; + + @override + String get streamChatLabel => '채팅을 스트리밍합니다.'; + + @override + String get searchingForNetworkText => '네트워크를 검색하는 중입니다.'; + + @override + String get offlineLabel => '오프라인...'; + + @override + String get tryAgainLabel => '다시 한 번 해 봐!'; + + @override + String membersCountText(int count) { + if (count == 1) return '회원 1명입니다.'; + return '$count 구성원'; + } + + @override + String watchersCountText(int count) { + if (count == 1) return '1 온라인입니다.'; + return '$count 온라인입니다'; + } + + @override + String get viewInfoLabel => '정보를 봅니다.'; + + @override + String get leaveGroupLabel => '그룹을 떠납니다.'; + + @override + String get leaveLabel => '떠나요'; + + @override + String get leaveConversationLabel => '대화에서 떠납니다.'; + + @override + String get leaveConversationQuestion => + '정말 이 대화에서 나가시겠습니까?'; + + @override + String get showInChatLabel => '채팅에 표시합니다.'; + + @override + String get saveImageLabel => '이미지를 저장합니다.'; + + @override + String get saveVideoLabel => '비디오를 저장합니다.'; + + @override + String get uploadErrorLabel => '업로드 오류입니다.'; + + @override + String get giphyLabel => '지피요'; + + @override + String get shuffleLabel => '섞으세요'; + + @override + String get sendLabel => '보냅니다'; + + @override + String get withText => '함께요'; + + @override + String get inText => '에 있습니다.'; + + @override + String get youText => '너'; + + @override + String galleryPaginationText( + {required int currentPage, required int totalPages}) => + '$totalPages장 ${currentPage + 1}장입니다'; + //11장 3장. + + @override + String get fileText => '파일'; + + @override + String get replyToMessageLabel => '메시지에 회신합니다.'; +} From bd8e4675c66595c0187ae2cf763166fbaf115588 Mon Sep 17 00:00:00 2001 From: Sacha Arbonel Date: Wed, 4 Aug 2021 09:06:56 -0400 Subject: [PATCH 06/15] update korean based on Eric's review --- .../lib/src/stream_chat_localizations_ko.dart | 158 +++++++++--------- 1 file changed, 75 insertions(+), 83 deletions(-) diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart index 6fe285b7..689544c7 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart @@ -7,48 +7,48 @@ class StreamChatLocalizationsKo extends GlobalStreamChatLocalizations { : super(localeName: localeName); @override - String get launchUrlError => 'URL을 시작할 수 없습니다.'; + String get launchUrlError => 'URL을 시작할 수 없습니다'; @override String get loadingUsersError => '사용자를 로드하는 중 오류 발생'; @override - String get noUsersLabel => '현재 사용자가 없습니다.'; + String get noUsersLabel => '현재 사용자가 없습니다'; @override - String get retryLabel => '다시 시도하십시오.'; + String get retryLabel => '다시 시도하십시오'; @override - String get userLastOnlineText => '마지막 온라인입니다.'; + String get userLastOnlineText => '마지막 온라인입니다'; @override - String get userOnlineText => '온라인.'; + String get userOnlineText => '온라인'; @override String userTypingText(Iterable users) { if (users.isEmpty) return ''; final first = users.first; if (users.length == 1) { - return '${first.name} 타이핑하고 있어요.'; + return '${first.name} 타이핑중'; } - return '${first.name}스와 ${users.length - 1}명이 타자를 치고 있습니다'; + return '${first.name}하고 ${users.length - 1}명 타이핑중'; } @override - String get threadReplyLabel => '스레드 응답입니다.'; + String get threadReplyLabel => '스레드 응답입니다'; @override - String get onlyVisibleToYouText => '당신만 볼 수 있습니다.'; + String get onlyVisibleToYouText => '당신만 볼 수 있습니다'; @override - String threadReplyCountText(int count) => '$count스레드 응답입니다.'; + String threadReplyCountText(int count) => '$count스레드 답장'; @override String attachmentsUploadProgressText({ required int remaining, required int total, }) => - '${total}mb 중 ${remaining}mb를 업로드하는 중입니다...'; + '$remaining/${total}mb를 업로드중...'; @override String pinnedByUserText({ @@ -56,60 +56,59 @@ class StreamChatLocalizationsKo extends GlobalStreamChatLocalizations { required User currentUser, }) { final pinnedByCurrentUser = currentUser.id == pinnedBy.id; - if (pinnedByCurrentUser) return '당신에 의해 고정됩니다.'; - return '${pinnedBy.name} 핀으로 고정했습니다.'; + if (pinnedByCurrentUser) return '당신의 핀'; + return '${pinnedBy.name}의 핀'; } @override - String get emptyMessagesText => '현재 메시지가 없습니다.'; + String get emptyMessagesText => '현재 메시지가 없습니다'; @override - String get genericErrorText => '뭔가 잘못됐어요'; + String get genericErrorText => '뭔가 잘못됐습니다'; @override - String get loadingMessagesError => '메시지를 로드하는 동안 오류가 발생했습니다.'; + String get loadingMessagesError => '메시지를 로드하는 동안 오류가 발생했습니다'; @override - String resultCountText(int count) => '$count개 결과입니다.'; + String resultCountText(int count) => '$count개의 결과'; @override String get messageDeletedText => '이 메시지는 삭제되었습니다.'; @override - String get messageDeletedLabel => '메시지가 삭제되었습니다.'; + String get messageDeletedLabel => '메시지가 삭제되었습니다'; @override - String get messageReactionsLabel => '메시지에 대한 응답.'; + String get messageReactionsLabel => '메시지에 대한 응답'; @override String get emptyChatMessagesText => '아직 채팅이 없습니다...'; @override String threadSeparatorText(int replyCount) { - if (replyCount == 1) return '1 회신합니다.'; - return '$replyCount개의 응답입니다.'; + return '$replyCount개의 답장'; } @override - String get connectedLabel => '연결된'; + String get connectedLabel => '연결중'; @override - String get disconnectedLabel => '연결이 끊겼습니다.'; + String get disconnectedLabel => '연결이 끊겼습니다'; @override String get reconnectingLabel => '다시 연결하는 중...'; @override - String get alsoSendAsDirectMessageLabel => '다이렉트 메시지로도 보냅니다.'; + String get alsoSendAsDirectMessageLabel => '다이렉트 메시지로도 보냅니다'; @override - String get addACommentOrSendLabel => '주석을 추가하거나 보냅니다.'; + String get addACommentOrSendLabel => '주석을 추가하거나 보냅니다'; @override - String get searchGifLabel => 'GIF를 검색합니다.'; + String get searchGifLabel => 'GIF 검색'; @override - String get writeAMessageLabel => '메시지를 쓰세요.'; + String get writeAMessageLabel => '메시지 쓰기'; @override String get instantCommandsLabel => '인스턴트 커맨즈'; @@ -125,88 +124,85 @@ class StreamChatLocalizationsKo extends GlobalStreamChatLocalizations { '파일이 너무 커서 업로드할 수 없습니다. 파일 크기 제한은 ${limitInMB}MB입니다.'; @override - String emojiMatchingQueryText(String query) => '"$query"과 일치하는 이모티콘입니다.'; + String emojiMatchingQueryText(String query) => '"$query"과 일치하는 이모티콘입니다'; @override - String get addAFileLabel => '파일을 추가합니다.'; + String get addAFileLabel => '파일을 추가함'; @override - String get photoFromCameraLabel => '카메라에서 찍은 사진입니다.'; + String get photoFromCameraLabel => '카메라에서 찍은 사진'; @override - String get uploadAFileLabel => '파일을 업로드합니다.'; + String get uploadAFileLabel => '파일을 업로드함'; @override - String get uploadAPhotoLabel => '사진을 업로드합니다.'; + String get uploadAPhotoLabel => '사진을 업로드함'; @override - String get uploadAVideoLabel => '비디오를 업로드하세요'; + String get uploadAVideoLabel => '비디오를 업로드함'; @override - String get videoFromCameraLabel => '카메라의 비디오입니다.'; + String get videoFromCameraLabel => '카메라의 비디오.'; @override - String get okLabel => '알았지'; + String get okLabel => 'ㅇㅋ'; @override - String get somethingWentWrongError => '뭔가 잘못됐어요'; + String get somethingWentWrongError => '뭔가 잘못됐습느다'; @override - String get addMoreFilesLabel => '파일을 추가합니다.'; + String get addMoreFilesLabel => '파일을 추가함'; @override String get enablePhotoAndVideoAccessMessage => '친구와 공유할 수 있도록 사진과' '\n동영상에 액세스할 수 있도록 설정하십시오.'; @override - String get allowGalleryAccessMessage => '갤러리에 대한 액세스를 허용합니다.'; + String get allowGalleryAccessMessage => '갤러리에 대한 액세스를 허용합니다'; @override - String get flagMessageLabel => '플래그 메시지'; + String get flagMessageLabel => ' 메시지를 플래그함'; @override String get flagMessageQuestion => '추가 조사를 위해 진행자에게 이 메시지의 복사본을 전송하시겠습니까?'; @override - String get flagLabel => '플래그를 지정합니다.'; + String get flagLabel => '플래그함'; @override - String get cancelLabel => '취소하십시오.'; + String get cancelLabel => '취소'; @override - String get flagMessageSuccessfulLabel => '메시지에 플래그가 지정되었습니다.'; + String get flagMessageSuccessfulLabel => '메시지에 플래그가 지정되었습니다'; @override - String get flagMessageSuccessfulText => - '메시지가 진행자에게 보고되었습니다.'; + String get flagMessageSuccessfulText => '메시지가 진행자에게 보고되었습니다.'; @override - String get deleteLabel => '삭제합니다.'; + String get deleteLabel => '삭제'; @override String get deleteMessageLabel => '메시지를 삭제합니다.'; @override - String get deleteMessageQuestion => - '이 메시지를 완전히 삭제하시겠습니까?'; + String get deleteMessageQuestion => '이 메시지를 완전히 삭제하시겠습니까?'; @override - String get operationCouldNotBeCompletedText => - '작업을 완료할 수 없습니다.'; + String get operationCouldNotBeCompletedText => '작업을 완료할 수 없습니다.'; @override String get replyLabel => '답글'; @override String togglePinUnpinText({required bool pinned}) { - if (pinned) return '대화에서 연결을 해제합니다.'; - return '대화에 고정합니다.'; + if (pinned) return '대화의 핀을 분리합니다'; + return '대화에 고정합니다'; } @override String toggleDeleteRetryDeleteMessageText({required bool isDeleteFailed}) { - if (isDeleteFailed) return '메시지 삭제를 다시 시도하십시오.'; - return '메시지를 삭제합니다.'; + if (isDeleteFailed) return '메시지 삭제를 다시 시도합니다'; + return '메시지를 삭제합니다'; } @override @@ -222,7 +218,7 @@ class StreamChatLocalizationsKo extends GlobalStreamChatLocalizations { } @override - String get photosLabel => '사진들'; + String get photosLabel => '사진'; String _getDay(DateTime dateTime) { final now = DateTime.now(); @@ -232,23 +228,23 @@ class StreamChatLocalizationsKo extends GlobalStreamChatLocalizations { final date = DateTime(dateTime.year, dateTime.month, dateTime.day); if (date == today) { - return '오늘이요'; + return '오늘'; } else if (date == yesterday) { - return '어제요'; + return '어제'; } else { - return '${Jiffy(date).MMMd}입니다.'; + return '${Jiffy(date).MMMd}에'; } } @override String sentAtText({required DateTime date, required DateTime time}) => - '${_getDay(date)} 오전 ${Jiffy(time.toLocal()).format('HH:mm')}에 보냈습니다'; + '${_getDay(date)} ${Jiffy(time.toLocal()).format('HH:mm')}에 보냈습니다'; @override - String get todayLabel => '오늘이요'; + String get todayLabel => '오늘'; @override - String get yesterdayLabel => '어제요'; + String get yesterdayLabel => '어제'; @override String get channelIsMutedText => '채널이 음소거됩니다.'; @@ -260,8 +256,7 @@ class StreamChatLocalizationsKo extends GlobalStreamChatLocalizations { String get letsStartChattingLabel => '채팅 시작해요!'; @override - String get sendingFirstMessageLabel => - '친구에게 당신의 첫 번째 메시지를 보내는 것은 어떤가요?'; + String get sendingFirstMessageLabel => '친구에게 첫 메시지를 보내 볼까요?'; @override String get startAChatLabel => '대화를 시작합니다.'; @@ -273,11 +268,10 @@ class StreamChatLocalizationsKo extends GlobalStreamChatLocalizations { String get deleteConversationLabel => '대화를 삭제합니다.'; @override - String get deleteConversationQuestion => - '이 대화를 삭제하시겠습니까?'; + String get deleteConversationQuestion => '대화를 삭제하시겠습니까?'; @override - String get streamChatLabel => '채팅을 스트리밍합니다.'; + String get streamChatLabel => '스트림 채팅'; @override String get searchingForNetworkText => '네트워크를 검색하는 중입니다.'; @@ -286,35 +280,32 @@ class StreamChatLocalizationsKo extends GlobalStreamChatLocalizations { String get offlineLabel => '오프라인...'; @override - String get tryAgainLabel => '다시 한 번 해 봐!'; + String get tryAgainLabel => '다시 시도합니다'; @override String membersCountText(int count) { - if (count == 1) return '회원 1명입니다.'; - return '$count 구성원'; + return '$count명'; } @override String watchersCountText(int count) { - if (count == 1) return '1 온라인입니다.'; - return '$count 온라인입니다'; + return '$count명이 온라인'; } @override - String get viewInfoLabel => '정보를 봅니다.'; + String get viewInfoLabel => '정보를 보기'; @override String get leaveGroupLabel => '그룹을 떠납니다.'; @override - String get leaveLabel => '떠나요'; + String get leaveLabel => '떠나다'; @override String get leaveConversationLabel => '대화에서 떠납니다.'; @override - String get leaveConversationQuestion => - '정말 이 대화에서 나가시겠습니까?'; + String get leaveConversationQuestion => '정말 이 대화에서 나가시겠습니까?'; @override String get showInChatLabel => '채팅에 표시합니다.'; @@ -326,31 +317,32 @@ class StreamChatLocalizationsKo extends GlobalStreamChatLocalizations { String get saveVideoLabel => '비디오를 저장합니다.'; @override - String get uploadErrorLabel => '업로드 오류입니다.'; + String get uploadErrorLabel => '업로드 오류'; @override - String get giphyLabel => '지피요'; + String get giphyLabel => '지피'; @override - String get shuffleLabel => '섞으세요'; + String get shuffleLabel => '섞기'; @override - String get sendLabel => '보냅니다'; + String get sendLabel => '보내기'; @override - String get withText => '함께요'; + String get withText => '함께'; @override - String get inText => '에 있습니다.'; + String get inText => '에'; @override - String get youText => '너'; + String get youText => '고객님'; + // This is the word for 'customer' or 'user' because saying 'you' directly is too informal and rude @override String galleryPaginationText( {required int currentPage, required int totalPages}) => - '$totalPages장 ${currentPage + 1}장입니다'; - //11장 3장. + '${currentPage + 1} / $totalPages'; + //3 / 11 @override String get fileText => '파일'; From f311c13e4bc621b5e5a5b973861fb1be019d1c18 Mon Sep 17 00:00:00 2001 From: Sacha Arbonel Date: Wed, 4 Aug 2021 09:20:28 -0400 Subject: [PATCH 07/15] update japanese based on Eric's input --- .../lib/src/stream_chat_localizations_ja.dart | 103 +++++++++--------- 1 file changed, 49 insertions(+), 54 deletions(-) diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart index 6522fbf7..a30bfe2f 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart @@ -1,16 +1,16 @@ part of 'stream_chat_localizations.dart'; -/// The translations for English (`ja`). +/// The translations for Japanese (`ja`). class StreamChatLocalizationsJa extends GlobalStreamChatLocalizations { /// Create an instance of the translation bundle for Japanese. const StreamChatLocalizationsJa({String localeName = 'ja'}) : super(localeName: localeName); @override - String get launchUrlError => 'ユーアーレルの起動ができない'; + String get launchUrlError => 'URLの起動ができません'; @override - String get loadingUsersError => 'ユーザーの読み込みエラー'; + String get loadingUsersError => 'ユーザーの読み込みができません'; @override String get noUsersLabel => '現在、ユーザーはいません。'; @@ -29,26 +29,26 @@ class StreamChatLocalizationsJa extends GlobalStreamChatLocalizations { if (users.isEmpty) return ''; final first = users.first; if (users.length == 1) { - return '${first.name}がタイプしている'; + return '${first.name}が入力しています'; } - return '${first.name}とあと${users.length - 1}人が入力しています'; + return '${first.name}と${users.length - 1}人が入力しています'; } @override String get threadReplyLabel => 'スレッド返信'; @override - String get onlyVisibleToYouText => '自分にしか見えない'; + String get onlyVisibleToYouText => '自分しか見れません'; @override - String threadReplyCountText(int count) => '$countスレッドの返信'; + String threadReplyCountText(int count) => '$countつのスレッド返信'; @override String attachmentsUploadProgressText({ required int remaining, required int total, }) => - '$remaining/${total}mbのアップロード 。。。'; + '$remaining/${total}mbのアップロード中 。。。'; @override String pinnedByUserText({ @@ -56,21 +56,21 @@ class StreamChatLocalizationsJa extends GlobalStreamChatLocalizations { required User currentUser, }) { final pinnedByCurrentUser = currentUser.id == pinnedBy.id; - if (pinnedByCurrentUser) return 'あなたのピン留'; - return '${pinnedBy.name}のピン留'; + if (pinnedByCurrentUser) return 'あなたのピン'; + return '${pinnedBy.name}のピン'; } @override String get emptyMessagesText => '現在、メッセージはありません。'; @override - String get genericErrorText => '何かが間違っていた'; + String get genericErrorText => 'エラーが発生しました'; @override String get loadingMessagesError => 'メッセージの読み込みエラー'; @override - String resultCountText(int count) => '$countつの結果'; + String resultCountText(int count) => '$count件の結果'; @override String get messageDeletedText => 'このメッセージは削除されました。'; @@ -79,34 +79,32 @@ class StreamChatLocalizationsJa extends GlobalStreamChatLocalizations { String get messageDeletedLabel => 'メッセージ削除'; @override - String get messageReactionsLabel => 'メッセージに対する反応'; + String get messageReactionsLabel => 'メッセージのリアクション'; @override - String get emptyChatMessagesText => 'ここではまだ会話はありませんが。。。'; + String get emptyChatMessagesText => 'チャットがありませんが。。。'; @override - String threadSeparatorText(int replyCount) { - if (replyCount == 1) return '1 回答'; - return '$replyCount件の返信'; - } + String threadSeparatorText(int replyCount)=> '$replyCount件の返信'; + @override - String get connectedLabel => 'コネクテッド'; + String get connectedLabel => '接続しています'; @override String get disconnectedLabel => '接続切れ'; @override - String get reconnectingLabel => 'リコネクティング。。。'; + String get reconnectingLabel => '再接続中。。。'; @override - String get alsoSendAsDirectMessageLabel => 'ダイレクトメッセージでも送信可能'; + String get alsoSendAsDirectMessageLabel => 'ダイレクトメッセージでも送信'; @override String get addACommentOrSendLabel => 'コメントの追加や送信'; @override - String get searchGifLabel => '検索用GIF'; + String get searchGifLabel => 'GIFの検索'; @override String get writeAMessageLabel => 'メッセージを書く'; @@ -149,7 +147,7 @@ class StreamChatLocalizationsJa extends GlobalStreamChatLocalizations { String get okLabel => 'よし'; @override - String get somethingWentWrongError => '何かが間違っていたのだ。'; + String get somethingWentWrongError => 'エラーが発生しました'; @override String get addMoreFilesLabel => 'ファイルの追加'; @@ -158,29 +156,29 @@ class StreamChatLocalizationsJa extends GlobalStreamChatLocalizations { String get enablePhotoAndVideoAccessMessage => 'お友達と共有できるように、写真' '\nやビデオへのアクセスを有効にしてください。'; @override - String get allowGalleryAccessMessage => 'お客様のギャラリーへのアクセスを許可する'; + String get allowGalleryAccessMessage => 'ギャラリーへのアクセスを許可する'; @override - String get flagMessageLabel => 'メッセージフラグが'; + String get flagMessageLabel => 'メッセージをフラグする'; @override String get flagMessageQuestion => 'このメッセージのコピーを' '\nモデレーターに送って、さらに調査してもらいますか?'; @override - String get flagLabel => 'フラグが'; + String get flagLabel => 'フラグする'; @override String get cancelLabel => 'キャンセル'; @override - String get flagMessageSuccessfulLabel => 'フラグ付メッセージ'; + String get flagMessageSuccessfulLabel => 'メッセージにフラグが付けられました'; @override String get flagMessageSuccessfulText => 'このメッセージはモデレーターに報告されました。'; @override - String get deleteLabel => '消す'; + String get deleteLabel => '削除'; @override String get deleteMessageLabel => 'メッセージを削除する '; @@ -197,25 +195,25 @@ class StreamChatLocalizationsJa extends GlobalStreamChatLocalizations { @override String togglePinUnpinText({required bool pinned}) { - if (pinned) return 'カンバセーションからピンを外す '; - return '会話へのピン'; + if (pinned) return '会話のピンを外す'; + return '会話にピンする'; } @override String toggleDeleteRetryDeleteMessageText({required bool isDeleteFailed}) { - if (isDeleteFailed) return 'メッセージの削除を再試行してください'; + if (isDeleteFailed) return 'メッセージの削除を再試行する'; return 'メッセージを削除する'; } @override - String get copyMessageLabel => 'コピーメッセージ'; + String get copyMessageLabel => 'メッセージをコピーする'; @override - String get editMessageLabel => 'メッセージの編集'; + String get editMessageLabel => 'メッセージを編集する'; @override String toggleResendOrResendEditedMessage({required bool isUpdateFailed}) { - if (isUpdateFailed) return '編集したメッセージの再送'; + if (isUpdateFailed) return '編集したメッセージを再送する'; return '再送'; } @@ -240,7 +238,7 @@ class StreamChatLocalizationsJa extends GlobalStreamChatLocalizations { @override String sentAtText({required DateTime date, required DateTime time}) => - '${_getDay(date)} at ${Jiffy(time.toLocal()).format('HH:mm')}に送信 '; + '${_getDay(date)}の${Jiffy(time.toLocal()).format('HH:mm')}に送信しました '; @override String get todayLabel => '今日'; @@ -249,16 +247,16 @@ class StreamChatLocalizationsJa extends GlobalStreamChatLocalizations { String get yesterdayLabel => '昨日'; @override - String get channelIsMutedText => 'チャンネルがミュートされています'; + String get channelIsMutedText => 'チャンネルが無音されています'; @override String get noTitleText => 'タイトル無し'; @override - String get letsStartChattingLabel => 'さあ、チャットを始めよう'; + String get letsStartChattingLabel => 'チャットを始めよう!'; @override - String get sendingFirstMessageLabel => 'どのように友人にあなたの最初のメッセージを送ることについてはどうですか?'; + String get sendingFirstMessageLabel => '友人に最初のメッセージを送りましょうか?'; @override String get startAChatLabel => 'チャットを開始する'; @@ -270,13 +268,13 @@ class StreamChatLocalizationsJa extends GlobalStreamChatLocalizations { String get deleteConversationLabel => '会話を削除する'; @override - String get deleteConversationQuestion => 'この会話を削除してもよろしいですか?'; + String get deleteConversationQuestion => '本当に会話を削除しますか?'; @override String get streamChatLabel => 'ストリームチャット'; @override - String get searchingForNetworkText => 'ネットワークの検索'; + String get searchingForNetworkText => 'ネットワークを検索中'; @override String get offlineLabel => 'オフライン。。。'; @@ -285,16 +283,10 @@ class StreamChatLocalizationsJa extends GlobalStreamChatLocalizations { String get tryAgainLabel => '再試行する'; @override - String membersCountText(int count) { - if (count == 1) return '1人のメンバー'; - return '$count人のメンバー'; - } + String membersCountText(int count) => '$count人のメンバー'; @override - String watchersCountText(int count) { - if (count == 1) return '1オンライン'; - return '$countオンライン'; - } + String watchersCountText(int count) => '$count人がオンライン'; @override String get viewInfoLabel => '情報を見る'; @@ -309,7 +301,7 @@ class StreamChatLocalizationsJa extends GlobalStreamChatLocalizations { String get leaveConversationLabel => '会話を離れる'; @override - String get leaveConversationQuestion => 'この会話を離れてもよろしいですか?'; + String get leaveConversationQuestion => '本当に会話を離れますか?'; @override String get showInChatLabel => 'チャットで表示'; @@ -336,15 +328,18 @@ class StreamChatLocalizationsJa extends GlobalStreamChatLocalizations { String get withText => 'と'; @override - String get inText => 'は'; + String get inText => 'に'; @override - String get youText => '君'; + String get youText => 'お客様'; + // This is the word for 'customer' or 'user' because saying 'you' directly is too informal and rude @override - String galleryPaginationText( - {required int currentPage, required int totalPages}) => - '$totalPagesの${currentPage + 1}'; + String galleryPaginationText({ + required int currentPage, + required int totalPages, + }) => + '${currentPage + 1} / $totalPages'; @override String get fileText => 'ファイル'; From 74f3e109fd02615d55dda0abd80c092db70a85a0 Mon Sep 17 00:00:00 2001 From: Sacha Arbonel Date: Wed, 4 Aug 2021 09:59:29 -0400 Subject: [PATCH 08/15] =?UTF-8?q?update=20okLabel:=20=E3=85=87=E3=85=8B->?= =?UTF-8?q?=ED=99=95=EC=9D=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/src/stream_chat_localizations_ko.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart index 689544c7..36c578e3 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart @@ -145,7 +145,7 @@ class StreamChatLocalizationsKo extends GlobalStreamChatLocalizations { String get videoFromCameraLabel => '카메라의 비디오.'; @override - String get okLabel => 'ㅇㅋ'; + String get okLabel => '확인'; @override String get somethingWentWrongError => '뭔가 잘못됐습느다'; From e1d97feaabb50b51edd87c1b468cceb8c41563af Mon Sep 17 00:00:00 2001 From: Sacha Arbonel Date: Wed, 4 Aug 2021 16:33:52 -0400 Subject: [PATCH 09/15] add korean to tranlsation docs --- docusaurus/docs/Flutter/guides/adding_localization.mdx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docusaurus/docs/Flutter/guides/adding_localization.mdx b/docusaurus/docs/Flutter/guides/adding_localization.mdx index 3a81187a..5a8813c2 100644 --- a/docusaurus/docs/Flutter/guides/adding_localization.mdx +++ b/docusaurus/docs/Flutter/guides/adding_localization.mdx @@ -27,6 +27,7 @@ At the moment we support the following languages: - [French](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_fr.dart) - [Spanish](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_es.dart) - [Japanese](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart) +- [Korean](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart) More languages will be added in the future. Feel free to [contribute](https://github.com/GetStream/stream-chat-flutter/blob/master/CONTRIBUTING.md) to add more languages. ### Add dependency @@ -65,6 +66,7 @@ class MyApp extends StatelessWidget { Locale('it'), Locale('es'), Locale('ja'), + Locale('ko'), ], // Add GlobalStreamChatLocalizations.delegates localizationsDelegates: GlobalStreamChatLocalizations.delegates, @@ -135,6 +137,7 @@ Here is an example of how that would look like: Locale('it'), Locale('es'), Locale('ja'), + Locale('ko'), ], // locales are the locales of the device // supportedLocales are the app supported locales @@ -179,5 +182,6 @@ Example: it es ja + ko ``` From 57e9552248230c16291989f4509e074bc33afd61 Mon Sep 17 00:00:00 2001 From: Sacha Arbonel Date: Thu, 5 Aug 2021 13:36:15 -0400 Subject: [PATCH 10/15] updating youText in ja + ko based on Eric's input --- .../lib/src/stream_chat_localizations_ja.dart | 2 +- .../lib/src/stream_chat_localizations_ko.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart index a30bfe2f..e8d9759e 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart @@ -331,7 +331,7 @@ class StreamChatLocalizationsJa extends GlobalStreamChatLocalizations { String get inText => 'に'; @override - String get youText => 'お客様'; + String get youText => 'あなた'; // This is the word for 'customer' or 'user' because saying 'you' directly is too informal and rude @override diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart index 36c578e3..dbd9609d 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart @@ -335,7 +335,7 @@ class StreamChatLocalizationsKo extends GlobalStreamChatLocalizations { String get inText => '에'; @override - String get youText => '고객님'; + String get youText => '당신'; // This is the word for 'customer' or 'user' because saying 'you' directly is too informal and rude @override From 819abd091e418117b3f052ea77c345bdbc25dc10 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Thu, 19 Aug 2021 11:43:25 +0200 Subject: [PATCH 11/15] fix format --- .../lib/src/stream_chat_localizations_hi.dart | 4 ++-- .../lib/src/stream_chat_localizations_ja.dart | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_hi.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_hi.dart index 11d7d486..247b90f8 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_hi.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_hi.dart @@ -340,10 +340,10 @@ class StreamChatLocalizationsHi extends GlobalStreamChatLocalizations { String get sendLabel => 'भेजें'; @override - String get withText => 'विद';//TODO: break? + String get withText => 'विद'; //TODO: break? @override - String get inText => 'इन';//TODO: break? + String get inText => 'इन'; //TODO: break? @override String get youText => 'आप'; diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart index e8d9759e..5510a2d8 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart @@ -85,8 +85,7 @@ class StreamChatLocalizationsJa extends GlobalStreamChatLocalizations { String get emptyChatMessagesText => 'チャットがありませんが。。。'; @override - String threadSeparatorText(int replyCount)=> '$replyCount件の返信'; - + String threadSeparatorText(int replyCount) => '$replyCount件の返信'; @override String get connectedLabel => '接続しています'; From a93b585d61e75b5b7675fbb6a9c1a9dbbf86af91 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Thu, 19 Aug 2021 11:44:23 +0200 Subject: [PATCH 12/15] fix analysis --- .../lib/src/stream_chat_localizations_ja.dart | 3 ++- .../lib/src/stream_chat_localizations_ko.dart | 15 +++++---------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart index 5510a2d8..f61fcc4f 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart @@ -331,7 +331,8 @@ class StreamChatLocalizationsJa extends GlobalStreamChatLocalizations { @override String get youText => 'あなた'; - // This is the word for 'customer' or 'user' because saying 'you' directly is too informal and rude + // This is the word for 'customer' or 'user' because saying 'you' directly + //is too informal and rude @override String galleryPaginationText({ diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart index dbd9609d..5cc278f7 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart @@ -85,9 +85,7 @@ class StreamChatLocalizationsKo extends GlobalStreamChatLocalizations { String get emptyChatMessagesText => '아직 채팅이 없습니다...'; @override - String threadSeparatorText(int replyCount) { - return '$replyCount개의 답장'; - } + String threadSeparatorText(int replyCount) => '$replyCount개의 답장'; @override String get connectedLabel => '연결중'; @@ -283,14 +281,10 @@ class StreamChatLocalizationsKo extends GlobalStreamChatLocalizations { String get tryAgainLabel => '다시 시도합니다'; @override - String membersCountText(int count) { - return '$count명'; - } + String membersCountText(int count) => '$count명'; @override - String watchersCountText(int count) { - return '$count명이 온라인'; - } + String watchersCountText(int count) => '$count명이 온라인'; @override String get viewInfoLabel => '정보를 보기'; @@ -336,7 +330,8 @@ class StreamChatLocalizationsKo extends GlobalStreamChatLocalizations { @override String get youText => '당신'; - // This is the word for 'customer' or 'user' because saying 'you' directly is too informal and rude + // This is the word for 'customer' or 'user' because saying 'you' directly + // is too informal and rude @override String galleryPaginationText( From 894802502a82d03a46c579c046eaffb97725e901 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Thu, 19 Aug 2021 12:16:55 +0200 Subject: [PATCH 13/15] update readme and example --- packages/stream_chat_localizations/README.md | 6 ++++++ .../stream_chat_localizations/example/lib/add_new_lang.dart | 3 +++ packages/stream_chat_localizations/example/lib/main.dart | 3 +++ .../example/lib/override_lang.dart | 3 +++ 4 files changed, 15 insertions(+) diff --git a/packages/stream_chat_localizations/README.md b/packages/stream_chat_localizations/README.md index c2ea8a72..131d6b13 100644 --- a/packages/stream_chat_localizations/README.md +++ b/packages/stream_chat_localizations/README.md @@ -35,6 +35,8 @@ At the moment we support the following languages: - [Italian](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_it.dart) - [French](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_fr.dart) - [Spanish](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_es.dart) +- [Japanese](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart) +- [Korean](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart) More languages will be added in the future. Feel free to [contribute](https://github.com/GetStream/stream-chat-flutter/blob/master/CONTRIBUTING.md) to add more languages. @@ -70,6 +72,8 @@ class MyApp extends StatelessWidget { Locale('fr'), Locale('it'), Locale('es'), + Locale('ja'), + Locale('ko'), ], // Add GlobalStreamChatLocalizations.delegates localizationsDelegates: GlobalStreamChatLocalizations.delegates, @@ -113,6 +117,8 @@ Example: fr it es + ja + ko ``` diff --git a/packages/stream_chat_localizations/example/lib/add_new_lang.dart b/packages/stream_chat_localizations/example/lib/add_new_lang.dart index 2f373691..a64717d3 100644 --- a/packages/stream_chat_localizations/example/lib/add_new_lang.dart +++ b/packages/stream_chat_localizations/example/lib/add_new_lang.dart @@ -456,6 +456,9 @@ class MyApp extends StatelessWidget { Locale('hi'), Locale('fr'), Locale('it'), + Locale('es'), + Locale('ja'), + Locale('ko'), // Add support for additional 'nn' locale Locale('nn'), ], diff --git a/packages/stream_chat_localizations/example/lib/main.dart b/packages/stream_chat_localizations/example/lib/main.dart index 818086df..76194992 100644 --- a/packages/stream_chat_localizations/example/lib/main.dart +++ b/packages/stream_chat_localizations/example/lib/main.dart @@ -73,6 +73,9 @@ class MyApp extends StatelessWidget { Locale('hi'), Locale('fr'), Locale('it'), + Locale('es'), + Locale('ja'), + Locale('ko'), ], // Add GlobalStreamChatLocalizations.delegates localizationsDelegates: GlobalStreamChatLocalizations.delegates, diff --git a/packages/stream_chat_localizations/example/lib/override_lang.dart b/packages/stream_chat_localizations/example/lib/override_lang.dart index 0e45019a..8eafd257 100644 --- a/packages/stream_chat_localizations/example/lib/override_lang.dart +++ b/packages/stream_chat_localizations/example/lib/override_lang.dart @@ -98,6 +98,9 @@ class MyApp extends StatelessWidget { Locale('hi'), Locale('fr'), Locale('it'), + Locale('es'), + Locale('ja'), + Locale('ko'), ], // Add overridden "CustomStreamChatLocalizationsEn.delegate" along with // "GlobalStreamChatLocalizations.delegates" From 5bda5db70599e8ef4d402264cf04e518c83a8f33 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Thu, 19 Aug 2021 12:17:56 +0200 Subject: [PATCH 14/15] update changelog --- packages/stream_chat_localizations/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/stream_chat_localizations/CHANGELOG.md b/packages/stream_chat_localizations/CHANGELOG.md index 865741c4..a1ae75b0 100644 --- a/packages/stream_chat_localizations/CHANGELOG.md +++ b/packages/stream_chat_localizations/CHANGELOG.md @@ -1,6 +1,8 @@ ## Upcoming * Added support for [Spanish](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_es.dart) locale. +* Added support for [Korean](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart) locale. +* Added support for [Japanese](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart) locale. ## 1.0.2 From 5ecbfa4ac8248fb10595eee4a86c7c071c1310ab Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Fri, 20 Aug 2021 10:21:13 +0200 Subject: [PATCH 15/15] move comments --- .../lib/src/stream_chat_localizations_ja.dart | 4 ++-- .../lib/src/stream_chat_localizations_ko.dart | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart index f61fcc4f..e6946125 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart @@ -329,10 +329,10 @@ class StreamChatLocalizationsJa extends GlobalStreamChatLocalizations { @override String get inText => 'に'; - @override - String get youText => 'あなた'; // This is the word for 'customer' or 'user' because saying 'you' directly //is too informal and rude + @override + String get youText => 'あなた'; @override String galleryPaginationText({ diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart index 5cc278f7..2642b991 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart @@ -328,10 +328,10 @@ class StreamChatLocalizationsKo extends GlobalStreamChatLocalizations { @override String get inText => '에'; - @override - String get youText => '당신'; // This is the word for 'customer' or 'user' because saying 'you' directly // is too informal and rude + @override + String get youText => '당신'; @override String galleryPaginationText(