translation updates, styles try?

This commit is contained in:
atlasan 2023-02-26 02:23:28 +01:00
parent d4740ab647
commit a0a3910adc
12 changed files with 79 additions and 20 deletions

View File

@ -212,5 +212,9 @@
"indexer": "Indexer",
"anAutoNodeChoosed": "A secure and valid node will be automatically used from a random list.",
"rootWallet": "Root Wallet",
"blockN": "block N°{}"
"blockN": "block N°{}",
"thisIsNotAGoodCode": "This is not a good code",
"youHaveToBeConnectedToValidateChest": "You have to be connected\nto validate your chest",
"thisIdentityAlreadyExist": "This identity already exists"
}

View File

@ -213,5 +213,8 @@
"indexer": "Indexer",
"anAutoNodeChoosed": "Se usará automáticamente un nodo seguro y valido desde una lista aleatoria.",
"rootWallet": "Monedero raíz",
"blockN": "bloque N°{}"
"blockN": "bloque N°{}",
"thisIsNotAGoodCode": "Este codígo no es valido",
"youHaveToBeConnectedToValidateChest": "Tienes que tener conneción\npara validar tu cofre",
"thisIdentityAlreadyExist": "Esta identidad ya existe"
}

View File

@ -212,5 +212,8 @@
"indexer": "Indexer",
"anAutoNodeChoosed": "Un noeud sûr et valide sera choisi automatiquement parmis une liste aléatoire.",
"rootWallet": "Portefeuille racine",
"blockN": "bloc N°{}"
"blockN": "bloc N°{}",
"thisIsNotAGoodCode": "Ce n'est pas le bon code",
"youHaveToBeConnectedToValidateChest": "Vous devez vous connecter à internet\npour valider votre coffre",
"thisIdentityAlreadyExist": "Cette identité existe déjà"
}

View File

@ -215,5 +215,6 @@
"rootWallet": "Portafoglio radice",
"blockN": "blocco N°{}",
"thisIsNotAGoodCode": "Questo codice non é valido",
"youHaveToBeConnectedToValidateChest": "Vous devez vous connecter à internet\npour valider votre coffre"
"youHaveToBeConnectedToValidateChest": "Vous devez vous connecter à internet\npour valider votre coffre",
"thisIdentityAlreadyExist": "Identitá giá esistente"
}

View File

@ -0,0 +1 @@
7bd0907a4984e1ab7899edce63b2e286e8f3daad5a8e2bff40cee61ca6b036cd

View File

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:flutter_test/flutter_test.dart';
@ -66,7 +67,7 @@ Future restoreChest() async {
await enterText(keyPinForm, 'AAAAA', 0);
// Check if string "Accéder à mon coffre" is present in screen
await waitFor('Accéder à mon coffre');
await waitFor('accessMyChest'.tr());
// Go to wallets home
await tapKey(keyGoWalletsHome, duration: 0);
@ -84,7 +85,7 @@ Future restoreChest() async {
await tapKey(keyCopyAddress);
// Check if string "Cette adresse a été copié" is present in screen
await waitFor('Cette adresse a été copié');
await waitFor('thisAddressHasBeenCopiedToClipboard'.tr());
// Pop screen 2 time to go back home
await goBack();
@ -126,7 +127,7 @@ Future onboardingNewChest() async {
final askedWord = mnemonic[askedWordNumber - 1];
await enterText(keyInputWord, askedWord);
await waitFor('Continuer', exactMatch: true);
await waitFor('continue'.tr(), exactMatch: true);
await tapKey(keyGoNext);
await tapKey(keyGoNext);
await tapKey(keyGoNext);
@ -143,13 +144,13 @@ Future onboardingNewChest() async {
await enterText(keyPinForm, 'AAAAA', 0);
// Check if string "Accéder à mon coffre" is present in screen
await waitFor('Accéder à mon coffre');
await waitFor('accessMyChest'.tr());
// Go to wallets home
await tapKey(keyGoWalletsHome, duration: 0);
// Check if string "Mon portefeuille co" is present in screen
await waitFor('Mon portefeuille co');
await waitFor('currentWallet'.tr());
await waitFor('0.0', exactMatch: true);
// await waitFor('Scanner un');
}

View File

@ -178,7 +178,7 @@ class WalletOptionsProvider with ChangeNotifier {
),
const SizedBox(height: 10),
Consumer<WalletOptionsProvider>(builder: (context, wOptions, _) {
return Text(idtyExist ? 'Cette identité existe déjà' : '',
return Text(idtyExist ? "thisIdentityAlreadyExist".tr() : '',
style: TextStyle(color: Colors.red[500]));
})
]),

View File

@ -30,7 +30,7 @@ class WalletsProfilesProvider with ChangeNotifier {
try {
barcode = await BarcodeScanner.scan();
} catch (e) {
log.e(e);
log.e("BarcodeScanner ERR: $e");
return 'false';
}
if (isAddress(barcode.rawContent)) {

View File

@ -100,7 +100,8 @@ class UnlockingWallet extends StatelessWidget {
style: const TextStyle(
fontSize: 25,
color: Colors.black,
fontWeight: FontWeight.w700),
fontWeight: FontWeight.w700
),
)),
]),
SizedBox(height: 30 * ratio),
@ -111,13 +112,14 @@ class UnlockingWallet extends StatelessWidget {
style: const TextStyle(
fontSize: 19,
color: Colors.black,
fontWeight: FontWeight.w400),
fontWeight: FontWeight.w400
),
)),
SizedBox(height: 30 * ratio),
if (!myWalletProvider.isPinValid &&
!myWalletProvider.isPinLoading)
Text(
"Ce n'est pas le bon code".tr(),
"thisIsNotAGoodCode".tr(),
style: const TextStyle(
color: Colors.red, fontWeight: FontWeight.w500),
),

