From 93e61b66dfe72be42fadaa0dd3f1f23ae3500f61 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Wed, 22 Apr 2015 15:19:08 -0300 Subject: [PATCH] Update translation. Removed old files --- po/es.po | 197 +++++++++++----------- po/fr.po | 156 +++++++++-------- po/ja.po | 4 +- po/template.pot | 115 ++++--------- public/views/includes/clientError.html | 2 +- public/views/includes/loading.html | 6 - public/views/includes/photo.html | 1 - public/views/includes/pin.html | 54 ------ public/views/includes/sidebar.html | 2 +- public/views/includes/transaction.html | 2 +- public/views/modals/address-book.html | 82 --------- public/views/modals/paypro.html | 8 +- public/views/modals/qr-address.html | 26 --- public/views/modals/scanner.html | 2 +- public/views/modals/tx-details.html | 10 +- public/views/modals/txp-details.html | 18 +- public/views/modals/walletSelection.html | 30 ---- public/views/preferences.html | 11 +- public/views/preferencesLanguage.html | 10 ++ public/views/walletHome.html | 2 +- src/js/controllers/createProfile.js | 35 ++-- src/js/controllers/index.js | 18 +- src/js/controllers/pinController.js | 73 -------- src/js/controllers/preferencesLanguage.js | 23 +++ src/js/controllers/receive.js | 26 --- src/js/controllers/send.js | 86 ---------- src/js/routes.js | 54 ++++-- src/js/services/configService.js | 2 - src/js/services/profileService.js | 6 +- 29 files changed, 358 insertions(+), 703 deletions(-) delete mode 100644 public/views/includes/loading.html delete mode 100644 public/views/includes/photo.html delete mode 100644 public/views/includes/pin.html delete mode 100644 public/views/modals/address-book.html delete mode 100644 public/views/modals/qr-address.html delete mode 100644 public/views/modals/walletSelection.html create mode 100644 public/views/preferencesLanguage.html delete mode 100644 src/js/controllers/pinController.js create mode 100644 src/js/controllers/preferencesLanguage.js diff --git a/po/es.po b/po/es.po index 86ee4bd51..3bcd433ea 100644 --- a/po/es.po +++ b/po/es.po @@ -36,36 +36,20 @@ msgstr "" "* Usted puede instalar la copia de seguridad en otro dispositivo y usar el " "monedero al mismo tiempo en varios dispositivos." -#: public/views/modals/address-book.html -msgid "Add" -msgstr "Agregar" - -#: public/views/modals/address-book.html -msgid "Add a new entry" -msgstr "Nueva Entrada" - -#: public/views/modals/address-book.html -msgid "Add entry" -msgstr "Nueva Entrada" - #: public/views/includes/sidebar.html msgid "Add wallet" msgstr "Agregar monedero" -#: public/views/paymentUri.html public/views/modals/address-book.html -#: public/views/modals/qr-address.html +#: public/views/paymentUri.html msgid "Address" msgstr "Dirección" -#: public/views/modals/address-book.html -msgid "Address Book" -msgstr "Libreta de Direcciones" - #: public/views/preferences.html msgid "Alternative Currency" msgstr "Moneda Alternativa" #: public/views/paymentUri.html public/views/send.html +#: public/views/modals/txp-details.html msgid "Amount" msgstr "Importe" @@ -73,6 +57,10 @@ msgstr "Importe" msgid "Amount in" msgstr "Importe en" +#: public/views/preferencesLanguage.html +msgid "Applying changes" +msgstr "Aplicando los cambios" + #: public/views/send.html msgid "Available Balance" msgstr "Balance disponible" @@ -125,23 +113,21 @@ msgid "CANCEL" msgstr "CANCELAR" #: public/views/copayers.html public/views/send.html -#: public/views/modals/address-book.html public/views/modals/confirmation.html +#: public/views/modals/confirmation.html msgid "Cancel" msgstr "Cancelar" #: public/views/modals/paypro.html -msgid "Certified by:" -msgstr "Certificado por:" +msgid "Certified by" +msgstr "Certificado por" #: public/views/import.html msgid "Choose backup file from your computer" msgstr "Seleccione el archivo backup de su computadora" -#: public/views/modals/address-book.html public/views/modals/copayers.html -#: public/views/modals/paypro.html public/views/modals/qr-address.html +#: public/views/modals/copayers.html public/views/modals/paypro.html #: public/views/modals/scanner.html public/views/modals/tx-details.html #: public/views/modals/txp-details.html -#: public/views/modals/walletSelection.html msgid "Close" msgstr "Cerrar" @@ -150,8 +136,8 @@ msgid "Color" msgstr "Color" #: public/views/modals/tx-details.html -msgid "Confirmations:" -msgstr "Confirmaciones:" +msgid "Confirmations" +msgstr "Confirmaciones" #: public/views/modals/copayers.html msgid "Copayers" @@ -166,7 +152,7 @@ msgid "Copy this text as it is in a safe place (notepad or email)" msgstr "" "Copiar el texto como esta en un lugar seguro (notepad o correo electrónico)" -#: public/views/backup.html public/views/modals/qr-address.html +#: public/views/backup.html msgid "Copy to clipboard" msgstr "Copiar al portapapeles" @@ -194,22 +180,18 @@ msgstr "Crear nuevo monedero" msgid "Create, join or import" msgstr "Crear, unirse o importar" +#: public/views/modals/txp-details.html +msgid "Created by" +msgstr "Creado por" + #: public/views/create.html public/views/createProfile.html msgid "Creating wallet..." msgstr "Creando monedero..." -#: public/views/modals/address-book.html -msgid "Creator" -msgstr "Creador" - -#: public/views/modals/address-book.html +#: public/views/modals/tx-details.html msgid "Date" msgstr "Fecha" -#: public/views/modals/tx-details.html -msgid "Date:" -msgstr "Fecha:" - #: public/views/preferences.html msgid "Delete" msgstr "Eliminar" @@ -222,26 +204,17 @@ msgstr "Descargar copia de seguridad" msgid "ENTER" msgstr "ENTRAR" -#: public/views/modals/address-book.html -msgid "Empty. Create an alias for your addresses" -msgstr "Vacío. Crea una etiqueta para tus direcciones" - #: public/views/preferences.html msgid "Encrypt Private Key" msgstr "Encriptar Clave Privada" #: public/views/includes/password.html -#, fuzzy msgid "Enter your password" msgstr "Escribe tu contraseña" -#: public/views/modals/address-book.html -msgid "Entry" -msgstr "Entrada" - -#: public/views/modals/paypro.html -msgid "Expires:" -msgstr "Expira:" +#: public/views/modals/paypro.html public/views/modals/txp-details.html +msgid "Expires" +msgstr "Expira" #: public/views/create.html msgid "Family vacation funds" @@ -319,18 +292,14 @@ msgstr "Unirse a un monedero" msgid "Joining shared wallet..." msgstr "Unirse a un monedero..." -#: public/views/modals/address-book.html -msgid "Label" -msgstr "Etiqueta" +#: public/views/preferences.html +msgid "Language" +msgstr "Idioma" #: public/views/importLegacy.html msgid "Learn more about Wallet Migration" msgstr "Más detalles para migrar Monedero" -#: public/views/modals/walletSelection.html -msgid "Loading..." -msgstr "Cargando..." - #: public/views/paymentUri.html msgid "Make a payment to" msgstr "Hacer un pago a" @@ -344,8 +313,8 @@ msgid "Me" msgstr "Yo" #: public/views/modals/paypro.html public/views/modals/tx-details.html -msgid "Merchant Message:" -msgstr "Mensaje del negocio:" +msgid "Merchant message" +msgstr "Mensaje del negocio" #: public/views/paymentUri.html msgid "Message" @@ -375,20 +344,16 @@ msgstr "No hay gastos pendientes en este momento." msgid "No transactions yet" msgstr "Sin transacciones todavía" -#: public/views/send.html public/views/modals/address-book.html +#: public/views/send.html msgid "Not valid" msgstr "No válido" -#: public/views/send.html +#: public/views/send.html public/views/modals/tx-details.html +#: public/views/modals/txp-details.html msgid "Note" msgstr "Nota" -#: public/views/modals/tx-details.html -msgid "Note:" -msgstr "Nota:" - #: public/views/modals/confirmation.html -#, fuzzy msgid "OK" msgstr "LISTO" @@ -422,6 +387,10 @@ msgstr "Pegar invitación aquí" msgid "Payment Sent" msgstr "Pago Enviado" +#: public/views/modals/txp-details.html +msgid "Payment details" +msgstr "Detalles del pago" + #: public/views/modals/paypro.html msgid "Payment protocol request" msgstr "Solicitud de pago" @@ -445,10 +414,6 @@ msgstr "Monedero Personal" msgid "Preferences" msgstr "Preferencias" -#: public/views/modals/scanner.html -msgid "QR-Scanner" -msgstr "Escáner QR" - #: public/views/history.html msgid "Received" msgstr "Recibido" @@ -474,7 +439,6 @@ msgid "Repeat password" msgstr "Repite la contraseña" #: public/views/import.html public/views/join.html -#: public/views/modals/address-book.html msgid "Required" msgstr "Requerido" @@ -514,10 +478,6 @@ msgstr "Seleccionar el archivo de copia de seguridad" msgid "Select a wallet" msgstr "Seleccione un monedero" -#: public/views/modals/walletSelection.html -msgid "Select a wallet to make the payment" -msgstr "Seleccione monedero para realizar el pago" - #: public/views/create.html msgid "Select required signatures" msgstr "Seleccione las firmas requeridas" @@ -578,14 +538,10 @@ msgstr "Mostrar" msgid "Sign" msgstr "Firmar" -#: public/views/modals/tx-details.html +#: public/views/modals/tx-details.html public/views/modals/txp-details.html msgid "Signatures" msgstr "Firmas" -#: public/views/includes/pin.html -msgid "Skip" -msgstr "Omitir" - #: public/views/walletHome.html msgid "Spend proposals" msgstr "Propuestas de gastos" @@ -614,13 +570,15 @@ msgstr "" "Este monedero no esta registrado en el servidor Bitcore Wallet Service " "(BWS). Debe recrearlo con la información local disponible." -#: public/views/send.html public/views/includes/transaction.html -msgid "To" -msgstr "A" +#: public/views/modals/txp-details.html +msgid "Time" +msgstr "Hora" +#: public/views/send.html public/views/includes/transaction.html #: public/views/modals/paypro.html public/views/modals/tx-details.html -msgid "To:" -msgstr "Para:" +#: public/views/modals/txp-details.html +msgid "To" +msgstr "Para" #: public/views/walletHome.html msgid "Total Locked Balance" @@ -647,7 +605,6 @@ msgid "Transaction sent!" msgstr "¡Transacción enviada!" #: public/views/includes/offline.html -#, fuzzy msgid "Trying to reconnnect..." msgstr "Intentando reconectar..." @@ -687,10 +644,6 @@ msgstr "Red de prueba" msgid "View backup" msgstr "Ver Copia de Seguridad" -#: public/views/modals/address-book.html -msgid "Visible" -msgstr "Visible" - #: public/views/receive.html msgid "WARNING: Backup needed" msgstr "ADVERTENCIA: Se requiere hacer copia de seguridad" @@ -719,6 +672,10 @@ msgstr "Invitación para unirse al monedero" msgid "Wallet Invitation is not valid!" msgstr "¡Invitación no válida!" +#: public/views/includes/clientError.html +msgid "Wallet Service Error" +msgstr "Error en Wallet Service" + #: public/views/copayers.html msgid "Wallet incomplete and broken" msgstr "Monedero incompleto y roto" @@ -736,7 +693,6 @@ msgid "You do not have any wallet" msgstr "No tienes ningún monedero" #: public/views/backup.html public/views/import.html -#, fuzzy msgid "Your backup password" msgstr "Tu contraseña" @@ -756,16 +712,12 @@ msgstr "Contraseña de tu perfil" msgid "advanced options" msgstr "opciones avanzadas" -#: public/views/modals/qr-address.html -msgid "change" -msgstr "vuelto" - #: public/views/send.html msgid "in pending transactions" msgstr "en transacciones pendientes" #: public/views/copayers.html public/views/create.html -#: public/views/walletHome.html +#: public/views/walletHome.html public/views/includes/sidebar.html msgid "of" msgstr "de" @@ -785,12 +737,60 @@ msgstr "monedero" msgid "{{index.walletName}} settings" msgstr "Opciones de {{index.walletName}}" +#~ msgid "To:" +#~ msgstr "Para:" + +#~ msgid "Add" +#~ msgstr "Agregar" + +#~ msgid "Add a new entry" +#~ msgstr "Nueva Entrada" + +#~ msgid "Add entry" +#~ msgstr "Nueva Entrada" + +#~ msgid "Address Book" +#~ msgstr "Libreta de Direcciones" + +#~ msgid "Creator" +#~ msgstr "Creador" + +#~ msgid "Date:" +#~ msgstr "Fecha:" + +#~ msgid "Empty. Create an alias for your addresses" +#~ msgstr "Vacío. Crea una etiqueta para tus direcciones" + +#~ msgid "Entry" +#~ msgstr "Entrada" + +#~ msgid "Label" +#~ msgstr "Etiqueta" + +#~ msgid "Loading..." +#~ msgstr "Cargando..." + +#~ msgid "Note:" +#~ msgstr "Nota:" + +#~ msgid "QR-Scanner" +#~ msgstr "Escáner QR" + +#~ msgid "Select a wallet to make the payment" +#~ msgstr "Seleccione monedero para realizar el pago" + +#~ msgid "Skip" +#~ msgstr "Omitir" + +#~ msgid "Visible" +#~ msgstr "Visible" + +#~ msgid "change" +#~ msgstr "vuelto" + #~ msgid "BIP32 master extended private key" #~ msgstr "BIP32 master extended private key" -#~ msgid "Bitcore Wallet Service" -#~ msgstr "Bitcore Wallet Service" - #~ msgid "Bitcore Wallet Service URL" #~ msgstr "Bitcore Wallet Service URL" @@ -1448,9 +1448,6 @@ msgstr "Opciones de {{index.walletName}}" #~ msgid "transaction proposal purged" #~ msgstr "propuestas de transacciones purgadas" -#~ msgid "Language" -#~ msgstr "Idioma" - #~ msgid "Create {{requiredCopayers}}-of-{{totalCopayers}} wallet" #~ msgstr "Crea monedero {{requiredCopayers}}-de-{{totalCopayers}}" diff --git a/po/fr.po b/po/fr.po index 8bf380b7a..988aaa2b3 100644 --- a/po/fr.po +++ b/po/fr.po @@ -9,20 +9,33 @@ msgstr "" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" -"Language: fr_FR\n" -"X-Generator: Poedit 1.7.6\n" +"Language: fr\n" +"X-Generator: Poedit 1.6.10\n" #: public/views/splash/1.html -msgid "* In case you need to import wallets from previous Copay versions go to Menu" -msgstr "* Si vous avez besoin d'importer des portefeuilles depuis les versions précédentes de Copay, allez au Menu" +msgid "" +"* In case you need to import wallets from previous Copay versions go to " +"Menu" +msgstr "" +"* Si vous avez besoin d'importer des portefeuilles depuis les versions " +"précédentes de Copay, allez au Menu" #: public/views/modals/txp-details.html -msgid "* Only transactions created by yourself with no peer signatures can be removed" -msgstr "* Seules les transactions créées par vous-même sans signatures de pairs peuvent être supprimées" +msgid "" +"* Only transactions created by yourself with no peer signatures can be " +"removed" +msgstr "" +"* Seules les transactions créées par vous-même sans signatures de pairs " +"peuvent être supprimées" #: public/views/backup.html -msgid "* You can safely install your backup on other device and use your wallet from many devices at the same time." -msgstr "* Vous pouvez installer en toute sécurité votre sauvegarde sur un autre appareil et utiliser votre portefeuille depuis plusieurs appareils en même temps" +msgid "" +"* You can safely install your backup on other device and use your wallet " +"from many devices at the same time." +msgstr "" +"* Vous pouvez installer en toute sécurité votre sauvegarde sur un autre " +"appareil et utiliser votre portefeuille depuis plusieurs appareils en même " +"temps" #: public/views/modals/address-book.html msgid "Add" @@ -40,8 +53,7 @@ msgstr "Ajouter une entrée" msgid "Add wallet" msgstr "Ajouter un portefeuille" -#: public/views/paymentUri.html -#: public/views/modals/address-book.html +#: public/views/paymentUri.html public/views/modals/address-book.html #: public/views/modals/qr-address.html msgid "Address" msgstr "Adresse" @@ -54,8 +66,7 @@ msgstr "Carnet d'adresses" msgid "Alternative Currency" msgstr "Devise alternative" -#: public/views/paymentUri.html -#: public/views/send.html +#: public/views/paymentUri.html public/views/send.html msgid "Amount" msgstr "Montant" @@ -67,8 +78,7 @@ msgstr "Montant en" msgid "Available Balance" msgstr "Solde disponible" -#: public/views/create.html -#: public/views/join.html +#: public/views/create.html public/views/join.html msgid "BIP32 master extended private key" msgstr "Clé privée étendue maîtresse BIP32" @@ -89,8 +99,11 @@ msgid "Backup options" msgstr "Options de sauvegarde" #: public/views/receive.html -msgid "Before receiving funds, it is highly recommended you backup your wallet keys." -msgstr "Avant de recevoir des fonds, il est fortement recommandé de sauvegarder les clés de votre portefeuille." +msgid "" +"Before receiving funds, it is highly recommended you backup your wallet keys." +msgstr "" +"Avant de recevoir des fonds, il est fortement recommandé de sauvegarder les " +"clés de votre portefeuille." #: public/views/paymentUri.html msgid "Bitcoin URI is NOT valid!" @@ -116,10 +129,8 @@ msgstr "Mais non diffusée. Essayez de l'envoyer manuellement" msgid "CANCEL" msgstr "ANNULER" -#: public/views/copayers.html -#: public/views/send.html -#: public/views/modals/address-book.html -#: public/views/modals/confirmation.html +#: public/views/copayers.html public/views/send.html +#: public/views/modals/address-book.html public/views/modals/confirmation.html msgid "Cancel" msgstr "Annuler" @@ -131,12 +142,9 @@ msgstr "Certifié par :" msgid "Choose backup file from your computer" msgstr "Choisissez un fichier de sauvegarde depuis votre ordinateur" -#: public/views/modals/address-book.html -#: public/views/modals/copayers.html -#: public/views/modals/paypro.html -#: public/views/modals/qr-address.html -#: public/views/modals/scanner.html -#: public/views/modals/tx-details.html +#: public/views/modals/address-book.html public/views/modals/copayers.html +#: public/views/modals/paypro.html public/views/modals/qr-address.html +#: public/views/modals/scanner.html public/views/modals/tx-details.html #: public/views/modals/txp-details.html #: public/views/modals/walletSelection.html msgid "Close" @@ -162,8 +170,7 @@ msgstr "Copiez la sauvegarde dans un endroit sûr" msgid "Copy this text as it is in a safe place (notepad or email)" msgstr "Copiez le texte dans un endroit sûr (bloc-notes ou e-mail)" -#: public/views/backup.html -#: public/views/modals/qr-address.html +#: public/views/backup.html public/views/modals/qr-address.html msgid "Copy to clipboard" msgstr "Copier dans le presse-papier" @@ -179,8 +186,7 @@ msgstr "Impossible de récupérer l'historique des transactions" msgid "Could not update Wallet" msgstr "Impossible de mettre à jour le portefeuille" -#: public/views/create.html -#: public/views/walletHome.html +#: public/views/create.html public/views/walletHome.html msgid "Create" msgstr "Créer" @@ -192,8 +198,7 @@ msgstr "Créer un nouveau portefeuille" msgid "Create, join or import" msgstr "Créer, joindre ou importer" -#: public/views/create.html -#: public/views/createProfile.html +#: public/views/create.html public/views/createProfile.html msgid "Creating wallet..." msgstr "Création du portefeuille..." @@ -261,8 +266,7 @@ msgstr "Acquisition des transactions..." msgid "Global settings" msgstr "Paramètres globaux" -#: public/views/create.html -#: public/views/join.html +#: public/views/create.html public/views/join.html msgid "Hide" msgstr "Masquer" @@ -298,13 +302,11 @@ msgstr "Importer un portefeuille" msgid "Importing wallet..." msgstr "Importation du portefeuille..." -#: public/views/modals/tx-details.html -#: public/views/modals/txp-details.html +#: public/views/modals/tx-details.html public/views/modals/txp-details.html msgid "Information" msgstr "Information" -#: public/views/create.html -#: public/views/join.html +#: public/views/create.html public/views/join.html msgid "John" msgstr "John" @@ -340,13 +342,11 @@ msgstr "Faire un paiement à" msgid "Master extended private key" msgstr "Clé privée étendue maîtresse" -#: public/views/includes/copayers.html -#: public/views/modals/copayers.html +#: public/views/includes/copayers.html public/views/modals/copayers.html msgid "Me" msgstr "Moi" -#: public/views/modals/paypro.html -#: public/views/modals/tx-details.html +#: public/views/modals/paypro.html public/views/modals/tx-details.html msgid "Merchant Message:" msgstr "Message marchand :" @@ -378,8 +378,7 @@ msgstr "Aucune propositions de dépense en attente à ce moment." msgid "No transactions yet" msgstr "Aucune transaction" -#: public/views/send.html -#: public/views/modals/address-book.html +#: public/views/send.html public/views/modals/address-book.html msgid "Not valid" msgstr "Non valide" @@ -403,14 +402,15 @@ msgstr "Ok" msgid "Opening Wallet..." msgstr "Ouverture du portefeuille..." -#: public/views/import.html -#: public/views/importLegacy.html +#: public/views/import.html public/views/importLegacy.html msgid "Password" msgstr "Mot de passe" #: public/views/includes/password.html msgid "Password cannot be recovered. Be sure to write it down" -msgstr "Le mot de passe ne peut pas être récupéré. Assurez-vous de l'écrire sur papier" +msgstr "" +"Le mot de passe ne peut pas être récupéré. Assurez-vous de l'écrire sur " +"papier" #: public/views/import.html msgid "Paste backup plain text code" @@ -433,8 +433,11 @@ msgid "Payment to" msgstr "Paiement à" #: public/views/preferencesDeleteWallet.html -msgid "Permanently delete this wallet. WARNING: this action cannot be reversed." -msgstr "Supprimer définitivement ce portefeuille. ATTENTION : cette action ne peut pas être annulée." +msgid "" +"Permanently delete this wallet. WARNING: this action cannot be reversed." +msgstr "" +"Supprimer définitivement ce portefeuille. ATTENTION : cette action ne peut " +"pas être annulée." #: public/views/walletHome.html msgid "Personal Wallet" @@ -468,13 +471,11 @@ msgstr "Rejeter" msgid "Remove transaction" msgstr "Supprimer la transaction" -#: public/views/backup.html -#: public/views/includes/password.html +#: public/views/backup.html public/views/includes/password.html msgid "Repeat password" msgstr "Répéter le mot de passe" -#: public/views/import.html -#: public/views/join.html +#: public/views/import.html public/views/join.html #: public/views/modals/address-book.html msgid "Required" msgstr "Requis" @@ -564,11 +565,15 @@ msgid "Share this secret with your copayers" msgstr "Partagez ce secret avec vos copayers" #: public/views/receive.html -msgid "Share this with anyone to have them send you payments. To protect your privacy, new addresses are generated automatically once you use them." -msgstr "Partagez ceci avec quiconque pour recevoir des paiements. Pour protéger votre anonymat, de nouvelles adresses sont générées automatiquement une fois que vous les utilisez." +msgid "" +"Share this with anyone to have them send you payments. To protect your " +"privacy, new addresses are generated automatically once you use them." +msgstr "" +"Partagez ceci avec quiconque pour recevoir des paiements. Pour protéger " +"votre anonymat, de nouvelles adresses sont générées automatiquement une fois " +"que vous les utilisez." -#: public/views/create.html -#: public/views/join.html +#: public/views/create.html public/views/join.html msgid "Show" msgstr "Montrer" @@ -597,20 +602,26 @@ msgid "The transaction was removed by creator" msgstr "La transaction a été supprimée par le créateur" #: public/views/backup.html -msgid "This wallet have its private key encrypted. Exporting a backup will keep the private key encrypted on the backup." -msgstr "Ce portefeuille a sa clé privée chiffrée. Exporter une sauvegarde gardera la clé privée chiffrée lors de la sauvegarde." +msgid "" +"This wallet have its private key encrypted. Exporting a backup will keep the " +"private key encrypted on the backup." +msgstr "" +"Ce portefeuille a sa clé privée chiffrée. Exporter une sauvegarde gardera la " +"clé privée chiffrée lors de la sauvegarde." #: public/views/walletHome.html -msgid "This wallet is not registered at the given Bitcore Wallet Service (BWS). You can recreate it from the local information." -msgstr "Ce portefeuille n'est pas enregistré dans le Bitcore Wallet Service (BWS). Vous pouvez le recréer depuis l'information locale." +msgid "" +"This wallet is not registered at the given Bitcore Wallet Service (BWS). You " +"can recreate it from the local information." +msgstr "" +"Ce portefeuille n'est pas enregistré dans le Bitcore Wallet Service (BWS). " +"Vous pouvez le recréer depuis l'information locale." -#: public/views/send.html -#: public/views/includes/transaction.html +#: public/views/send.html public/views/includes/transaction.html msgid "To" msgstr "À" -#: public/views/modals/paypro.html -#: public/views/modals/tx-details.html +#: public/views/modals/paypro.html public/views/modals/tx-details.html msgid "To:" msgstr "À :" @@ -642,8 +653,7 @@ msgstr "Transaction envoyée !" msgid "Trying to reconnnect..." msgstr "Tentative de reconnexion..." -#: public/views/history.html -#: public/views/modals/tx-details.html +#: public/views/history.html public/views/modals/tx-details.html msgid "Unconfirmed" msgstr "Non confirmée" @@ -727,13 +737,11 @@ msgstr "Attention !" msgid "You do not have any wallet" msgstr "Vous n'avez aucun portefeuille" -#: public/views/backup.html -#: public/views/import.html +#: public/views/backup.html public/views/import.html msgid "Your backup password" msgstr "Votre mot de passe de sauvegarde" -#: public/views/create.html -#: public/views/join.html +#: public/views/create.html public/views/join.html msgid "Your nickname" msgstr "Votre surnom" @@ -745,8 +753,7 @@ msgstr "Votre mot de passe" msgid "Your profile password" msgstr "Votre mot de passe de profil" -#: public/views/create.html -#: public/views/join.html +#: public/views/create.html public/views/join.html msgid "advanced options" msgstr "options avancées" @@ -758,8 +765,7 @@ msgstr "change" msgid "in pending transactions" msgstr "dans les transactions en attente" -#: public/views/copayers.html -#: public/views/create.html +#: public/views/copayers.html public/views/create.html #: public/views/walletHome.html msgid "of" msgstr "de" diff --git a/po/ja.po b/po/ja.po index 4cbd46969..b27e08963 100644 --- a/po/ja.po +++ b/po/ja.po @@ -9,8 +9,8 @@ msgstr "" "Last-Translator: \n" "Language-Team: dabura667\n" "MIME-Version: 1.0\n" -"Language: ja_JP\n" -"X-Generator: Poedit 1.6.4\n" +"Language: ja\n" +"X-Generator: Poedit 1.6.10\n" #: public/views/splash/1.html msgid "" diff --git a/po/template.pot b/po/template.pot index 6c2b23482..91c3b69f4 100644 --- a/po/template.pot +++ b/po/template.pot @@ -16,38 +16,21 @@ msgstr "" msgid "* You can safely install your backup on other device and use your wallet from many devices at the same time." msgstr "" -#: public/views/modals/address-book.html -msgid "Add" -msgstr "" - -#: public/views/modals/address-book.html -msgid "Add a new entry" -msgstr "" - -#: public/views/modals/address-book.html -msgid "Add entry" -msgstr "" - #: public/views/includes/sidebar.html msgid "Add wallet" msgstr "" #: public/views/paymentUri.html -#: public/views/modals/address-book.html -#: public/views/modals/qr-address.html msgid "Address" msgstr "" -#: public/views/modals/address-book.html -msgid "Address Book" -msgstr "" - #: public/views/preferences.html msgid "Alternative Currency" msgstr "" #: public/views/paymentUri.html #: public/views/send.html +#: public/views/modals/txp-details.html msgid "Amount" msgstr "" @@ -55,6 +38,10 @@ msgstr "" msgid "Amount in" msgstr "" +#: public/views/preferencesLanguage.html +msgid "Applying changes" +msgstr "" + #: public/views/send.html msgid "Available Balance" msgstr "" @@ -105,27 +92,23 @@ msgstr "" #: public/views/copayers.html #: public/views/send.html -#: public/views/modals/address-book.html #: public/views/modals/confirmation.html msgid "Cancel" msgstr "" #: public/views/modals/paypro.html -msgid "Certified by:" +msgid "Certified by" msgstr "" #: public/views/import.html msgid "Choose backup file from your computer" msgstr "" -#: public/views/modals/address-book.html #: public/views/modals/copayers.html #: public/views/modals/paypro.html -#: public/views/modals/qr-address.html #: public/views/modals/scanner.html #: public/views/modals/tx-details.html #: public/views/modals/txp-details.html -#: public/views/modals/walletSelection.html msgid "Close" msgstr "" @@ -134,7 +117,7 @@ msgid "Color" msgstr "" #: public/views/modals/tx-details.html -msgid "Confirmations:" +msgid "Confirmations" msgstr "" #: public/views/modals/copayers.html @@ -150,7 +133,6 @@ msgid "Copy this text as it is in a safe place (notepad or email)" msgstr "" #: public/views/backup.html -#: public/views/modals/qr-address.html msgid "Copy to clipboard" msgstr "" @@ -179,21 +161,17 @@ msgstr "" msgid "Create, join or import" msgstr "" +#: public/views/modals/txp-details.html +msgid "Created by" +msgstr "" + #: public/views/create.html #: public/views/createProfile.html msgid "Creating wallet..." msgstr "" -#: public/views/modals/address-book.html -msgid "Creator" -msgstr "" - -#: public/views/modals/address-book.html -msgid "Date" -msgstr "" - #: public/views/modals/tx-details.html -msgid "Date:" +msgid "Date" msgstr "" #: public/views/preferences.html @@ -208,10 +186,6 @@ msgstr "" msgid "ENTER" msgstr "" -#: public/views/modals/address-book.html -msgid "Empty. Create an alias for your addresses" -msgstr "" - #: public/views/preferences.html msgid "Encrypt Private Key" msgstr "" @@ -220,12 +194,9 @@ msgstr "" msgid "Enter your password" msgstr "" -#: public/views/modals/address-book.html -msgid "Entry" -msgstr "" - #: public/views/modals/paypro.html -msgid "Expires:" +#: public/views/modals/txp-details.html +msgid "Expires" msgstr "" #: public/views/create.html @@ -307,18 +278,14 @@ msgstr "" msgid "Joining shared wallet..." msgstr "" -#: public/views/modals/address-book.html -msgid "Label" +#: public/views/preferences.html +msgid "Language" msgstr "" #: public/views/importLegacy.html msgid "Learn more about Wallet Migration" msgstr "" -#: public/views/modals/walletSelection.html -msgid "Loading..." -msgstr "" - #: public/views/paymentUri.html msgid "Make a payment to" msgstr "" @@ -334,7 +301,7 @@ msgstr "" #: public/views/modals/paypro.html #: public/views/modals/tx-details.html -msgid "Merchant Message:" +msgid "Merchant message" msgstr "" #: public/views/paymentUri.html @@ -366,16 +333,13 @@ msgid "No transactions yet" msgstr "" #: public/views/send.html -#: public/views/modals/address-book.html msgid "Not valid" msgstr "" #: public/views/send.html -msgid "Note" -msgstr "" - #: public/views/modals/tx-details.html -msgid "Note:" +#: public/views/modals/txp-details.html +msgid "Note" msgstr "" #: public/views/modals/confirmation.html @@ -411,6 +375,10 @@ msgstr "" msgid "Payment Sent" msgstr "" +#: public/views/modals/txp-details.html +msgid "Payment details" +msgstr "" + #: public/views/modals/paypro.html msgid "Payment protocol request" msgstr "" @@ -431,10 +399,6 @@ msgstr "" msgid "Preferences" msgstr "" -#: public/views/modals/scanner.html -msgid "QR-Scanner" -msgstr "" - #: public/views/history.html msgid "Received" msgstr "" @@ -462,7 +426,6 @@ msgstr "" #: public/views/import.html #: public/views/join.html -#: public/views/modals/address-book.html msgid "Required" msgstr "" @@ -502,10 +465,6 @@ msgstr "" msgid "Select a wallet" msgstr "" -#: public/views/modals/walletSelection.html -msgid "Select a wallet to make the payment" -msgstr "" - #: public/views/create.html msgid "Select required signatures" msgstr "" @@ -564,13 +523,10 @@ msgid "Sign" msgstr "" #: public/views/modals/tx-details.html +#: public/views/modals/txp-details.html msgid "Signatures" msgstr "" -#: public/views/includes/pin.html -msgid "Skip" -msgstr "" - #: public/views/walletHome.html msgid "Spend proposals" msgstr "" @@ -592,14 +548,16 @@ msgstr "" msgid "This wallet is not registered at the given Bitcore Wallet Service (BWS). You can recreate it from the local information." msgstr "" -#: public/views/send.html -#: public/views/includes/transaction.html -msgid "To" +#: public/views/modals/txp-details.html +msgid "Time" msgstr "" +#: public/views/send.html +#: public/views/includes/transaction.html #: public/views/modals/paypro.html #: public/views/modals/tx-details.html -msgid "To:" +#: public/views/modals/txp-details.html +msgid "To" msgstr "" #: public/views/walletHome.html @@ -667,10 +625,6 @@ msgstr "" msgid "View backup" msgstr "" -#: public/views/modals/address-book.html -msgid "Visible" -msgstr "" - #: public/views/receive.html msgid "WARNING: Backup needed" msgstr "" @@ -699,6 +653,10 @@ msgstr "" msgid "Wallet Invitation is not valid!" msgstr "" +#: public/views/includes/clientError.html +msgid "Wallet Service Error" +msgstr "" + #: public/views/copayers.html msgid "Wallet incomplete and broken" msgstr "" @@ -738,10 +696,6 @@ msgstr "" msgid "advanced options" msgstr "" -#: public/views/modals/qr-address.html -msgid "change" -msgstr "" - #: public/views/send.html msgid "in pending transactions" msgstr "" @@ -749,6 +703,7 @@ msgstr "" #: public/views/copayers.html #: public/views/create.html #: public/views/walletHome.html +#: public/views/includes/sidebar.html msgid "of" msgstr "" diff --git a/public/views/includes/clientError.html b/public/views/includes/clientError.html index 68f1c2666..503de64ef 100644 --- a/public/views/includes/clientError.html +++ b/public/views/includes/clientError.html @@ -4,7 +4,7 @@
-

