Merge branch 'easyLocalization'

This commit is contained in:
poka 2022-06-18 03:19:01 +02:00
commit f02cd7d192
50 changed files with 1004 additions and 509 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 KiB

View File

Before

Width:  |  Height:  |  Size: 211 KiB

After

Width:  |  Height:  |  Size: 211 KiB

View File

Before

Width:  |  Height:  |  Size: 166 KiB

After

Width:  |  Height:  |  Size: 166 KiB

172
assets/translations/en.json Normal file
View File

@ -0,0 +1,172 @@
{
"searchWallet": "Search\nwallet",
"manageWallets": "Manage\nwallets",
"scanQRCode": "Scan a\nQR code",
"wellConnectedToNode": "You are well connected to node\n{}",
"networkLost": "Network has been lost...",
"noDuniterEndointAvailable": "No server available...",
"connectionPending": "Connection pending...",
"noLizard": "no lounge lizard ;-)",
"loading": "Loading...",
"forgot_password.png": "forgot_password_en.png",
"warningForgotPassword": "In a blockchain, there is no email recovery procedure. Only your recovery phrase can allow you to recover your Ğ1 at any time.",
"fastAppDescription": "The {} app payment\nfaster than a reptile of Vietnam",
"createWallet": "Create a wallet",
"restoreWallet": "Restore my wallets",
"parameters": "Parameters",
"chooseAnotherMnemonic": "Choose an other\nmnemonic sentence",
"iNotedMyMnemonic": "I wrote down my sentence",
"printMyMnemonic": "Print my mnemonic sentence",
"manageChest": "Configure this chest",
"changeChest": "Change chest",
"geckoChest": "Ğecko chest",
"toUnlockEnterPassword": "To unlock your safe, enter your secret code, away from prying lizards:",
"rememberPassword": "Keep this code in memory for 15 minutes",
"myRootWallet": "My root wallet",
"currentWallet": "My current chest",
"wallet": "Wallet",
"displayMnemonic": "Display my mnemonic sentence",
"changePassword": "Change my password",
"createDerivation": "Create a new derivation",
"createCustomDerivation": "Create a new custom derivation",
"deleteChest": "Delete this chest",
"openThisChest": "Open this chest",
"createChest": "Create a new chest",
"importChest": "Import a chest",
"selectMyChest": "Select my chest",
"accessMyChest": "Access my chest",
"manageMembership": "Manage my membership",
"chooseThisWallet": "Choose this wallet",
"thisWalletIsDefault": "This wallet is the default one",
"defineWalletAsDefault": "Define this as the default one",
"displayActivity": "Display activity",
"displayNActivity": "Display\nactivity",
"memberValidated": "Validated member!",
"copyAddress": "Copy\naddress",
"copy": "Copy",
"thisAddressHasBeenCopiedToClipboard": "This address has been copied to clipboard",
"chooseWalletName": "Choose a new name\nfor your wallet:",
"choosePassword": "Choose a random password:",
"chooseDerivation": "Choose a derivation:",
"validate": "Validate",
"confirm": "Confirm",
"confirmPayment": "Confirm payment",
"clickHereToConfirmIdentity": "Click here to confirm\nyour new identity",
"geckoGenerateYourWalletFromMnemonic": "Ğecko builds your wallet from a **restoration sentence**. It is a bit like the blueprint that builds your wallet.",
"keepThisMnemonicSecure": "Keep this sentence carefully, because without it Ğecko will not be able to rebuild your wallets the day you change your phone.",
"geckoGeneratedYourMnemonicKeepItSecret": "Ğecko generated your mnemonic successfully! Keep it secret, because anyone who knows it can access all your wallets.",
"newWallet": "New Wallet",
"itsTimeToUseAPenAndPaper": "It's time to take a **pen and paper** in order to write down your mnemonic.",
"yourMnemonic": "Your mnemonic",
"gecko_also_can_forget.png": "gecko_also_can_forget_en.png",
"didYouNoteMnemonicToBeSureTypeWord": "Did you write down your menmonic?\n\n To be sure, please type the **{}th word** of your restoration phrase in the field below:",
"geckoWillGenerateAPassword": "Gecko will now generate for you a short password that will allow you to quickly access your wallets, without having to type your recovery sentence every time.",
"myPassword": "My password",
"thisPasswordProtectsYourWalletsInASecureChest": "This secret code protects your wallets in a safe **which only you have the code for**, so that your wallets cannot be used by others.",
"hereIsThePasswordKeepIt": "And here is your password!\n\nMemorize it or write it down, because you will be asked **every time** you want to make a payment on this device.",
"chooseAnotherPassword": "Choose an other password",
"iNotedMyPassword": "I noted my password",
"geckoWillCheckPassword": "Gecko will check with you if you have remembered your secret code.\n\n Type your secret code in the field below to check that you have written it down correctly.",
"yourChestAndWalletWereCreatedSuccessfully": "Super!\n\nYour chest and your first portfolio have been created with great success.\n\nCongratulations!",
"allGood": "That's all good!",
"areYouSureToDeleteWallet": "Are you sure you want to delete the chest \"{}\"?",
"areYouSureForgetAllChests": "Are you sure you want to forget all your chests?",
"areYouSureToForgetWallet": "Are you sure you wan to forget the wallet \"{}\"?",
"areYouSureYouWantToCertify": "Are you sure you want to certify the address:\n\n{}",
"yes": "Yes",
"no": "No",
"keepYourMnemonicSecret": "Try to keep this phrase a secret, as it allows anyone who knows it to access all your wallets.",
"iGeneratedYourMnemonicKeepItSecret": "I've generated your restoration phrase!\n Try to keep it a secret, as it allows anyone who knows it to access all your portfolios.",
"myMnemonic": "My mnemonic",
"close": "Close",
"toRestoreEnterMnemonic": "To restore your Gecko wallets, enter in the fields below the 12 words that constitute your restoration phrase:",
"pasteFromClipboard": "Paste from\nclipboard",
"restoreAChest": "Restore a chest",
"restoreThisChest": "Restore this chest",
"continue": "Continue",
"itsTheGoodWord": "It's the good word!",
"nthMnemonicWord": "word of your mnemonic",
"1th": "First",
"2th": "Second",
"3th": "Third",
"4th": "Fourth",
"5th": "Fifth",
"6th": "Sixth",
"7th": "Seventh",
"8th": "Eighth",
"9th": "Ninth",
"10th": "Tenth",
"11th": "Eleventh",
"12th": "Twelfth",
"yourPasswordLengthIsX": "Your password length is {}",
"noIdentity": "No identity",
"identityCreated": "Identity created",
"identityConfirmed": "Identity confirmed",
"identityExpired": "Identity expired",
"confirmYourIdentity": "Confirm your identity",
"noDuniterNodeAvailableTryLater": "No Duniter node available, please try again later",
"youAreConnectedToNode": "You are connected to node",
"accountActivity": "Account activity",
"noNetworkNoHistory": "Network state does not allow\nto display account history",
"noDataToDisplay": "No data to be displayed.",
"noTranscationToDisplay": "No transaction to display",
"month1": "January",
"month2": "February",
"month3": "March",
"month4": "April",
"month5": "May",
"month6": "June",
"month7": "July",
"month8": "August",
"month9": "September",
"month10": "October",
"month11": "November",
"month12": "December",
"today": "Today",
"yesterday": "Yesterday",
"thisWeek": "This week",
"chestNotCompatibleMustReinstallGecko": "The version of your safes is no longer compatible with this version of Ğecko.\nAll your safes will be forgotten, you must import them again.",
"notConnectedToInternet": "You are note connected to internet",
"researchResults": "Results of your research",
"resultsFor": "Results for ",
"forgetAllMyChests": "Forget all my chests",
"transaction": "Transaction",
"certification": "Certification",
"identityConfirm": "Identity confirmation",
"revokeAdhesion": "Adhesion revocation",
"strangeTransaction": "Strange transaction",
"sending": "Sending...",
"propagating": "Propagating...",
"validating": "Validating...",
"anErrorOccured": "An error occured",
"24hbetweenCerts": "You have to wait 24h between certs",
"canNotCertifySelf": "You can not certify yourself",
"nameAlreadyExist": "This name is already taken",
"2GDtoKeepAlive": "You have to keep at least 2ĞD to keep your account alive",
"youHaveToFeedThisAccountBeforeUsing": "You have to feed this account\nbefore using it.",
"execTimeoutOver": "Execution timeout is over",
"seeAWallet": "See a wallet",
"mustWaitXBeforeCertify": "You have to wait\n{} before\ncertifying again",
"canRenewCertInX": "You can renew\nthis certification\nin {}",
"executeATransfer": "Execute a transfer",
"executeTheTransfer": "Execute the transfer",
"doATransfer" : "Execute a\ntransfer",
"seconds": "{} seconds",
"minutes": "{} minutes",
"hours": "{} hours {}",
"days": "{} days",
"months": "{} months",
"certify": "Certify",
"from": "From:",
"amount": "Amount:",
"choiceOfSourceWallet": "Choose a source wallet",
"extrinsicInProgress": "{} in progress",
"extrinsicValidated": "{} validated !",
"fromMinus": "from",
"toMinus": "to",
"deleteThisWallet": "Delete this wallet",
"cancel": "Cancel",
"inBlockchainResult": "In {} blockchain",
"search": "Search",
"currencyNode": "{} node :"
}

172
assets/translations/es.json Normal file
View File

@ -0,0 +1,172 @@
{
"searchWallet": "Search\nwallet",
"manageWallets": "Manage\nwallets",
"scanQRCode": "Escanear un\ncódigo QR",
"wellConnectedToNode": "Estas bien conectada al nodo\n{}",
"networkLost": "Se ha perdido la red...",
"noDuniterEndointAvailable": "No hay servidor disponible...",
"connectionPending": "Conexión pendiente...",
"noLizard": "no hay lagarto ;-)",
"loading": "Cargando...",
"forgot_password.png": "forgot_password_en.png",
"warningForgotPassword": "In a blockchain, there is no email recovery procedure. Only your recovery phrase can allow you to recover your Ğ1 at any time.",
"fastAppDescription": "La aplicación de pago {}\nmás rápida que un reptil de Vietnam",
"createWallet": "Crear una billetera",
"restoreWallet": "Restaurar mis billeteras",
"parameters": "Parameters",
"chooseAnotherMnemonic": "Choose an other\nmnemonic sentence",
"iNotedMyMnemonic": "I wrote down my sentence",
"printMyMnemonic": "Print my mnemonic sentence",
"manageChest": "Configure this chest",
"changeChest": "Change chest",
"geckoChest": "Ğecko chest",
"toUnlockEnterPassword": "To unlock your safe, enter your secret code, away from prying lizards:",
"rememberPassword": "Keep this code in memory for 15 minutes",
"myRootWallet": "My root wallet",
"currentWallet": "My current chest",
"wallet": "Wallet",
"displayMnemonic": "Display my mnemonic sentence",
"changePassword": "Change my password",
"createDerivation": "Create a new derivation",
"createCustomDerivation": "Create a new custom derivation",
"deleteChest": "Delete this chest",
"openThisChest": "Open this chest",
"createChest": "Create a new chest",
"importChest": "Import a chest",
"selectMyChest": "Select my chest",
"accessMyChest": "Access my chest",
"manageMembership": "Manage my membership",
"chooseThisWallet": "Choose this wallet",
"thisWalletIsDefault": "This wallet is the default one",
"defineWalletAsDefault": "Define this as the default one",
"displayActivity": "Display activity",
"displayNActivity": "Display\nactivity",
"memberValidated": "Validated member!",
"copyAddress": "Copy\naddress",
"copy": "Copy",
"thisAddressHasBeenCopiedToClipboard": "This address has been copied to clipboard",
"chooseWalletName": "Choose a new name\nfor your wallet:",
"choosePassword": "Choose a random password:",
"chooseDerivation": "Choose a derivation:",
"validate": "Validate",
"confirm": "Confirm",
"confirmPayment": "Confirm payment",
"clickHereToConfirmIdentity": "Click here to confirm\nyour new identity",
"geckoGenerateYourWalletFromMnemonic": "Ğecko builds your wallet from a **restoration sentence**. It is a bit like the blueprint that builds your wallet.",
"keepThisMnemonicSecure": "Keep this sentence carefully, because without it Ğecko will not be able to rebuild your wallets the day you change your phone.",
"geckoGeneratedYourMnemonicKeepItSecret": "Ğecko generated your mnemonic successfully! Keep it secret, because anyone who knows it can access all your wallets.",
"newWallet": "New Wallet",
"itsTimeToUseAPenAndPaper": "It's time to take a **pen and paper** in order to write down your mnemonic.",
"yourMnemonic": "Your mnemonic",
"gecko_also_can_forget.png": "gecko_also_can_forget_en.png",
"didYouNoteMnemonicToBeSureTypeWord": "Did you write down your menmonic?\n\n To be sure, please type the **{}th word** of your restoration phrase in the field below:",
"geckoWillGenerateAPassword": "Gecko will now generate for you a short password that will allow you to quickly access your wallets, without having to type your recovery sentence every time.",
"myPassword": "My password",
"thisPasswordProtectsYourWalletsInASecureChest": "This secret code protects your wallets in a safe **which only you have the code for**, so that your wallets cannot be used by others.",
"hereIsThePasswordKeepIt": "And here is your password!\n\nMemorize it or write it down, because you will be asked **every time** you want to make a payment on this device.",
"chooseAnotherPassword": "Choose an other password",
"iNotedMyPassword": "I noted my password",
"geckoWillCheckPassword": "Gecko will check with you if you have remembered your secret code.\n\n Type your secret code in the field below to check that you have written it down correctly.",
"yourChestAndWalletWereCreatedSuccessfully": "Super!\n\nYour chest and your first portfolio have been created with great success.\n\nCongratulations!",
"allGood": "That's all good!",
"areYouSureToDeleteWallet": "Are you sure you want to delete the chest \"{}\"?",
"areYouSureForgetAllChests": "Are you sure you want to forget all your chests?",
"areYouSureToForgetWallet": "Are you sure you wan to forget the wallet \"{}\"?",
"areYouSureYouWantToCertify": "Are you sure you want to certify the address:\n\n{}",
"yes": "Yes",
"no": "No",
"keepYourMnemonicSecret": "Try to keep this phrase a secret, as it allows anyone who knows it to access all your wallets.",
"iGeneratedYourMnemonicKeepItSecret": "I've generated your restoration phrase!\n Try to keep it a secret, as it allows anyone who knows it to access all your portfolios.",
"myMnemonic": "My mnemonic",
"close": "Close",
"toRestoreEnterMnemonic": "To restore your Gecko wallets, enter in the fields below the 12 words that constitute your restoration phrase:",
"pasteFromClipboard": "Paste from\nclipboard",
"restoreAChest": "Restore a chest",
"restoreThisChest": "Restore this chest",
"continue": "Continue",
"itsTheGoodWord": "It's the good word!",
"nthMnemonicWord": "word of your mnemonic",
"1th": "First",
"2th": "Second",
"3th": "Third",
"4th": "Fourth",
"5th": "Fifth",
"6th": "Sixth",
"7th": "Seventh",
"8th": "Eighth",
"9th": "Ninth",
"10th": "Tenth",
"11th": "Eleventh",
"12th": "Twelfth",
"yourPasswordLengthIsX": "Your password length is {}",
"noIdentity": "No identity",
"identityCreated": "Identity created",
"identityConfirmed": "Identity confirmed",
"identityExpired": "Identity expired",
"confirmYourIdentity": "Confirm your identity",
"noDuniterNodeAvailableTryLater": "No Duniter node available, please try again later",
"youAreConnectedToNode": "You are connected to node",
"accountActivity": "Account activity",
"noNetworkNoHistory": "Network state does not allow\nto display account history",
"noDataToDisplay": "No data to be displayed.",
"noTranscationToDisplay": "No transaction to display",
"month1": "January",
"month2": "February",
"month3": "March",
"month4": "April",
"month5": "May",
"month6": "June",
"month7": "July",
"month8": "August",
"month9": "September",
"month10": "October",
"month11": "November",
"month12": "December",
"today": "Today",
"yesterday": "Yesterday",
"thisWeek": "This week",
"chestNotCompatibleMustReinstallGecko": "The version of your safes is no longer compatible with this version of Ğecko.\nAll your safes will be forgotten, you must import them again.",
"notConnectedToInternet": "You are note connected to internet",
"researchResults": "Results of your research",
"resultsFor": "Results for ",
"forgetAllMyChests": "Forget all my chests",
"transaction": "Transaction",
"certification": "Certification",
"identityConfirm": "Identity confirmation",
"revokeAdhesion": "Adhesion revocation",
"strangeTransaction": "Strange transaction",
"sending": "Sending...",
"propagating": "Propagating...",
"validating": "Validating...",
"anErrorOccured": "An error occured",
"24hbetweenCerts": "You have to wait 24h between certs",
"canNotCertifySelf": "You can not certify yourself",
"nameAlreadyExist": "This name is already taken",
"2GDtoKeepAlive": "You have to keep at least 2ĞD to keep your account alive",
"youHaveToFeedThisAccountBeforeUsing": "You have to feed this account\nbefore using it.",
"execTimeoutOver": "Execution timeout is over",
"seeAWallet": "See a wallet",
"mustWaitXBeforeCertify": "You have to wait\n{} before\ncertifying again",
"canRenewCertInX": "You can renew\nthis certification\nin {}",
"executeATransfer": "Execute a transfer",
"executeTheTransfer": "Execute the transfer",
"doATransfer" : "Execute a\ntransfer",
"seconds": "{} seconds",
"minutes": "{} minutes",
"hours": "{} hours {}",
"days": "{} days",
"months": "{} months",
"certify": "Certify",
"from": "From:",
"amount": "Amount:",
"choiceOfSourceWallet": "Choose a source wallet",
"extrinsicInProgress": "{} in progress",
"extrinsicValidated": "{} validated !",
"fromMinus": "from",
"toMinus": "to",
"deleteThisWallet": "Delete this wallet",
"cancel": "Cancel",
"inBlockchainResult": "In {} blockchain",
"search": "Search",
"currencyNode": "{} node :"
}

