Skip to content

Commit 9a77662

Browse files
Emil Valiyevcursoragent
andcommitted
feat(localization): add Russian (ru) translations
Add Russian localization for the Stream Chat widgets, implementing StreamChatLocalizationsRu against the v10 localization interface with proper Russian plural forms (one/few/many) for count-based strings, and registering the `ru` locale. Update the README and changelog accordingly. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 7e6d8ef commit 9a77662

4 files changed

Lines changed: 841 additions & 0 deletions

File tree

packages/stream_chat_localizations/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
✅ Added
44

55
- Added Azerbaijani (`az`) translations.
6+
- Added Russian (`ru`) translations.
67

78
## 10.0.1
89

packages/stream_chat_localizations/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ This package provides localized strings for all Stream Chat Flutter widgets. Dep
3434
- [German](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_de.dart)
3535
- [Norwegian](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_no.dart)
3636
- [Azerbaijani](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_az.dart)
37+
- [Russian](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ru.dart)
3738

3839
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.
3940

@@ -81,6 +82,7 @@ class MyApp extends StatelessWidget {
8182
Locale('de'),
8283
Locale('no'),
8384
Locale('az'),
85+
Locale('ru'),
8486
],
8587
// Add GlobalStreamChatLocalizations.delegates
8688
localizationsDelegates: GlobalStreamChatLocalizations.delegates,
@@ -130,6 +132,7 @@ Example:
130132
<string>de</string>
131133
<string>no</string>
132134
<string>az</string>
135+
<string>ru</string>
133136
</array>
134137
```
135138

packages/stream_chat_localizations/lib/src/stream_chat_localizations.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ part 'stream_chat_localizations_ja.dart';
1515
part 'stream_chat_localizations_ko.dart';
1616
part 'stream_chat_localizations_pt.dart';
1717
part 'stream_chat_localizations_no.dart';
18+
part 'stream_chat_localizations_ru.dart';
1819

1920
/// The set of supported languages, as language code strings.
2021
///
@@ -37,6 +38,7 @@ const kStreamChatSupportedLanguages = {
3738
'pt',
3839
'de',
3940
'no',
41+
'ru',
4042
};
4143

4244
/// Creates a [GlobalStreamChatLocalizations] instance for the given `locale`.
@@ -83,6 +85,8 @@ GlobalStreamChatLocalizations? getStreamChatTranslation(Locale locale) {
8385
return const StreamChatLocalizationsDe();
8486
case 'no':
8587
return const StreamChatLocalizationsNo();
88+
case 'ru':
89+
return const StreamChatLocalizationsRu();
8690
default:
8791
return null;
8892
}

0 commit comments

Comments
 (0)