From eeb00a55113b5d2a63feab07a57b43ccdad1ebd1 Mon Sep 17 00:00:00 2001 From: LouisLam Date: Thu, 2 Sep 2021 01:56:02 +0800 Subject: [PATCH 01/35] fix data type --- src/pages/Dashboard.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Dashboard.vue b/src/pages/Dashboard.vue index b9c82e00a..1cf237ce7 100644 --- a/src/pages/Dashboard.vue +++ b/src/pages/Dashboard.vue @@ -5,7 +5,7 @@
{{ $t("Add New Monitor") }}
- +
From e1f378ee6c8ede64f6de654e9c913e6292b4f162 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Thu, 2 Sep 2021 02:11:44 +0800 Subject: [PATCH 02/35] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 45a1a338f..925b8798e 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,10 @@ I will mark requests/issues to the next milestone. https://github.com/louislam/uptime-kuma/milestones +Project Plan: + +https://github.com/louislam/uptime-kuma/projects/1 + ## 🖼 More Screenshots Dark Mode: From a2cf7f394e52f0fae9e9fbf11d6ae348baaf2613 Mon Sep 17 00:00:00 2001 From: DX37 Date: Thu, 2 Sep 2021 01:37:01 +0700 Subject: [PATCH 03/35] Add Russian translation --- src/languages/ru-RU.js | 110 +++++++++++++++++++++++++++++++++++++++++ src/main.js | 2 + 2 files changed, 112 insertions(+) create mode 100644 src/languages/ru-RU.js diff --git a/src/languages/ru-RU.js b/src/languages/ru-RU.js new file mode 100644 index 000000000..c9de68614 --- /dev/null +++ b/src/languages/ru-RU.js @@ -0,0 +1,110 @@ +export default { + languageName: "Русский", + checkEverySecond: "Проверять каждые {0} секунд.", + "Avg.": "Средн. ", + retriesDescription: "Максимальное количество попыток перед пометкой сервиса как недоступного и отправкой уведомления", + ignoreTLSError: "Игнорировать ошибку TLS/SSL для HTTPS сайтов", + upsideDownModeDescription: "Реверс статуса сервиса. Если сервис доступен, то он помечается как НЕДОСТУПНЫЙ.", + maxRedirectDescription: "Максимальное количество перенаправлений. Поставьте 0, чтобы отключить перенаправления.", + acceptedStatusCodesDescription: "Выберите коды статусов, которые должны считаться за успешный ответ.", + passwordNotMatchMsg: "Повтор пароля не совпадает.", + notificationDescription: "Привяжите уведомления к мониторам.", + keywordDescription: "Поиск слова в чистом HTML или в JSON-ответе (чувствительно к регистру)", + pauseDashboardHome: "Пауза", + deleteMonitorMsg: "Вы действительно хотите удалить данный монитор?", + deleteNotificationMsg: "Вы действительно хотите удалить это уведомление для всех мониторов?", + resoverserverDescription: "Cloudflare является сервером по умолчанию. Вы всегда можете сменить данный сервер.", + rrtypeDescription: "Выберите тип ресурсной записи, который вы хотите отслеживать", + pauseMonitorMsg: "Вы действительно хотите поставить на паузу?", + Settings: "Настройки", + Dashboard: "Панель", + "New Update": "Обновление", + Language: "Язык", + Appearance: "Внешний вид", + Theme: "Тема", + General: "Общее", + Version: "Версия", + "Check Update On GitHub": "Проверить обновления на GitHub", + List: "Список", + Add: "Добавить", + "Add New Monitor": "Новый монитор", + "Quick Stats": "Статистика", + Up: "Доступно", + Down: "Недоступно", + Pending: "Ожидание", + Unknown: "Неизвестно", + Pause: "Пауза", + Name: "Имя", + Status: "Статус", + DateTime: "Дата и время", + Message: "Сообщение", + "No important events": "Важных событий нет", + Resume: "Возобновить", + Edit: "Изменить", + Delete: "Удалить", + Current: "Текущий", + Uptime: "Аптайм", + "Cert Exp.": "Сертификат просрочен", + days: "дней", + day: "день", + "-day": " дней", + hour: "час", + "-hour": " часа", + Response: "Ответ", + Ping: "Пинг", + "Monitor Type": "Тип монитора", + Keyword: "Слово", + "Friendly Name": "Имя", + URL: "URL", + Hostname: "Имя хоста", + Port: "Порт", + "Heartbeat Interval": "Частота опроса", + Retries: "Попыток", + Advanced: "Дополнительно", + "Upside Down Mode": "Режим реверса статуса", + "Max. Redirects": "Макс. перенаправлений", + "Accepted Status Codes": "Допустимые коды статуса", + Save: "Сохранить", + Notifications: "Уведомления", + "Not available, please setup.": "Доступных уведомлений нет, необходима настройка.", + "Setup Notification": "Настроить уведомления", + Light: "Светлая", + Dark: "Тёмная", + Auto: "Авто", + "Theme - Heartbeat Bar": "Тема - Полоса частоты опроса", + Normal: "Обычный", + Bottom: "Снизу", + None: "Отсутствует", + Timezone: "Часовой пояс", + "Search Engine Visibility": "Видимость поисковым движком", + "Allow indexing": "Разрешить индексирование", + "Discourage search engines from indexing site": "Не позволять индексировать сайт", + "Change Password": "Сменить пароль", + "Current Password": "Текущий пароль", + "New Password": "Новый пароль", + "Repeat New Password": "Повтор нового пароля", + "Update Password": "Обновить пароль", + "Disable Auth": "Отключить авторизацию", + "Enable Auth": "Включить авторизацию", + Logout: "Выйти", + Leave: "Отмена", + "I understand, please disable": "Я понимаю, всё равно отключить", + Confirm: "Подтвердить", + Yes: "Да", + No: "Нет", + Username: "Логин", + Password: "Пароль", + "Remember me": "Запомнить меня", + Login: "Вход в систему", + "No Monitors, please": "Мониторов нет, пожалуйста", + "add one": "создайте новый", + "Notification Type": "Тип уведомления", + Email: "Почта", + Test: "Проверка", + "Certificate Info": "Информация о сертификате", + "Resolver Server": "DNS сервер", + "Resource Record Type": "Тип ресурсной записи", + "Last Result": "Последний результат", + "Create your admin account": "Создайте аккаунт администратора", + "Repeat Password": "Повторите пароль" +} diff --git a/src/main.js b/src/main.js index 435caf218..fe35d3815 100644 --- a/src/main.js +++ b/src/main.js @@ -31,6 +31,7 @@ import ja from "./languages/ja"; import daDK from "./languages/da-DK"; import svSE from "./languages/sv-SE"; import koKR from "./languages/ko-KR"; +import ruRU from "./languages/ru-RU"; const routes = [ { @@ -102,6 +103,7 @@ const languageList = { "da-DK": daDK, "sv-SE": svSE, "ko-KR": koKR, + "ru-RU": ruRU, }; const i18n = createI18n({ From e7929f461d878af218d70c86bfbe694b84ee450f Mon Sep 17 00:00:00 2001 From: Adam Stachowicz Date: Wed, 1 Sep 2021 20:53:12 +0200 Subject: [PATCH 04/35] Update dependencies --- package.json | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index f279351ec..23b8e6da6 100644 --- a/package.json +++ b/package.json @@ -54,19 +54,19 @@ "express": "^4.17.1", "express-basic-auth": "^1.2.0", "form-data": "^4.0.0", - "http-graceful-shutdown": "^3.1.3", + "http-graceful-shutdown": "^3.1.4", "jsonwebtoken": "^8.5.1", "nodemailer": "^6.6.3", "password-hash": "^1.2.2", "prom-client": "^13.2.0", "prometheus-api-metrics": "^3.2.0", "redbean-node": "0.1.2", - "socket.io": "^4.1.3", - "socket.io-client": "^4.1.3", + "socket.io": "^4.2.0", + "socket.io-client": "^4.2.0", "sqlite3": "github:mapbox/node-sqlite3#593c9d", "tcp-ping": "^0.1.1", "v-pagination-3": "^0.1.6", - "vue": "^3.2.2", + "vue": "^3.2.6", "vue-chart-3": "^0.5.7", "vue-confirm-dialog": "^1.0.2", "vue-i18n": "^9.1.7", @@ -76,18 +76,18 @@ }, "devDependencies": { "@babel/eslint-parser": "^7.15.0", - "@types/bootstrap": "^5.1.1", - "@vitejs/plugin-legacy": "^1.5.1", - "@vitejs/plugin-vue": "^1.4.0", - "@vue/compiler-sfc": "^3.2.2", - "core-js": "^3.16.1", + "@types/bootstrap": "^5.1.2", + "@vitejs/plugin-legacy": "^1.5.2", + "@vitejs/plugin-vue": "^1.6.0", + "@vue/compiler-sfc": "^3.2.6", + "core-js": "^3.17.0", "dns2": "^2.0.1", "eslint": "^7.32.0", - "eslint-plugin-vue": "^7.16.0", - "sass": "^1.37.5", + "eslint-plugin-vue": "^7.17.0", + "sass": "^1.38.2", "stylelint": "^13.13.1", "stylelint-config-standard": "^22.0.0", - "typescript": "^4.3.5", - "vite": "^2.4.4" + "typescript": "^4.4.2", + "vite": "^2.5.3" } } From 7a109689d96a4ffdeee99776a0c44671e88be4f7 Mon Sep 17 00:00:00 2001 From: Adam Stachowicz Date: Wed, 1 Sep 2021 21:17:50 +0200 Subject: [PATCH 05/35] Make `Resp. Time (ms)` and `N/A` i18n --- src/components/PingChart.vue | 2 +- src/components/Uptime.vue | 2 +- src/languages/en.js | 4 +++- src/pages/Details.vue | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/PingChart.vue b/src/components/PingChart.vue index 8f53ea766..0baa9881d 100644 --- a/src/components/PingChart.vue +++ b/src/components/PingChart.vue @@ -85,7 +85,7 @@ export default { y: { title: { display: true, - text: "Resp. Time (ms)", + text: this.$t("respTime"), }, offset: false, grid: { diff --git a/src/components/Uptime.vue b/src/components/Uptime.vue index b1f3a018e..a4bf22f68 100644 --- a/src/components/Uptime.vue +++ b/src/components/Uptime.vue @@ -22,7 +22,7 @@ export default { return Math.round(this.$root.uptimeList[key] * 10000) / 100 + "%"; } - return "N/A" + return this.$t("notAvailableShort") }, color() { diff --git a/src/languages/en.js b/src/languages/en.js index 2781ba819..f0e4ae969 100644 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -106,5 +106,7 @@ export default { "Resource Record Type": "Resource Record Type", "Last Result": "Last Result", "Create your admin account": "Create your admin account", - "Repeat Password": "Repeat Password" + "Repeat Password": "Repeat Password", + respTime: "Resp. Time (ms)", + notAvailableShort: "N/A" } diff --git a/src/pages/Details.vue b/src/pages/Details.vue index 44cac8186..badcc687e 100644 --- a/src/pages/Details.vue +++ b/src/pages/Details.vue @@ -238,7 +238,7 @@ export default { return this.lastHeartBeat.ping; } - return "N/A" + return this.$t("notAvailableShort") }, avgPing() { @@ -246,7 +246,7 @@ export default { return this.$root.avgPingList[this.monitor.id]; } - return "N/A" + return this.$t("notAvailableShort") }, importantHeartBeatList() { From 9116654a33077da96a8de658ef0eeafbd073cf08 Mon Sep 17 00:00:00 2001 From: LouisLam Date: Thu, 2 Sep 2021 15:21:46 +0800 Subject: [PATCH 06/35] update language files and run eslint on these --- src/languages/da-DK.js | 4 +- src/languages/de-DE.js | 4 +- src/languages/fr.js | 4 +- src/languages/ja.js | 4 +- src/languages/ko-KR.js | 220 +++++++++++++++++++++-------------------- src/languages/ru-RU.js | 4 +- src/languages/sv-SE.js | 4 +- src/languages/zh-HK.js | 10 +- 8 files changed, 135 insertions(+), 119 deletions(-) diff --git a/src/languages/da-DK.js b/src/languages/da-DK.js index 245ba5ba7..713eecfe2 100644 --- a/src/languages/da-DK.js +++ b/src/languages/da-DK.js @@ -106,5 +106,7 @@ export default { pauseMonitorMsg: "Er du sikker på, at du vil pause Overvågeren?", "Create your admin account": "Opret din administratorkonto", "Repeat Password": "Gentag adgangskoden", - "Resource Record Type": "Resource Record Type" + "Resource Record Type": "Resource Record Type", + respTime: "Resp. Time (ms)", + notAvailableShort: "N/A" } diff --git a/src/languages/de-DE.js b/src/languages/de-DE.js index 7a8cb52a4..7febaad7b 100644 --- a/src/languages/de-DE.js +++ b/src/languages/de-DE.js @@ -106,5 +106,7 @@ export default { pauseMonitorMsg: "Bist du sicher das du den Monitor pausieren möchtest?", "Create your admin account": "Erstelle dein Admin Konto", "Repeat Password": "Wiederhole das Passwort", - "Resource Record Type": "Resource Record Type" + "Resource Record Type": "Resource Record Type", + respTime: "Resp. Time (ms)", + notAvailableShort: "N/A" } diff --git a/src/languages/fr.js b/src/languages/fr.js index ac7aa8a54..694f4d285 100644 --- a/src/languages/fr.js +++ b/src/languages/fr.js @@ -106,5 +106,7 @@ export default { pauseMonitorMsg: "Are you sure want to pause?", "Last Result": "Last Result", "Create your admin account": "Create your admin account", - "Repeat Password": "Repeat Password" + "Repeat Password": "Repeat Password", + respTime: "Resp. Time (ms)", + notAvailableShort: "N/A" } diff --git a/src/languages/ja.js b/src/languages/ja.js index e32e53d69..23de640cf 100644 --- a/src/languages/ja.js +++ b/src/languages/ja.js @@ -106,5 +106,7 @@ export default { "Resource Record Type": "DNSレコード設定", "Last Result": "最終結果", "Create your admin account": "Create your admin account", - "Repeat Password": "Repeat Password" + "Repeat Password": "Repeat Password", + respTime: "Resp. Time (ms)", + notAvailableShort: "N/A" } diff --git a/src/languages/ko-KR.js b/src/languages/ko-KR.js index 91f8f9b22..f913bbb97 100644 --- a/src/languages/ko-KR.js +++ b/src/languages/ko-KR.js @@ -1,110 +1,112 @@ export default { - languageName: '한국어', - checkEverySecond: '{0} 초마다 체크해요.', - 'Avg.': '평균 ', - retriesDescription: '서비스가 중단된 후 알림을 보내기 전 최대 재시도 횟수', - ignoreTLSError: 'HTTPS 웹사이트에서 TLS/SSL 에러 무시하기', - upsideDownModeDescription: '서버 상태를 반대로 표시해요. 서버가 작동하면 오프라인으로 표시할 거에요.', - maxRedirectDescription: '최대 리다이렉트 횟수에요. 0을 입력하면 리다이렉트를 꺼요.', - acceptedStatusCodesDescription: '응답 성공으로 간주할 상태 코드를 정해요.', - passwordNotMatchMsg: '비밀번호 재입력이 일치하지 않아요.', - notificationDescription: '모니터링에 알림을 설정할 수 있어요.', - keywordDescription: 'Html 이나 JSON에서 대소문자를 구분해 키워드를 검색해요.', - pauseDashboardHome: '일시 정지', - deleteMonitorMsg: '정말 이 모니터링을 삭제할까요?', - deleteNotificationMsg: '정말 이 알림을 모든 모니터링에서 삭제할까요?', - resoverserverDescription: 'Cloudflare가 기본 서버에요, 원한다면 언제나 다른 resolver 서버로 변경할 수 있어요.', - rrtypeDescription: '모니터링할 RR-Type을 선택해요.', - pauseMonitorMsg: '정말 이 모니터링을 일시 정지 할까요?', - Settings: '설정', - Dashboard: '대시보드', - 'New Update': '새로운 업데이트', - Language: '언어', - Appearance: '외형', - Theme: '테마', - General: '일반', - Version: '버전', - 'Check Update On GitHub': '깃허브에서 업데이트 확인', - List: '목록', - Add: '추가', - 'Add New Monitor': '새로운 모니터링 추가하기', - 'Quick Stats': '간단한 정보', - Up: '온라인', - Down: '오프라인', - Pending: '대기 중', - Unknown: '알 수 없음', - Pause: '일시 정지', - Name: '이름', - Status: '상태', - DateTime: '날짜', - Message: '메시지', - 'No important events': '중요 이벤트 없음', - Resume: '재개', - Edit: '수정', - Delete: '삭제', - Current: '현재', - Uptime: '업타임', - 'Cert Exp.': '인증서 만료', - days: '일', - day: '일', - '-day': '-일', - hour: '시간', - '-hour': '-시간', - Response: '응답', - Ping: '핑', - 'Monitor Type': '모니터링 종류', - Keyword: '키워드', - 'Friendly Name': '이름', - URL: 'URL', - Hostname: '호스트네임', - Port: '포트', - 'Heartbeat Interval': '하트비트 주기', - Retries: '재시도', - Advanced: '고급', - 'Upside Down Mode': '상태 반전 모드', - 'Max. Redirects': '최대 리다이렉트', - 'Accepted Status Codes': '응답 성공 상태 코드', - Save: '저장', - Notifications: '알림', - 'Not available, please setup.': '존재하지 않아요, 새로운거 하나 만드는건 어때요?', - 'Setup Notification': '알림 설정', - Light: '라이트', - Dark: '다크', - Auto: '자동', - 'Theme - Heartbeat Bar': '테마 - 하트비트 바', - Normal: '기본값', - Bottom: '가운데', - None: '제거', - Timezone: '시간대', - 'Search Engine Visibility': '검색 엔진 활성화', - 'Allow indexing': '인덱싱 허용', - 'Discourage search engines from indexing site': '검색 엔진 인덱싱 거부', - 'Change Password': '비밀번호 변경', - 'Current Password': '기존 비밀번호', - 'New Password': '새로운 비밀번호', - 'Repeat New Password': '새로운 비밀번호 재입력', - 'Update Password': '비밀번호 변경', - 'Disable Auth': '인증 끄기', - 'Enable Auth': '인증 켜기', - Logout: '로그아웃', - Leave: '나가기', - 'I understand, please disable': '기능에 대해 이해했어요.', - Confirm: '확인', - Yes: '확인', - No: '취소', - Username: '이름', - Password: '비밀번호', - 'Remember me': '비밀번호 기억하기', - Login: '로그인', - 'No Monitors, please': '모니터링이 없어요,', - 'add one': '하나 추가해봐요', - 'Notification Type': '알림 종류', - Email: '이메일', - Test: '테스트', - 'Certificate Info': '인증서 정보', - 'Resolver Server': 'Resolver 서버', - 'Resource Record Type': '자원 레코드 유형', - 'Last Result': '최근 결과', - 'Create your admin account': '관리자 계정 만들기', - 'Repeat Password': '비밀번호 재입력' -}; \ No newline at end of file + languageName: "한국어", + checkEverySecond: "{0} 초마다 체크해요.", + "Avg.": "평균 ", + retriesDescription: "서비스가 중단된 후 알림을 보내기 전 최대 재시도 횟수", + ignoreTLSError: "HTTPS 웹사이트에서 TLS/SSL 에러 무시하기", + upsideDownModeDescription: "서버 상태를 반대로 표시해요. 서버가 작동하면 오프라인으로 표시할 거에요.", + maxRedirectDescription: "최대 리다이렉트 횟수에요. 0을 입력하면 리다이렉트를 꺼요.", + acceptedStatusCodesDescription: "응답 성공으로 간주할 상태 코드를 정해요.", + passwordNotMatchMsg: "비밀번호 재입력이 일치하지 않아요.", + notificationDescription: "모니터링에 알림을 설정할 수 있어요.", + keywordDescription: "Html 이나 JSON에서 대소문자를 구분해 키워드를 검색해요.", + pauseDashboardHome: "일시 정지", + deleteMonitorMsg: "정말 이 모니터링을 삭제할까요?", + deleteNotificationMsg: "정말 이 알림을 모든 모니터링에서 삭제할까요?", + resoverserverDescription: "Cloudflare가 기본 서버에요, 원한다면 언제나 다른 resolver 서버로 변경할 수 있어요.", + rrtypeDescription: "모니터링할 RR-Type을 선택해요.", + pauseMonitorMsg: "정말 이 모니터링을 일시 정지 할까요?", + Settings: "설정", + Dashboard: "대시보드", + "New Update": "새로운 업데이트", + Language: "언어", + Appearance: "외형", + Theme: "테마", + General: "일반", + Version: "버전", + "Check Update On GitHub": "깃허브에서 업데이트 확인", + List: "목록", + Add: "추가", + "Add New Monitor": "새로운 모니터링 추가하기", + "Quick Stats": "간단한 정보", + Up: "온라인", + Down: "오프라인", + Pending: "대기 중", + Unknown: "알 수 없음", + Pause: "일시 정지", + Name: "이름", + Status: "상태", + DateTime: "날짜", + Message: "메시지", + "No important events": "중요 이벤트 없음", + Resume: "재개", + Edit: "수정", + Delete: "삭제", + Current: "현재", + Uptime: "업타임", + "Cert Exp.": "인증서 만료", + days: "일", + day: "일", + "-day": "-일", + hour: "시간", + "-hour": "-시간", + Response: "응답", + Ping: "핑", + "Monitor Type": "모니터링 종류", + Keyword: "키워드", + "Friendly Name": "이름", + URL: "URL", + Hostname: "호스트네임", + Port: "포트", + "Heartbeat Interval": "하트비트 주기", + Retries: "재시도", + Advanced: "고급", + "Upside Down Mode": "상태 반전 모드", + "Max. Redirects": "최대 리다이렉트", + "Accepted Status Codes": "응답 성공 상태 코드", + Save: "저장", + Notifications: "알림", + "Not available, please setup.": "존재하지 않아요, 새로운거 하나 만드는건 어때요?", + "Setup Notification": "알림 설정", + Light: "라이트", + Dark: "다크", + Auto: "자동", + "Theme - Heartbeat Bar": "테마 - 하트비트 바", + Normal: "기본값", + Bottom: "가운데", + None: "제거", + Timezone: "시간대", + "Search Engine Visibility": "검색 엔진 활성화", + "Allow indexing": "인덱싱 허용", + "Discourage search engines from indexing site": "검색 엔진 인덱싱 거부", + "Change Password": "비밀번호 변경", + "Current Password": "기존 비밀번호", + "New Password": "새로운 비밀번호", + "Repeat New Password": "새로운 비밀번호 재입력", + "Update Password": "비밀번호 변경", + "Disable Auth": "인증 끄기", + "Enable Auth": "인증 켜기", + Logout: "로그아웃", + Leave: "나가기", + "I understand, please disable": "기능에 대해 이해했어요.", + Confirm: "확인", + Yes: "확인", + No: "취소", + Username: "이름", + Password: "비밀번호", + "Remember me": "비밀번호 기억하기", + Login: "로그인", + "No Monitors, please": "모니터링이 없어요,", + "add one": "하나 추가해봐요", + "Notification Type": "알림 종류", + Email: "이메일", + Test: "테스트", + "Certificate Info": "인증서 정보", + "Resolver Server": "Resolver 서버", + "Resource Record Type": "자원 레코드 유형", + "Last Result": "최근 결과", + "Create your admin account": "관리자 계정 만들기", + "Repeat Password": "비밀번호 재입력", + respTime: "Resp. Time (ms)", + notAvailableShort: "N/A" +} diff --git a/src/languages/ru-RU.js b/src/languages/ru-RU.js index c9de68614..f42f9c256 100644 --- a/src/languages/ru-RU.js +++ b/src/languages/ru-RU.js @@ -106,5 +106,7 @@ export default { "Resource Record Type": "Тип ресурсной записи", "Last Result": "Последний результат", "Create your admin account": "Создайте аккаунт администратора", - "Repeat Password": "Повторите пароль" + "Repeat Password": "Повторите пароль", + respTime: "Resp. Time (ms)", + notAvailableShort: "N/A" } diff --git a/src/languages/sv-SE.js b/src/languages/sv-SE.js index 068f5d597..502968891 100644 --- a/src/languages/sv-SE.js +++ b/src/languages/sv-SE.js @@ -106,5 +106,7 @@ export default { "Resource Record Type": "RR-typ", "Last Result": "Senaste resultat", "Create your admin account": "Skapa ditt administratörskonto", - "Repeat Password": "Upprepa Lösenord" + "Repeat Password": "Upprepa Lösenord", + respTime: "Resp. Time (ms)", + notAvailableShort: "N/A" } diff --git a/src/languages/zh-HK.js b/src/languages/zh-HK.js index 12ebb79de..4bcc5029e 100644 --- a/src/languages/zh-HK.js +++ b/src/languages/zh-HK.js @@ -103,8 +103,10 @@ export default { "Resource Record Type": "DNS 記錄類型", resoverserverDescription: "預設值為 Cloudflare DNS 伺服器,你可以轉用其他 DNS 伺服器。", rrtypeDescription: "請選擇 DNS 記錄類型", - pauseMonitorMsg: "Are you sure want to pause?", - "Last Result": "Last Result", - "Create your admin account": "Create your admin account", - "Repeat Password": "Repeat Password" + pauseMonitorMsg: "是否確定暫停?", + "Last Result": "最後結果", + "Create your admin account": "製作你的管理員帳號", + "Repeat Password": "重複密碼", + respTime: "反應時間 (ms)", + notAvailableShort: "N/A" } From a0f372e946adb196d38d1246f2f5bbeceb7455ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B0=E9=80=B8Cary?= Date: Thu, 2 Sep 2021 15:34:46 +0800 Subject: [PATCH 07/35] Chinese Translation (from zh-CN.js) --- src/languages/zh-CN.js | 112 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 src/languages/zh-CN.js diff --git a/src/languages/zh-CN.js b/src/languages/zh-CN.js new file mode 100644 index 000000000..b67f1d5a0 --- /dev/null +++ b/src/languages/zh-CN.js @@ -0,0 +1,112 @@ +export default { + languageName: "简体中文", + checkEverySecond: "检测频率 {0} 秒", + "Avg.": "平均 ", + retriesDescription: "最大重试次数", + ignoreTLSError: "忽略HTTPS站点的证书错误", + upsideDownModeDescription: "反向状态监控", + maxRedirectDescription: "最大重定向次数,设置为 0 禁止重定向", + acceptedStatusCodesDescription: "选择被视为成功响应的状态码", + passwordNotMatchMsg: "两次密码输入不一致", + notificationDescription: "请先设置一个消息通知", + keywordDescription: "检测响应内容中的关键字,区分大小写", + pauseDashboardHome: "Pause", + deleteMonitorMsg: "确定要删除此监控吗?", + deleteNotificationMsg: "确定要删除此消息通知吗?这将对所有监控生效。", + resoverserverDescription: "默认服务器 Cloudflare,可以修改为任意你想要使用的DNS服务器", + rrtypeDescription: "选择您要监控的资源记录类型", + pauseMonitorMsg: "确定要暂停吗?", + Settings: "设置", + Dashboard: "仪表盘", + "New Update": "有新版本更新", + Language: "语言", + Appearance: "外观设置", + Theme: "主题", + General: "基本设置", + Version: "Version", + "Check Update On GitHub": "检查更新", + List: "列表", + Add: "添加", + "Add New Monitor": "添加新的监控", + "Quick Stats": "状态速览", + Up: "正常", + Down: "故障", + Pending: "检测失败", + Unknown: "未知", + Pause: "暂停", + Name: "名称", + Status: "状态", + DateTime: "时间", + Message: "事件", + "No important events": "暂无重要事件", + Resume: "恢复", + Edit: "修改", + Delete: "删除", + Current: "当前", + Uptime: "可用率", + "Cert Exp.": "证书过期", + days: "天", + day: "天", + "-day": " 天", + hour: "小时", + "-hour": " 小时", + Response: "响应", + Ping: "Ping", + "Monitor Type": "监控类型", + Keyword: "关键字", + "Friendly Name": "名称", + URL: "网址", + Hostname: "主机名", + Port: "端口号", + "Heartbeat Interval": "心跳间隔", + Retries: "重试次数", + Advanced: "高级选项", + "Upside Down Mode": "反向监控", + "Max. Redirects": "重定向次数", + "Accepted Status Codes": "有效状态码", + Save: "保存", + Notifications: "消息通知", + "Not available, please setup.": "不可用,请设置", + "Setup Notification": "设置通知", + Light: "明亮", + Dark: "黑暗", + Auto: "自动", + "Theme - Heartbeat Bar": "心跳状态显示", + Normal: "正常显示", + Bottom: "靠下显示", + None: "不显示", + Timezone: "时区", + "Search Engine Visibility": "搜索引擎设置", + "Allow indexing": "允许索引", + "Discourage search engines from indexing site": "阻止搜索引擎索引网站", + "Change Password": "修改密码", + "Current Password": "当前密码", + "New Password": "新密码", + "Repeat New Password": "重复新密码", + "Update Password": "更新密码", + "Disable Auth": "禁用身份验证", + "Enable Auth": "启用身份验证", + Logout: "退出", + Leave: "离开", + "I understand, please disable": "我已经了解,继续禁用", + Confirm: "确认", + Yes: "是的", + No: "不是", + Username: "用户名", + Password: "密码", + "Remember me": "请记住我", + Login: "登录", + "No Monitors, please": "没有监控,", + "add one": "添加一个", + "Notification Type": "消息类型", + Email: "邮件", + Test: "测试一下", + "Certificate Info": "证书信息", + "Resolver Server": "解析服务器", + "Resource Record Type": "资源记录类型", + "Last Result": "Last Result", + "Create your admin account": "创建管理员账号", + "Repeat Password": "重复密码", + respTime: "响应时间 (ms)", + notAvailableShort: "N/A" +} From 99725aabe74f088d9fe57e2b6a3d703fd3c07a24 Mon Sep 17 00:00:00 2001 From: Jelle Posthuma Date: Thu, 2 Sep 2021 11:10:54 +0200 Subject: [PATCH 08/35] Add Dutch/Nederlands language (nl_NL) --- src/languages/nl_NL.js | 112 +++++++++++++++++++++++++++++++++++++++++ src/main.js | 2 + 2 files changed, 114 insertions(+) create mode 100644 src/languages/nl_NL.js diff --git a/src/languages/nl_NL.js b/src/languages/nl_NL.js new file mode 100644 index 000000000..b26c17eae --- /dev/null +++ b/src/languages/nl_NL.js @@ -0,0 +1,112 @@ +export default { + languageName: "Nederlands", + checkEverySecond: "Controleer elke {0} seconden.", + "Avg.": "Gem. ", + retriesDescription: "Maximum aantal nieuwe pogingen voordat de service wordt gemarkeerd als niet beschikbaar en er een melding wordt verzonden", + ignoreTLSError: "Negeer TLS/SSL-fout voor HTTPS-websites", + upsideDownModeDescription: "Draai de status om. Als de service bereikbaar is, is deze OFFLINE.", + maxRedirectDescription: "Maximaal aantal te volgen omleidingen. Stel in op 0 om omleidingen uit te schakelen.", + acceptedStatusCodesDescription: "Selecteer statuscodes die als een succesvol antwoord worden beschouwd.", + passwordNotMatchMsg: "Het herhaalwachtwoord komt niet overeen.", + notificationDescription: "Wijs a.u.b. een melding toe aan de monitor(s) om het te laten werken.", + keywordDescription: "Zoek trefwoord in gewone html of JSON-response en het is hoofdlettergevoelig", + pauseDashboardHome: "Gepauzeerd", + deleteMonitorMsg: "Weet u zeker dat u deze monitor wilt verwijderen?", + deleteNotificationMsg: "Weet u zeker dat u deze melding voor alle monitoren wilt verwijderen?", + resoverserverDescription: "Cloudflare is de standaardserver, u kunt de resolver server op elk moment wijzigen.", + rrtypeDescription: "Selecteer het RR-type dat u wilt monitoren", + pauseMonitorMsg: "Weet je zeker dat je wilt pauzeren?", + Settings: "Instellingen", + Dashboard: "Dashboard", + "New Update": "Nieuwe update", + Language: "Taal", + Appearance: "Weergave", + Theme: "Thema", + General: "Algemeen", + Version: "Versie", + "Check Update On GitHub": "Controleer update op GitHub", + List: "Lijst", + Add: "Toevoegen", + "Add New Monitor": "Nieuwe monitor toevoegen", + "Quick Stats": "Snelle statistieken", + Up: "Online", + Down: "Offline", + Pending: "In afwachting", + Unknown: "Onbekend", + Pause: "Pauze", + Name: "Naam", + Status: "Status", + DateTime: "Datum Tijd", + Message: "Bericht", + "No important events": "Geen belangrijke gebeurtenissen", + Resume: "Hervat", + Edit: "Wijzigen", + Delete: "Verwijderen", + Current: "Huidig", + Uptime: "Uptime", + "Cert Exp.": "Cert. verl.", + days: "dagen", + day: "dag", + "-day": "-dag", + hour: "uur", + "-hour": "-uur", + Response: "Antwoord", + Ping: "Ping", + "Monitor Type": "Monitortype:", + Keyword: "Trefwoord", + "Friendly Name": "Vriendelijke naam", + URL: "URL", + Hostname: "Hostnaam", + Port: "Poort", + "Heartbeat Interval": "Hartslaginterval", + Retries: "Pogingen", + Advanced: "Geavanceerd", + "Upside Down Mode": "Ondersteboven modus", + "Max. Redirects": "Max. Omleidingen", + "Accepted Status Codes": "Geaccepteerde statuscodes", + Save: "Opslaan", + Notifications: "Meldingen", + "Not available, please setup.": "Niet beschikbaar, stel a.u.b. in.", + "Setup Notification": "Melding instellen", + Light: "Licht", + Dark: "Donker", + Auto: "Auto", + "Theme - Heartbeat Bar": "Thema - Hartslagbalk", + Normal: "Normaal", + Bottom: "Onderkant", + None: "Geen", + Timezone: "Tijdzone", + "Search Engine Visibility": "Zichtbaarheid voor zoekmachines", + "Allow indexing": "Indexering toestaan", + "Discourage search engines from indexing site": "Ontmoedig zoekmachines om de site te indexeren", + "Change Password": "Verander wachtwoord", + "Current Password": "Huidig ​​wachtwoord", + "New Password": "Nieuw wachtwoord", + "Repeat New Password": "Herhaal nieuw wachtwoord", + "Update Password": "Vernieuw wachtwoord", + "Disable Auth": "Autorisatie uitschakelen", + "Enable Auth": "Autorisatie inschakelen", + Logout: "Uitloggen", + Leave: "Vertrekken", + "I understand, please disable": "Ik begrijp het, schakel a.u.b. uit", + Confirm: "Bevestigen", + Yes: "Ja", + No: "Nee", + Username: "Gebruikersnaam", + Password: "Wachtwoord", + "Remember me": "Wachtwoord onthouden", + Login: "Inloggen", + "No Monitors, please": "Geen monitoren, ", + "add one": "voeg een toe", + "Notification Type": "Melding type", + Email: "E-mail", + Test: "Testen", + "Certificate Info": "Certificaat informatie", + "Resolver Server": "Resolver Server", + "Resource Record Type": "Type bronrecord", + "Last Result": "Laatste resultaat", + "Create your admin account": "Maak uw beheerdersaccount aan", + "Repeat Password": "Herhaal wachtwoord", + respTime: "resp. tijd (ms)", + notAvailableShort: "N.v.t." +} \ No newline at end of file diff --git a/src/main.js b/src/main.js index fe35d3815..b20db3e0f 100644 --- a/src/main.js +++ b/src/main.js @@ -26,6 +26,7 @@ import { appName } from "./util.ts"; import en from "./languages/en"; import zhHK from "./languages/zh-HK"; import deDE from "./languages/de-DE"; +import nlNL from "./languages/nl-NL"; import fr from "./languages/fr"; import ja from "./languages/ja"; import daDK from "./languages/da-DK"; @@ -98,6 +99,7 @@ const languageList = { en, "zh-HK": zhHK, "de-DE": deDE, + "nl-NL": nlNL, "fr": fr, "ja": ja, "da-DK": daDK, From 941788db49bc1643f6b2e0cfa301da779abb483a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B0=E9=80=B8Cary?= Date: Thu, 2 Sep 2021 18:33:09 +0800 Subject: [PATCH 09/35] Chinese Translation (from zh-CN.js) --- src/main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.js b/src/main.js index fe35d3815..fba4b91e7 100644 --- a/src/main.js +++ b/src/main.js @@ -32,6 +32,7 @@ import daDK from "./languages/da-DK"; import svSE from "./languages/sv-SE"; import koKR from "./languages/ko-KR"; import ruRU from "./languages/ru-RU"; +import zhCN from "./languages/zh-CN"; const routes = [ { @@ -104,6 +105,7 @@ const languageList = { "sv-SE": svSE, "ko-KR": koKR, "ru-RU": ruRU, + "zh-CN": zhCN, }; const i18n = createI18n({ From b88b357b55022cc17b202529d4227d82bc91f23a Mon Sep 17 00:00:00 2001 From: LouisLam Date: Thu, 2 Sep 2021 20:18:27 +0800 Subject: [PATCH 10/35] add support for https --- server/server.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/server/server.js b/server/server.js index d4fe668b3..ecdd65025 100644 --- a/server/server.js +++ b/server/server.js @@ -6,6 +6,7 @@ const { sleep, debug, TimeLogger, getRandomInt } = require("../src/util"); console.log("Importing Node libraries") const fs = require("fs"); const http = require("http"); +const https = require("https"); console.log("Importing 3rd-party libraries") debug("Importing express"); @@ -45,9 +46,21 @@ console.info("Version: " + checkVersion.version); const hostname = process.env.HOST || args.host; const port = parseInt(process.env.PORT || args.port || 3001); +// SSL +const sslKey = process.env.SSL_KEY || args.ssl_key || undefined; +const sslCert = process.env.SSL_CERT || args.ssl_cert || undefined; + console.log("Creating express and socket.io instance") const app = express(); -const server = http.createServer(app); + +let server; + +if (sslKey && sslCert) { + https.createServer(app); +} else { + http.createServer(app); +} + const io = new Server(server); app.use(express.json()) From c74986647ef4b262fde05c7076571efd7e5496e6 Mon Sep 17 00:00:00 2001 From: LouisLam Date: Thu, 2 Sep 2021 20:27:18 +0800 Subject: [PATCH 11/35] allow changing data dir --- server/database.js | 5 +++-- server/server.js | 10 ++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/server/database.js b/server/database.js index c0a53a9b8..f9414ad1b 100644 --- a/server/database.js +++ b/server/database.js @@ -5,7 +5,8 @@ const { setSetting, setting } = require("./util-server"); class Database { static templatePath = "./db/kuma.db" - static path = "./data/kuma.db"; + static dataDir = "./data/"; + static path = this.dataDir + "kuma.db"; static latestVersion = 8; static noReject = true; static sqliteInstance = null; @@ -56,7 +57,7 @@ class Database { console.info("Database patch is needed") console.info("Backup the db") - const backupPath = "./data/kuma.db.bak" + version; + const backupPath = this.dataDir + "kuma.db.bak" + version; fs.copyFileSync(Database.path, backupPath); const shmPath = Database.path + "-shm"; diff --git a/server/server.js b/server/server.js index ecdd65025..a87f37c6d 100644 --- a/server/server.js +++ b/server/server.js @@ -50,15 +50,21 @@ const port = parseInt(process.env.PORT || args.port || 3001); const sslKey = process.env.SSL_KEY || args.ssl_key || undefined; const sslCert = process.env.SSL_CERT || args.ssl_cert || undefined; +// Data Directory (must be end with "/") +Database.dataDir = process.env.DATA_DIR || process.env.data_dir || "./data/"; +console.log(`Data Dir: ${Database.dataDir}`); + console.log("Creating express and socket.io instance") const app = express(); let server; if (sslKey && sslCert) { - https.createServer(app); + console.log("Server Type: HTTPS"); + server = https.createServer(app); } else { - http.createServer(app); + console.log("Server Type: HTTP"); + server = http.createServer(app); } const io = new Server(server); From 3ee13bddd1e063d445fc34afb59d5665be3f417d Mon Sep 17 00:00:00 2001 From: LouisLam Date: Thu, 2 Sep 2021 20:36:52 +0800 Subject: [PATCH 12/35] dash style for args --- server/server.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/server.js b/server/server.js index a87f37c6d..7ca6ce0d2 100644 --- a/server/server.js +++ b/server/server.js @@ -47,11 +47,11 @@ const hostname = process.env.HOST || args.host; const port = parseInt(process.env.PORT || args.port || 3001); // SSL -const sslKey = process.env.SSL_KEY || args.ssl_key || undefined; -const sslCert = process.env.SSL_CERT || args.ssl_cert || undefined; +const sslKey = process.env.SSL_KEY || args["ssl-key"] || undefined; +const sslCert = process.env.SSL_CERT || args["ssl-cert"] || undefined; // Data Directory (must be end with "/") -Database.dataDir = process.env.DATA_DIR || process.env.data_dir || "./data/"; +Database.dataDir = process.env.DATA_DIR || args["data-dir"] || "./data/"; console.log(`Data Dir: ${Database.dataDir}`); console.log("Creating express and socket.io instance") From b604807cfe90c01ac8a0ca96c1e0892edc6c6997 Mon Sep 17 00:00:00 2001 From: LouisLam Date: Thu, 2 Sep 2021 20:42:55 +0800 Subject: [PATCH 13/35] create data dir if not exists --- server/database.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/database.js b/server/database.js index f9414ad1b..6db61ea4d 100644 --- a/server/database.js +++ b/server/database.js @@ -12,6 +12,10 @@ class Database { static sqliteInstance = null; static async connect() { + if (! fs.existsSync(this.dataDir)) { + fs.mkdirSync(this.dataDir, { recursive: true }); + } + const acquireConnectionTimeout = 120 * 1000; R.setup("sqlite", { From 6e3e2fc85c8a05426a95660c59276cc7a30b995c Mon Sep 17 00:00:00 2001 From: LouisLam Date: Thu, 2 Sep 2021 21:08:00 +0800 Subject: [PATCH 14/35] fix db path --- server/database.js | 4 ++-- server/server.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/server/database.js b/server/database.js index 6db61ea4d..c4e1bce9f 100644 --- a/server/database.js +++ b/server/database.js @@ -5,8 +5,8 @@ const { setSetting, setting } = require("./util-server"); class Database { static templatePath = "./db/kuma.db" - static dataDir = "./data/"; - static path = this.dataDir + "kuma.db"; + static dataDir; + static path; static latestVersion = 8; static noReject = true; static sqliteInstance = null; diff --git a/server/server.js b/server/server.js index 7ca6ce0d2..3c0d281db 100644 --- a/server/server.js +++ b/server/server.js @@ -52,6 +52,7 @@ const sslCert = process.env.SSL_CERT || args["ssl-cert"] || undefined; // Data Directory (must be end with "/") Database.dataDir = process.env.DATA_DIR || args["data-dir"] || "./data/"; +Database.path = Database.dataDir + "kuma.db"; console.log(`Data Dir: ${Database.dataDir}`); console.log("Creating express and socket.io instance") From 582e14098d2aa74c96f309cdb22b192c14196be0 Mon Sep 17 00:00:00 2001 From: LouisLam Date: Thu, 2 Sep 2021 21:10:18 +0800 Subject: [PATCH 15/35] create data dir before copy --- server/database.js | 4 ---- server/server.js | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/server/database.js b/server/database.js index c4e1bce9f..77c4da758 100644 --- a/server/database.js +++ b/server/database.js @@ -12,10 +12,6 @@ class Database { static sqliteInstance = null; static async connect() { - if (! fs.existsSync(this.dataDir)) { - fs.mkdirSync(this.dataDir, { recursive: true }); - } - const acquireConnectionTimeout = 120 * 1000; R.setup("sqlite", { diff --git a/server/server.js b/server/server.js index 3c0d281db..42a17679b 100644 --- a/server/server.js +++ b/server/server.js @@ -53,6 +53,9 @@ const sslCert = process.env.SSL_CERT || args["ssl-cert"] || undefined; // Data Directory (must be end with "/") Database.dataDir = process.env.DATA_DIR || args["data-dir"] || "./data/"; Database.path = Database.dataDir + "kuma.db"; +if (! fs.existsSync(this.dataDir)) { + fs.mkdirSync(this.dataDir, { recursive: true }); +} console.log(`Data Dir: ${Database.dataDir}`); console.log("Creating express and socket.io instance") From b30b1d3a5201c2a8977c30833fb3080844cbcc6e Mon Sep 17 00:00:00 2001 From: LouisLam Date: Thu, 2 Sep 2021 21:11:20 +0800 Subject: [PATCH 16/35] create data dir before copy --- server/server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/server.js b/server/server.js index 42a17679b..eb3e508f3 100644 --- a/server/server.js +++ b/server/server.js @@ -53,8 +53,8 @@ const sslCert = process.env.SSL_CERT || args["ssl-cert"] || undefined; // Data Directory (must be end with "/") Database.dataDir = process.env.DATA_DIR || args["data-dir"] || "./data/"; Database.path = Database.dataDir + "kuma.db"; -if (! fs.existsSync(this.dataDir)) { - fs.mkdirSync(this.dataDir, { recursive: true }); +if (! fs.existsSync(Database.dataDir)) { + fs.mkdirSync(Database.dataDir, { recursive: true }); } console.log(`Data Dir: ${Database.dataDir}`); From 51cf2ff6f95aa0a87eb931675a43f6ebd55c3989 Mon Sep 17 00:00:00 2001 From: LouisLam Date: Thu, 2 Sep 2021 21:13:59 +0800 Subject: [PATCH 17/35] add missing cert parameters --- server/server.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/server.js b/server/server.js index eb3e508f3..a195c6d25 100644 --- a/server/server.js +++ b/server/server.js @@ -65,7 +65,10 @@ let server; if (sslKey && sslCert) { console.log("Server Type: HTTPS"); - server = https.createServer(app); + server = https.createServer({ + key: sslKey, + cert: sslCert + }, app); } else { console.log("Server Type: HTTP"); server = http.createServer(app); From f23ecef636c9f8c5c62b51d63d889e1c59b4b91e Mon Sep 17 00:00:00 2001 From: LouisLam Date: Thu, 2 Sep 2021 21:16:04 +0800 Subject: [PATCH 18/35] add missing cert parameters --- server/server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/server.js b/server/server.js index a195c6d25..39191de79 100644 --- a/server/server.js +++ b/server/server.js @@ -66,8 +66,8 @@ let server; if (sslKey && sslCert) { console.log("Server Type: HTTPS"); server = https.createServer({ - key: sslKey, - cert: sslCert + key: fs.readFileSync(sslKey), + cert: fs.readFileSync(sslCert) }, app); } else { console.log("Server Type: HTTP"); From d2bf2a551d00fc88f3ddcc4812e0419432d0537a Mon Sep 17 00:00:00 2001 From: "Victor M. Vicente Cuevas" Date: Thu, 2 Sep 2021 16:23:07 +0200 Subject: [PATCH 19/35] Add spanish language and update Readme --- src/languages/README.md | 3 +- src/languages/es-ES.js | 112 ++++++++++++++++++++++++++++++++++++++++ src/pages/Settings.vue | 6 +++ 3 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 src/languages/es-ES.js diff --git a/src/languages/README.md b/src/languages/README.md index 1deeacd6f..afc14d3b5 100644 --- a/src/languages/README.md +++ b/src/languages/README.md @@ -4,7 +4,8 @@ 2. Create a language file. (e.g. `zh-TW.js`) The filename must be ISO language code: http://www.lingoes.net/en/translator/langcode.htm 3. `npm run update-language-files --base-lang=de-DE` 6. Your language file should be filled in. You can translate now. -7. Make a [pull request](https://github.com/louislam/uptime-kuma/pulls) when you have done. +7. Translate `src/pages/Settings.vue` (search for a `Confirm` component with `rel="confirmDisableAuth"`) +8. Make a [pull request](https://github.com/louislam/uptime-kuma/pulls) when you have done. If you do not have programming skills, let me know in [Issues section](https://github.com/louislam/uptime-kuma/issues). I will assist you. 😏 diff --git a/src/languages/es-ES.js b/src/languages/es-ES.js new file mode 100644 index 000000000..734285798 --- /dev/null +++ b/src/languages/es-ES.js @@ -0,0 +1,112 @@ +export default { + languageName: "Español", + checkEverySecond: "Comprobar cada {0} segundos.", + "Avg.": "Media. ", + retriesDescription: "Número máximo de intentos antes de que el servicio se marque como CAÍDO y una notificación sea enviada.", + ignoreTLSError: "Ignorar error TLS/SSL para sitios web HTTPS", + upsideDownModeDescription: "Invertir el estado. Si el servicio es alcanzable, está CAÍDO.", + maxRedirectDescription: "Número máximo de direcciones a seguir. Establecer a 0 para deshabilitar.", + acceptedStatusCodesDescription: "Seleccionar los códigos de estado que se consideran como respuesta exitosa.", + passwordNotMatchMsg: "La contraseña repetida no coincide.", + notificationDescription: "Por favor asigne una notificación a el/los monitor(es) para hacerlos funcional(es).", + keywordDescription: "Palabra clave en HTML plano o respuesta JSON y es sensible a mayúsculas", + pauseDashboardHome: "Pausar", + deleteMonitorMsg: "¿Seguro que quieres eliminar este monitor?", + deleteNotificationMsg: "¿Seguro que quieres eliminar esta notificación para todos los monitores?", + resoverserverDescription: "Cloudflare es el servidor por defecto, puedes cambiar el servidor de resolución en cualquier momento.", + rrtypeDescription: "Selecciona el tipo de registro que quieres monitorizar", + pauseMonitorMsg: "¿Seguro que quieres pausar?", + Settings: "Ajustes", + Dashboard: "Panel", + "New Update": "Vueva actualización", + Language: "Idioma", + Appearance: "Apariencia", + Theme: "Tema", + General: "General", + Version: "Versión", + "Check Update On GitHub": "Comprobar actualizaciones en GitHub", + List: "Lista", + Add: "Añadir", + "Add New Monitor": "Añadir nuevo monitor", + "Quick Stats": "Estadísticas rápidas", + Up: "Funcional", + Down: "Caído", + Pending: "Pendiente", + Unknown: "Desconociso", + Pause: "Pausa", + Name: "Nombre", + Status: "Estado", + DateTime: "Fecha y Hora", + Message: "Mensaje", + "No important events": "No hay eventos importantes", + Resume: "Reanudar", + Edit: "Editar", + Delete: "Eliminar", + Current: "Actual", + Uptime: "Tiempo activo", + "Cert Exp.": "Caducidad cert.", + days: "días", + day: "día", + "-day": "-día", + hour: "hora", + "-hour": "-hora", + Response: "Respuesta", + Ping: "Ping", + "Monitor Type": "Tipo de Monitor", + Keyword: "Palabra clave", + "Friendly Name": "Nombre sencillo", + URL: "URL", + Hostname: "Nombre del host", + Port: "Puerto", + "Heartbeat Interval": "Intervalo de latido", + Retries: "Reintentos", + Advanced: "Avanzado", + "Upside Down Mode": "Modo invertido", + "Max. Redirects": "Máx. redirecciones", + "Accepted Status Codes": "Códigos de estado aceptados", + Save: "Guardar", + Notifications: "Notificaciones", + "Not available, please setup.": "No disponible, por favor configurar.", + "Setup Notification": "Configurar notificación", + Light: "Claro", + Dark: "Oscuro", + Auto: "Auto", + "Theme - Heartbeat Bar": "Tema - Barra de intervalo de latido", + Normal: "Normal", + Bottom: "Abajo", + None: "Ninguno", + Timezone: "Zona horaria", + "Search Engine Visibility": "Visibilidad motor de búsqueda", + "Allow indexing": "Permitir indexación", + "Discourage search engines from indexing site": "Disuadir a los motores de búsqueda de indexar el sitio", + "Change Password": "Cambiar contraseña", + "Current Password": "Contraseña actual", + "New Password": "Nueva contraseña", + "Repeat New Password": "Repetir nueva contraseña", + "Update Password": "Actualizar contraseña", + "Disable Auth": "deshabilitar Autenticación ", + "Enable Auth": "Habilitar Autenticación ", + Logout: "Cerrar sesión", + Leave: "Salir", + "I understand, please disable": "Lo comprendo, por favor deshabilitar", + Confirm: "Confirmar", + Yes: "Sí", + No: "No", + Username: "Usuario", + Password: "Contraseña", + "Remember me": "Recordarme", + Login: "Acceso", + "No Monitors, please": "Sin monitores, por favor", + "add one": "añade uno", + "Notification Type": "Tipo de notificación", + Email: "Email", + Test: "Test", + "Certificate Info": "Información del certificado ", + "Resolver Server": "Servidor de resolución", + "Resource Record Type": "Tipo de Registro", + "Last Result": "Último resultado", + "Create your admin account": "Crea tu cuenta de administrador", + "Repeat Password": "Repetir contraseña", + respTime: "Tiempo de resp. (ms)", + notAvailableShort: "N/A" +} diff --git a/src/pages/Settings.vue b/src/pages/Settings.vue index d71ec109b..85ca0066c 100644 --- a/src/pages/Settings.vue +++ b/src/pages/Settings.vue @@ -172,6 +172,12 @@

