diff --git a/l10n/messages.pot b/l10n/messages.pot index f2d6ca996a..51525ac442 100644 --- a/l10n/messages.pot +++ b/l10n/messages.pot @@ -62,9 +62,15 @@ msgstr "" msgid "Go back to the list" msgstr "" +msgid "items" +msgstr "" + msgid "Message limit of {count} characters reached" msgstr "" +msgid "More {what} …" +msgstr "" + msgid "Next" msgstr "" diff --git a/src/components/DashboardWidget/DashboardWidget.vue b/src/components/DashboardWidget/DashboardWidget.vue index 7a19a85a95..6ce41c2713 100644 --- a/src/components/DashboardWidget/DashboardWidget.vue +++ b/src/components/DashboardWidget/DashboardWidget.vue @@ -47,9 +47,6 @@ const myItems = [ export default { name: 'MyDashboardWidget', props: [], - components: { - DashboardWidget, - }, data() { return { items: myItems @@ -84,7 +81,7 @@ const myItems = [ avatarUrl: 'https://avatar.url/img.png', avatarUsername: 'Robert', avatarIsNoUser: true, - overlayIconUrl: generateUrl('/svg/core/actions/sound?color=' + this.themingColor), + overlayIconUrl: '/svg/core/actions/sound?color=000', mainText: 'First item text', subText: 'First item subtext', }, @@ -92,7 +89,7 @@ const myItems = [ id: '2', targetUrl: 'https://other-target.org', avatarUrl: 'https://other-avatar.url/img.png', - overlayIconUrl: generateUrl('/svg/core/actions/add?color=' + this.themingColor), + overlayIconUrl: '/svg/core/actions/add?color=000', mainText: 'Second item text', subText: 'Second item subtext', }, @@ -100,21 +97,18 @@ const myItems = [ const myItemMenu = { // triggers an event named "markDone" when clicked 'markDone': { - text: t('app', 'Mark as done'), + text: 'Mark as done', icon: 'icon-checkmark', }, // triggers an event named "hide" when clicked 'hide': { - text: t('app', 'Hide'), + text: 'Hide', icon: 'icon-toggle', } } export default { name: 'MyDashboardWidget', props: [], - components: { - DashboardWidget, - }, data() { return { items: myItems, @@ -194,7 +188,7 @@ export default { target="_blank" class="more" tabindex="0"> - {{ t('core', 'More {what} …', { what: showMoreText }) }} + {{ showMoreLabel }} @@ -204,6 +198,8 @@ import Avatar from '../Avatar/index.js' import DashboardWidgetItem from '../DashboardWidgetItem/index.js' import EmptyContent from '../EmptyContent/index.js' +import { t } from '../../l10n.js' + export default { name: 'DashboardWidget', components: { @@ -231,7 +227,7 @@ export default { }, showMoreText: { type: String, - default: t('core', 'items'), + default: t('items'), }, /** * A boolean to put the widget in a loading state. @@ -298,6 +294,10 @@ export default { showMore() { return this.showMoreUrl && this.items.length >= this.maxItemNumber }, + + showMoreLabel() { + return t('More {what} …', { what: this.showMoreText }) + }, }, }