@celljs/ta-web 4.19.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/assistant/assistant-chat-list.js +2 -1
- package/esm/browser/components/account-menu.js +3 -1
- package/esm/browser/components/app-view.js +2 -2
- package/esm/browser/components/cloud-sign-in-view.d.ts +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 +1 -1
- package/esm/browser/components/picture-dialog.d.ts +18 -0
- package/esm/browser/components/picture-dialog.js +116 -0
- 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/i18n/locales.d.ts +44 -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 +39 -0
- package/esm/browser/i18n/messages-zh-tw.js +39 -0
- package/esm/browser/i18n/messages.d.ts +45 -8
- package/esm/browser/i18n/messages.js +111 -11
- package/esm/browser/i18n/use-t.js +4 -3
- package/esm/browser/settings/settings.js +3 -1
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +5 -0
- 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/lib/browser/assistant/assistant-chat-list.js +2 -1
- package/lib/browser/components/account-menu.js +2 -0
- package/lib/browser/components/app-view.js +1 -1
- package/lib/browser/components/cloud-sign-in-view.d.ts +1 -1
- 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 +1 -1
- package/lib/browser/components/picture-dialog.d.ts +19 -0
- package/lib/browser/components/picture-dialog.js +153 -0
- 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/i18n/locales.d.ts +44 -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 +39 -0
- package/lib/browser/i18n/messages-zh-tw.js +39 -0
- package/lib/browser/i18n/messages.d.ts +45 -8
- package/lib/browser/i18n/messages.js +113 -13
- package/lib/browser/i18n/use-t.js +4 -3
- package/lib/browser/settings/settings.js +3 -1
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +5 -0
- 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/package.json +7 -7
|
@@ -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': '歩き方',
|
|
@@ -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': '走路',
|
|
@@ -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;
|
|
@@ -1477,10 +1513,11 @@ export declare const EN_MESSAGES: {
|
|
|
1477
1513
|
};
|
|
1478
1514
|
export type MessageId = keyof typeof EN_MESSAGES;
|
|
1479
1515
|
export declare const ZH_MESSAGES: Record<MessageId, string>;
|
|
1480
|
-
|
|
1481
|
-
/** The messages of
|
|
1482
|
-
export declare
|
|
1483
|
-
/** The messages of a language
|
|
1484
|
-
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>;
|
|
1485
1521
|
/** A message outside React, in a language of the settings. */
|
|
1486
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',
|
|
@@ -1861,6 +1898,36 @@ export const ZH_MESSAGES = {
|
|
|
1861
1898
|
'ta.console.manage': '管理',
|
|
1862
1899
|
'ta.console.sandbox': '沙箱',
|
|
1863
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': '现在更新,正在做的事会暂停后接着做。',
|
|
1864
1931
|
'ta.access.title': '访问',
|
|
1865
1932
|
'ta.access.bind': '用你的账号登录',
|
|
1866
1933
|
'ta.access.bindHint': '允许你登录用的这个账号,以后在任何设备上都能用它登录。',
|
|
@@ -2116,6 +2183,15 @@ export const ZH_MESSAGES = {
|
|
|
2116
2183
|
'ta.assistant.rename': '重命名',
|
|
2117
2184
|
'ta.assistant.prompt': '系统提示词',
|
|
2118
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 /文件的绝对路径` 设成我的头像;我要改就先改好再给我看。',
|
|
2119
2195
|
'ta.look.title': '分身形象',
|
|
2120
2196
|
'ta.look.species': '恐龙',
|
|
2121
2197
|
'ta.look.gait': '走路',
|
|
@@ -2958,17 +3034,41 @@ export const ZH_MESSAGES = {
|
|
|
2958
3034
|
'ta.settings.cwdDescription': '新对话、终端和分身派出的任务在这里打开;已有的对话留在各自的目录:{path}',
|
|
2959
3035
|
'ta.workingDirectory.changed': '默认目录已改为 {path}',
|
|
2960
3036
|
};
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
'
|
|
2967
|
-
'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),
|
|
2968
3044
|
};
|
|
2969
|
-
|
|
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. */
|
|
2970
3048
|
export function messagesOf(language) {
|
|
2971
|
-
|
|
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;
|
|
2972
3072
|
}
|
|
2973
3073
|
/** A message outside React, in a language of the settings. */
|
|
2974
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
|
});
|