Wallet Service Error

+

Wallet Service Error

{{index.clientError.error || index.clientError.message || index.clientError}}
diff --git a/public/views/includes/loading.html b/public/views/includes/loading.html deleted file mode 100644 index 4734a3fc0..000000000 --- a/public/views/includes/loading.html +++ /dev/null @@ -1,6 +0,0 @@ -
-
- Loading... -
{{title|translate}}...
-
-
diff --git a/public/views/includes/photo.html b/public/views/includes/photo.html deleted file mode 100644 index 3e039d6c2..000000000 --- a/public/views/includes/photo.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/public/views/includes/pin.html b/public/views/includes/pin.html deleted file mode 100644 index ea012ef97..000000000 --- a/public/views/includes/pin.html +++ /dev/null @@ -1,54 +0,0 @@ -
-

- Setup a PIN - Repeat PIN -

-
- {{(pin.error || cp.error)|translate}} -
-
-
- - -
- -
- - -
- -
- - -
- -
- - -
-
-
-
- 1 - 2 - 3 -
-
- 4 - 5 - 6 -
-
- 7 - 8 - 9 -
-
- - Skip - - 0 - -
-
-
diff --git a/public/views/includes/sidebar.html b/public/views/includes/sidebar.html index 5a1712f7a..74045f34e 100644 --- a/public/views/includes/sidebar.html +++ b/public/views/includes/sidebar.html @@ -12,7 +12,7 @@
{{(item.name || item.id) | limitTo: 1}}
{{item.name || item.id}}
-
{{item.m}} of {{item.n}}
+
{{item.m}} of {{item.n}}
  • diff --git a/public/views/includes/transaction.html b/public/views/includes/transaction.html index 550c9b0c6..dd1c9ff7f 100644 --- a/public/views/includes/transaction.html +++ b/public/views/includes/transaction.html @@ -2,7 +2,7 @@ ng-class="{'text-gray':!tx.pendingForUs}" ng-click="openTxModal(tx, index.copayers)">
    - +
    diff --git a/public/views/modals/address-book.html b/public/views/modals/address-book.html deleted file mode 100644 index a862e5dd8..000000000 --- a/public/views/modals/address-book.html +++ /dev/null @@ -1,82 +0,0 @@ - - diff --git a/public/views/modals/paypro.html b/public/views/modals/paypro.html index 61641b8e0..c04c077e0 100644 --- a/public/views/modals/paypro.html +++ b/public/views/modals/paypro.html @@ -24,24 +24,24 @@
    - To: {{paypro.domain}} + To: {{paypro.domain}}
    - Certified by: + Certified by: {{paypro.verifyData.caName}} Untrusted
    - Merchant Message: + Merchant message: {{paypro.memo}}
    - Expires: {{paypro.expires | amTimeAgo }} + Expires: {{paypro.expires | amTimeAgo }}
    diff --git a/public/views/modals/qr-address.html b/public/views/modals/qr-address.html deleted file mode 100644 index 8a6281e5e..000000000 --- a/public/views/modals/qr-address.html +++ /dev/null @@ -1,26 +0,0 @@ - - -
    - - -
    - {{addr}} -
    -
    change
    -
    - -
    -
    diff --git a/public/views/modals/scanner.html b/public/views/modals/scanner.html index 30ec401c4..cc23eb242 100644 --- a/public/views/modals/scanner.html +++ b/public/views/modals/scanner.html @@ -5,7 +5,7 @@
    -

    +

    QR-Scanner

    diff --git a/public/views/modals/tx-details.html b/public/views/modals/tx-details.html index c2c669151..efb5a01f4 100644 --- a/public/views/modals/tx-details.html +++ b/public/views/modals/tx-details.html @@ -24,7 +24,7 @@

    Information

    • - To: + To: {{btx.merchant.domain}} @@ -36,25 +36,25 @@
    • - Date: + Date:
    • - Note: + Note: {{btx.message}}
    • - Merchant Message: + Merchant message: {{btx.merchant.pr.pd.memo}}
    • - Confirmations: + Confirmations: Unconfirmed diff --git a/public/views/modals/txp-details.html b/public/views/modals/txp-details.html index e0d86829b..48b35ed4b 100644 --- a/public/views/modals/txp-details.html +++ b/public/views/modals/txp-details.html @@ -14,35 +14,35 @@

      Information

      • - To: + To: {{tx.toAddress}}
      • - Amount: + Amount: {{amountStr}} {{alternativeAmountStr}}
      • - Time: + Time:
      • - Create by: + Created by: {{tx.creatorName}}
      • - Note: + Note: {{tx.message}}
      -

      PAYMENT DETAILS

      +

      Payment details

      • - To: + To: {{tx.paypro.domain}} @@ -52,7 +52,7 @@
      • - Expires: + Expires: @@ -65,7 +65,7 @@
      -

      Signatures:

      +

      Signatures

      • diff --git a/public/views/modals/walletSelection.html b/public/views/modals/walletSelection.html deleted file mode 100644 index 8dd20c7ad..000000000 --- a/public/views/modals/walletSelection.html +++ /dev/null @@ -1,30 +0,0 @@ - - diff --git a/public/views/preferences.html b/public/views/preferences.html index 9ce5d791a..5c746f40c 100644 --- a/public/views/preferences.html +++ b/public/views/preferences.html @@ -26,12 +26,21 @@
      • Global settings

        + +
      • + Language + + + {{index.defaultLanguageName}} + +
      • +
      • Unit {{preferences.unitName}} - +
      • diff --git a/public/views/preferencesLanguage.html b/public/views/preferencesLanguage.html new file mode 100644 index 000000000..6cd2eabbd --- /dev/null +++ b/public/views/preferencesLanguage.html @@ -0,0 +1,10 @@ +
        +
        Applying changes
        +
        + {{lang.name}} + +
        +
        +
        diff --git a/public/views/walletHome.html b/public/views/walletHome.html index 61136d5cc..dbce3f15d 100644 --- a/public/views/walletHome.html +++ b/public/views/walletHome.html @@ -88,7 +88,7 @@

        Spend proposals

        -
        diff --git a/src/js/controllers/createProfile.js b/src/js/controllers/createProfile.js index 514176e10..a9dc91307 100644 --- a/src/js/controllers/createProfile.js +++ b/src/js/controllers/createProfile.js @@ -6,24 +6,21 @@ angular.module('copayApp.controllers').controller('createProfileController', fun if (profileService.profile) go.walletHome(); - var pin=''; - // $rootScope.$on('pin', function(event, pin) { - self.creatingProfile = true; + self.creatingProfile = true; - $timeout(function() { - profileService.create(pin, function(err) { - if (err) { - self.creatingProfile = false; - $log.warn(err); - self.error = err; - $scope.$apply(); - $timeout(function() { - go.reload(); - }, 3000); - } else { - go.walletHome(); - } - }); - }, 100); - // }); + $timeout(function() { + profileService.create(function(err) { + if (err) { + self.creatingProfile = false; + $log.warn(err); + self.error = err; + $scope.$apply(); + $timeout(function() { + go.reload(); + }, 3000); + } else { + go.walletHome(); + } + }); + }, 100); }); diff --git a/src/js/controllers/index.js b/src/js/controllers/index.js index ee699b1c1..d24b42bee 100644 --- a/src/js/controllers/index.js +++ b/src/js/controllers/index.js @@ -28,6 +28,23 @@ angular.module('copayApp.controllers').controller('indexController', function($r 'link': 'history' }]; + self.availableLanguages = [{ + name: 'English', + isoCode: 'en', + }, { + name: 'Spanish', + isoCode: 'es', + }, { + name: 'Français', + isoCode: 'fr', + }, { + name: '日本人', + isoCode: 'ja', + }]; + + self.defaultLanguage = configService.getSync().wallet.settings.defaultLanguage || 'en'; + self.defaultLanguageName = lodash.result(lodash.find(this.availableLanguages, { 'isoCode': self.defaultLanguage }), 'name'); + self.setOngoingProcess = function(processName, isOn) { $log.debug('onGoingProcess', processName, isOn); self[processName] = isOn; @@ -419,7 +436,6 @@ angular.module('copayApp.controllers').controller('indexController', function($r }); }; - // UX event handlers $rootScope.$on('Local/ColorUpdated', function(event) { self.updateColor(); diff --git a/src/js/controllers/pinController.js b/src/js/controllers/pinController.js deleted file mode 100644 index f8037b859..000000000 --- a/src/js/controllers/pinController.js +++ /dev/null @@ -1,73 +0,0 @@ -'use strict'; - -angular.module('copayApp.controllers').controller('pinController', function($scope, $timeout) { - this.init = function(confirmPin, testPin) { - this._firstpin = null; - this.askForPin = 1; - this.confirmPin = confirmPin; - this.clear(); - if (testPin) { - console.log('WARN: using test pin:', testPin); - $timeout(function() { - $scope.$emit('pin', testPin); - }, 100); - } - }; - - this.clear = function() { - this.digits = []; - this.defined = []; - }; - - this.press = function(digit) { - var self = this; - $timeout(function() { - self._press(digit); - }, 1); - }; - - this._press = function(digit) { - var self = this; - this.error = null; - this.digits.push(digit); - this.defined.push(true); - - if (this.digits.length == 4) { - var pin = this.digits.join(''); - - if (this.confirmPin) { - if (!this._firstpin) { - this._firstpin = pin; - this.askForPin = 2; - $timeout(function() { - self.clear(); - }, 100); - return; - } else { - if (pin === this._firstpin) { - $scope.$emit('pin', pin); - return; - } else { - this._firstpin = null; - this.askForPin = 1; - $timeout(function() { - self.clear(); - self.error = 'Entered PINs were not equal. Try again'; - var _self = self; - $timeout(function() { - _self.error = null; - }, 2000); - }, 100); - return; - } - } - } else { - $scope.$emit('pin', pin); - } - } - }; - - this.skip = function() { - $scope.$emit('pin', null); - }; -}); diff --git a/src/js/controllers/preferencesLanguage.js b/src/js/controllers/preferencesLanguage.js new file mode 100644 index 000000000..2714ec74a --- /dev/null +++ b/src/js/controllers/preferencesLanguage.js @@ -0,0 +1,23 @@ +'use strict'; + +angular.module('copayApp.controllers').controller('preferencesLanguageController', + function($scope, $timeout, configService, applicationService) { + + this.save = function(newLang) { + var opts = { + wallet: { + settings: { + defaultLanguage: newLang + } + } + }; + + this.loading = true; + $timeout(function() { + configService.set(opts, function(err) { + if (err) console.log(err); + applicationService.restart(); + }); + }, 100); + }; + }); diff --git a/src/js/controllers/receive.js b/src/js/controllers/receive.js index fddd93ff4..bd5d47acc 100644 --- a/src/js/controllers/receive.js +++ b/src/js/controllers/receive.js @@ -59,31 +59,5 @@ angular.module('copayApp.controllers').controller('receiveController', } }; - this.openAddressModal = function(address) { - var self = this; - var ModalInstanceCtrl = function($scope, $modalInstance, address) { - $scope.address = address; - $scope.isCordova = self.isCordova; - $scope.copyAddress = function(addr) { - self.copyAddress(addr); - }; - - $scope.cancel = function() { - $modalInstance.dismiss('cancel'); - }; - }; - - $modal.open({ - templateUrl: 'views/modals/qr-address.html', - windowClass: 'full', - controller: ModalInstanceCtrl, - resolve: { - address: function() { - return address; - } - } - }); - }; - } ); diff --git a/src/js/controllers/send.js b/src/js/controllers/send.js index d91abae99..8a38e65a5 100644 --- a/src/js/controllers/send.js +++ b/src/js/controllers/send.js @@ -430,90 +430,4 @@ angular.module('copayApp.controllers').controller('sendController', return value; } }; - - this.openAddressBook = function() { - var w = $rootScope.wallet; - var modalInstance = $modal.open({ - templateUrl: 'views/modals/address-book.html', - windowClass: 'full', - controller: function($scope, $modalInstance) { - - $scope.showForm = null; - $scope.addressBook = w.addressBook; - - $scope.hasEntry = function() { - return _.keys($scope.addressBook).length > 0 ? true : false; - }; - - $scope.toggleAddressBookEntry = function(key) { - w.toggleAddressBookEntry(key); - }; - - $scope.copyToSend = function(addr) { - $modalInstance.close(addr); - }; - - $scope.cancel = function(form) { - $scope.error = $scope.success = $scope.newaddress = $scope.newlabel = null; - clearForm(form); - $scope.toggleForm(); - }; - - $scope.toggleForm = function() { - $scope.showForm = !$scope.showForm; - }; - - var clearForm = function(form) { - form.newaddress.$pristine = true; - form.newaddress.$setViewValue(''); - form.newaddress.$render(); - - form.newlabel.$pristine = true; - form.newlabel.$setViewValue(''); - form.newlabel.$render(); - form.$setPristine(); - }; - - // TODO change to modal - $scope.submitAddressBook = function(form) { - if (form.$invalid) { - return; - } - $scope.blockUx = true; - $timeout(function() { - var errorMsg; - var entry = { - "address": form.newaddress.$modelValue, - "label": form.newlabel.$modelValue - }; - try { - w.setAddressBook(entry.address, entry.label); - } catch (e) { - $log.warn(e); - errorMsg = e.message; - } - - if (errorMsg) { - $scope.error = errorMsg; - } else { - clearForm(form); - $scope.toggleForm(); - notification.success('Entry created', 'New addressbook entry created') - } - $scope.blockUx = false; - $rootScope.$digest(); - }, 100); - return; - }; - - $scope.close = function() { - $modalInstance.dismiss('cancel'); - }; - }, - }); - - modalInstance.result.then(function(addr) { - $scope.setForm(addr); - }); - }; }); diff --git a/src/js/routes.js b/src/js/routes.js index e2326fc01..53dfaeeec 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -254,6 +254,23 @@ angular } } }) + .state('preferencesLanguage', { + url: '/preferencesLanguage', + walletShouldBeComplete: true, + needProfile: true, + views: { + 'main': { + templateUrl: 'views/preferencesLanguage.html' + }, + 'topbar': { + templateUrl: 'views/includes/topbar.html', + controller: function($scope) { + $scope.titleSection = 'Language'; + $scope.goBackToState = 'preferences'; + } + } + } + }) .state('preferencesUnit', { url: '/preferencesUnit', templateUrl: 'views/preferencesUnit.html', @@ -415,22 +432,32 @@ angular needProfile: false }); }) - .run(function($rootScope, $state, $log, gettextCatalog, uriHandler, isCordova, amMoment, profileService) { + .run(function($rootScope, $state, $log, gettextCatalog, uriHandler, isCordova, amMoment, profileService, configService) { - // Auto-detect browser language - // (default: English) - var userLang, androidLang; - - if (navigator && navigator.userAgent && (androidLang = navigator.userAgent.match(/android.*\W(\w\w)-(\w\w)\W/i))) { - userLang = androidLang[1]; - } else { - // works for iOS and Android 4.x - userLang = navigator.userLanguage || navigator.language; + var userLang = configService.getSync().wallet.settings.defaultLanguage; + if (!userLang) { + // Auto-detect browser language + var androidLang; + + if (navigator && navigator.userAgent && (androidLang = navigator.userAgent.match(/android.*\W(\w\w)-(\w\w)\W/i))) { + userLang = androidLang[1]; + } else { + // works for iOS and Android 4.x + userLang = navigator.userLanguage || navigator.language; + } + userLang = userLang ? (userLang.split('-', 1)[0] || 'en') : 'en'; } - userLang = userLang ? (userLang.split('-', 1)[0] || 'en') : 'en'; - gettextCatalog.setCurrentLanguage(userLang); - amMoment.changeLocale(userLang); + configService.set({ + wallet: { + settings: { + defaultLanguage: userLang + } + } + }, function() { + gettextCatalog.setCurrentLanguage(userLang); + amMoment.changeLocale(userLang); + }); // Register URI handler, not for mobileApp if (!isCordova) { @@ -446,6 +473,7 @@ angular preferencesColor: 12, backup: 12, delete: 12, + preferencesLanguage: 12, preferencesUnit: 12, preferencesAltCurrency: 12, preferencesBwsUrl: 12, diff --git a/src/js/services/configService.js b/src/js/services/configService.js index 1efdf20fa..99554e9b3 100644 --- a/src/js/services/configService.js +++ b/src/js/services/configService.js @@ -58,8 +58,6 @@ angular.module('copayApp.services').factory('configService', function(localStora var configCache = null; - - root.getSync = function() { if (!configCache) throw new Error('configService#getSync called when cache is not initialized'); diff --git a/src/js/services/profileService.js b/src/js/services/profileService.js index 420bce8b5..385779b3e 100644 --- a/src/js/services/profileService.js +++ b/src/js/services/profileService.js @@ -136,7 +136,7 @@ angular.module('copayApp.services') }); }; - root._createNewProfile = function(pin, cb) { + root._createNewProfile = function(cb) { var walletClient = bwcService.getClient(); walletClient.createWallet('Personal Wallet', 'me', 1, 1, { @@ -260,8 +260,8 @@ angular.module('copayApp.services') - root.create = function(pin, cb) { - root._createNewProfile(pin, function(err, p) { + root.create = function(cb) { + root._createNewProfile(function(err, p) { if (err) return cb(err); root.bindProfile(p, function(err) { storageService.storeNewProfile(p, function(err) {