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

Strings for handling of copy failures #4061

Merged
merged 2 commits into from
May 5, 2023
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 @@ -208,6 +208,16 @@
},
$trs: {
optionsTooltip: 'Options',
/* eslint-disable kolibri/vue-no-unused-translations */
/**
* Strings for handling copy failures
*/
removeNode: 'Remove',
retryCopy: 'Retry',
creatingCopies: 'Copying...',
copiedSnackbar: 'Copy operation complete',
undo: 'Undo',
/* eslint-enable kolibri/vue-no-unused-translations */
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
<p class="caption grey--text pr-2 pt-1">
{{ $tr("copyingTask") }}
</p>
<TaskProgress :taskId="taskId" size="30" />
<ContentNodeCopyTaskProgress :taskId="taskId" size="30" />
</div>
<div class="disabled-overlay"></div>
</template>
Expand All @@ -191,7 +191,7 @@
<script>

import camelCase from 'lodash/camelCase';
import TaskProgress from '../../views/progress/TaskProgress';
import ContentNodeCopyTaskProgress from '../../views/progress/ContentNodeCopyTaskProgress';
import ContentNodeChangedIcon from '../ContentNodeChangedIcon';
import ContentNodeValidator from '../ContentNodeValidator';
import { ContentLevels, Categories, NEW_OBJECT } from 'shared/constants';
Expand All @@ -217,7 +217,7 @@
ContentNodeValidator,
ContentNodeChangedIcon,
ToggleText,
TaskProgress,
ContentNodeCopyTaskProgress,
ContentNodeLearningActivityIcon,
},
mixins: [titleMixin, metadataTranslationMixin],
Expand Down Expand Up @@ -353,6 +353,12 @@
'{value, number, integer} {value, plural, one {resource for coaches} other {resources for coaches}}',
coachTooltip: 'Resource for coaches',
copyingTask: 'Copying',
/* eslint-disable kolibri/vue-no-unused-translations */
/**
* String for handling copy failures
*/
copyingError: 'Copy failed.',
/* eslint-enable kolibri/vue-no-unused-translations */
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
style="width: 24px;"
shrink
>
<TaskProgress
<ContentNodeCopyTaskProgress
class="progress-loader"
:taskId="taskId"
size="24"
Expand Down Expand Up @@ -185,7 +185,7 @@
import ContentNodeChangedIcon from '../ContentNodeChangedIcon';
import ContentNodeValidator from '../ContentNodeValidator';
import ContentNodeContextMenu from '../ContentNodeContextMenu';
import TaskProgress from '../../views/progress/TaskProgress';
import ContentNodeCopyTaskProgress from '../../views/progress/ContentNodeCopyTaskProgress';
import { ContentKindsNames } from 'shared/leUtils/ContentKinds';
import ContextMenuCloak from 'shared/views/ContextMenuCloak';
import LoadingText from 'shared/views/LoadingText';
Expand All @@ -211,7 +211,7 @@
ContentNodeValidator,
LoadingText,
IconButton,
TaskProgress,
ContentNodeCopyTaskProgress,
},
mixins: [titleMixin],
inject: ['draggableUniverse'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import get from 'lodash/get';

export default {
name: 'TaskProgress',
name: 'ContentNodeCopyTaskProgress',
props: {
taskId: {
type: String,
Expand Down Expand Up @@ -47,6 +47,14 @@
return this.task ? get(this.task, ['progress']) : 0;
},
},
$trs: {
/* eslint-disable kolibri/vue-no-unused-translations */
/**
* String for handling copy failures
*/
copyErrorTopic: 'Some resources failed to copy',
/* eslint-enable kolibri/vue-no-unused-translations */
},
};

</script>