From aa43f50a8ca5cd8d3721d8a379929cc59c88f01c Mon Sep 17 00:00:00 2001 From: echo Date: Sat, 28 Feb 2026 23:57:33 +0100 Subject: [PATCH] fix: localize UI text to Macedonian and fix view count display MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Change date format from 'short' to 'long' month names in Macedonian - Translate 'views' to 'прегледи' across all components - Translate 'shares' to 'споделувања' - Translate 'updates' to 'ажурирања' - Translate 'By' to 'Од' for author attribution - Translate 'Back to articles' to 'Назад кон вести' - Translate archive page headers to Macedonian - Translate auto-scroll button text to Macedonian - Translate connection status to Macedonian - Add fallback to 0 for undefined view counts (|| 0) --- .../features/live-blog/LiveBlogViewer.tsx | 8 +++--- .../live-blog/PinnedLiveBlogSidebar.tsx | 4 +-- frontend/src/components/home/HeroArticle.tsx | 6 ++-- .../components/routes/ArchiveComponent.tsx | 28 +++++++++---------- .../routes/ArticleDetailComponent.tsx | 6 ++-- .../components/routes/LiveBlogsComponent.tsx | 6 ++-- 6 files changed, 29 insertions(+), 29 deletions(-) diff --git a/frontend/src/components/features/live-blog/LiveBlogViewer.tsx b/frontend/src/components/features/live-blog/LiveBlogViewer.tsx index bc3b24c..67d8efe 100644 --- a/frontend/src/components/features/live-blog/LiveBlogViewer.tsx +++ b/frontend/src/components/features/live-blog/LiveBlogViewer.tsx @@ -165,12 +165,12 @@ export function LiveBlogViewer({ slug, className }: LiveBlogViewerProps) { isConnected ? 'bg-green-500' : 'bg-red-500' )} /> - {isConnected ? 'Connected' : `Reconnecting... (${reconnectAttempts})`} + {isConnected ? 'Поврзано' : `Се поврзува... (${reconnectAttempts})`} )} - {liveBlog.viewCount} views - {updates.length} updates + {liveBlog.viewCount || 0} прегледи + {updates.length} ажурирања
@@ -179,7 +179,7 @@ export function LiveBlogViewer({ slug, className }: LiveBlogViewerProps) { size="sm" onClick={handleAutoScrollToggle} > - {autoScroll ? 'Auto-scroll ON' : 'Auto-scroll OFF'} + {autoScroll ? 'Авто-скрол ВКЛУЧЕН' : 'Авто-скрол ИСКЛУЧЕН'} {!isConnected && (
diff --git a/frontend/src/components/home/HeroArticle.tsx b/frontend/src/components/home/HeroArticle.tsx index 91b6ac0..2fefb55 100644 --- a/frontend/src/components/home/HeroArticle.tsx +++ b/frontend/src/components/home/HeroArticle.tsx @@ -83,7 +83,7 @@ export function HeroArticle() { {new Date(article.createdAt).toLocaleDateString('mk-MK', { day: 'numeric', - month: 'short', + month: 'long', year: 'numeric', })} @@ -98,7 +98,7 @@ export function HeroArticle() {
- {article.views} views + {article.views || 0} прегледи
@@ -132,7 +132,7 @@ export function HeroArticle() {
{(article.facebookShares || 0) + (article.twitterShares || 0) + (article.whatsappShares || 0) + (article.telegramShares || 0)} - shares + споделувања
diff --git a/frontend/src/components/routes/ArchiveComponent.tsx b/frontend/src/components/routes/ArchiveComponent.tsx index d40fc40..2085cd9 100644 --- a/frontend/src/components/routes/ArchiveComponent.tsx +++ b/frontend/src/components/routes/ArchiveComponent.tsx @@ -28,8 +28,8 @@ export function ArchiveComponent() { return (
-

Articles

-

Latest news and articles

+

Архива

+

Најнови вести и статии

@@ -53,18 +53,18 @@ export function ArchiveComponent() { )} -
-
- - {new Date(article.createdAt).toLocaleDateString('mk-MK', { - day: 'numeric', - month: 'short', - year: 'numeric', - })} - - - {article.views} views -
+
+
+ + {new Date(article.createdAt).toLocaleDateString('mk-MK', { + day: 'numeric', + month: 'long', + year: 'numeric', + })} + + + {article.views || 0} прегледи +
- Back to articles + Назад кон вести

{data.title}

@@ -63,11 +63,11 @@ export function ArticleDetailComponent({ id }: { id: string }) { })} - {data.views} views + {data.views || 0} прегледи {data.author && ( <> - By {data.author.name} + Од {data.author.name} )}
diff --git a/frontend/src/components/routes/LiveBlogsComponent.tsx b/frontend/src/components/routes/LiveBlogsComponent.tsx index c32dc17..8c6c137 100644 --- a/frontend/src/components/routes/LiveBlogsComponent.tsx +++ b/frontend/src/components/routes/LiveBlogsComponent.tsx @@ -63,13 +63,13 @@ export function LiveBlogsComponent() {
- {liveBlog.viewCount} views - {liveBlog.updates?.length || 0} updates + {liveBlog.viewCount || 0} прегледи + {liveBlog.updates?.length || 0} ажурирања
{new Date(liveBlog.createdAt).toLocaleDateString('mk-MK', { day: 'numeric', - month: 'short', + month: 'long', year: 'numeric', })}