fix: correct typos in source code and locales (#3003)

- Fix Countrys -> Countries in comment
- Fix Scrolldown -> ScrollDown in variable name
- Fix completeTowFactor -> completeTwoFactor (3x)
- Fix deactiveTowFactor -> deactivateTwoFactor (3x)
- Fix activeOrDeactiveTwoFactor -> activeOrDeactivateTwoFactor
- Fix API route /two-factor/deactive -> /two-factor/deactivate
- Fix elment -> element in function param
- Fix synolog -> synology in comment
- Fix Chinese comment 制定 -> 指定
- Fix swapped BARK English translations on lines 360-361
This commit is contained in:
jmclulu 2026-05-31 00:32:04 +08:00 committed by GitHub
parent 2fe9470ff0
commit 3aab1233bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 23 additions and 23 deletions

View File

@ -140,12 +140,12 @@ export default (app: Router) => {
);
route.put(
'/two-factor/deactive',
'/two-factor/deactivate',
async (req: Request, res: Response, next: NextFunction) => {
const logger: Logger = Container.get('logger');
try {
const userService = Container.get(UserService);
const data = await userService.deactiveTwoFactor();
const data = await userService.deactivateTwoFactor();
res.send({ code: 200, data });
} catch (e) {
return next(e);

View File

@ -330,7 +330,7 @@ export default class UserService {
}
}
public async deactiveTwoFactor() {
public async deactivateTwoFactor() {
const authInfo = await this.getAuthInfo();
await this.updateAuthInfo(authInfo, {
twoFactorActivated: false,

View File

@ -1598,7 +1598,7 @@ async function sendNotify(text, desp, params = {}) {
iGotNotify(text, desp, params), // iGot
gobotNotify(text, desp), // go-cqhttp
gotifyNotify(text, desp), // gotify
chatNotify(text, desp), // synolog chat
chatNotify(text, desp), // synology chat
pushDeerNotify(text, desp), // PushDeer
aibotkNotify(text, desp), // 智能微秘书
fsBotNotify(text, desp), // 飞书机器人

View File

@ -29,10 +29,10 @@ const Terminal = ({
const lastLineRef = useRef<null | HTMLElement>(null);
// An effect that handles scrolling into view the last line of terminal input or output
const performScrolldown = useRef(false);
const performScrollDown = useRef(false);
useEffect(() => {
if (performScrolldown.current) {
// skip scrolldown when the component first loads
if (performScrollDown.current) {
// skip scrollDown when the component first loads
setTimeout(
() =>
lastLineRef?.current?.scrollIntoView({
@ -42,7 +42,7 @@ const Terminal = ({
500,
);
}
performScrolldown.current = true;
performScrollDown.current = true;
}, [lineData.length]);
const renderedLineData = lineData.map((ld, i) => {

View File

@ -357,8 +357,8 @@
"BARK推送图标自定义推送图标 (需iOS15或以上才能显示)": "BARK push icon, custom push icon (requires iOS 15 or above to display)",
"BARK推送铃声铃声列表去APP查看复制填写": "BARK push ringtone, check and copy from the APP's ringtone list",
"BARK推送消息的分组默认为qinglong": "BARK push message grouping, default is qinglong",
"BARK推送消息的时效性默认为active": "BARK push message redirecting URL",
"BARK推送消息的跳转URL": "BARK push message grouping, default is qinglong",
"BARK推送消息的时效性默认为active": "BARK push message timeliness, default is active",
"BARK推送消息的跳转URL": "BARK push message redirecting URL",
"BARK是否保存推送消息": "Does BARK save push messages",
"telegram机器人的token例如1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw": "Telegram Bot token, e.g., 1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw",
"telegram用户的id例如129xxx206": "Telegram user ID, e.g., 129xxx206",

View File

@ -50,7 +50,7 @@ const Login = () => {
});
};
const completeTowFactor = (values: any) => {
const completeTwoFactor = (values: any) => {
setVerifying(true);
request
.put(`${config.apiPrefix}user/two-factor/login`, {
@ -129,7 +129,7 @@ const Login = () => {
const { value } = e.target as any;
const regx = /^[0-9]{6}$/;
if (regx.test(value)) {
completeTowFactor({ code: value });
completeTwoFactor({ code: value });
}
};
@ -156,7 +156,7 @@ const Login = () => {
</div>
<div className={styles.main}>
{twoFactor ? (
<Form layout="vertical" onFinish={completeTowFactor}>
<Form layout="vertical" onFinish={completeTwoFactor}>
<FormItem
name="code"
label={intl.get('验证码')}

View File

@ -37,18 +37,18 @@ const SecuritySettings = ({ user, userChange }: any) => {
});
};
const activeOrDeactiveTwoFactor = () => {
const activeOrDeactivateTwoFactor = () => {
if (twoFactorActivated) {
deactiveTowFactor();
deactivateTwoFactor();
} else {
getTwoFactorInfo();
setTwoFactoring(true);
}
};
const deactiveTowFactor = () => {
const deactivateTwoFactor = () => {
request
.put(`${config.apiPrefix}user/two-factor/deactive`)
.put(`${config.apiPrefix}user/two-factor/deactivate`)
.then(({ code, data }) => {
if (code === 200 && data) {
setTwoFactorActivated(false);
@ -60,7 +60,7 @@ const SecuritySettings = ({ user, userChange }: any) => {
});
};
const completeTowFactor = () => {
const completeTwoFactor = () => {
setLoading(true);
request
.put(`${config.apiPrefix}user/two-factor/active`, { code })
@ -162,7 +162,7 @@ const SecuritySettings = ({ user, userChange }: any) => {
onChange={(e) => setCode(e.target.value)}
placeholder="123456"
/>
<Button type="primary" loading={loading} onClick={completeTowFactor}>
<Button type="primary" loading={loading} onClick={completeTwoFactor}>
{intl.get('完成设置')}
</Button>
</div>

View File

@ -18,7 +18,7 @@ export default {
/* I18n configuration, `languages` and `defaultLanguage` are required currently. */
i18n: {
/* Countrys flags: https://www.flaticon.com/packs/countrys-flags */
/* Countries flags: https://www.flaticon.com/packs/countries-flags */
languages: [
{
key: 'pt-br',

View File

@ -179,7 +179,7 @@ export default function browserType() {
/**
*
* @param {*} extraHeight ( Number类型,74)
* @param {*} id table时需要定table的id
* @param {*} id table时需要定table的id
*/
export function getTableScroll({
extraHeight,
@ -208,7 +208,7 @@ export function getTableScroll({
}
// 自动触发点击事件
function automaticClick(elment: HTMLElement) {
function automaticClick(element: HTMLElement) {
const ev = document.createEvent('MouseEvents');
ev.initMouseEvent(
'click',
@ -227,7 +227,7 @@ function automaticClick(elment: HTMLElement) {
0,
null,
);
elment.dispatchEvent(ev);
element.dispatchEvent(ev);
}
// 导出文件