Comments.

This commit is contained in:
M 2020-10-22 18:11:52 +03:00
parent aa120c33b1
commit cba4188665
6 changed files with 23 additions and 15 deletions

View file

@ -285,7 +285,7 @@ class S implements WidgetsLocalizations {
String get transaction_sent => "Transaction sent!"; String get transaction_sent => "Transaction sent!";
String get transactions => "Transactions"; String get transactions => "Transactions";
String get transactions_by_date => "Transactions by date"; String get transactions_by_date => "Transactions by date";
String get use => "Use "; String get use => "Switch to ";
String get view_key_private => "View key (private)"; String get view_key_private => "View key (private)";
String get view_key_public => "View key (public)"; String get view_key_public => "View key (public)";
String get wallet_keys => "Wallet keys"; String get wallet_keys => "Wallet keys";

View file

@ -15,7 +15,7 @@ class DateSectionRaw extends StatelessWidget {
final isToday = nowDate.day == date.day && final isToday = nowDate.day == date.day &&
nowDate.month == date.month && nowDate.month == date.month &&
nowDate.year == date.year; nowDate.year == date.year;
final dateSectionDateFormat = DateFormatter.withCurrentLocal(); final dateSectionDateFormat = DateFormatter.withCurrentLocal(hasTime: false);
var title = ""; var title = "";
if (isToday) { if (isToday) {

View file

@ -165,7 +165,7 @@ class WalletListBodyState extends State<WalletListBody> {
bottomSection: Column(children: <Widget>[ bottomSection: Column(children: <Widget>[
PrimaryImageButton( PrimaryImageButton(
onPressed: () => onPressed: () =>
Navigator.of(context).pushNamed(Routes.newWalletType), Navigator.of(context).pushNamed(Routes.newWallet),
image: newWalletImage, image: newWalletImage,
text: S.of(context).wallet_list_create_new_wallet, text: S.of(context).wallet_list_create_new_wallet,
color: Theme.of(context).accentTextTheme.subtitle.decorationColor, color: Theme.of(context).accentTextTheme.subtitle.decorationColor,

View file

@ -3,13 +3,21 @@ import 'package:cake_wallet/di.dart';
import 'package:cake_wallet/store/settings_store.dart'; import 'package:cake_wallet/store/settings_store.dart';
class DateFormatter { class DateFormatter {
static String get currentLocalFormat { static String currentLocalFormat({bool hasTime = true}) {
final isUSA = getIt.get<SettingsStore>().languageCode.toLowerCase() == 'en'; final isUSA = getIt.get<SettingsStore>().languageCode.toLowerCase() == 'en';
final format = isUSA ? 'yyyy.MM.dd, HH:mm' : 'dd.MM.yyyy, HH:mm'; final format =
isUSA ? usaStyleFormat(hasTime) : regularStyleFormat(hasTime);
return format; return format;
} }
static DateFormat withCurrentLocal() => static DateFormat withCurrentLocal({bool hasTime = true}) => DateFormat(
DateFormat(currentLocalFormat, getIt.get<SettingsStore>().languageCode); currentLocalFormat(hasTime: hasTime),
getIt.get<SettingsStore>().languageCode);
static String usaStyleFormat(bool hasTime) =>
hasTime ? 'yyyy.MM.dd, HH:mm' : 'yyyy.MM.dd';
static String regularStyleFormat(bool hasTime) =>
hasTime ? 'dd.MM.yyyy, HH:mm' : 'dd.MM.yyyy';
} }

View file

@ -133,7 +133,7 @@ packages:
name: build_resolvers name: build_resolvers
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.4.1" version: "1.4.2"
build_runner: build_runner:
dependency: "direct dev" dependency: "direct dev"
description: description:
@ -273,7 +273,7 @@ packages:
name: dart_style name: dart_style
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.7" version: "1.3.8"
dartx: dartx:
dependency: transitive dependency: transitive
description: description:
@ -930,14 +930,14 @@ packages:
name: url_launcher name: url_launcher
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "5.7.5" version: "5.7.6"
url_launcher_linux: url_launcher_linux:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_linux name: url_launcher_linux
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.0.1+1" version: "0.0.1+3"
url_launcher_macos: url_launcher_macos:
dependency: transitive dependency: transitive
description: description:
@ -951,14 +951,14 @@ packages:
name: url_launcher_platform_interface name: url_launcher_platform_interface
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.8" version: "1.0.9"
url_launcher_web: url_launcher_web:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_web name: url_launcher_web
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.1.4+1" version: "0.1.5"
url_launcher_windows: url_launcher_windows:
dependency: transitive dependency: transitive
description: description:
@ -1024,4 +1024,4 @@ packages:
version: "2.2.1" version: "2.2.1"
sdks: sdks:
dart: ">=2.10.0-110 <2.11.0" dart: ">=2.10.0-110 <2.11.0"
flutter: ">=1.12.13+hotfix.5 <2.0.0" flutter: ">=1.22.0 <2.0.0"

View file

@ -131,7 +131,7 @@
"add_new_node" : "Add new node", "add_new_node" : "Add new node",
"use" : "Use ", "use" : "Switch to ",
"digit_pin" : "-digit PIN", "digit_pin" : "-digit PIN",