mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-24 02:05:39 +03:00
Use msg here because the memo'ed Home doesn't re-render
And see the line numbers change again in translation files
This commit is contained in:
parent
921943245f
commit
868e613089
3 changed files with 20 additions and 18 deletions
|
@ -526,7 +526,7 @@ msgstr ""
|
|||
#: src/pages/catchup.jsx:860
|
||||
#: src/pages/filters.jsx:89
|
||||
#: src/pages/followed-hashtags.jsx:40
|
||||
#: src/pages/home.jsx:50
|
||||
#: src/pages/home.jsx:52
|
||||
#: src/pages/notifications.jsx:488
|
||||
msgid "Home"
|
||||
msgstr ""
|
||||
|
@ -1193,7 +1193,7 @@ msgstr ""
|
|||
#: src/components/nav-menu.jsx:207
|
||||
#: src/components/shortcuts-settings.jsx:58
|
||||
#: src/components/shortcuts-settings.jsx:143
|
||||
#: src/pages/home.jsx:221
|
||||
#: src/pages/home.jsx:223
|
||||
#: src/pages/mentions.jsx:20
|
||||
#: src/pages/mentions.jsx:167
|
||||
#: src/pages/settings.jsx:1000
|
||||
|
@ -1205,8 +1205,8 @@ msgstr ""
|
|||
#: src/components/shortcuts-settings.jsx:49
|
||||
#: src/components/shortcuts-settings.jsx:149
|
||||
#: src/pages/filters.jsx:24
|
||||
#: src/pages/home.jsx:81
|
||||
#: src/pages/home.jsx:181
|
||||
#: src/pages/home.jsx:83
|
||||
#: src/pages/home.jsx:183
|
||||
#: src/pages/notifications.jsx:89
|
||||
#: src/pages/notifications.jsx:492
|
||||
msgid "Notifications"
|
||||
|
@ -2255,7 +2255,7 @@ msgid "New posts"
|
|||
msgstr ""
|
||||
|
||||
#: src/components/timeline.jsx:548
|
||||
#: src/pages/home.jsx:210
|
||||
#: src/pages/home.jsx:212
|
||||
#: src/pages/notifications.jsx:779
|
||||
#: src/pages/status.jsx:945
|
||||
#: src/pages/status.jsx:1318
|
||||
|
@ -2927,15 +2927,15 @@ msgstr ""
|
|||
msgid "Go to my instance (<0>{currentInstance}</0>)"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/home.jsx:206
|
||||
#: src/pages/home.jsx:208
|
||||
msgid "Unable to fetch notifications."
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/home.jsx:226
|
||||
#: src/pages/home.jsx:228
|
||||
msgid "<0>New</0> <1>Follow Requests</1>"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/home.jsx:232
|
||||
#: src/pages/home.jsx:234
|
||||
msgid "See all"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -526,7 +526,7 @@ msgstr ""
|
|||
#: src/pages/catchup.jsx:860
|
||||
#: src/pages/filters.jsx:89
|
||||
#: src/pages/followed-hashtags.jsx:40
|
||||
#: src/pages/home.jsx:50
|
||||
#: src/pages/home.jsx:52
|
||||
#: src/pages/notifications.jsx:488
|
||||
msgid "Home"
|
||||
msgstr ""
|
||||
|
@ -1193,7 +1193,7 @@ msgstr ""
|
|||
#: src/components/nav-menu.jsx:207
|
||||
#: src/components/shortcuts-settings.jsx:58
|
||||
#: src/components/shortcuts-settings.jsx:143
|
||||
#: src/pages/home.jsx:221
|
||||
#: src/pages/home.jsx:223
|
||||
#: src/pages/mentions.jsx:20
|
||||
#: src/pages/mentions.jsx:167
|
||||
#: src/pages/settings.jsx:1000
|
||||
|
@ -1205,8 +1205,8 @@ msgstr ""
|
|||
#: src/components/shortcuts-settings.jsx:49
|
||||
#: src/components/shortcuts-settings.jsx:149
|
||||
#: src/pages/filters.jsx:24
|
||||
#: src/pages/home.jsx:81
|
||||
#: src/pages/home.jsx:181
|
||||
#: src/pages/home.jsx:83
|
||||
#: src/pages/home.jsx:183
|
||||
#: src/pages/notifications.jsx:89
|
||||
#: src/pages/notifications.jsx:492
|
||||
msgid "Notifications"
|
||||
|
@ -2255,7 +2255,7 @@ msgid "New posts"
|
|||
msgstr ""
|
||||
|
||||
#: src/components/timeline.jsx:548
|
||||
#: src/pages/home.jsx:210
|
||||
#: src/pages/home.jsx:212
|
||||
#: src/pages/notifications.jsx:779
|
||||
#: src/pages/status.jsx:945
|
||||
#: src/pages/status.jsx:1318
|
||||
|
@ -2927,15 +2927,15 @@ msgstr ""
|
|||
msgid "Go to my instance (<0>{currentInstance}</0>)"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/home.jsx:206
|
||||
#: src/pages/home.jsx:208
|
||||
msgid "Unable to fetch notifications."
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/home.jsx:226
|
||||
#: src/pages/home.jsx:228
|
||||
msgid "<0>New</0> <1>Follow Requests</1>"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/home.jsx:232
|
||||
#: src/pages/home.jsx:234
|
||||
msgid "See all"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import './notifications-menu.css';
|
||||
|
||||
import { t, Trans } from '@lingui/macro';
|
||||
import { msg, t, Trans } from '@lingui/macro';
|
||||
import { useLingui } from '@lingui/react';
|
||||
import { ControlledMenu } from '@szhsin/react-menu';
|
||||
import { memo } from 'preact/compat';
|
||||
import { useEffect, useRef, useState } from 'preact/hooks';
|
||||
|
@ -24,6 +25,7 @@ import {
|
|||
} from './notifications';
|
||||
|
||||
function Home() {
|
||||
const { _ } = useLingui();
|
||||
const snapStates = useSnapshot(states);
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
|
@ -47,7 +49,7 @@ function Home() {
|
|||
<Columns />
|
||||
) : (
|
||||
<Following
|
||||
title={t`Home`}
|
||||
title={_(msg`Home`)}
|
||||
path="/"
|
||||
id="home"
|
||||
headerStart={false}
|
||||
|
|
Loading…
Reference in a new issue