@celljs/ta-web 4.18.0 → 4.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/browser/account/account-side.d.ts +13 -0
- package/esm/browser/account/account-side.js +74 -0
- package/esm/browser/account/device-account.d.ts +69 -0
- package/esm/browser/account/device-account.js +215 -0
- package/esm/browser/assistant/assistant-chat-list.js +2 -1
- package/esm/browser/components/account-menu.d.ts +1 -1
- package/esm/browser/components/account-menu.js +7 -2
- package/esm/browser/components/account-view.d.ts +17 -0
- package/esm/browser/components/account-view.js +216 -0
- package/esm/browser/components/app-view.js +4 -4
- package/esm/browser/components/cloud-sign-in-view.d.ts +5 -1
- package/esm/browser/components/cloud-sign-in-view.js +1 -1
- package/esm/browser/components/dino-look.d.ts +9 -1
- package/esm/browser/components/dino-look.js +46 -1
- package/esm/browser/components/environment-view.js +12 -1
- package/esm/browser/components/face-pictures.d.ts +10 -0
- package/esm/browser/components/face-pictures.js +24 -0
- package/esm/browser/components/face.d.ts +4 -1
- package/esm/browser/components/face.js +16 -1
- package/esm/browser/components/host-view.d.ts +3 -1
- package/esm/browser/components/host-view.js +7 -0
- package/esm/browser/components/picture-dialog.d.ts +18 -0
- package/esm/browser/components/picture-dialog.js +116 -0
- package/esm/browser/components/workbench-view.js +5 -1
- package/esm/browser/extension/icons.js +2 -1
- package/esm/browser/extension/web-api-home.d.ts +13 -0
- package/esm/browser/extension/web-api-home.js +2 -0
- package/esm/browser/extension/web-extension-api.d.ts +4 -4
- package/esm/browser/extension/web-extension-context.js +2 -1
- package/esm/browser/extension/web-home.d.ts +8 -0
- package/esm/browser/extension/web-home.js +20 -0
- package/esm/browser/gateway/console-limits.d.ts +15 -0
- package/esm/browser/gateway/console-limits.js +2 -2
- package/esm/browser/gateway/console-tenant.js +33 -2
- package/esm/browser/gateway/console-updates.d.ts +12 -0
- package/esm/browser/gateway/console-updates.js +76 -0
- package/esm/browser/gateway/console-util.d.ts +7 -1
- package/esm/browser/gateway/console-util.js +18 -0
- package/esm/browser/gateway/console-view.js +9 -2
- package/esm/browser/hosts.d.ts +5 -0
- package/esm/browser/hosts.js +11 -0
- package/esm/browser/i18n/locales.d.ts +69 -3
- package/esm/browser/i18n/locales.js +9 -3
- package/esm/browser/i18n/messages-all.d.ts +7 -0
- package/esm/browser/i18n/messages-all.js +14 -0
- package/esm/browser/i18n/messages-ja.js +64 -0
- package/esm/browser/i18n/messages-zh-tw.js +64 -0
- package/esm/browser/i18n/messages.d.ts +70 -8
- package/esm/browser/i18n/messages.js +161 -11
- package/esm/browser/i18n/use-t.js +4 -3
- package/esm/browser/settings/settings.js +3 -1
- package/esm/browser/style/dialogs.d.ts +1 -1
- package/esm/browser/style/dialogs.js +31 -0
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +5 -0
- package/esm/browser/style/phone.d.ts +1 -1
- package/esm/browser/style/phone.js +2 -1
- package/esm/browser/style/surfaces.d.ts +1 -1
- package/esm/browser/style/surfaces.js +1 -0
- package/esm/browser/util/picture.d.ts +5 -0
- package/esm/browser/util/picture.js +43 -0
- package/esm/browser/workbench-hosts.d.ts +7 -0
- package/esm/browser/workbench-hosts.js +20 -0
- package/esm/browser/workbench-protocol.d.ts +8 -1
- package/esm/browser/workbench-services.d.ts +2 -1
- package/esm/browser/workbench-services.js +3 -0
- package/esm/browser/workbench-util.d.ts +1 -1
- package/lib/browser/account/account-side.d.ts +14 -0
- package/lib/browser/account/account-side.js +111 -0
- package/lib/browser/account/device-account.d.ts +70 -0
- package/lib/browser/account/device-account.js +219 -0
- package/lib/browser/assistant/assistant-chat-list.js +2 -1
- package/lib/browser/components/account-menu.d.ts +1 -1
- package/lib/browser/components/account-menu.js +6 -1
- package/lib/browser/components/account-view.d.ts +18 -0
- package/lib/browser/components/account-view.js +255 -0
- package/lib/browser/components/app-view.js +2 -2
- package/lib/browser/components/cloud-sign-in-view.d.ts +5 -1
- package/lib/browser/components/cloud-sign-in-view.js +1 -0
- package/lib/browser/components/dino-look.d.ts +9 -1
- package/lib/browser/components/dino-look.js +48 -1
- package/lib/browser/components/environment-view.js +11 -0
- package/lib/browser/components/face-pictures.d.ts +11 -0
- package/lib/browser/components/face-pictures.js +60 -0
- package/lib/browser/components/face.d.ts +4 -1
- package/lib/browser/components/face.js +16 -1
- package/lib/browser/components/host-view.d.ts +3 -1
- package/lib/browser/components/host-view.js +8 -0
- package/lib/browser/components/picture-dialog.d.ts +19 -0
- package/lib/browser/components/picture-dialog.js +153 -0
- package/lib/browser/components/workbench-view.js +5 -1
- package/lib/browser/extension/icons.js +1 -0
- package/lib/browser/extension/web-api-home.d.ts +14 -0
- package/lib/browser/extension/web-api-home.js +3 -0
- package/lib/browser/extension/web-extension-api.d.ts +4 -4
- package/lib/browser/extension/web-extension-context.js +2 -1
- package/lib/browser/extension/web-home.d.ts +8 -0
- package/lib/browser/extension/web-home.js +54 -1
- package/lib/browser/gateway/console-limits.d.ts +15 -0
- package/lib/browser/gateway/console-limits.js +2 -0
- package/lib/browser/gateway/console-tenant.js +32 -1
- package/lib/browser/gateway/console-updates.d.ts +13 -0
- package/lib/browser/gateway/console-updates.js +113 -0
- package/lib/browser/gateway/console-util.d.ts +7 -1
- package/lib/browser/gateway/console-util.js +18 -0
- package/lib/browser/gateway/console-view.js +9 -2
- package/lib/browser/hosts.d.ts +5 -0
- package/lib/browser/hosts.js +11 -0
- package/lib/browser/i18n/locales.d.ts +69 -3
- package/lib/browser/i18n/locales.js +8 -2
- package/lib/browser/i18n/messages-all.d.ts +8 -0
- package/lib/browser/i18n/messages-all.js +17 -0
- package/lib/browser/i18n/messages-ja.js +64 -0
- package/lib/browser/i18n/messages-zh-tw.js +64 -0
- package/lib/browser/i18n/messages.d.ts +70 -8
- package/lib/browser/i18n/messages.js +163 -13
- package/lib/browser/i18n/use-t.js +4 -3
- package/lib/browser/settings/settings.js +3 -1
- package/lib/browser/style/dialogs.d.ts +1 -1
- package/lib/browser/style/dialogs.js +31 -0
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +5 -0
- package/lib/browser/style/phone.d.ts +1 -1
- package/lib/browser/style/phone.js +2 -1
- package/lib/browser/style/surfaces.d.ts +1 -1
- package/lib/browser/style/surfaces.js +1 -0
- package/lib/browser/util/picture.d.ts +6 -0
- package/lib/browser/util/picture.js +46 -0
- package/lib/browser/workbench-hosts.d.ts +7 -0
- package/lib/browser/workbench-hosts.js +20 -0
- package/lib/browser/workbench-protocol.d.ts +8 -1
- package/lib/browser/workbench-services.d.ts +2 -1
- package/lib/browser/workbench-services.js +3 -0
- package/lib/browser/workbench-util.d.ts +1 -1
- package/package.json +7 -7
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EN_MESSAGES, ZH_MESSAGES } from './messages.js';
|
|
2
|
+
import { JA_MESSAGES } from './messages-ja.js';
|
|
3
|
+
import { ZH_TW_MESSAGES } from './messages-zh-tw.js';
|
|
4
|
+
/**
|
|
5
|
+
* The messages of each language of Ta, checked by scripts/check-i18n.ts. Not for the page, which loads Traditional
|
|
6
|
+
* Chinese and Japanese as they are chosen (`loadMessages`): imported there, they would be in its first code again.
|
|
7
|
+
*/
|
|
8
|
+
export const MESSAGES = {
|
|
9
|
+
'zh-CN': ZH_MESSAGES,
|
|
10
|
+
'zh-TW': ZH_TW_MESSAGES,
|
|
11
|
+
'en-US': EN_MESSAGES,
|
|
12
|
+
'ja-JP': JA_MESSAGES,
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=messages-all.js.map
|
|
@@ -376,6 +376,36 @@ export const JA_MESSAGES = {
|
|
|
376
376
|
'ta.console.manage': '管理',
|
|
377
377
|
'ta.console.sandbox': 'サンドボックス',
|
|
378
378
|
'ta.console.about': '基本情報',
|
|
379
|
+
'ta.console.updatesAvailable': '{count} 台の Ta を {version} に更新できます',
|
|
380
|
+
'ta.console.updateAll': 'すべて更新',
|
|
381
|
+
'ta.console.updateAllConfirm': '{count} 台の Ta を {version} に更新しますか?',
|
|
382
|
+
'ta.console.updateAllDetail': '1 台ずつ更新します。停止して新しいバージョンで起動し、作業は続きから再開します。起動できない Ta は元のバージョンに戻り、残りは更新しません。',
|
|
383
|
+
'ta.console.updatingProgress': '更新中 {done}/{total}',
|
|
384
|
+
'ta.console.update': '更新',
|
|
385
|
+
'ta.console.updateConfirm': '{account} の Ta を {version} に更新しますか?',
|
|
386
|
+
'ta.console.updateDetail': '停止して新しいバージョンで起動し、作業は続きから再開します。起動できなければ元のバージョンに戻ります。',
|
|
387
|
+
'ta.console.updateWorking': '{count} 件の会話が進行中です。一時停止し、起動後に続きから再開します。',
|
|
388
|
+
'ta.console.rollback': '前のバージョン({version})に戻す',
|
|
389
|
+
'ta.console.rollbackConfirm': '{account} の Ta を {version} に戻しますか?',
|
|
390
|
+
'ta.console.rollbackDetail': '前のバージョンで再起動し、手動で更新するまでこのバージョンには自動で更新しません。',
|
|
391
|
+
'ta.console.version': 'バージョン',
|
|
392
|
+
'ta.console.updatable': '更新あり',
|
|
393
|
+
'ta.console.updates': '更新',
|
|
394
|
+
'ta.console.updatesHint': '起動する Ta は常に最新バージョンを使います。起動できなければ自動で元のバージョンに戻ります。',
|
|
395
|
+
'ta.console.updateMode': '実行中の Ta',
|
|
396
|
+
'ta.console.updateIdle': 'アイドル時に自動更新',
|
|
397
|
+
'ta.console.updateIdleHint': '進行中の会話がなく、10 分間動きがないとき',
|
|
398
|
+
'ta.console.updateManual': '手動で更新',
|
|
399
|
+
'ta.console.updateManualHint': 'アカウントページで「更新」したとき',
|
|
400
|
+
'ta.console.checkUpdates': '新しいバージョンを確認',
|
|
401
|
+
'ta.console.checked': '{count, plural, =0 {すべての Ta が最新バージョンです} other {# 台の Ta を更新できます}}',
|
|
402
|
+
'ta.console.auditUpdate': '更新:',
|
|
403
|
+
'ta.console.auditUpdateAll': 'すべての Ta を更新',
|
|
404
|
+
'ta.console.auditRollback': '前のバージョンに戻した:',
|
|
405
|
+
'ta.console.auditUpdatePolicy': '更新方法を変更',
|
|
406
|
+
'ta.environment.newVersion': '新しいバージョン {version}',
|
|
407
|
+
'ta.environment.newVersionIdle': 'アイドル時に自動で更新されます。今すぐ更新すると作業は一時停止し、続きから再開します。',
|
|
408
|
+
'ta.environment.newVersionManual': '今すぐ更新します。作業は一時停止し、続きから再開します。',
|
|
379
409
|
'ta.access.title': 'アクセス',
|
|
380
410
|
'ta.access.bind': 'アカウントでサインイン',
|
|
381
411
|
'ta.access.bindHint': 'サインインに使用するアカウントを許可するため、次回以降は任意のデバイスでサインインできます。',
|
|
@@ -631,6 +661,15 @@ export const JA_MESSAGES = {
|
|
|
631
661
|
'ta.assistant.rename': '名前変更',
|
|
632
662
|
'ta.assistant.prompt': 'システムプロンプト',
|
|
633
663
|
'ta.assistant.look': '外見',
|
|
664
|
+
'ta.picture.title': '私のアイコン',
|
|
665
|
+
'ta.picture.hint': 'グループチャットと友だちに見えるあなた。分身は恐竜のままです。',
|
|
666
|
+
'ta.picture.choose': '写真を選ぶ・撮る',
|
|
667
|
+
'ta.picture.draw': 'Ta に描いてもらう',
|
|
668
|
+
'ta.picture.reset': '恐竜に戻す',
|
|
669
|
+
'ta.picture.drawPlaceholder': '何を描く?例:ヘッドホンをした柴犬',
|
|
670
|
+
'ta.picture.drawSend': '描いてもらう',
|
|
671
|
+
'ta.picture.tooLarge': 'この写真は十分に小さくできません。別の写真を試してください。',
|
|
672
|
+
'ta.picture.drawPrompt': 'グループチャットと友だちに見せる私のアイコンを描いて:{what}。256 × 256 の正方形、主題は中央、文字なし。SVG か PNG で 11 KB 以内。描けたらまず見せて、私が OK と言ってから `ta call @celljs/ta-rooms picture /ファイルの絶対パス` で私のアイコンに設定して。直してほしいと言ったら、先に描き直して見せて。',
|
|
634
673
|
'ta.look.title': '分身の外見',
|
|
635
674
|
'ta.look.species': '恐竜',
|
|
636
675
|
'ta.look.gait': '歩き方',
|
|
@@ -1335,6 +1374,31 @@ export const JA_MESSAGES = {
|
|
|
1335
1374
|
'ta.auth.hintRemote': '認証情報は Ta を実行しているマシンにのみ保存されます。',
|
|
1336
1375
|
'ta.auth.later': '後で',
|
|
1337
1376
|
'ta.hosts.title': 'コンピュータ',
|
|
1377
|
+
'ta.myDevices.title': 'アカウントとデバイス',
|
|
1378
|
+
'ta.myDevices.hint': 'パソコンとスマホで同じアカウントにログインすると、互いに自動で表示されます。コードの読み取りは不要です。',
|
|
1379
|
+
'ta.myDevices.signInWith': '{name} でログイン',
|
|
1380
|
+
'ta.myDevices.enterCode': '{name} でこのコードを入力',
|
|
1381
|
+
'ta.myDevices.openProvider': '{name} を開く',
|
|
1382
|
+
'ta.myDevices.waitingTitle': 'ほかのデバイスの許可を待っています',
|
|
1383
|
+
'ta.myDevices.waitingHint': 'このアカウントでログイン済みのパソコンかスマホで「許可」をタップしてください。コードが同じか確認してください。',
|
|
1384
|
+
'ta.myDevices.askTitle': '{name} があなたのデバイスに参加しようとしています',
|
|
1385
|
+
'ta.myDevices.askHint': '自分のデバイスで、同じコードが表示されている場合のみ許可してください。',
|
|
1386
|
+
'ta.myDevices.code': '確認コード {code}',
|
|
1387
|
+
'ta.myDevices.allow': '許可',
|
|
1388
|
+
'ta.myDevices.notMe': '自分ではない',
|
|
1389
|
+
'ta.myDevices.later': 'あとで',
|
|
1390
|
+
'ta.myDevices.thisDevice': 'このデバイス',
|
|
1391
|
+
'ta.myDevices.online': 'オンライン',
|
|
1392
|
+
'ta.myDevices.seen': '{time}にオンライン',
|
|
1393
|
+
'ta.myDevices.waiting': '許可待ち',
|
|
1394
|
+
'ta.myDevices.remove': '削除',
|
|
1395
|
+
'ta.myDevices.removeConfirm': '{name} をアカウントから削除しますか? あなたのパソコンに接続できなくなります。',
|
|
1396
|
+
'ta.myDevices.signOut': 'ログアウト',
|
|
1397
|
+
'ta.myDevices.signOutConfirm': 'アカウントからログアウトしますか? アカウントで追加されたパソコンはこのデバイスから外れ、コードで接続したものは残ります。',
|
|
1398
|
+
'ta.myDevices.signOutConfirmComputer': 'アカウントからログアウトしますか? アカウントで追加したデバイスはこのパソコンに接続できなくなります。',
|
|
1399
|
+
'ta.myDevices.none': 'まだこのデバイスだけです。ほかのパソコンやスマホで同じアカウントにログインしてください。',
|
|
1400
|
+
'ta.myDevices.open': '開く',
|
|
1401
|
+
'ta.myDevices.signInAccount': 'アカウントでログイン',
|
|
1338
1402
|
'ta.hosts.scan': 'スキャンして接続',
|
|
1339
1403
|
'ta.hosts.scanShort': 'スキャン',
|
|
1340
1404
|
'ta.hosts.paste': 'リンクを貼り付け',
|
|
@@ -377,6 +377,36 @@ export const ZH_TW_MESSAGES = {
|
|
|
377
377
|
'ta.console.manage': '管理',
|
|
378
378
|
'ta.console.sandbox': '沙箱',
|
|
379
379
|
'ta.console.about': '基本資訊',
|
|
380
|
+
'ta.console.updatesAvailable': '{count} 台 Ta 可以更新到 {version}',
|
|
381
|
+
'ta.console.updateAll': '全部更新',
|
|
382
|
+
'ta.console.updateAllConfirm': '把 {count} 台 Ta 更新到 {version}?',
|
|
383
|
+
'ta.console.updateAllDetail': '一台接一台地更新:先停下,再用新版本啟動,之前在做的事會接著做。有一台起不來時,它會自動回到原來的版本,其餘的不再更新。',
|
|
384
|
+
'ta.console.updatingProgress': '正在更新 {done}/{total}',
|
|
385
|
+
'ta.console.update': '更新',
|
|
386
|
+
'ta.console.updateConfirm': '把 {account} 的 Ta 更新到 {version}?',
|
|
387
|
+
'ta.console.updateDetail': '會先停下,再用新版本啟動,之前在做的事會接著做;起不來會自動回到原來的版本。',
|
|
388
|
+
'ta.console.updateWorking': '有 {count} 個對話正在進行,會暫停,啟動後接著做。',
|
|
389
|
+
'ta.console.rollback': '回到上一版({version})',
|
|
390
|
+
'ta.console.rollbackConfirm': '把 {account} 的 Ta 回到 {version}?',
|
|
391
|
+
'ta.console.rollbackDetail': '會用上一版重新啟動,之後不會再自動更新到這個版本,直到手動更新。',
|
|
392
|
+
'ta.console.version': '版本',
|
|
393
|
+
'ta.console.updatable': '可更新',
|
|
394
|
+
'ta.console.updates': '更新',
|
|
395
|
+
'ta.console.updatesHint': '新啟動的 Ta 都用最新版本;起不來時會自動回到原來的版本。',
|
|
396
|
+
'ta.console.updateMode': '執行中的 Ta',
|
|
397
|
+
'ta.console.updateIdle': '閒置時自動更新',
|
|
398
|
+
'ta.console.updateIdleHint': '沒有對話在進行、10 分鐘沒有動靜時',
|
|
399
|
+
'ta.console.updateManual': '手動更新',
|
|
400
|
+
'ta.console.updateManualHint': '在帳號頁點「更新」時',
|
|
401
|
+
'ta.console.checkUpdates': '檢查新版本',
|
|
402
|
+
'ta.console.checked': '{count, plural, =0 {所有 Ta 都是最新版本} other {# 台 Ta 可以更新}}',
|
|
403
|
+
'ta.console.auditUpdate': '更新了',
|
|
404
|
+
'ta.console.auditUpdateAll': '更新了全部 Ta',
|
|
405
|
+
'ta.console.auditRollback': '回退了',
|
|
406
|
+
'ta.console.auditUpdatePolicy': '修改了更新方式',
|
|
407
|
+
'ta.environment.newVersion': '有新版本 {version}',
|
|
408
|
+
'ta.environment.newVersionIdle': '閒置時會自動更新;也可以現在更新,正在做的事會暫停後接著做。',
|
|
409
|
+
'ta.environment.newVersionManual': '現在更新,正在做的事會暫停後接著做。',
|
|
380
410
|
'ta.access.title': '存取',
|
|
381
411
|
'ta.access.bind': '用你的帳號登入',
|
|
382
412
|
'ta.access.bindHint': '允許你登入用的這個帳號,以後在任何裝置上都能用它登入。',
|
|
@@ -632,6 +662,15 @@ export const ZH_TW_MESSAGES = {
|
|
|
632
662
|
'ta.assistant.rename': '重新命名',
|
|
633
663
|
'ta.assistant.prompt': '系統提示詞',
|
|
634
664
|
'ta.assistant.look': '形象',
|
|
665
|
+
'ta.picture.title': '我的頭像',
|
|
666
|
+
'ta.picture.hint': '群聊和好友裡別人看到的你,分身仍是恐龍。',
|
|
667
|
+
'ta.picture.choose': '從相簿選擇或拍照',
|
|
668
|
+
'ta.picture.draw': '讓 Ta 畫一個',
|
|
669
|
+
'ta.picture.reset': '換回恐龍',
|
|
670
|
+
'ta.picture.drawPlaceholder': '畫成什麼樣?比如:戴耳機的柴犬',
|
|
671
|
+
'ta.picture.drawSend': '開始畫',
|
|
672
|
+
'ta.picture.tooLarge': '這張照片壓不到夠小,換一張試試。',
|
|
673
|
+
'ta.picture.drawPrompt': '給我畫一個頭像,別人在群聊和好友裡看到的就是它:{what}。正方形 256 × 256,主體置中,不要文字;SVG 或 PNG,11 KB 以內。畫好先給我看,等我說好了再用 `ta call @celljs/ta-rooms picture /檔案的絕對路徑` 設成我的頭像;我要改就先改好再給我看。',
|
|
635
674
|
'ta.look.title': '分身形象',
|
|
636
675
|
'ta.look.species': '恐龍',
|
|
637
676
|
'ta.look.gait': '走路',
|
|
@@ -1336,6 +1375,31 @@ export const ZH_TW_MESSAGES = {
|
|
|
1336
1375
|
'ta.auth.hintRemote': '憑據只儲存在執行 Ta 的機器上。',
|
|
1337
1376
|
'ta.auth.later': '稍後再說',
|
|
1338
1377
|
'ta.hosts.title': '電腦',
|
|
1378
|
+
'ta.myDevices.title': '帳號與裝置',
|
|
1379
|
+
'ta.myDevices.hint': '電腦和手機登入同一個帳號,彼此自動出現,不用掃碼。',
|
|
1380
|
+
'ta.myDevices.signInWith': '使用 {name} 登入',
|
|
1381
|
+
'ta.myDevices.enterCode': '在 {name} 輸入這串碼',
|
|
1382
|
+
'ta.myDevices.openProvider': '開啟 {name}',
|
|
1383
|
+
'ta.myDevices.waitingTitle': '等待你的其他裝置允許',
|
|
1384
|
+
'ta.myDevices.waitingHint': '在已登入這個帳號的電腦或手機上點「允許」,核對碼要一致。',
|
|
1385
|
+
'ta.myDevices.askTitle': '{name} 想加入你的裝置',
|
|
1386
|
+
'ta.myDevices.askHint': '確認是你自己的裝置、核對碼一致再允許。',
|
|
1387
|
+
'ta.myDevices.code': '核對碼 {code}',
|
|
1388
|
+
'ta.myDevices.allow': '允許',
|
|
1389
|
+
'ta.myDevices.notMe': '不是我',
|
|
1390
|
+
'ta.myDevices.later': '稍後',
|
|
1391
|
+
'ta.myDevices.thisDevice': '這台裝置',
|
|
1392
|
+
'ta.myDevices.online': '在線',
|
|
1393
|
+
'ta.myDevices.seen': '{time}在線',
|
|
1394
|
+
'ta.myDevices.waiting': '等待允許',
|
|
1395
|
+
'ta.myDevices.remove': '移除',
|
|
1396
|
+
'ta.myDevices.removeConfirm': '從帳號移除 {name}?它將無法再連線你的電腦。',
|
|
1397
|
+
'ta.myDevices.signOut': '登出帳號',
|
|
1398
|
+
'ta.myDevices.signOutConfirm': '登出帳號?帳號帶來的電腦會從這台裝置移除,掃碼連線的保留。',
|
|
1399
|
+
'ta.myDevices.signOutConfirmComputer': '登出帳號?帳號帶來的裝置將無法再連線這台電腦。',
|
|
1400
|
+
'ta.myDevices.none': '目前只有這台裝置。在其他電腦和手機上登入同一個帳號即可。',
|
|
1401
|
+
'ta.myDevices.open': '開啟',
|
|
1402
|
+
'ta.myDevices.signInAccount': '用帳號登入',
|
|
1339
1403
|
'ta.hosts.scan': '掃碼連線',
|
|
1340
1404
|
'ta.hosts.scanShort': '掃一掃',
|
|
1341
1405
|
'ta.hosts.paste': '貼上連結',
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { type TaLanguage } from '@celljs/ta-protocol';
|
|
2
|
-
import { JA_MESSAGES } from './messages-ja.js';
|
|
3
|
-
import { ZH_TW_MESSAGES } from './messages-zh-tw.js';
|
|
4
1
|
/** The messages of the web client, in ICU format. English is the source and the fallback. */
|
|
5
2
|
export declare const EN_MESSAGES: {
|
|
6
3
|
'ta.dismiss': string;
|
|
@@ -380,6 +377,36 @@ export declare const EN_MESSAGES: {
|
|
|
380
377
|
'ta.console.manage': string;
|
|
381
378
|
'ta.console.sandbox': string;
|
|
382
379
|
'ta.console.about': string;
|
|
380
|
+
'ta.console.updatesAvailable': string;
|
|
381
|
+
'ta.console.updateAll': string;
|
|
382
|
+
'ta.console.updateAllConfirm': string;
|
|
383
|
+
'ta.console.updateAllDetail': string;
|
|
384
|
+
'ta.console.updatingProgress': string;
|
|
385
|
+
'ta.console.update': string;
|
|
386
|
+
'ta.console.updateConfirm': string;
|
|
387
|
+
'ta.console.updateDetail': string;
|
|
388
|
+
'ta.console.updateWorking': string;
|
|
389
|
+
'ta.console.rollback': string;
|
|
390
|
+
'ta.console.rollbackConfirm': string;
|
|
391
|
+
'ta.console.rollbackDetail': string;
|
|
392
|
+
'ta.console.version': string;
|
|
393
|
+
'ta.console.updatable': string;
|
|
394
|
+
'ta.console.updates': string;
|
|
395
|
+
'ta.console.updatesHint': string;
|
|
396
|
+
'ta.console.updateMode': string;
|
|
397
|
+
'ta.console.updateIdle': string;
|
|
398
|
+
'ta.console.updateIdleHint': string;
|
|
399
|
+
'ta.console.updateManual': string;
|
|
400
|
+
'ta.console.updateManualHint': string;
|
|
401
|
+
'ta.console.checkUpdates': string;
|
|
402
|
+
'ta.console.checked': string;
|
|
403
|
+
'ta.console.auditUpdate': string;
|
|
404
|
+
'ta.console.auditUpdateAll': string;
|
|
405
|
+
'ta.console.auditRollback': string;
|
|
406
|
+
'ta.console.auditUpdatePolicy': string;
|
|
407
|
+
'ta.environment.newVersion': string;
|
|
408
|
+
'ta.environment.newVersionIdle': string;
|
|
409
|
+
'ta.environment.newVersionManual': string;
|
|
383
410
|
'ta.access.title': string;
|
|
384
411
|
'ta.access.bind': string;
|
|
385
412
|
'ta.access.bindHint': string;
|
|
@@ -635,6 +662,15 @@ export declare const EN_MESSAGES: {
|
|
|
635
662
|
'ta.assistant.rename': string;
|
|
636
663
|
'ta.assistant.prompt': string;
|
|
637
664
|
'ta.assistant.look': string;
|
|
665
|
+
'ta.picture.title': string;
|
|
666
|
+
'ta.picture.hint': string;
|
|
667
|
+
'ta.picture.choose': string;
|
|
668
|
+
'ta.picture.draw': string;
|
|
669
|
+
'ta.picture.reset': string;
|
|
670
|
+
'ta.picture.drawPlaceholder': string;
|
|
671
|
+
'ta.picture.drawSend': string;
|
|
672
|
+
'ta.picture.tooLarge': string;
|
|
673
|
+
'ta.picture.drawPrompt': string;
|
|
638
674
|
'ta.look.title': string;
|
|
639
675
|
'ta.look.species': string;
|
|
640
676
|
'ta.look.gait': string;
|
|
@@ -1339,6 +1375,31 @@ export declare const EN_MESSAGES: {
|
|
|
1339
1375
|
'ta.auth.hintRemote': string;
|
|
1340
1376
|
'ta.auth.later': string;
|
|
1341
1377
|
'ta.hosts.title': string;
|
|
1378
|
+
'ta.myDevices.title': string;
|
|
1379
|
+
'ta.myDevices.hint': string;
|
|
1380
|
+
'ta.myDevices.signInWith': string;
|
|
1381
|
+
'ta.myDevices.enterCode': string;
|
|
1382
|
+
'ta.myDevices.openProvider': string;
|
|
1383
|
+
'ta.myDevices.waitingTitle': string;
|
|
1384
|
+
'ta.myDevices.waitingHint': string;
|
|
1385
|
+
'ta.myDevices.askTitle': string;
|
|
1386
|
+
'ta.myDevices.askHint': string;
|
|
1387
|
+
'ta.myDevices.code': string;
|
|
1388
|
+
'ta.myDevices.allow': string;
|
|
1389
|
+
'ta.myDevices.notMe': string;
|
|
1390
|
+
'ta.myDevices.later': string;
|
|
1391
|
+
'ta.myDevices.thisDevice': string;
|
|
1392
|
+
'ta.myDevices.online': string;
|
|
1393
|
+
'ta.myDevices.seen': string;
|
|
1394
|
+
'ta.myDevices.waiting': string;
|
|
1395
|
+
'ta.myDevices.remove': string;
|
|
1396
|
+
'ta.myDevices.removeConfirm': string;
|
|
1397
|
+
'ta.myDevices.signOut': string;
|
|
1398
|
+
'ta.myDevices.signOutConfirm': string;
|
|
1399
|
+
'ta.myDevices.signOutConfirmComputer': string;
|
|
1400
|
+
'ta.myDevices.none': string;
|
|
1401
|
+
'ta.myDevices.open': string;
|
|
1402
|
+
'ta.myDevices.signInAccount': string;
|
|
1342
1403
|
'ta.hosts.scan': string;
|
|
1343
1404
|
'ta.hosts.scanShort': string;
|
|
1344
1405
|
'ta.hosts.paste': string;
|
|
@@ -1452,10 +1513,11 @@ export declare const EN_MESSAGES: {
|
|
|
1452
1513
|
};
|
|
1453
1514
|
export type MessageId = keyof typeof EN_MESSAGES;
|
|
1454
1515
|
export declare const ZH_MESSAGES: Record<MessageId, string>;
|
|
1455
|
-
|
|
1456
|
-
/** The messages of
|
|
1457
|
-
export declare
|
|
1458
|
-
/** The messages of a language
|
|
1459
|
-
export declare function
|
|
1516
|
+
type Messages = Record<MessageId, string>;
|
|
1517
|
+
/** The messages of a language of the settings (`zh-CN`, `zh-TW`, `ja-JP`), English for another and until loaded. */
|
|
1518
|
+
export declare function messagesOf(language: string): Messages;
|
|
1519
|
+
/** The messages of a language, loaded once; English for a language that fails to load. */
|
|
1520
|
+
export declare function loadMessages(language: string): Promise<Messages>;
|
|
1460
1521
|
/** A message outside React, in a language of the settings. */
|
|
1461
1522
|
export declare function message(language: string, id: MessageId): string;
|
|
1523
|
+
export {};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { TaLanguageUtil } from '@celljs/ta-protocol';
|
|
2
|
-
import { JA_MESSAGES } from './messages-ja.js';
|
|
3
|
-
import { ZH_TW_MESSAGES } from './messages-zh-tw.js';
|
|
4
2
|
/** The messages of the web client, in ICU format. English is the source and the fallback. */
|
|
5
3
|
export const EN_MESSAGES = {
|
|
6
4
|
'ta.dismiss': 'Dismiss',
|
|
@@ -384,6 +382,36 @@ export const EN_MESSAGES = {
|
|
|
384
382
|
'ta.console.manage': 'Manage',
|
|
385
383
|
'ta.console.sandbox': 'Sandbox',
|
|
386
384
|
'ta.console.about': 'About',
|
|
385
|
+
'ta.console.updatesAvailable': '{count, plural, one {# Ta runs} other {# Ta run}} a version older than {version}',
|
|
386
|
+
'ta.console.updateAll': 'Update all',
|
|
387
|
+
'ta.console.updateAllConfirm': 'Update {count, plural, one {# Ta} other {# Ta}} to {version}?',
|
|
388
|
+
'ta.console.updateAllDetail': 'One after another: each stops, starts on the new version and goes on with what it was doing. One that does not start goes back to its version, and the rest wait.',
|
|
389
|
+
'ta.console.updatingProgress': 'Updating {done} of {total}',
|
|
390
|
+
'ta.console.update': 'Update',
|
|
391
|
+
'ta.console.updateConfirm': 'Update the Ta of {account} to {version}?',
|
|
392
|
+
'ta.console.updateDetail': 'It stops and starts on the new version, and what it was doing goes on. If it does not start, it goes back to its version.',
|
|
393
|
+
'ta.console.updateWorking': '{count, plural, one {# conversation is} other {# conversations are}} at work: they pause and go on once it starts.',
|
|
394
|
+
'ta.console.rollback': 'Go back to {version}',
|
|
395
|
+
'ta.console.rollbackConfirm': 'Take the Ta of {account} back to {version}?',
|
|
396
|
+
'ta.console.rollbackDetail': 'It restarts on the version before, and stays on it until it is updated by hand.',
|
|
397
|
+
'ta.console.version': 'Version',
|
|
398
|
+
'ta.console.updatable': 'Update ready',
|
|
399
|
+
'ta.console.updates': 'Updates',
|
|
400
|
+
'ta.console.updatesHint': 'A Ta that starts runs the latest version; one that does not start goes back to the version before by itself.',
|
|
401
|
+
'ta.console.updateMode': 'Running Ta',
|
|
402
|
+
'ta.console.updateIdle': 'Update when idle',
|
|
403
|
+
'ta.console.updateIdleHint': 'Once no conversation is at work and nothing happened for 10 minutes',
|
|
404
|
+
'ta.console.updateManual': 'Update by hand',
|
|
405
|
+
'ta.console.updateManualHint': 'When Update is tapped on its account page',
|
|
406
|
+
'ta.console.checkUpdates': 'Check for a new version',
|
|
407
|
+
'ta.console.checked': '{count, plural, =0 {Every Ta runs the latest version} one {# Ta can be updated} other {# Ta can be updated}}',
|
|
408
|
+
'ta.console.auditUpdate': 'updated',
|
|
409
|
+
'ta.console.auditUpdateAll': 'updated every Ta',
|
|
410
|
+
'ta.console.auditRollback': 'took back',
|
|
411
|
+
'ta.console.auditUpdatePolicy': 'changed when Ta updates',
|
|
412
|
+
'ta.environment.newVersion': 'New version {version}',
|
|
413
|
+
'ta.environment.newVersionIdle': 'It updates by itself once idle; update now, and what runs pauses and goes on after.',
|
|
414
|
+
'ta.environment.newVersionManual': 'Update now: what runs pauses and goes on after.',
|
|
387
415
|
'ta.access.title': 'Access',
|
|
388
416
|
'ta.access.bind': 'Sign in with your account',
|
|
389
417
|
'ta.access.bindHint': 'Lets in the account you sign in with, so that it signs you in next time, on any device.',
|
|
@@ -639,6 +667,15 @@ export const EN_MESSAGES = {
|
|
|
639
667
|
'ta.assistant.rename': 'Rename',
|
|
640
668
|
'ta.assistant.prompt': 'System prompt',
|
|
641
669
|
'ta.assistant.look': 'Look',
|
|
670
|
+
'ta.picture.title': 'My picture',
|
|
671
|
+
'ta.picture.hint': 'What others see of you in group chats and among friends. Your double stays a dinosaur.',
|
|
672
|
+
'ta.picture.choose': 'Choose or take a photo',
|
|
673
|
+
'ta.picture.draw': 'Have Ta draw one',
|
|
674
|
+
'ta.picture.reset': 'Back to the dinosaur',
|
|
675
|
+
'ta.picture.drawPlaceholder': 'What should it be? e.g. a shiba in headphones',
|
|
676
|
+
'ta.picture.drawSend': 'Draw it',
|
|
677
|
+
'ta.picture.tooLarge': 'This photo cannot be made small enough. Try another.',
|
|
678
|
+
'ta.picture.drawPrompt': 'Draw me a picture that others see of me in group chats and among friends: {what}. A square of 256 × 256, the subject in the middle, no text; an SVG or a PNG of 11 KB at most. Show it to me and wait: only once I say it is good, set it with `ta call @celljs/ta-rooms picture /the/absolute/path/of/it`; if I want changes, draw it again first.',
|
|
642
679
|
'ta.look.title': 'Look of the double',
|
|
643
680
|
'ta.look.species': 'Dinosaur',
|
|
644
681
|
'ta.look.gait': 'Walk',
|
|
@@ -1347,6 +1384,31 @@ export const EN_MESSAGES = {
|
|
|
1347
1384
|
'ta.auth.hintRemote': 'Credentials stay on the machine that runs Ta.',
|
|
1348
1385
|
'ta.auth.later': 'Later',
|
|
1349
1386
|
'ta.hosts.title': 'Computers',
|
|
1387
|
+
'ta.myDevices.title': 'Account & devices',
|
|
1388
|
+
'ta.myDevices.hint': 'Sign in to one account on your computers and phone: they show up on each other, no code to scan.',
|
|
1389
|
+
'ta.myDevices.signInWith': 'Sign in with {name}',
|
|
1390
|
+
'ta.myDevices.enterCode': 'Enter this code on {name}',
|
|
1391
|
+
'ta.myDevices.openProvider': 'Open {name}',
|
|
1392
|
+
'ta.myDevices.waitingTitle': 'Waiting for your other device',
|
|
1393
|
+
'ta.myDevices.waitingHint': 'On a computer or phone signed in to this account, tap Allow. Check the code is the same.',
|
|
1394
|
+
'ta.myDevices.askTitle': '{name} wants to join your devices',
|
|
1395
|
+
'ta.myDevices.askHint': 'Allow only if it is yours and shows the same code.',
|
|
1396
|
+
'ta.myDevices.code': 'Code {code}',
|
|
1397
|
+
'ta.myDevices.allow': 'Allow',
|
|
1398
|
+
'ta.myDevices.notMe': 'Not mine',
|
|
1399
|
+
'ta.myDevices.later': 'Later',
|
|
1400
|
+
'ta.myDevices.thisDevice': 'This device',
|
|
1401
|
+
'ta.myDevices.online': 'Online',
|
|
1402
|
+
'ta.myDevices.seen': 'Online {time}',
|
|
1403
|
+
'ta.myDevices.waiting': 'Waiting to be allowed',
|
|
1404
|
+
'ta.myDevices.remove': 'Remove',
|
|
1405
|
+
'ta.myDevices.removeConfirm': 'Remove {name} from your account? It can no longer reach your computers.',
|
|
1406
|
+
'ta.myDevices.signOut': 'Sign out',
|
|
1407
|
+
'ta.myDevices.signOutConfirm': 'Sign out of the account? The computers it added leave this device; those you scanned stay.',
|
|
1408
|
+
'ta.myDevices.signOutConfirmComputer': 'Sign out of the account? The devices it added can no longer reach this computer.',
|
|
1409
|
+
'ta.myDevices.none': 'Only this device so far. Sign in to the same account on your other computers and phone.',
|
|
1410
|
+
'ta.myDevices.open': 'Open',
|
|
1411
|
+
'ta.myDevices.signInAccount': 'Sign in with an account',
|
|
1350
1412
|
'ta.hosts.scan': 'Scan to connect',
|
|
1351
1413
|
'ta.hosts.scanShort': 'Scan',
|
|
1352
1414
|
'ta.hosts.paste': 'Paste a link',
|
|
@@ -1836,6 +1898,36 @@ export const ZH_MESSAGES = {
|
|
|
1836
1898
|
'ta.console.manage': '管理',
|
|
1837
1899
|
'ta.console.sandbox': '沙箱',
|
|
1838
1900
|
'ta.console.about': '基本信息',
|
|
1901
|
+
'ta.console.updatesAvailable': '{count} 台 Ta 可以更新到 {version}',
|
|
1902
|
+
'ta.console.updateAll': '全部更新',
|
|
1903
|
+
'ta.console.updateAllConfirm': '把 {count} 台 Ta 更新到 {version}?',
|
|
1904
|
+
'ta.console.updateAllDetail': '一台接一台地更新:先停下,再用新版本启动,之前在做的事会接着做。有一台起不来时,它会自动回到原来的版本,其余的不再更新。',
|
|
1905
|
+
'ta.console.updatingProgress': '正在更新 {done}/{total}',
|
|
1906
|
+
'ta.console.update': '更新',
|
|
1907
|
+
'ta.console.updateConfirm': '把 {account} 的 Ta 更新到 {version}?',
|
|
1908
|
+
'ta.console.updateDetail': '会先停下,再用新版本启动,之前在做的事会接着做;起不来会自动回到原来的版本。',
|
|
1909
|
+
'ta.console.updateWorking': '有 {count} 个对话正在进行,会暂停,启动后接着做。',
|
|
1910
|
+
'ta.console.rollback': '回到上一版({version})',
|
|
1911
|
+
'ta.console.rollbackConfirm': '把 {account} 的 Ta 回到 {version}?',
|
|
1912
|
+
'ta.console.rollbackDetail': '会用上一版重新启动,之后不会再自动更新到这个版本,直到手动更新。',
|
|
1913
|
+
'ta.console.version': '版本',
|
|
1914
|
+
'ta.console.updatable': '可更新',
|
|
1915
|
+
'ta.console.updates': '更新',
|
|
1916
|
+
'ta.console.updatesHint': '新启动的 Ta 都用最新版本;起不来时会自动回到原来的版本。',
|
|
1917
|
+
'ta.console.updateMode': '运行中的 Ta',
|
|
1918
|
+
'ta.console.updateIdle': '空闲时自动更新',
|
|
1919
|
+
'ta.console.updateIdleHint': '没有对话在进行、10 分钟没有动静时',
|
|
1920
|
+
'ta.console.updateManual': '手动更新',
|
|
1921
|
+
'ta.console.updateManualHint': '在账号页点“更新”时',
|
|
1922
|
+
'ta.console.checkUpdates': '检查新版本',
|
|
1923
|
+
'ta.console.checked': '{count, plural, =0 {所有 Ta 都是最新版本} other {# 台 Ta 可以更新}}',
|
|
1924
|
+
'ta.console.auditUpdate': '更新了',
|
|
1925
|
+
'ta.console.auditUpdateAll': '更新了全部 Ta',
|
|
1926
|
+
'ta.console.auditRollback': '回退了',
|
|
1927
|
+
'ta.console.auditUpdatePolicy': '修改了更新方式',
|
|
1928
|
+
'ta.environment.newVersion': '有新版本 {version}',
|
|
1929
|
+
'ta.environment.newVersionIdle': '空闲时会自动更新;也可以现在更新,正在做的事会暂停后接着做。',
|
|
1930
|
+
'ta.environment.newVersionManual': '现在更新,正在做的事会暂停后接着做。',
|
|
1839
1931
|
'ta.access.title': '访问',
|
|
1840
1932
|
'ta.access.bind': '用你的账号登录',
|
|
1841
1933
|
'ta.access.bindHint': '允许你登录用的这个账号,以后在任何设备上都能用它登录。',
|
|
@@ -2091,6 +2183,15 @@ export const ZH_MESSAGES = {
|
|
|
2091
2183
|
'ta.assistant.rename': '重命名',
|
|
2092
2184
|
'ta.assistant.prompt': '系统提示词',
|
|
2093
2185
|
'ta.assistant.look': '形象',
|
|
2186
|
+
'ta.picture.title': '我的头像',
|
|
2187
|
+
'ta.picture.hint': '群聊和好友里别人看到的你,分身仍是恐龙。',
|
|
2188
|
+
'ta.picture.choose': '从相册选择或拍照',
|
|
2189
|
+
'ta.picture.draw': '让 Ta 画一个',
|
|
2190
|
+
'ta.picture.reset': '换回恐龙',
|
|
2191
|
+
'ta.picture.drawPlaceholder': '画成什么样?比如:戴耳机的柴犬',
|
|
2192
|
+
'ta.picture.drawSend': '开始画',
|
|
2193
|
+
'ta.picture.tooLarge': '这张照片压不到够小,换一张试试。',
|
|
2194
|
+
'ta.picture.drawPrompt': '给我画一个头像,别人在群聊和好友里看到的就是它:{what}。正方形 256 × 256,主体居中,不要文字;SVG 或 PNG,11 KB 以内。画好先给我看,等我说好了再用 `ta call @celljs/ta-rooms picture /文件的绝对路径` 设成我的头像;我要改就先改好再给我看。',
|
|
2094
2195
|
'ta.look.title': '分身形象',
|
|
2095
2196
|
'ta.look.species': '恐龙',
|
|
2096
2197
|
'ta.look.gait': '走路',
|
|
@@ -2797,6 +2898,31 @@ export const ZH_MESSAGES = {
|
|
|
2797
2898
|
'ta.auth.hintRemote': '凭据只保存在运行 Ta 的机器上。',
|
|
2798
2899
|
'ta.auth.later': '稍后再说',
|
|
2799
2900
|
'ta.hosts.title': '电脑',
|
|
2901
|
+
'ta.myDevices.title': '账号与设备',
|
|
2902
|
+
'ta.myDevices.hint': '电脑和手机登录同一个账号,彼此自动出现,不用扫码。',
|
|
2903
|
+
'ta.myDevices.signInWith': '使用 {name} 登录',
|
|
2904
|
+
'ta.myDevices.enterCode': '在 {name} 输入这串码',
|
|
2905
|
+
'ta.myDevices.openProvider': '打开 {name}',
|
|
2906
|
+
'ta.myDevices.waitingTitle': '等待你的其他设备允许',
|
|
2907
|
+
'ta.myDevices.waitingHint': '在已登录这个账号的电脑或手机上点「允许」,核对码要一致。',
|
|
2908
|
+
'ta.myDevices.askTitle': '{name} 想加入你的设备',
|
|
2909
|
+
'ta.myDevices.askHint': '确认是你自己的设备、核对码一致再允许。',
|
|
2910
|
+
'ta.myDevices.code': '核对码 {code}',
|
|
2911
|
+
'ta.myDevices.allow': '允许',
|
|
2912
|
+
'ta.myDevices.notMe': '不是我',
|
|
2913
|
+
'ta.myDevices.later': '稍后',
|
|
2914
|
+
'ta.myDevices.thisDevice': '这台设备',
|
|
2915
|
+
'ta.myDevices.online': '在线',
|
|
2916
|
+
'ta.myDevices.seen': '{time}在线',
|
|
2917
|
+
'ta.myDevices.waiting': '等待允许',
|
|
2918
|
+
'ta.myDevices.remove': '移除',
|
|
2919
|
+
'ta.myDevices.removeConfirm': '从账号移除 {name}?它将无法再连接你的电脑。',
|
|
2920
|
+
'ta.myDevices.signOut': '退出账号',
|
|
2921
|
+
'ta.myDevices.signOutConfirm': '退出账号?账号带来的电脑会从这台设备移除,扫码连接的保留。',
|
|
2922
|
+
'ta.myDevices.signOutConfirmComputer': '退出账号?账号带来的设备将无法再连接这台电脑。',
|
|
2923
|
+
'ta.myDevices.none': '目前只有这台设备。在其他电脑和手机上登录同一个账号即可。',
|
|
2924
|
+
'ta.myDevices.open': '打开',
|
|
2925
|
+
'ta.myDevices.signInAccount': '用账号登录',
|
|
2800
2926
|
'ta.hosts.scan': '扫码连接',
|
|
2801
2927
|
'ta.hosts.scanShort': '扫一扫',
|
|
2802
2928
|
'ta.hosts.paste': '粘贴链接',
|
|
@@ -2908,17 +3034,41 @@ export const ZH_MESSAGES = {
|
|
|
2908
3034
|
'ta.settings.cwdDescription': '新对话、终端和分身派出的任务在这里打开;已有的对话留在各自的目录:{path}',
|
|
2909
3035
|
'ta.workingDirectory.changed': '默认目录已改为 {path}',
|
|
2910
3036
|
};
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
'
|
|
2917
|
-
'ja-JP': JA_MESSAGES,
|
|
3037
|
+
/**
|
|
3038
|
+
* Traditional Chinese and Japanese are chunks of their own, loaded by {@link loadMessages} as the language is chosen
|
|
3039
|
+
* (the Locale of each, through LocaleManager): together they made the first code of the page 170 KB larger.
|
|
3040
|
+
*/
|
|
3041
|
+
const LOADERS = {
|
|
3042
|
+
'zh-TW': () => import('./messages-zh-tw.js').then(module => module.ZH_TW_MESSAGES),
|
|
3043
|
+
'ja-JP': () => import('./messages-ja.js').then(module => module.JA_MESSAGES),
|
|
2918
3044
|
};
|
|
2919
|
-
|
|
3045
|
+
const loaded = { 'zh-CN': ZH_MESSAGES, 'en-US': EN_MESSAGES };
|
|
3046
|
+
const loading = new Map();
|
|
3047
|
+
/** The messages of a language of the settings (`zh-CN`, `zh-TW`, `ja-JP`), English for another and until loaded. */
|
|
2920
3048
|
export function messagesOf(language) {
|
|
2921
|
-
|
|
3049
|
+
var _a;
|
|
3050
|
+
return (_a = loaded[TaLanguageUtil.of(language)]) !== null && _a !== void 0 ? _a : EN_MESSAGES;
|
|
3051
|
+
}
|
|
3052
|
+
/** The messages of a language, loaded once; English for a language that fails to load. */
|
|
3053
|
+
export function loadMessages(language) {
|
|
3054
|
+
const lang = TaLanguageUtil.of(language);
|
|
3055
|
+
const load = LOADERS[lang];
|
|
3056
|
+
if (loaded[lang] || !load) {
|
|
3057
|
+
return Promise.resolve(messagesOf(lang));
|
|
3058
|
+
}
|
|
3059
|
+
let messages = loading.get(lang);
|
|
3060
|
+
if (!messages) {
|
|
3061
|
+
messages = load().then(done => {
|
|
3062
|
+
loaded[lang] = done;
|
|
3063
|
+
return done;
|
|
3064
|
+
}, error => {
|
|
3065
|
+
loading.delete(lang);
|
|
3066
|
+
console.error(`The messages of ${lang} failed to load: ${error instanceof Error ? error.message : error}`);
|
|
3067
|
+
return EN_MESSAGES;
|
|
3068
|
+
});
|
|
3069
|
+
loading.set(lang, messages);
|
|
3070
|
+
}
|
|
3071
|
+
return messages;
|
|
2922
3072
|
}
|
|
2923
3073
|
/** A message outside React, in a language of the settings. */
|
|
2924
3074
|
export function message(language, id) {
|
|
@@ -10,14 +10,15 @@ function useIntl() {
|
|
|
10
10
|
var _a;
|
|
11
11
|
return (_a = React.useContext(IntlContext)) !== null && _a !== void 0 ? _a : english();
|
|
12
12
|
}
|
|
13
|
+
/** By the messages, not the language: those of Japanese and Traditional Chinese are English until loaded. */
|
|
13
14
|
const intls = new Map();
|
|
14
15
|
/** The messages of a language outside of React: for what services say, in the words of the page. */
|
|
15
16
|
export function translator(language) {
|
|
16
|
-
|
|
17
|
+
const messages = messagesOf(language);
|
|
18
|
+
let intl = intls.get(messages);
|
|
17
19
|
if (!intl) {
|
|
18
|
-
const messages = messagesOf(language);
|
|
19
20
|
intl = messages === EN_MESSAGES ? english() : createIntl({ locale: language, messages });
|
|
20
|
-
intls.set(
|
|
21
|
+
intls.set(messages, intl);
|
|
21
22
|
}
|
|
22
23
|
const shape = intl;
|
|
23
24
|
return (id, values) => shape.formatMessage({ id, defaultMessage: EN_MESSAGES[id] }, values);
|
|
@@ -94,9 +94,11 @@ let TaSettingsImpl = class TaSettingsImpl {
|
|
|
94
94
|
document.head.appendChild(meta);
|
|
95
95
|
}
|
|
96
96
|
meta.content = THEME_COLORS[state.theme].main;
|
|
97
|
+
// Even the current one: a language whose messages still load (Japanese, Traditional Chinese) is selected once
|
|
98
|
+
// they are there, unless another is asked for meanwhile.
|
|
97
99
|
void this.localeManager.get().then(locales => {
|
|
98
100
|
const locale = locales.find(candidate => candidate.lang === state.language);
|
|
99
|
-
if (locale
|
|
101
|
+
if (locale) {
|
|
100
102
|
this.localeManager.setCurrent(locale);
|
|
101
103
|
}
|
|
102
104
|
});
|