View File

@ -105,7 +105,7 @@ class OnboardingStepTen extends StatelessWidget {
visible: !myWalletProvider.isPinValid &&
!myWalletProvider.isPinLoading,
child: Text(
"Ce n'est pas le bon code".tr(),
"thisIsNotAGoodCode".tr(),
style: const TextStyle(
color: Colors.red, fontWeight: FontWeight.w500),
),
@ -117,10 +117,10 @@ class OnboardingStepTen extends StatelessWidget {
? pinForm(context, walletOptions, pinLenght, 1, 2)
: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: const [
children: [
Text(
'Vous devez vous connecter à internet\npour valider votre coffre',
style: TextStyle(
"youHaveToBeConnectedToValidateChest".tr(),
style: const TextStyle(
fontSize: 20,
color: Colors.redAccent,
fontWeight: FontWeight.w500,

View File

@ -42,6 +42,8 @@ class TransactionInProgress extends StatelessWidget {
String actionName = '';
final bool isUdUnit = configBox.get('isUdUnit') ?? false;
log.d("$transType :: $actionName :: $result");
switch (transType) {
case 'pay':
{
@ -94,7 +96,6 @@ class TransactionInProgress extends StatelessWidget {
{
isLoading = false;
// jsonResult = json.decode(_result);
log.d(result);
if (result.contains('blockHash: ')) {
isValid = true;
resultText = 'extrinsicValidated'.tr(args: [actionName]);
@ -110,7 +111,7 @@ class TransactionInProgress extends StatelessWidget {
} else {
exception = exceptionSplit[0];
}
// log.d('expection: $_exception');
log.d('expection: $exceptionSplit');
switch (exception) {
case 'cert.NotRespectCertPeriod':
case 'identity.CreatorNotAllowedToCreateIdty':

43
lib/styles.dart Normal file
View File

@ -0,0 +1,43 @@
// import 'dart:io';
import 'package:flutter/material.dart';
// import 'package:logger/logger.dart';
// --- THIS IS WIP ---
class GeckoStyles {
TextStyle successBold(List<String> pars) {
return TextStyle(
color: Colors.green.shade600,
fontWeight: FontWeight.bold,
);
}
TextStyle success() {
return TextStyle(
color: Colors.green.shade600
);
}
TextStyle error500(List<String> pars) {
return const TextStyle(
fontSize: 20,
color: Colors.redAccent,
fontWeight: FontWeight.w500,
);
}
TextStyle error() {
return const TextStyle(fontSize: 20, color: Colors.redAccent);
}
TextStyle builder(Map<String, dynamic> pars) {
// pars["hola"] = 20;
// //int a = double.tryParse(source) pars["hola"];
// return const TextStyle( fontSize: double.tryParse(pars["hola"]),
// color: Colors.redAccent,
// fontWeight: FontWeight.w500
// );
return const TextStyle();
}
}