Skip to content

Commit

Permalink
[pre-commit.ci lite] apply automatic fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci-lite[bot] authored Nov 21, 2024
1 parent 1e4a4b1 commit 2cca367
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@
import commonCoreStrings from 'kolibri/uiText/commonCoreStrings';
import CoachContentLabel from 'kolibri-common/components/labels/CoachContentLabel';
import useSnackbar from 'kolibri/composables/useSnackbar';
import { searchAndFilterStrings } from 'kolibri-common/strings/searchAndFilterStrings';
import { coachStrings } from '../../common/commonCoachStrings';
import { PageNames } from '../../../constants';
import { searchAndFilterStrings } from 'kolibri-common/strings/searchAndFilterStrings';
// This is a simplified version of ResourceListTable that is supposed to work
// outside of the LessonSummaryPage workflow.
Expand All @@ -137,8 +137,8 @@
noResourcesInLessonLabel$,
createSnackbar,
clearSnackbar,
moveResourceUpButtonDescription$,
moveResourceDownButtonDescription$
moveResourceUpButtonDescription$,
moveResourceDownButtonDescription$,
};
},
props: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@
const { moveResourceUpButtonDescription$, moveResourceDownButtonDescription$ } =
searchAndFilterStrings;
return {
return {
moveResourceUpButtonDescription$,
moveResourceDownButtonDescription$
}
moveResourceDownButtonDescription$,
};
},
props: {
title: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@
createSnackbar,
upLabel$,
downLabel$
downLabel$,
};
},
data() {
Expand Down Expand Up @@ -513,7 +513,6 @@
},
];
},
},
created() {
const { query } = this.$route;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@
import DragContainer from 'kolibri-common/components/sortable/DragContainer';
import DragHandle from 'kolibri-common/components/sortable/DragHandle';
import DragSortWidget from 'kolibri-common/components/sortable/DragSortWidget';
import { searchAndFilterStrings } from 'kolibri-common/strings/searchAndFilterStrings';
import { PageNames } from '../../../constants/index';
import { injectQuizCreation } from '../../../composables/useQuizCreation';
import { searchAndFilterStrings } from 'kolibri-common/strings/searchAndFilterStrings';
import useDrag from './useDrag.js';
export default {
Expand Down Expand Up @@ -147,10 +147,7 @@
updateQuiz,
} = injectQuizCreation();
const {
upLabel$,
downLabel$,
} = searchAndFilterStrings;
const { upLabel$, downLabel$ } = searchAndFilterStrings;
const { moveDownOne, moveUpOne } = useDrag();
Expand Down Expand Up @@ -322,7 +319,7 @@
);
return displaySectionTitle(section, sectionIndexOrder).toUpperCase();
},
},
},
};
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@
import ImmersivePage from 'kolibri/components/pages/ImmersivePage';
import useUser from 'kolibri/composables/useUser';
import useSnackbar from 'kolibri/composables/useSnackbar';
import { searchAndFilterStrings } from 'kolibri-common/strings/searchAndFilterStrings';
import DeviceChannelResource from '../apiResources/deviceChannel';
import useContentTasks from '../composables/useContentTasks';
import { PageNames } from '../constants';
import { searchAndFilterStrings } from 'kolibri-common/strings/searchAndFilterStrings';
export default {
name: 'RearrangeChannelsPage',
Expand All @@ -92,10 +92,7 @@
useContentTasks();
const { canManageContent } = useUser();
const { createSnackbar } = useSnackbar();
const{
moveChannelUpLabel$,
moveChannelDownLabel$,
} = searchAndFilterStrings;
const { moveChannelUpLabel$, moveChannelDownLabel$ } = searchAndFilterStrings;
return {
canManageContent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,22 @@

<script>
function isWrappedString(value){
function isWrappedString(value) {
return typeof value === 'function' && value.KOLIBRI_I18N_WRAPPED_STRING;
}
export default {
name: 'DragSortWidget',
props: {
moveUpText: {
type: Function,
required: true,
validator:isWrappedString
validator: isWrappedString,
},
moveDownText: {
type: Function,
required: true,
validator:isWrappedString
validator: isWrappedString,
},
isFirst: {
type: Boolean,
Expand Down
2 changes: 1 addition & 1 deletion packages/kolibri/utils/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class Translator {
this._defaultMessages = defaultMessages;
for (const key in defaultMessages) {
this[`${key}$`] = this.$tr.bind(this, key);
this[`${key}$`].KOLIBRI_I18N_WRAPPED_STRING = true
this[`${key}$`].KOLIBRI_I18N_WRAPPED_STRING = true;
}
}
$tr(messageId, args) {
Expand Down

0 comments on commit 2cca367

Please sign in to comment.