Feat/i18n chatbot backlog - #1659
Merged
Merged
Conversation
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>
- 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>
The columns table sourced descriptions from the REST endpoint
/tables/{id}/columns/, which only exposes the Portuguese `description`
and `observations`. The frontend already reads `description${Locale}`
with a fallback to `description`, but those localized keys were never
present, so English and Spanish pages always showed Portuguese.
Enrich the REST payload with `descriptionPt/En/Es` and
`observationsPt/En/Es` fetched from GraphQL (allColumn), merged by
column id/name. ~92% of columns have English/Spanish descriptions in
the backend, which now surface on data-basis.org and
basedelosdatos.org; columns lacking a translation fall back to
Portuguese. GraphQL failures degrade gracefully to the REST payload.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The English signup consent line read "...of Base dos Dados." Replace with the established English brand name "Data Basis", consistent with the rest of the en locale (menu, footer, dataset labels). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Include the active i18n locale (pt/en/es, derived from the domain) in the POST /chatbot/threads body so the chatbot backend persists the thread's language and answers in it. The Next proxy already forwards the request body, so no proxy change is needed. Pairs with basedosdados/chatbot#58 (Thread.language). Backward-compatible: the current chatbot backend ignores the extra field until that ships.
…ting domain The chat interface (pages/chatbot.js + components/organisms/chatbot/*) was hardcoded Portuguese with no i18n wiring, so it stayed pt on data-basis.org and basedelosdatos.org. Add getStaticProps + a chatbot 'ui' namespace (pt/en/es) and route every user-facing string through t(). Also pass window.location.origin as redirect_origin to the Google login endpoint so OAuth returns to the same domain (backend change is separate).
The chatbot sidebar and mobile header hardcoded the Base dos Dados (BD) wordmark, so data-basis.org showed 'BD'. Add a locale-aware BrandLogo (DB for en, BD otherwise), mirroring the main nav (Menu.js), and use it in the sidebar (expanded + collapsed) and the mobile header.
Both chatbot pages now show "Chatbot - <brand>" localized per domain, instead of
the hardcoded "Chatbot - Basedosdados" (app page) and "Chatbot LP - <brand>"
(landing page):
en → Chatbot - Data Basis
pt → Chatbot - Base dos Dados
es → Chatbot - Base de los Datos
- chatbot.json (en/pt/es): head.pageTitle / head.metaTitle change from
"Chatbot LP - <brand>" to "Chatbot - <brand>".
- chatbot.js: render t("head.pageTitle") in the Head (title + og:title +
og:description) instead of the literal "Chatbot - Basedosdados".
- chatbot-lp.js already reads head.pageTitle / head.metaTitle, so its title and
og:title pick up the change with no code edit.
A career now counts as active only when it has no end date. On the team page this means: - role display lists only active roles (ended roles are hidden); - people with no active role are dropped from the list; - sorting ranks people by their active roles only; - the team filter lists only people with an active career in the selected team. Fixes outdated roles showing on /about-us (e.g. an ended "Líder de Plataforma" no longer appears).
…ization for chatbot
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.
Summary
languageao criar o thread do chatbot eredirect_originno login Google, alinhado ao backend já em prod.