Please use it carefully.

+ + + +
From 79fda8f442b8f078c42512db2ab3860cd8d5f609 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Du=C5=A1an=20Simi=C4=87?= Date: Fri, 3 Sep 2021 02:20:01 +0200 Subject: [PATCH 27/35] Add Serbian Latin locale --- src/languages/sr-latn.js | 112 +++++++++++++++++++++++++++++++++++++++ src/main.js | 2 + src/pages/Settings.vue | 6 +++ 3 files changed, 120 insertions(+) create mode 100644 src/languages/sr-latn.js diff --git a/src/languages/sr-latn.js b/src/languages/sr-latn.js new file mode 100644 index 000000000..aa7d95cf9 --- /dev/null +++ b/src/languages/sr-latn.js @@ -0,0 +1,112 @@ +export default { + languageName: "Srpski", + checkEverySecond: "Proveri svakih {0} sekundi.", + "Avg.": "Prosečni ", + retriesDescription: "Maksimum pokušaja pre nego što se servis obeleži kao neaktivan i pošalje se obaveštenje.", + ignoreTLSError: "Ignoriši TLS/SSL greške za HTTPS veb stranice.", + upsideDownModeDescription: "Obrnite status. Ako je servis dostupan, onda je obeležen kao neaktivan.", + maxRedirectDescription: "Maksimani broj preusmerenja da se prate. Postavite na 0 da bi se isključila preusmerenja.", + acceptedStatusCodesDescription: "Odaberite statusne kodove koji se smatraju uspešnim odgovorom.", + passwordNotMatchMsg: "Ponovljena lozinka se ne poklapa.", + notificationDescription: "Molim Vas postavite obaveštenje za masmatrače da bise aktivirali.", + keywordDescription: "Pretraži ključnu reč u čistom html ili JSON odgovoru sa osetljivim velikim i malim slovima", + pauseDashboardHome: "Pauziraj", + deleteMonitorMsg: "Da li ste sigurni da želite da obrišete ovog posmatrača?", + deleteNotificationMsg: "Da li ste sigurni d aželite da uklonite ovo obaveštenje za sve posmatrače?", + resoverserverDescription: "Cloudflare je podrazumevani server. Možete promeniti server za raszrešavanje u bilo kom trenutku.", + rrtypeDescription: "Odaberite RR-Type koji želite da posmatrate", + pauseMonitorMsg: "Da li ste sigurni da želite da pauzirate?", + Settings: "Podešavanja", + Dashboard: "Komandna tabla", + "New Update": "Nova verzija", + Language: "Jezik", + Appearance: "Izgled", + Theme: "Tema", + General: "Opšte", + Version: "Verzija", + "Check Update On GitHub": "Proverite novu verziju na GitHub-u", + List: "Lista", + Add: "Dodaj", + "Add New Monitor": "Dodaj novog posmatrača", + "Quick Stats": "Brze statistike", + Up: "Aktivno", + Down: "Neaktivno", + Pending: "Nerešeno", + Unknown: "Nepoznato", + Pause: "Pauziraj", + Name: "Ime", + Status: "Status", + DateTime: "Datum i vreme", + Message: "Poruka", + "No important events": "Nema bitnih događaja", + Resume: "Nastavi", + Edit: "Izmeni", + Delete: "Ukloni", + Current: "Trenutno", + Uptime: "Vreme rada", + "Cert Exp.": "Istek sert.", + days: "dana", + day: "dan", + "-day": "-dana", + hour: "sat", + "-hour": "-sata", + Response: "Odgovor", + Ping: "Ping", + "Monitor Type": "Tip posmatrača", + Keyword: "Ključna reč", + "Friendly Name": "Prijateljsko ime", + URL: "URL", + Hostname: "Hostname", + Port: "Port", + "Heartbeat Interval": "Interval otkucaja srca", + Retries: "Pokušaji", + Advanced: "Napredno", + "Upside Down Mode": "Naopak mod", + "Max. Redirects": "Maks. preusmerenja", + "Accepted Status Codes": "Prihvaćeni statusni kodovi", + Save: "Sačuvaj", + Notifications: "Obaveštenja", + "Not available, please setup.": "Nije dostupno, molim Vas podesite.", + "Setup Notification": "Postavi obaveštenje", + Light: "Svetlo", + Dark: "Tamno", + Auto: "Automatsko", + "Theme - Heartbeat Bar": "Tema - Traka otkucaja srca", + Normal: "Normalno", + Bottom: "Dole", + None: "Isključeno", + Timezone: "Vremenska zona", + "Search Engine Visibility": "Vidljivost pretraživačima", + "Allow indexing": "Dozvoli indeksiranje", + "Discourage search engines from indexing site": "Odvraćajte pretraživače od indeksiranja sajta", + "Change Password": "Promeni lozinku", + "Current Password": "Trenutna lozinka", + "New Password": "Nova lozinka", + "Repeat New Password": "Ponovi novu lozinku", + "Update Password": "Izmeni lozinku", + "Disable Auth": "Isključi autentifikaciju", + "Enable Auth": "Uključi autentifikaciju", + Logout: "Odloguj se", + Leave: "Izađi", + "I understand, please disable": "Razumem, molim te isključi", + Confirm: "Potvrdi", + Yes: "Da", + No: "Ne", + Username: "Korisničko ime", + Password: "Lozinka", + "Remember me": "Zapamti me", + Login: "Uloguj se", + "No Monitors, please": "Bez posmatrača molim", + "add one": "dodaj jednog", + "Notification Type": "Tip obaveštenja", + Email: "E-pošta", + Test: "Test", + "Certificate Info": "Informacije sertifikata", + "Resolver Server": "Razrešivački server", + "Resource Record Type": "Tip zapisa resursa", + "Last Result": "Poslednji rezultat", + "Create your admin account": "Naprivi administratorski nalog", + "Repeat Password": "Ponovite lozinku", + respTime: "Vreme odg. (ms)", + notAvailableShort: "N/A" +} diff --git a/src/main.js b/src/main.js index 3b00f2401..ecbd0d060 100644 --- a/src/main.js +++ b/src/main.js @@ -30,6 +30,7 @@ import esEs from "./languages/es-ES"; import fr from "./languages/fr"; import ja from "./languages/ja"; import daDK from "./languages/da-DK"; +import srLatn from "./languages/sr-latn"; import svSE from "./languages/sv-SE"; import koKR from "./languages/ko-KR"; import ruRU from "./languages/ru-RU"; @@ -104,6 +105,7 @@ const languageList = { "fr": fr, "ja": ja, "da-DK": daDK, + "sr-latn": srLatn, "sv-SE": svSE, "ko-KR": koKR, "ru-RU": ruRU, diff --git a/src/pages/Settings.vue b/src/pages/Settings.vue index 85ca0066c..95f977dcd 100644 --- a/src/pages/Settings.vue +++ b/src/pages/Settings.vue @@ -189,6 +189,12 @@

Es ist für jemanden der eine externe Authentifizierung vor Uptime Kuma geschaltet hat, wie z.B. Cloudflare Access.

Bitte mit Vorsicht nutzen.

+ + From 19a4d570ecb36f4177ffd6ceaee06b63786c4b32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Du=C5=A1an=20Simi=C4=87?= Date: Fri, 3 Sep 2021 02:24:31 +0200 Subject: [PATCH 28/35] Fix word capitalization --- src/pages/Settings.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Settings.vue b/src/pages/Settings.vue index 679a2a7e6..c90dcc145 100644 --- a/src/pages/Settings.vue +++ b/src/pages/Settings.vue @@ -193,7 +193,7 @@ From 18616ee590075b6e71e187ba9960f97eee4ce4c7 Mon Sep 17 00:00:00 2001 From: Nelson Chan Date: Fri, 3 Sep 2021 12:05:49 +0800 Subject: [PATCH 29/35] Fix: Fix Notification "Test" btn styling --- src/assets/app.scss | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/assets/app.scss b/src/assets/app.scss index 41248a5c4..1f75e97fc 100644 --- a/src/assets/app.scss +++ b/src/assets/app.scss @@ -71,6 +71,14 @@ h2 { } } +.btn-warning { + color: white; + + &:hover, &:active, &:focus, &.active { + color: white; + } +} + .btn-info { color: white; @@ -186,6 +194,14 @@ h2 { color: white; } + .btn-warning { + color: $dark-font-color2; + + &:hover, &:active, &:focus, &.active { + color: $dark-font-color2; + } + } + .btn-close { box-shadow: none; filter: invert(1); From 312aedf391139e6a121876e4fd29af88c5a06389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B0=E9=80=B8Cary?= Date: Fri, 3 Sep 2021 13:33:26 +0800 Subject: [PATCH 30/35] =?UTF-8?q?Update=20Chinese=20Translation=EF=BC=88?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=AE=80=E4=BD=93=E4=B8=AD=E6=96=87=E8=AF=AD?= =?UTF-8?q?=E8=A8=80=E7=BF=BB=E8=AF=91=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/languages/zh-CN.js | 42 +++++++++++++++++++++--------------------- src/pages/Settings.vue | 6 ++++++ 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/src/languages/zh-CN.js b/src/languages/zh-CN.js index b67f1d5a0..d179a91af 100644 --- a/src/languages/zh-CN.js +++ b/src/languages/zh-CN.js @@ -1,20 +1,20 @@ export default { languageName: "简体中文", checkEverySecond: "检测频率 {0} 秒", - "Avg.": "平均 ", - retriesDescription: "最大重试次数", + "Avg.": "平均", + retriesDescription: "最大重试失败次数", ignoreTLSError: "忽略HTTPS站点的证书错误", - upsideDownModeDescription: "反向状态监控", + upsideDownModeDescription: "反向状态监控(状态码范围外为有效状态,反之为无效)", maxRedirectDescription: "最大重定向次数,设置为 0 禁止重定向", acceptedStatusCodesDescription: "选择被视为成功响应的状态码", passwordNotMatchMsg: "两次密码输入不一致", - notificationDescription: "请先设置一个消息通知", + notificationDescription: "请为监控项配置消息通知", keywordDescription: "检测响应内容中的关键字,区分大小写", - pauseDashboardHome: "Pause", + pauseDashboardHome: "暂停", deleteMonitorMsg: "确定要删除此监控吗?", deleteNotificationMsg: "确定要删除此消息通知吗?这将对所有监控生效。", resoverserverDescription: "默认服务器 Cloudflare,可以修改为任意你想要使用的DNS服务器", - rrtypeDescription: "选择您要监控的资源记录类型", + rrtypeDescription: "选择要监控的资源记录类型", pauseMonitorMsg: "确定要暂停吗?", Settings: "设置", Dashboard: "仪表盘", @@ -27,7 +27,7 @@ export default { "Check Update On GitHub": "检查更新", List: "列表", Add: "添加", - "Add New Monitor": "添加新的监控", + "Add New Monitor": "创建监控项", "Quick Stats": "状态速览", Up: "正常", Down: "故障", @@ -50,12 +50,12 @@ export default { "-day": " 天", hour: "小时", "-hour": " 小时", - Response: "响应", + Response: "响应时长", Ping: "Ping", "Monitor Type": "监控类型", Keyword: "关键字", - "Friendly Name": "名称", - URL: "网址", + "Friendly Name": "自定义名称", + URL: "网址URL", Hostname: "主机名", Port: "端口号", "Heartbeat Interval": "心跳间隔", @@ -66,12 +66,12 @@ export default { "Accepted Status Codes": "有效状态码", Save: "保存", Notifications: "消息通知", - "Not available, please setup.": "不可用,请设置", + "Not available, please setup.": "无可用通道,请先设置", "Setup Notification": "设置通知", Light: "明亮", Dark: "黑暗", Auto: "自动", - "Theme - Heartbeat Bar": "心跳状态显示", + "Theme - Heartbeat Bar": "状态显示", Normal: "正常显示", Bottom: "靠下显示", None: "不显示", @@ -81,23 +81,23 @@ export default { "Discourage search engines from indexing site": "阻止搜索引擎索引网站", "Change Password": "修改密码", "Current Password": "当前密码", - "New Password": "新密码", - "Repeat New Password": "重复新密码", + "New Password": "新的密码", + "Repeat New Password": "重复新的密码", "Update Password": "更新密码", "Disable Auth": "禁用身份验证", "Enable Auth": "启用身份验证", Logout: "退出", Leave: "离开", - "I understand, please disable": "我已经了解,继续禁用", + "I understand, please disable": "我已了解,继续禁用", Confirm: "确认", - Yes: "是的", - No: "不是", + Yes: "确定", + No: "取消", Username: "用户名", Password: "密码", - "Remember me": "请记住我", + "Remember me": "记住登录", Login: "登录", - "No Monitors, please": "没有监控,", - "add one": "添加一个", + "No Monitors, please": "还没有监控项,", + "add one": "点击新增", "Notification Type": "消息类型", Email: "邮件", Test: "测试一下", @@ -107,6 +107,6 @@ export default { "Last Result": "Last Result", "Create your admin account": "创建管理员账号", "Repeat Password": "重复密码", - respTime: "响应时间 (ms)", + respTime: "Resp. Time (ms)", notAvailableShort: "N/A" } diff --git a/src/pages/Settings.vue b/src/pages/Settings.vue index d71ec109b..a1cdd17c5 100644 --- a/src/pages/Settings.vue +++ b/src/pages/Settings.vue @@ -178,6 +178,12 @@

請小心使用。

+ + + +