Refactoring l10n
This commit is contained in:
parent
5f7148cc3c
commit
6f1ed6120f
42 changed files with 287 additions and 287 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:fluffychat/i18n/i18n.dart';
|
||||
import 'package:fluffychat/l10n/l10n.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_sound/flutter_sound.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
|
@ -67,7 +67,7 @@ class _RecordingDialogState extends State<RecordingDialog> {
|
|||
SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: Text(
|
||||
"${I18n.of(context).recording}: $time",
|
||||
"${L10n.of(context).recording}: $time",
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
),
|
||||
|
|
@ -78,7 +78,7 @@ class _RecordingDialogState extends State<RecordingDialog> {
|
|||
actions: <Widget>[
|
||||
FlatButton(
|
||||
child: Text(
|
||||
I18n.of(context).cancel.toUpperCase(),
|
||||
L10n.of(context).cancel.toUpperCase(),
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).textTheme.bodyText2.color.withAlpha(150),
|
||||
),
|
||||
|
|
@ -88,7 +88,7 @@ class _RecordingDialogState extends State<RecordingDialog> {
|
|||
FlatButton(
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Text(I18n.of(context).send.toUpperCase()),
|
||||
Text(L10n.of(context).send.toUpperCase()),
|
||||
SizedBox(width: 4),
|
||||
Icon(Icons.send, size: 15),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import 'package:fluffychat/i18n/i18n.dart';
|
||||
import 'package:fluffychat/l10n/l10n.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:famedlysdk/famedlysdk.dart';
|
||||
import 'package:flutter_styled_toast/flutter_styled_toast.dart';
|
||||
|
|
@ -51,14 +51,14 @@ class SimpleDialogs {
|
|||
FlatButton(
|
||||
child: Text(
|
||||
cancelText?.toUpperCase() ??
|
||||
I18n.of(context).close.toUpperCase(),
|
||||
L10n.of(context).close.toUpperCase(),
|
||||
style: TextStyle(color: Colors.blueGrey)),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
FlatButton(
|
||||
child: Text(
|
||||
confirmText?.toUpperCase() ??
|
||||
I18n.of(context).confirm.toUpperCase(),
|
||||
L10n.of(context).confirm.toUpperCase(),
|
||||
),
|
||||
onPressed: () {
|
||||
input = controller.text;
|
||||
|
|
@ -81,20 +81,20 @@ class SimpleDialogs {
|
|||
await showDialog(
|
||||
context: context,
|
||||
builder: (c) => AlertDialog(
|
||||
title: Text(titleText ?? I18n.of(context).areYouSure),
|
||||
title: Text(titleText ?? L10n.of(context).areYouSure),
|
||||
content: contentText != null ? Text(contentText) : null,
|
||||
actions: <Widget>[
|
||||
FlatButton(
|
||||
child: Text(
|
||||
cancelText?.toUpperCase() ??
|
||||
I18n.of(context).close.toUpperCase(),
|
||||
L10n.of(context).close.toUpperCase(),
|
||||
style: TextStyle(color: Colors.blueGrey)),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
FlatButton(
|
||||
child: Text(
|
||||
confirmText?.toUpperCase() ??
|
||||
I18n.of(context).confirm.toUpperCase(),
|
||||
L10n.of(context).confirm.toUpperCase(),
|
||||
),
|
||||
onPressed: () {
|
||||
confirmed = true;
|
||||
|
|
@ -142,7 +142,7 @@ class SimpleDialogs {
|
|||
children: <Widget>[
|
||||
CircularProgressIndicator(),
|
||||
SizedBox(width: 16),
|
||||
Text(I18n.of(context).loadingPleaseWait),
|
||||
Text(L10n.of(context).loadingPleaseWait),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue