Skip to content

Commit

Permalink
perf: 优化国际化、优化显示
Browse files Browse the repository at this point in the history
  • Loading branch information
kuaifan committed Oct 24, 2024
1 parent 6b4b88a commit 1f6ef62
Show file tree
Hide file tree
Showing 31 changed files with 229 additions and 44 deletions.
9 changes: 0 additions & 9 deletions app/Models/Report.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,6 @@ public function sendUser()
return $this->hasOne(User::class, "userid", "userid");
}

public function getTypeAttribute($value): string
{
return match ($value) {
Report::WEEKLY => "周报",
Report::DAILY => "日报",
default => "",
};
}

public function getContentAttribute($value): string
{
return htmlspecialchars_decode($value);
Expand Down
2 changes: 1 addition & 1 deletion app/Models/WebSocketDialogMsg.php
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ public function previewMsg($preserveHtml = false, $data = null)
return "[{$action}] {$this->previewMsg(false, $data['msg']['data'])}";

case 'notice':
return $data['msg']['notice'];
return Doo::translate($data['msg']['notice']);

case 'template':
return $this->previewTemplateMsg($data['msg']);
Expand Down
4 changes: 4 additions & 0 deletions app/Module/Extranet.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,10 @@ public static function checkinBotQuickMsg($type): string
$text = "心灵鸡汤:{$data}";
}
break;

default:
$text = "";
break;
}
return $text;
}
Expand Down
15 changes: 15 additions & 0 deletions language/original-web.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1702,3 +1702,18 @@ WiFi签到延迟时长为±1分钟。
手动签到
签到备注
重复打卡提醒

