このコミットが含まれているのは:
2026-10-28 20:57:22 +09:00
コミット 614a12e7aa
18個のファイルの変更、175行の追加、107行の削除
+5 -5
ファイルの表示
@@ -15,6 +15,7 @@ import { apiPut } from '@/lib/api'
import { useDialogue } from '@/lib/dialogues/useDialogue'
import { clientScrollBehaviour } from '@/lib/clientAnimation'
import { localeLanguage } from '@/lib/locales'
import { languageUIMessage } from '@/lib/i18n'
import { postsKeys, tagsKeys, wikiKeys } from '@/lib/queryKeys'
import { fetchTagChanges } from '@/lib/tags'
import { useClientBehaviourSettings } from '@/lib/useClientBehaviourSettings'
@@ -150,7 +151,7 @@ const TagVersionRows = ({ change, children }: {
children: (primary: ReactNode) => ReactNode }) => {
const locale = useLocale ()
const language = localeLanguage (locale)
const { message, label } = useUITranslation ('history')
const { label } = useUITranslation ('history')
const { i18n } = useTranslation ('history')
const panelId = useId ()
const names = snapshotNames (change.names)
@@ -210,15 +211,14 @@ const TagVersionRows = ({ change, children }: {
</tr>)}
{otherLanguages.map ((code, index) => {
const entry = nameChanges.find (value => value.languageCode === code)
const key = `languageNames.${code}`
const known = i18n.exists (key, { ns: 'history', lng: locale })
const language = languageUIMessage (code, locale, i18n)
const next = entry != null ? entry.current : names[code] ?? null
const prev = entry != null ? entry.prev : next
return (
<tr key={code} id={rowIds[index]} hidden={!expanded}>
<th scope="row" className="px-2 pt-1 pb-2 text-left text-sm font-normal">
<LocalisedText language={known ? code : 'und'}>
{known ? message (key).text : code}
<LocalisedText language={language.language}>
{language.text}
</LocalisedText>
</th>
<td className="px-2 pt-1 pb-2">