Skip to content

Rename pt locale to pt-br for Brazilian Portuguese - #10

Merged
theletterf merged 1 commit into
theletterf:mainfrom
peixe-homedev:draft/rename-pt-to-pt-br
Sep 7, 2026
Merged

theletterf merged 1 commit into
theletterf:mainfrom
peixe-homedev:draft/rename-pt-to-pt-br

Conversation

@peixe-homedev

Copy link
Copy Markdown
Contributor

Summary

  • Renames the pt locale to pt-br across config, content, data, and i18n files so the locale key matches the languageCode = "pt-BR" already set in languages.toml.
  • No content changes — only file and directory renames.

Note

This is a housekeeping rename. The existing pt locale already declares languageCode = "pt-BR", but the key and file suffixes still say pt. Aligning them avoids ambiguity now that a separate pt-pt locale is being proposed (see companion PR).

Test plan

  • hugo --gc builds without errors
  • All /pt-br/ pages render correctly
  • Internal links resolve (lychee passes)

🤖 Generated with Claude Code

Renames the Hugo language key from `pt` to `pt-br` so the locale code
matches the content variant. Files, data directory, and i18n strings
follow the same rename. languageName becomes "Português (BR)" and the
URL path moves from /pt/ to /pt-br/.

This is a preparatory step toward supporting both Brazilian and European
Portuguese as separate locales.

Note: this changes the published URL from /pt/ to /pt-br/. Existing
links, bookmarks, and search engine indexes pointing to /pt/ will break
unless a redirect is added (e.g. in worker.js or via a Cloudflare
redirect rule). The author should consider whether a 301 redirect from
/pt/* to /pt-br/* is warranted before merging.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@theletterf

Copy link
Copy Markdown
Owner

Obrigado!

@theletterf
theletterf merged commit 0f9be25 into theletterf:main Sep 7, 2026
4 checks passed
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