Fix "old post" prompt not appearing

This commit is contained in:
Lim Chee Aun 2025-01-24 09:17:45 +08:00
parent 7aa677e6e2
commit 719f7f8f1b
2 changed files with 150 additions and 162 deletions

View file

@ -918,6 +918,25 @@ function Status({
const actionsRef = useRef();
const isPublic = ['public', 'unlisted'].includes(visibility);
const isPinnable = ['public', 'unlisted', 'private'].includes(visibility);
const menuFooter =
mediaNoDesc && !reblogged ? (
<div class="footer">
<Icon icon="alert" />
<Trans>Some media have no descriptions.</Trans>
</div>
) : (
statusMonthsAgo >= 3 && (
<div class="footer">
<Icon icon="info" />
<span>
<Trans>
Old post (<strong>{rtf.format(-statusMonthsAgo, 'month')}</strong>
)
</Trans>
</span>
</div>
)
);
const StatusMenuItems = (
<>
{!isSizeLarge && sameInstance && (
@ -954,29 +973,7 @@ function Status({
</span>
</MenuItem>
}
menuFooter={
mediaNoDesc && !reblogged ? (
<div class="footer">
<Icon icon="alert" />
<Trans>Some media have no descriptions.</Trans>
</div>
) : (
statusMonthsAgo >= 3 && (
<div class="footer">
<Icon icon="info" />
<span>
<Trans>
Old post (
<strong>
{rtf.format(-statusMonthsAgo, 'month')}
</strong>
)
</Trans>
</span>
</div>
)
)
}
menuFooter={menuFooter}
disabled={!canBoost}
onClick={async () => {
try {
@ -2429,15 +2426,7 @@ function Status({
</span>
</MenuItem>
}
menuFooter={
mediaNoDesc &&
!reblogged && (
<div class="footer">
<Icon icon="alert" />
<Trans>Some media have no descriptions.</Trans>
</div>
)
}
menuFooter={menuFooter}
>
<StatusButton
checked={reblogged}

259
src/locales/en.po generated
View file

@ -111,11 +111,11 @@ msgstr ""
#: src/components/compose.jsx:2624
#: src/components/media-alt-modal.jsx:46
#: src/components/media-modal.jsx:358
#: src/components/status.jsx:1737
#: src/components/status.jsx:1754
#: src/components/status.jsx:1878
#: src/components/status.jsx:2490
#: src/components/status.jsx:2493
#: src/components/status.jsx:1734
#: src/components/status.jsx:1751
#: src/components/status.jsx:1875
#: src/components/status.jsx:2479
#: src/components/status.jsx:2482
#: src/pages/account-statuses.jsx:527
#: src/pages/accounts.jsx:110
#: src/pages/hashtag.jsx:200
@ -196,7 +196,7 @@ msgid "Original"
msgstr ""
#: src/components/account-info.jsx:860
#: src/components/status.jsx:2268
#: src/components/status.jsx:2265
#: src/pages/catchup.jsx:71
#: src/pages/catchup.jsx:1445
#: src/pages/catchup.jsx:2058
@ -293,30 +293,30 @@ msgid "Add/Remove from Lists"
msgstr ""
#: src/components/account-info.jsx:1300
#: src/components/status.jsx:1177
#: src/components/status.jsx:1174
msgid "Link copied"
msgstr ""
#: src/components/account-info.jsx:1303
#: src/components/status.jsx:1180
#: src/components/status.jsx:1177
msgid "Unable to copy link"
msgstr ""
#: src/components/account-info.jsx:1309
#: src/components/shortcuts-settings.jsx:1059
#: src/components/status.jsx:1186
#: src/components/status.jsx:3269
#: src/components/status.jsx:1183
#: src/components/status.jsx:3258
msgid "Copy"
msgstr ""
#: src/components/account-info.jsx:1324
#: src/components/shortcuts-settings.jsx:1077
#: src/components/status.jsx:1202
#: src/components/status.jsx:1199
msgid "Sharing doesn't seem to work."
msgstr ""
#: src/components/account-info.jsx:1330
#: src/components/status.jsx:1208
#: src/components/status.jsx:1205
msgid "Share…"
msgstr ""
@ -435,9 +435,9 @@ msgstr ""
#: src/components/shortcuts-settings.jsx:230
#: src/components/shortcuts-settings.jsx:583
#: src/components/shortcuts-settings.jsx:783
#: src/components/status.jsx:2993
#: src/components/status.jsx:3233
#: src/components/status.jsx:3733
#: src/components/status.jsx:2982
#: src/components/status.jsx:3222
#: src/components/status.jsx:3722
#: src/pages/accounts.jsx:37
#: src/pages/catchup.jsx:1581
#: src/pages/filters.jsx:224
@ -649,7 +649,7 @@ msgid "Attachment #{i} failed"
msgstr "Attachment #{i} failed"
#: src/components/compose.jsx:1180
#: src/components/status.jsx:2063
#: src/components/status.jsx:2060
#: src/components/timeline.jsx:989
msgid "Content warning"
msgstr ""
@ -685,7 +685,7 @@ msgstr ""
#: src/components/compose.jsx:1247
#: src/components/status.jsx:97
#: src/components/status.jsx:1941
#: src/components/status.jsx:1938
msgid "Private mention"
msgstr ""
@ -714,10 +714,10 @@ msgstr ""
#: src/components/compose.jsx:1555
#: src/components/keyboard-shortcuts-help.jsx:152
#: src/components/status.jsx:929
#: src/components/status.jsx:1717
#: src/components/status.jsx:1718
#: src/components/status.jsx:2386
#: src/components/status.jsx:948
#: src/components/status.jsx:1714
#: src/components/status.jsx:1715
#: src/components/status.jsx:2383
msgid "Reply"
msgstr ""
@ -949,7 +949,7 @@ msgstr ""
#: src/components/drafts.jsx:128
#: src/components/list-add-edit.jsx:186
#: src/components/status.jsx:1352
#: src/components/status.jsx:1349
#: src/pages/filters.jsx:587
msgid "Delete…"
msgstr ""
@ -1157,10 +1157,10 @@ msgid "<0>l</0> or <1>f</1>"
msgstr ""
#: src/components/keyboard-shortcuts-help.jsx:173
#: src/components/status.jsx:937
#: src/components/status.jsx:2413
#: src/components/status.jsx:2444
#: src/components/status.jsx:2445
#: src/components/status.jsx:956
#: src/components/status.jsx:2410
#: src/components/status.jsx:2433
#: src/components/status.jsx:2434
msgid "Boost"
msgstr ""
@ -1169,9 +1169,9 @@ msgid "<0>Shift</0> + <1>b</1>"
msgstr ""
#: src/components/keyboard-shortcuts-help.jsx:181
#: src/components/status.jsx:1022
#: src/components/status.jsx:2469
#: src/components/status.jsx:2470
#: src/components/status.jsx:1019
#: src/components/status.jsx:2458
#: src/components/status.jsx:2459
msgid "Bookmark"
msgstr ""
@ -1230,15 +1230,15 @@ msgid "Media description"
msgstr ""
#: src/components/media-alt-modal.jsx:58
#: src/components/status.jsx:1066
#: src/components/status.jsx:1093
#: src/components/status.jsx:1063
#: src/components/status.jsx:1090
#: src/components/translation-block.jsx:196
msgid "Translate"
msgstr ""
#: src/components/media-alt-modal.jsx:69
#: src/components/status.jsx:1080
#: src/components/status.jsx:1107
#: src/components/status.jsx:1077
#: src/components/status.jsx:1104
msgid "Speak"
msgstr ""
@ -1275,9 +1275,9 @@ msgid "Filtered: {filterTitleStr}"
msgstr ""
#: src/components/media-post.jsx:134
#: src/components/status.jsx:3563
#: src/components/status.jsx:3659
#: src/components/status.jsx:3737
#: src/components/status.jsx:3552
#: src/components/status.jsx:3648
#: src/components/status.jsx:3726
#: src/components/timeline.jsx:978
#: src/pages/catchup.jsx:75
#: src/pages/catchup.jsx:1877
@ -1577,8 +1577,8 @@ msgid "[Unknown notification type: {type}]"
msgstr ""
#: src/components/notification.jsx:441
#: src/components/status.jsx:1036
#: src/components/status.jsx:1046
#: src/components/status.jsx:1033
#: src/components/status.jsx:1043
msgid "Boosted/Liked by…"
msgstr ""
@ -1905,7 +1905,7 @@ msgid "Move down"
msgstr ""
#: src/components/shortcuts-settings.jsx:379
#: src/components/status.jsx:1314
#: src/components/status.jsx:1311
#: src/pages/list.jsx:171
msgid "Edit"
msgstr ""
@ -2132,287 +2132,286 @@ msgstr "Unbookmarked @{2}'s post"
msgid "Bookmarked @{3}'s post"
msgstr "Bookmarked @{3}'s post"
#: src/components/status.jsx:937
#: src/components/status.jsx:999
#: src/components/status.jsx:2413
#: src/components/status.jsx:2444
msgid "Unboost"
msgstr ""
#: src/components/status.jsx:953
#: src/components/status.jsx:2428
msgid "Quote"
msgstr ""
#: src/components/status.jsx:961
#: src/components/status.jsx:2437
#: src/components/status.jsx:925
msgid "Some media have no descriptions."
msgstr ""
#. placeholder {0}: rtf.format(-statusMonthsAgo, 'month')
#: src/components/status.jsx:968
#: src/components/status.jsx:932
msgid "Old post (<0>{0}</0>)"
msgstr ""
#: src/components/status.jsx:956
#: src/components/status.jsx:996
#: src/components/status.jsx:2410
#: src/components/status.jsx:2433
msgid "Unboost"
msgstr ""
#: src/components/status.jsx:972
#: src/components/status.jsx:2425
msgid "Quote"
msgstr ""
#. placeholder {4}: username || acct
#: src/components/status.jsx:987
#: src/components/status.jsx:984
msgid "Unboosted @{4}'s post"
msgstr "Unboosted @{4}'s post"
#. placeholder {5}: username || acct
#: src/components/status.jsx:988
#: src/components/status.jsx:985
msgid "Boosted @{5}'s post"
msgstr "Boosted @{5}'s post"
#: src/components/status.jsx:1000
#: src/components/status.jsx:997
msgid "Boost…"
msgstr ""
#: src/components/status.jsx:1012
#: src/components/status.jsx:1727
#: src/components/status.jsx:2457
#: src/components/status.jsx:1009
#: src/components/status.jsx:1724
#: src/components/status.jsx:2446
msgid "Unlike"
msgstr ""
#: src/components/status.jsx:1013
#: src/components/status.jsx:1727
#: src/components/status.jsx:1728
#: src/components/status.jsx:2457
#: src/components/status.jsx:2458
#: src/components/status.jsx:1010
#: src/components/status.jsx:1724
#: src/components/status.jsx:1725
#: src/components/status.jsx:2446
#: src/components/status.jsx:2447
msgid "Like"
msgstr ""
#: src/components/status.jsx:1022
#: src/components/status.jsx:2469
#: src/components/status.jsx:1019
#: src/components/status.jsx:2458
msgid "Unbookmark"
msgstr ""
#. placeholder {0}: username || acct
#: src/components/status.jsx:1130
#: src/components/status.jsx:1127
msgid "View post by <0>@{0}</0>"
msgstr ""
#: src/components/status.jsx:1151
#: src/components/status.jsx:1148
msgid "Show Edit History"
msgstr ""
#: src/components/status.jsx:1154
#: src/components/status.jsx:1151
msgid "Edited: {editedDateText}"
msgstr ""
#: src/components/status.jsx:1221
#: src/components/status.jsx:3238
#: src/components/status.jsx:1218
#: src/components/status.jsx:3227
msgid "Embed post"
msgstr ""
#: src/components/status.jsx:1235
#: src/components/status.jsx:1232
msgid "Conversation unmuted"
msgstr ""
#: src/components/status.jsx:1235
#: src/components/status.jsx:1232
msgid "Conversation muted"
msgstr ""
#: src/components/status.jsx:1241
#: src/components/status.jsx:1238
msgid "Unable to unmute conversation"
msgstr ""
#: src/components/status.jsx:1242
#: src/components/status.jsx:1239
msgid "Unable to mute conversation"
msgstr ""
#: src/components/status.jsx:1251
#: src/components/status.jsx:1248
msgid "Unmute conversation"
msgstr ""
#: src/components/status.jsx:1258
#: src/components/status.jsx:1255
msgid "Mute conversation"
msgstr ""
#: src/components/status.jsx:1274
#: src/components/status.jsx:1271
msgid "Post unpinned from profile"
msgstr ""
#: src/components/status.jsx:1275
#: src/components/status.jsx:1272
msgid "Post pinned to profile"
msgstr ""
#: src/components/status.jsx:1280
#: src/components/status.jsx:1277
msgid "Unable to unpin post"
msgstr ""
#: src/components/status.jsx:1280
#: src/components/status.jsx:1277
msgid "Unable to pin post"
msgstr ""
#: src/components/status.jsx:1289
#: src/components/status.jsx:1286
msgid "Unpin from profile"
msgstr ""
#: src/components/status.jsx:1296
#: src/components/status.jsx:1293
msgid "Pin to profile"
msgstr ""
#: src/components/status.jsx:1325
#: src/components/status.jsx:1322
msgid "Delete this post?"
msgstr ""
#: src/components/status.jsx:1341
#: src/components/status.jsx:1338
msgid "Post deleted"
msgstr ""
#: src/components/status.jsx:1344
#: src/components/status.jsx:1341
msgid "Unable to delete post"
msgstr ""
#: src/components/status.jsx:1372
#: src/components/status.jsx:1369
msgid "Report post…"
msgstr ""
#. placeholder {6}: username || acct
#: src/components/status.jsx:1442
#: src/components/status.jsx:1439
msgid "Unboosted @{6}'s post"
msgstr "Unboosted @{6}'s post"
#. placeholder {7}: username || acct
#: src/components/status.jsx:1443
#: src/components/status.jsx:1440
msgid "Boosted @{7}'s post"
msgstr "Boosted @{7}'s post"
#: src/components/status.jsx:1728
#: src/components/status.jsx:1764
#: src/components/status.jsx:2458
#: src/components/status.jsx:1725
#: src/components/status.jsx:1761
#: src/components/status.jsx:2447
msgid "Liked"
msgstr ""
#: src/components/status.jsx:1761
#: src/components/status.jsx:2445
#: src/components/status.jsx:1758
#: src/components/status.jsx:2434
msgid "Boosted"
msgstr ""
#: src/components/status.jsx:1771
#: src/components/status.jsx:2470
#: src/components/status.jsx:1768
#: src/components/status.jsx:2459
msgid "Bookmarked"
msgstr ""
#: src/components/status.jsx:1775
#: src/components/status.jsx:1772
msgid "Pinned"
msgstr ""
#: src/components/status.jsx:1820
#: src/components/status.jsx:2276
#: src/components/status.jsx:1817
#: src/components/status.jsx:2273
msgid "Deleted"
msgstr ""
#: src/components/status.jsx:1861
#: src/components/status.jsx:1858
msgid "{repliesCount, plural, one {# reply} other {# replies}}"
msgstr ""
#. placeholder {0}: snapStates.statusThreadNumber[sKey] ? ` ${snapStates.statusThreadNumber[sKey]}/X` : ''
#: src/components/status.jsx:1950
#: src/components/status.jsx:1947
msgid "Thread{0}"
msgstr ""
#: src/components/status.jsx:2026
#: src/components/status.jsx:2088
#: src/components/status.jsx:2173
#: src/components/status.jsx:2023
#: src/components/status.jsx:2085
#: src/components/status.jsx:2170
msgid "Show less"
msgstr ""
#: src/components/status.jsx:2026
#: src/components/status.jsx:2088
#: src/components/status.jsx:2023
#: src/components/status.jsx:2085
msgid "Show content"
msgstr ""
#: src/components/status.jsx:2173
#: src/components/status.jsx:2170
msgid "Show media"
msgstr ""
#: src/components/status.jsx:2310
#: src/components/status.jsx:2307
msgid "Edited"
msgstr ""
#: src/components/status.jsx:2387
#: src/components/status.jsx:2384
msgid "Comments"
msgstr ""
#. More from [Author]
#: src/components/status.jsx:2696
#: src/components/status.jsx:2685
msgid "More from <0/>"
msgstr "More from <0/>"
#: src/components/status.jsx:2998
#: src/components/status.jsx:2987
msgid "Edit History"
msgstr ""
#: src/components/status.jsx:3002
#: src/components/status.jsx:2991
msgid "Failed to load history"
msgstr ""
#: src/components/status.jsx:3007
#: src/components/status.jsx:2996
#: src/pages/annual-report.jsx:45
msgid "Loading…"
msgstr ""
#: src/components/status.jsx:3243
#: src/components/status.jsx:3232
msgid "HTML Code"
msgstr ""
#: src/components/status.jsx:3260
#: src/components/status.jsx:3249
msgid "HTML code copied"
msgstr ""
#: src/components/status.jsx:3263
#: src/components/status.jsx:3252
msgid "Unable to copy HTML code"
msgstr ""
#: src/components/status.jsx:3275
#: src/components/status.jsx:3264
msgid "Media attachments:"
msgstr ""
#: src/components/status.jsx:3297
#: src/components/status.jsx:3286
msgid "Account Emojis:"
msgstr ""
#: src/components/status.jsx:3328
#: src/components/status.jsx:3373
#: src/components/status.jsx:3317
#: src/components/status.jsx:3362
msgid "static URL"
msgstr ""
#: src/components/status.jsx:3342
#: src/components/status.jsx:3331
msgid "Emojis:"
msgstr ""
#: src/components/status.jsx:3387
#: src/components/status.jsx:3376
msgid "Notes:"
msgstr ""
#: src/components/status.jsx:3391
#: src/components/status.jsx:3380
msgid "This is static, unstyled and scriptless. You may need to apply your own styles and edit as needed."
msgstr ""
#: src/components/status.jsx:3397
#: src/components/status.jsx:3386
msgid "Polls are not interactive, becomes a list with vote counts."
msgstr ""
#: src/components/status.jsx:3402
#: src/components/status.jsx:3391
msgid "Media attachments can be images, videos, audios or any file types."
msgstr ""
#: src/components/status.jsx:3408
#: src/components/status.jsx:3397
msgid "Post could be edited or deleted later."
msgstr ""
#: src/components/status.jsx:3414
#: src/components/status.jsx:3403
msgid "Preview"
msgstr ""
#: src/components/status.jsx:3423
#: src/components/status.jsx:3412
msgid "Note: This preview is lightly styled."
msgstr ""
#. [Name] [Visibility icon] boosted
#: src/components/status.jsx:3667
#: src/components/status.jsx:3656
msgid "<0/> <1/> boosted"
msgstr ""