Conversation
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Localize meta keywords in non-English news articles
🌐 Localize meta keywords in all non-English news articles
Mar 5, 2026
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Copilot
AI
changed the title
🌐 Localize meta keywords in all non-English news articles
feat: expand SEO keyword localization to cover 50+ topic-specific terms across all 13 non-English languages
Mar 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The keyword localization batch script only covered ~31 basic template keywords, leaving ~50 topic-specific terms (artificial intelligence, weapons law, coalition government, social welfare, weekend analysis, etc.) in English across all non-English article pages — both in
<meta name="keywords">and JSON-LD"keywords"arrays.Translation map expansion
SEO_KEYWORD_TRANSLATIONSin bothscripts/fix-keywords-localization.tsandscripts/data-transformers/metadata.ts(synced for future article generation)reform,interpellation,surveillancein French) intentionally map to the same surface form — not bugsJSON-LD array format support
The
replaceKeywords()function only matched the string format"keywords": "...". Added support for the array format used by newer articles:Proper nouns (Ukraine Aid, Riksdag, NATO, Finance Committee) are correctly preserved in English via the existing fallback.
Bug fix
Hebrew translation for
legislative sessioncontained mixed Hebrew/CJK characters (מושב立法); corrected toמושב חקיקה. The one affected published article was patched directly.Article updates
~458 articles updated across all 13 non-English languages.
Original prompt
This section details on the original issue you should resolve
<issue_title>🌐 Localize meta keywords in all non-English news articles</issue_title>
<issue_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)
Impact
🚀 Desired State
Each article's keywords match its language:
🔧 Implementation Approach
Step 1: Create Keyword Translation Map
Add a keyword translation map to the article generation system (or as a standalone dictionary):
Step 2: Create Batch Fix Script
Create a script that:
news/*-{lang}.htmlfiles where lang ≠ 'en'<meta name="keywords" content="...">"keywords"in JSON-LD structured data if presentStep 3: Update Article Template
Update
scripts/article-template/template.tsto use localized keywords during generation, preventing this issue for future articles.Step 4: Validate
🤖 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
"keywords"array also localized where present📚 References
scripts/article-template/template.ts(keyword generation)scripts/data-transformers/constants/content-labels-part1.tsscripts/translation-dictionary.tsscripts/validate-translations.ts<meta name="keywords" content="...">🏷️ Labels
type:bug,component:i18n,component:seo,component:metadata,translation,priority-medium,component:news</issue_description><agent_instructions>Localize meta keywords in all ~1000 non-English news articles. Create a keyword translation map for all 14 languages. Build a batch fix script that scans news/*-{lang}.html files, extracts meta keywords, translates them, and rewrites the meta tag. Also update JSON-LD keywords if present. Update scripts/article-template/template.ts to generate localized keywords for future articles. Verify with HTML validation.</agent_instructions>
Comments o...
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.