i18n for comment truncating
This commit is contained in:
@@ -1367,7 +1367,7 @@ class CommentSystem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Maximum characters to fully render in the item view per comment
|
// Maximum characters to fully render in the item view per comment
|
||||||
static get ITEM_VIEW_MAX_CHARS() { return 10000; }
|
static get ITEM_VIEW_MAX_CHARS() { return 2000; }
|
||||||
|
|
||||||
renderCommentContent(content, commentId = null, bypassTruncation = false) {
|
renderCommentContent(content, commentId = null, bypassTruncation = false) {
|
||||||
if (!content) return '';
|
if (!content) return '';
|
||||||
@@ -1638,7 +1638,8 @@ class CommentSystem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (truncated) {
|
if (truncated) {
|
||||||
md += `<span class="item-comment-truncated-notice">… <button class="load-full-comment-btn" type="button">show full comment</button></span>`;
|
const btnLabel = (window.f0ckI18n?.sidebar_show_full_comment) || 'show full comment';
|
||||||
|
md += `<span class="item-comment-truncated-notice"><button class="load-full-comment-btn" type="button">${btnLabel}</button></span>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
return md;
|
return md;
|
||||||
@@ -1646,7 +1647,8 @@ class CommentSystem {
|
|||||||
console.error('Markdown error:', e);
|
console.error('Markdown error:', e);
|
||||||
let fallback = this.escapeHtml(content);
|
let fallback = this.escapeHtml(content);
|
||||||
if (truncated) {
|
if (truncated) {
|
||||||
fallback += ` <span class="item-comment-truncated-notice">… <button class="load-full-comment-btn" type="button">show full comment</button></span>`;
|
const btnLabel = (window.f0ckI18n?.sidebar_show_full_comment) || 'show full comment';
|
||||||
|
fallback += ` <span class="item-comment-truncated-notice"><button class="load-full-comment-btn" type="button">${btnLabel}</button></span>`;
|
||||||
}
|
}
|
||||||
return fallback;
|
return fallback;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -404,7 +404,8 @@
|
|||||||
"loading_activity": "Aktivität wird geladen...",
|
"loading_activity": "Aktivität wird geladen...",
|
||||||
"view": "Ansehen",
|
"view": "Ansehen",
|
||||||
"read_more": "mehr sehen",
|
"read_more": "mehr sehen",
|
||||||
"see_less": "weniger anzeigen"
|
"see_less": "weniger anzeigen",
|
||||||
|
"show_full_comment": "ganzen Kommentar anzeigen"
|
||||||
},
|
},
|
||||||
"subscriptions": {
|
"subscriptions": {
|
||||||
"title": "Meine Abonnements",
|
"title": "Meine Abonnements",
|
||||||
|
|||||||
@@ -408,7 +408,8 @@
|
|||||||
"loading_activity": "Loading activity...",
|
"loading_activity": "Loading activity...",
|
||||||
"view": "View",
|
"view": "View",
|
||||||
"read_more": "read more",
|
"read_more": "read more",
|
||||||
"see_less": "see less"
|
"see_less": "see less",
|
||||||
|
"show_full_comment": "show full comment"
|
||||||
},
|
},
|
||||||
"subscriptions": {
|
"subscriptions": {
|
||||||
"title": "My Subscriptions",
|
"title": "My Subscriptions",
|
||||||
|
|||||||
@@ -404,7 +404,8 @@
|
|||||||
"loading_activity": "Activiteit laden...",
|
"loading_activity": "Activiteit laden...",
|
||||||
"view": "Bekijken",
|
"view": "Bekijken",
|
||||||
"read_more": "lees meer",
|
"read_more": "lees meer",
|
||||||
"see_less": "zie minder"
|
"see_less": "zie minder",
|
||||||
|
"show_full_comment": "volledig commentaar tonen"
|
||||||
},
|
},
|
||||||
"subscriptions": {
|
"subscriptions": {
|
||||||
"title": "Mijn Abonnementen",
|
"title": "Mijn Abonnementen",
|
||||||
|
|||||||
@@ -405,8 +405,9 @@
|
|||||||
"sidebar": {
|
"sidebar": {
|
||||||
"loading_activity": "Aktivität wird geladen...",
|
"loading_activity": "Aktivität wird geladen...",
|
||||||
"view": "Ansehen",
|
"view": "Ansehen",
|
||||||
"read_more": "mehr lesen",
|
"read_more": "mehr sehen",
|
||||||
"see_less": "weniger sehen"
|
"see_less": "weniger sehen",
|
||||||
|
"show_full_comment": "Kommentar vollständig ausklappen"
|
||||||
},
|
},
|
||||||
"subscriptions": {
|
"subscriptions": {
|
||||||
"title": "Meine Abonnements",
|
"title": "Meine Abonnements",
|
||||||
|
|||||||
@@ -401,6 +401,7 @@
|
|||||||
sidebar_view: "{{ t('sidebar.view') }}",
|
sidebar_view: "{{ t('sidebar.view') }}",
|
||||||
sidebar_read_more: "{{ t('sidebar.read_more') }}",
|
sidebar_read_more: "{{ t('sidebar.read_more') }}",
|
||||||
sidebar_see_less: "{{ t('sidebar.see_less') }}",
|
sidebar_see_less: "{{ t('sidebar.see_less') }}",
|
||||||
|
sidebar_show_full_comment: "{{ t('sidebar.show_full_comment') }}",
|
||||||
select_file: "{{ t('upload_btn.select_file') }}",
|
select_file: "{{ t('upload_btn.select_file') }}",
|
||||||
enter_url: "{{ t('upload_btn.enter_url') }}",
|
enter_url: "{{ t('upload_btn.enter_url') }}",
|
||||||
tags_required: "{{ t('upload_btn.tags_required') }}",
|
tags_required: "{{ t('upload_btn.tags_required') }}",
|
||||||
|
|||||||
Reference in New Issue
Block a user