Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
v-for="affiliation in affiliationOptions"
:key="affiliation.value"
v-model="org_or_personal"
:value="affiliation.value"
:buttonValue="affiliation.value"
:invalid="errors.org_or_personal"
:showInvalidText="errors.org_or_personal"
:invalidText="$tr('fieldRequiredText')"
Expand Down Expand Up @@ -172,7 +172,7 @@
v-for="orgType in organizationTypeOptions"
:key="orgType.value"
v-model="organization_type"
:value="orgType.value"
:buttonValue="orgType.value"
:invalid="errors.organization_type"
:showInvalidText="errors.organization_type"
:invalidText="$tr('fieldRequiredText')"
Expand All @@ -199,7 +199,7 @@
v-for="constraint in timeConstraintOptions"
:key="constraint.value"
v-model="time_constraint"
:value="constraint.value"
:buttonValue="constraint.value"
:label="constraint.text"
/>

Expand Down
24 changes: 17 additions & 7 deletions contentcuration/contentcuration/frontend/shared/i18n/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
import Vue from 'vue';
import has from 'lodash/has';
import { languageDirections, defaultLanguage } from 'kolibri-design-system/lib/utils/i18n';
import importVueIntlLocaleData from './vue-intl-locale-data';
import importIntlLocale from './intl-locale-data';

export {
languageDirections,
defaultLanguage,
languageValidator,
getContentLangDir,
} from 'kolibri-design-system/lib/utils/i18n';
const languageDirections = {
LTR: 'ltr',
RTL: 'rtl',
};
const defaultLanguage = {
id: 'en',
lang_name: 'English',
lang_direction: languageDirections.LTR,
};
const languageValidator = language => {
return ['id', 'lang_name', 'lang_direction'].reduce((valid, key) => valid && language[key], true);
};
const getContentLangDir = language => {
return (language || {}).lang_direction || languageDirections.LTR;
};

export { languageDirections, defaultLanguage, languageValidator, getContentLangDir };

let _i18nReady = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
v-for="language in languageCol"
:key="language.id"
v-model="selectedLanguage"
:value="language.id"
:buttonValue="language.id"
:label="language.lang_name"
:title="language.english_name"
class="language-name"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"jspdf": "https://github.com/parallax/jsPDF.git#b7a1d8239c596292ce86dafa77f05987bcfa2e6e",
"jszip": "^3.10.1",
"kolibri-constants": "^0.2.0",
"kolibri-design-system": "https://github.com/learningequality/kolibri-design-system#e9a2ff34716bb6412fe99f835ded5b17345bab94",
"kolibri-design-system": "https://github.com/learningequality/kolibri-design-system#v3.0.0",
"lodash": "^4.17.21",
"material-icons": "0.3.1",
"mutex-js": "^1.1.5",
Expand Down
25 changes: 22 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3083,6 +3083,11 @@
optionalDependencies:
prettier "^1.18.2 || ^2.0.0"

"@vue/composition-api@^1.7.2":
version "1.7.2"
resolved "https://registry.yarnpkg.com/@vue/composition-api/-/composition-api-1.7.2.tgz#0b656f3ec39fefc2cf40aaa8c12426bcfeae1b44"
integrity sha512-M8jm9J/laYrYT02665HkZ5l2fWTK4dcVg3BsDHm/pfz+MjDYwX+9FUaZyGwEyXEDonQYRCo0H7aLgdklcIELjw==

"@vue/[email protected]":
version "1.0.0-beta.29"
resolved "https://registry.yarnpkg.com/@vue/test-utils/-/test-utils-1.0.0-beta.29.tgz#c942cf25e891cf081b6a03332b4ae1ef430726f0"
Expand Down Expand Up @@ -5125,6 +5130,11 @@ data-urls@^3.0.2:
whatwg-mimetype "^3.0.0"
whatwg-url "^11.0.0"

date-fns@^1.30.1:
version "1.30.1"
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c"
integrity sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==

de-indent@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/de-indent/-/de-indent-1.0.2.tgz#b2038e846dc33baa5796128d0804b455b8c1e21d"
Expand Down Expand Up @@ -9106,20 +9116,24 @@ kolibri-constants@^0.2.0:
resolved "https://registry.yarnpkg.com/kolibri-constants/-/kolibri-constants-0.2.0.tgz#47c9d773894e23251ba5ac4db420822e45603142"
integrity sha512-WYDMGDzB9gNxRbpX1O2cGe1HrJvLvSZGwMuAv6dqrxJgPf7iO+Hi40/1CXjHM7nk5CRt+hn5bqnMzCBmj1omPA==

"kolibri-design-system@https://github.com/learningequality/kolibri-design-system#e9a2ff34716bb6412fe99f835ded5b17345bab94":
"kolibri-design-system@https://github.com/learningequality/kolibri-design-system#v3.0.0":
version "1.3.0"
resolved "https://github.com/learningequality/kolibri-design-system#e9a2ff34716bb6412fe99f835ded5b17345bab94"
resolved "https://github.com/learningequality/kolibri-design-system#24a7dfef611f7daf1432bbb9e0f569a0f9821844"
dependencies:
"@vue/composition-api" "^1.7.2"
aphrodite "https://github.com/learningequality/aphrodite/"
autosize "^3.0.21"
css-element-queries "^1.2.0"
date-fns "^1.30.1"
frame-throttle "^3.0.0"
fuzzysearch "^1.0.3"
keen-ui "^1.3.0"
lodash "^4.17.15"
popper.js "^1.14.6"
purecss "^0.6.2"
tippy.js "^4.2.1"
vue-intl "^3.1.0"
xstate "^4.38.3"

[email protected]:
version "0.16.0-dev.3"
Expand Down Expand Up @@ -13474,7 +13488,7 @@ vue-hot-reload-api@^2.3.0:
resolved "https://registry.yarnpkg.com/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz#532955cc1eb208a3d990b3a9f9a70574657e08f2"
integrity sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==

vue-intl@^3.0.0:
vue-intl@^3.0.0, vue-intl@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/vue-intl/-/vue-intl-3.1.0.tgz#707f1f7406595c9b4afc6049254b333093be37be"
integrity sha512-0v3S5gspuYnt6j1G+KLfPUsNnjRdbMOcYrWYoSd1gYk6rX8VuOyh7NLztPrSIJt+NLs/qzLOZXxI1LORukEiqA==
Expand Down Expand Up @@ -14177,6 +14191,11 @@ xmldom@^0.1.22:
resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.31.tgz#b76c9a1bd9f0a9737e5a72dc37231cf38375e2ff"
integrity sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ==

xstate@^4.38.3:
version "4.38.3"
resolved "https://registry.yarnpkg.com/xstate/-/xstate-4.38.3.tgz#4e15e7ad3aa0ca1eea2010548a5379966d8f1075"
integrity sha512-SH7nAaaPQx57dx6qvfcIgqKRXIh4L0A1iYEqim4s1u7c9VoCgzZc+63FY90AKU4ZzOC2cfJzTnpO4zK7fCUzzw==

xtend@^4.0.0:
version "4.0.2"
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54"
Expand Down