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; } }