Skip to content

Commit

Permalink
Improve i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack-Works committed Jul 6, 2019
1 parent 9697336 commit 4a4c91c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"manifest_description": {
"message": "Encrypt your posts & chats on You-Know-Where. Allow only your friends to decrypt."
},
"additional_post_box__dont_know_who_you_are": {
"message": "Sorry, Maskbook cannot identify who you are. Please try again later."
},
"additional_post_box__placeholder_w_name": {
"message": "Hey $1, what's your mind? Encrypt with Maskbook"
},
Expand Down
3 changes: 3 additions & 0 deletions src/_locales/zh/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"manifest_description": {
"message": "在臉書發佈加密訊息,只讓你的朋友閱讀。"
},
"additional_post_box__dont_know_who_you_are": {
"message": "抱歉,Maskbook 無法發現你是誰,所以加密框暫時不可用。"
},
"additional_post_box__placeholder_w_name": {
"message": "Hey $1, 有何所思?用 Maskbook 加密分享。"
},
Expand Down
3 changes: 1 addition & 2 deletions src/components/InjectedComponents/AdditionalPostBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ export function AdditionalPostBox() {
},
[identity[0]],
)
// TODO: i18n
if (identity.length === 0) return <>Sorry, Maskbook cannot identify who you are. Please try again later.</>
if (identity.length === 0) return <>{geti18nString('additional_post_box__dont_know_who_you_are')}</>

// TODO: Multiple account
if (identity.length > 1) console.warn('Multiple identity found. Let user choose one.')
Expand Down
1 change: 0 additions & 1 deletion src/crypto/crypto-alpha-40.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ async function deriveAESKey(
)

const _salt = typeof salt === 'string' ? decodeArrayBuffer(salt) : salt
// TODO: Need a name.
const UntitledUint8Array = addUint8Array(new Uint8Array(await crypto.subtle.exportKey('raw', derivedKey)), _salt)
const password = await crypto.subtle.digest(
'SHA-256',
Expand Down

0 comments on commit 4a4c91c

Please sign in to comment.