mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-05 12:45:41 +00:00
no message
This commit is contained in:
parent
4fe4dc8c6e
commit
fdd5e36d19
@ -64,7 +64,7 @@ class UserBot extends AbstractModel
|
||||
if (str_contains($name, "@")) {
|
||||
$name = explode("@", $name)[0];
|
||||
}
|
||||
return match ($name) {
|
||||
$name = match ($name) {
|
||||
'system-msg' => '系统消息',
|
||||
'task-alert' => '任务提醒',
|
||||
'check-in' => '签到打卡',
|
||||
@ -81,6 +81,7 @@ class UserBot extends AbstractModel
|
||||
'okr-alert' => 'OKR提醒',
|
||||
default => '', // 不是系统机器人时返回空(也可以拿来判断是否是系统机器人)
|
||||
};
|
||||
return Doo::translate($name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -727,6 +727,7 @@ class WebSocketDialog extends AbstractModel
|
||||
{
|
||||
$filePath = '';
|
||||
$result = [];
|
||||
$data = [];
|
||||
foreach ($dialogIds as $dialog_id) {
|
||||
$dialog = WebSocketDialog::checkDialog($dialog_id);
|
||||
//
|
||||
|
||||
2
language/.gitignore
vendored
2
language/.gitignore
vendored
@ -3,3 +3,5 @@ undefined-*.txt
|
||||
error.log
|
||||
vendor
|
||||
translate-gpt.md
|
||||
test*
|
||||
temp
|
||||
|
||||
@ -429,7 +429,6 @@ API接口文档
|
||||
请选择下载的文件或文件夹
|
||||
一次最多只能下载100个文件或文件夹
|
||||
创建压缩文件失败
|
||||
文件总大小已超过1GB,请分批下载
|
||||
文件总大小已超过1GB,请分批下载
|
||||
保存任务详情至文件失败
|
||||
保存任务详情至文件失败,请重试
|
||||
|
||||
76
language/translate-test.php
Executable file
76
language/translate-test.php
Executable file
@ -0,0 +1,76 @@
|
||||
<?php
|
||||
@error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING);
|
||||
|
||||
|
||||
// 读取所有要翻译的内容
|
||||
$array = [];
|
||||
foreach (['api', 'web'] as $type) {
|
||||
$content = file_exists("original-{$type}.txt") ? file_get_contents("original-{$type}.txt") : "";
|
||||
$array = array_merge($array, array_values(array_filter(array_unique(explode("\n", $content)))));
|
||||
}
|
||||
|
||||
// 判定是否存在translate.json文件
|
||||
if (!file_exists( "translate.json")) {
|
||||
print_r("translate.json not exists");
|
||||
exit;
|
||||
}
|
||||
|
||||
$translations = []; // 翻译数据
|
||||
$regrror = []; // 正则匹配错误的数据
|
||||
$redundants = []; // 多余的数据
|
||||
$needs = []; // 需要翻译的数据
|
||||
|
||||
$tmps = json_decode(file_get_contents("translate.json"), true);
|
||||
foreach ($tmps as $tmp) {
|
||||
if (!isset($tmp['key'])) {
|
||||
continue;
|
||||
}
|
||||
$key = $tmp['key'];
|
||||
$translations[$key] = $tmp;
|
||||
if (in_array($key, $array)) {
|
||||
$count = substr_count($key, '(*)');
|
||||
if ($count > 0) {
|
||||
foreach ($tmp as $k => $v) {
|
||||
if ($k == 'zh' || $k == 'key') {
|
||||
continue;
|
||||
}
|
||||
if ($count != substr_count($v, '(*)')) {
|
||||
$regrror[$key] = $tmp;
|
||||
continue 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$redundants[$key] = $tmp;
|
||||
}
|
||||
}
|
||||
foreach ($array as $text) {
|
||||
$key = trim($text);
|
||||
if (!isset($translations[$key])) {
|
||||
$needs[$key] = $key;
|
||||
}
|
||||
}
|
||||
|
||||
if (count($regrror) > 0) {
|
||||
print_r("regrror:\n");
|
||||
print_r(implode("\n", array_keys($regrror)));
|
||||
print_r("\n\n");
|
||||
}
|
||||
if (count($redundants) > 0) {
|
||||
print_r("redundants:\n");
|
||||
print_r(implode("\n", array_keys($redundants)));
|
||||
print_r("\n\n");
|
||||
}
|
||||
if (count($needs) > 0) {
|
||||
print_r("needs:\n");
|
||||
print_r(implode("\n", array_keys($needs)));
|
||||
print_r("\n\n");
|
||||
}
|
||||
|
||||
print_r([
|
||||
'translate_count' => count($translations),
|
||||
'regerror_count' => count($regrror),
|
||||
'redundant_count' => count($redundants),
|
||||
'need_count' => count($needs),
|
||||
]);
|
||||
|
||||
17006
language/translate.json
17006
language/translate.json
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
["","","","","","","","开启语音转文字功能需要在应用中开启 ChatGPT AI 机器人。","","","","","","","","","","一次最多只能下载100个文件或文件夹","","","","","","","","","","","","","","保存任务详情至文件失败,请重试","","文件总大小已超过1GB,请分批下载","","","","","","","","","","","","","","","","开始时间不能大于结束时间","","请选择下载的文件或文件夹","","","","开始时间 无效的时间格式","","结束时间 无效的时间格式","","","保存任务详情至文件失败","","","","","找不到符合条件的子节点","","","","","","","","","","","","","","","","","","","","文件下载打包已完成。","","","","","语音转文字功能未开启","","","","","","","","","","日期范围限制最大35天","","","","","","","","","","","","创建签到机器人失败","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","创建压缩文件失败","","","","","","","","","","","","","","","","","","","","","系统机器人不存在","置顶会话无法隐藏","","","","","","","","","","","","","","仅支持语音消息","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","语音文件不存在","语音转文字失败","","","","","","","","","","","","","","","","","","","","不能重复投票","个人会话禁言","个人群组禁言","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","撤回失败","","","","","","","","","","注册失败","","","","","点击下载","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
|
||||
["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
|
||||
2
public/language/web/de.js
vendored
2
public/language/web/de.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/en.js
vendored
2
public/language/web/en.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/fr.js
vendored
2
public/language/web/fr.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/id.js
vendored
2
public/language/web/id.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/ja.js
vendored
2
public/language/web/ja.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/ko.js
vendored
2
public/language/web/ko.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/ru.js
vendored
2
public/language/web/ru.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/zh-CHT.js
vendored
2
public/language/web/zh-CHT.js
vendored
File diff suppressed because one or more lines are too long
7
resources/assets/js/language/index.js
vendored
7
resources/assets/js/language/index.js
vendored
@ -41,8 +41,11 @@ function setLanguage(language, silence = false) {
|
||||
return
|
||||
}
|
||||
if (silence) {
|
||||
utils.saveLanguage(language)
|
||||
$A.reloadUrl()
|
||||
utils.saveLanguage(language);
|
||||
(async () => {
|
||||
await $A.IDBDel("callAt")
|
||||
$A.reloadUrl()
|
||||
})()
|
||||
} else {
|
||||
$A.modalConfirm({
|
||||
content: '切换语言需要刷新后生效,是否确定刷新?',
|
||||
|
||||
@ -341,7 +341,11 @@ export default {
|
||||
key: 'email',
|
||||
minWidth: 160,
|
||||
render: (h, {row}) => {
|
||||
const arr = [h('AutoTip', row.email)];
|
||||
const arr = [h('AutoTip', {
|
||||
style: {
|
||||
minWidth: '50px'
|
||||
}
|
||||
}, row.email)];
|
||||
const {email_verity, identity, disable_at, is_principal} = row;
|
||||
if (email_verity) {
|
||||
arr.push(h('Icon', {
|
||||
@ -475,7 +479,7 @@ export default {
|
||||
}
|
||||
})
|
||||
if (departments.length === 0) {
|
||||
return h('div', this.$L('默认部门'));
|
||||
return h('AutoTip', this.$L('默认部门'));
|
||||
} else {
|
||||
const tmp = []
|
||||
tmp.push(h('span', {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user