173
assets/translations/fr.json Normal file
View File

@ -0,0 +1,173 @@
{
"searchWallet": "Rechercher un\nportefeuille",
"manageWallets": "Gérer mes\nportefeuilles",
"scanQRCode": "Scanner un\nQR code",
"wellConnectedToNode": "Vous êtes bien connecté aux noeud\n{}",
"networkLost": "Le réseau a été perdu...",
"noDuniterEndointAvailable": "Aucun serveur disponible...",
"connectionPending": "Connexion en cours...",
"noLizard": "y'a pas de lézard ;-)",
"loading": "Chargement en cours...",
"forgot_password.png": "forgot_password_fr.png",
"warningForgotPassword": "Dans une blockchain, pas de procédure de récupération par mail. Seule votre phrase de restauration peut vous permettre de récupérer vos Ğ1 à tout moment.",
"fastAppDescription": "Lapplication de paiement {}\nplus rapide quun reptile du Vietnam",
"createWallet": "Créer un portefeuille",
"restoreWallet": "Restaurer mes portefeuilles",
"parameters": "Paramètres",
"chooseAnotherMnemonic": "Choisir une autre phrase",
"iNotedMyMnemonic": "J'ai noté ma phrase",
"printMyMnemonic": "Imprimer ma phrase de restauration",
"manageChest": "Paramétrer ce coffre",
"changeChest": "Changer de coffre",
"geckoChest": "Coffre à Ğecko",
"toUnlockEnterPassword": "Pour déverrouiller votre coffre, composez votre code secret à labri des lézards indiscrets :",
"rememberPassword": "Garder ce code en mémoire 15 minutes",
"myRootWallet": "Mon portefeuille racine",
"currentWallet": "Mon portefeuille courant",
"wallet": "Portefeuille",
"displayMnemonic": "Afficher ma phrase de restauration",
"changePassword": "Changer mon code secret",
"createDerivation": "Créer une autre dérivation",
"createCustomDerivation": "Créer une dérivation personnalisé",
"deleteChest": "Supprimer ce coffre",
"openThisChest": "Ouvrir ce coffre",
"createChest": "Créer un nouveau coffre",
"importChest": "Importer un coffre",
"selectMyChest": "Sélectionner mon coffre",
"accessMyChest": "Accéder à mon coffre",
"manageMembership": "Gérer mon adhésion",
"chooseThisWallet": "Choisir ce portefeuille",
"thisWalletIsDefault": "Ce portefeuille est celui par defaut",
"defineWalletAsDefault": "Définir comme portefeuille par défaut",
"displayActivity": "Voir l'activité",
"displayNActivity": "Voir\nl'activité",
"memberValidated": "Membre validé !",
"copyAddress": "Copier\nl'adresse",
"copy": "Copier",
"thisAddressHasBeenCopiedToClipboard": "Cette adresse a été copié dans votre presse-papier.",
"chooseWalletName": "Choisissez un nouveau nom\npour votre portefeuille :",
"choosePassword": "Choisissez un code secret autogénéré :",
"chooseDerivation": "Choisissez une dérivation:",
"validate": "Valider",
"confirm": "Confirmer",
"confirmPayment": "Confirmer le paiement",
"clickHereToConfirmIdentity": "Cliquez ici pour confirmer\nvotre nouvelle identité",
"geckoGenerateYourWalletFromMnemonic": "Ğecko fabrique votre portefeuille à partir dune **phrase de restauration**. Elle est un peu comme le plan qui permet de construire votre portefeuille.",
"keepThisMnemonicSecure": "Conservez cette phrase précieusement, car sans elle Ğecko ne pourra pas reconstruire vos portefeuilles le jour où vous changez de téléphone.",
"geckoGeneratedYourMnemonicKeepItSecret": "Gecko a généré votre phrase de restauration ! Tâchez de la garder bien secrète, car elle permet à quiconque la connaît daccéder à tous vos portefeuilles.",
"newWallet": "Nouveau portefeuille",
"itsTimeToUseAPenAndPaper": "Il est temps de vous munir d**un papier et dun crayon** afin de pouvoir noter votre phrase de restauration.",
"yourMnemonic": "Votre phrase de restauration",
"gecko_also_can_forget.png": "gecko_also_can_forget_fr.png",
"didYouNoteMnemonicToBeSureTypeWord": "Avez-vous bien noté votre phrase de restauration ?\n\nPour en être sûr, veuillez taper dans le champ ci-dessous le **{}ème mot** de votre phrase de restauration :",
"geckoWillGenerateAPassword": "Gecko va maintenant générer pour vous un code secret court qui vous permettra daccéder rapidement à vos portefeuilles, sans avoir à taper votre phrase de restauration à chaque fois.",
"myPassword": "Mon code secret",
"thisPasswordProtectsYourWalletsInASecureChest": "Ce code secret protège vos portefeuilles dans un coffre-fort **dont vous seul possédez le code**, de sorte que vos portefeuilles seront inutilisables par dautres.",
"hereIsThePasswordKeepIt": "Et voilà votre code secret !\n\nMémorisez-le ou notez-le, car il vous sera demandé **à chaque fois** que vous voudrez effectuer un paiement sur cet appareil.",
"chooseAnotherPassword": "Choisir un autre code secret",
"iNotedMyPassword": "J'ai noté mon code secret",
"geckoWillCheckPassword": "Gecko va vérifier avec vous si vous avez bien mémorisé votre code secret.\n\nTapez votre code secret dans le champ ci-dessous pour vérifier que vous lavez bien noté.",
"yourChestAndWalletWereCreatedSuccessfully": "Top !\n\nVotre coffre votre premier portefeuille ont été créés avec un immense succès.\n\nFélicitations !",
"allGood": "Cest tout bon !",
"areYouSureToDeleteWallet": "Êtes-vous sûr de vouloir supprimer le coffre \"{}\" ?",
"areYouSureForgetAllChests": "Êtes-vous sûr de vouloir oublier tous vos coffres ?",
"areYouSureToForgetWallet": "Êtes-vous sûr de vouloir oublier le portefeuille \"{}\" ?",
"areYouSureYouWantToCertify": "Êtes-vous certain de vouloir certifier l'adresse:\n\n{}",
"yes": "Oui",
"no": "Non",
"keepYourMnemonicSecret": "Tâchez de garder cette phrase bien secrète, car elle permet à quiconque la connaît daccéder à tous vos portefeuilles.",
"iGeneratedYourMnemonicKeepItSecret": "Jai généré votre phrase de restauration !\nTâchez de la garder bien secrète, car elle permet à quiconque la connaît daccéder à tous vos portefeuilles.",
"myMnemonic": "Ma phrase de restauration",
"close": "Fermer",
"toRestoreEnterMnemonic": "Pour restaurer vos portefeuilles Gecko, rentrez dans les champs ci-dessous les 12 mots qui constituent votre phrase de restauration :",
"pasteFromClipboard": "Coller depuis le\npresse-papier",
"restoreAChest": "Restaurer un coffre",
"restoreThisChest": "Restaurer ce coffre",
"continue": "Continuer",
"itsTheGoodWord": "C'est le bon mot !",
"nthMnemonicWord": "mot de votre phrase de restauration",
"1th": "Premier",
"2th": "Deuxième",
"3th": "Troisième",
"4th": "Quatrième",
"5th": "Cinquième",
"6th": "Sixième",
"7th": "Septième",
"8th": "Huitième",
"9th": "Neuvième",
"10th": "Dixième",
"11th": "Onzième",
"12th": "Douzième",
"yourPasswordLengthIsX": "Votre code PIN fait {} caractères",
"noIdentity": "Aucune identité",
"identityCreated": "Identité créée",
"identityConfirmed": "Identité confirmée",
"identityExpired": "Identité expirée",
"confirmYourIdentity": "Confirmez votre identité",
"noResult": "Aucun résultat",
"noDuniterNodeAvailableTryLater": "Aucun noeud Duniter disponible, veuillez réessayer ultérieurement",
"youAreConnectedToNode": "Vous êtes connecté au noeud",
"accountActivity": "Activité du compte",
"noNetworkNoHistory": "L'état du réseau ne permet pas\nd'afficher l'historique du compte",
"noDataToDisplay": "Aucune donnée à afficher.",
"noTranscationToDisplay": "Aucune transaction à afficher",
"month1": "Janvier",
"month2": "Février",
"month3": "Mars",
"month4": "Avril",
"month5": "Mai",
"month6": "Juin",
"month7": "Juillet",
"month8": "Aout",
"month9": "Septembre",
"month10": "Octobre",
"month11": "Novembre",
"month12": "Décembre",
"today": "Aujourd'hui",
"yesterday": "Hier",
"thisWeek": "Cette semaine",
"chestNotCompatibleMustReinstallGecko": "La version de vos coffres n'est plus comptabile avec cette version de Ğecko.\nTous vos coffres vont être oubliés, vous devez les importer de nouveau.",
"notConnectedToInternet": "Vous n'êtes pas connecté à internet",
"researchResults": "Résultats de votre recherche",
"resultsFor": "Résultats pour ",
"forgetAllMyChests": "Oublier tous mes coffres",
"transaction": "Transaction",
"certification": "Certification",
"identityConfirm": "Confirmation d'identité",
"revokeAdhesion": "Révocation d'adhésion",
"strangeTransaction": "Transaction étrange",
"sending": "Envoi en cours...",
"propagating": "En cours de propagation...",
"validating": "En cours de validation...",
"anErrorOccured": "Une erreur s'est produite",
"24hbetweenCerts": "Vous devez attendre 24h entre chaque certification",
"canNotCertifySelf": "Vous ne pouvez pas vous certifier\nvous même ...",
"nameAlreadyExist": "Ce nom est déjà pris",
"2GDtoKeepAlive": "Vous devez garder au moins 2ĞD sur votre compte pour le garder actif",
"youHaveToFeedThisAccountBeforeUsing": "Vous devez alimenter ce compte avant\nde pouvoir l'utiliser",
"execTimeoutOver": "Le délais d'éxecution est dépassé",
"seeAWallet": "Voir un portefeuille",
"mustWaitXBeforeCertify": "Vous devez attendre\n{} avant\nde pouvoir certifier",
"canRenewCertInX": "Vous pourrez renouveller\ncette certification\ndans {}",
"executeATransfer": "Effectuer un virement",
"executeTheTransfer": "Effectuer le virement",
"doATransfer": "Faire un\nvirement",
"seconds": "{} secondes",
"minutes": "{} minutes",
"hours": "{} heures {}",
"days": "{} jours",
"months": "{} mois",
"certify": "Certifier",
"from": "Depuis:",
"amount": "Montant:",
"choiceOfSourceWallet": "Choix du portefeuille source",
"extrinsicInProgress": "{} en cours",
"extrinsicValidated": "{} validé !",
"fromMinus": "de",
"toMinus": "vers",
"deleteThisWallet": "Supprimer ce portefeuille",
"cancel": "Annuler",
"inBlockchainResult": "Dans la blockchain {}",
"search": "Rechercher",
"currencyNode": "Noeud {} :"
}

View File

