Fixed No untranslated strings

This commit is contained in:
senderfm 2019-06-05 10:38:15 +02:00
parent 36f77e660e
commit 42f5fb6bf3
3 changed files with 86 additions and 42 deletions

View File

@ -160,6 +160,11 @@
}
},
"common": {
"your": {
"post": "Dein Beitrag ::: Deine Beiträge",
"comment": "Dein Kommentar ::: Deine Kommentare",
"shouted": "Deine Empfehlung ::: Deine Empfehlungen"
},
"post": "Beitrag ::: Beiträge",
"comment": "Kommentar ::: Kommentare",
"letsTalk": "Miteinander reden",

View File

@ -160,6 +160,11 @@
}
},
"common": {
"your": {
"post": "Your Post ::: Your Posts",
"comment": "Your Comment ::: Your Comments",
"shout": "Your Shout ::: Your Shouts"
},
"post": "Post ::: Posts",
"comment": "Comment ::: Comments",
"letsTalk": "Let`s Talk",

View File

@ -3,15 +3,15 @@
<ds-card v-if="user && user.image">
<p>PROFILE IMAGE</p>
</ds-card>
<ds-space />
<ds-space/>
<ds-flex v-if="user" :width="{ base: '100%' }" gutter="base">
<ds-flex-item :width="{ base: '100%', sm: 2, md: 2, lg: 1 }">
<ds-card
:class="{ 'disabled-content': user.disabled }"
style="position: relative; height: auto;"
>
<hc-upload v-if="myProfile" :user="user" />
<hc-avatar v-else :user="user" class="profile-avatar" size="x-large" />
<hc-upload v-if="myProfile" :user="user"/>
<hc-avatar v-else :user="user" class="profile-avatar" size="x-large"/>
<no-ssr>
<content-menu
placement="bottom-end"
@ -25,28 +25,30 @@
<ds-space margin="small">
<ds-heading tag="h3" align="center" no-margin>{{ userName }}</ds-heading>
<ds-text v-if="user.location" align="center" color="soft" size="small">
<ds-icon name="map-marker" />
<ds-icon name="map-marker"/>
{{ user.location.name }}
</ds-text>
<ds-text align="center" color="soft" size="small">
{{ $t('profile.memberSince') }} {{ user.createdAt | date('MMMM yyyy') }}
</ds-text>
<ds-text
align="center"
color="soft"
size="small"
>{{ $t('profile.memberSince') }} {{ user.createdAt | date('MMMM yyyy') }}</ds-text>
</ds-space>
<ds-space v-if="user.badges && user.badges.length" margin="x-small">
<hc-badges :badges="user.badges" />
<hc-badges :badges="user.badges"/>
</ds-space>
<ds-flex>
<ds-flex-item>
<no-ssr>
<ds-number :label="$t('profile.followers')">
<hc-count-to slot="count" :end-val="followedByCount" />
<hc-count-to slot="count" :end-val="followedByCount"/>
</ds-number>
</no-ssr>
</ds-flex-item>
<ds-flex-item>
<no-ssr>
<ds-number :label="$t('profile.following')">
<hc-count-to slot="count" :end-val="Number(user.followingCount) || 0" />
<hc-count-to slot="count" :end-val="Number(user.followingCount) || 0"/>
</ds-number>
</no-ssr>
</ds-flex-item>
@ -61,16 +63,14 @@
/>
</ds-space>
<template v-if="user.about">
<hr />
<hr>
<ds-space margin-top="small" margin-bottom="small">
<ds-text color="soft" size="small">{{ user.about }}</ds-text>
</ds-space>
</template>
</ds-card>
<ds-space />
<ds-heading tag="h3" soft style="text-align: center; margin-bottom: 10px;">
Netzwerk
</ds-heading>
<ds-space/>
<ds-heading tag="h3" soft style="text-align: center; margin-bottom: 10px;">Netzwerk</ds-heading>
<ds-card style="position: relative; height: auto;">
<ds-space v-if="user.following && user.following.length" margin="x-small">
<ds-text tag="h5" color="soft">Wem folgt {{ userName | truncate(15) }}?</ds-text>
@ -79,20 +79,21 @@
<ds-space v-for="follow in uniq(user.following)" :key="follow.id" margin="x-small">
<!-- TODO: find better solution for rendering errors -->
<no-ssr>
<user :user="follow" :trunc="15" />
<user :user="follow" :trunc="15"/>
</no-ssr>
</ds-space>
<ds-space v-if="user.followingCount - user.following.length" margin="small">
<ds-text size="small" color="softer">
und {{ user.followingCount - user.following.length }} weitere
</ds-text>
<ds-text
size="small"
color="softer"
>und {{ user.followingCount - user.following.length }} weitere</ds-text>
</ds-space>
</template>
<template v-else>
<p style="text-align: center; opacity: .5;">{{ userName }} folgt niemandem</p>
</template>
</ds-card>
<ds-space />
<ds-space/>
<ds-card style="position: relative; height: auto;">
<ds-space v-if="user.followedBy && user.followedBy.length" margin="x-small">
<ds-text tag="h5" color="soft">Wer folgt {{ userName | truncate(15) }}?</ds-text>
@ -101,13 +102,14 @@
<ds-space v-for="follow in uniq(user.followedBy)" :key="follow.id" margin="x-small">
<!-- TODO: find better solution for rendering errors -->
<no-ssr>
<user :user="follow" :trunc="15" />
<user :user="follow" :trunc="15"/>
</no-ssr>
</ds-space>
<ds-space v-if="user.followedByCount - user.followedBy.length" margin="small">
<ds-text size="small" color="softer">
und {{ user.followedByCount - user.followedBy.length }} weitere
</ds-text>
<ds-text
size="small"
color="softer"
>und {{ user.followedByCount - user.followedBy.length }} weitere</ds-text>
</ds-space>
</template>
<template v-else>
@ -117,13 +119,14 @@
<ds-space v-if="user.socialMedia && user.socialMedia.length" margin="large">
<ds-card style="position: relative; height: auto;">
<ds-space margin="x-small">
<ds-text tag="h5" color="soft">
{{ $t('profile.socialMedia') }} {{ user.name | truncate(15) }}?
</ds-text>
<ds-text
tag="h5"
color="soft"
>{{ $t('profile.socialMedia') }} {{ user.name | truncate(15) }}?</ds-text>
<template>
<ds-space v-for="link in socialMediaLinks" :key="link.username" margin="x-small">
<a :href="link.url">
<ds-avatar :image="link.favicon" />
<ds-avatar :image="link.favicon"/>
{{ 'link.username' }}
</a>
</ds-space>
@ -137,20 +140,36 @@
<ds-flex-item class="profile-top-navigation">
<ds-card class="ds-tab-nav">
<ds-flex>
<ds-flex-item class="ds-tab-nav-item ds-tab-nav-item-active">
<ds-flex-item
v-tooltip="{
content: $t('common.your.post', null, user.contributionsCount),
placement: 'right',
delay: { show: 500 },
}"
class="ds-tab-nav-item pointer ds-tab-nav-item-active"
@click="tabActivity('posts', $event)"
>
<ds-space margin="small">
<!-- TODO: find better solution for rendering errors -->
<no-ssr>
<ds-number :label="$t('common.post', null, user.contributionsCount)">
<hc-count-to slot="count" :end-val="user.contributionsCount" />
<hc-count-to slot="count" :end-val="user.contributionsCount"/>
</ds-number>
</no-ssr>
</ds-space>
</ds-flex-item>
<!--<ds-flex-item class="ds-tab-nav-item">
<ds-space margin="small">-->
<!-- TODO: find better solution for rendering errors -->
<!--
<ds-flex-item
v-tooltip="{
content: $t('common.your.comment', null, user.commentsCount),
placement: 'right',
delay: { show: 500 },
}"
class="ds-tab-nav-item pointer"
@click="tabActivity('commented', $event)"
>
<ds-space margin="small">
<!-- TODO: find better solution for rendering errors -->
<no-ssr>
<ds-number :label="$t('profile.commented')">
<hc-count-to slot="count" :end-val="user.commentsCount"/>
@ -158,17 +177,24 @@
</no-ssr>
</ds-space>
</ds-flex-item>
-->
<!--<ds-flex-item class="ds-tab-nav-item">
<ds-space margin="small">-->
<!-- TODO: find better solution for rendering errors -->
<!--<no-ssr>
<ds-flex-item
v-tooltip="{
content: $t('common.your.shouted', null, user.shoutedCount),
placement: 'right',
delay: { show: 500 },
}"
class="ds-tab-nav-item pointer"
>
<ds-space margin="small">
<!-- TODO: find better solution for rendering errors -->
<no-ssr>
<ds-number :label="$t('profile.shouted')">
<hc-count-to slot="count" :end-val="user.shoutedCount"/>
</ds-number>
</no-ssr>
</ds-space>
</ds-flex-item>-->
</ds-flex-item>
</ds-flex>
</ds-card>
</ds-flex-item>
@ -194,11 +220,11 @@
</template>
<template v-else>
<ds-flex-item :width="{ base: '100%' }">
<hc-empty margin="xx-large" icon="file" />
<hc-empty margin="xx-large" icon="file"/>
</ds-flex-item>
</template>
</ds-flex>
<hc-load-more v-if="hasMore" :loading="$apollo.loading" @click="showMoreContributions" />
<hc-load-more v-if="hasMore" :loading="$apollo.loading" @click="showMoreContributions"/>
</ds-flex-item>
</ds-flex>
</div>
@ -343,6 +369,14 @@ export default {
</script>
<style lang="scss">
.pointer {
cursor: pointer;
}
.ds-tab-nav .ds-card-content .ds-tab-nav-item:hover {
border-bottom: 3px solid #c9c6ce;
}
.profile-avatar.ds-avatar {
display: block;
margin: auto;