kopia lustrzana https://github.com/cheeaun/phanpy
Prevent truncate links for Copy post text
rodzic
0e30c53219
commit
7c5a92ab6e
|
@ -106,7 +106,12 @@ function getPollText(poll) {
|
|||
.join('\n')}`;
|
||||
}
|
||||
function getPostText(status, opts) {
|
||||
const { maskCustomEmojis, maskURLs, hideInlineQuote } = opts || {};
|
||||
const {
|
||||
maskCustomEmojis,
|
||||
maskURLs,
|
||||
hideInlineQuote,
|
||||
htmlTextOpts = {},
|
||||
} = opts || {};
|
||||
const { spoilerText, poll, emojis } = status;
|
||||
let { content } = status;
|
||||
if (maskCustomEmojis && emojis?.length) {
|
||||
|
@ -119,6 +124,7 @@ function getPostText(status, opts) {
|
|||
return (
|
||||
(spoilerText ? `${spoilerText}\n\n` : '') +
|
||||
getHTMLText(content, {
|
||||
...htmlTextOpts,
|
||||
preProcess:
|
||||
(maskURLs || hideInlineQuote) &&
|
||||
((dom) => {
|
||||
|
@ -1252,6 +1258,9 @@ function Status({
|
|||
try {
|
||||
const postText = getPostText(status, {
|
||||
hideInlineQuote: supportsNativeQuote(),
|
||||
htmlTextOpts: {
|
||||
truncateLinks: false,
|
||||
},
|
||||
});
|
||||
navigator.clipboard.writeText(postText);
|
||||
showToast(t`Post text copied`);
|
||||
|
|
|
@ -34,7 +34,7 @@ msgstr ""
|
|||
|
||||
#: src/components/account-block.jsx:173
|
||||
#: src/components/account-info.jsx:683
|
||||
#: src/components/status.jsx:558
|
||||
#: src/components/status.jsx:564
|
||||
msgid "Group"
|
||||
msgstr ""
|
||||
|
||||
|
@ -115,11 +115,11 @@ msgstr ""
|
|||
#: src/components/media-attachment.jsx:397
|
||||
#: src/components/media-modal.jsx:363
|
||||
#: src/components/related-actions.jsx:238
|
||||
#: src/components/status.jsx:1996
|
||||
#: src/components/status.jsx:2013
|
||||
#: src/components/status.jsx:2149
|
||||
#: src/components/status.jsx:2810
|
||||
#: src/components/status.jsx:2813
|
||||
#: src/components/status.jsx:2005
|
||||
#: src/components/status.jsx:2022
|
||||
#: src/components/status.jsx:2158
|
||||
#: src/components/status.jsx:2819
|
||||
#: src/components/status.jsx:2822
|
||||
#: src/pages/account-statuses.jsx:539
|
||||
#: src/pages/accounts.jsx:118
|
||||
#: src/pages/hashtag.jsx:203
|
||||
|
@ -232,7 +232,7 @@ msgid "Original"
|
|||
msgstr ""
|
||||
|
||||
#: src/components/account-info.jsx:978
|
||||
#: src/components/status.jsx:2561
|
||||
#: src/components/status.jsx:2570
|
||||
#: src/pages/catchup.jsx:71
|
||||
#: src/pages/catchup.jsx:1460
|
||||
#: src/pages/catchup.jsx:2077
|
||||
|
@ -289,8 +289,8 @@ msgstr "View post stats"
|
|||
#: src/components/shortcuts-settings.jsx:230
|
||||
#: src/components/shortcuts-settings.jsx:583
|
||||
#: src/components/shortcuts-settings.jsx:783
|
||||
#: src/components/status.jsx:3049
|
||||
#: src/components/status.jsx:3261
|
||||
#: src/components/status.jsx:3058
|
||||
#: src/components/status.jsx:3270
|
||||
#: src/components/translated-bio-sheet.jsx:21
|
||||
#: src/pages/accounts.jsx:45
|
||||
#: src/pages/catchup.jsx:1597
|
||||
|
@ -509,7 +509,7 @@ msgid "Attachment #{i} failed"
|
|||
msgstr "Attachment #{i} failed"
|
||||
|
||||
#: src/components/compose.jsx:1369
|
||||
#: src/components/status.jsx:2333
|
||||
#: src/components/status.jsx:2342
|
||||
#: src/components/timeline.jsx:1016
|
||||
msgid "Content warning"
|
||||
msgstr ""
|
||||
|
@ -549,21 +549,21 @@ msgstr "Posting on <0/>"
|
|||
|
||||
#: src/components/compose.jsx:1818
|
||||
#: src/components/quote-settings-sheet.jsx:73
|
||||
#: src/components/status.jsx:303
|
||||
#: src/components/status.jsx:309
|
||||
#: src/pages/settings.jsx:375
|
||||
msgid "Anyone can quote"
|
||||
msgstr "Anyone can quote"
|
||||
|
||||
#: src/components/compose.jsx:1821
|
||||
#: src/components/quote-settings-sheet.jsx:76
|
||||
#: src/components/status.jsx:304
|
||||
#: src/components/status.jsx:310
|
||||
#: src/pages/settings.jsx:378
|
||||
msgid "Your followers can quote"
|
||||
msgstr "Your followers can quote"
|
||||
|
||||
#: src/components/compose.jsx:1824
|
||||
#: src/components/quote-settings-sheet.jsx:79
|
||||
#: src/components/status.jsx:305
|
||||
#: src/components/status.jsx:311
|
||||
#: src/pages/settings.jsx:381
|
||||
msgid "Only you can quote"
|
||||
msgstr "Only you can quote"
|
||||
|
@ -588,7 +588,7 @@ msgid "Quiet public"
|
|||
msgstr "Quiet public"
|
||||
|
||||
#: src/components/compose.jsx:1872
|
||||
#: src/components/status.jsx:2213
|
||||
#: src/components/status.jsx:2222
|
||||
#: src/utils/visibility-text.jsx:8
|
||||
msgid "Private mention"
|
||||
msgstr ""
|
||||
|
@ -599,10 +599,10 @@ msgstr "Schedule"
|
|||
|
||||
#: src/components/compose.jsx:1926
|
||||
#: src/components/keyboard-shortcuts-help.jsx:155
|
||||
#: src/components/status.jsx:1048
|
||||
#: src/components/status.jsx:1976
|
||||
#: src/components/status.jsx:1977
|
||||
#: src/components/status.jsx:2680
|
||||
#: src/components/status.jsx:1054
|
||||
#: src/components/status.jsx:1985
|
||||
#: src/components/status.jsx:1986
|
||||
#: src/components/status.jsx:2689
|
||||
msgid "Reply"
|
||||
msgstr ""
|
||||
|
||||
|
@ -675,7 +675,7 @@ msgstr ""
|
|||
|
||||
#: src/components/drafts.jsx:126
|
||||
#: src/components/list-add-edit.jsx:188
|
||||
#: src/components/status.jsx:1520
|
||||
#: src/components/status.jsx:1529
|
||||
#: src/pages/filters.jsx:603
|
||||
#: src/pages/scheduled-posts.jsx:368
|
||||
msgid "Delete…"
|
||||
|
@ -717,7 +717,7 @@ msgstr ""
|
|||
|
||||
#: src/components/drafts.jsx:270
|
||||
#: src/components/keyboard-shortcuts-help.jsx:184
|
||||
#: src/components/status.jsx:715
|
||||
#: src/components/status.jsx:721
|
||||
msgid "Quote"
|
||||
msgstr ""
|
||||
|
||||
|
@ -990,9 +990,9 @@ msgid "<0>l</0> or <1>f</1>"
|
|||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:176
|
||||
#: src/components/status.jsx:1056
|
||||
#: src/components/status.jsx:2709
|
||||
#: src/components/status.jsx:2764
|
||||
#: src/components/status.jsx:1062
|
||||
#: src/components/status.jsx:2718
|
||||
#: src/components/status.jsx:2773
|
||||
msgid "Boost"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1001,9 +1001,9 @@ msgid "<0>Shift</0> + <1>b</1>"
|
|||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:188
|
||||
#: src/components/status.jsx:1158
|
||||
#: src/components/status.jsx:2789
|
||||
#: src/components/status.jsx:2790
|
||||
#: src/components/status.jsx:1164
|
||||
#: src/components/status.jsx:2798
|
||||
#: src/components/status.jsx:2799
|
||||
msgid "Bookmark"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1086,14 +1086,14 @@ msgid "Media description"
|
|||
msgstr ""
|
||||
|
||||
#: src/components/media-alt-modal.jsx:67
|
||||
#: src/components/status.jsx:1213
|
||||
#: src/components/status.jsx:1222
|
||||
#: src/components/status.jsx:1219
|
||||
#: src/components/status.jsx:1228
|
||||
#: src/components/translation-block.jsx:239
|
||||
msgid "Translate"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/media-alt-modal.jsx:78
|
||||
#: src/components/status.jsx:1243
|
||||
#: src/components/status.jsx:1249
|
||||
msgid "Speak"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1220,8 +1220,8 @@ msgstr ""
|
|||
|
||||
#: src/components/media-post.jsx:133
|
||||
#: src/components/status-compact.jsx:70
|
||||
#: src/components/status.jsx:3187
|
||||
#: src/components/status.jsx:3265
|
||||
#: src/components/status.jsx:3196
|
||||
#: src/components/status.jsx:3274
|
||||
#: src/components/timeline.jsx:1005
|
||||
#: src/pages/catchup.jsx:76
|
||||
#: src/pages/catchup.jsx:1896
|
||||
|
@ -1556,8 +1556,8 @@ msgid "[Unknown notification type: {type}]"
|
|||
msgstr ""
|
||||
|
||||
#: src/components/notification.jsx:512
|
||||
#: src/components/status.jsx:1172
|
||||
#: src/components/status.jsx:1182
|
||||
#: src/components/status.jsx:1178
|
||||
#: src/components/status.jsx:1188
|
||||
msgid "Boosted/Liked by…"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1583,19 +1583,19 @@ msgid "View #Wrapstodon"
|
|||
msgstr "View #Wrapstodon"
|
||||
|
||||
#: src/components/notification.jsx:862
|
||||
#: src/components/status.jsx:266
|
||||
#: src/components/status.jsx:272
|
||||
msgid "Read more →"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/open-link-sheet.jsx:30
|
||||
#: src/components/related-actions.jsx:492
|
||||
#: src/components/status.jsx:1331
|
||||
#: src/components/status.jsx:1340
|
||||
msgid "Link copied"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/open-link-sheet.jsx:33
|
||||
#: src/components/related-actions.jsx:495
|
||||
#: src/components/status.jsx:1334
|
||||
#: src/components/status.jsx:1343
|
||||
msgid "Unable to copy link"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1607,13 +1607,13 @@ msgstr "Open link?"
|
|||
#: src/components/post-embed-modal.jsx:232
|
||||
#: src/components/related-actions.jsx:501
|
||||
#: src/components/shortcuts-settings.jsx:1059
|
||||
#: src/components/status.jsx:1340
|
||||
#: src/components/status.jsx:1349
|
||||
msgid "Copy"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/open-link-sheet.jsx:82
|
||||
#: src/components/related-actions.jsx:522
|
||||
#: src/components/status.jsx:1362
|
||||
#: src/components/status.jsx:1371
|
||||
msgid "Share…"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1681,7 +1681,7 @@ msgid "Ending"
|
|||
msgstr "Ending"
|
||||
|
||||
#: src/components/post-embed-modal.jsx:201
|
||||
#: src/components/status.jsx:1375
|
||||
#: src/components/status.jsx:1384
|
||||
msgid "Embed post"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1910,7 +1910,7 @@ msgstr "Show featured profiles"
|
|||
|
||||
#: src/components/related-actions.jsx:516
|
||||
#: src/components/shortcuts-settings.jsx:1077
|
||||
#: src/components/status.jsx:1356
|
||||
#: src/components/status.jsx:1365
|
||||
msgid "Sharing doesn't seem to work."
|
||||
msgstr ""
|
||||
|
||||
|
@ -2248,7 +2248,7 @@ msgid "Move down"
|
|||
msgstr ""
|
||||
|
||||
#: src/components/shortcuts-settings.jsx:379
|
||||
#: src/components/status.jsx:1482
|
||||
#: src/components/status.jsx:1491
|
||||
#: src/pages/list.jsx:195
|
||||
msgid "Edit"
|
||||
msgstr ""
|
||||
|
@ -2447,323 +2447,323 @@ msgstr ""
|
|||
msgid "Import/export settings from/to instance server (Very experimental)"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:295
|
||||
#: src/components/status.jsx:301
|
||||
msgid "Private posts cannot be quoted"
|
||||
msgstr "Private posts cannot be quoted"
|
||||
|
||||
#: src/components/status.jsx:296
|
||||
#: src/components/status.jsx:302
|
||||
msgid "Request to quote"
|
||||
msgstr "Request to quote"
|
||||
|
||||
#: src/components/status.jsx:297
|
||||
#: src/components/status.jsx:303
|
||||
msgid "Author will manually review"
|
||||
msgstr "Author will manually review"
|
||||
|
||||
#: src/components/status.jsx:298
|
||||
#: src/components/status.jsx:304
|
||||
msgid "Only followers can quote this post"
|
||||
msgstr "Only followers can quote this post"
|
||||
|
||||
#: src/components/status.jsx:299
|
||||
#: src/components/status.jsx:305
|
||||
msgid "You are not allowed to quote this post"
|
||||
msgstr "You are not allowed to quote this post"
|
||||
|
||||
#: src/components/status.jsx:582
|
||||
#: src/components/status.jsx:588
|
||||
msgid "<0/> <1>boosted</1>"
|
||||
msgstr "<0/> <1>boosted</1>"
|
||||
|
||||
#: src/components/status.jsx:687
|
||||
#: src/components/status.jsx:693
|
||||
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:880
|
||||
#: src/components/status.jsx:886
|
||||
msgid "Unliked @{0}'s post"
|
||||
msgstr ""
|
||||
|
||||
#. placeholder {0}: username || acct
|
||||
#: src/components/status.jsx:881
|
||||
#: src/components/status.jsx:887
|
||||
msgid "Liked @{0}'s post"
|
||||
msgstr "Liked @{0}'s post"
|
||||
|
||||
#. placeholder {0}: username || acct
|
||||
#: src/components/status.jsx:920
|
||||
#: src/components/status.jsx:926
|
||||
msgid "Unbookmarked @{0}'s post"
|
||||
msgstr "Unbookmarked @{0}'s post"
|
||||
|
||||
#. placeholder {0}: username || acct
|
||||
#: src/components/status.jsx:921
|
||||
#: src/components/status.jsx:927
|
||||
msgid "Bookmarked @{0}'s post"
|
||||
msgstr "Bookmarked @{0}'s post"
|
||||
|
||||
#: src/components/status.jsx:1025
|
||||
#: src/components/status.jsx:1031
|
||||
msgid "Some media have no descriptions."
|
||||
msgstr ""
|
||||
|
||||
#. placeholder {0}: rtf.format(-statusMonthsAgo, 'month')
|
||||
#: src/components/status.jsx:1032
|
||||
#: src/components/status.jsx:1038
|
||||
msgid "Old post (<0>{0}</0>)"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:1056
|
||||
#: src/components/status.jsx:1133
|
||||
#: src/components/status.jsx:2709
|
||||
#: src/components/status.jsx:2762
|
||||
#: src/components/status.jsx:1062
|
||||
#: src/components/status.jsx:1139
|
||||
#: src/components/status.jsx:2718
|
||||
#: src/components/status.jsx:2771
|
||||
msgid "Unboost"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:1095
|
||||
#: src/components/status.jsx:2747
|
||||
#: src/components/status.jsx:1101
|
||||
#: src/components/status.jsx:2756
|
||||
msgid "Quote with link"
|
||||
msgstr "Quote with link"
|
||||
|
||||
#. placeholder {0}: username || acct
|
||||
#: src/components/status.jsx:1112
|
||||
#: src/components/status.jsx:1661
|
||||
#: src/components/status.jsx:1118
|
||||
#: src/components/status.jsx:1670
|
||||
msgid "Unboosted @{0}'s post"
|
||||
msgstr "Unboosted @{0}'s post"
|
||||
|
||||
#. placeholder {0}: username || acct
|
||||
#: src/components/status.jsx:1113
|
||||
#: src/components/status.jsx:1662
|
||||
#: src/components/status.jsx:1119
|
||||
#: src/components/status.jsx:1671
|
||||
msgid "Boosted @{0}'s post"
|
||||
msgstr "Boosted @{0}'s post"
|
||||
|
||||
#: src/components/status.jsx:1135
|
||||
#: src/components/status.jsx:2761
|
||||
#: src/components/status.jsx:1141
|
||||
#: src/components/status.jsx:2770
|
||||
msgid "Boost/Quote…"
|
||||
msgstr "Boost/Quote…"
|
||||
|
||||
#: src/components/status.jsx:1136
|
||||
#: src/components/status.jsx:2761
|
||||
#: src/components/status.jsx:1142
|
||||
#: src/components/status.jsx:2770
|
||||
msgid "Boost…"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:1148
|
||||
#: src/components/status.jsx:1986
|
||||
#: src/components/status.jsx:2777
|
||||
#: src/components/status.jsx:1154
|
||||
#: src/components/status.jsx:1995
|
||||
#: src/components/status.jsx:2786
|
||||
msgid "Unlike"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:1149
|
||||
#: src/components/status.jsx:1986
|
||||
#: src/components/status.jsx:1987
|
||||
#: src/components/status.jsx:2777
|
||||
#: src/components/status.jsx:2778
|
||||
#: src/components/status.jsx:1155
|
||||
#: src/components/status.jsx:1995
|
||||
#: src/components/status.jsx:1996
|
||||
#: src/components/status.jsx:2786
|
||||
#: src/components/status.jsx:2787
|
||||
msgid "Like"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:1158
|
||||
#: src/components/status.jsx:2789
|
||||
#: src/components/status.jsx:1164
|
||||
#: src/components/status.jsx:2798
|
||||
msgid "Unbookmark"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:1193
|
||||
#: src/components/status.jsx:1199
|
||||
msgid "View Quotes"
|
||||
msgstr "View Quotes"
|
||||
|
||||
#: src/components/status.jsx:1257
|
||||
#: src/components/status.jsx:1266
|
||||
msgid "Post text copied"
|
||||
msgstr "Post text copied"
|
||||
|
||||
#: src/components/status.jsx:1260
|
||||
#: src/components/status.jsx:1269
|
||||
msgid "Unable to copy post text"
|
||||
msgstr "Unable to copy post text"
|
||||
|
||||
#: src/components/status.jsx:1266
|
||||
#: src/components/status.jsx:1275
|
||||
msgid "Copy post text"
|
||||
msgstr "Copy post text"
|
||||
|
||||
#. placeholder {0}: username || acct
|
||||
#: src/components/status.jsx:1284
|
||||
#: src/components/status.jsx:1293
|
||||
msgid "View post by <0>@{0}</0>"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:1305
|
||||
#: src/components/status.jsx:1314
|
||||
msgid "Show Edit History"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:1308
|
||||
#: src/components/status.jsx:1317
|
||||
msgid "Edited: {editedDateText}"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:1389
|
||||
#: src/components/status.jsx:1398
|
||||
msgid "Conversation unmuted"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:1389
|
||||
#: src/components/status.jsx:1398
|
||||
msgid "Conversation muted"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:1395
|
||||
#: src/components/status.jsx:1404
|
||||
msgid "Unable to unmute conversation"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:1396
|
||||
#: src/components/status.jsx:1405
|
||||
msgid "Unable to mute conversation"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:1405
|
||||
#: src/components/status.jsx:1414
|
||||
msgid "Unmute conversation"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:1412
|
||||
#: src/components/status.jsx:1421
|
||||
msgid "Mute conversation"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:1428
|
||||
#: src/components/status.jsx:1437
|
||||
msgid "Post unpinned from profile"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:1429
|
||||
#: src/components/status.jsx:1438
|
||||
msgid "Post pinned to profile"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:1434
|
||||
#: src/components/status.jsx:1443
|
||||
msgid "Unable to unpin post"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:1434
|
||||
#: src/components/status.jsx:1443
|
||||
msgid "Unable to pin post"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:1443
|
||||
#: src/components/status.jsx:1452
|
||||
msgid "Unpin from profile"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:1450
|
||||
#: src/components/status.jsx:1459
|
||||
msgid "Pin to profile"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:1463
|
||||
#: src/components/status.jsx:1472
|
||||
#: src/pages/settings.jsx:336
|
||||
msgid "Quote settings"
|
||||
msgstr "Quote settings"
|
||||
|
||||
#: src/components/status.jsx:1493
|
||||
#: src/components/status.jsx:1502
|
||||
msgid "Delete this post?"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:1509
|
||||
#: src/components/status.jsx:1518
|
||||
msgid "Post deleted"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:1512
|
||||
#: src/components/status.jsx:1521
|
||||
msgid "Unable to delete post"
|
||||
msgstr ""
|
||||
|
||||
#. placeholder {0}: username || acct
|
||||
#: src/components/status.jsx:1537
|
||||
#: src/components/status.jsx:1546
|
||||
msgid "Remove my post from <0>@{0}</0>'s post?"
|
||||
msgstr "Remove my post from <0>@{0}</0>'s post?"
|
||||
|
||||
#: src/components/status.jsx:1558
|
||||
#: src/components/status.jsx:1567
|
||||
msgid "Quote removed"
|
||||
msgstr "Quote removed"
|
||||
|
||||
#: src/components/status.jsx:1562
|
||||
#: src/components/status.jsx:1571
|
||||
msgid "Unable to remove quote"
|
||||
msgstr "Unable to remove quote"
|
||||
|
||||
#: src/components/status.jsx:1568
|
||||
#: src/components/status.jsx:1577
|
||||
msgid "Remove quote…"
|
||||
msgstr "Remove quote…"
|
||||
|
||||
#: src/components/status.jsx:1582
|
||||
#: src/components/status.jsx:1591
|
||||
msgid "Report post…"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:1987
|
||||
#: src/components/status.jsx:2023
|
||||
#: src/components/status.jsx:2778
|
||||
#: src/components/status.jsx:1996
|
||||
#: src/components/status.jsx:2032
|
||||
#: src/components/status.jsx:2787
|
||||
msgid "Liked"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:2020
|
||||
#: src/components/status.jsx:2764
|
||||
#: src/components/status.jsx:2029
|
||||
#: src/components/status.jsx:2773
|
||||
msgid "Boosted"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:2030
|
||||
#: src/components/status.jsx:2790
|
||||
#: src/components/status.jsx:2039
|
||||
#: src/components/status.jsx:2799
|
||||
msgid "Bookmarked"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:2034
|
||||
#: src/components/status.jsx:2043
|
||||
msgid "Pinned"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:2091
|
||||
#: src/components/status.jsx:2569
|
||||
#: src/components/status.jsx:2100
|
||||
#: src/components/status.jsx:2578
|
||||
msgid "Deleted"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:2132
|
||||
#: src/components/status.jsx:2141
|
||||
msgid "{repliesCount, plural, one {# reply} other {# replies}}"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:2296
|
||||
#: src/components/status.jsx:2358
|
||||
#: src/components/status.jsx:2464
|
||||
#: src/components/status.jsx:2305
|
||||
#: src/components/status.jsx:2367
|
||||
#: src/components/status.jsx:2473
|
||||
msgid "Show less"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:2296
|
||||
#: src/components/status.jsx:2358
|
||||
#: src/components/status.jsx:2305
|
||||
#: src/components/status.jsx:2367
|
||||
msgid "Show content"
|
||||
msgstr ""
|
||||
|
||||
#. placeholder {0}: filterInfo.titlesStr
|
||||
#. placeholder {0}: filterInfo?.titlesStr
|
||||
#: src/components/status.jsx:2460
|
||||
#: src/components/status.jsx:2469
|
||||
#: src/pages/catchup.jsx:1895
|
||||
msgid "Filtered: {0}"
|
||||
msgstr "Filtered: {0}"
|
||||
|
||||
#: src/components/status.jsx:2464
|
||||
#: src/components/status.jsx:2473
|
||||
msgid "Show media"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:2604
|
||||
#: src/components/status.jsx:2613
|
||||
msgid "Edited"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:2681
|
||||
#: src/components/status.jsx:2690
|
||||
msgid "Comments"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:2930
|
||||
#: src/components/status.jsx:2939
|
||||
msgid "Post hidden by your filters"
|
||||
msgstr "Post hidden by your filters"
|
||||
|
||||
#: src/components/status.jsx:2931
|
||||
#: src/components/status.jsx:2940
|
||||
msgid "Post pending"
|
||||
msgstr "Post pending"
|
||||
|
||||
#: src/components/status.jsx:2932
|
||||
#: src/components/status.jsx:2933
|
||||
#: src/components/status.jsx:2934
|
||||
#: src/components/status.jsx:2941
|
||||
#: src/components/status.jsx:2942
|
||||
#: src/components/status.jsx:2943
|
||||
msgid "Post unavailable"
|
||||
msgstr "Post unavailable"
|
||||
|
||||
#: src/components/status.jsx:2935
|
||||
#: src/components/status.jsx:2944
|
||||
msgid "Post removed by author"
|
||||
msgstr "Post removed by author"
|
||||
|
||||
#: src/components/status.jsx:3054
|
||||
#: src/components/status.jsx:3063
|
||||
msgid "Edit History"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:3058
|
||||
#: src/components/status.jsx:3067
|
||||
msgid "Failed to load history"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/status.jsx:3063
|
||||
#: src/components/status.jsx:3072
|
||||
#: src/pages/annual-report.jsx:45
|
||||
msgid "Loading…"
|
||||
msgstr ""
|
||||
|
||||
#. [Name] [Visibility icon] boosted
|
||||
#: src/components/status.jsx:3195
|
||||
#: src/components/status.jsx:3204
|
||||
msgid "<0/> <1/> boosted"
|
||||
msgstr "<0/> <1/> boosted"
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import mem from './mem';
|
|||
const div = document.createElement('div');
|
||||
function getHTMLText(html, opts) {
|
||||
if (!html) return '';
|
||||
const { preProcess } = opts || {};
|
||||
const { preProcess, truncateLinks = true } = opts || {};
|
||||
|
||||
div.innerHTML = html
|
||||
.replace(/<\/p>/g, '</p>\n\n')
|
||||
|
@ -14,15 +14,17 @@ function getHTMLText(html, opts) {
|
|||
|
||||
preProcess?.(div);
|
||||
|
||||
// MASTODON-SPECIFIC classes
|
||||
// Remove .invisible
|
||||
div.querySelectorAll('.invisible').forEach((el) => {
|
||||
el.remove();
|
||||
});
|
||||
// Add … at end of .ellipsis
|
||||
div.querySelectorAll('.ellipsis').forEach((el) => {
|
||||
el.append('...');
|
||||
});
|
||||
if (truncateLinks) {
|
||||
// MASTODON-SPECIFIC classes
|
||||
// Remove .invisible
|
||||
div.querySelectorAll('.invisible').forEach((el) => {
|
||||
el.remove();
|
||||
});
|
||||
// Add … at end of .ellipsis
|
||||
div.querySelectorAll('.ellipsis').forEach((el) => {
|
||||
el.append('…');
|
||||
});
|
||||
}
|
||||
|
||||
return div.innerText.replace(/[\r\n]{3,}/g, '\n\n').trim();
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue