-
Notifications
You must be signed in to change notification settings - Fork 1
Description
📋 Issue Type
Bug Fix / Enhancement - SEO and Multi-Language Metadata
🎯 Objective
Translate the <meta name="keywords"> content in all non-English news articles from English to the target language, improving SEO discoverability for international audiences.
📊 Current State
All non-English news articles (~1,000+ files) have English-only keywords in their metadata:
Example (all languages show the same English keywords)
<!-- Danish article (news/2026-02-14-government-propositions-da.html) -->
<meta name="keywords" content="government, propositions, parliament, legislation, Swedish Parliament, Riksdag, politics, Sweden">
<!-- Japanese article (news/2026-02-14-government-propositions-ja.html) -->
<meta name="keywords" content="government, propositions, parliament, legislation, Swedish Parliament, Riksdag, politics, Sweden">
<!-- Korean article (news/2026-02-14-government-propositions-ko.html) -->
<meta name="keywords" content="government, propositions, parliament, legislation, Swedish Parliament, Riksdag, politics, Sweden">Impact
- SEO: Non-English search engines cannot match articles to queries in the user's language
- Discoverability: Japanese/Korean/Chinese/Arabic users searching in their language won't find these articles
- Professionalism: English metadata on non-English pages signals incomplete localization
🚀 Desired State
Each article's keywords match its language:
<!-- Danish -->
<meta name="keywords" content="regering, lovforslag, parlament, lovgivning, Sveriges Riksdag, politik, Sverige">
<!-- Japanese -->
<meta name="keywords" content="政府, 法案, 議会, 立法, スウェーデン国会, 政治, スウェーデン">
<!-- Korean -->
<meta name="keywords" content="정부, 법안, 의회, 입법, 스웨덴 의회, 정치, 스웨덴">
<!-- Arabic -->
<meta name="keywords" content="حكومة, مقترحات, برلمان, تشريع, البرلمان السويدي, سياسة, السويد">🔧 Implementation Approach
Step 1: Create Keyword Translation Map
Add a keyword translation map to the article generation system (or as a standalone dictionary):
const KEYWORD_TRANSLATIONS: Record<Language, Record<string, string>> = {
da: { 'government': 'regering', 'propositions': 'lovforslag', 'parliament': 'parlament', 'legislation': 'lovgivning', 'Swedish Parliament': 'Sveriges Riksdag', 'Riksdag': 'Riksdag', 'politics': 'politik', 'Sweden': 'Sverige', 'committee': 'udvalg', 'reports': 'betænkninger', 'opposition': 'opposition', 'motions': 'forslag' },
// ... for all 12 non-EN languages
};Step 2: Create Batch Fix Script
Create a script that:
- Scans all
news/*-{lang}.htmlfiles where lang ≠ 'en' - Extracts
<meta name="keywords" content="..."> - Translates each keyword to the target language
- Rewrites the meta tag
- Also updates
"keywords"in JSON-LD structured data if present
Step 3: Update Article Template
Update scripts/article-template/template.ts to use localized keywords during generation, preventing this issue for future articles.
Step 4: Validate
- Verify all meta keywords are in the target language
- Ensure JSON-LD keywords match
- HTML validation passes
🤖 Recommended Agent
agent:news-journalist — Expert in article metadata and SEO optimization. Can create the keyword translation map and batch-process existing articles. The content-generator agent could also assist with the batch processing.
✅ Acceptance Criteria
- Keyword translation map created for all 14 languages
- All existing non-EN news articles have localized keywords
- JSON-LD
"keywords"array also localized where present - Article template updated to generate localized keywords for future articles
- HTML validation passes for all modified files
- SEO structured data validates (Schema.org)
- RTL keyword ordering correct for ar/he
📚 References
- Article template:
scripts/article-template/template.ts(keyword generation) - Content labels for reference:
scripts/data-transformers/constants/content-labels-part1.ts - Translation dictionary:
scripts/translation-dictionary.ts - SEO validation:
scripts/validate-translations.ts - Existing keyword patterns in articles:
<meta name="keywords" content="...">
🏷️ Labels
type:bug, component:i18n, component:seo, component:metadata, translation, priority-medium, component:news