From d5f2ab65dadbbfd589611224b1cd8eb1b0a47bf6 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Sat, 28 Oct 2023 03:43:24 +0000 Subject: [PATCH] chore(l10n): Migrated member-since --- src/locales/en-US/app.ftl | 2 ++ src/locales/id-ID/app.ftl | 1 + src/locales/ja-JP/app.ftl | 1 + src/soapbox/components/profile-hover-card.tsx | 16 ++++++---------- .../ui/components/profile-info-panel.tsx | 15 +++++---------- src/soapbox/locales/en.json | 2 -- 6 files changed, 15 insertions(+), 22 deletions(-) diff --git a/src/locales/en-US/app.ftl b/src/locales/en-US/app.ftl index 323a93d46..83013e60c 100644 --- a/src/locales/en-US/app.ftl +++ b/src/locales/en-US/app.ftl @@ -116,6 +116,8 @@ account-Status--familiar-followers-more = account-Status--last-status = Last active account-Status--locked = .alt = This account privacy status is set to locked. The owner manually reviews who can follow them. +account-Status--member-since = Joined { DATETIME($date, year: "numeric", month: "long") } +account-Status--muted = Muted account-Status--muted = Muted account-Status--no-followers = No one follows this user yet. account-Status--no-following = This user doesn't follow anyone yet. diff --git a/src/locales/id-ID/app.ftl b/src/locales/id-ID/app.ftl index e760dec73..c2cfdbde3 100644 --- a/src/locales/id-ID/app.ftl +++ b/src/locales/id-ID/app.ftl @@ -63,6 +63,7 @@ account-Status--follows-you = Mengikuti anda account-Status--last-status = Terakhir aktif account-Status--locked = .alt = Status privasi akun ini disetel untuk dikunci. Pemilik secara manual meninjau siapa yang dapat mengikuti mereka. +account-Status--member-since = Terdaftar sejak { DATETIME($date, year: "numeric", month: "long") } account-Status--muted = Dibisukan account-Status--no-followers = Tidak ada yang mengikuti pengguna ini saat ini. account-Status--no-following = Pengguna ini belum mengikuti siapapun. diff --git a/src/locales/ja-JP/app.ftl b/src/locales/ja-JP/app.ftl index 6f527457f..32c99aea5 100644 --- a/src/locales/ja-JP/app.ftl +++ b/src/locales/ja-JP/app.ftl @@ -71,6 +71,7 @@ account-Status--familiar-followers-more = { $count } 人のおすすめユーザ account-Status--last-status = 最後の活動 account-Status--locked = .alt = このアカウントは承認制アカウントです。相手が承認するまでフォローは完了しません。 +account-Status--member-since = { DATETIME($date, year: "numeric", month: "long") }から利用しています account-Status--muted = ミュートしています account-Status--no-followers = まだ誰もフォローしていません。 account-Status--no-following = まだ誰もフォローしていません。 diff --git a/src/soapbox/components/profile-hover-card.tsx b/src/soapbox/components/profile-hover-card.tsx index 49672c563..cf665390f 100644 --- a/src/soapbox/components/profile-hover-card.tsx +++ b/src/soapbox/components/profile-hover-card.tsx @@ -1,7 +1,7 @@ import { Localized } from '@fluent/react'; import clsx from 'clsx'; import React, { useEffect, useState } from 'react'; -import { useIntl, FormattedMessage } from 'react-intl'; +import { FormattedMessage } from 'react-intl'; import { usePopper } from 'react-popper'; import { useHistory } from 'react-router-dom'; @@ -62,7 +62,6 @@ interface IProfileHoverCard { export const ProfileHoverCard: React.FC = ({ visible = true }) => { const dispatch = useAppDispatch(); const history = useHistory(); - const intl = useIntl(); const [popperElement, setPopperElement] = useState(null); @@ -92,7 +91,6 @@ export const ProfileHoverCard: React.FC = ({ visible = true } if (!account) return null; const accountBio = { __html: account.note_emojified }; - const memberSinceDate = intl.formatDate(account.created_at, { month: 'long', year: 'numeric' }); const followedBy = me !== account.id && account.relationship?.followed_by === true; return ( @@ -128,13 +126,11 @@ export const ProfileHoverCard: React.FC = ({ visible = true } className='h-4 w-4 text-gray-800 dark:text-gray-200' /> - - - + + + Joined {account.created_at} + + )} diff --git a/src/soapbox/features/ui/components/profile-info-panel.tsx b/src/soapbox/features/ui/components/profile-info-panel.tsx index d619f068d..cd1d4a08b 100644 --- a/src/soapbox/features/ui/components/profile-info-panel.tsx +++ b/src/soapbox/features/ui/components/profile-info-panel.tsx @@ -2,7 +2,6 @@ import { Localized } from '@fluent/react'; import React from 'react'; -import { useIntl, FormattedMessage } from 'react-intl'; import { usePatronUser } from 'soapbox/api/hooks'; import AccountAcct from 'soapbox/components/account-acct'; @@ -37,7 +36,6 @@ interface IProfileInfoPanel { /** User profile metadata, such as location, birthday, etc. */ const ProfileInfoPanel: React.FC = ({ account, username }) => { - const intl = useIntl(); const { patronUser } = usePatronUser(account?.url); const me = useAppSelector(state => state.me); const ownAccount = account?.id === me; @@ -128,7 +126,6 @@ const ProfileInfoPanel: React.FC = ({ account, username }) => } const deactivated = account.pleroma?.deactivated ?? false; - const memberSinceDate = intl.formatDate(account.created_at, { month: 'long', year: 'numeric' }); const badges = getBadges(); return ( @@ -184,13 +181,11 @@ const ProfileInfoPanel: React.FC = ({ account, username }) => className='h-4 w-4 text-gray-800 dark:text-gray-200' /> - - - + + + Joined {account.created_at} + + )} diff --git a/src/soapbox/locales/en.json b/src/soapbox/locales/en.json index 8e1008e6b..f3aa7f26d 100644 --- a/src/soapbox/locales/en.json +++ b/src/soapbox/locales/en.json @@ -1,6 +1,4 @@ { - "account.media": "Media", - "account.member_since": "Joined {date}", "account.mention": "Mention", "account.mute": "Mute @{name}", "account.never_active": "Never",