Skip to content

feat: align en/es sites and recover spatial coverage - #1595

Closed
rdahis wants to merge 1 commit into
mainfrom
claude/data-basis-localization-main
Closed

feat: align en/es sites and recover spatial coverage#1595
rdahis wants to merge 1 commit into
mainfrom
claude/data-basis-localization-main

Conversation

@rdahis

@rdahis rdahis commented Jul 9, 2026

Copy link
Copy Markdown
Member

Summary

Same changeset as #1594 (open against staging), targeted at main.

Makes the English (data-basis.org) and Spanish (basedelosdatos.org) sites consistent by removing Portuguese/Brazil-specific elements, and restores the previously-hidden spatial coverage feature.

  • Consulting banner — dataset-page ServiceHighlightABTest renders only on basedosdados.org, gated on NEXT_PUBLIC_DOMAIN (new getDomain()/isBasedosdadosDomain() helpers; build-time domain, correct under Docker).
  • Generated query aliaslocalizeQueryTableAlias() rewrites the backend's dados table alias per locale (pt→dados, en→data, es→datos) across SQL/Python/R; the basedosdados.<dataset>.<table> path is left untouched.
  • Spatial coverage (recovered, gated to non-pt) — dataset page (beside temporal), result cards, and the search left-column filter box placed above Organization; hidden on pt.
  • Homepage — Brazil-specific phrasing removed in en/es; testimonials left intact.

Depends on the backend spatial_coverages aggregation: basedosdados/backend#1039 (main) / #1038 (merged to staging).

Test plan

  • Verified locally (npm dev) against production and a local Docker backend: banner gating (hidden on data-basis.org, shown on basedosdados.org), localized query alias, spatial coverage on dataset/cards/search filter (en/es shown, pt hidden), reorder above Organization, homepage free of Brazil mentions.
  • next build passes (1292 pages, 0 errors).

🤖 Generated with Claude Code

Make the English (data-basis.org) and Spanish (basedelosdatos.org) sites
consistent by removing Portuguese/Brazil-specific elements, and restore the
previously-hidden spatial coverage feature.

- Consulting banner: gate the dataset-page ServiceHighlightABTest on
  NEXT_PUBLIC_DOMAIN so it renders only on basedosdados.org. Adds
  getDomain()/isBasedosdadosDomain() helpers (build-time domain, works under
  Docker where the hostname is localhost).
- Generated query alias: localize the backend's `dados` table alias per
  locale (pt->dados, en->data, es->datos) via localizeQueryTableAlias(),
  applied to the SQL/Python/R snippets. Word-boundary replace leaves the
  `basedosdados.<dataset>.<table>` project path untouched.
- Spatial coverage (recovered, gated to non-pt):
  * dataset page shows it side-by-side with temporal coverage
    (getDataset now requests spatialCoverageName{Locale}).
  * search result cards show it.
  * search left-column filter box (above Organization), backed by the
    /search spatial_coverages aggregation; hidden on pt.
- Homepage: drop Brazil-specific phrasing in en/es (largest platform in
  Brazil -> a large platform; socioeconomic data from Brazil; IBGE/Brazilian
  municipalities example generalized). Testimonials left intact.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@rdahis rdahis closed this Jul 9, 2026
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.

1 participant