@ -45,11 +45,13 @@ import 'package:shared_preferences/shared_preferences.dart';
import 'package:sentry_flutter/sentry_flutter.dart'; import 'package:sentry_flutter/sentry_flutter.dart';
import 'package:window_size/window_size.dart'; import 'package:window_size/window_size.dart';
import 'package:graphql_flutter/graphql_flutter.dart'; import 'package:graphql_flutter/graphql_flutter.dart';
import 'package:easy_localization/easy_localization.dart';
const bool enableSentry = true; const bool enableSentry = true;
Future<void> main() async { Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
await EasyLocalization.ensureInitialized();
if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) { if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
setWindowTitle('Ğecko'); setWindowTitle('Ğecko');
setWindowMinSize(const Size(400, 700)); setWindowMinSize(const Size(400, 700));
@ -97,27 +99,31 @@ Future<void> main() async {
// // ]); // // ]);
// Catcher(rootWidget: Gecko(endPointGVA, _store), debugConfig: debugOptions); // Catcher(rootWidget: Gecko(endPointGVA, _store), debugConfig: debugOptions);
await SentryFlutter.init((options) { await SentryFlutter.init(
options.dsn = (options) {
'https://c09587b46eaa42e8b9fda28d838ed180@o496840.ingest.sentry.io/5572110'; options.dsn =
}, appRunner: () => runApp(Gecko(indexerEndpoint))); 'https://c09587b46eaa42e8b9fda28d838ed180@o496840.ingest.sentry.io/5572110';
},
// runZoned<Future<void>>( appRunner: () => runApp(
// () async { EasyLocalization(
// runApp(Gecko(endPointGVA, _store)); supportedLocales: const [Locale('en'), Locale('fr')],
// }, path: 'assets/translations',
// onError: (dynamic error, StackTrace stackTrace) { fallbackLocale: const Locale('en'),
// print("=================== CAUGHT DART ERROR"); child: Gecko(indexerEndpoint),
// // Sentry.captureException( ),
// // error, ),
// // stackTrace: stackTrace, );
// // );
// },
// ));
} else { } else {
print('Debug mode enabled: No sentry alerte'); print('Debug mode enabled: No sentry alerte');
runApp(Gecko(indexerEndpoint)); runApp(
EasyLocalization(
supportedLocales: const [Locale('en'), Locale('fr'), Locale('es')],
path: 'assets/translations',
fallbackLocale: const Locale('fr'),
child: Gecko(indexerEndpoint),
),
);
} }
} }
@ -145,6 +151,9 @@ class Gecko extends StatelessWidget {
ChangeNotifierProvider(create: (_) => DuniterIndexer()) ChangeNotifierProvider(create: (_) => DuniterIndexer())
], ],
child: MaterialApp( child: MaterialApp(
localizationsDelegates: context.localizationDelegates,
supportedLocales: context.supportedLocales,
locale: context.locale,
builder: (context, widget) => ResponsiveWrapper.builder( builder: (context, widget) => ResponsiveWrapper.builder(
BouncingScrollWrapper.builder(context, widget!), BouncingScrollWrapper.builder(context, widget!),
maxWidth: 1200, maxWidth: 1200,

View File

@ -1,4 +1,5 @@
import 'dart:async'; import 'dart:async';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
import 'package:gecko/models/chest_data.dart'; import 'package:gecko/models/chest_data.dart';
@ -55,17 +56,16 @@ class ChestProvider with ChangeNotifier {
barrierDismissible: true, // user must tap button! barrierDismissible: true, // user must tap button!
builder: (BuildContext context) { builder: (BuildContext context) {
return AlertDialog( return AlertDialog(
title: Text( title: Text('areYouSureToDeleteWallet'.tr(args: [_walletName!])),
'Êtes-vous sûr de vouloir supprimer le coffre "$_walletName" ?'),
actions: <Widget>[ actions: <Widget>[
TextButton( TextButton(
child: const Text("Non", key: Key('cancelDeleting')), child: Text("no".tr(), key: const Key('cancelDeleting')),
onPressed: () { onPressed: () {
Navigator.pop(context, false); Navigator.pop(context, false);
}, },
), ),
TextButton( TextButton(
child: const Text("Oui", key: Key('confirmDeleting')), child: Text("yes".tr(), key: const Key('confirmDeleting')),
onPressed: () { onPressed: () {
Navigator.pop(context, true); Navigator.pop(context, true);
}, },

View File

@ -1,6 +1,7 @@
import 'dart:async'; import 'dart:async';
import 'dart:convert'; import 'dart:convert';
import 'dart:io'; import 'dart:io';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
@ -229,13 +230,13 @@ class DuniterIndexer with ChangeNotifier {
} }
if (result.isLoading) { if (result.isLoading) {
return const Text('Loading'); return Text('loading'.tr());
} }
final List identities = result.data?['search_identity'] ?? []; final List identities = result.data?['search_identity'] ?? [];
if (identities.isEmpty) { if (identities.isEmpty) {
return const Text('Aucun résultat'); return Text('noResult'.tr());
} }
int keyID = 0; int keyID = 0;

View File

@ -1,6 +1,7 @@
import 'dart:math'; import 'dart:math';
import 'dart:typed_data'; import 'dart:typed_data';
import 'package:durt/durt.dart' as durt; import 'package:durt/durt.dart' as durt;
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
@ -62,9 +63,9 @@ class GenerateWalletsProvider with ChangeNotifier {
String chestName; String chestName;
if (chestNumber == 0) { if (chestNumber == 0) {
chestName = 'Coffre à Ğecko'; chestName = 'geckoChest'.tr();
} else { } else {
chestName = 'Coffre à Ğecko ${chestNumber + 1}'; chestName = 'geckoChest'.tr() + '${chestNumber + 1}';
} }
await configBox.put('currentChest', chestNumber); await configBox.put('currentChest', chestNumber);
@ -119,18 +120,18 @@ class GenerateWalletsProvider with ChangeNotifier {
String? intToString(int _nbr) { String? intToString(int _nbr) {
Map nbrToString = {}; Map nbrToString = {};
nbrToString[1] = 'Premier'; nbrToString[1] = '1th'.tr();
nbrToString[2] = 'Deuxième'; nbrToString[2] = '2th'.tr();
nbrToString[3] = 'Troisième'; nbrToString[3] = '3th'.tr();
nbrToString[4] = 'Quatrième'; nbrToString[4] = '4th'.tr();
nbrToString[5] = 'Cinquième'; nbrToString[5] = '5th'.tr();
nbrToString[6] = 'Sixième'; nbrToString[6] = '6th'.tr();
nbrToString[7] = 'Septième'; nbrToString[7] = '7th'.tr();
nbrToString[8] = 'Huitième'; nbrToString[8] = '8th'.tr();
nbrToString[9] = 'Neuvième'; nbrToString[9] = '9th'.tr();
nbrToString[10] = 'Dixième'; nbrToString[10] = '10th'.tr();
nbrToString[11] = 'Onzième'; nbrToString[11] = '11th'.tr();
nbrToString[12] = 'Douzième'; nbrToString[12] = '12th'.tr();
nbrWordAlpha = nbrToString[_nbr]; nbrWordAlpha = nbrToString[_nbr];
@ -400,8 +401,8 @@ class GenerateWalletsProvider with ChangeNotifier {
if (balance != 0) { if (balance != 0) {
isAlive = true; isAlive = true;
String walletName = scanedWalletNumber == 0 String walletName = scanedWalletNumber == 0
? 'Mon portefeuille courant' ? 'currentWallet'.tr()
: 'Portefeuille ${scanedWalletNumber + 1}'; : 'wallet'.tr() + ' ${scanedWalletNumber + 1}';
await _sub.importAccount( await _sub.importAccount(
mnemonic: '', mnemonic: '',
fromMnemonic: true, fromMnemonic: true,
@ -437,7 +438,7 @@ class GenerateWalletsProvider with ChangeNotifier {
log.d(balance); log.d(balance);
if (balance != 0) { if (balance != 0) {
String walletName = 'Mon portefeuille racine'; String walletName = 'myRootWallet'.tr();
await _sub.importAccount( await _sub.importAccount(
mnemonic: '', fromMnemonic: true, password: pin.text); mnemonic: '', fromMnemonic: true, password: pin.text);

View File

@ -3,6 +3,7 @@ import 'dart:io';
import 'dart:math'; import 'dart:math';
// import 'package:audioplayers/audio_cache.dart'; // import 'package:audioplayers/audio_cache.dart';
// import 'package:audioplayers/audioplayers.dart'; // import 'package:audioplayers/audioplayers.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'dart:async'; import 'dart:async';
@ -25,10 +26,8 @@ class HomeProvider with ChangeNotifier {
Icon searchIcon = const Icon(Icons.search); Icon searchIcon = const Icon(Icons.search);
final TextEditingController searchQuery = TextEditingController(); final TextEditingController searchQuery = TextEditingController();
Widget appBarTitle = Text('Ğecko', style: TextStyle(color: Colors.grey[850])); Widget appBarTitle = Text('Ğecko', style: TextStyle(color: Colors.grey[850]));
Widget appBarExplorer = String homeMessage = "loading".tr();
Text('Explorateur', style: TextStyle(color: Colors.grey[850])); String defaultMessage = "noLizard".tr();
String homeMessage = "Chargement en cours ...";
String defaultMessage = "y'a pas de lézard ;-)";
Future<void> initHive() async { Future<void> initHive() async {
late Directory hivePath; late Directory hivePath;
@ -211,20 +210,6 @@ class HomeProvider with ChangeNotifier {
); );
} }
void handleSearchEnd() {
searchIcon = Icon(
Icons.search,
color: Colors.grey[850],
);
appBarTitle = Text('Ğecko', style: TextStyle(color: Colors.grey[850]));
appBarExplorer =
Text('Explorateur', style: TextStyle(color: Colors.grey[850]));
isSearching = false;
searchQuery.clear();
notifyListeners();
}
void rebuildWidget() { void rebuildWidget() {
notifyListeners(); notifyListeners();
} }

View File

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'dart:async'; import 'dart:async';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
@ -90,7 +91,7 @@ class MyWalletsProvider with ChangeNotifier {
log.w('DELETE ALL WALLETS ?'); log.w('DELETE ALL WALLETS ?');
final bool? _answer = await (confirmPopup( final bool? _answer = await (confirmPopup(
context, 'Êtes-vous sûr de vouloir oublier tous vos coffres ?')); context, 'areYouSureForgetAllChests'.tr()));
if (_answer!) { if (_answer!) {
await walletBox.clear(); await walletBox.clear();
await chestBox.clear(); await chestBox.clear();

View File

@ -1,5 +1,6 @@
// ignore_for_file: avoid_print // ignore_for_file: avoid_print
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
@ -56,7 +57,7 @@ class SubstrateSdk with ChangeNotifier {
// _homeProvider.changeMessage("Vous n'êtes pas connecté à internet", 0); // _homeProvider.changeMessage("Vous n'êtes pas connecté à internet", 0);
// return; // return;
// } // }
_homeProvider.changeMessage("Connexion en cours...", 0); _homeProvider.changeMessage("connectionPending".tr(), 0);
for (String _endpoint in configBox.get('endpoint')) { for (String _endpoint in configBox.get('endpoint')) {
final n = NetworkParams(); final n = NetworkParams();
@ -109,7 +110,7 @@ class SubstrateSdk with ChangeNotifier {
// log.d(sdk.api.connectedNode?.endpoint); // log.d(sdk.api.connectedNode?.endpoint);
if (sdk.api.connectedNode?.endpoint == null) { if (sdk.api.connectedNode?.endpoint == null) {
nodeConnected = false; nodeConnected = false;
_homeProvider.changeMessage("Le réseau a été perdu...", 0); _homeProvider.changeMessage("networkLost".tr(), 0);
} else { } else {
nodeConnected = true; nodeConnected = true;
} }
@ -119,14 +120,15 @@ class SubstrateSdk with ChangeNotifier {
// currencyName = await getCurencyName(); // currencyName = await getCurencyName();
notifyListeners(); notifyListeners();
_homeProvider.changeMessage( _homeProvider.changeMessage(
'Vous êtes bien connecté aux noeud\n${getConnectedEndpoint()!.split('/')[2]}', "wellConnectedToNode"
.tr(args: [getConnectedEndpoint()!.split('/')[2]]),
5); 5);
// snackNode(ctx, true); // snackNode(ctx, true);
} else { } else {
nodeConnected = false; nodeConnected = false;
debugConnection = res.toString(); debugConnection = res.toString();
notifyListeners(); notifyListeners();
_homeProvider.changeMessage("Aucun server disponible...", 0); _homeProvider.changeMessage("noDuniterEndointAvailable".tr(), 0);
// snackNode(ctx, false); // snackNode(ctx, false);
} }
@ -756,13 +758,13 @@ class AddressInfo {
void snackNode(BuildContext context, bool isConnected) { void snackNode(BuildContext context, bool isConnected) {
String _message; String _message;
if (!isConnected) { if (!isConnected) {
_message = _message = "noDuniterNodeAvailableTryLater".tr() +
"Aucun noeud Duniter disponible, veuillez réessayer ultérieurement:\n${configBox.get('endpoint').first}"; ":\n${configBox.get('endpoint').first}";
} else { } else {
SubstrateSdk _sub = Provider.of<SubstrateSdk>(context, listen: false); SubstrateSdk _sub = Provider.of<SubstrateSdk>(context, listen: false);
_message = _message = "youAreConnectedToNode".tr() +
"Vous êtes connecté au noeud\n${_sub.getConnectedEndpoint()!.split('//')[1]}"; "\n${_sub.getConnectedEndpoint()!.split('//')[1]}";
} }
final snackBar = SnackBar( final snackBar = SnackBar(
padding: const EdgeInsets.all(20), padding: const EdgeInsets.all(20),

View File

@ -1,4 +1,5 @@
import 'dart:io'; import 'dart:io';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'dart:async'; import 'dart:async';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
@ -46,8 +47,8 @@ class WalletOptionsProvider with ChangeNotifier {
Future<int> deleteWallet(context, WalletData wallet) async { Future<int> deleteWallet(context, WalletData wallet) async {
SubstrateSdk _sub = Provider.of<SubstrateSdk>(context, listen: false); SubstrateSdk _sub = Provider.of<SubstrateSdk>(context, listen: false);
final bool? _answer = await (confirmPopup(context, final bool? _answer = await (confirmPopup(
'Êtes-vous sûr de vouloir oublier le portefeuille "${wallet.name}" ?')); context, 'areYouSureToForgetWallet'.tr(args: [wallet.name!])));
if (_answer ?? false) { if (_answer ?? false) {
//Check if balance is null //Check if balance is null
@ -156,26 +157,24 @@ class WalletOptionsProvider with ChangeNotifier {
switch (snapshot.data.toString()) { switch (snapshot.data.toString()) {
case 'noid': case 'noid':
{ {
return _showText('Aucune identité'); return _showText('noIdentity'.tr());
} }
case 'Created': case 'Created':
{ {
return isOwner return isOwner
? InkWell( ? InkWell(
child: _showText( child: _showText(
'Cliquez ici pour confirmer\nvotre nouvelle identité', 'clickHereToConfirmIdentity'.tr(), 18, true),
18,
true),
onTap: () async { onTap: () async {
await validateIdentity(context); await validateIdentity(context);
}, },
) )
: _showText('Identité créé'); : _showText('identityCreated'.tr());
} }
case 'ConfirmedByOwner': case 'ConfirmedByOwner':
{ {
return isOwner return isOwner
? _showText('Identité confirmé') ? _showText('identityConfirmed'.tr())
: _duniterIndexer.getNameByAddress( : _duniterIndexer.getNameByAddress(
context, context,
address, address,
@ -190,7 +189,7 @@ class WalletOptionsProvider with ChangeNotifier {
case 'Validated': case 'Validated':
{ {
return isOwner return isOwner
? _showText('Membre validé !', 18, true) ? _showText('memberValidated'.tr(), 18, true)
: _duniterIndexer.getNameByAddress( : _duniterIndexer.getNameByAddress(
context, context,
address, address,
@ -204,7 +203,7 @@ class WalletOptionsProvider with ChangeNotifier {
case 'expired': case 'expired':
{ {
return _showText('Identité expiré'); return _showText('identityExpired'.tr());
} }
} }
return SizedBox( return SizedBox(
@ -232,10 +231,10 @@ class WalletOptionsProvider with ChangeNotifier {
barrierDismissible: true, // user must tap button! barrierDismissible: true, // user must tap button!
builder: (BuildContext context) { builder: (BuildContext context) {
return AlertDialog( return AlertDialog(
title: const Text( title: Text(
'Confirmez votre identité', 'confirmYourIdentity'.tr(),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(fontSize: 20, fontWeight: FontWeight.w500), style: const TextStyle(fontSize: 20, fontWeight: FontWeight.w500),
), ),
content: SizedBox( content: SizedBox(
height: 100, height: 100,
@ -263,7 +262,7 @@ class WalletOptionsProvider with ChangeNotifier {
return TextButton( return TextButton(
key: const Key('infoPopup'), key: const Key('infoPopup'),
child: Text( child: Text(
"Valider", "validate".tr(),
style: TextStyle( style: TextStyle(
fontSize: 21, fontSize: 21,
color: idtyName.text.length >= 2 color: idtyName.text.length >= 2
@ -325,10 +324,10 @@ class WalletOptionsProvider with ChangeNotifier {
barrierDismissible: true, barrierDismissible: true,
builder: (BuildContext context) { builder: (BuildContext context) {
return AlertDialog( return AlertDialog(
title: const Text( title: Text(
'Choisissez un nouveau nom\n pour votre portefeuille :', 'chooseWalletName'.tr(),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(fontSize: 20, fontWeight: FontWeight.w500), style: const TextStyle(fontSize: 20, fontWeight: FontWeight.w500),
), ),
content: SizedBox( content: SizedBox(
height: 100, height: 100,
@ -352,7 +351,7 @@ class WalletOptionsProvider with ChangeNotifier {
return TextButton( return TextButton(
key: const Key('infoPopup'), key: const Key('infoPopup'),
child: Text( child: Text(
"Valider", "validate".tr(),
style: TextStyle( style: TextStyle(
fontSize: 21, fontSize: 21,
color: canValidateNameBool color: canValidateNameBool
@ -379,7 +378,7 @@ class WalletOptionsProvider with ChangeNotifier {
TextButton( TextButton(
key: const Key('cancel'), key: const Key('cancel'),
child: Text( child: Text(
"Annuler", "cancel".tr(),
style: TextStyle( style: TextStyle(
fontSize: 18, fontSize: 18,
color: Colors.grey[800], color: Colors.grey[800],

View File

@ -1,4 +1,5 @@
import 'dart:io'; import 'dart:io';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
@ -126,14 +127,13 @@ class WalletsProfilesProvider with ChangeNotifier {
return _balance; return _balance;
} }
Widget headerProfileView(
Widget headerProfileView(
BuildContext context, String _address, String? username) { BuildContext context, String _address, String? username) {
const double _avatarSize = 140; const double _avatarSize = 140;
WalletOptionsProvider _walletOptions = WalletOptionsProvider _walletOptions =
Provider.of<WalletOptionsProvider>(context, listen: false); Provider.of<WalletOptionsProvider>(context, listen: false);
CesiumPlusProvider _cesiumPlusProvider = CesiumPlusProvider _cesiumPlusProvider =
Provider.of<CesiumPlusProvider>(context, listen: false); Provider.of<CesiumPlusProvider>(context, listen: false);
// SubstrateSdk _sub = Provider.of<SubstrateSdk>(context, listen: false); // SubstrateSdk _sub = Provider.of<SubstrateSdk>(context, listen: false);
@ -181,13 +181,11 @@ Widget headerProfileView(
), ),
]), ]),
const SizedBox(height: 25), const SizedBox(height: 25),
balance(context, _address, 22), balance(context, _address, 22),
const SizedBox(height: 10), const SizedBox(height: 10),
_walletOptions.idtyStatus(context, _address, _walletOptions.idtyStatus(context, _address,
isOwner: false, color: Colors.black), isOwner: false, color: Colors.black),
getCerts(context, _address, 14), getCerts(context, _address, 14),
if (username == null && if (username == null &&
g1WalletsBox.get(_address)?.username != null) g1WalletsBox.get(_address)?.username != null)
SizedBox( SizedBox(
@ -215,10 +213,9 @@ Widget headerProfileView(
]), ]),
const Spacer(), const Spacer(),
Column(children: <Widget>[ Column(children: <Widget>[
ClipOval( ClipOval(
child: _cesiumPlusProvider.defaultAvatar(_avatarSize), child: _cesiumPlusProvider.defaultAvatar(_avatarSize),
), ),
const SizedBox(height: 25), const SizedBox(height: 25),
]), ]),
]), ]),
@ -227,18 +224,16 @@ Widget headerProfileView(
]); ]);
} }
void reload() { void reload() {
notifyListeners(); notifyListeners();
} }
} }
snackCopyKey(context) { snackCopyKey(context) {
const snackBar = SnackBar( final snackBar = SnackBar(
padding: EdgeInsets.all(20), padding: const EdgeInsets.all(20),
content: Text("Cette adresse a été copié dans votre presse-papier.", content: Text("thisAddressHasBeenCopiedToClipboard".tr(),
style: TextStyle(fontSize: 16)), style: const TextStyle(fontSize: 16)),
duration: Duration(seconds: 2)); duration: const Duration(seconds: 2));
ScaffoldMessenger.of(context).showSnackBar(snackBar); ScaffoldMessenger.of(context).showSnackBar(snackBar);
} }

View File

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
import 'package:gecko/models/queries_indexer.dart'; import 'package:gecko/models/queries_indexer.dart';
@ -9,7 +10,6 @@ import 'package:gecko/providers/wallets_profiles.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:gecko/screens/wallet_view.dart'; import 'package:gecko/screens/wallet_view.dart';
import 'package:graphql_flutter/graphql_flutter.dart'; import 'package:graphql_flutter/graphql_flutter.dart';
import 'package:intl/intl.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
// ignore: must_be_immutable // ignore: must_be_immutable
@ -40,9 +40,9 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
appBar: AppBar( appBar: AppBar(
elevation: 0, elevation: 0,
toolbarHeight: 60 * ratio, toolbarHeight: 60 * ratio,
title: const SizedBox( title: SizedBox(
height: 22, height: 22,
child: Text('Activité du compte'), child: Text('accountActivity'.tr()),
), ),
), ),
bottomNavigationBar: _homeProvider.bottomAppBar(context), bottomNavigationBar: _homeProvider.bottomAppBar(context),
@ -57,12 +57,12 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
Provider.of<DuniterIndexer>(context, listen: false); Provider.of<DuniterIndexer>(context, listen: false);
if (indexerEndpoint == '') { if (indexerEndpoint == '') {
Column(children: const <Widget>[ Column(children: <Widget>[
SizedBox(height: 50), const SizedBox(height: 50),
Text( Text(
"L'état du réseau ne permet pas\nd'afficher l'historique du compte", "noNetworkNoHistory".tr(),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(fontSize: 18), style: const TextStyle(fontSize: 18),
) )
]); ]);
} }
@ -103,20 +103,20 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
if (result.hasException) { if (result.hasException) {
log.e('Error Indexer: ' + result.exception.toString()); log.e('Error Indexer: ' + result.exception.toString());
return Column(children: const <Widget>[ return Column(children: <Widget>[
SizedBox(height: 50), const SizedBox(height: 50),
Text( Text(
"L'état du réseau ne permet pas\nd'afficher l'historique du compte", "noNetworkNoHistory".tr(),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(fontSize: 18), style: const TextStyle(fontSize: 18),
) )
]); ]);
} else if (result.data == null) { } else if (result.data == null) {
return Column(children: const <Widget>[ return Column(children: <Widget>[
SizedBox(height: 50), const SizedBox(height: 50),
Text( Text(
"Aucune donnée à afficher.", "noDataToDisplay".tr(),
style: TextStyle(fontSize: 18), style: const TextStyle(fontSize: 18),
) )
]); ]);
} }
@ -159,11 +159,11 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
Provider.of<DuniterIndexer>(context, listen: false); Provider.of<DuniterIndexer>(context, listen: false);
return _duniterIndexer.transBC == null return _duniterIndexer.transBC == null
? Column(children: const <Widget>[ ? Column(children: <Widget>[
SizedBox(height: 50), const SizedBox(height: 50),
Text( Text(
"Aucune transaction à afficher.", "noTransactionToDisplay".tr(),
style: TextStyle(fontSize: 18), style: const TextStyle(fontSize: 18),
) )
]) ])
: Column(children: <Widget>[ : Column(children: <Widget>[
@ -202,19 +202,19 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
bool isYesterday = false; bool isYesterday = false;
bool isThisWeek = false; bool isThisWeek = false;
const Map<int, String> monthsInYear = { final Map<int, String> monthsInYear = {
1: "Janvier", 1: "month1".tr(),
2: "Février", 2: "month2".tr(),
3: "Mars", 3: "month3".tr(),
4: "Avril", 4: "month4".tr(),
5: "Mai", 5: "month5".tr(),
6: "Juin", 6: "month6".tr(),
7: "Juillet", 7: "month7".tr(),
8: "Aout", 8: "month8".tr(),
9: "Septembre", 9: "month9".tr(),
10: "Octobre", 10: "month10".tr(),
11: "Novembre", 11: "month11".tr(),
12: "Décembre" 12: "month12".tr()
}; };
return Column( return Column(
@ -243,18 +243,18 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
final yesterdayDate = DateTime(now.year, now.month, now.day - 1); final yesterdayDate = DateTime(now.year, now.month, now.day - 1);
if (transactionDate == todayDate && !isTody) { if (transactionDate == todayDate && !isTody) {
dateDelimiter = lastDateDelimiter = "Aujourd'hui"; dateDelimiter = lastDateDelimiter = "today".tr();
isTody = true; isTody = true;
} else if (transactionDate == yesterdayDate && !isYesterday) { } else if (transactionDate == yesterdayDate && !isYesterday) {
dateDelimiter = lastDateDelimiter = "Hier"; dateDelimiter = lastDateDelimiter = "yesterday".tr();
isYesterday = true; isYesterday = true;
} else if (weekNumber(date) == weekNumber(now) && } else if (weekNumber(date) == weekNumber(now) &&
date.year == now.year && date.year == now.year &&
lastDateDelimiter != "Cette semaine" && lastDateDelimiter != "thisWeek".tr() &&
transactionDate != yesterdayDate && transactionDate != yesterdayDate &&
transactionDate != todayDate && transactionDate != todayDate &&
!isThisWeek) { !isThisWeek) {
dateDelimiter = lastDateDelimiter = "Cette semaine"; dateDelimiter = lastDateDelimiter = "thisWeek".tr();
isThisWeek = true; isThisWeek = true;
} else if (lastDateDelimiter != monthsInYear[date.month] && } else if (lastDateDelimiter != monthsInYear[date.month] &&
lastDateDelimiter != "${monthsInYear[date.month]} ${date.year}" && lastDateDelimiter != "${monthsInYear[date.month]} ${date.year}" &&

View File

@ -1,5 +1,7 @@
import 'package:dots_indicator/dots_indicator.dart'; import 'package:dots_indicator/dots_indicator.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
import 'package:gecko/providers/substrate_sdk.dart'; import 'package:gecko/providers/substrate_sdk.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -29,22 +31,28 @@ class CommonElements {
child: Image.asset('assets/onBoarding/$assetName', width: imageWidth)); child: Image.asset('assets/onBoarding/$assetName', width: imageWidth));
} }
Widget buildText(List<TextSpan> text, [double size = 20]) { Widget buildText(String text, [double size = 20, bool isMd = false]) {
final mdStyle = MarkdownStyleSheet(
p: TextStyle(
fontSize: isTall ? size : size * 0.9,
color: Colors.black,
letterSpacing: 0.3),
textAlign: WrapAlignment.spaceBetween,
);
return Container( return Container(
padding: const EdgeInsets.all(12), padding: const EdgeInsets.all(12),
width: 440, width: 440,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, border: Border.all(color: Colors.grey[900]!)), color: Colors.white, border: Border.all(color: Colors.grey[900]!)),
child: RichText( child: isMd
textAlign: TextAlign.justify, ? MarkdownBody(data: text, styleSheet: mdStyle)
text: TextSpan( : Text(text,
style: TextStyle( textAlign: TextAlign.justify,
fontSize: isTall ? size : size * 0.9, style: TextStyle(
color: Colors.black, fontSize: isTall ? size : size * 0.9,
letterSpacing: 0.3), color: Colors.black,
children: text, letterSpacing: 0.3)),
),
),
); );
} }
@ -85,11 +93,12 @@ class CommonElements {
Widget infoIntro( Widget infoIntro(
BuildContext context, BuildContext context,
List<TextSpan> text, String text,
String assetName, String assetName,
String buttonText, String buttonText,
nextScreen, nextScreen,
double pagePosition, { double pagePosition, {
bool isMd = false,
bool isFast = false, bool isFast = false,
double boxHeight = 440, double boxHeight = 440,
double imageWidth = 350, double imageWidth = 350,
@ -100,7 +109,8 @@ class CommonElements {
buildProgressBar(pagePosition), buildProgressBar(pagePosition),
SizedBox(height: isTall ? 40 : 20), SizedBox(height: isTall ? 40 : 20),
buildText(text, textSize), buildText(text, textSize, isMd),
buildImage(assetName, boxHeight, imageWidth), buildImage(assetName, boxHeight, imageWidth),
Expanded( Expanded(
child: Align( child: Align(
@ -239,9 +249,9 @@ Future<bool?> confirmPopup(BuildContext context, String title) async {
children: [ children: [
TextButton( TextButton(
key: const Key('confirmPopop'), key: const Key('confirmPopop'),
child: const Text( child: Text(
"Oui", "yes".tr(),
style: TextStyle( style: const TextStyle(
fontSize: 21, fontSize: 21,
color: Color(0xffD80000), color: Color(0xffD80000),
), ),
@ -252,9 +262,9 @@ Future<bool?> confirmPopup(BuildContext context, String title) async {
), ),
const SizedBox(width: 20), const SizedBox(width: 20),
TextButton( TextButton(
child: const Text( child: Text(
"Non", "no".tr(),
style: TextStyle(fontSize: 21), style: const TextStyle(fontSize: 21),
), ),
onPressed: () { onPressed: () {
Navigator.pop(context, false); Navigator.pop(context, false);

View File

@ -1,5 +1,6 @@
import 'package:bubble/bubble.dart'; import 'package:bubble/bubble.dart';
import 'package:connectivity_plus/connectivity_plus.dart'; import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
import 'package:gecko/models/stateful_wrapper.dart'; import 'package:gecko/models/stateful_wrapper.dart';
import 'package:gecko/providers/chest_provider.dart'; import 'package:gecko/providers/chest_provider.dart';
@ -62,7 +63,7 @@ class HomeScreen extends StatelessWidget {
), ),
ListTile( ListTile(
key: const Key('parameters'), key: const Key('parameters'),
title: const Text('Paramètres'), title: Text('parameters'.tr()),
onTap: () { onTap: () {
Navigator.pop(context); Navigator.pop(context);
Navigator.push( Navigator.push(
@ -111,8 +112,8 @@ class HomeScreen extends StatelessWidget {
// Check if versionData non compatible, drop everything // Check if versionData non compatible, drop everything
if (walletBox.isNotEmpty && if (walletBox.isNotEmpty &&
walletBox.getAt(0)!.version! < dataVersion) { walletBox.getAt(0)!.version! < dataVersion) {
await infoPopup(context, await infoPopup(
"La version de vos coffres n'est plus comptabile avec cette version de Ğecko.\nTous vos coffres vont être oubliés, vous devez les importer de nouveau."); context, "chestNotCompatibleMustReinstallGecko".tr());
await walletBox.clear(); await walletBox.clear();
await chestBox.clear(); await chestBox.clear();
await configBox.delete('defaultWallet'); await configBox.delete('defaultWallet');
@ -127,7 +128,7 @@ class HomeScreen extends StatelessWidget {
if (connectivityResult != ConnectivityResult.mobile && if (connectivityResult != ConnectivityResult.mobile &&
connectivityResult != ConnectivityResult.wifi) { connectivityResult != ConnectivityResult.wifi) {
_homeProvider.changeMessage( _homeProvider.changeMessage(
"Vous n'êtes pas connecté à internet", 0); "notConnectedToInternet".tr(), 0);
_sub.nodeConnected = false; _sub.nodeConnected = false;
} }
@ -139,7 +140,7 @@ class HomeScreen extends StatelessWidget {
_sub.nodeConnected = false; _sub.nodeConnected = false;
await _sub.sdk.api.setting.unsubscribeBestNumber(); await _sub.sdk.api.setting.unsubscribeBestNumber();
_homeProvider.changeMessage( _homeProvider.changeMessage(
"Vous n'êtes pas connecté à internet", 0); "notConnectedToInternet".tr(), 0);
_sub.reload(); _sub.reload();
} else { } else {
await _sub.connectNode(ctx); await _sub.connectNode(ctx);
@ -302,7 +303,7 @@ Widget geckHome(context) {
), ),
const SizedBox(height: 12), const SizedBox(height: 12),
Text( Text(
"Rechercher un\nportefeuille", "searchWallet".tr(),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
@ -368,7 +369,7 @@ Widget geckHome(context) {
), ),
const SizedBox(height: 12), const SizedBox(height: 12),
Text( Text(
"Gérer mes\nportefeuilles", "manageWallets".tr(),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
@ -412,7 +413,7 @@ Widget geckHome(context) {
), ),
const SizedBox(height: 12), const SizedBox(height: 12),
Text( Text(
"Scanner un\nQR code", "scanQRCode".tr(),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
@ -468,7 +469,7 @@ Widget welcomeHome(context) {
child: child:
Row(mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Row(mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[
Text( Text(
"Lapplication de paiement $currencyName\nplus rapide quun reptile du Vietnam", "fastAppDescription".tr(args: [currencyName]),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: const TextStyle( style: const TextStyle(
color: Colors.white, color: Colors.white,
@ -520,7 +521,7 @@ Widget welcomeHome(context) {
), ),
Positioned( Positioned(
left: 180, left: 180,
child: bubbleSpeak("y'a pas de lézard !"), child: bubbleSpeak("noLizard".tr()),
), ),
const Positioned( const Positioned(
left: 200, left: 200,
@ -551,10 +552,10 @@ Widget welcomeHome(context) {
), ),
); );
}, },
child: const Text( child: Text(
'Créer un portefeuille', 'createWallet'.tr(),
style: style: const TextStyle(
TextStyle(fontSize: 24, fontWeight: FontWeight.w600), fontSize: 24, fontWeight: FontWeight.w600),
), ),
), ),
), ),
@ -576,7 +577,7 @@ Widget welcomeHome(context) {
); );
}, },
child: Text( child: Text(
"Restaurer mes portefeuilles", "restoreWallet".tr(),
style: TextStyle( style: TextStyle(
fontSize: 24, fontSize: 24,
color: orangeC, color: orangeC,

View File

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:durt/durt.dart'; import 'package:durt/durt.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
@ -63,7 +64,7 @@ class ChangePinScreen extends StatelessWidget with ChangeNotifier {
), ),
const SizedBox(height: 80), const SizedBox(height: 80),
Text( Text(
'Choisissez un code secret autogénéré :', 'choosePassword'.tr(),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: 17.0, fontSize: 17.0,
@ -126,9 +127,9 @@ class ChangePinScreen extends StatelessWidget with ChangeNotifier {
Navigator.pop(context); Navigator.pop(context);
} }
}, },
child: const Text( child: Text(
'Confirmer', 'confirm'.tr(),
style: TextStyle(fontSize: 28), style: const TextStyle(fontSize: 28),
), ),
), ),
) )

View File

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
import 'package:gecko/models/chest_data.dart'; import 'package:gecko/models/chest_data.dart';
@ -93,7 +94,7 @@ class ChestOptions extends StatelessWidget {
), ),
const SizedBox(width: 15), const SizedBox(width: 15),
Text( Text(
'Afficher ma phrase de restauration', 'displayMnemonic'.tr(),
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: 20,
color: orangeC, color: orangeC,
@ -136,7 +137,7 @@ class ChestOptions extends StatelessWidget {
), ),
const SizedBox(width: 18), const SizedBox(width: 18),
Text( Text(
'Changer mon code secret', 'changePassword'.tr(),
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: 20,
color: _sub.nodeConnected color: _sub.nodeConnected
@ -172,7 +173,7 @@ class ChestOptions extends StatelessWidget {
), ),
const SizedBox(width: 25), const SizedBox(width: 25),
Text( Text(
'Créer une autre dérivation', 'createDerivation'.tr(),
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: 20,
color: _sub.nodeConnected color: _sub.nodeConnected
@ -198,9 +199,9 @@ class ChestOptions extends StatelessWidget {
height: 45, height: 45,
), ),
const SizedBox(width: 20), const SizedBox(width: 20),
const Text( Text(
'Supprimer ce coffre', 'deleteChest'.tr(),
style: TextStyle( style: const TextStyle(
fontSize: 20, fontSize: 20,
color: Color(0xffD80000), color: Color(0xffD80000),
), ),

View File

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
import 'package:gecko/providers/my_wallets.dart'; import 'package:gecko/providers/my_wallets.dart';
@ -35,9 +36,9 @@ class _ChooseChestState extends State<ChooseChest> {
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
appBar: AppBar( appBar: AppBar(
toolbarHeight: 60 * ratio, toolbarHeight: 60 * ratio,
title: const SizedBox( title: SizedBox(
height: 22, height: 22,
child: Text('Sélectionner mon coffre'), child: Text('selectMyChest'.tr()),
)), )),
body: SafeArea( body: SafeArea(
child: Column(children: <Widget>[ child: Column(children: <Widget>[
@ -140,7 +141,7 @@ class _ChooseChestState extends State<ChooseChest> {
} }
}, },
child: Text( child: Text(
'Ouvrir ce coffre', 'openThisChest'.tr(),
style: TextStyle( style: TextStyle(
fontSize: 22, fontSize: 22,
color: backgroundColor, color: backgroundColor,
@ -166,7 +167,7 @@ class _ChooseChestState extends State<ChooseChest> {
width: 400, width: 400,
height: 50, height: 50,
child: Center( child: Center(
child: Text('Créer un nouveau coffre', child: Text('createChest'.tr(),
style: TextStyle( style: TextStyle(
fontSize: 22, fontSize: 22,
color: orangeC, color: orangeC,
@ -189,7 +190,7 @@ class _ChooseChestState extends State<ChooseChest> {
width: 400, width: 400,
height: 50, height: 50,
child: Center( child: Center(
child: Text('Importer un coffre', child: Text('importChest'.tr(),
style: TextStyle( style: TextStyle(
fontSize: 22, fontSize: 22,
color: orangeC, color: orangeC,

View File

@ -1,5 +1,6 @@
import 'dart:io'; import 'dart:io';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -28,9 +29,9 @@ class ChooseWalletScreen extends StatelessWidget {
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
appBar: AppBar( appBar: AppBar(
toolbarHeight: 60 * ratio, toolbarHeight: 60 * ratio,
title: const SizedBox( title: SizedBox(
height: 22, height: 22,
child: Text('Choix du portefeuille source'), child: Text('choiceOfSourceWallet'.tr()),
)), )),
body: SafeArea( body: SafeArea(
child: Stack(children: [ child: Stack(children: [
@ -58,10 +59,10 @@ class ChooseWalletScreen extends StatelessWidget {
Navigator.pop(context); Navigator.pop(context);
Navigator.pop(context); Navigator.pop(context);
}, },
child: const Text( child: Text(
'Choisir ce portefeuille', 'chooseThisWallet'.tr(),
style: style: const TextStyle(
TextStyle(fontSize: 24, fontWeight: FontWeight.w600), fontSize: 24, fontWeight: FontWeight.w600),
), ),
), ),
), ),

View File

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -50,16 +51,16 @@ class _CustomDerivationState extends State<CustomDerivation> {
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
appBar: AppBar( appBar: AppBar(
toolbarHeight: 60 * ratio, toolbarHeight: 60 * ratio,
title: const SizedBox( title: SizedBox(
height: 22, height: 22,
child: Text('Créer une dérivation personnalisé'), child: Text('createCustomDerivation'.tr()),
)), )),
body: Center( body: Center(
child: SafeArea( child: SafeArea(
child: Column(children: <Widget>[ child: Column(children: <Widget>[
const Spacer(), const Spacer(),
const Text( Text(
'Choisissez une dérivation:', 'chooseDerivation'.tr(),
), ),
const SizedBox(height: 20), const SizedBox(height: 20),
SizedBox( SizedBox(
@ -124,8 +125,8 @@ class _CustomDerivationState extends State<CustomDerivation> {
} }
if (_pin != null || _myWalletProvider.pinCode != '') { if (_pin != null || _myWalletProvider.pinCode != '') {
String _newDerivationName = String _newDerivationName = 'wallet'.tr() +
'Portefeuille ${_myWalletProvider.listWallets.last.number! + 2}'; ' ${_myWalletProvider.listWallets.last.number! + 2}';
if (dropdownValue == 'root') { if (dropdownValue == 'root') {
await _myWalletProvider.generateRootWallet( await _myWalletProvider.generateRootWallet(
context, 'Portefeuille racine'); context, 'Portefeuille racine');
@ -146,9 +147,10 @@ class _CustomDerivationState extends State<CustomDerivation> {
// ); // );
} }
}, },
child: const Text( child: Text(
'Valider', 'validate'.tr(),
style: TextStyle(fontSize: 24, fontWeight: FontWeight.w600), style: const TextStyle(
fontSize: 24, fontWeight: FontWeight.w600),
), ),
), ),
), ),

View File

@ -24,7 +24,7 @@ class ManageMembership extends StatelessWidget {
toolbarHeight: 60 * ratio, toolbarHeight: 60 * ratio,
title: const SizedBox( title: const SizedBox(
height: 22, height: 22,
child: Text('Gérer mon adhésion'), child: Text('manageMembership'),
)), )),
body: SafeArea( body: SafeArea(
child: Column(children: <Widget>[ child: Column(children: <Widget>[

View File

@ -1,4 +1,5 @@
import 'package:bubble/bubble.dart'; import 'package:bubble/bubble.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -43,15 +44,14 @@ class RestoreChest extends StatelessWidget {
genW.resetImportView(); genW.resetImportView();
Navigator.of(context).pop(); Navigator.of(context).pop();
}), }),
title: const SizedBox( title: SizedBox(
height: 22, height: 22,
child: Text('Restaurer un coffre'), child: Text('restoreAChest'.tr()),
)), )),
body: SafeArea( body: SafeArea(
child: Column(children: <Widget>[ child: Column(children: <Widget>[
SizedBox(height: isTall ? 30 : 15), SizedBox(height: isTall ? 30 : 15),
bubbleSpeak( bubbleSpeak('toRestoreEnterMnemonic'.tr()),
'Pour restaurer vos portefeuilles Gecko, rentrez dans les champs ci-dessous les 12 mots qui constituent votre phrase de restauration :'),
SizedBox(height: isTall ? 30 : 15), SizedBox(height: isTall ? 30 : 15),
Column(children: <Widget>[ Column(children: <Widget>[
Row( Row(
@ -112,10 +112,10 @@ class RestoreChest extends StatelessWidget {
await badMnemonicPopup(context); await badMnemonicPopup(context);
} }
}, },
child: const Text( child: Text(
'Restaurer ce coffre', 'restoreThisChest'.tr(),
style: style: const TextStyle(
TextStyle(fontSize: 24, fontWeight: FontWeight.w600), fontSize: 24, fontWeight: FontWeight.w600),
), ),
), ),
), ),
@ -137,16 +137,16 @@ class RestoreChest extends StatelessWidget {
genW.pasteMnemonic(context); genW.pasteMnemonic(context);
}, },
child: Row( child: Row(
children: const [ children: [
Icon( const Icon(
Icons.content_paste_go, Icons.content_paste_go,
size: 25, size: 25,
), ),
SizedBox(width: 10), const SizedBox(width: 10),
Text( Text(
'Coller depuis le\npresse-papier', 'pasteFromClipboard'.tr(),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: const TextStyle(
fontSize: 17, fontWeight: FontWeight.w400), fontSize: 17, fontWeight: FontWeight.w400),
), ),
], ],

View File

@ -1,4 +1,5 @@
import 'dart:typed_data'; import 'dart:typed_data';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -35,9 +36,9 @@ class ShowSeed extends StatelessWidget {
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
appBar: AppBar( appBar: AppBar(
toolbarHeight: 60 * ratio, toolbarHeight: 60 * ratio,
title: const SizedBox( title: SizedBox(
height: 22, height: 22,
child: Text('Ma phrase de restauration'), child: Text('myMnemonic'.tr()),
)), )),
body: SafeArea( body: SafeArea(
child: Column(children: <Widget>[ child: Column(children: <Widget>[
@ -64,13 +65,7 @@ class ShowSeed extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Column(children: [ Column(children: [
common.buildText( common.buildText('keepYourMnemonicSecret'.tr()),
<TextSpan>[
const TextSpan(
text:
'Tâchez de garder cette phrase bien secrète, car elle permet à quiconque la connaît daccéder à tous vos portefeuilles.'),
],
),
SizedBox(height: 35 * ratio), SizedBox(height: 35 * ratio),
sentanceArray(context, _seed.data!.split(' ')), sentanceArray(context, _seed.data!.split(' ')),
const SizedBox(height: 20), const SizedBox(height: 20),
@ -97,7 +92,7 @@ class ShowSeed extends StatelessWidget {
), ),
const SizedBox(width: 7), const SizedBox(width: 7),
Text( Text(
'Copier', 'copy'.tr(),
style: TextStyle( style: TextStyle(
fontSize: 15, color: Colors.grey[50]), fontSize: 15, color: Colors.grey[50]),
) )
@ -136,7 +131,7 @@ class ShowSeed extends StatelessWidget {
Navigator.pop(context); Navigator.pop(context);
}, },
child: Text( child: Text(
'Fermer', 'close'.tr(),
style: TextStyle( style: TextStyle(
fontSize: 23 * ratio, fontWeight: FontWeight.w600), fontSize: 23 * ratio, fontWeight: FontWeight.w600),
), ),
@ -237,11 +232,11 @@ class PrintWallet extends StatelessWidget {
backgroundColor: yellowC, backgroundColor: yellowC,
foregroundColor: Colors.black, foregroundColor: Colors.black,
toolbarHeight: 60 * ratio, toolbarHeight: 60 * ratio,
title: const SizedBox( title: SizedBox(
height: 22, height: 22,
child: Text( child: Text(
'Imprimer ma phrase de restauration', 'printMyMnemonic'.tr(),
style: TextStyle(fontWeight: FontWeight.w600), style: const TextStyle(fontWeight: FontWeight.w600),
), ),
), ),
), ),

View File

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -17,9 +18,9 @@ class TransactionCommentScreen extends StatelessWidget {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
toolbarHeight: 60 * ratio, toolbarHeight: 60 * ratio,
title: const SizedBox( title: SizedBox(
height: 22, height: 22,
child: Text('Confirmer le paiement'), child: Text('confirmPayment'.tr()),
), ),
), ),
body: SafeArea( body: SafeArea(

View File

@ -1,6 +1,7 @@
// ignore_for_file: avoid_print // ignore_for_file: avoid_print
import 'dart:async'; import 'dart:async';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:gecko/models/chest_data.dart'; import 'package:gecko/models/chest_data.dart';
import 'package:gecko/providers/substrate_sdk.dart'; import 'package:gecko/providers/substrate_sdk.dart';
@ -90,11 +91,11 @@ class UnlockingWallet extends StatelessWidget {
)), )),
]), ]),
SizedBox(height: 30 * ratio), SizedBox(height: 30 * ratio),
const SizedBox( SizedBox(
width: 400, width: 400,
child: Text( child: Text(
'Pour déverrouiller votre coffre, composez votre code secret à labri des lézards indiscrets :', 'toUnlockEnterPassword'.tr(),
style: TextStyle( style: const TextStyle(
fontSize: 19, fontSize: 19,
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.w400), fontWeight: FontWeight.w400),
@ -118,7 +119,7 @@ class UnlockingWallet extends StatelessWidget {
), ),
const SizedBox(width: 8), const SizedBox(width: 8),
Text( Text(
'Garder ce code en mémoire 15 minutes', 'rememberPassword'.tr(),
style: TextStyle( style: TextStyle(
fontSize: 16, color: Colors.grey[700]), fontSize: 16, color: Colors.grey[700]),
), ),
@ -142,7 +143,7 @@ class UnlockingWallet extends StatelessWidget {
height: 50, height: 50,
child: Center( child: Center(
child: Text( child: Text(
'Changer de coffre', 'changeChest'.tr(),
style: TextStyle( style: TextStyle(
fontSize: 22, fontSize: 22,
color: orangeC, color: orangeC,
@ -200,7 +201,8 @@ class UnlockingWallet extends StatelessWidget {
animationType: AnimationType.fade, animationType: AnimationType.fade,
validator: (v) { validator: (v) {
if (v!.length < _pinLenght) { if (v!.length < _pinLenght) {
return "Votre code PIN fait $_pinLenght caractères"; return "yourPasswordLengthIsX"
.tr(args: [_pinLenght.toString()]);
} else { } else {
return null; return null;
} }

View File

@ -1,5 +1,6 @@
import 'dart:async'; import 'dart:async';
import 'dart:io'; import 'dart:io';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
import 'package:gecko/providers/duniter_indexer.dart'; import 'package:gecko/providers/duniter_indexer.dart';
@ -306,7 +307,7 @@ class WalletOptions extends StatelessWidget {
), ),
const SizedBox(width: 7), const SizedBox(width: 7),
Text( Text(
'Copier', 'copy'.tr(),
style: TextStyle(fontSize: 15, color: Colors.grey[50]), style: TextStyle(fontSize: 15, color: Colors.grey[50]),
) )
]), ]),
@ -351,8 +352,9 @@ class WalletOptions extends StatelessWidget {
height: 45, height: 45,
), ),
const SizedBox(width: 22), const SizedBox(width: 22),
const Text('Activité', Text("displayActivity".tr(),
style: TextStyle(fontSize: 20, fontWeight: FontWeight.w500)), style:
const TextStyle(fontSize: 20, fontWeight: FontWeight.w500)),
]), ]),
), ),
); );
@ -382,7 +384,7 @@ class WalletOptions extends StatelessWidget {
height: 45, height: 45,
), ),
const SizedBox(width: 22), const SizedBox(width: 22),
const Text('Gérer mon adhésion', style: TextStyle(fontSize: 20)), Text('manageMembership'.tr(), style: const TextStyle(fontSize: 20)),
]), ]),
), ),
); );
@ -420,8 +422,8 @@ class WalletOptions extends StatelessWidget {
const SizedBox(width: 22), const SizedBox(width: 22),
Text( Text(
walletProvider.isDefaultWallet walletProvider.isDefaultWallet
? 'Ce portefeuille est celui par defaut' ? 'thisWalletIsDefault'.tr()
: 'Définir comme portefeuille par défaut', : 'defineWalletAsDefault'.tr(),
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: 20,
color: walletProvider.isDefaultWallet color: walletProvider.isDefaultWallet
@ -488,9 +490,9 @@ class WalletOptions extends StatelessWidget {
height: 45, height: 45,
), ),
const SizedBox(width: 19), const SizedBox(width: 19),
const Text('Supprimer ce portefeuille', Text('deleteThisWallet'.tr(),
style: style: const TextStyle(
TextStyle(fontSize: 20, color: Color(0xffD80000))), fontSize: 20, color: Color(0xffD80000))),
]) ])
: const SizedBox(width: 30), : const SizedBox(width: 30),
); );

View File

@ -1,5 +1,6 @@
import 'dart:io'; import 'dart:io';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
import 'package:gecko/models/chest_data.dart'; import 'package:gecko/models/chest_data.dart';
@ -97,9 +98,9 @@ class WalletsHome extends StatelessWidget {
return ChestOptions(walletProvider: _myWalletProvider); return ChestOptions(walletProvider: _myWalletProvider);
}), }),
), ),
label: const Text( label: Text(
" Paramétrer ce coffre", " " + "manageChest".tr(),
style: TextStyle( style: const TextStyle(
fontSize: 22, fontSize: 22,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: Color(0xff8a3c0f), color: Color(0xff8a3c0f),
@ -108,7 +109,7 @@ class WalletsHome extends StatelessWidget {
)), )),
const SizedBox(height: 30), const SizedBox(height: 30),
InkWell( InkWell(
key: const Key('createNewChest'), key: const Key('changeChest'),
onTap: () { onTap: () {
Navigator.push( Navigator.push(
context, context,
@ -121,7 +122,7 @@ class WalletsHome extends StatelessWidget {
width: 400, width: 400,
height: 50, height: 50,
child: Center( child: Center(
child: Text('Changer de coffre', child: Text('changeChest'.tr(),
style: TextStyle( style: TextStyle(
fontSize: 22, fontSize: 22,
color: orangeC, color: orangeC,
@ -360,7 +361,7 @@ class WalletsHome extends StatelessWidget {
Provider.of<MyWalletsProvider>(context); Provider.of<MyWalletsProvider>(context);
String _newDerivationName = String _newDerivationName =
'Portefeuille ${_myWalletProvider.listWallets.last.number! + 2}'; 'wallet'.tr() + ' ${_myWalletProvider.listWallets.last.number! + 2}';
return Padding( return Padding(
padding: const EdgeInsets.all(16), padding: const EdgeInsets.all(16),
child: ClipRRect( child: ClipRRect(

View File

@ -1,4 +1,5 @@
// ignore_for_file: file_names // ignore_for_file: file_names
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
@ -16,32 +17,25 @@ class OnboardingStepOne extends StatelessWidget {
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
appBar: AppBar( appBar: AppBar(
toolbarHeight: 60 * ratio, toolbarHeight: 60 * ratio,
title: const SizedBox( title: SizedBox(
height: 22, height: 22,
child: Text( child: Text(
'Nouveau portefeuille', 'newWallet'.tr(),
style: TextStyle(fontWeight: FontWeight.w600), style: const TextStyle(fontWeight: FontWeight.w600),
), ),
), ),
), ),
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,
body: SafeArea( body: SafeArea(
child: common.infoIntro( child: common.infoIntro(
context, context,
<TextSpan>[ 'geckoGenerateYourWalletFromMnemonic'.tr(),
const TextSpan( 'fabrication-de-portefeuille.png',
text: 'Gecko fabrique votre portefeuille à partir dune '), '>',
const TextSpan( const OnboardingStepTwo(),
text: 'phrase de restauration', 0,
style: TextStyle(fontWeight: FontWeight.bold)), isMd: true,
const TextSpan( ),
text:
'. Elle est un peu comme le plan qui permet de construire votre portefeuille.'),
],
'fabrication-de-portefeuille.png',
'>',
const OnboardingStepTwo(),
0),
), ),
); );
} }

View File

@ -1,6 +1,7 @@
// ignore_for_file: file_names // ignore_for_file: file_names
import 'dart:async'; import 'dart:async';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
@ -38,11 +39,11 @@ class OnboardingStepTen extends StatelessWidget {
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
appBar: AppBar( appBar: AppBar(
toolbarHeight: 60 * ratio, toolbarHeight: 60 * ratio,
title: const SizedBox( title: SizedBox(
height: 22, height: 22,
child: Text( child: Text(
'Mon code secret', 'myPassword'.tr(),
style: TextStyle(fontWeight: FontWeight.w600), style: const TextStyle(fontWeight: FontWeight.w600),
), ),
), ),
), ),
@ -52,12 +53,7 @@ class OnboardingStepTen extends StatelessWidget {
SizedBox(height: isTall ? 40 : 20), SizedBox(height: isTall ? 40 : 20),
common.buildProgressBar(9), common.buildProgressBar(9),
SizedBox(height: isTall ? 40 : 20), SizedBox(height: isTall ? 40 : 20),
common.buildText(<TextSpan>[ common.buildText("geckoWillCheckPassword".tr()),
TextSpan(
text:
"Gecko va vérifier avec vous si vous avez bien mémorisé votre code secret.\n\nTapez votre code secret dans le champ ci-dessous pour vérifier que vous lavez bien noté.",
style: TextStyle(fontSize: 16 * ratio))
]),
SizedBox(height: isTall ? 80 : 20), SizedBox(height: isTall ? 80 : 20),
Visibility( Visibility(
visible: _generateWalletProvider.scanedWalletNumber != -1, visible: _generateWalletProvider.scanedWalletNumber != -1,
@ -107,7 +103,7 @@ class OnboardingStepTen extends StatelessWidget {
), ),
const SizedBox(width: 8), const SizedBox(width: 8),
Text( Text(
'Garder ce code en mémoire 15 minutes', 'rememberPassword'.tr(),
style: style:
TextStyle(fontSize: 16, color: Colors.grey[700]), TextStyle(fontSize: 16, color: Colors.grey[700]),
), ),
@ -153,7 +149,7 @@ class OnboardingStepTen extends StatelessWidget {
animationType: AnimationType.fade, animationType: AnimationType.fade,
validator: (v) { validator: (v) {
if (v!.length < _pinLenght) { if (v!.length < _pinLenght) {
return "Votre code PIN fait $_pinLenght caractères"; return "yourPasswordLengthIsX".tr(args: [_pinLenght.toString()]);
} else { } else {
return null; return null;
} }
@ -206,7 +202,7 @@ class OnboardingStepTen extends StatelessWidget {
chest: configBox.get('currentChest'), chest: configBox.get('currentChest'),
address: address, address: address,
number: 0, number: 0,
name: 'Mon portefeuille courant', name: 'currentWallet'.tr(),
derivation: 2, derivation: 2,
imageDefaultPath: '0.png'); imageDefaultPath: '0.png');
await walletBox.add(myWallet); await walletBox.add(myWallet);

View File

@ -1,5 +1,6 @@
// ignore_for_file: file_names // ignore_for_file: file_names
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
@ -19,11 +20,11 @@ class OnboardingStepEleven extends StatelessWidget {
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
appBar: AppBar( appBar: AppBar(
toolbarHeight: 60 * ratio, toolbarHeight: 60 * ratio,
title: const SizedBox( title: SizedBox(
height: 22, height: 22,
child: Text( child: Text(
'Cest tout bon !', 'allGood'.tr(),
style: TextStyle(fontWeight: FontWeight.w600), style: const TextStyle(fontWeight: FontWeight.w600),
), ),
), ),
), ),
@ -31,12 +32,7 @@ class OnboardingStepEleven extends StatelessWidget {
body: SafeArea( body: SafeArea(
child: Column(children: <Widget>[ child: Column(children: <Widget>[
const SizedBox(height: 40), const SizedBox(height: 40),
common.buildText(<TextSpan>[ common.buildText("yourChestAndWalletWereCreatedSuccessfully".tr()),
const TextSpan(
text:
"Top !\n\nVotre coffre votre premier portefeuille ont été créés avec un immense succès.\n\nFélicitations !",
)
]),
SizedBox(height: isTall ? 20 : 10), SizedBox(height: isTall ? 20 : 10),
Image.asset( Image.asset(
'assets/onBoarding/gecko-clin.gif', 'assets/onBoarding/gecko-clin.gif',
@ -73,7 +69,7 @@ Widget finishButton(BuildContext context) {
ModalRoute.withName('/'), ModalRoute.withName('/'),
); );
}, },
child: Text("Accéder à mon coffre", child: Text("accessMyChest".tr(),
style: style:
TextStyle(fontSize: 22 * ratio, fontWeight: FontWeight.w600))), TextStyle(fontSize: 22 * ratio, fontWeight: FontWeight.w600))),
); );

View File

@ -1,5 +1,6 @@
// ignore_for_file: file_names // ignore_for_file: file_names
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
@ -18,11 +19,11 @@ class OnboardingStepTwo extends StatelessWidget {
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
appBar: AppBar( appBar: AppBar(
toolbarHeight: 60 * ratio, toolbarHeight: 60 * ratio,
title: const SizedBox( title: SizedBox(
height: 22, height: 22,
child: Text( child: Text(
'Votre phrase de restauration', 'yourMnemonic'.tr(),
style: TextStyle(fontWeight: FontWeight.w600), style: const TextStyle(fontWeight: FontWeight.w600),
), ),
), ),
), ),
@ -30,11 +31,7 @@ class OnboardingStepTwo extends StatelessWidget {
body: SafeArea( body: SafeArea(
child: common.infoIntro( child: common.infoIntro(
context, context,
<TextSpan>[ 'keepThisMnemonicSecure'.tr(),
const TextSpan(
text:
'Conservez cette phrase précieusement, car sans elle Gecko ne pourra pas reconstruire vos portefeuilles le jour où vous changez de téléphone.'),
],
'fabrication-de-portefeuille-impossible-sans-phrase.png', 'fabrication-de-portefeuille-impossible-sans-phrase.png',
'>', '>',
const OnboardingStepThree(), const OnboardingStepThree(),

View File

@ -1,5 +1,6 @@
// ignore_for_file: file_names // ignore_for_file: file_names
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
@ -18,27 +19,18 @@ class OnboardingStepThree extends StatelessWidget {
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
appBar: AppBar( appBar: AppBar(
toolbarHeight: 60 * ratio, toolbarHeight: 60 * ratio,
title: const SizedBox( title: SizedBox(
height: 22, height: 22,
child: Text( child: Text(
'Votre phrase de restauration', 'yourMnemonic'.tr(),
style: TextStyle(fontWeight: FontWeight.w600), style: const TextStyle(fontWeight: FontWeight.w600),
), ),
), ),
), ),
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,
body: SafeArea( body: SafeArea(
child: common.infoIntro( child: common.infoIntro(context, 'warningForgotPassword'.tr(),
context, 'forgot_password.png'.tr(), '>', const OnboardingStepFor(), 2),
<TextSpan>[
const TextSpan(
text:
'Dans une blockchain, pas de procédure de récupération par mail. Seule votre phrase de restauration peut vous permettre de récupérer vos Ğ1 à tout moment.'),
],
'mot-de-passe-oublie.png',
'>',
const OnboardingStepFor(),
2),
), ),
); );
} }

View File

@ -1,5 +1,6 @@
// ignore_for_file: file_names // ignore_for_file: file_names
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
@ -18,11 +19,11 @@ class OnboardingStepFor extends StatelessWidget {
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
appBar: AppBar( appBar: AppBar(
toolbarHeight: 60 * ratio, toolbarHeight: 60 * ratio,
title: const SizedBox( title: SizedBox(
height: 22, height: 22,
child: Text( child: Text(
'Votre phrase de restauration', 'yourMnemonic'.tr(),
style: TextStyle(fontWeight: FontWeight.w600), style: const TextStyle(fontWeight: FontWeight.w600),
), ),
), ),
), ),
@ -30,18 +31,12 @@ class OnboardingStepFor extends StatelessWidget {
body: SafeArea( body: SafeArea(
child: common.infoIntro( child: common.infoIntro(
context, context,
<TextSpan>[ 'itsTimeToUseAPenAndPaper'.tr(),
const TextSpan(text: 'Il est temps de vous munir d'), 'gecko_also_can_forget.png'.tr(),
const TextSpan(
text: 'un dun papier et dun crayon',
style: TextStyle(fontWeight: FontWeight.bold)),
const TextSpan(
text: ' afin de pouvoir noter votre phrase de restauration.'),
],
'gecko-oublie-aussi.png',
'>', '>',
const OnboardingStepFive(), const OnboardingStepFive(),
3), 3,
isMd: true),
), ),
); );
} }

View File

@ -1,5 +1,6 @@
// ignore_for_file: file_names // ignore_for_file: file_names
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
@ -37,11 +38,11 @@ class _ChooseChestState extends State<OnboardingStepFive> {
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
appBar: AppBar( appBar: AppBar(
toolbarHeight: 60 * ratio, toolbarHeight: 60 * ratio,
title: const SizedBox( title: SizedBox(
height: 22, height: 22,
child: Text( child: Text(
'Votre phrase de restauration', 'yourMnemonic'.tr(),
style: TextStyle(fontWeight: FontWeight.w600), style: const TextStyle(fontWeight: FontWeight.w600),
), ),
), ),
), ),
@ -51,13 +52,7 @@ class _ChooseChestState extends State<OnboardingStepFive> {
SizedBox(height: isTall ? 40 : 20), SizedBox(height: isTall ? 40 : 20),
common.buildProgressBar(4), common.buildProgressBar(4),
SizedBox(height: isTall ? 40 : 20), SizedBox(height: isTall ? 40 : 20),
common.buildText( common.buildText('geckoGeneratedYourMnemonicKeepItSecret'.tr()),
<TextSpan>[
const TextSpan(
text:
'Gecko a généré votre phrase de restauration ! Tâchez de la garder bien secrète, car elle permet à quiconque la connaît daccéder à tous vos portefeuilles.'),
],
),
SizedBox(height: 35 * ratio), SizedBox(height: 35 * ratio),
sentanceArray(context), sentanceArray(context),
SizedBox(height: 17 * ratio), SizedBox(height: 17 * ratio),
@ -93,7 +88,8 @@ class _ChooseChestState extends State<OnboardingStepFive> {
// _generateWalletProvider.reloadBuild(); // _generateWalletProvider.reloadBuild();
setState(() {}); setState(() {});
}, },
child: Text("Choisir une autre phrase", child: Text("chooseAnotherMnemonic".tr(),
textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: 22 * ratio, fontSize: 22 * ratio,
fontWeight: FontWeight.w600))), fontWeight: FontWeight.w600))),
@ -101,7 +97,7 @@ class _ChooseChestState extends State<OnboardingStepFive> {
), ),
), ),
SizedBox(height: 22 * ratio), SizedBox(height: 22 * ratio),
nextButton(context, "J'ai noté ma phrase", false, widget.skipIntro), nextButton(context, "iNotedMyMnemonic".tr(), false, widget.skipIntro),
SizedBox(height: 35 * ratio), SizedBox(height: 35 * ratio),
]), ]),
), ),
@ -204,7 +200,7 @@ class PrintWallet extends StatelessWidget {
title: const SizedBox( title: const SizedBox(
height: 22, height: 22,
child: Text( child: Text(
'Imprimer ma phrase de restauration', 'printMyMnemonic',
style: TextStyle(fontWeight: FontWeight.w600), style: TextStyle(fontWeight: FontWeight.w600),
), ),
), ),

View File

@ -1,5 +1,6 @@
// ignore_for_file: file_names // ignore_for_file: file_names
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
@ -41,11 +42,11 @@ class OnboardingStepSix extends StatelessWidget {
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,
appBar: AppBar( appBar: AppBar(
toolbarHeight: 60 * ratio, toolbarHeight: 60 * ratio,
title: const SizedBox( title: SizedBox(
height: 22, height: 22,
child: Text( child: Text(
'Votre phrase de restauration', 'yourMnemonic'.tr(),
style: TextStyle(fontWeight: FontWeight.w600), style: const TextStyle(fontWeight: FontWeight.w600),
), ),
), ),
), ),
@ -57,20 +58,10 @@ class OnboardingStepSix extends StatelessWidget {
common.buildProgressBar(5), common.buildProgressBar(5),
SizedBox(height: isTall ? 40 : 20), SizedBox(height: isTall ? 40 : 20),
common.buildText( common.buildText(
<TextSpan>[ "didYouNoteMnemonicToBeSureTypeWord".tr(
TextSpan( args: [(_generateWalletProvider.nbrWord + 1).toString()]),
text: 20,
"Avez-vous bien noté votre phrase de restauration ?\n\nPour en être sûr, veuillez taper dans le champ ci-dessous le ", true),
style: TextStyle(fontSize: 16 * ratio)),
TextSpan(
text: '${_generateWalletProvider.nbrWord + 1}ème mot',
style: TextStyle(
fontWeight: FontWeight.bold, fontSize: 16 * ratio)),
TextSpan(
text: " de votre phrase de restauration :",
style: TextStyle(fontSize: 16 * ratio)),
],
),
SizedBox(height: isTall ? 70 : 20), SizedBox(height: isTall ? 70 : 20),
Text('${_generateWalletProvider.nbrWord + 1}', Text('${_generateWalletProvider.nbrWord + 1}',
key: const Key('askedWord'), key: const Key('askedWord'),
@ -105,8 +96,9 @@ class OnboardingStepSix extends StatelessWidget {
color: Colors.grey[500], color: Colors.grey[500],
fontWeight: FontWeight.w500), fontWeight: FontWeight.w500),
labelText: _generateWalletProvider.isAskedWordValid labelText: _generateWalletProvider.isAskedWordValid
? "C'est le bon mot !" ? "itsTheGoodWord".tr()
: "${_generateWalletProvider.nbrWordAlpha} mot de votre phrase de restauration", : "${_generateWalletProvider.nbrWordAlpha} " +
"nthMnemonicWord".tr(),
fillColor: const Color(0xffeeeedd), fillColor: const Color(0xffeeeedd),
filled: true, filled: true,
contentPadding: const EdgeInsets.all(12), contentPadding: const EdgeInsets.all(12),
@ -122,7 +114,7 @@ class OnboardingStepSix extends StatelessWidget {
alignment: Alignment.bottomCenter, alignment: Alignment.bottomCenter,
child: nextButton( child: nextButton(
context, context,
'Continuer', 'continue'.tr(),
skipIntro skipIntro
? const OnboardingStepNine() ? const OnboardingStepNine()
: const OnboardingStepSeven(), : const OnboardingStepSeven(),

View File

@ -1,4 +1,5 @@
// ignore_for_file: file_names // ignore_for_file: file_names
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
@ -18,11 +19,11 @@ class OnboardingStepSeven extends StatelessWidget {
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
appBar: AppBar( appBar: AppBar(
toolbarHeight: 60 * ratio, toolbarHeight: 60 * ratio,
title: const SizedBox( title: SizedBox(
height: 22, height: 22,
child: Text( child: Text(
'Mon code secret', 'myPassword'.tr(),
style: TextStyle(fontWeight: FontWeight.w600), style: const TextStyle(fontWeight: FontWeight.w600),
), ),
), ),
), ),
@ -30,11 +31,7 @@ class OnboardingStepSeven extends StatelessWidget {
body: SafeArea( body: SafeArea(
child: common.infoIntro( child: common.infoIntro(
context, context,
<TextSpan>[ 'geckoWillGenerateAPassword'.tr(),
const TextSpan(
text:
'Gecko va maintenant générer pour vous un code secret court qui vous permettra daccéder rapidement à vos portefeuilles, sans avoir à taper votre phrase de restauration à chaque fois.'),
],
'coffre-fort-code-secret-dans-telephone.png', 'coffre-fort-code-secret-dans-telephone.png',
'>', '>',
OnboardingStepEight(scanDerivation: scanDerivation), OnboardingStepEight(scanDerivation: scanDerivation),

View File

@ -1,4 +1,5 @@
// ignore_for_file: file_names // ignore_for_file: file_names
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
@ -18,11 +19,11 @@ class OnboardingStepEight extends StatelessWidget {
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
appBar: AppBar( appBar: AppBar(
toolbarHeight: 60 * ratio, toolbarHeight: 60 * ratio,
title: const SizedBox( title: SizedBox(
height: 22, height: 22,
child: Text( child: Text(
'Mon code secret', 'myPassword'.tr(),
style: TextStyle(fontWeight: FontWeight.w600), style: const TextStyle(fontWeight: FontWeight.w600),
), ),
), ),
), ),
@ -30,21 +31,12 @@ class OnboardingStepEight extends StatelessWidget {
body: SafeArea( body: SafeArea(
child: common.infoIntro( child: common.infoIntro(
context, context,
<TextSpan>[ 'thisPasswordProtectsYourWalletsInASecureChest'.tr(),
const TextSpan(
text:
'Ce code secret protège vos portefeuilles dans un coffre-fort '),
const TextSpan(
text: 'dont vous seul possédez le code',
style: TextStyle(fontWeight: FontWeight.bold)),
const TextSpan(
text:
', de sorte que vos portefeuilles seront inutilisables par dautres.'),
],
'coffre-fort-protege-les-portefeuilles.png', 'coffre-fort-protege-les-portefeuilles.png',
'>', '>',
OnboardingStepNine(scanDerivation: scanDerivation), OnboardingStepNine(scanDerivation: scanDerivation),
7), 7,
isMd: true),
), ),
); );
} }

View File

@ -1,4 +1,5 @@
// ignore_for_file: file_names // ignore_for_file: file_names
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
@ -30,11 +31,11 @@ class OnboardingStepNine extends StatelessWidget {
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
appBar: AppBar( appBar: AppBar(
toolbarHeight: 60 * ratio, toolbarHeight: 60 * ratio,
title: const SizedBox( title: SizedBox(
height: 22, height: 22,
child: Text( child: Text(
'Mon code secret', 'myPassword'.tr(),
style: TextStyle(fontWeight: FontWeight.w600), style: const TextStyle(fontWeight: FontWeight.w600),
), ),
), ),
), ),
@ -45,18 +46,9 @@ class OnboardingStepNine extends StatelessWidget {
common.buildProgressBar(8), common.buildProgressBar(8),
SizedBox(height: isTall ? 40 : 20), SizedBox(height: isTall ? 40 : 20),
common.buildText( common.buildText(
<TextSpan>[ "hereIsThePasswordKeepIt".tr(),
const TextSpan( 20,
text: true),
"Et voilà votre code secret !\n\nMémorisez-le ou notez-le, car il vous sera demandé "),
const TextSpan(
text: 'à chaque fois',
style: TextStyle(fontWeight: FontWeight.bold)),
const TextSpan(
text:
" que vous voudrez effectuer un paiement sur cet appareil."),
],
),
const SizedBox(height: 100), const SizedBox(height: 100),
Stack( Stack(
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
@ -98,13 +90,13 @@ class OnboardingStepNine extends StatelessWidget {
onPressed: () { onPressed: () {
_generateWalletProvider.changePinCode(reload: true); _generateWalletProvider.changePinCode(reload: true);
}, },
child: Text("Choisir un autre code secret", child: Text("chooseAnotherPassword".tr(),
style: TextStyle( style: TextStyle(
fontSize: 22 * ratio, fontSize: 22 * ratio,
fontWeight: FontWeight.w600))), fontWeight: FontWeight.w600))),
))), ))),
SizedBox(height: 22 * ratio), SizedBox(height: 22 * ratio),
common.nextButton(context, "J'ai noté mon code secret", common.nextButton(context, "iNotedMyPassword".tr(),
OnboardingStepTen(scanDerivation: scanDerivation), false), OnboardingStepTen(scanDerivation: scanDerivation), false),
SizedBox(height: 35 * ratio), SizedBox(height: 35 * ratio),
]), ]),

View File

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -31,9 +32,9 @@ class SearchScreen extends StatelessWidget {
appBar: AppBar( appBar: AppBar(
elevation: 1, elevation: 1,
toolbarHeight: 60 * ratio, toolbarHeight: 60 * ratio,
title: const SizedBox( title: SizedBox(
height: 22, height: 22,
child: Text('Rechercher'), child: Text('search'.tr()),
), ),
leading: IconButton( leading: IconButton(
icon: const Icon(Icons.arrow_back, color: Colors.black), icon: const Icon(Icons.arrow_back, color: Colors.black),
@ -105,9 +106,10 @@ class SearchScreen extends StatelessWidget {
); );
} }
: null, : null,
child: const Text( child: Text(
'Rechercher', 'search'.tr(),
style: TextStyle(fontSize: 24, fontWeight: FontWeight.w600), style: const TextStyle(
fontSize: 24, fontWeight: FontWeight.w600),
), ),
), ),
), ),

View File

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -38,9 +39,9 @@ class SearchResultScreen extends StatelessWidget {
appBar: AppBar( appBar: AppBar(
elevation: 1, elevation: 1,
toolbarHeight: 60 * ratio, toolbarHeight: 60 * ratio,
title: const SizedBox( title: SizedBox(
height: 22, height: 22,
child: Text('Résultats de votre recherche'), child: Text('researchResults'.tr()),
), ),
), ),
bottomNavigationBar: _homeProvider.bottomAppBar(context), bottomNavigationBar: _homeProvider.bottomAppBar(context),
@ -59,8 +60,8 @@ class SearchResultScreen extends StatelessWidget {
color: Colors.grey[700], color: Colors.grey[700],
), ),
children: <TextSpan>[ children: <TextSpan>[
const TextSpan( TextSpan(
text: "Résultats pour ", text: "resultsFor".tr(),
), ),
TextSpan( TextSpan(
text: '"${_searchProvider.searchController.text}"', text: '"${_searchProvider.searchController.text}"',
@ -71,7 +72,7 @@ class SearchResultScreen extends StatelessWidget {
), ),
const SizedBox(height: 40), const SizedBox(height: 40),
Text( Text(
'Dans la blockchain $currencyName', 'inBlockchainResult'.tr(args: [currencyName]),
style: const TextStyle(fontSize: 20), style: const TextStyle(fontSize: 20),
), ),
const SizedBox(height: 20), const SizedBox(height: 20),

View File

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:durt/durt.dart'; import 'package:durt/durt.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
@ -39,9 +40,9 @@ class SettingsScreen extends StatelessWidget {
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
appBar: AppBar( appBar: AppBar(
toolbarHeight: 60 * ratio, toolbarHeight: 60 * ratio,
title: const SizedBox( title: SizedBox(
height: 22, height: 22,
child: Text('Paramètres'), child: Text('parameters'.tr()),
)), )),
body: Column( body: Column(
// crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
@ -52,7 +53,8 @@ class SettingsScreen extends StatelessWidget {
log.d(_sub.sdk.api.connectedNode?.endpoint); log.d(_sub.sdk.api.connectedNode?.endpoint);
return Expanded( return Expanded(
child: Row(children: [ child: Row(children: [
Text(' Noeud $currencyName :'), const SizedBox(width: 10),
Text('currencyNode'.tr(args: [currencyName])),
const Spacer(), const Spacer(),
Icon(_sub.nodeConnected && !_sub.isLoadingEndpoint Icon(_sub.nodeConnected && !_sub.isLoadingEndpoint
? Icons.check ? Icons.check
@ -97,9 +99,9 @@ class SettingsScreen extends StatelessWidget {
log.i('Oublier tous mes coffres'); log.i('Oublier tous mes coffres');
await _myWallets.deleteAllWallet(context); await _myWallets.deleteAllWallet(context);
}, },
child: const Text( child: Text(
'Oublier tous mes coffres', 'forgetAllMyChests'.tr(),
style: TextStyle( style: const TextStyle(
fontSize: fontSize + 4, fontSize: fontSize + 4,
color: Color(0xffD80000), color: Color(0xffD80000),
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,

View File

@ -21,7 +21,7 @@ class SubstrateSandBox extends StatelessWidget {
toolbarHeight: 60 * ratio, toolbarHeight: 60 * ratio,
title: const SizedBox( title: const SizedBox(
height: 22, height: 22,
child: Text('Substrate Sandbox'), child: Text('Substrate Sandbox'),
), ),
), ),
body: SafeArea( body: SafeArea(
@ -36,12 +36,12 @@ class SubstrateSandBox extends StatelessWidget {
await _sub.connectNode(context); await _sub.connectNode(context);
}, },
child: Text( child: Text(
'Noeud connecté ?: ${_sub.nodeConnected} (${_sub.sdk.api.connectedNode?.endpoint})')), '🌐 Noeud connecté ?: ${_sub.nodeConnected} (${_sub.sdk.api.connectedNode?.endpoint})')),
if (_sub.nodeConnected) if (_sub.nodeConnected)
Text('Noeud "$currencyName", bloc N°${_sub.blocNumber}'), Text('🏆 Noeud "$currencyName", bloc N°${_sub.blocNumber}'),
const SizedBox(height: 20), const SizedBox(height: 20),
Row(children: [ Row(children: [
const Text('Liste des coffres:'), const Text('💳 Liste des coffres:'),
const Spacer(), const Spacer(),
InkWell( InkWell(
child: Image.asset( child: Image.asset(
@ -93,13 +93,13 @@ class SubstrateSandBox extends StatelessWidget {
addressInfo.address!, addressInfo.address!,
2, 2,
_sub.keystorePassword.text), _sub.keystorePassword.text),
child: const Text("Dériver"), child: const Text("🏂 Dériver"),
) )
]) ])
]); ]);
}), }),
const SizedBox(height: 20), const SizedBox(height: 20),
const Text('Mot de passe du coffre:'), const Text('🔒 Mot de passe du coffre:'),
TextField( TextField(
controller: _sub.keystorePassword, controller: _sub.keystorePassword,
obscureText: true, obscureText: true,
@ -130,7 +130,7 @@ class SubstrateSandBox extends StatelessWidget {
} }
: null, : null,
child: const Text( child: const Text(
'Importer depuis le presse-papier', '📎 Importer depuis le presse-papier',
style: TextStyle(fontSize: 20), style: TextStyle(fontSize: 20),
), ),
), ),
@ -149,7 +149,7 @@ class SubstrateSandBox extends StatelessWidget {
snack(context, 'Le mnemonic a été copié'); snack(context, 'Le mnemonic a été copié');
}, },
child: const Text( child: const Text(
"Générer un mnemonic et le copier", "🏦 Générer un mnemonic et le copier",
style: TextStyle(fontSize: 20), style: TextStyle(fontSize: 20),
), ),
), ),
@ -161,7 +161,7 @@ class SubstrateSandBox extends StatelessWidget {
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
), ),
const Text('--------'), const Text('-〰️---〰️---〰️-'),
const SizedBox(height: 10), const SizedBox(height: 10),
Text(_sub.debugConnection) Text(_sub.debugConnection)
]) ])

View File

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -39,44 +40,44 @@ class TransactionInProgress extends StatelessWidget {
switch (transType) { switch (transType) {
case 'pay': case 'pay':
{ {
_actionName = 'Transaction'; _actionName = 'transaction'.tr();
} }
break; break;
case 'cert': case 'cert':
{ {
_actionName = 'Certification'; _actionName = 'certification'.tr();
} }
break; break;
case 'comfirmIdty': case 'comfirmIdty':
{ {
_actionName = "Confirmation d'identité"; _actionName = "identityConfirm".tr();
} }
break; break;
case 'revokeIdty': case 'revokeIdty':
{ {
_actionName = "Révocation d'adhésion"; _actionName = "revokeAdhesion".tr();
} }
break; break;
default: default:
{ {
_actionName = 'Transaction étrange'; _actionName = 'strangeTransaction'.tr();
} }
} }
switch (_result) { switch (_result) {
case '': case '':
{ {
_resultText = 'Envoi en cours ...'; _resultText = 'sending'.tr();
} }
break; break;
case 'Ready': case 'Ready':
{ {
_resultText = 'En cours de propagation...'; _resultText = 'propagating'.tr();
} }
break; break;
case 'Broadcast': case 'Broadcast':
{ {
_resultText = 'En cours de validation ...'; _resultText = 'validating'.tr();
} }
break; break;
default: default:
@ -86,10 +87,10 @@ class TransactionInProgress extends StatelessWidget {
log.d(_result); log.d(_result);
if (_result.contains('blockHash: ')) { if (_result.contains('blockHash: ')) {
isValid = true; isValid = true;
_resultText = '$_actionName validé !'; _resultText = 'extrinsicValidated'.tr(args: [_actionName]);
} else { } else {
isValid = false; isValid = false;
_resultText = "Une erreur s'est produite:\n"; _resultText = "anErrorOccured".tr() + ":\n";
final List _exceptionSplit = _result.split('Exception: '); final List _exceptionSplit = _result.split('Exception: ');
String _exception; String _exception;
if (_exceptionSplit.length > 1) { if (_exceptionSplit.length > 1) {
@ -102,37 +103,33 @@ class TransactionInProgress extends StatelessWidget {
case 'cert.NotRespectCertPeriod': case 'cert.NotRespectCertPeriod':
case 'identity.CreatorNotAllowedToCreateIdty': case 'identity.CreatorNotAllowedToCreateIdty':
{ {
_resultText = _resultText = "24hbetweenCerts".tr();
"Vous devez attendre 24h entre chaque certification";
} }
break; break;
case 'cert.CannotCertifySelf': case 'cert.CannotCertifySelf':
{ {
_resultText = _resultText = "canNotCertifySelf".tr();
"Vous ne pouvez pas vous certifier\nvous même ...";
} }
break; break;
case 'identity.IdtyNameAlreadyExist': case 'identity.IdtyNameAlreadyExist':
{ {
_resultText = "Ce nom est déjà pris"; _resultText = "nameAlreadyExist".tr();
} }
break; break;
case 'balances.KeepAlive': case 'balances.KeepAlive':
{ {
_resultText = _resultText = "2GDtoKeepAlive".tr();
"Vous devez garder au moins 2ĞD sur votre compte pour le garder actif";
} }
break; break;
case '1010: Invalid Transaction: Inability to pay some fees , e.g. account balance too low': case '1010: Invalid Transaction: Inability to pay some fees , e.g. account balance too low':
{ {
_resultText = _resultText = "youHaveToFeedThisAccountBeforeUsing".tr();
"Vous devez alimenter ce compte avant\nde pouvoir l'utiliser";
} }
break; break;
case 'timeout': case 'timeout':
{ {
_resultText += "Le délais d'éxecution est dépassé"; _resultText += "execTimeoutOver".tr();
} }
break; break;
default: default:
@ -162,7 +159,9 @@ class TransactionInProgress extends StatelessWidget {
height: 22, height: 22,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[Text('$_actionName en cours')]), children: <Widget>[
Text('extrinsicInProgress'.tr(args: [_actionName]))
]),
)), )),
body: SafeArea( body: SafeArea(
child: Align( child: Align(
@ -189,10 +188,10 @@ class TransactionInProgress extends StatelessWidget {
fontSize: 18, fontWeight: FontWeight.w600), fontSize: 18, fontWeight: FontWeight.w600),
), ),
if (transType == 'pay') const SizedBox(height: 10), if (transType == 'pay') const SizedBox(height: 10),
const Text( Text(
'de', 'fromMinus'.tr(),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(fontSize: 18), style: const TextStyle(fontSize: 18),
), ),
Text( Text(
from, from,
@ -201,10 +200,10 @@ class TransactionInProgress extends StatelessWidget {
fontSize: 18, fontWeight: FontWeight.w600), fontSize: 18, fontWeight: FontWeight.w600),
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
const Text( Text(
'vers', 'toMinus'.tr(),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(fontSize: 18), style: const TextStyle(fontSize: 18),
), ),
Text( Text(
to, to,
@ -263,7 +262,7 @@ class TransactionInProgress extends StatelessWidget {
if (transType == 'pay') Navigator.pop(context); if (transType == 'pay') Navigator.pop(context);
}, },
child: Text( child: Text(
'Fermer', 'close'.tr(),
style: TextStyle( style: TextStyle(
fontSize: 23 * ratio, fontSize: 23 * ratio,
fontWeight: FontWeight.w600), fontWeight: FontWeight.w600),

View File

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -69,9 +70,9 @@ class WalletViewScreen extends StatelessWidget {
), ),
), ),
], ],
title: const SizedBox( title: SizedBox(
height: 22, height: 22,
child: Text('Voir un portefeuille'), child: Text('seeAWallet'.tr()),
), ),
), ),
bottomNavigationBar: _homeProvider.bottomAppBar(context), bottomNavigationBar: _homeProvider.bottomAppBar(context),
@ -112,7 +113,7 @@ class WalletViewScreen extends StatelessWidget {
), ),
const SizedBox(height: 9), const SizedBox(height: 9),
Text( Text(
"Voir\nl'activité", "displayNActivity".tr(),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: buttonFontSize, fontWeight: FontWeight.w500), fontSize: buttonFontSize, fontWeight: FontWeight.w500),
@ -136,33 +137,36 @@ class WalletViewScreen extends StatelessWidget {
final int _seconds = _durationSeconds.inSeconds; final int _seconds = _durationSeconds.inSeconds;
final int _minutes = _durationSeconds.inMinutes; final int _minutes = _durationSeconds.inMinutes;
// TODO translate timing
if (_seconds <= 0) { if (_seconds <= 0) {
_duration = '0 secondes'; _duration = 'seconds'.tr(args: ['0']);
} else if (_seconds <= 60) { } else if (_seconds <= 60) {
_duration = '$_seconds secondes'; _duration = 'seconds'.tr(args: [_seconds.toString()]);
} else if (_seconds <= 3600) { } else if (_seconds <= 3600) {
_duration = '$_minutes minutes'; _duration = 'minutes'.tr(args: [_minutes.toString()]);
} else if (_seconds <= 86400) { } else if (_seconds <= 86400) {
final int _hours = _durationSeconds.inHours; final int _hours = _durationSeconds.inHours;
final int _minutesLeft = _minutes - _hours * 60; final int _minutesLeft = _minutes - _hours * 60;
String _showMinutes = ''; String _showMinutes = '';
if (_minutesLeft < 60) {} if (_minutesLeft < 60) {}
_showMinutes = ' $_minutesLeft minutes'; _showMinutes =
_duration = '$_hours heures$_showMinutes'; 'minutes'.tr(args: [_minutesLeft.toString()]);
_duration =
'hours'.tr(args: [_hours.toString(), _showMinutes]);
} else if (_seconds <= 2592000) { } else if (_seconds <= 2592000) {
final int _days = _durationSeconds.inDays; final int _days = _durationSeconds.inDays;
_duration = '$_days jours'; _duration = 'days'.tr(args: [_days.toString()]);
} else { } else {
final int _months = final int _months =
(_durationSeconds.inDays / 30).round(); (_durationSeconds.inDays / 30).round();
_duration = '$_months mois'; _duration = 'months'.tr(args: [_months.toString()]);
} }
} }
return Visibility( return Visibility(
visible: (snapshot.data != {}), visible: (snapshot.data != {}),
child: Column(children: <Widget>[ child: Column(children: <Widget>[
if (snapshot.data!['canCert'] != null || if (snapshot.data!['canCert'] != null ||
_duration == '0 secondes') _duration == 'seconds'.tr(args: ['0']))
Column(children: <Widget>[ Column(children: <Widget>[
SizedBox( SizedBox(
height: buttonSize, height: buttonSize,
@ -180,9 +184,13 @@ class WalletViewScreen extends StatelessWidget {
'assets/gecko_certify.png')), 'assets/gecko_certify.png')),
), ),
onTap: () async { onTap: () async {
final bool? _result = await confirmPopup( final bool? _result =
context, await confirmPopup(
"Êtes-vous certain de vouloir certifier l'adresse:\n\n${getShortPubkey(pubkey!)}"); context,
"areYouSureYouWantToCertify".tr(
args: [
getShortPubkey(pubkey!)
]));
if (_result ?? false) { if (_result ?? false) {
String? _pin; String? _pin;
@ -227,7 +235,7 @@ class WalletViewScreen extends StatelessWidget {
), ),
const SizedBox(height: 9), const SizedBox(height: 9),
Text( Text(
"Certifier", "certify".tr(),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: buttonFontSize, fontSize: buttonFontSize,
@ -255,7 +263,8 @@ class WalletViewScreen extends StatelessWidget {
), ),
), ),
Text( Text(
"Vous devez attendre\n$_duration avant\nde pouvoir certifier", "mustWaitXBeforeCertify"
.tr(args: [_duration.toString()]),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: buttonFontSize - 4, fontSize: buttonFontSize - 4,
@ -264,7 +273,7 @@ class WalletViewScreen extends StatelessWidget {
), ),
]), ]),
if (snapshot.data!['certRenewable'] != null && if (snapshot.data!['certRenewable'] != null &&
_duration != '0 secondes') _duration != 'seconds'.tr(args: ['0']))
Column(children: <Widget>[ Column(children: <Widget>[
SizedBox( SizedBox(
height: buttonSize, height: buttonSize,
@ -285,7 +294,8 @@ class WalletViewScreen extends StatelessWidget {
), ),
), ),
Text( Text(
"Vous pourrez renouveller\ncette certification\ndans $_duration", "canRenewCertInX"
.tr(args: [_duration.toString()]),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: buttonFontSize - 4, fontSize: buttonFontSize - 4,
@ -321,36 +331,13 @@ class WalletViewScreen extends StatelessWidget {
), ),
const SizedBox(height: 9), const SizedBox(height: 9),
Text( Text(
"Copier\nla clef", "copyAddress".tr(),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: buttonFontSize, fontWeight: FontWeight.w500), fontSize: buttonFontSize, fontWeight: FontWeight.w500),
), ),
]), ]),
]), ]),
// FutureBuilder(
// future: _walletOptions.generateQRcode(_historyProvider.pubkey),
// builder: (context, snapshot) {
// return snapshot.data != null
// ? GestureDetector(
// key: const Key('openQrcode'),
// onTap: () {
// Navigator.push(
// context,
// MaterialPageRoute(builder: (context) {
// return AvatarFullscreen(
// Image.memory(snapshot.data),
// title: 'QrCode du profil',
// color: Colors.white,
// );
// }),
// );
// },
// child: Image.memory(snapshot.data, height: 60 * ratio),
// )
// : const Text('-', style: TextStyle(fontSize: 20));
// },
// ),
const Spacer(), const Spacer(),
Consumer<SubstrateSdk>(builder: (context, _sub, _) { Consumer<SubstrateSdk>(builder: (context, _sub, _) {
return Opacity( return Opacity(
@ -389,7 +376,7 @@ class WalletViewScreen extends StatelessWidget {
const SizedBox(height: 9), const SizedBox(height: 9),
Consumer<SubstrateSdk>(builder: (context, _sub, _) { Consumer<SubstrateSdk>(builder: (context, _sub, _) {
return Text( return Text(
"Faire un\nvirement", 'doATransfer'.tr(),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: _sub.nodeConnected ? Colors.black : Colors.grey[500], color: _sub.nodeConnected ? Colors.black : Colors.grey[500],
@ -466,9 +453,9 @@ class WalletViewScreen extends StatelessWidget {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
const Text( Text(
'Effectuer un virement', 'executeATransfer'.tr(),
style: TextStyle( style: const TextStyle(
fontSize: 26, fontWeight: FontWeight.w700), fontSize: 26, fontWeight: FontWeight.w700),
), ),
IconButton( IconButton(
@ -481,7 +468,7 @@ class WalletViewScreen extends StatelessWidget {
]), ]),
const SizedBox(height: 20), const SizedBox(height: 20),
Text( Text(
'Depuis:', 'from'.tr(),
style: TextStyle( style: TextStyle(
fontSize: 19, fontSize: 19,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
@ -571,7 +558,7 @@ class WalletViewScreen extends StatelessWidget {
// const SizedBox(height: 10), // const SizedBox(height: 10),
Text( Text(
'Montant:', 'amount'.tr(),
style: TextStyle( style: TextStyle(
fontSize: 19, fontSize: 19,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
@ -676,9 +663,9 @@ class WalletViewScreen extends StatelessWidget {
} }
} }
: null, : null,
child: const Text( child: Text(
'Effectuer le virement', 'executeTheTransfer'.tr(),
style: TextStyle( style: const TextStyle(
fontSize: 20, fontWeight: FontWeight.w600), fontSize: 20, fontWeight: FontWeight.w600),
), ),
), ),

View File

@ -316,6 +316,20 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.1.6" version: "0.1.6"
easy_localization:
dependency: "direct main"
description:
name: easy_localization
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
easy_logger:
dependency: transitive
description:
name: easy_logger
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.2"
fake_async: fake_async:
dependency: transitive dependency: transitive
description: description:
@ -389,6 +403,11 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.4" version: "1.0.4"
flutter_localizations:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
flutter_logs: flutter_logs:
dependency: "direct main" dependency: "direct main"
description: description:
@ -396,6 +415,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.6" version: "2.1.6"
flutter_markdown:
dependency: "direct main"
description:
name: flutter_markdown
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.10+2"
flutter_plugin_android_lifecycle: flutter_plugin_android_lifecycle:
dependency: transitive dependency: transitive
description: description:
@ -738,6 +764,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.2" version: "1.0.2"
markdown:
dependency: transitive
description:
name: markdown
url: "https://pub.dartlang.org"
source: hosted
version: "5.0.0"
matcher: matcher:
dependency: transitive dependency: transitive
description: description:

View File

@ -5,7 +5,7 @@ description: Pay with G1.
# pub.dev using `pub publish`. This is preferred for private packages. # pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 0.0.9+11 version: 0.0.9+12
environment: environment:
sdk: '>=2.12.0 <3.0.0' sdk: '>=2.12.0 <3.0.0'
@ -72,6 +72,8 @@ dependencies:
web_socket_channel: ^2.2.0 web_socket_channel: ^2.2.0
connectivity_plus: ^2.3.3 connectivity_plus: ^2.3.3
image_cropper: ^2.0.3 image_cropper: ^2.0.3
easy_localization: ^3.0.1
flutter_markdown: ^0.6.10+2
dev_dependencies: dev_dependencies:
# flutter_launcher_icons: ^0.9.2 # flutter_launcher_icons: ^0.9.2
@ -99,6 +101,7 @@ flutter:
assets: assets:
- config/ - config/
- assets/ - assets/
- assets/translations/
- assets/home/ - assets/home/
- assets/avatars/ - assets/avatars/
- assets/chests/ - assets/chests/

View File

@ -2,6 +2,7 @@
import 'dart:async'; import 'dart:async';
import 'dart:io'; import 'dart:io';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter_driver/flutter_driver.dart'; import 'package:flutter_driver/flutter_driver.dart';
import 'package:test/test.dart'; import 'package:test/test.dart';
// import 'package:flutter/services.dart'; // import 'package:flutter/services.dart';
@ -160,7 +161,7 @@ void main() {
await driver!.getText(find.byValueKey( await driver!.getText(find.byValueKey(
'step6', 'step6',
)), )),
"Jai généré votre phrase de restauration !\nTâchez de la garder bien secrète, car elle permet à quiconque la connaît daccéder à tous vos portefeuilles."); "iGeneratedYourMnemonicKeepItSecret".tr());
}); });
test('OnBoarding - Generate sentance and confirme it', ( test('OnBoarding - Generate sentance and confirme it', (
@ -255,7 +256,7 @@ void main() {
{timeout = const Duration(seconds: 2)}) async { {timeout = const Duration(seconds: 2)}) async {
await tapOn('goWalletHome'); await tapOn('goWalletHome');
expect(await getText('myWallets'), "Coffre à Ğecko"); expect(await getText('myWallets'), "geckoChest".tr());
await sleep(300); await sleep(300);
// Go to first derivation and rename it // Go to first derivation and rename it