Merge branch 'localization-es' into localization-ko-and-jp
This commit is contained in:
@@ -74,6 +74,7 @@ class MyApp extends StatelessWidget {
|
|||||||
Locale('hi'),
|
Locale('hi'),
|
||||||
Locale('fr'),
|
Locale('fr'),
|
||||||
Locale('it'),
|
Locale('it'),
|
||||||
|
Locale('es'),
|
||||||
],
|
],
|
||||||
localizationsDelegates: GlobalStreamChatLocalizations.delegates,
|
localizationsDelegates: GlobalStreamChatLocalizations.delegates,
|
||||||
builder: (context, widget) => StreamChat(
|
builder: (context, widget) => StreamChat(
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
|
## 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.
|
||||||
|
|
||||||
## 1.0.2
|
## 1.0.2
|
||||||
|
|
||||||
* Updated stream_chat_flutter dependency
|
* Updated `stream_chat_flutter` dependency
|
||||||
|
|
||||||
## 1.0.1
|
## 1.0.1
|
||||||
|
|
||||||
@@ -8,4 +12,8 @@
|
|||||||
|
|
||||||
## 1.0.0
|
## 1.0.0
|
||||||
|
|
||||||
* First release
|
* Initial Release with support for 4 locales
|
||||||
|
- [English](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_en.dart)
|
||||||
|
- [Hindi](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_hi.dart)
|
||||||
|
- [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)
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ At the moment we support the following languages:
|
|||||||
- [Hindi](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_hi.dart)
|
- [Hindi](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_hi.dart)
|
||||||
- [Italian](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_it.dart)
|
- [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)
|
- [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)
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
@@ -68,6 +69,7 @@ class MyApp extends StatelessWidget {
|
|||||||
Locale('hi'),
|
Locale('hi'),
|
||||||
Locale('fr'),
|
Locale('fr'),
|
||||||
Locale('it'),
|
Locale('it'),
|
||||||
|
Locale('es'),
|
||||||
],
|
],
|
||||||
// Add GlobalStreamChatLocalizations.delegates
|
// Add GlobalStreamChatLocalizations.delegates
|
||||||
localizationsDelegates: GlobalStreamChatLocalizations.delegates,
|
localizationsDelegates: GlobalStreamChatLocalizations.delegates,
|
||||||
@@ -86,13 +88,13 @@ class MyApp extends StatelessWidget {
|
|||||||
|
|
||||||
### Adding a new language
|
### Adding a new language
|
||||||
|
|
||||||
To add a new language, you need to create a new class extending `GlobalStreamChatLocalizations` and create a delegate for it adding it to the `delegates` array.
|
To add a new language, create a new class extending `GlobalStreamChatLocalizations` and create a delegate for it, adding it to the `delegates` array.
|
||||||
|
|
||||||
Check out [this example](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/example/lib/add_new_lang.dart) to see how to add a new language.
|
Check out [this example](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/example/lib/add_new_lang.dart) to see how to add a new language.
|
||||||
|
|
||||||
### Override existing languages
|
### Override existing languages
|
||||||
|
|
||||||
To override an existing language, you need to create a new class extending that particular language class and create a delegate for it adding it to the `delegates` array.
|
To override an existing language, create a new class extending that particular language class and create a delegate for it, adding it to the `delegates` array.
|
||||||
|
|
||||||
Check out [this example](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/example/lib/override_lang.dart) to see how to override an existing language.
|
Check out [this example](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/example/lib/override_lang.dart) to see how to override an existing language.
|
||||||
|
|
||||||
@@ -110,6 +112,7 @@ Example:
|
|||||||
<string>nb</string>
|
<string>nb</string>
|
||||||
<string>fr</string>
|
<string>fr</string>
|
||||||
<string>it</string>
|
<string>it</string>
|
||||||
|
<string>es</string>
|
||||||
</array>
|
</array>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ class StreamChatLocalizationsEs extends GlobalStreamChatLocalizations {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
String sentAtText({required DateTime date, required DateTime time}) =>
|
String sentAtText({required DateTime date, required DateTime time}) =>
|
||||||
'Enviado el ${_getDay(date)} a las ${Jiffy(time.toLocal()).format('HH:mm')}';
|
'''Enviado el ${_getDay(date)} a las ${Jiffy(time.toLocal()).format('HH:mm')}''';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get todayLabel => 'Hoy';
|
String get todayLabel => 'Hoy';
|
||||||
|
|||||||
Reference in New Issue
Block a user