Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import ODS translations & merge with web translations #4934

Merged
merged 1 commit into from
Apr 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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