Skip to content

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

Open
rdahis wants to merge 10 commits into
stagingfrom
claude/data-basis-localization-bca941
Open

feat: align en/es sites and recover spatial coverage#1594
rdahis wants to merge 10 commits into
stagingfrom
claude/data-basis-localization-bca941

Conversation

@rdahis

@rdahis rdahis commented Jul 9, 2026

Copy link
Copy Markdown
Member

Summary

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 — the dataset-page ServiceHighlightABTest now renders only on basedosdados.org, gated on NEXT_PUBLIC_DOMAIN via new getDomain()/isBasedosdadosDomain() helpers (build-time domain, so it's correct under Docker where the browser hostname is localhost).
  • Generated query alias — the backend hardcodes the table alias as dados; localizeQueryTableAlias() rewrites it per locale (pt→dados, en→data, es→datos) across 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, placed above Organization, backed by the /search spatial_coverages aggregation; hidden on pt.
  • Homepage — drops Brazil-specific phrasing in en/es ("largest public data platform in Brazil" → "a large public data platform"; "socioeconomic data from Brazil"; the IBGE/Brazilian-municipalities example generalized). Testimonials left intact.

Depends on the backend PR (basedosdados/backend#TBD) for the spatial_coverages search aggregation that populates the filter box.

Test plan

  • Verified locally (npm dev) against the production backend and a local Docker backend:
    • banner hidden on data-basis.org, shown on basedosdados.org;
    • generated query alias = data (en) / datos (es) / dados (pt);
    • dataset page + cards show spatial coverage on en/es, hidden on pt;
    • search filter box populates (International, Brazil, US, …), reorders above Organization, and is hidden on pt;
    • homepage copy free of Brazil mentions in en/es.
  • 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 commented Jul 9, 2026

Copy link
Copy Markdown
Member Author

Backend dependency (spatial_coverages aggregation + world-filter fix): basedosdados/backend#1038

@rdahis

rdahis commented Jul 9, 2026

Copy link
Copy Markdown
Member Author

@AldemirLucas não entendi se é para apontar para staging, para main, ou para as duas. Parece que vocês não estão mais seguindo o fluxo development -> staging -> main né.

O backend de staging já tá certo. Estou esperando subir para main também em basedosdados/backend#1039.

@rdahis

rdahis commented Jul 9, 2026

Copy link
Copy Markdown
Member Author

Also opened against main: see the main-targeted PR for the same changeset.

rdahis and others added 9 commits July 10, 2026 10:58
- chatbot-lp: remove Brazil mentions from the en/es hero + "why" titles.
- DB Pro: fix the Solutions > Exclusive data menu link (/en/bdpro, /es/bdpro
  -> /bdpro), consistent with the other locale-relative links.
- docs: gate the pt-only "Guia Central de Identidade Verbal" sidebar category
  to locale === 'pt', so en/es no longer show an empty Portuguese header.
- FAQ: add en/es content for the chatbot and DB Pro FAQs (40 markdown files
  under content/{chatbot,bdPro}/FAQ/{en,es}). Previously pt-only, so the
  sections rendered empty on en/es. Brazil-specific dataset examples are
  generalized to themes and internal links are relative so they stay on the
  visitor's domain.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The English site abbreviates Data Basis as "DB" (menu already uses DB
Free/Pro/Orgs), so every "BD Pro" in en was inconsistent — including the
dataset-page "Enable notifications" upgrade tooltip. Replace "BD Pro" ->
"DB Pro" across the en locale files and the en FAQ content (20 occurrences).
pt and es keep "BD Pro" (Base dos Dados / Base de los Datos).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Follow-up to the "DB Pro" rename: sweep the remaining standalone "BD" ->
"DB" in en content so the org abbreviation is consistent (menu already used
DB). Covers en locale strings (faq, chatbot, transparency, user, blog,
dataset) and en markdown (docs, FAQ, case studies, services), 36
occurrences. Word-boundary match leaves cookie names (userBD, tourBD),
lowercase URLs (bd-pro), and es/pt untouched.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Each interface language has its own Discord server. Add getDiscordUrl(locale)
(pt -> huKWpsVYx4, en -> tx57ek6zqQ, es -> nNfQYcmrvM) and use it in the
shared Footer, Menu, contact and about-us components, and swap the invite
code in the en/es docs and FAQ markdown. pt links are unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add English and Spanish versions of all 39 main FAQ articles (content/FAQ/{en,es}),
preserving frontmatter — question and keywords translated, categories/id/order kept
verbatim as canonical filter keys. English "DB" / Spanish "BD" brand short-forms.

Also localize the /faq category chips: they previously rendered hardcoded
Portuguese labels (incl. "BD Lab"/"BD Edu") in every locale. Wire them to the
faq.json `categories` translations and normalize the en/es label sets.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add English and Spanish versions of all 10 dataset usage guides
(content/userGuide/{en,es}), keyed by the same dataset.usageGuide slug so the
dataset-page "User guide" tab now resolves per locale instead of falling back
to null. Frontmatter title/description translated; date/thumbnail/categories/
authors preserved. SQL blocks, BigQuery table paths, and column identifiers
kept verbatim; brand short-forms en "DB" / es "BD".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- MDXRemote link component now locale-prefixes root-relative internal links
  (e.g. the usage-guide FAQ banner /faq -> /en/faq, /es/faq) instead of always
  resolving to the default (pt) locale. External/anchor/already-prefixed links
  are untouched. Also benefits blog, which shares mdxComponents.
- Move the dataset-header "Spatial coverage" block left (temporal colSpan 2->1,
  spatial 3->4) so it sits closer to "Temporal coverage".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Rewrite 27 usage-guide links from the retired queries-basedosdados and
queries-basedosdados-dev repos to the current basedosdados/pipelines repo
(paths preserved), across pt/en/es.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ed development branch

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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