From aa54e053ee386b4e3216af87b74e166d86a19976 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=85=E5=BF=B5?= Date: Thu, 3 Apr 2025 13:17:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E6=8B=89=E7=BB=84=E4=BB=B6=E5=8A=A0?= =?UTF-8?q?=E4=BF=84=E8=AF=AD=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/z-paging/i18n/index.js | 2 ++ .../z-paging/components/z-paging/i18n/ru.json | 23 +++++++++++++++++++ .../components/z-paging/js/modules/i18n.js | 3 +++ 3 files changed, 28 insertions(+) create mode 100644 uni_modules/z-paging/components/z-paging/i18n/ru.json diff --git a/uni_modules/z-paging/components/z-paging/i18n/index.js b/uni_modules/z-paging/components/z-paging/i18n/index.js index de7509c..11f2427 100644 --- a/uni_modules/z-paging/components/z-paging/i18n/index.js +++ b/uni_modules/z-paging/components/z-paging/i18n/index.js @@ -1,7 +1,9 @@ +import ru from './ru.json' import en from './en.json' import zhHans from './zh-Hans.json' import zhHant from './zh-Hant.json' export default { + ru, en, 'zh-Hans': zhHans, 'zh-Hant': zhHant diff --git a/uni_modules/z-paging/components/z-paging/i18n/ru.json b/uni_modules/z-paging/components/z-paging/i18n/ru.json new file mode 100644 index 0000000..88cfda0 --- /dev/null +++ b/uni_modules/z-paging/components/z-paging/i18n/ru.json @@ -0,0 +1,23 @@ +{ + "zp.refresher.default": "Потяните для обновления", + "zp.refresher.pulling": "Отпустите для обновления", + "zp.refresher.refreshing": "Обновление...", + "zp.refresher.complete": "Успешно обновлено", + "zp.refresher.f2": "Отпустите для перехода на второй этаж", + + "zp.loadingMore.default": "Нажмите чтобы загрузить ещё", + "zp.loadingMore.loading": "Загрузка...", + "zp.loadingMore.noMore": "Больше нет данных", + "zp.loadingMore.fail": "Ошибка загрузки, нажмите чтобы повторить", + + "zp.emptyView.title": "Нет данных", + "zp.emptyView.reload": "Обновить", + "zp.emptyView.error": "Ошибка загрузки", + + "zp.refresherUpdateTime.title": "Последнее обновление: ", + "zp.refresherUpdateTime.none": "Нет данных", + "zp.refresherUpdateTime.today": "Сегодня", + "zp.refresherUpdateTime.yesterday": "Вчера", + + "zp.systemLoading.title": "Загрузка..." +} \ No newline at end of file diff --git a/uni_modules/z-paging/components/z-paging/js/modules/i18n.js b/uni_modules/z-paging/components/z-paging/js/modules/i18n.js index b521c8e..9a8fa1c 100644 --- a/uni_modules/z-paging/components/z-paging/js/modules/i18n.js +++ b/uni_modules/z-paging/components/z-paging/js/modules/i18n.js @@ -8,6 +8,7 @@ import c from '.././z-paging-constant' import interceptor from '../z-paging-interceptor' const language = uni.getSystemInfoSync().language; +console.log(uni.getLocale()) export default { data() { return { @@ -94,6 +95,7 @@ export default { }, // 获取国际化转换后的文本 _getI18nText(key, value) { + console.log(this.finalLanguage) const dataType = Object.prototype.toString.call(value); if (dataType === '[object Object]') { const nextValue = value[this.finalLanguage]; @@ -113,6 +115,7 @@ export default { return 'zh-Hant'; } if (formatedLanguage.indexOf('en') !== -1) return 'en'; + if (formatedLanguage.indexOf('ru') !== -1) return 'ru'; return language; } }