Skip to content

Commit

Permalink
Adjust Dashboard translations
Browse files Browse the repository at this point in the history
Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
  • Loading branch information
raimund-schluessler committed May 2, 2022
1 parent eb38362 commit facc3c7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
6 changes: 6 additions & 0 deletions l10n/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""

Expand Down
24 changes: 12 additions & 12 deletions src/components/DashboardWidget/DashboardWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ const myItems = [
export default {
name: 'MyDashboardWidget',
props: [],
components: {
DashboardWidget,
},
data() {
return {
items: myItems
Expand Down Expand Up @@ -84,37 +81,34 @@ 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',
},
{
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',
},
]
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,
Expand Down Expand Up @@ -194,7 +188,7 @@ export default {
target="_blank"
class="more"
tabindex="0">
{{ t('core', 'More {what} …', { what: showMoreText }) }}
{{ showMoreLabel }}
</a>
</div>
</template>
Expand All @@ -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: {
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -298,6 +294,10 @@ export default {
showMore() {
return this.showMoreUrl && this.items.length >= this.maxItemNumber
},
showMoreLabel() {
return t('More {what} …', { what: this.showMoreText })
},
},
}
</script>
Expand Down

0 comments on commit facc3c7

Please sign in to comment.