diff --git a/changelog/unreleased/enhancement-use-ods-translations b/changelog/unreleased/enhancement-use-ods-translations new file mode 100644 index 00000000000..d4b182cd9c7 --- /dev/null +++ b/changelog/unreleased/enhancement-use-ods-translations @@ -0,0 +1,7 @@ +Enhancement: Use ODS translations + +Some ODS components were using their own translation strings which were availabel in the ODS but +not exported there/imported in the web project. Now, we import the translation strings from the ODS package +and merge them with the web translations. + +https://github.com/owncloud/web/pull/4934 diff --git a/packages/web-runtime/src/index.js b/packages/web-runtime/src/index.js index 549e675f117..f0629fd81aa 100644 --- a/packages/web-runtime/src/index.js +++ b/packages/web-runtime/src/index.js @@ -25,6 +25,7 @@ import Vue2TouchEvents from 'vue2-touch-events' // --- Gettext ---- import GetTextPlugin from 'vue-gettext' import coreTranslations from '../l10n/translations.json' +import odsTranslations from 'owncloud-design-system/dist/system/translations.json' // --- Image source ---- import MediaSource from './plugins/mediaSource.js' @@ -47,6 +48,8 @@ import { registerClient } from './services/clientRegistration' import { loadConfig } from './helpers/config' import { loadTheme } from './helpers/theme' +import merge from 'lodash-es/merge' + wgxpath.install() Vue.prototype.$client = new OwnCloud() @@ -81,7 +84,8 @@ const supportedLanguages = { it: 'Italiano', gl: 'Galego' } -const translations = coreTranslations + +const translations = merge({}, coreTranslations, odsTranslations) const loadApp = async path => { const app = await new Promise((resolve, reject) =>