Skip to content

Commit

Permalink
refactor: migrate shared i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack-Works committed Sep 26, 2024
1 parent 382850d commit 9906cf4
Show file tree
Hide file tree
Showing 127 changed files with 7,047 additions and 710 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { E2EUnavailableReason } from './CompositionUI.js'
import { usePersonasFromDB } from '../../../shared-ui/hooks/usePersonasFromDB.js'
import { useLastRecognizedIdentity } from '../DataSource/useActivatedUI.js'
import Services from '#services'
import { plural, Trans } from '@lingui/macro'
import { Plural, Trans } from '@lingui/macro'

const useStyles = makeStyles()((theme) => ({
optionTitle: {
Expand Down Expand Up @@ -112,10 +112,7 @@ export function EncryptionTargetSelector(props: EncryptionTargetSelectorProps) {
const selected = props.target
const shareWithNum = props.selectedRecipientLength
if (selected === EncryptionTargetType.E2E)
return plural(shareWithNum, {
one: '1 friend',
other: `${shareWithNum} friends`,
})
return <Plural one="1 friend" other="# friends" value={shareWithNum} />
else if (selected === EncryptionTargetType.Public) return <Trans>All</Trans>
else if (selected === EncryptionTargetType.Self) return <Trans>Private</Trans>
unreachable(selected)
Expand Down
1 change: 1 addition & 0 deletions packages/mask/shared-ui/locale/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"KMgp2+": [["0"], " available"],
"y6VCOb": [["0"], " Mins"],
"ovXZv6": [["shareWithNum", "plural", { "one": "1 friend", "other": [["shareWithNum"], " friends"] }]],
"ANYjcp": [["shareWithNum", "plural", { "one": "1 friend", "other": ["#", " friends"] }]],
"lKldOY": "12-word recovery phrase is used to recover your persona data.",
"llLBQ1": "a token",
"uyJsf6": "About",
Expand Down
24 changes: 14 additions & 10 deletions packages/mask/shared-ui/locale/en-US.po
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ msgid "{0} Mins"
msgstr ""

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:115
msgid "{shareWithNum, plural, one {1 friend} other {{shareWithNum} friends}}"
#~ msgid "{shareWithNum, plural, one {1 friend} other {{shareWithNum} friends}}"
#~ msgstr ""

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:115
msgid "{shareWithNum, plural, one {1 friend} other {# friends}}"
msgstr ""

#: dashboard/pages/SetupPersona/Mnemonic/index.tsx:161
Expand Down Expand Up @@ -140,8 +144,8 @@ msgstr ""
msgid "Agree"
msgstr ""

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:119
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:139
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:116
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:136
msgid "All"
msgstr ""

Expand Down Expand Up @@ -917,7 +921,7 @@ msgstr ""
msgid "Ethereum {HD_PATH_WITHOUT_INDEX_ETHEREUM}"
msgstr ""

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:140
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:137
msgid "Everyone"
msgstr ""

Expand Down Expand Up @@ -1286,11 +1290,11 @@ msgstr ""
msgid "Issued at"
msgstr ""

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:147
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:144
msgid "Just Me"
msgstr ""

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:157
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:154
msgid "Just Selected Contacts"
msgstr ""

Expand Down Expand Up @@ -1891,8 +1895,8 @@ msgstr ""
msgid "Privacy Policy"
msgstr ""

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:120
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:146
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:117
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:143
msgid "Private"
msgstr ""

Expand Down Expand Up @@ -2179,7 +2183,7 @@ msgstr ""
msgid "Settings"
msgstr ""

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:156
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:153
#: content-script/components/InjectedComponents/SelectPeopleDialog.tsx:120
#: content-script/components/shared/SelectRecipients/SelectRecipientsDialog.tsx:206
msgid "Share with"
Expand Down Expand Up @@ -2646,7 +2650,7 @@ msgstr ""
msgid "View on Explorer"
msgstr ""

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:126
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:123
msgid "Visible To"
msgstr ""

Expand Down
1 change: 1 addition & 0 deletions packages/mask/shared-ui/locale/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"KMgp2+": [["0"], " 利用可能です"],
"y6VCOb": [["0"], ""],
"ovXZv6": [["shareWithNum", "plural", { "one": "1 friend", "other": [["shareWithNum"], " friends"] }]],
"ANYjcp": [["shareWithNum", "plural", { "one": "1 friend", "other": ["#", " friends"] }]],
"lKldOY": "12単語の復元フレーズは、ペルソナデータを回復するために使用されます。",
"llLBQ1": "トークン",
"uyJsf6": "詳細",
Expand Down
24 changes: 14 additions & 10 deletions packages/mask/shared-ui/locale/ja-JP.po
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ msgid "{0} Mins"
msgstr "{0} 分"

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:115
msgid "{shareWithNum, plural, one {1 friend} other {{shareWithNum} friends}}"
#~ msgid "{shareWithNum, plural, one {1 friend} other {{shareWithNum} friends}}"
#~ msgstr ""

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:115
msgid "{shareWithNum, plural, one {1 friend} other {# friends}}"
msgstr ""

#: dashboard/pages/SetupPersona/Mnemonic/index.tsx:161
Expand Down Expand Up @@ -145,8 +149,8 @@ msgstr "ログアウト後、関連付けられたソーシャルアカウント
msgid "Agree"
msgstr "同意"

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:119
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:139
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:116
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:136
msgid "All"
msgstr "全て"

Expand Down Expand Up @@ -922,7 +926,7 @@ msgstr "支払いパスワードを入力する"
msgid "Ethereum {HD_PATH_WITHOUT_INDEX_ETHEREUM}"
msgstr ""

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:140
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:137
msgid "Everyone"
msgstr "全員"

Expand Down Expand Up @@ -1291,11 +1295,11 @@ msgstr "認証コードが無効です。"
msgid "Issued at"
msgstr "発行元"

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:147
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:144
msgid "Just Me"
msgstr "自分のみ"

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:157
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:154
msgid "Just Selected Contacts"
msgstr "選択された連絡先のみ"

Expand Down Expand Up @@ -1896,8 +1900,8 @@ msgstr ""
msgid "Privacy Policy"
msgstr "プライバシー・ポリシー(個人情報に関する方針)"

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:120
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:146
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:117
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:143
msgid "Private"
msgstr "プライベート"

Expand Down Expand Up @@ -2184,7 +2188,7 @@ msgstr "あなたのペルソナ名を24文字以内で設定してください"
msgid "Settings"
msgstr "設定"

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:156
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:153
#: content-script/components/InjectedComponents/SelectPeopleDialog.tsx:120
#: content-script/components/shared/SelectRecipients/SelectRecipientsDialog.tsx:206
msgid "Share with"
Expand Down Expand Up @@ -2651,7 +2655,7 @@ msgstr "取引の詳細を表示する"
msgid "View on Explorer"
msgstr "エクスプローラーで表示"

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:126
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:123
msgid "Visible To"
msgstr "表示対象:"

Expand Down
1 change: 1 addition & 0 deletions packages/mask/shared-ui/locale/ko-KR.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"KMgp2+": [["0"], " 이용가능"],
"y6VCOb": [["0"], ""],
"ovXZv6": [["shareWithNum", "plural", { "one": "1 friend", "other": [["shareWithNum"], " friends"] }]],
"ANYjcp": [["shareWithNum", "plural", { "one": "1 friend", "other": ["#", " friends"] }]],
"lKldOY": "12개 복구 문구로 페르소나 데어터를 복구할 수 있습니다.",
"llLBQ1": "a token",
"uyJsf6": "알아보기",
Expand Down
24 changes: 14 additions & 10 deletions packages/mask/shared-ui/locale/ko-KR.po
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ msgid "{0} Mins"
msgstr "{0} 분"

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:115
msgid "{shareWithNum, plural, one {1 friend} other {{shareWithNum} friends}}"
#~ msgid "{shareWithNum, plural, one {1 friend} other {{shareWithNum} friends}}"
#~ msgstr ""

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:115
msgid "{shareWithNum, plural, one {1 friend} other {# friends}}"
msgstr ""

#: dashboard/pages/SetupPersona/Mnemonic/index.tsx:161
Expand Down Expand Up @@ -145,8 +149,8 @@ msgstr "로그아웃 후, 연결된 소셜 계정은 더 이상 암호화하거
msgid "Agree"
msgstr "동의"

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:119
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:139
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:116
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:136
msgid "All"
msgstr "전체"

Expand Down Expand Up @@ -922,7 +926,7 @@ msgstr "결제 비밀번호 입력"
msgid "Ethereum {HD_PATH_WITHOUT_INDEX_ETHEREUM}"
msgstr ""

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:140
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:137
msgid "Everyone"
msgstr "공개"

Expand Down Expand Up @@ -1291,11 +1295,11 @@ msgstr "유효하지 않은 인증 코드입니다."
msgid "Issued at"
msgstr ""

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:147
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:144
msgid "Just Me"
msgstr "나만 보기"

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:157
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:154
msgid "Just Selected Contacts"
msgstr "선정된 연락처에게만 공유"

Expand Down Expand Up @@ -1896,8 +1900,8 @@ msgstr ""
msgid "Privacy Policy"
msgstr "개인정보처리방침"

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:120
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:146
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:117
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:143
msgid "Private"
msgstr "비공개"

Expand Down Expand Up @@ -2184,7 +2188,7 @@ msgstr "최대 24자로 페로소나 이름 설정합니다"
msgid "Settings"
msgstr "설정"

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:156
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:153
#: content-script/components/InjectedComponents/SelectPeopleDialog.tsx:120
#: content-script/components/shared/SelectRecipients/SelectRecipientsDialog.tsx:206
msgid "Share with"
Expand Down Expand Up @@ -2651,7 +2655,7 @@ msgstr "거래 세부 내역 보기"
msgid "View on Explorer"
msgstr "Explorer에서 보기"

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:126
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:123
msgid "Visible To"
msgstr "공개 대상"

Expand Down
1 change: 1 addition & 0 deletions packages/mask/shared-ui/locale/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"KMgp2+": [["0"], " 可用"],
"y6VCOb": [["0"], " 分钟"],
"ovXZv6": [["shareWithNum", "plural", { "one": "1 friend", "other": [["shareWithNum"], " friends"] }]],
"ANYjcp": [["shareWithNum", "plural", { "one": "1 friend", "other": ["#", " friends"] }]],
"lKldOY": "请选择恢复备份的正确方法。",
"llLBQ1": "代币",
"uyJsf6": "关于",
Expand Down
24 changes: 14 additions & 10 deletions packages/mask/shared-ui/locale/zh-CN.po
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ msgid "{0} Mins"
msgstr "{0} 分钟"

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:115
msgid "{shareWithNum, plural, one {1 friend} other {{shareWithNum} friends}}"
#~ msgid "{shareWithNum, plural, one {1 friend} other {{shareWithNum} friends}}"
#~ msgstr ""

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:115
msgid "{shareWithNum, plural, one {1 friend} other {# friends}}"
msgstr ""

#: dashboard/pages/SetupPersona/Mnemonic/index.tsx:161
Expand Down Expand Up @@ -145,8 +149,8 @@ msgstr "身份登出后,您所关联的社交网络账户将不能解密过去
msgid "Agree"
msgstr "同意"

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:119
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:139
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:116
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:136
msgid "All"
msgstr "所有人"

Expand Down Expand Up @@ -922,7 +926,7 @@ msgstr "输入支付密码"
msgid "Ethereum {HD_PATH_WITHOUT_INDEX_ETHEREUM}"
msgstr ""

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:140
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:137
msgid "Everyone"
msgstr "任何用户可见"

Expand Down Expand Up @@ -1291,11 +1295,11 @@ msgstr "验证码错误。"
msgid "Issued at"
msgstr ""

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:147
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:144
msgid "Just Me"
msgstr "仅自己可见"

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:157
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:154
msgid "Just Selected Contacts"
msgstr "仅选定的联系人可见"

Expand Down Expand Up @@ -1896,8 +1900,8 @@ msgstr ""
msgid "Privacy Policy"
msgstr "隐私政策"

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:120
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:146
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:117
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:143
msgid "Private"
msgstr "私密"

Expand Down Expand Up @@ -2184,7 +2188,7 @@ msgstr "设置您的身份名称,最大长度为24个字符"
msgid "Settings"
msgstr "设置"

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:156
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:153
#: content-script/components/InjectedComponents/SelectPeopleDialog.tsx:120
#: content-script/components/shared/SelectRecipients/SelectRecipientsDialog.tsx:206
msgid "Share with"
Expand Down Expand Up @@ -2651,7 +2655,7 @@ msgstr "查看交易详情"
msgid "View on Explorer"
msgstr "在区块链浏览器查看"

#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:126
#: content-script/components/CompositionDialog/EncryptionTargetSelector.tsx:123
msgid "Visible To"
msgstr "可见范围"

Expand Down
1 change: 1 addition & 0 deletions packages/mask/shared-ui/locale/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"KMgp2+": [["0"], " 可用"],
"y6VCOb": [["0"], " 分钟"],
"ovXZv6": [["shareWithNum", "plural", { "one": "1 friend", "other": [["shareWithNum"], " friends"] }]],
"ANYjcp": [["shareWithNum", "plural", { "one": "1 friend", "other": ["#", " friends"] }]],
"lKldOY": "请选择恢复备份的正确方法。",
"llLBQ1": "代币",
"uyJsf6": "关于",
Expand Down
Loading

0 comments on commit 9906cf4

Please sign in to comment.