mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-11-13 23:42:52 -05:00
feature/recipe-patch-improvements (#382)
* automated docs update * recipe rating component * recipe partial updates - closes #25 * use Vue.delete to update store * format * arrow functions * fix tests * format * initial context menu * localize * add confirmation dialog * context menu * fix bare exception * update line length * format all file with prettier * update changelog * download as json * update python dependencies * update javascript dependencies Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
@@ -3,7 +3,6 @@ import VueI18n from "vue-i18n";
|
||||
|
||||
Vue.use(VueI18n);
|
||||
|
||||
|
||||
function parseLocaleFiles(locales) {
|
||||
const messages = {};
|
||||
locales.keys().forEach(key => {
|
||||
@@ -17,27 +16,18 @@ function parseLocaleFiles(locales) {
|
||||
}
|
||||
|
||||
function loadLocaleMessages() {
|
||||
const locales = require.context(
|
||||
"./locales/messages",
|
||||
true,
|
||||
/[A-Za-z0-9-_,\s]+\.json$/i
|
||||
);
|
||||
const locales = require.context("./locales/messages", true, /[A-Za-z0-9-_,\s]+\.json$/i);
|
||||
return parseLocaleFiles(locales);
|
||||
}
|
||||
|
||||
function loadDateTimeFormats() {
|
||||
const locales = require.context(
|
||||
"./locales/dateTimeFormats",
|
||||
true,
|
||||
/[A-Za-z0-9-_,\s]+\.json$/i
|
||||
);
|
||||
const locales = require.context("./locales/dateTimeFormats", true, /[A-Za-z0-9-_,\s]+\.json$/i);
|
||||
return parseLocaleFiles(locales);
|
||||
}
|
||||
|
||||
|
||||
export default new VueI18n({
|
||||
locale: "en-US",
|
||||
fallbackLocale: process.env.VUE_APP_I18N_FALLBACK_LOCALE || "en-US",
|
||||
messages: loadLocaleMessages(),
|
||||
dateTimeFormats: loadDateTimeFormats()
|
||||
dateTimeFormats: loadDateTimeFormats(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user