diff options
author | friendica <info@friendica.com> | 2013-11-11 15:20:30 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-11-11 15:20:30 -0800 |
commit | 4a3191cd1909dbfde861a113ba121e94b577a4cd (patch) | |
tree | 5d148fa44ce1e860952ee452724bfd4cd1f475ee | |
parent | 6ab8a6a17dcf96949ce9cd066990eb6d713b64e2 (diff) | |
download | volse-hubzilla-4a3191cd1909dbfde861a113ba121e94b577a4cd.tar.gz volse-hubzilla-4a3191cd1909dbfde861a113ba121e94b577a4cd.tar.bz2 volse-hubzilla-4a3191cd1909dbfde861a113ba121e94b577a4cd.zip |
localise js ui strings for e2ee
-rw-r--r-- | include/js_strings.php | 16 | ||||
-rw-r--r-- | js/crypto.js | 6 | ||||
-rwxr-xr-x | view/tpl/js_strings.tpl | 16 |
3 files changed, 21 insertions, 17 deletions
diff --git a/include/js_strings.php b/include/js_strings.php index 2e4f70774..afa8f075a 100644 --- a/include/js_strings.php +++ b/include/js_strings.php @@ -2,13 +2,15 @@ function js_strings() { return replace_macros(get_markup_template('js_strings.tpl'), array( - '$delitem' => t('Delete this item?'), - '$comment' => t('Comment'), - '$showmore' => t('show more'), - '$showfewer' => t('show fewer'), - '$pwshort' => t("Password too short"), - '$pwnomatch' => t("Passwords do not match"), - '$everybody' => t('everybody'), + '$delitem' => t('Delete this item?'), + '$comment' => t('Comment'), + '$showmore' => t('show more'), + '$showfewer' => t('show fewer'), + '$pwshort' => t("Password too short"), + '$pwnomatch' => t("Passwords do not match"), + '$everybody' => t('everybody'), + '$passphrase' => t('Secret Passphrase'), + '$passhint' => t('Passphrase hint'), '$t01' => ((t('timeago.prefixAgo') != 'timeago.prefixAgo') ? t('timeago.prefixAgo') : 'null'), '$t02' => ((t('timeago.suffixAgo') != 'timeago.suffixAgo') ? t('timeago.suffixAgo') : 'null'), diff --git a/js/crypto.js b/js/crypto.js index 9e8a43f55..e9ab6961b 100644 --- a/js/crypto.js +++ b/js/crypto.js @@ -35,7 +35,7 @@ function red_encrypt(alg, elem,text) { // key and hint need to be localised - var enc_key = prompt('key'); + var enc_key = prompt(aStr['passphrase']); // If you don't provide a key you get rot13, which doesn't need a key // but consequently isn't secure. @@ -50,7 +50,7 @@ function red_encrypt(alg, elem,text) { // This is the prompt we're going to use when the receiver tries to open it. // Maybe "Grandma's maiden name" or "our secret place" or something. - var enc_hint = prompt('hint'); + var enc_hint = prompt(aStr['passhint']); enc_text = CryptoJS.AES.encrypt(text,enc_key); @@ -85,7 +85,7 @@ function red_decrypt(alg,hint,text,elem) { enc_text = str_rot13(text); if(alg == 'aes256') { - var enc_key = prompt(hint); + var enc_key = prompt((hint.length) ? hint : aStr['passphrase']); enc_text = CryptoJS.AES.decrypt(text,enc_key); } diff --git a/view/tpl/js_strings.tpl b/view/tpl/js_strings.tpl index b61c69b90..144ecb17c 100755 --- a/view/tpl/js_strings.tpl +++ b/view/tpl/js_strings.tpl @@ -2,13 +2,15 @@ var aStr = { - 'delitem' : '{{$delitem}}', - 'comment' : '{{$comment}}', - 'showmore' : '{{$showmore}}', - 'showfewer' : '{{$showfewer}}', - 'pwshort' : '{{$pwshort}}', - 'pwnomatch' : '{{$pwnomatch}}', - 'everybody' : '{{$everybody}}', + 'delitem' : '{{$delitem}}', + 'comment' : '{{$comment}}', + 'showmore' : '{{$showmore}}', + 'showfewer' : '{{$showfewer}}', + 'pwshort' : '{{$pwshort}}', + 'pwnomatch' : '{{$pwnomatch}}', + 'everybody' : '{{$everybody}}', + 'passphrase' : '{{$passphrase}}', + 'passhint' : '{{$passhint}}', 't01' : {{$t01}}, 't02' : {{$t02}}, |