Skip to content

Add continent-based filtering for language cards#181

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-filtering-languages-by-continents
Draft

Add continent-based filtering for language cards#181
Copilot wants to merge 2 commits intomainfrom
copilot/add-filtering-languages-by-continents

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 27, 2026

  • Add pycountry-convert to requirements.txt
  • Create continents.py with get_language_continents() using babel + pycountry-convert
  • Add continents: list[str] field to LanguageProjectData in generate.py
  • Update generate.py to compute continents per language and pass all_continents to template
  • Update templates/index.html.jinja with continent filter buttons and data-continents attributes
  • Add tests/test_continents.py; update tests/test_index.py
  • Fix get_language_continents: when language code has a region subtag (e.g. pt-br), resolve continent from that specific country (BR → South America only)
  • Replace style.display JS with Bootstrap d-none class toggling

📊 Dashboard preview 📊: https://python-docs-translations.github.io/dashboard/181/merge/

Copilot AI requested a review from m-aciek April 27, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants