profile-fix

This commit is contained in:
Untone 2024-06-05 19:31:31 +03:00
parent 603ebbb4a5
commit 2ff29b9e0f
6 changed files with 9 additions and 16 deletions

View File

@ -190,8 +190,8 @@
"Follow the topic": "Follow the topic",
"follower": "follower",
"Followers": "Followers",
"followersWithCount": "{count} {count, plural, one {follower} other {followers}}",
"FollowersWithCount": "{count, plural, =0 {no followers} one {{count} follower} other {{count} followers}}",
"some followings": "{count, plural, =0 {no followings} one {{count} following} few {{count} followings} other {{count} followings}}",
"some followers": "{count, plural, =0 {no followers} one {{count} follower} other {{count} followers}}",
"Following": "Following",
"Following...": "Following...",
"Forgot password?": "Forgot password?",
@ -258,7 +258,6 @@
"It's OK. Just enter your email to receive a link to change your password": "It's OK. Just enter your email to receive a link to change your password",
"italic": "italic",
"Italic": "Italic",
"Join": "Join",
"Join our maillist": "To receive the best postings, just enter your email",
"Join our team of authors": "Join our team of authors",
"Join our team of authors text": "Каждый месяц на Дискурсе публикуются десятки новых авторов. Станьте одним из них — предложите свой материал в журнал и присоединитесь к горизонтальной редакции",
@ -438,14 +437,12 @@
"subscriber": "subscriber",
"subscriber_rp": "subscriber",
"subscribers": "subscribers",
"FollowersWithCount": "{count, plural, =0 {no followers} one {{count} follower} other {{count} followers}}",
"subscribing...": "subscribing...",
"subscription": "subscription",
"Subscription": "Subscription",
"subscription_rp": "subscription",
"subscriptions": "subscriptions",
"Subscriptions": "Subscriptions",
"FollowsWithCount": "{count, plural, =0 {no subscriptions} one {{count} subscription} other {{count} subscriptions}}",
"Substrate": "Substrate",
"Success": "Success",
"Successfully authorized": "Authorization successful",

View File

@ -28,7 +28,6 @@
"Alignment center": "По центру",
"Alignment left": "По левому краю",
"Alignment right": "По правому краю",
"All": "Общая лента",
"All articles": "Все материалы",
"All authors": "Все авторы",
"All posts": "Все публикации",
@ -198,8 +197,7 @@
"Follow the topic": "Подписаться на тему",
"follower": "подписчик",
"Followers": "Подписчики",
"followersWithCount": "{count} {count, plural, one {подписчик} few {подписчика} other {подписчиков}}",
"FollowersWithCount": "{count, plural, =0 {нет подписчиков} one {{count} подписчик} few {{count} подписчика} other {{count} подписчиков}}",
"some followers": "{count, plural, =0 {нет подписчиков} one {{count} подписчик} few {{count} подписчика} other {{count} подписчиков}}",
"Following": "Вы подписаны",
"Following...": "Подписываем...",
"Forgot password?": "Забыли пароль?",
@ -270,7 +268,6 @@
"It's OK. Just enter your email to receive a link to change your password": "Ничего страшного. Просто укажите свою почту, чтобы получить ссылку для смены пароля",
"italic": "курсив",
"Italic": "Курсив",
"Join": "Присоединиться",
"Join our maillist": "Чтобы получать рассылку лучших публикаций, просто укажите свою почту",
"Join our team of authors": "Станьте автором",
"Join our team of authors text": "Каждый месяц на&nbsp;Дискурсе публикуются десятки новых авторов.<br/>Станьте одним из&nbsp;них&nbsp;— предложите свой материал в&nbsp;журнал и&nbsp;присоединитесь к&nbsp;горизонтальной редакции",
@ -466,11 +463,10 @@
"subscriber": "подписчик",
"subscriber_rp": "подписчика",
"subscribers": "подписчиков",
"FollowersWithCount": "{count, plural, =0 {нет подписчиков} one {{count} подписчик} few {{count} подписчика} other {{count} подписчиков}}",
"subscribing...": "Подписка...",
"Subscription": "Подписка",
"Subscriptions": "Подписки",
"FollowsWithCount": "{count, plural, =0 {нет подписок} one {{count} подписка} few {{count} подписки} other {{count} подписок}}",
"some followings": "{count, plural, =0 {нет подписок} one {{count} подписка} few {{count} подписки} other {{count} подписок}}",
"Substrate": "Подложка",
"Success": "Успешно",
"Successfully authorized": "Авторизация успешна",

View File

@ -124,7 +124,7 @@ export const AuthorBadge = (props: Props) => {
<div>{t('CommentsWithCount', { count: props.author.stat?.comments ?? 0 })}</div>
</Show>
<Show when={props.author?.stat.followers > 0}>
<div>{t('FollowersWithCount', { count: props.author.stat?.followers ?? 0 })}</div>
<div>{t('some followers', { count: props.author.stat?.followers ?? 0 })}</div>
</Show>
</div>
</Show>

View File

@ -104,7 +104,7 @@ export const TopicBadge = (props: Props) => {
{t('authorsWithCount', { count: props.topic?.stat?.authors })}
</span>
<span class={styles.statsItem}>
{t('FollowersWithCount', { count: props.topic?.stat?.followers })}
{t('some followers', { count: props.topic?.stat?.followers })}
</span>
<Show when={props.topic?.stat?.comments}>
<span class={styles.statsItem}>

View File

@ -28,7 +28,7 @@ export const Subscribers = (props: Props) => {
</div>
</Show>
<div class={styles.subscribersCounter}>
{t('SubscriberWithCount', {
{t('some followers', {
count: props.followersAmount || props.followers.length || 0,
})}
</div>
@ -57,7 +57,7 @@ export const Subscribers = (props: Props) => {
</div>
</Show>
<div class={styles.subscribersCounter}>
{t('SubscriptionWithCount', {
{t('some followings', {
count: props.followingAmount || props.following?.length || 0,
})}
</div>

View File

@ -203,7 +203,7 @@ export const SessionProvider = (props: {
ssrLoadFrom: 'initial',
initialValue: null,
})
const author = createMemo(() => session().user?.app_data?.profile)
const author = createMemo(() => session()?.user?.app_data?.profile)
const checkSessionIsExpired = () => {
const expires_at_data = localStorage.getItem('expires_at')