@@ -78,20 +82,20 @@ const breadcrumb_schema = {
)}
{paginated.items.map(article => (
-
+
))}
{paginated.items.length === 0 && (
-
No articles found in this category yet.
+
{ui.no_articles_category}
)}
@@ -101,7 +105,7 @@ const breadcrumb_schema = {
)}
@@ -122,7 +126,7 @@ const breadcrumb_schema = {
)}
diff --git a/frontend/src/pages/index.astro b/frontend/src/pages/index.astro
index 0ca1581..204f421 100644
--- a/frontend/src/pages/index.astro
+++ b/frontend/src/pages/index.astro
@@ -51,7 +51,7 @@ const website_schema = {
schema={website_schema}
>
-
+
{config.ads_enabled && (
@@ -62,14 +62,15 @@ const website_schema = {
{config.categories.filter(cat => homepage.by_category[cat.slug]?.length).map(cat => (
))}
diff --git a/frontend/src/themes/institutional/ArticleCard.astro b/frontend/src/themes/institutional/ArticleCard.astro
index f92580f..4626405 100644
--- a/frontend/src/themes/institutional/ArticleCard.astro
+++ b/frontend/src/themes/institutional/ArticleCard.astro
@@ -1,14 +1,17 @@
---
import type { ArticleListItem } from '../../types/index.js';
import { relativeTime, truncate } from '../../lib/format.js';
+import { getUiStrings } from '../../lib/ui-i18n.js';
interface Props {
article: ArticleListItem;
size?: 'sm' | 'md' | 'lg';
show_excerpt?: boolean;
+ locale?: string;
}
-const { article, size = 'md', show_excerpt = true } = Astro.props;
+const { article, size = 'md', show_excerpt = true, locale = 'en-US' } = Astro.props;
+const ui = getUiStrings(locale);
const is_large = size === 'lg';
const is_small = size === 'sm';
---
@@ -28,7 +31,7 @@ const is_small = size === 'sm';
)}
{article.is_featured && (
-
Featured
+
{ui.featured}
)}
@@ -44,7 +47,7 @@ const is_small = size === 'sm';
{show_excerpt && !is_small && (
diff --git a/frontend/src/themes/institutional/CategorySection.astro b/frontend/src/themes/institutional/CategorySection.astro
index 1fa5f7e..c290514 100644
--- a/frontend/src/themes/institutional/CategorySection.astro
+++ b/frontend/src/themes/institutional/CategorySection.astro
@@ -1,14 +1,17 @@
---
import type { ArticleListItem, CategoryConfig } from '../../types/index.js';
import { formatDateShort } from '../../lib/format.js';
+import { getUiStrings } from '../../lib/ui-i18n.js';
import ArticleCard from './ArticleCard.astro';
interface Props {
category: CategoryConfig;
articles: ArticleListItem[];
+ locale?: string;
}
-const { category, articles } = Astro.props;
+const { category, articles, locale = 'en-US' } = Astro.props;
+const ui = getUiStrings(locale);
---
{articles.length > 0 && (
@@ -16,13 +19,13 @@ const { category, articles } = Astro.props;
{articles.slice(1, 5).map(article => (
@@ -50,7 +53,7 @@ const { category, articles } = Astro.props;
{article.title}
diff --git a/frontend/src/themes/institutional/HeroSection.astro b/frontend/src/themes/institutional/HeroSection.astro
index c20f3f4..11cb953 100644
--- a/frontend/src/themes/institutional/HeroSection.astro
+++ b/frontend/src/themes/institutional/HeroSection.astro
@@ -1,11 +1,14 @@
---
import type { ArticleListItem } from '../../types/index.js';
import { relativeTime } from '../../lib/format.js';
+import { getUiStrings } from '../../lib/ui-i18n.js';
interface Props {
articles: ArticleListItem[];
+ locale?: string;
}
-const { articles } = Astro.props;
+const { articles, locale = 'en-US' } = Astro.props;
+const ui = getUiStrings(locale);
const [main, ...rest] = articles;
const secondary = rest.slice(0, 4);
---
@@ -43,9 +46,9 @@ const secondary = rest.slice(0, 4);
{main.author.name}
·
-
+
·
- {main.reading_time} min read
+ {main.reading_time} {ui.min_read}
@@ -77,7 +80,7 @@ const secondary = rest.slice(0, 4);
{article.title}
diff --git a/frontend/src/themes/sports/ArticleCard.astro b/frontend/src/themes/sports/ArticleCard.astro
index 5425d2c..1c62c1f 100644
--- a/frontend/src/themes/sports/ArticleCard.astro
+++ b/frontend/src/themes/sports/ArticleCard.astro
@@ -6,9 +6,10 @@ interface Props {
article: ArticleListItem;
size?: 'sm' | 'md' | 'lg';
show_excerpt?: boolean;
+ locale?: string;
}
-const { article, size = 'md', show_excerpt = true } = Astro.props;
+const { article, size = 'md', show_excerpt = true, locale = 'en-US' } = Astro.props;
const is_large = size === 'lg';
const is_small = size === 'sm';
---
@@ -56,7 +57,7 @@ const is_small = size === 'sm';