diff --git a/www/i18n/locale-en-GB.json b/www/i18n/locale-en-GB.json index 68b179b7cfd5e00a1eb692e458b34f159c56a5d6..dda81b99799ef025c88dfdefca7937e170e05d99 100644 --- a/www/i18n/locale-en-GB.json +++ b/www/i18n/locale-en-GB.json @@ -287,14 +287,14 @@ }, "LOGIN": { "TITLE": "<i class=\"icon ion-locked\"></i> Login", - "SALT": "Protection phrase", - "SALT_HELP": "Protection phrase", - "SHOW_SALT": "See Protection phrase", + "SALT": "Secret identifier", + "SALT_HELP": "Secret identifier", + "SHOW_SALT": "Display secret identifier?", "PASSWORD": "Password", "PASSWORD_HELP": "Password", "NO_ACCOUNT_QUESTION": "Don't have an account yet?", "CREATE_ACCOUNT": "Create an account", - "FORGOTTEN_ID": "Forgot password ?" + "FORGOTTEN_ID": "Forgot password?" }, "ACCOUNT": { "TITLE": "My Account", @@ -332,19 +332,19 @@ "MEMBER_ACCOUNT_HELP": "If you are not yet registered as an individual (one account possible per individual).", "WALLET_ACCOUNT": "Simple wallet", "WALLET_ACCOUNT_HELP": "If you represent a company, association, etc. or simply need an additional wallet. No universal dividend will be created by this account.", - "SALT_WARNING": "Choose a protection phrase.<br/>You need it for each connection to this account.<br/><br/><b>Make sure to remember this phrase</b>.<br/>If lost, there are no means to retrieve it!", - "PASSWORD_WARNING": "Choose a password.<br/>You need it for each connection to this account.<br/><br/><b>Make sure to remember this phrase</b>.<br/>If lost, there are no means to retrieve it!", + "SALT_WARNING": "Choose a secret identifier.<br/>You need it for each connection to this account.<br/><br/><b>Make sure to remember this identifier</b>.<br/>If lost, there are no means to retrieve it!", + "PASSWORD_WARNING": "Choose a password.<br/>You need it for each connection to this account.<br/><br/><b>Make sure to remember this password</b>.<br/>If lost, there are no means to retrieve it!", "PSEUDO_WARNING": "Choose a pseudonym.<br/>It may be used by other people to find you more easily.<br/><br/>.Use of <b>commas, spaces and accents</b> is not allowed.<br/><div class='hidden-xs'><br/>Example: <span class='gray'>JohnDalton, JackieChan, etc.</span>", "PSEUDO": "Pseudonym", "PSEUDO_HELP": "joe123", "SALT_CONFIRM": "Confirm", - "SALT_CONFIRM_HELP": "Confirm the protection phrase", + "SALT_CONFIRM_HELP": "Confirm the secret identifier", "PASSWORD_CONFIRM": "Confirm", "PASSWORD_CONFIRM_HELP": "Confirm the password", "SLIDE_6_TITLE": "Confirmation:", "COMPUTING_PUBKEY": "Computing...", "LAST_SLIDE_CONGRATULATION": "You completed all required fields.<br/><b>You can send the account creation request</b>.<br/><br/>For information, the public key below identifies your future account.<br/>It can be communicated to third parties to receive their payment.<br/>Once your account has been approved, you can find this key under <b>{{'ACCOUNT.TITLE'|translate}}</b>.", - "CONFIRMATION_MEMBER_ACCOUNT": "<b class=\"assertive\">Warning:</b> your protection phrase, password and pseudonym can not be changed.<br/><b>Make sure you always remember it!</b><br/><b>Are you sure</b> you want to send this account creation request?", + "CONFIRMATION_MEMBER_ACCOUNT": "<b class=\"assertive\">Warning:</b> your secret identifier, password and pseudonym can not be changed.<br/><b>Make sure you always remember it!</b><br/><b>Are you sure</b> you want to send this account creation request?", "CONFIRMATION_WALLET_ACCOUNT": "<b class=\"assertive\">Warning:</b> your password and pseudonym can not be changed.<br/><b>Make sure you always remember it!</b><br/><b>Are you sure</b> you want to send this account creation request?", "MSG_UID_ALREADY_USED": "This pseudonym is already used by an existing member.<br/>Please choose another one.", "MSG_PUBKEY_ALREADY_USED": "Public key already used by an existing member.<br/>Please choose other connection parameters." @@ -420,7 +420,7 @@ "FIELD_NOT_NUMBER": "Value is not a number", "FIELD_NOT_INT": "Value is not an integer", "PASSWORD_NOT_CONFIRMED": "Must match previous password.", - "SALT_NOT_CONFIRMED": "Must match previous phrase.", + "SALT_NOT_CONFIRMED": "Must match previous identifier.", "SEND_IDENTITY_FAILED": "Error while trying to register.", "SEND_CERTIFICATION_FAILED": "Could not certify identity.", "NEED_MEMBER_ACCOUNT_TO_CERTIFY": "You could not send certification, because your account is <b>not a member account</b>.", @@ -460,6 +460,7 @@ "IDENTITY_INVALID_BLOCK_HASH": "This membership application is no longer valid (because it references a block that network peers are cancelled): the person must renew its application for membership <b>before</b> being certified.", "IDENTITY_EXPIRED": "This identity has expired: this person must re-apply <b>before</b> being certified.", "IDENTITY_SANDBOX_FULL": "Could not register, because peer's sandbox is full.<br/><br/>Please retry later or choose another Duniter peer (in <b>Settings</b>).", + "IDENTITY_NOT_FOUND": "Identity not found", "WOT_PENDING_INVALID_BLOCK_HASH": "Membership not valid.", "WALLET_INVALID_BLOCK_HASH": "Your membership application is no longer valid (because it references a block that network peers are cancelled).<br/>You must <a ng-click=\"doQuickFix('renew')\">renew your application for membership</a> to fix this issue.", "WALLET_IDENTITY_EXPIRED": "The publication of your identity <b>has expired</b>.<br/>You must <a ng-click=\"doQuickFix('fixIdentity')\">re-issue your identity</a> to resolve this issue.", @@ -471,11 +472,10 @@ "LOAD_PENDING_FAILED": "Unable to load pending registrations.", "ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION": "You must <b>be a member</b> in order to perform this action.", "ONLY_SELF_CAN_EXECUTE_THIS_ACTION": "You must have <b>published your identity</b> in order to perform this action.", - "REVOCATION_FAILED": "Error while trying to revoke the identity.", "GET_BLOCK_FAILED": "Error xhole getting block", "INVALID_BLOCK_HASH": "Block not found (incorrect hash)", "REVOCATION_FAILED": "Error while trying to revoke the identity.", - "SALT_OR_PASSWORD_NOT_CONFIRMED": "Wrong phrase or password ", + "SALT_OR_PASSWORD_NOT_CONFIRMED": "Wrong secret identifier or password ", "RECOVER_ID_FAILED": "Could not recover password", "LOAD_FILE_FAILED" : "Unable to load file", "ONLY_TEXT_FILE": "You have to select a text file" @@ -515,8 +515,8 @@ "TITLE": "Online help", "JOIN": { "SECTION": "Join", - "SALT": "The protection phrase is very important. It is used to hash you password, which in turn is used to calculate your <span class=\"text-italic\">public account key</span> (its number) and the private key to access it.<br/><b>Please remeber this phrase well</b>, because there is no way to recover it when lost.<br/>Furthermore, it cannot be changed without having to create a new account.<br/><br/>A good protection phrase must be sufficiently long (8 characters at the very least) and as original as possible.", - "PASSWORD": "The password is very important. Together with the protection phrase, it is use to calculate your account number (pblic key) and the private key to access it.<br/><b>Please remember it well</b>, because there is no way to recover it when lost.<br/>Furthermore, it cannot be changed without having to create a new account.<br/><br/>A good password is made (ideally) of at least 8 characters, with at least one capital and one number.", + "SALT": "The secret identifier is very important. It is used to hash you password, which in turn is used to calculate your <span class=\"text-italic\">public account key</span> (its number) and the private key to access it.<br/><b>Please remeber this identifier well</b>, because there is no way to recover it when lost.<br/>Furthermore, it cannot be changed without having to create a new account.<br/><br/>A good secret identifier must be sufficiently long (8 characters at the very least) and as original as possible.", + "PASSWORD": "The password is very important. Together with the secret identifier, it is use to calculate your account number (pblic key) and the private key to access it.<br/><b>Please remember it well</b>, because there is no way to recover it when lost.<br/>Furthermore, it cannot be changed without having to create a new account.<br/><br/>A good password is made (ideally) of at least 8 characters, with at least one capital and one number.", "PSEUDO": "A pseudonym is used only when joining as <span class=\"text-italic\">member</span>. It is always associated with a wallet (by its <span class=\"text-italic\">public key</span>).<br/>It is published on the network so that other users may identify it, certify or send money to the account.<br/>A pseudonym must be unique among all members (current and past)." }, "GLOSSARY": { diff --git a/www/i18n/locale-en.json b/www/i18n/locale-en.json index 008408cbc22c6a10213161d74571c2d60bf9ccba..72d17d615ecacf6476fe8dd665c90fc51fcc04fe 100644 --- a/www/i18n/locale-en.json +++ b/www/i18n/locale-en.json @@ -287,14 +287,14 @@ }, "LOGIN": { "TITLE": "<i class=\"icon ion-locked\"></i> Login", - "SALT": "Protection phrase", - "SALT_HELP": "Protection phrase", - "SHOW_SALT": "See Protection phrase", + "SALT": "Secret identifier", + "SALT_HELP": "Secret identifier", + "SHOW_SALT": "Display secret identifier?", "PASSWORD": "Password", "PASSWORD_HELP": "Password", "NO_ACCOUNT_QUESTION": "Don't have an account yet?", "CREATE_ACCOUNT": "Create an account", - "FORGOTTEN_ID": "Forgot password ?" + "FORGOTTEN_ID": "Forgot password?" }, "ACCOUNT": { "TITLE": "My Account", @@ -332,19 +332,19 @@ "MEMBER_ACCOUNT_HELP": "If you are not yet registered as an individual (one account possible per individual).", "WALLET_ACCOUNT": "Simple wallet", "WALLET_ACCOUNT_HELP": "If you represent a company, association, etc. or simply need an additional wallet. No universal dividend will be created by this account.", - "SALT_WARNING": "Choose a protection phrase.<br/>You need it for each connection to this account.<br/><br/><b>Make sure to remember this phrase</b>.<br/>If lost, there are no means to retrieve it!", - "PASSWORD_WARNING": "Choose a password.<br/>You need it for each connection to this account.<br/><br/><b>Make sure to remember this phrase</b>.<br/>If lost, there are no means to retrieve it!", + "SALT_WARNING": "Choose a secret identifier.<br/>You need it for each connection to this account.<br/><br/><b>Make sure to remember this identifier</b>.<br/>If lost, there are no means to retrieve it!", + "PASSWORD_WARNING": "Choose a password.<br/>You need it for each connection to this account.<br/><br/><b>Make sure to remember this password</b>.<br/>If lost, there are no means to retrieve it!", "PSEUDO_WARNING": "Choose a pseudonym.<br/>It may be used by other people to find you more easily.<br/><br/>.Use of <b>commas, spaces and accents</b> is not allowed.<br/><div class='hidden-xs'><br/>Example: <span class='gray'>JohnDalton, JackieChan, etc.</span>", "PSEUDO": "Pseudonym", "PSEUDO_HELP": "joe123", "SALT_CONFIRM": "Confirm", - "SALT_CONFIRM_HELP": "Confirm the protection phrase", + "SALT_CONFIRM_HELP": "Confirm the secret identifier", "PASSWORD_CONFIRM": "Confirm", "PASSWORD_CONFIRM_HELP": "Confirm the password", "SLIDE_6_TITLE": "Confirmation:", "COMPUTING_PUBKEY": "Computing...", "LAST_SLIDE_CONGRATULATION": "You completed all required fields.<br/><b>You can send the account creation request</b>.<br/><br/>For information, the public key below identifies your future account.<br/>It can be communicated to third parties to receive their payment.<br/>Once your account has been approved, you can find this key under <b>{{'ACCOUNT.TITLE'|translate}}</b>.", - "CONFIRMATION_MEMBER_ACCOUNT": "<b class=\"assertive\">Warning:</b> your protection phrase, password and pseudonym can not be changed.<br/><b>Make sure you always remember it!</b><br/><b>Are you sure</b> you want to send this account creation request?", + "CONFIRMATION_MEMBER_ACCOUNT": "<b class=\"assertive\">Warning:</b> your secret identifier, password and pseudonym can not be changed.<br/><b>Make sure you always remember it!</b><br/><b>Are you sure</b> you want to send this account creation request?", "CONFIRMATION_WALLET_ACCOUNT": "<b class=\"assertive\">Warning:</b> your password and pseudonym can not be changed.<br/><b>Make sure you always remember it!</b><br/><b>Are you sure</b> you want to send this account creation request?", "MSG_UID_ALREADY_USED": "This pseudonym is already used by an existing member.<br/>Please choose another one.", "MSG_PUBKEY_ALREADY_USED": "Public key already used by an existing member.<br/>Please choose other connection parameters." @@ -420,7 +420,7 @@ "FIELD_NOT_NUMBER": "Value is not a number", "FIELD_NOT_INT": "Value is not an integer", "PASSWORD_NOT_CONFIRMED": "Must match previous password.", - "SALT_NOT_CONFIRMED": "Must match previous phrase.", + "SALT_NOT_CONFIRMED": "Must match previous identifier.", "SEND_IDENTITY_FAILED": "Error while trying to register.", "SEND_CERTIFICATION_FAILED": "Could not certify identity.", "NEED_MEMBER_ACCOUNT_TO_CERTIFY": "You could not send certification, because your account is <b>not a member account</b>.", @@ -460,6 +460,7 @@ "IDENTITY_INVALID_BLOCK_HASH": "This membership application is no longer valid (because it references a block that network peers are cancelled): the person must renew its application for membership <b>before</b> being certified.", "IDENTITY_EXPIRED": "This identity has expired: this person must re-apply <b>before</b> being certified.", "IDENTITY_SANDBOX_FULL": "Could not register, because peer's sandbox is full.<br/><br/>Please retry later or choose another Duniter peer (in <b>Settings</b>).", + "IDENTITY_NOT_FOUND": "Identity not found", "WOT_PENDING_INVALID_BLOCK_HASH": "Membership not valid.", "WALLET_INVALID_BLOCK_HASH": "Your membership application is no longer valid (because it references a block that network peers are cancelled).<br/>You must <a ng-click=\"doQuickFix('renew')\">renew your application for membership</a> to fix this issue.", "WALLET_IDENTITY_EXPIRED": "The publication of your identity <b>has expired</b>.<br/>You must <a ng-click=\"doQuickFix('fixIdentity')\">re-issue your identity</a> to resolve this issue.", @@ -471,11 +472,10 @@ "LOAD_PENDING_FAILED": "Unable to load pending registrations.", "ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION": "You must <b>be a member</b> in order to perform this action.", "ONLY_SELF_CAN_EXECUTE_THIS_ACTION": "You must have <b>published your identity</b> in order to perform this action.", - "REVOCATION_FAILED": "Error while trying to revoke the identity.", "GET_BLOCK_FAILED": "Error xhole getting block", "INVALID_BLOCK_HASH": "Block not found (incorrect hash)", "REVOCATION_FAILED": "Error while trying to revoke the identity.", - "SALT_OR_PASSWORD_NOT_CONFIRMED": "Wrong phrase or password ", + "SALT_OR_PASSWORD_NOT_CONFIRMED": "Wrong secret identifier or password ", "RECOVER_ID_FAILED": "Could not recover password", "LOAD_FILE_FAILED" : "Unable to load file", "ONLY_TEXT_FILE": "You have to select a text file" @@ -515,8 +515,8 @@ "TITLE": "Online help", "JOIN": { "SECTION": "Join", - "SALT": "The protection phrase is very important. It is used to hash you password, which in turn is used to calculate your <span class=\"text-italic\">public account key</span> (its number) and the private key to access it.<br/><b>Please remeber this phrase well</b>, because there is no way to recover it when lost.<br/>Furthermore, it cannot be changed without having to create a new account.<br/><br/>A good protection phrase must be sufficiently long (8 characters at the very least) and as original as possible.", - "PASSWORD": "The password is very important. Together with the protection phrase, it is use to calculate your account number (pblic key) and the private key to access it.<br/><b>Please remember it well</b>, because there is no way to recover it when lost.<br/>Furthermore, it cannot be changed without having to create a new account.<br/><br/>A good password is made (ideally) of at least 8 characters, with at least one capital and one number.", + "SALT": "The secret identifier is very important. It is used to hash you password, which in turn is used to calculate your <span class=\"text-italic\">public account key</span> (its number) and the private key to access it.<br/><b>Please remeber this identifier well</b>, because there is no way to recover it when lost.<br/>Furthermore, it cannot be changed without having to create a new account.<br/><br/>A good secret identifier must be sufficiently long (8 characters at the very least) and as original as possible.", + "PASSWORD": "The password is very important. Together with the secret identifier, it is use to calculate your account number (pblic key) and the private key to access it.<br/><b>Please remember it well</b>, because there is no way to recover it when lost.<br/>Furthermore, it cannot be changed without having to create a new account.<br/><br/>A good password is made (ideally) of at least 8 characters, with at least one capital and one number.", "PSEUDO": "A pseudonym is used only when joining as <span class=\"text-italic\">member</span>. It is always associated with a wallet (by its <span class=\"text-italic\">public key</span>).<br/>It is published on the network so that other users may identify it, certify or send money to the account.<br/>A pseudonym must be unique among all members (current and past)." }, "GLOSSARY": { diff --git a/www/i18n/locale-fr-FR.json b/www/i18n/locale-fr-FR.json index 02f5109f653c472d788e20120ae2ef09137b2f2c..6985a1d58635e512dd726728e37d0c8f6dd655ac 100644 --- a/www/i18n/locale-fr-FR.json +++ b/www/i18n/locale-fr-FR.json @@ -287,9 +287,9 @@ }, "LOGIN": { "TITLE": "<i class=\"icon ion-locked\"></i> Connexion", - "SALT": "Phrase de protection", - "SALT_HELP": "Phrase de protection", - "SHOW_SALT": "Voir la phrase de protection", + "SALT": "Identifiant secret", + "SALT_HELP": "Identifiant secret", + "SHOW_SALT": "Afficher l'identifiant secret ?", "PASSWORD": "Mot de passe", "PASSWORD_HELP": "Mot de passe", "NO_ACCOUNT_QUESTION": "Vous n'avez pas encore de compte ?", @@ -332,20 +332,20 @@ "MEMBER_ACCOUNT_HELP": "Si vous n'etes pas encore inscrit en tant qu'individu (Un seul compte possible par individu).", "WALLET_ACCOUNT": "Simple portefeuille", "WALLET_ACCOUNT_HELP": "Pour tous les autres cas, par exemple si vous avez besoin d'un compte supplémentaire.<br/>Aucun dividende universel ne sera créé par ce compte.", - "SALT_WARNING": "Choisissez votre phrase de protection.<br/>Elle vous sera demandée à chaque connexion sur ce compte.<br/><br/><b>Retenez bien cette phrase</b>.<br/>En cas de perte, aucun moyen n'est actuellement prévu pour la retrouver : plus personne ne pourra accéder à votre compte !", - "PASSWORD_WARNING": "Choisissez un mot de passe.<br/>Il vous sera demandé à chaque connexion sur ce compte.<br/><br/><b>Retenez bien ce mot de passe</b>.<br/>En cas de perte, aucun moyen n'est actuellement prévu pour la retrouver : plus personne ne pourra accéder à votre compte !", - "PSEUDO_WARNING": "Choisissez un pseudonyme.<br/>Il sert aux autres membres, pour vous retrouver plus facilement.<br/><br/>Il ne doit contenir <b>ni espace, ni de caractère accentué</b>.<div class='hidden-xs'><br/>Exemple : <span class='gray'>SophieDupond, MarcelChemin, etc.</span>", + "SALT_WARNING": "Choisissez votre identifiant secret.<br/>Il vous sera demandé à chaque connexion sur ce compte.<br/><br/><b>Retenez le bien</b>.<br/>En cas de perte, plus personne ne pourra accéder à votre compte !", + "PASSWORD_WARNING": "Choisissez un mot de passe.<br/>Il vous sera demandé à chaque connexion sur ce compte.<br/><br/><b>Retenez bien ce mot de passe</b>.<br/>En cas de perte, plus personne ne pourra accéder à votre compte !", + "PSEUDO_WARNING": "Choisissez un pseudonyme.<br/>Il sert aux autres membres, pour vous identifier plus facilement.<br/><br/>Il ne doit contenir <b>ni espace, ni de caractère accentué</b>.<div class='hidden-xs'><br/>Exemple : <span class='gray'>SophieDupond, MarcelChemin, etc.</span>", "PSEUDO": "Pseudonyme", "PSEUDO_HELP": "Pseudonyme", "SALT_CONFIRM": "Confirmation", - "SALT_CONFIRM_HELP": "Confirmation de la phrase de protection", + "SALT_CONFIRM_HELP": "Confirmation de l'identifiant secret", "PASSWORD_CONFIRM": "Confirmation", "PASSWORD_CONFIRM_HELP": "Confirmation du mot de passe", "SLIDE_6_TITLE": "Confirmation :", "COMPUTING_PUBKEY": "Calcul en cours...", "LAST_SLIDE_CONGRATULATION": "<b>Bravo !</b> Vous avez saisi toutes les informations nécessaires.<br/><b>Vous pouvez envoyer la demande</b> de création de compte.</b><br/><br/>Pour information, la clé publique ci-dessous identifiera votre futur compte.<br/>Elle pourra être communiquée à des tiers pour recevoir leur paiement.<br/>Cependant, <b>il n'est pas utile</b> de la noter ici.", - "CONFIRMATION_MEMBER_ACCOUNT": "<b class=\"assertive\">Avertissement :</b> vos phrase de protection, mot de passe et pseudonyme ne pourront plus être modifiés.<br/><b>Assurez-vous de toujours vous en rappeller !</b><br/><br/><b>Etes-vous sûr</b> de vouloir envoyer cette demande d'inscription ?", - "CONFIRMATION_WALLET_ACCOUNT": "<b class=\"assertive\">Avertissement :</b> vos phrase de protection et mot de passe ne pourront plus être modifiés.<br/><b>Assurez-vous de toujours vous en rappeller !</b><br/><br/><b>Etes-vous sûr</b> de vouloir envoyer cette demande d'inscription ?", + "CONFIRMATION_MEMBER_ACCOUNT": "<b class=\"assertive\">Avertissement :</b> vos identifiant secret, mot de passe et pseudonyme ne pourront plus être modifiés.<br/><b>Assurez-vous de toujours vous en rappeller !</b><br/><br/><b>Etes-vous sûr</b> de vouloir envoyer cette demande d'inscription ?", + "CONFIRMATION_WALLET_ACCOUNT": "<b class=\"assertive\">Avertissement :</b> vos identifiant secret et mot de passe ne pourront plus être modifiés.<br/><b>Assurez-vous de toujours vous en rappeller !</b><br/><br/><b>Etes-vous sûr</b> de vouloir envoyer cette demande d'inscription ?", "MSG_UID_ALREADY_USED": "Pseudonyme déjà utilisé par quelqu'un d'autre.<br/>Veuillez en choisir un autre.", "MSG_PUBKEY_ALREADY_USED": "Clé publique déjà utilisée par quelqu'un d'autre.<br/>Veuillez choisir d'autres identifiants de connexion." }, @@ -420,7 +420,7 @@ "FIELD_NOT_NUMBER": "Valeur numérique attendue", "FIELD_NOT_INT": "Valeur entière attendue", "PASSWORD_NOT_CONFIRMED": "Ne correspond pas au mot de passe.", - "SALT_NOT_CONFIRMED": "Ne correspond pas à la phrase de protection.", + "SALT_NOT_CONFIRMED": "Ne correspond pas à l'identifiant secret.", "SEND_IDENTITY_FAILED": "Echec de l'inscription.", "SEND_CERTIFICATION_FAILED": "Echec de la certification.", "NEED_MEMBER_ACCOUNT_TO_CERTIFY": "Vous ne pouvez pas effectuer de certification, car votre compte n'est <b>pas membre</b>.", @@ -460,6 +460,7 @@ "IDENTITY_INVALID_BLOCK_HASH": "Cette demande d'adhésion n'est plus valide (car elle référence un bloc que les nœuds du réseau ont annulé) : cette personne doit renouveler sa demande d'adhésion <b>avant</b> d'être certifiée.", "IDENTITY_EXPIRED": "La publication de cette identité a expirée : cette personne doit effectuer une nouvelle demande d'adhésion <b>avant</b> d'être certifiée.", "IDENTITY_SANDBOX_FULL": "Le nœud Duniter utilisé par Cesium ne peut plus recevoir de nouvelles identités, car sa file d'attente est pleine.<br/><br/>Veuillez réessayer ultérieurement ou changer de nœud (via le menu <b>Paramètres</b>).", + "IDENTITY_NOT_FOUND": "Identité non trouvée", "WOT_PENDING_INVALID_BLOCK_HASH": "Adhésion non valide.", "WALLET_INVALID_BLOCK_HASH": "Votre demande d'adhésion n'est plus valide (car elle référence un bloc que les nœuds du réseau ont annulé).<br/>Vous devez <a ng-click=\"doQuickFix('fixMembership')\">envoyer une nouvelle demande</a> pour résoudre ce problème.", "WALLET_IDENTITY_EXPIRED": "La publication de <b>votre identité a expirée</b>.<br/>Vous devez <a ng-click=\"doQuickFix('fixIdentity')\">publier à nouveau votre identité</a> pour résoudre ce problème.", @@ -471,11 +472,10 @@ "LOAD_PENDING_FAILED": "Echec du chargement des inscriptions en attente.", "ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION": "Vous devez <b>être membre</b> pour pouvoir effectuer cette action.", "ONLY_SELF_CAN_EXECUTE_THIS_ACTION": "Vous devez avoir <b>publié votre identité</b> pour pouvoir effectuer cette action.", - "REVOCATION_FAILED": "Echec de la révocation.", "GET_BLOCK_FAILED": "Echec de la récupération du bloc", "INVALID_BLOCK_HASH": "Bloc non trouvé (hash différent)", "REVOCATION_FAILED": "Echec de la révocation.", - "SALT_OR_PASSWORD_NOT_CONFIRMED": "Phrase de protection ou mot de passe incorrects", + "SALT_OR_PASSWORD_NOT_CONFIRMED": "Identifiant secret ou mot de passe incorrects", "RECOVER_ID_FAILED": "Echec de la récupération des identifiants", "LOAD_FILE_FAILED" : "Echec du chargement du fichier", "ONLY_TEXT_FILE": "Vous devez selectionner un fichier texte" @@ -515,8 +515,8 @@ "TITLE": "Aide en ligne", "JOIN": { "SECTION": "Inscription", - "SALT": "La phrase de protection est très importante. Elle sert à mélanger le mot de passe, avant qu'il ne servent à calculer la <span class=\"text-italic\">clé publique</span> de votre compte (son numéro) et la clé secrète pour y accéder.<br/><b>Veuillez à bien la mémoriser</b>, car aucun moyen n'est actuellement prévu pour la retrouver en cas de perte.<br/>Par ailleurs, elle ne peut pas être modifiée sans devoir créer un nouveau compte.<br/><br/>Une bonne phrase de protection doit être suffisamment longue (au moins 8 caractères) et le plus originale possible.", - "PASSWORD": "Le mot de passe est très important. Avec la phrase de protection, il sert à à calculer le numéro (la clé publique) de votre compte, et la clé secrète pour y accéder.<br/><b>Veuillez à bien le mémoriser</b>, car aucun moyen n'est actuellement prévu pour la retrouver en cas de perte.<br/>Par ailleurs, elle ne peut pas être modifiée sans devoir créer un nouveau compte.<br/><br/>Un bon mot de passe contient (idéalement) au moins 8 caractères, dont au moins une majuscule et un chiffre.", + "SALT": "L'identifiant secret est très important. Il sert à mélanger le mot de passe, avant qu'il ne servent à calculer la <span class=\"text-italic\">clé publique</span> de votre compte (son numéro) et la clé secrète pour y accéder.<br/><b>Veuillez à bien la mémoriser</b>, car aucun moyen n'est actuellement prévu pour la retrouver en cas de perte.<br/>Par ailleurs, il ne peut pas être modifié sans devoir créer un nouveau compte.<br/><br/>Un bon identifiant secret doit être suffisamment long (au moins 8 caractères) et le plus original possible.", + "PASSWORD": "Le mot de passe est très important. Avec l'identifiant secret, il sert à à calculer le numéro (la clé publique) de votre compte, et la clé secrète pour y accéder.<br/><b>Veuillez à bien le mémoriser</b>, car aucun moyen n'est de le retrouver en cas de perte (sauf à générer un fichier de sauvegarde).<br/>Par ailleurs, il ne peut pas être modifié sans devoir créer un nouveau compte.<br/><br/>Un bon mot de passe contient (idéalement) au moins 8 caractères, dont au moins une majuscule et un chiffre.", "PSEUDO": "Le pseudonyme utilisé uniquement dans le cas d'inscription comme <span class=\"text-italic\">membre</span>. Il est toujours associé à un portefeuille (via sa <span class=\"text-italic\">clé publique</span>).<br/>Il est publié sur le réseau, afin que les autres utilisateurs puisse l'identifier, le certifier ou envoyer de la monnaie sur le compte.<br/>Un pseudonyme doit être unique au sein des membres (<u>actuels</u> et anciens)." }, "GLOSSARY": { diff --git a/www/js/controllers/app-controllers.js b/www/js/controllers/app-controllers.js index da204d51e2d50d68372bd8f44649cdf5ee7ae322..d30b3a6783d445d4595df321426b49afe0822c6b 100644 --- a/www/js/controllers/app-controllers.js +++ b/www/js/controllers/app-controllers.js @@ -377,8 +377,9 @@ function AppController($scope, $rootScope, $state, $ionicSideMenuDelegate, $q, $ }) .then(function(result){ if (result){ - UIUtils.alert.info('INFO.TRANSFER_SENT'); - $state.go('app.view_wallet'); + return $timeout(function(){ + return UIUtils.toast.show('INFO.TRANSFER_SENT'); + }, 10); } }); }; diff --git a/www/js/controllers/wallet-controllers.js b/www/js/controllers/wallet-controllers.js index f25a3a96bccc2c6fa635b6aa038a039212bfa7ba..c936943d4248098291caaf071e0486e358ecad29 100644 --- a/www/js/controllers/wallet-controllers.js +++ b/www/js/controllers/wallet-controllers.js @@ -15,7 +15,6 @@ angular.module('cesium.wallet.controllers', ['cesium.services', 'cesium.currency } }) - .state('app.view_wallet_tx', { url: "/history?refresh", views: { @@ -78,10 +77,13 @@ function WalletController($scope, $rootScope, $q, $ionicPopup, $timeout, $state, $scope.updateView = function() { // Set Motion $timeout(function() { - UIUtils.motion.fadeSlideInRight({selector: '#wallet .animate-fade-slide-in-right .item'}); + UIUtils.motion.fadeSlideInRight({ + selector: '#wallet .animate-fade-slide-in-right .item', + startVelocity: 3000 + }); // Set Ink UIUtils.ink({selector: '#wallet .animate-fade-slide-in-right .item'}); - }, 10); + }); }; $scope.setRegisterForm = function(registerForm) { diff --git a/www/js/controllers/wot-controllers.js b/www/js/controllers/wot-controllers.js index f6f0c3f33e8270f31a2e260948043978e73c91a4..92291501641a983957df8225c5d95e68aeae0133 100644 --- a/www/js/controllers/wot-controllers.js +++ b/www/js/controllers/wot-controllers.js @@ -24,6 +24,16 @@ angular.module('cesium.wot.controllers', ['cesium.services']) } }) + .state('app.wot_identity_uid', { + url: "/lookup/:uid", + views: { + 'menuContent': { + templateUrl: "templates/wot/view_identity.html", + controller: 'WotIdentityViewCtrl' + } + } + }) + .state('app.wot_cert', { url: "/wot/:pubkey/:uid/:type", views: { @@ -462,6 +472,7 @@ function WotIdentityAbstractController($scope, $rootScope, $state, $timeout, $tr $scope.load = function(pubkey, withCache, uid) { return csWot.load(pubkey, withCache, uid) .then(function(identity){ + if (!identity) return UIUtils.onError('ERROR.IDENTITY_NOT_FOUND')().then($scope.showHome); $scope.formData = identity; $scope.canCertify = $scope.formData.hasSelf && (!csWallet.isLogin() || (!csWallet.isUserPubkey(pubkey))); $scope.canSelectAndCertify = $scope.formData.hasSelf && csWallet.isUserPubkey(pubkey); @@ -726,6 +737,17 @@ function WotIdentityViewController($scope, $controller, $timeout, UIUtils, csWal } } + else if (state.stateParams && + state.stateParams.uid && + state.stateParams.uid.trim().length > 0) { + if ($scope.loading) { // load once + return $scope.load(null, true /*withCache*/, state.stateParams.uid) + .then(function() { + $scope.doMotion(); + }); + } + } + // Load from wallet pubkey else if (csWallet.isLogin()){ @@ -746,9 +768,9 @@ function WotIdentityViewController($scope, $controller, $timeout, UIUtils, csWal $scope.doMotion = function() { // Effects $timeout(function () { - UIUtils.motion.fadeSlideInRight(); + UIUtils.motion.fadeSlideInRight({startVelocity: 3000}); UIUtils.ink(); - }, 10); + }); $scope.showFab('fab-transfer'); }; @@ -849,7 +871,7 @@ function WotCertificationsViewController($scope, $rootScope, $controller, $timeo if (!skipItems) { // List items $timeout(function () { - UIUtils.motion.fadeSlideInRight({selector: '.list.certifications .item'}); + UIUtils.motion.fadeSlideInRight({selector: '.list.certifications .item', startVelocity: 3000}); UIUtils.ink({selector: '.list.certifications .ink'}); }, timeout || 10); } @@ -875,7 +897,7 @@ function WotCertificationsViewController($scope, $rootScope, $controller, $timeo if (!skipItems) { // List items $timeout(function() { - UIUtils.motion.fadeSlideInRight({selector: '.list.given-certifications .item'}); + UIUtils.motion.fadeSlideInRight({selector: '.list.given-certifications .item', startVelocity: 3000}); UIUtils.ink({selector: '.list.given-certifications .ink'}); }, timeout || 10); } diff --git a/www/js/entities/block.js b/www/js/entities/block.js index b5589ebb3cce03ebee1197850a47d6ce4a831b05..0684a2bf642301323e7376b092be7ba7898c2b76 100644 --- a/www/js/entities/block.js +++ b/www/js/entities/block.js @@ -1,17 +1,25 @@ /** * Created by blavenie on 01/02/17. */ -function Block(json) { +function Block(json, attributes) { "use strict"; var that = this; - /*Object.keys(json).forEach(function (key) { - that[key] = json[key]; - });*/ - ["currency", "issuer", "medianTime", "number", "version", "powMin", "dividend", "membersCount", "hash", "identities", "joiners", "actives", "leavers", "revoked", "excluded", "certifications", "transactions"].forEach(function (key) { - that[key] = json[key]; - }); + // Copy default fields + if (!attributes || !attributes.length) { + ["currency", "issuer", "medianTime", "number", "version", "powMin", "dividend", "membersCount", "hash", "identities", "joiners", "actives", "leavers", "revoked", "excluded", "certifications", "transactions"] + .forEach(function (key) { + that[key] = json[key]; + }); + } + // or just given + else { + _.forEach(attributes, function (key) { + that[key] = json[key]; + }); + + } that.identitiesCount = that.identities ? that.identities.length : 0; that.joinersCount = that.joiners ? that.joiners.length : 0; diff --git a/www/js/services/bma-services.js b/www/js/services/bma-services.js index 89641cbea6fa9f72387c7e734119ea16e61d12af..02369e476df238a91adc39749649a006bc2738db 100644 --- a/www/js/services/bma-services.js +++ b/www/js/services/bma-services.js @@ -183,6 +183,13 @@ angular.module('cesium.bma.services', ['ngResource', 'cesium.http.services', 'ce }); }; + exports.wot.member.getByUid = function(uid) { + return exports.wot.member.all() + .then(function(res){ + return _.findWhere(res.results, {uid: uid}); + }); + }; + /** * Return all expected blocks * @param blockNumbers a rray of block number diff --git a/www/js/services/plugin-services.js b/www/js/services/plugin-services.js index 9d3fceefe7598e5c33e7b8fdd6c26afcdf839786..ad88ff3ba3a6d465c3aa640dc455e69ed042ad03 100644 --- a/www/js/services/plugin-services.js +++ b/www/js/services/plugin-services.js @@ -24,6 +24,14 @@ angular.module('cesium.plugin.services', []) return this; }; + this.extendStates = function(stateNames, extension) { + var that = this; + stateNames.forEach(function(stateName) { + that.extendState(stateName, extension); + }); + return this; + }; + this.$get = ['$injector', '$state', function pluginFactory($injector, $state) { var currentExtensionPointName; diff --git a/www/js/services/settings-services.js b/www/js/services/settings-services.js index fb26c0213c0a091a914fdfe2cc120a4c45b5e20e..28939903ac0ee2f10799ff57acb727c8b966eb94 100644 --- a/www/js/services/settings-services.js +++ b/www/js/services/settings-services.js @@ -211,12 +211,9 @@ angular.module('cesium.settings.services', ['ngResource', 'ngApi', 'cesium.confi service.instance = CSSettings; - service.restore() .then(function() { - Device.ready().then(function() { - service.api.data.raise.ready(); - }); + service.api.data.raise.ready(); }); return service; diff --git a/www/js/services/utils-services.js b/www/js/services/utils-services.js index fb48294fc5361a48f3b36fa612f495caf6cb1da6..b20098ff449cb04d7062bd237b723c4d041f301b 100644 --- a/www/js/services/utils-services.js +++ b/www/js/services/utils-services.js @@ -115,12 +115,10 @@ angular.module('cesium.utils.services', ['ngResource']) } function showToast(message, duration) { - if (!duration) { - duration = 2000; // 2s - } + duration = duration || 2000; // 2s return $translate([message]) .then(function(translations){ - $ionicLoading.show({ template: translations[message], noBackdrop: true, duration: duration }); + return $ionicLoading.show({ template: translations[message], noBackdrop: true, duration: duration }); }); } diff --git a/www/js/services/wot-services.js b/www/js/services/wot-services.js index b32a96b5247260b3b070ba3e318a95acf856bb3e..d41ac6866b6ad1abf5c8aa323426493f349d27da 100644 --- a/www/js/services/wot-services.js +++ b/www/js/services/wot-services.js @@ -57,14 +57,12 @@ angular.module('cesium.wot.services', ['ngResource', 'ngApi', 'cesium.bma.servic }, loadRequirements = function(pubkey, uid) { - return $q(function(resolve, reject) { - // Get requirements - BMA.wot.requirements({pubkey: pubkey}) + if (!pubkey) return $q.when({}); + // Get requirements + return BMA.wot.requirements({pubkey: pubkey}) .then(function(res){ - if (!res.identities || res.identities.length === 0) { - resolve(); - return; - } + if (!res.identities || !res.identities.length) return; + // Sort to select the best identity if (res.identities.length > 1) { // Select the best identity, by sorting using this order @@ -112,14 +110,14 @@ angular.module('cesium.wot.services', ['ngResource', 'ngApi', 'cesium.bma.servic return count; }, 0) : 0; - resolve(requirements); + return requirements; }) .catch(function(err) { // If not a member: continue if (!!err && (err.ucode == BMA.errorCodes.NO_MATCHING_MEMBER || err.ucode == BMA.errorCodes.NO_IDTY_MATCHING_PUB_OR_UID)) { - resolve({ + return { hasSelf: false, needMembership: true, canMembershipOut: false, @@ -128,17 +126,14 @@ angular.module('cesium.wot.services', ['ngResource', 'ngApi', 'cesium.bma.servic needCertifications: false, needCertificationCount: 0, willNeedCertificationCount: 0 - }); - } - else { - reject(err); + }; } + throw err; }); - }); }, loadIdentityByLookup = function(pubkey, uid) { - return BMA.wot.lookup({ search: pubkey }) + return BMA.wot.lookup({ search: pubkey||uid }) .then(function(res){ var identities = res.results.reduce(function(idties, res) { return idties.concat(res.uids.reduce(function(uids, idty) { @@ -171,6 +166,7 @@ angular.module('cesium.wot.services', ['ngResource', 'ngApi', 'cesium.bma.servic }); } var identity = identities[0]; + console.log(identity); identity.hasSelf = !!(identity.uid && identity.timestamp && identity.sig); identity.lookup = {}; @@ -508,17 +504,35 @@ angular.module('cesium.wot.services', ['ngResource', 'ngApi', 'cesium.bma.servic }); }, - loadData = function(pubkey, withCache, uid) { + loadData = function(pubkey, withCache, uid, force) { + + var data; + + if (!pubkey && uid && !force) { + return BMA.wot.member.getByUid(uid) + .then(function(member) { + if (member) return loadData(member.pubkey, withCache, member.uid); // recursive call + //throw {message: 'NOT_A_MEMBER'}; + return loadData(pubkey, withCache, uid, true/*force*/); + }); + } + // Check cached data - var data = withCache ? identityCache.get(pubkey) : null; - if (data && (!uid || data.uid == uid)) { - console.debug("[wot] Found cached identity " + pubkey.substring(0, 8)); - return $q.when(data); + if (pubkey) { + data = withCache ? identityCache.get(pubkey) : null; + if (data && (!uid || data.uid == uid)) { + console.debug("[wot] Found cached identity " + pubkey.substring(0, 8)); + return $q.when(data); + } + console.debug("[wot] Loading identity " + pubkey.substring(0, 8) + "..."); + data = {pubkey: pubkey}; + } + else { + console.debug("[wot] Loading identity from uid " + uid); + data = {}; } - console.debug("[wot] Loading identity " + pubkey.substring(0, 8) + "..."); var now = new Date().getTime(); - data = {pubkey: pubkey}; var parameters; var medianTime; @@ -566,7 +580,7 @@ angular.module('cesium.wot.services', ['ngResource', 'ngApi', 'cesium.bma.servic return $q.all([ // Get received certifications - loadCertifications(BMA.wot.certifiersOf, pubkey, data.lookup ? data.lookup.certifications[idtyFullKey] : null, parameters, medianTime, true /*certifiersOf*/) + loadCertifications(BMA.wot.certifiersOf, data.pubkey, data.lookup ? data.lookup.certifications[idtyFullKey] : null, parameters, medianTime, true /*certifiersOf*/) .then(function (res) { data.received_cert = res.valid; data.received_cert_pending = res.pending; @@ -574,7 +588,7 @@ angular.module('cesium.wot.services', ['ngResource', 'ngApi', 'cesium.bma.servic }), // Get given certifications - loadCertifications(BMA.wot.certifiedBy, pubkey, data.lookup ? data.lookup.givenCertifications : null, parameters, medianTime, false/*certifiersOf*/) + loadCertifications(BMA.wot.certifiedBy, data.pubkey, data.lookup ? data.lookup.givenCertifications : null, parameters, medianTime, false/*certifiersOf*/) .then(function (res) { data.given_cert = res.valid; data.given_cert_pending = res.pending; @@ -591,10 +605,8 @@ angular.module('cesium.wot.services', ['ngResource', 'ngApi', 'cesium.bma.servic ]); }) .then(function() { - if (data.requirements.uid) { - // Add compute some additional requirements (that required all data like certifications) - finishLoadRequirements(data); - } + // Add compute some additional requirements (that required all data like certifications) + finishLoadRequirements(data); // API extension return api.data.raisePromise.load(data) @@ -604,9 +616,10 @@ angular.module('cesium.wot.services', ['ngResource', 'ngApi', 'cesium.bma.servic }); }) .then(function() { + if (!data.pubkey) return undefined; // not found delete data.lookup; // not need anymore - identityCache.put(pubkey, data); // add to cache - console.debug('[wallet] Identity '+ pubkey.substring(0, 8) +' loaded in '+ (new Date().getTime()-now) +'ms'); + identityCache.put(data.pubkey, data); // add to cache + console.debug('[wallet] Identity '+ data.pubkey.substring(0, 8) +' loaded in '+ (new Date().getTime()-now) +'ms'); return data; }); }, diff --git a/www/plugins/es/i18n/locale-fr-FR.json b/www/plugins/es/i18n/locale-fr-FR.json index 4bbaf8c80dc2772e631800dfce05a7501c5022fd..eb17ff208925b2b0c57db0a2c7d7797bb7ed1f24 100644 --- a/www/plugins/es/i18n/locale-fr-FR.json +++ b/www/plugins/es/i18n/locale-fr-FR.json @@ -126,6 +126,43 @@ "SEARCH_BLOCKS_FAILED": "Erreur de la recherche des blocs." } }, + "GROUP": { + "GENERAL_DIVIDER": "Informations générales", + "LOCATION_DIVIDER": "Adresse", + "SOCIAL_NETWORKS_DIVIDER": "Réseaux sociaux et site web", + "TECHNICAL_DIVIDER": "Informations techniques", + "NOTIFICATIONS": { + "TITLE": "Invitations" + }, + "LOOKUP": { + "TITLE": "Groupes", + "SEARCH_HELP": "Nom de groupe, mots, lieu, etc.", + "LAST_RESULTS_LIST": "Nouveaux groupes :", + "OPEN_RESULTS_LIST": "Groupes ouverts :", + "MANAGED_RESULTS_LIST": "Groupes fermés :", + "BTN_LAST": "Nouveaux groupes", + "BTN_NEW": "J'ajoute un groupe" + }, + "TYPE": { + "TITLE": "Nouveau groupe", + "SELECT_TYPE": "Type de groupe :", + "OPEN_GROUP": "Groupe ouvert", + "OPEN_GROUP_HELP": "Un groupe ouvert est accessible par n'importe quel membre de la monnaie.", + "MANAGED_GROUP": "Groupe administré", + "MANAGED_GROUP_HELP": "un groupe administré est gérer par des administrateurs et des modérateurs, qui peuvent accepter, refuser ou exclure un membre en son sein." + }, + "EDIT": { + "TITLE": "Groupe", + "TITLE_NEW": "Nouveau groupe", + "RECORD_TITLE": "Titre", + "RECORD_TITLE_HELP": "Titre", + "RECORD_DESCRIPTION": "Description", + "RECORD_DESCRIPTION_HELP": "Description" + }, + "ERROR": { + "SEARCH_GROUPS_FAILED": "Echec de la recherche de groupes" + } + }, "MARKET": { "COMMON": { "PRICE": "Prix", @@ -194,14 +231,14 @@ "LOCATION_DIVIDER": "Adresse", "SOCIAL_NETWORKS_DIVIDER": "Réseaux sociaux et site web", "TECHNICAL_DIVIDER": "Informations techniques", - "BTN_NEW": "Je référence mon organisation", + "BTN_NEW": "Créer une page", "SEARCH": { - "TITLE": "Annuaire des professionnels", - "TITLE_SMALL_DEVICE": "Annuaire pro", + "TITLE": "Pages", + "TITLE_SMALL_DEVICE": "Pages", "SEARCH_HELP": "Quoi, Qui : restaurant, Chez Marcel, ...", "BTN_ADD": "Nouveau", "BTN_OPTIONS": "Recherche avancée", - "TYPE": "Type d'organisation", + "TYPE": "Type de page", "LOCATION": "Localisation", "LOCATION_HELP": "Ville", "LAST_RECORDS": "Derniers enregistrements :", @@ -213,11 +250,11 @@ "LOCATION": "Adresse :", "MENU_TITLE": "Options", "POPOVER_SHARE_TITLE": "{{title}}", - "REMOVE_CONFIRMATION" : "Etes-vous sur de vouloir supprimer cette fiche ?<br/><br/>Cette opération est irréversible." + "REMOVE_CONFIRMATION" : "Etes-vous sur de vouloir supprimer cette page ?<br/><br/>Cette opération est irréversible." }, "TYPE": { - "TITLE": "Nouveau référencement", - "SELECT_TYPE": "Type d'organisation :", + "TITLE": "Nouvelle page", + "SELECT_TYPE": "Type de page :", "ENUM": { "SHOP": "Commerce local", "COMPANY": "Entreprise", @@ -227,8 +264,8 @@ }, "EDIT": { "TITLE": "Edition", - "TITLE_NEW": "Nouveau référencement", - "RECORD_TYPE":"Type d'organisation", + "TITLE_NEW": "Nouvelle page", + "RECORD_TYPE":"Type de page", "RECORD_TITLE": "Nom", "RECORD_TITLE_HELP": "Nom", "RECORD_DESCRIPTION": "Description", @@ -243,14 +280,14 @@ }, "ERROR": { "LOAD_CATEGORY_FAILED": "Erreur de chargement de la liste des activités", - "LOAD_RECORD_FAILED": "Erreur lors du chargement de la fiche", + "LOAD_RECORD_FAILED": "Erreur lors du chargement de la page", "LOOKUP_RECORDS_FAILED": "Erreur lors de l'execution de la recherche.", - "REMOVE_RECORD_FAILED": "Erreur de la suppression de la fiche", + "REMOVE_RECORD_FAILED": "Erreur de la suppression de la page", "SAVE_RECORD_FAILED": "Erreur lors de la sauvegarde", - "RECORD_NOT_EXISTS": "Fiche inexistante" + "RECORD_NOT_EXISTS": "Page inexistante" }, "INFO": { - "RECORD_REMOVED" : "Fiche supprimée" + "RECORD_REMOVED" : "Page supprimée" } }, "PROFILE": { diff --git a/www/plugins/es/js/controllers/app-controllers.js b/www/plugins/es/js/controllers/app-controllers.js index 68596a7b4542c3841eb69675fefa1bedfe60dbde..8ab3c432e1830138fb3143a4844e8dc92e856a43 100644 --- a/www/plugins/es/js/controllers/app-controllers.js +++ b/www/plugins/es/js/controllers/app-controllers.js @@ -111,6 +111,15 @@ function ESMenuExtendController($scope, $state, PluginService, csSettings, UIUti }); }; + $scope.showGroupsPopover = function(event) { + return UIUtils.popover.show(event, { + templateUrl :'plugins/es/templates/group/popover_group.html', + scope: $scope, + autoremove: false // reuse popover + }); + }; + + $scope.updateView = function() { $scope.enable = csSettings.data.plugins && csSettings.data.plugins.es ? csSettings.data.plugins.es.enable : diff --git a/www/plugins/es/js/controllers/message-controllers.js b/www/plugins/es/js/controllers/message-controllers.js index c50f098377367745d70d89c213a6698d575955e7..a0c8f4f55ae375e0fbd710933794cfa960f7e801 100644 --- a/www/plugins/es/js/controllers/message-controllers.js +++ b/www/plugins/es/js/controllers/message-controllers.js @@ -1,4 +1,4 @@ -angular.module('cesium.es.message.controllers', ['cesium.es.services', 'cesium.es.message.controllers']) +angular.module('cesium.es.message.controllers', ['cesium.es.services']) .config(function($stateProvider) { 'ngInject'; @@ -535,7 +535,7 @@ function PopoverMessageController($scope, $timeout, UIUtils, $state, csWallet, e // Set Motion and Ink $timeout(function() { - UIUtils.ink({selector: '.popover-popover .item.ink'}); + UIUtils.ink({selector: '.popover-notification .item.ink'}); }, 100); }; diff --git a/www/plugins/es/js/controllers/user-controllers.js b/www/plugins/es/js/controllers/user-controllers.js index 2054cda0559cbe52e2da56fdd750e03f2eff8254..11defbf99d04d94fbcc5adb89ef5b39fc91a278e 100644 --- a/www/plugins/es/js/controllers/user-controllers.js +++ b/www/plugins/es/js/controllers/user-controllers.js @@ -165,7 +165,9 @@ function ProfileController($scope, $rootScope, $timeout, $state, $focus, $transl else { delete $scope.walletData.avatar; } - $scope.walletData.profile = formData; + + $scope.walletData.profile = angular.copy(formData); + $scope.walletData.profile.description = esHttp.util.trustAsHtml(formData.description); } }; diff --git a/www/plugins/es/js/controllers/wot-controllers.js b/www/plugins/es/js/controllers/wot-controllers.js index 668ae446e47d5f3b514356a40b6d4430776976f8..b4ba49c5ea359e5b7624c58f79724ff61b630ed7 100644 --- a/www/plugins/es/js/controllers/wot-controllers.js +++ b/www/plugins/es/js/controllers/wot-controllers.js @@ -5,7 +5,7 @@ angular.module('cesium.es.wot.controllers', ['cesium.es.services']) var enable = csConfig.plugins && csConfig.plugins.es; if (enable) { - PluginServiceProvider.extendState('app.wot_identity', { + PluginServiceProvider.extendStates(['app.wot_identity', 'app.wot_identity_uid'], { points: { 'general': { templateUrl: "plugins/es/templates/wot/view_identity_extend.html", diff --git a/www/plugins/es/js/services/http-services.js b/www/plugins/es/js/services/http-services.js index 148b281d39ca2f83f7397e521761142e500e3a2b..cd6c44052fa122dd59cb18523f968b26e13fcf8b 100644 --- a/www/plugins/es/js/services/http-services.js +++ b/www/plugins/es/js/services/http-services.js @@ -3,7 +3,7 @@ angular.module('cesium.es.http.services', ['ngResource', 'cesium.services', 'ces /** * Elastic Search Http */ -.factory('esHttp', function($q, CryptoUtils, csHttp, $rootScope, csConfig, csSettings, csWallet) { +.factory('esHttp', function($q, CryptoUtils, csHttp, $rootScope, $state, $sce, csConfig, csSettings, csWallet) { 'ngInject'; function factory() { @@ -12,7 +12,7 @@ angular.module('cesium.es.http.services', ['ngResource', 'cesium.services', 'ces that, regex = { IMAGE_SRC: exact('data:([A-Za-z//]+);base64,(.+)'), - HASH_TAG: new RegExp('#(\\w+)'), + HASH_TAG: new RegExp('#([\\wḡĞğ]+)'), USER_TAG: new RegExp('@(\\w+)') }; @@ -35,8 +35,10 @@ angular.module('cesium.es.http.services', ['ngResource', 'cesium.services', 'ces return csHttp.post(host, node, path); } - function parseTagsFromText(value) { - var matches = value && regex.HASH_TAG.exec(value); + function parseTagsFromText(value, prefix) { + prefix = prefix || '#'; + var reg = prefix === '@' ? regex.USER_TAG : regex.HASH_TAG; + var matches = value && reg.exec(value); var tags; while(matches) { var tag = matches[1]; @@ -45,11 +47,41 @@ angular.module('cesium.es.http.services', ['ngResource', 'cesium.services', 'ces tags.push(tag); } value = value.substr(matches.index + matches[1].length + 1); - matches = value && regex.HASH_TAG.exec(value); + matches = value && reg.exec(value); } return tags; } + function escape(text) { + if (!text) return text; + return text.replace(/</g, '<').replace(/>/g, '>'); + } + + function trustAsHtml(text) { + var content = text ? escape(text.trim()).replace(/\n/g,'<br>') : undefined; + if (content) { + + // Replace hashtags in description + var hashTags = parseTagsFromText(content); + _.forEach(hashTags, function(tag){ + var href = $state.href('app.wot_lookup', {hash: tag}); + var link = '<a href=\"{0}">{1}</a>'.format(href, '#'+tag); + content = content.replace('#'+tag, link); + }); + + // Replace user tags in description + var userTags = parseTagsFromText(content, '@'); + _.forEach(userTags, function(tag){ + var href = $state.href('app.wot_identity_uid', {uid: tag}); + var link = '<a href=\"{0}">{1}</a>'.format(href, '@'+tag); + content = content.replace('@'+tag, link); + }); + + $sce.trustAsHtml(content); + } + return content; + } + function fillRecordTags(record, fieldNames) { fieldNames = fieldNames || ['title', 'description']; @@ -281,10 +313,14 @@ angular.module('cesium.es.http.services', ['ngResource', 'cesium.services', 'ces empty: emptyHit }, util: { - parseTags: parseTagsFromText + parseTags: parseTagsFromText, + trustAsHtml: trustAsHtml }, date: { now: getTimeNow + }, + constants: { + regexp: regex } }; return that; diff --git a/www/plugins/es/js/services/notification-services.js b/www/plugins/es/js/services/notification-services.js index 4b67cfcd1f5e25eb4500407cf152d0c0acfd17d9..146ba7c823e2d44e4985581b994b8ad1b0833945 100644 --- a/www/plugins/es/js/services/notification-services.js +++ b/www/plugins/es/js/services/notification-services.js @@ -18,7 +18,8 @@ angular.module('cesium.es.notification.services', ['cesium.services', 'cesium.es var listeners, defaultLoadSize = 20, constants = { - MESSAGE_CODES: ['MESSAGE_RECEIVED'] + MESSAGE_CODES: ['MESSAGE_RECEIVED'], + GROUP_CODES: ['GROUP_INVITATION'] }, fields = { commons: ["type", "code", "params", "reference", "recipient", "time", "hash", "read_signature"] @@ -30,7 +31,7 @@ angular.module('cesium.es.notification.services', ['cesium.services', 'cesium.es function createFilterQuery(pubkey, options) { options = options || {}; options.codes = options.codes || {}; - options.codes.excludes = options.codes.excludes || constants.MESSAGE_CODES; + options.codes.excludes = options.codes.excludes || constants.MESSAGE_CODES.concat(constants.GROUP_CODES); var query = { bool: { must: [ @@ -43,28 +44,29 @@ angular.module('cesium.es.notification.services', ['cesium.services', 'cesium.es if (options.codes && options.codes.includes) { query.bool.must.push({terms: { code: options.codes.includes}}); } - - // Excludes codes - var excludesCodes = []; - if (!csSettings.getByPath('plugins.es.notifications.txSent', false)) { - excludesCodes.push('TX_SENT'); - } - if (!csSettings.getByPath('plugins.es.notifications.txReceived', true)) { - excludesCodes.push('TX_RECEIVED'); - } - if (!csSettings.getByPath('plugins.es.notifications.certSent', false)) { - excludesCodes.push('CERT_SENT'); - } - if (!csSettings.getByPath('plugins.es.notifications.certReceived', true)) { - excludesCodes.push('CERT_RECEIVED'); - } - if (options.codes.excludes) { - _.forEach(options.codes.excludes, function(code) { - excludesCodes.push(code); - }); - } - if (excludesCodes.length) { - query.bool.must_not = {terms: { code: excludesCodes}}; + else { + // Excludes codes + var excludesCodes = []; + if (!csSettings.getByPath('plugins.es.notifications.txSent', false)) { + excludesCodes.push('TX_SENT'); + } + if (!csSettings.getByPath('plugins.es.notifications.txReceived', true)) { + excludesCodes.push('TX_RECEIVED'); + } + if (!csSettings.getByPath('plugins.es.notifications.certSent', false)) { + excludesCodes.push('CERT_SENT'); + } + if (!csSettings.getByPath('plugins.es.notifications.certReceived', true)) { + excludesCodes.push('CERT_RECEIVED'); + } + if (options.codes.excludes) { + _.forEach(options.codes.excludes, function(code) { + excludesCodes.push(code); + }); + } + if (excludesCodes.length) { + query.bool.must_not = {terms: { code: excludesCodes}}; + } } // Filter on time @@ -123,15 +125,20 @@ angular.module('cesium.es.notification.services', ['cesium.services', 'cesium.es esUser.profile.fillAvatars([notification]) .then(function() { var isMessage = _.contains(constants.MESSAGE_CODES, event.code); + var isGroup = _.contains(constants.GROUP_CODES, event.code); notification.isMessage = isMessage; - if (!isMessage) { - data.notifications = data.notifications || {}; - data.notifications.unreadCount++; - } - else { + if (isMessage) { data.messages = data.messages || {}; data.messages.unreadCount++; } + else if (isGroup) { + data.groups = data.groups || {}; + data.groups.unreadCount++; + } + else { + data.notifications = data.notifications || {}; + data.notifications.unreadCount++; + } api.data.raise.new(notification); }); }); @@ -235,6 +242,7 @@ angular.module('cesium.es.notification.services', ['cesium.services', 'cesium.es return { load: loadNotifications, + unreadCount: loadUnreadNotificationsCount, api: api, websocket: { event: function() { @@ -243,7 +251,8 @@ angular.module('cesium.es.notification.services', ['cesium.services', 'cesium.es change: function() { return esHttp.ws((wsPort == 443 ? 'wss' : 'ws') +'://'+esHttp.getServer(host, wsPort)+'/ws/_changes'); } - } + }, + constants: constants }; } diff --git a/www/plugins/es/js/services/user-services.js b/www/plugins/es/js/services/user-services.js index 2fbd34e0518ba474b70ffebcc365c3cc91727280..8721bc94362f00b08bc26eb8d241c0e616de01a7 100644 --- a/www/plugins/es/js/services/user-services.js +++ b/www/plugins/es/js/services/user-services.js @@ -11,7 +11,7 @@ angular.module('cesium.es.user.services', ['cesium.services', 'cesium.es.http.se }) .factory('esUser', function($rootScope, $q, $timeout, esHttp, $state, $sce, $sanitize, - csConfig, csSettings, esHttp, CryptoUtils, Device, UIUtils, csWallet, csWot, BMA) { + csConfig, csSettings, CryptoUtils, Device, UIUtils, csWallet, csWot, BMA) { 'ngInject'; function factory(id, host, port, wsPort) { @@ -22,8 +22,7 @@ angular.module('cesium.es.user.services', ['cesium.services', 'cesium.es.http.se ES_USER_API_ENDPOINT: "ES_USER_API( ([a-z_][a-z0-9-_.]*))?( ([0-9.]+))?( ([0-9a-f:]+))?( ([0-9]+))" }, REGEX = { - ES_USER_API_ENDPOINT: exact(CONSTANTS.ES_USER_API_ENDPOINT), - HASH_TAG: new RegExp('#(\\w+)') + ES_USER_API_ENDPOINT: exact(CONSTANTS.ES_USER_API_ENDPOINT) }, SETTINGS_SAVE_SPEC = { includes: ['locale', 'showUDHistory', 'useRelative', 'useLocalStorage', 'expertMode'], @@ -135,17 +134,7 @@ angular.module('cesium.es.user.services', ['cesium.services', 'cesium.es.http.se profile.avatar = esHttp.image.fromHit(host, port, res, 'avatar'); delete profile.source.avatar; // not need anymore - // Replace tags in description - if (profile.source.description) { - var description = $sanitize(profile.source.description.trim().replace(/\n/g,'<br>')); - _.forEach(esHttp.util.parseTags(description), function(tag){ - var href = $state.href('app.wot_lookup', {hash: tag}); - var link = '<a href=\"{0}">{1}</a>'.format(href, '#'+tag); - description = description.replace('#'+tag, link); - }); - $sce.trustAsHtml(description); - profile.source.description = description; - } + profile.source.description = esHttp.util.trustAsHtml(profile.source.description); } return profile; }) @@ -310,6 +299,7 @@ angular.module('cesium.es.user.services', ['cesium.services', 'cesium.es.http.se pubkeyAtributeName = pubkeyAtributeName || 'pubkey'; text = text ? text.toLowerCase().trim() : text; var dataByPubkey; + var tags = text ? esHttp.util.parseTags(text) : undefined; var request = { query: {}, highlight: {fields : {title : {}, tags: {}}}, @@ -358,8 +348,6 @@ angular.module('cesium.es.user.services', ['cesium.services', 'cesium.es.http.se ]}} }; - // Add tags - var tags = esHttp.util.parseTags(text); if (tags) { request.query.constant_score.filter.bool.should.push({terms: {tags: tags}}); } @@ -375,8 +363,6 @@ angular.module('cesium.es.user.services', ['cesium.services', 'cesium.es.http.se {prefix: {title: text}} ] }; - // Set tags filter - var tags = esHttp.util.parseTags(text); if (tags) { request.query.bool.should.push({terms: {tags: tags}}); } @@ -422,7 +408,9 @@ angular.module('cesium.es.user.services', ['cesium.services', 'cesium.es.http.se data.name = hit.highlight.title[0]; } if (hit.highlight.tags) { - data.tags = hit.highlight.tags; + data.tags = hit.highlight.tags.reduce(function(res, tag){ + return res.concat(tag.replace('<em>', '').replace('</em>', '')); + },[]); } } // avatar diff --git a/www/plugins/es/templates/message/list.html b/www/plugins/es/templates/message/list.html index d0012c95c5f83bb02056bb857be0e441329c8cc9..1805c4376a556744a42ddbe7b5d2135b05acb28a 100644 --- a/www/plugins/es/templates/message/list.html +++ b/www/plugins/es/templates/message/list.html @@ -17,7 +17,7 @@ <ion-content class="padding no-padding-xs"> <!-- Buttons bar--> - <ion-list> + <ion-list > <div class="item large-button-bar hidden-xs hidden-sm"> <button class="button button-calm icon ion-compose" @@ -53,7 +53,9 @@ </div> </ion-list> - <ion-list class="animate-ripple" ng-if="!loading"> + <ion-list class="animate-ripple" + can-swipe="$root.device.enable" + ng-if="!loading"> <div class="padding gray" ng-if="!messages.length"> <span ng-if="type=='inbox'" translate>MESSAGE.NO_MESSAGE_INBOX</span> diff --git a/www/templates/wot/lookup_form.html b/www/templates/wot/lookup_form.html index 822b803562dde67c7888c69f7689cc685f35dcda..e9ad273e39788a1554f3cd5f276aaf3d1451ca9e 100644 --- a/www/templates/wot/lookup_form.html +++ b/www/templates/wot/lookup_form.html @@ -75,19 +75,19 @@ <ion-item ng-repeat="identity in search.results track by identity.id" id="helptip-wot-search-result-{{$index}}" - class="item item-border-large item-avatar item-icon-right ink" ng-click="select(identity)"> + class="item item-border-large item-avatar item-icon-right ink" ng-click="::select(identity)"> - <i ng-if="!identity.avatar" class="item-image icon ion-person"></i> - <i ng-if="identity.avatar" class="item-image avatar" style="background-image: url({{::identity.avatar.src}})"></i> + <i ng-if="::!identity.avatar" class="item-image icon ion-person"></i> + <i ng-if="::identity.avatar" class="item-image avatar" style="background-image: url({{::identity.avatar.src}})"></i> <h2> - <ng-if ng-if="identity.name||identity.uid" ng-bind-html="identity.name||identity.uid"></ng-if> - <ng-if ng-if="!identity.name && !identity.uid">{{::identity.pubkey|formatPubkey}}</ng-if> + <ng-if ng-if="::identity.name||identity.uid" ng-bind-html="::identity.name||identity.uid"></ng-if> + <ng-if ng-if="::!identity.name && !identity.uid">{{::identity.pubkey|formatPubkey}}</ng-if> </h2> <h4 class="gray" ng-class="{'pull-right': !smallscreen}" - ng-if="identity.sigDate"> + ng-if="::identity.sigDate"> <i class="ion-clock"></i> {{::'WOT.LOOKUP.REGISTERED' | translate:identity}} </h4> @@ -98,7 +98,7 @@ {{::'WOT.LOOKUP.MEMBER_FROM' | translate:identity}} </h4> <h4 class="gray"> - <span class="positive" ng-if="identity.name && identity.uid"> + <span class="positive" ng-if="::identity.name && identity.uid"> <i class="ion-person"></i> {{::identity.uid}} </span> @@ -106,15 +106,17 @@ {{::identity.pubkey | formatPubkey}} <span ng-if="!identity.uid" class="assertive" translate>WOT.NOT_MEMBER_PARENTHESIS</span> </h4> - <h4 ng-if="identity.events||identity.tags"> - <span ng-repeat="event in identity.events" + <h4 ng-if="::identity.events||identity.tags"> + <span ng-repeat="event in ::identity.events" class="assertive"> - <i class="ion-alert-circled " ng-if="!identity.valid"></i> - <span ng-bind-html="event.message|translate:event.messageParams"></span> + <i class="ion-alert-circled " ng-if="::!identity.valid"></i> + <span ng-bind-html="::event.message|translate:event.messageParams"></span> + </span> + <span ng-if="::identity.tags" class="dark"> + <ng-repeat ng-repeat="tag in ::identity.tags"> + #<ng-bind-html ng-bind-html="::tag"></ng-bind-html> + </ng-repeat> </span> - <span ng-repeat="tag in identity.tags" class="dark"> - #<ng-bind-html ng-bind-html="tag"></ng-bind-html> - </ng-repeat> </h4> <i class="icon ion-ios-arrow-right "></i> <ion-option-button class="button-positive" ng-click="showTransferModal({pubkey: identity.pubkey, uid: identity.name ||identity.uid})" translate>COMMON.BTN_SEND_MONEY_SHORT</ion-option-button>