Skip to content

Commit

Permalink
Merge pull request #4934 from owncloud/08042021_import-ods-translations
Browse files Browse the repository at this point in the history
Import ODS translations & merge with web translations
  • Loading branch information
Pascal Wengerter committed Apr 9, 2021
2 parents 535f358 + 1c83615 commit 3814af7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions changelog/unreleased/enhancement-use-ods-translations
Original file line number Diff line number Diff line change
@@ -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
6 changes: 5 additions & 1 deletion packages/web-runtime/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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()
Expand Down Expand Up @@ -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) =>
Expand Down

0 comments on commit 3814af7

Please sign in to comment.