你确定要退出项目【(*)】吗?
你确定要退出【(*)】共享成员吗?
请输入状态名称
当前项目还没有创建工作流
创建工作流
流转到【(*)】时改变任务负责人为状态负责人,原本的任务负责人移至协助人员。
选择群组
输入关键词搜索群
仅支持选择个人群转为部门群
含有子部门无法修改上级部门
删除部门
你确定要删除【(*)】部门吗?
注意:此操作不可恢复,部门下的成员将移至默认部门。
维护中...
170 changes: 163 additions & 7 deletions language/translate.json
Original file line number Diff line number Diff line change
Expand Up @@ -19743,13 +19743,13 @@
"key": "含有子部门无法修改上级部门",
"zh": "",
"zh-CHT": "含有子部門無法修改上級部門",
"en": "Cannot modify parent department with sub-departments",
"ko": "하위 부서가 있는 상위 부서를 수정할 수 없습니다",
"ja": "サブ部門がある上位部門を変更できません",
"de": "Übergeordnete Abteilung mit Unterabteilungen kann nicht geändert werden",
"fr": "Impossible de modifier le département parent avec des sous-départements",
"id": "Tidak dapat mengubah departemen induk dengan sub-departemen",
"ru": "Невозможно изменить родительский отдел с подотделами"
"en": "Cannot modify parent department when subdepartments exist",
"ko": "하위 부서가 있는 경우 상위 부서를 수정할 수 없습니다",
"ja": "子部門がある場合、上位部門を変更できません",
"de": "Übergeordnete Abteilung kann nicht geändert werden, wenn Unterabteilungen vorhanden sind",
"fr": "Impossible de modifier le département parent lorsqu'il existe des sous-départements",
"id": "Tidak dapat mengubah departemen induk ketika terdapat subdepartemen",
"ru": "Невозможно изменить родительский отдел при наличии подотделов"
},
{
"key": "请选择正确的部门负责人",
Expand Down Expand Up @@ -24766,5 +24766,161 @@
"fr": "Rappel de pointage en double",
"id": "Pengingat Check-in Duplikat",
"ru": "Напоминание о дублирующем входе"
},
{
"key": "你确定要退出项目【(*)】吗?",
"zh": "",
"zh-CHT": "你確定要退出項目【(*)】嗎?",
"en": "Are you sure you want to exit the project 【(*)】?",
"ko": "프로젝트 【(*)】에서 나가시겠습니까?",
"ja": "プロジェクト【(*)】から退出してもよろしいですか?",
"de": "Sind Sie sicher, dass Sie das Projekt 【(*)】 verlassen möchten?",
"fr": "Êtes-vous sûr de vouloir quitter le projet 【(*)】 ?",
"id": "Apakah Anda yakin ingin keluar dari proyek 【(*)】?",
"ru": "Вы уверены, что хотите выйти из проекта 【(*)】?"
},
{
"key": "你确定要退出【(*)】共享成员吗?",
"zh": "",
"zh-CHT": "你確定要退出【(*)】共享成員嗎?",
"en": "Are you sure you want to leave the shared membership of 【(*)】?",
"ko": "【(*)】 공유 멤버에서 나가시겠습니까?",
"ja": "【(*)】の共有メンバーから退出してもよろしいですか?",
"de": "Sind Sie sicher, dass Sie die gemeinsame Mitgliedschaft von 【(*)】 verlassen möchten?",
"fr": "Êtes-vous sûr de vouloir quitter le statut de membre partagé de 【(*)】 ?",
"id": "Apakah Anda yakin ingin keluar dari keanggotaan bersama 【(*)】?",
"ru": "Вы уверены, что хотите выйти из общего членства 【(*)】?"
},
{
"key": "请输入状态名称",
"zh": "",
"zh-CHT": "請輸入狀態名稱",
"en": "Please enter the status name",
"ko": "상태 이름을 입력해주세요",
"ja": "ステータス名を入力してください",
"de": "Bitte geben Sie den Statusnamen ein",
"fr": "Veuillez saisir le nom du statut",
"id": "Silakan masukkan nama status",
"ru": "Пожалуйста, введите название статуса"
},
{
"key": "当前项目还没有创建工作流",
"zh": "",
"zh-CHT": "當前項目還沒有創建工作流",
"en": "No workflow has been created for the current project yet",
"ko": "현재 프로젝트에 아직 워크플로우가 생성되지 않았습니다",
"ja": "現在のプロジェクトにはまだワークフローが作成されていません",
"de": "Für das aktuelle Projekt wurde noch kein Workflow erstellt",
"fr": "Aucun flux de travail n'a encore été créé pour le projet actuel",
"id": "Belum ada alur kerja yang dibuat untuk proyek saat ini",
"ru": "Для текущего проекта еще не создан рабочий процесс"
},
{
"key": "创建工作流",
"zh": "",
"zh-CHT": "創建工作流",
"en": "Create workflow",
"ko": "워크플로우 생성",
"ja": "ワークフローを作成",
"de": "Workflow erstellen",
"fr": "Créer un flux de travail",
"id": "Buat alur kerja",
"ru": "Создать рабочий процесс"
},
{
"key": "流转到【(*)】时改变任务负责人为状态负责人,原本的任务负责人移至协助人员。",
"zh": "",
"zh-CHT": "流轉到【(*)】時改變任務負責人為狀態負責人,原本的任務負責人移至協助人員。",
"en": "When transitioning to 【(*)】, change the task owner to the status owner, and move the original task owner to assistants.",
"ko": "【(*)】로 전환할 때 작업 담당자를 상태 담당자로 변경하고, 원래 작업 담당자를 보조 인원으로 이동합니다.",
"ja": "【(*)】に移行する際、タスク担当者をステータス担当者に変更し、元のタスク担当者を補助者に移動します。",
"de": "Bei der Überführung in 【(*)】 wird der Aufgabenverantwortliche zum Statusverantwortlichen geändert und der ursprüngliche Aufgabenverantwortliche zu den Assistenten verschoben.",
"fr": "Lors du passage à 【(*)】, changer le responsable de la tâche en responsable du statut, et déplacer le responsable initial de la tâche vers les assistants.",
"id": "Saat beralih ke 【(*)】, ubah pemilik tugas menjadi pemilik status, dan pindahkan pemilik tugas asli ke asisten.",
"ru": "При переходе в 【(*)】 изменить владельца задачи на владельца статуса, а исходного владельца задачи переместить в помощники."
},
{
"key": "选择群组",
"zh": "",
"zh-CHT": "選擇群組",
"en": "Select group",
"ko": "그룹 선택",
"ja": "グループを選択",
"de": "Gruppe auswählen",
"fr": "Sélectionner un groupe",
"id": "Pilih grup",
"ru": "Выбрать группу"
},
{
"key": "输入关键词搜索群",
"zh": "",
"zh-CHT": "輸入關鍵詞搜索群",
"en": "Enter keywords to search for groups",
"ko": "키워드를 입력하여 그룹 검색",
"ja": "キーワードを入力してグループを検索",
"de": "Geben Sie Schlüsselwörter ein, um nach Gruppen zu suchen",
"fr": "Entrez des mots-clés pour rechercher des groupes",
"id": "Masukkan kata kunci untuk mencari grup",
"ru": "Введите ключевые слова для поиска групп"
},
{
"key": "仅支持选择个人群转为部门群",
"zh": "",
"zh-CHT": "僅支持選擇個人群轉為部門群",
"en": "Only supports converting personal groups to department groups",
"ko": "개인 그룹을 부서 그룹으로 전환하는 것만 지원합니다",
"ja": "個人グループを部門グループに変換することのみサポートしています",
"de": "Unterstützt nur die Umwandlung von persönlichen Gruppen in Abteilungsgruppen",
"fr": "Prend en charge uniquement la conversion de groupes personnels en groupes départementaux",
"id": "Hanya mendukung konversi grup pribadi menjadi grup departemen",
"ru": "Поддерживается только преобразование личных групп в группы отделов"
},
{
"key": "删除部门",
"zh": "",
"zh-CHT": "刪除部門",
"en": "Delete department",
"ko": "부서 삭제",
"ja": "部門を削除",
"de": "Abteilung löschen",
"fr": "Supprimer le département",
"id": "Hapus departemen",
"ru": "Удалить отдел"
},
{
"key": "你确定要删除【(*)】部门吗?",
"zh": "",
"zh-CHT": "你確定要刪除【(*)】部門嗎?",
"en": "Are you sure you want to delete the 【(*)】 department?",
"ko": "【(*)】 부서를 삭제하시겠습니까?",
"ja": "【(*)】部門を削除してもよろしいですか?",
"de": "Sind Sie sicher, dass Sie die Abteilung 【(*)】 löschen möchten?",
"fr": "Êtes-vous sûr de vouloir supprimer le département 【(*)】 ?",
"id": "Apakah Anda yakin ingin menghapus departemen 【(*)】?",
"ru": "Вы уверены, что хотите удалить отдел 【(*)】?"
},
{
"key": "注意:此操作不可恢复,部门下的成员将移至默认部门。",
"zh": "",
"zh-CHT": "注意:此操作不可恢復,部門下的成員將移至默認部門。",
"en": "Note: This action is irreversible. Members of the department will be moved to the default department.",
"ko": "주의: 이 작업은 되돌릴 수 없습니다. 부서의 구성원들은 기본 부서로 이동됩니다.",
"ja": "注意:この操作は元に戻せません。部門のメンバーはデフォルトの部門に移動されます。",
"de": "Hinweis: Diese Aktion ist nicht rückgängig zu machen. Mitglieder der Abteilung werden in die Standardabteilung verschoben.",
"fr": "Attention : Cette action est irréversible. Les membres du département seront déplacés vers le département par défaut.",
"id": "Perhatian: Tindakan ini tidak dapat dibatalkan. Anggota departemen akan dipindahkan ke departemen default.",
"ru": "Внимание: Это действие необратимо. Члены отдела будут перемещены в отдел по умолчанию."
},
{
"key": "维护中...",
"zh": "",
"zh-CHT": "維護中...",
"en": "Under maintenance...",
"ko": "유지보수 중...",
"ja": "メンテナンス中...",
"de": "Wartungsarbeiten...",
"fr": "En maintenance...",
"id": "Sedang dalam pemeliharaan...",
"ru": "На техническом обслуживании..."
}
]
2 changes: 1 addition & 1 deletion public/language/api/de.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/language/api/en.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/language/api/fr.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/language/api/id.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/language/api/ja.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/language/api/ko.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/language/api/ru.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/language/web/de.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/language/web/en.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/language/web/fr.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/language/web/id.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/language/web/ja.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/language/web/key.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/language/web/ko.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/language/web/ru.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/language/web/zh-CHT.js

Large diffs are not rendered by default.

Loading

0 comments on commit 1f6ef62

Please sign in to comment.