Skip to content

Commit

Permalink
Merge pull request #4061 from vkWeb/strings-for-copy-fail
Browse files Browse the repository at this point in the history
Strings for handling of copy failures
  • Loading branch information
bjester authored May 5, 2023
2 parents aed6bcd + 86726c7 commit 32847f3
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 7 deletions.
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>

0 comments on commit 32847f3

Please sign in to comment.