Локализация платформонезависимой части приложения

This commit is contained in:
Ivan Murashov
2017-09-04 18:57:30 +03:00
parent 3c494347dc
commit 6e8269b4df
19 changed files with 176 additions and 133 deletions

View File

@@ -3,9 +3,10 @@ import 'package:flutter/material.dart';
import 'consts.dart';
import 'network.dart';
import 'registration.dart';
import 'purchase.dart';
import 'package:checker/registration/registration.dart';
import 'package:checker/purchase/purchase.dart';
import 'faq.dart';
import 'strings.dart';
// Канал для взаимодействия с кодом платформы.
const platform = const MethodChannel('com.dinect.checker/instance_id');
@@ -46,7 +47,7 @@ logout(BuildContext context) {
}
};
showYesNoDialog(context, 'Подтверждение', 'Вы действительно хотите выйти и ввести другой номер магазина?', positiveCalback);
showYesNoDialog(context, Strings.of(context).confirmation(), Strings.of(context).askChangeStore(), positiveCalback);
}
forceLogout(BuildContext context) {
@@ -100,12 +101,12 @@ showYesNoDialog(BuildContext context, String title, String content, VoidCallback
content: new Text(content),
actions: <Widget>[
new FlatButton(
child: new Text('Нет'),
child: new Text(Strings.of(context).no()),
onPressed: () {
Navigator.of(context).pop();
}
),
new FlatButton(
child: new Text('Да'),
child: new Text(Strings.of(context).yes()),
onPressed: positiveCallback)]));
}