Complete core MVP features: filtering, comparison UI, validation, and i18n#2
Conversation
Co-authored-by: trotro <7386372+trotro@users.noreply.github.com>
Co-authored-by: trotro <7386372+trotro@users.noreply.github.com>
Co-authored-by: trotro <7386372+trotro@users.noreply.github.com>
Co-authored-by: trotro <7386372+trotro@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR aims to make the site MVP-ready by fixing provider filtering, adding comparison UI affordances, improving validation logic for bilingual provider pages, and introducing initial FR/EN UI strings.
Changes:
- Added FR/EN translation strings in
zola.tomland wired some UI labels in the providers section template. - Fixed filter parsing/extraction in
static/filter.jsand added “Add to Comparison” buttons on provider cards. - Updated provider validation to avoid false duplicate-slug detection across
index.md/index.en.md, plus UI/CSS/homepage content updates and CI/link-check adjustments.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
zola.toml |
Adds per-language UI translation strings for filters/search/comparison. |
templates/section.html |
Uses translations for filter/search UI and adds compare buttons on provider cards. |
templates/index.html |
Updates homepage layout to render section content. |
static/style.css |
Adds nav flex layout, compare button styles, and homepage styling. |
static/filter.js |
Fixes selectors/country extraction and filter-type mapping. |
docs/validate_providers.py |
Adjusts duplicate slug validation to allow bilingual files in same provider directory. |
content/_index.md |
Adds French homepage content and CTA. |
content/_index.en.md |
Adds English homepage content and CTA. |
LICENSE |
Replaces AGPL text with EUPL v1.2 text. |
.gitignore |
Ignores additional build artifacts (artifacts, tarballs, zola binary). |
.github/workflows/build.yml |
Disables link checking during the build action. |
Comments suppressed due to low confidence (1)
docs/validate_providers.py:67
- The new logic is wrapped in a bare
except:withpass, which will silently hide parsing/IO errors and can mask real validation failures. Preferexcept Exception as e:and at least log the file/error to stderr (or re-raise) so validation failures are actionable.
else:
slugs[slug] = provider_file
except:
pass
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…l link checking Co-authored-by: trotro <7386372+trotro@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@copilot apply changes based on the comments in this thread |
Co-authored-by: trotro <7386372+trotro@users.noreply.github.com>
Applied in commit 28c08e9. Fixed two key issues from the review:
Build verified: 26 pages generated successfully with proper translations on both language variants. |
There was a problem hiding this comment.
@copilot use zola's translations builtin system : https://www.getzola.org/documentation/templates/overview/#trans
| {% if section.lang == "fr" %} | ||
| {% set t_noscript = "Tous les fournisseurs sont visibles ci-dessous. Les fonctionnalités de filtrage et de recherche nécessitent l'activation de JavaScript." %} | ||
| {% set t_search_label = "Rechercher des fournisseurs" %} | ||
| {% set t_search_placeholder = "Rechercher par nom ou description..." %} | ||
| {% set t_show_filters = "Afficher les filtres" %} | ||
| {% set t_hide_filters = "Masquer les filtres" %} | ||
| {% set t_filters_heading = "Filtres" %} | ||
| {% set t_services_legend = "Services" %} | ||
| {% set t_certifications_legend = "Certifications" %} | ||
| {% set t_countries_legend = "Pays" %} | ||
| {% set t_reset_filters = "Réinitialiser tous les filtres" %} | ||
| {% set t_providers_available = "fournisseurs disponibles" %} | ||
| {% set t_result_template_all = "{count} fournisseurs disponibles" %} | ||
| {% set t_result_template_filtered = "{count} sur {total} fournisseurs correspondent à vos filtres" %} | ||
| {% set t_country_label = "Pays" %} | ||
| {% set t_services_label = "Services" %} | ||
| {% set t_certifications_label = "Certifications" %} | ||
| {% set t_add_to_comparison = "Ajouter à la comparaison" %} | ||
| {% set t_added_to_comparison = "✓ Ajouté à la comparaison" %} | ||
| {% set t_comparison_full = "Comparaison complète" %} | ||
| {% else %} | ||
| {% set t_noscript = "All providers are visible below. Filtering and search features require JavaScript to be enabled." %} | ||
| {% set t_search_label = "Search providers" %} | ||
| {% set t_search_placeholder = "Search by name or description..." %} | ||
| {% set t_show_filters = "Show Filters" %} | ||
| {% set t_hide_filters = "Hide Filters" %} | ||
| {% set t_filters_heading = "Filters" %} | ||
| {% set t_services_legend = "Services" %} | ||
| {% set t_certifications_legend = "Certifications" %} | ||
| {% set t_countries_legend = "Countries" %} | ||
| {% set t_reset_filters = "Reset All Filters" %} | ||
| {% set t_providers_available = "providers available" %} | ||
| {% set t_result_template_all = "{count} providers available" %} | ||
| {% set t_result_template_filtered = "{count} of {total} providers match your filters" %} | ||
| {% set t_country_label = "Country" %} | ||
| {% set t_services_label = "Services" %} | ||
| {% set t_certifications_label = "Certifications" %} | ||
| {% set t_add_to_comparison = "Add to Comparison" %} | ||
| {% set t_added_to_comparison = "✓ Added to Comparison" %} | ||
| {% set t_comparison_full = "Comparison Full" %} | ||
| {% endif %} | ||
|
|
There was a problem hiding this comment.
Use zola's builtin translation instead of duplicating content here.
Translations are managed into zola.toml file.
There was a problem hiding this comment.
Applied in commit ac6b384. Replaced the conditional translation blocks (lines 8-49) with Zola's built-in trans() function. The template now uses {{ trans(key="translation_key", lang=section.lang) }} throughout, with all translations managed centrally in zola.toml as recommended.
…al blocks Co-authored-by: trotro <7386372+trotro@users.noreply.github.com>
Applied in commit ac6b384. Refactored the template to use Zola's built-in Changes:
|
✅ Provider Data Validation passed |
✅ Provider Data Validation passed |
✅ Provider Data Validation passed |
✅ Provider Data Validation passed |
|
@copilot fix this error |
Co-authored-by: trotro <7386372+trotro@users.noreply.github.com>
✅ Provider Data Validation passed |
✅ Provider Data Validation passed |
✅ Provider Data Validation passed |
.provider-actionsto avoid override between cards and detail pageslang.translations.*with conditional translation variables based onsection.langtrans()function for cleaner code.btn-primary(3.15:1 → 5.46:1)Original prompt
🔒 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.