提交 f175a46f 编写于 作者: Q qiang

chore: build

上级 e614e770
......@@ -1480,13 +1480,17 @@ var zhHant = {
"uni.chooseLocation.cancel": "取消"
};
const messages = {
en,
es,
fr,
'zh-Hans': zhHans,
'zh-Hant': zhHant
};
const messages = {};
{
Object.assign(messages, {
en,
es,
fr,
'zh-Hans': zhHans,
'zh-Hant': zhHant
});
}
let locale;
......@@ -1498,6 +1502,26 @@ let locale;
}
}
function initI18nMessages () {
if (!isEnableLocale()) {
return
}
const localeKeys = Object.keys(__uniConfig.locales);
if (localeKeys.length) {
localeKeys.forEach((locale) => {
const curMessages = messages[locale];
const userMessages = __uniConfig.locales[locale];
if (curMessages) {
Object.assign(curMessages, userMessages);
} else {
messages[locale] = userMessages;
}
});
}
}
initI18nMessages();
const i18n = initVueI18n(
locale,
messages
......@@ -1538,7 +1562,20 @@ function initAppLocale (Vue, appVm, locale) {
localeWatchers.forEach(watch => watch(v));
}
});
}
}
function isEnableLocale () {
return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length
}
// export function initI18n() {
// const localeKeys = Object.keys(__uniConfig.locales || {})
// if (localeKeys.length) {
// localeKeys.forEach((locale) =>
// i18n.add(locale, __uniConfig.locales[locale])
// )
// }
// }
class EventChannel {
constructor (id, events) {
......
......@@ -1702,13 +1702,17 @@ var serviceContext = (function () {
"uni.chooseLocation.cancel": "取消"
};
const messages = {
en,
es,
fr,
'zh-Hans': zhHans,
'zh-Hant': zhHant
};
const messages = {};
{
Object.assign(messages, {
en,
es,
fr,
'zh-Hans': zhHans,
'zh-Hant': zhHant
});
}
let locale;
......@@ -5802,7 +5806,7 @@ var serviceContext = (function () {
animationDuration: 200,
uniNView: {
path: `${(typeof process === 'object' && process.env && process.env.VUE_APP_TEMPLATE_PATH) || ''}/${url}.js`,
defaultFontSize: plus_.screen.resolutionWidth / 20,
defaultFontSize: 16,
viewport: plus_.screen.resolutionWidth
}
};
......
......@@ -2051,12 +2051,34 @@ function handleEvent (event) {
}
}
const messages = {};
let locale;
{
locale = my.getSystemInfoSync().language;
}
function initI18nMessages () {
if (!isEnableLocale()) {
return
}
const localeKeys = Object.keys(__uniConfig.locales);
if (localeKeys.length) {
localeKeys.forEach((locale) => {
const curMessages = messages[locale];
const userMessages = __uniConfig.locales[locale];
if (curMessages) {
Object.assign(curMessages, userMessages);
} else {
messages[locale] = userMessages;
}
});
}
}
initI18nMessages();
const i18n = initVueI18n(
locale,
{}
......@@ -2097,7 +2119,20 @@ function initAppLocale (Vue, appVm, locale) {
localeWatchers.forEach(watch => watch(v));
}
});
}
}
function isEnableLocale () {
return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length
}
// export function initI18n() {
// const localeKeys = Object.keys(__uniConfig.locales || {})
// if (localeKeys.length) {
// localeKeys.forEach((locale) =>
// i18n.add(locale, __uniConfig.locales[locale])
// )
// }
// }
const hooks = [
'onShow',
......
......@@ -1729,12 +1729,34 @@ function handleEvent (event) {
}
}
const messages = {};
let locale;
{
locale = swan.getSystemInfoSync().language;
}
function initI18nMessages () {
if (!isEnableLocale()) {
return
}
const localeKeys = Object.keys(__uniConfig.locales);
if (localeKeys.length) {
localeKeys.forEach((locale) => {
const curMessages = messages[locale];
const userMessages = __uniConfig.locales[locale];
if (curMessages) {
Object.assign(curMessages, userMessages);
} else {
messages[locale] = userMessages;
}
});
}
}
initI18nMessages();
const i18n = initVueI18n(
locale,
{}
......@@ -1775,7 +1797,20 @@ function initAppLocale (Vue, appVm, locale) {
localeWatchers.forEach(watch => watch(v));
}
});
}
}
function isEnableLocale () {
return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length
}
// export function initI18n() {
// const localeKeys = Object.keys(__uniConfig.locales || {})
// if (localeKeys.length) {
// localeKeys.forEach((locale) =>
// i18n.add(locale, __uniConfig.locales[locale])
// )
// }
// }
const hooks = [
'onShow',
......
......@@ -1478,12 +1478,34 @@ function handleEvent (event) {
}
}
const messages = {};
let locale;
{
locale = ks.getSystemInfoSync().language;
}
function initI18nMessages () {
if (!isEnableLocale()) {
return
}
const localeKeys = Object.keys(__uniConfig.locales);
if (localeKeys.length) {
localeKeys.forEach((locale) => {
const curMessages = messages[locale];
const userMessages = __uniConfig.locales[locale];
if (curMessages) {
Object.assign(curMessages, userMessages);
} else {
messages[locale] = userMessages;
}
});
}
}
initI18nMessages();
const i18n = initVueI18n(
locale,
{}
......@@ -1524,7 +1546,20 @@ function initAppLocale (Vue, appVm, locale) {
localeWatchers.forEach(watch => watch(v));
}
});
}
}
function isEnableLocale () {
return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length
}
// export function initI18n() {
// const localeKeys = Object.keys(__uniConfig.locales || {})
// if (localeKeys.length) {
// localeKeys.forEach((locale) =>
// i18n.add(locale, __uniConfig.locales[locale])
// )
// }
// }
const hooks = [
'onShow',
......
......@@ -1528,12 +1528,34 @@ function handleEvent (event) {
}
}
const messages = {};
let locale;
{
locale = tt.getSystemInfoSync().language;
}
function initI18nMessages () {
if (!isEnableLocale()) {
return
}
const localeKeys = Object.keys(__uniConfig.locales);
if (localeKeys.length) {
localeKeys.forEach((locale) => {
const curMessages = messages[locale];
const userMessages = __uniConfig.locales[locale];
if (curMessages) {
Object.assign(curMessages, userMessages);
} else {
messages[locale] = userMessages;
}
});
}
}
initI18nMessages();
const i18n = initVueI18n(
locale,
{}
......@@ -1574,7 +1596,20 @@ function initAppLocale (Vue, appVm, locale) {
localeWatchers.forEach(watch => watch(v));
}
});
}
}
function isEnableLocale () {
return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length
}
// export function initI18n() {
// const localeKeys = Object.keys(__uniConfig.locales || {})
// if (localeKeys.length) {
// localeKeys.forEach((locale) =>
// i18n.add(locale, __uniConfig.locales[locale])
// )
// }
// }
const hooks = [
'onShow',
......
......@@ -1639,12 +1639,34 @@ function handleEvent (event) {
}
}
const messages = {};
let locale;
{
locale = wx.getSystemInfoSync().language;
}
function initI18nMessages () {
if (!isEnableLocale()) {
return
}
const localeKeys = Object.keys(__uniConfig.locales);
if (localeKeys.length) {
localeKeys.forEach((locale) => {
const curMessages = messages[locale];
const userMessages = __uniConfig.locales[locale];
if (curMessages) {
Object.assign(curMessages, userMessages);
} else {
messages[locale] = userMessages;
}
});
}
}
initI18nMessages();
const i18n = initVueI18n(
locale,
{}
......@@ -1685,7 +1707,20 @@ function initAppLocale (Vue, appVm, locale) {
localeWatchers.forEach(watch => watch(v));
}
});
}
}
function isEnableLocale () {
return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length
}
// export function initI18n() {
// const localeKeys = Object.keys(__uniConfig.locales || {})
// if (localeKeys.length) {
// localeKeys.forEach((locale) =>
// i18n.add(locale, __uniConfig.locales[locale])
// )
// }
// }
const hooks = [
'onShow',
......
......@@ -1735,12 +1735,34 @@ function handleEvent (event) {
}
}
const messages = {};
let locale;
{
locale = tt.getSystemInfoSync().language;
}
function initI18nMessages () {
if (!isEnableLocale()) {
return
}
const localeKeys = Object.keys(__uniConfig.locales);
if (localeKeys.length) {
localeKeys.forEach((locale) => {
const curMessages = messages[locale];
const userMessages = __uniConfig.locales[locale];
if (curMessages) {
Object.assign(curMessages, userMessages);
} else {
messages[locale] = userMessages;
}
});
}
}
initI18nMessages();
const i18n = initVueI18n(
locale,
{}
......@@ -1781,7 +1803,20 @@ function initAppLocale (Vue, appVm, locale) {
localeWatchers.forEach(watch => watch(v));
}
});
}
}
function isEnableLocale () {
return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length
}
// export function initI18n() {
// const localeKeys = Object.keys(__uniConfig.locales || {})
// if (localeKeys.length) {
// localeKeys.forEach((locale) =>
// i18n.add(locale, __uniConfig.locales[locale])
// )
// }
// }
const hooks = [
'onShow',
......
......@@ -1370,12 +1370,34 @@ function handleEvent (event) {
}
}
const messages = {};
let locale;
{
locale = wx.getSystemInfoSync().language;
}
function initI18nMessages () {
if (!isEnableLocale()) {
return
}
const localeKeys = Object.keys(__uniConfig.locales);
if (localeKeys.length) {
localeKeys.forEach((locale) => {
const curMessages = messages[locale];
const userMessages = __uniConfig.locales[locale];
if (curMessages) {
Object.assign(curMessages, userMessages);
} else {
messages[locale] = userMessages;
}
});
}
}
initI18nMessages();
const i18n = initVueI18n(
locale,
{}
......@@ -1416,7 +1438,20 @@ function initAppLocale (Vue, appVm, locale) {
localeWatchers.forEach(watch => watch(v));
}
});
}
}
function isEnableLocale () {
return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length
}
// export function initI18n() {
// const localeKeys = Object.keys(__uniConfig.locales || {})
// if (localeKeys.length) {
// localeKeys.forEach((locale) =>
// i18n.add(locale, __uniConfig.locales[locale])
// )
// }
// }
const eventChannels = {};
......
......@@ -1445,12 +1445,34 @@ function handleEvent (event) {
}
}
const messages = {};
let locale;
{
locale = qa.getSystemInfoSync().language;
}
function initI18nMessages () {
if (!isEnableLocale()) {
return
}
const localeKeys = Object.keys(__uniConfig.locales);
if (localeKeys.length) {
localeKeys.forEach((locale) => {
const curMessages = messages[locale];
const userMessages = __uniConfig.locales[locale];
if (curMessages) {
Object.assign(curMessages, userMessages);
} else {
messages[locale] = userMessages;
}
});
}
}
initI18nMessages();
const i18n = initVueI18n(
locale,
{}
......@@ -1491,7 +1513,20 @@ function initAppLocale (Vue, appVm, locale) {
localeWatchers.forEach(watch => watch(v));
}
});
}
}
function isEnableLocale () {
return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length
}
// export function initI18n() {
// const localeKeys = Object.keys(__uniConfig.locales || {})
// if (localeKeys.length) {
// localeKeys.forEach((locale) =>
// i18n.add(locale, __uniConfig.locales[locale])
// )
// }
// }
const hooks = [
'onShow',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册