Skip to content

Feat/blog translations - #1716

Merged
AldemirLucas merged 14 commits into
stagingfrom
feat/blog-translations
Oct 5, 2026
Merged

AldemirLucas merged 14 commits into
stagingfrom
feat/blog-translations

Conversation

@AldemirLucas

Copy link
Copy Markdown
Contributor

No description provided.

rdahis and others added 14 commits September 9, 2026 10:50
The Pro product is "BD Pro" under Base dos Dados and "DB Pro" under Data
Basis, but the English page still carried the Portuguese slug and wordmark.

- Serve the page at /dbpro in English. A rewrite maps /dbpro onto the
  existing pages/bdpro.js, and /bdpro redirects to /dbpro on data-basis.org
  and at /en/bdpro. Portuguese and Spanish keep /bdpro.
- Point the menu, footer, dataset banner, table page, temporal coverage bar
  and query download at /dbpro when the locale is en, so English visitors
  do not take a redirect hop.
- Fix db_logo_pro.js, which was a copy of the BD wordmark and still spelled
  "BD Pro". The B and D glyphs now swap tiles, matching db_logo.js. The hero
  picks the wordmark by locale.
- Reword the English hero and banner copy: plainer phrasing, and drop the
  "in Brazil" scope now that the datalake is international.
Groundwork for translating the blog. Posts keep one filename across locales,
which is what ties a post's translations together, and each translation
declares its own public slug in frontmatter.

- getAllPosts returns both `slug` (the URL segment, from frontmatter when
  present) and `filename` (shared across locales).
- getPostBySlug resolves by filename first, then by the frontmatter slug, so
  both forms work.
- The post page redirects the filename form to the locale's own slug, so the
  language switcher — which carries the current slug across locales — still
  lands on the right page rather than the blog index.
- getStaticPaths now pre-renders every locale rather than only the
  Portuguese filenames.
- The "edit this page" link points at the real file, not the localized slug.

First post translated: the QGIS course, at /en/blog/free-qgis-course and
/es/blog/curso-gratuito-de-qgis. Its DB Pro callouts use the English brand
and the /dbpro URL.
Posts translated to en and es:
- analisando-preco-de-imoveis-em-sao-paulo
- analisando-instituicoes-financeiras-de-operacoes-de-credito
- atualizar-como-funciona-o-sistema-de-insercao-de-dados-na-bd

The blog table-of-contents heading was hardcoded as "Tabela de conteúdo" in
Slug.js, so it rendered in Portuguese on every post in every language. It now
reads from a new blog.tableOfContents key, added for all three locales.

Brazilian institution names (IPEA, GeoSampa, ESTBAN, Caixa) and real values in
reais are kept as-is. DB Pro callouts in the English posts use the English
brand and the /dbpro URL.
- analisando-atividade-economica-do-rio-de-janeiro — this one already had an
  en and an es file, but both were the Portuguese text with a translated
  frontmatter. Rewritten properly in both languages.
- entrevista-bdletter-35-karina-lima
- bdletter-38-retrospectiva2024
- analisando-o-brasil-nas-olimpiadas-2016

SQL and R code blocks are copied verbatim from the source, since they query
real tables and columns. Brazilian institution names (IBGE, RAIS, CNAE, INMET,
SEBRAE) and values in reais are kept. Structural parity with the Portuguese
original was checked per post: same number of code blocks and images.
- relembrando-o-datathon-bd-2021
- nota-risco-de-retrocessos-na-lei-de-acesso-a-informacao
- como-usar-os-diretorios-brasileiros
- como-fazer-uma-analise-geoespacial-com-qgis
- atualizar-intro-ao-pacote-basedosdados-em-python

SQL and Python blocks are copied verbatim, including BigQuery table paths and
column names such as id_municipio and sigla_uf, which are referenced in the
surrounding prose and must match the real schema. Dataset and institution
names (IBGE, Ideb, Finbra, Comex Stat, SISCOMEX, geobr, LAI) are kept.

QGIS interface labels are translated to the terms each locale's QGIS build
uses — "Add Delimited Text Layer" / "Añadir capa de texto delimitado".

13 of 54 posts now translated.
- patchnotes_dez
- ferramenta-traz-mais-acessibilidade-aos-dados-de-impulsionamento-eleitoral-nas-redes
- nota-sobre-divulgacao-dos-dados-do-inep
- como-acessar-dados-da-bd-no-power-bi
- patchnotes_janeiro

The two patch notes posts share an `order: 0` field that pins them to the top
of the blog index; that is preserved so the translated indexes order the same
way as the Portuguese one.

Power BI and BigQuery interface labels are translated to the terms each
locale's build shows. Dataset ids, table names and SQL are verbatim.

18 of 54 posts now translated.
- bdletter-36-online-vs-offline
- bdletter-40-qual-e-a-relacao-entre-a-dengue-e-as-mudancas-climaticas
- analisando-relacao-entre-idhm-e-eleicoes

R code blocks are verbatim, including the BigQuery billing project id and the
ggplot labels, which appear inside the rendered chart images shared across
locales. Academic citations (Heiler, Viana and Santos, 2016) and Brazilian
institution names are kept.

21 of 54 posts translated.
…ove-username

feat(user): celular opcional e conta em /user sem username
feat(bdpro): brand the Pro page as DB Pro on the English site
@AldemirLucas
AldemirLucas merged commit 1c8afd4 into staging Oct 5, 2026
2 of 3 checks passed
@mergify

mergify Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

⚠️ The sha of the head commit of this PR conflicts with #1682. Mergify cannot evaluate rules on this PR. Once #1682 is merged or closed, Mergify will resume processing this PR. ⚠️

This branch had an error being deployed

1 failed deployment
staging — eca2b1ef Deployed Oct 5, 2026 by mergify[bot] via Cypress E2E Tests #173
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