Fix RTF not following locale

pull/1176/head
Lim Chee Aun 2025-05-28 08:40:18 +08:00
rodzic 63a6206c35
commit 93fd434617
2 zmienionych plików z 131 dodań i 130 usunięć

Wyświetl plik

@ -104,7 +104,7 @@ const isIOS =
window.ontouchstart !== undefined &&
/iPad|iPhone|iPod/.test(navigator.userAgent);
const rtf = new Intl.RelativeTimeFormat();
const RTF = mem((locale) => new Intl.RelativeTimeFormat(locale || undefined));
const REACTIONS_LIMIT = 80;
@ -379,7 +379,8 @@ function Status({
showReplyParent,
mediaFirst,
}) {
const { _, t } = useLingui();
const { _, t, i18n } = useLingui();
const rtf = RTF(i18n.locale);
if (skeleton) {
return (

256
src/locales/en.po wygenerowano
Wyświetl plik

@ -34,7 +34,7 @@ msgstr ""
#: src/components/account-block.jsx:170
#: src/components/account-info.jsx:715
#: src/components/status.jsx:589
#: src/components/status.jsx:590
msgid "Group"
msgstr ""
@ -111,11 +111,11 @@ msgstr ""
#: src/components/compose.jsx:2783
#: src/components/media-alt-modal.jsx:55
#: src/components/media-modal.jsx:359
#: src/components/status.jsx:1835
#: src/components/status.jsx:1852
#: src/components/status.jsx:1977
#: src/components/status.jsx:2598
#: src/components/status.jsx:2601
#: src/components/status.jsx:1836
#: src/components/status.jsx:1853
#: src/components/status.jsx:1978
#: src/components/status.jsx:2599
#: src/components/status.jsx:2602
#: src/pages/account-statuses.jsx:526
#: src/pages/accounts.jsx:118
#: src/pages/hashtag.jsx:202
@ -203,7 +203,7 @@ msgid "Original"
msgstr ""
#: src/components/account-info.jsx:946
#: src/components/status.jsx:2382
#: src/components/status.jsx:2383
#: src/pages/catchup.jsx:71
#: src/pages/catchup.jsx:1448
#: src/pages/catchup.jsx:2061
@ -329,30 +329,30 @@ msgid "Add/Remove from Lists"
msgstr ""
#: src/components/account-info.jsx:1490
#: src/components/status.jsx:1257
#: src/components/status.jsx:1258
msgid "Link copied"
msgstr ""
#: src/components/account-info.jsx:1493
#: src/components/status.jsx:1260
#: src/components/status.jsx:1261
msgid "Unable to copy link"
msgstr ""
#: src/components/account-info.jsx:1499
#: src/components/shortcuts-settings.jsx:1059
#: src/components/status.jsx:1266
#: src/components/status.jsx:3376
#: src/components/status.jsx:1267
#: src/components/status.jsx:3377
msgid "Copy"
msgstr ""
#: src/components/account-info.jsx:1514
#: src/components/shortcuts-settings.jsx:1077
#: src/components/status.jsx:1282
#: src/components/status.jsx:1283
msgid "Sharing doesn't seem to work."
msgstr ""
#: src/components/account-info.jsx:1520
#: src/components/status.jsx:1288
#: src/components/status.jsx:1289
msgid "Share…"
msgstr ""
@ -466,9 +466,9 @@ msgstr ""
#: src/components/shortcuts-settings.jsx:230
#: src/components/shortcuts-settings.jsx:583
#: src/components/shortcuts-settings.jsx:783
#: src/components/status.jsx:3100
#: src/components/status.jsx:3340
#: src/components/status.jsx:3849
#: src/components/status.jsx:3101
#: src/components/status.jsx:3341
#: src/components/status.jsx:3850
#: src/pages/accounts.jsx:45
#: src/pages/catchup.jsx:1584
#: src/pages/filters.jsx:225
@ -718,7 +718,7 @@ msgid "Attachment #{i} failed"
msgstr "Attachment #{i} failed"
#: src/components/compose.jsx:1221
#: src/components/status.jsx:2165
#: src/components/status.jsx:2166
#: src/components/timeline.jsx:1023
msgid "Content warning"
msgstr ""
@ -754,7 +754,7 @@ msgstr ""
#: src/components/compose.jsx:1288
#: src/components/status.jsx:100
#: src/components/status.jsx:2041
#: src/components/status.jsx:2042
msgid "Private mention"
msgstr ""
@ -791,10 +791,10 @@ msgstr "Schedule"
#: src/components/compose.jsx:1675
#: src/components/keyboard-shortcuts-help.jsx:155
#: src/components/status.jsx:1029
#: src/components/status.jsx:1815
#: src/components/status.jsx:1030
#: src/components/status.jsx:1816
#: src/components/status.jsx:2502
#: src/components/status.jsx:1817
#: src/components/status.jsx:2503
msgid "Reply"
msgstr ""
@ -1016,7 +1016,7 @@ msgstr ""
#: src/components/drafts.jsx:128
#: src/components/list-add-edit.jsx:188
#: src/components/status.jsx:1432
#: src/components/status.jsx:1433
#: src/pages/filters.jsx:603
#: src/pages/scheduled-posts.jsx:369
msgid "Delete…"
@ -1225,10 +1225,10 @@ msgid "<0>l</0> or <1>f</1>"
msgstr ""
#: src/components/keyboard-shortcuts-help.jsx:176
#: src/components/status.jsx:1037
#: src/components/status.jsx:2529
#: src/components/status.jsx:2552
#: src/components/status.jsx:1038
#: src/components/status.jsx:2530
#: src/components/status.jsx:2553
#: src/components/status.jsx:2554
msgid "Boost"
msgstr ""
@ -1237,9 +1237,9 @@ msgid "<0>Shift</0> + <1>b</1>"
msgstr ""
#: src/components/keyboard-shortcuts-help.jsx:184
#: src/components/status.jsx:1100
#: src/components/status.jsx:2577
#: src/components/status.jsx:1101
#: src/components/status.jsx:2578
#: src/components/status.jsx:2579
msgid "Bookmark"
msgstr ""
@ -1304,14 +1304,14 @@ msgid "Media description"
msgstr ""
#: src/components/media-alt-modal.jsx:67
#: src/components/status.jsx:1143
#: src/components/status.jsx:1152
#: src/components/status.jsx:1144
#: src/components/status.jsx:1153
#: src/components/translation-block.jsx:237
msgid "Translate"
msgstr ""
#: src/components/media-alt-modal.jsx:78
#: src/components/status.jsx:1171
#: src/components/status.jsx:1172
msgid "Speak"
msgstr ""
@ -1348,9 +1348,9 @@ msgid "Filtered: {filterTitleStr}"
msgstr ""
#: src/components/media-post.jsx:133
#: src/components/status.jsx:3679
#: src/components/status.jsx:3775
#: src/components/status.jsx:3853
#: src/components/status.jsx:3680
#: src/components/status.jsx:3776
#: src/components/status.jsx:3854
#: src/components/timeline.jsx:1012
#: src/pages/catchup.jsx:75
#: src/pages/catchup.jsx:1880
@ -1662,8 +1662,8 @@ msgid "[Unknown notification type: {type}]"
msgstr ""
#: src/components/notification.jsx:445
#: src/components/status.jsx:1114
#: src/components/status.jsx:1124
#: src/components/status.jsx:1115
#: src/components/status.jsx:1125
msgid "Boosted/Liked by…"
msgstr ""
@ -1993,7 +1993,7 @@ msgid "Move down"
msgstr ""
#: src/components/shortcuts-settings.jsx:379
#: src/components/status.jsx:1394
#: src/components/status.jsx:1395
#: src/pages/list.jsx:195
msgid "Edit"
msgstr ""
@ -2192,325 +2192,325 @@ msgstr ""
msgid "Import/export settings from/to instance server (Very experimental)"
msgstr ""
#: src/components/status.jsx:613
#: src/components/status.jsx:614
msgid "<0/> <1>boosted</1>"
msgstr ""
#: src/components/status.jsx:712
#: src/components/status.jsx:713
msgid "Sorry, your current logged-in instance can't interact with this post from another instance."
msgstr ""
#. placeholder {0}: username || acct
#: src/components/status.jsx:866
#: src/components/status.jsx:867
msgid "Unliked @{0}'s post"
msgstr ""
#. placeholder {0}: username || acct
#: src/components/status.jsx:867
#: src/components/status.jsx:868
msgid "Liked @{0}'s post"
msgstr "Liked @{0}'s post"
#. placeholder {0}: username || acct
#: src/components/status.jsx:906
#: src/components/status.jsx:907
msgid "Unbookmarked @{0}'s post"
msgstr "Unbookmarked @{0}'s post"
#. placeholder {0}: username || acct
#: src/components/status.jsx:907
#: src/components/status.jsx:908
msgid "Bookmarked @{0}'s post"
msgstr "Bookmarked @{0}'s post"
#: src/components/status.jsx:1006
#: src/components/status.jsx:1007
msgid "Some media have no descriptions."
msgstr ""
#. placeholder {0}: rtf.format(-statusMonthsAgo, 'month')
#: src/components/status.jsx:1013
#: src/components/status.jsx:1014
msgid "Old post (<0>{0}</0>)"
msgstr ""
#: src/components/status.jsx:1037
#: src/components/status.jsx:1077
#: src/components/status.jsx:2529
#: src/components/status.jsx:2552
#: src/components/status.jsx:1038
#: src/components/status.jsx:1078
#: src/components/status.jsx:2530
#: src/components/status.jsx:2553
msgid "Unboost"
msgstr ""
#: src/components/status.jsx:1053
#: src/components/status.jsx:2544
#: src/components/status.jsx:1054
#: src/components/status.jsx:2545
msgid "Quote"
msgstr ""
#. placeholder {0}: username || acct
#: src/components/status.jsx:1065
#: src/components/status.jsx:1531
#: src/components/status.jsx:1066
#: src/components/status.jsx:1532
msgid "Unboosted @{0}'s post"
msgstr "Unboosted @{0}'s post"
#. placeholder {0}: username || acct
#: src/components/status.jsx:1066
#: src/components/status.jsx:1532
#: src/components/status.jsx:1067
#: src/components/status.jsx:1533
msgid "Boosted @{0}'s post"
msgstr "Boosted @{0}'s post"
#: src/components/status.jsx:1078
#: src/components/status.jsx:1079
msgid "Boost…"
msgstr ""
#: src/components/status.jsx:1090
#: src/components/status.jsx:1825
#: src/components/status.jsx:2565
#: src/components/status.jsx:1091
#: src/components/status.jsx:1826
#: src/components/status.jsx:2566
msgid "Unlike"
msgstr ""
#: src/components/status.jsx:1091
#: src/components/status.jsx:1825
#: src/components/status.jsx:1092
#: src/components/status.jsx:1826
#: src/components/status.jsx:2565
#: src/components/status.jsx:1827
#: src/components/status.jsx:2566
#: src/components/status.jsx:2567
msgid "Like"
msgstr ""
#: src/components/status.jsx:1100
#: src/components/status.jsx:2577
#: src/components/status.jsx:1101
#: src/components/status.jsx:2578
msgid "Unbookmark"
msgstr ""
#: src/components/status.jsx:1183
#: src/components/status.jsx:1184
msgid "Post text copied"
msgstr "Post text copied"
#: src/components/status.jsx:1186
#: src/components/status.jsx:1187
msgid "Unable to copy post text"
msgstr "Unable to copy post text"
#: src/components/status.jsx:1192
#: src/components/status.jsx:1193
msgid "Copy post text"
msgstr "Copy post text"
#. placeholder {0}: username || acct
#: src/components/status.jsx:1210
#: src/components/status.jsx:1211
msgid "View post by <0>@{0}</0>"
msgstr ""
#: src/components/status.jsx:1231
#: src/components/status.jsx:1232
msgid "Show Edit History"
msgstr ""
#: src/components/status.jsx:1234
#: src/components/status.jsx:1235
msgid "Edited: {editedDateText}"
msgstr ""
#: src/components/status.jsx:1301
#: src/components/status.jsx:3345
#: src/components/status.jsx:1302
#: src/components/status.jsx:3346
msgid "Embed post"
msgstr ""
#: src/components/status.jsx:1315
#: src/components/status.jsx:1316
msgid "Conversation unmuted"
msgstr ""
#: src/components/status.jsx:1315
#: src/components/status.jsx:1316
msgid "Conversation muted"
msgstr ""
#: src/components/status.jsx:1321
#: src/components/status.jsx:1322
msgid "Unable to unmute conversation"
msgstr ""
#: src/components/status.jsx:1322
#: src/components/status.jsx:1323
msgid "Unable to mute conversation"
msgstr ""
#: src/components/status.jsx:1331
#: src/components/status.jsx:1332
msgid "Unmute conversation"
msgstr ""
#: src/components/status.jsx:1338
#: src/components/status.jsx:1339
msgid "Mute conversation"
msgstr ""
#: src/components/status.jsx:1354
#: src/components/status.jsx:1355
msgid "Post unpinned from profile"
msgstr ""
#: src/components/status.jsx:1355
#: src/components/status.jsx:1356
msgid "Post pinned to profile"
msgstr ""
#: src/components/status.jsx:1360
#: src/components/status.jsx:1361
msgid "Unable to unpin post"
msgstr ""
#: src/components/status.jsx:1360
#: src/components/status.jsx:1361
msgid "Unable to pin post"
msgstr ""
#: src/components/status.jsx:1369
#: src/components/status.jsx:1370
msgid "Unpin from profile"
msgstr ""
#: src/components/status.jsx:1376
#: src/components/status.jsx:1377
msgid "Pin to profile"
msgstr ""
#: src/components/status.jsx:1405
#: src/components/status.jsx:1406
msgid "Delete this post?"
msgstr ""
#: src/components/status.jsx:1421
#: src/components/status.jsx:1422
msgid "Post deleted"
msgstr ""
#: src/components/status.jsx:1424
#: src/components/status.jsx:1425
msgid "Unable to delete post"
msgstr ""
#: src/components/status.jsx:1452
#: src/components/status.jsx:1453
msgid "Report post…"
msgstr ""
#: src/components/status.jsx:1826
#: src/components/status.jsx:1862
#: src/components/status.jsx:2566
#: src/components/status.jsx:1827
#: src/components/status.jsx:1863
#: src/components/status.jsx:2567
msgid "Liked"
msgstr ""
#: src/components/status.jsx:1859
#: src/components/status.jsx:2553
#: src/components/status.jsx:1860
#: src/components/status.jsx:2554
msgid "Boosted"
msgstr ""
#: src/components/status.jsx:1869
#: src/components/status.jsx:2578
#: src/components/status.jsx:1870
#: src/components/status.jsx:2579
msgid "Bookmarked"
msgstr ""
#: src/components/status.jsx:1873
#: src/components/status.jsx:1874
msgid "Pinned"
msgstr ""
#: src/components/status.jsx:1919
#: src/components/status.jsx:2390
#: src/components/status.jsx:1920
#: src/components/status.jsx:2391
msgid "Deleted"
msgstr ""
#: src/components/status.jsx:1960
#: src/components/status.jsx:1961
msgid "{repliesCount, plural, one {# reply} other {# replies}}"
msgstr ""
#. placeholder {0}: snapStates.statusThreadNumber[sKey] ? ` ${snapStates.statusThreadNumber[sKey]}/X` : ''
#: src/components/status.jsx:2050
#: src/components/status.jsx:2051
msgid "Thread{0}"
msgstr ""
#: src/components/status.jsx:2128
#: src/components/status.jsx:2190
#: src/components/status.jsx:2286
#: src/components/status.jsx:2129
#: src/components/status.jsx:2191
#: src/components/status.jsx:2287
msgid "Show less"
msgstr ""
#: src/components/status.jsx:2128
#: src/components/status.jsx:2190
#: src/components/status.jsx:2129
#: src/components/status.jsx:2191
msgid "Show content"
msgstr ""
#. placeholder {0}: filterInfo.titlesStr
#. placeholder {0}: filterInfo?.titlesStr
#: src/components/status.jsx:2282
#: src/components/status.jsx:2283
#: src/pages/catchup.jsx:1879
msgid "Filtered: {0}"
msgstr "Filtered: {0}"
#: src/components/status.jsx:2286
#: src/components/status.jsx:2287
msgid "Show media"
msgstr ""
#: src/components/status.jsx:2426
#: src/components/status.jsx:2427
msgid "Edited"
msgstr ""
#: src/components/status.jsx:2503
#: src/components/status.jsx:2504
msgid "Comments"
msgstr ""
#. More from [Author]
#: src/components/status.jsx:2803
#: src/components/status.jsx:2804
msgid "More from <0/>"
msgstr "More from <0/>"
#: src/components/status.jsx:3105
#: src/components/status.jsx:3106
msgid "Edit History"
msgstr ""
#: src/components/status.jsx:3109
#: src/components/status.jsx:3110
msgid "Failed to load history"
msgstr ""
#: src/components/status.jsx:3114
#: src/components/status.jsx:3115
#: src/pages/annual-report.jsx:45
msgid "Loading…"
msgstr ""
#: src/components/status.jsx:3350
#: src/components/status.jsx:3351
msgid "HTML Code"
msgstr ""
#: src/components/status.jsx:3367
#: src/components/status.jsx:3368
msgid "HTML code copied"
msgstr ""
#: src/components/status.jsx:3370
#: src/components/status.jsx:3371
msgid "Unable to copy HTML code"
msgstr ""
#: src/components/status.jsx:3382
#: src/components/status.jsx:3383
msgid "Media attachments:"
msgstr ""
#: src/components/status.jsx:3404
#: src/components/status.jsx:3405
msgid "Account Emojis:"
msgstr ""
#: src/components/status.jsx:3435
#: src/components/status.jsx:3480
#: src/components/status.jsx:3436
#: src/components/status.jsx:3481
msgid "static URL"
msgstr ""
#: src/components/status.jsx:3449
#: src/components/status.jsx:3450
msgid "Emojis:"
msgstr ""
#: src/components/status.jsx:3494
#: src/components/status.jsx:3495
msgid "Notes:"
msgstr ""
#: src/components/status.jsx:3498
#: src/components/status.jsx:3499
msgid "This is static, unstyled and scriptless. You may need to apply your own styles and edit as needed."
msgstr ""
#: src/components/status.jsx:3504
#: src/components/status.jsx:3505
msgid "Polls are not interactive, becomes a list with vote counts."
msgstr ""
#: src/components/status.jsx:3509
#: src/components/status.jsx:3510
msgid "Media attachments can be images, videos, audios or any file types."
msgstr ""
#: src/components/status.jsx:3515
#: src/components/status.jsx:3516
msgid "Post could be edited or deleted later."
msgstr ""
#: src/components/status.jsx:3521
#: src/components/status.jsx:3522
msgid "Preview"
msgstr ""
#: src/components/status.jsx:3530
#: src/components/status.jsx:3531
msgid "Note: This preview is lightly styled."
msgstr ""
#. [Name] [Visibility icon] boosted
#: src/components/status.jsx:3783
#: src/components/status.jsx:3784
msgid "<0/> <1/> boosted"
msgstr ""