Skip to content

docs: Brazilian Portuguese README translation with language switcher - #517

Merged
AbdulmalikAlayande merged 1 commit into
TegoLabs:mainfrom
OlaBakare:docs/readme-portuguese
Jul 30, 2026
Merged

AbdulmalikAlayande merged 1 commit into
TegoLabs:mainfrom
OlaBakare:docs/readme-portuguese

Conversation

@OlaBakare

Copy link
Copy Markdown
Contributor

The three issues are addressed, which are: cost projections lacking network fee trend adjustments, the README missing CI/npm/license status badges, and no Brazilian Portuguese translation or language switcher being available.

closes #476
closes #488
closes #498

- Add README.pt.md with full Brazilian Portuguese translation of all sections
- Add language switcher link in README.md pointing to Portuguese version
- Add 56 TDD tests verifying section coverage, command docs, code block preservation
- Translations keep code blocks, command names, and flags in English
- Note the Brazilian Portuguese convention at top of README.pt.md
@drips-wave

drips-wave Bot commented Jul 28, 2026

Copy link
Copy Markdown

@OlaBakare Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@coderabbitai

coderabbitai Bot commented Jul 28, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added trend-adjusted cost projections based on recent fee patterns, identifying rising, falling, or stable trends.
    • Cost estimates can now include flat and trend-adjusted 30-day projections.
  • Documentation

    • Added a complete Brazilian Portuguese translation of the README.
    • Added language navigation links and project badges for CI, npm, downloads, and licensing.
  • Tests

    • Added coverage for trend-based projections and documentation content, links, badges, and translation consistency.

Walkthrough

The PR adds Brazilian Portuguese README documentation and README badges, with validation tests. It also extends extension-cost forecasting with optional fee-trend projections and tests for trend classifications and edge cases.

Changes

Documentation updates

Layer / File(s) Summary
README language, badges, and Portuguese translation
README.md, README.pt.md, tests/docs/*
Adds README language links and CI, npm, and license badges; introduces a full Portuguese translation and tests for documentation coverage, links, parity, and badge formatting.

Cost forecasting

Layer / File(s) Summary
Trend-adjusted extension-cost projections
src/core/costs.ts, tests/core/costs.test.ts
Adds trend projection types and calculations based on recent base-fee samples, with coverage for rising, falling, stable, missing, singular, and odd-sized inputs.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

Suggested reviewers: abdulmalikAlayande

Poem

A rabbit reads badges in rows,
Portuguese pages now softly glow.
Fees rise and fall in a measured array,
Forecasts adjust what costs may say.
Tests hop along, precise and bright—
Documentation blooms overnight.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and matches a major part of the changeset: the Brazilian Portuguese README and language switcher.
Description check ✅ Passed The description is clearly related to the PR's docs and cost-projection work.
Linked Issues check ✅ Passed The changes implement the Portuguese README, add the requested badges, and add trend-adjusted cost projections with tests.
Out of Scope Changes check ✅ Passed All touched files map to the linked docs and cost-projection issues; no unrelated code changes stand out.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.pt.md`:
- Line 1: Correct the project name in the README title from “Soroleep” to
“Sorokeep,” preserving the existing Portuguese title wording.
- Around line 65-77: Restore the fenced block at README.pt.md lines 65-77 and
every other fenced block to exactly match the corresponding ordered blocks in
README.md, including shell comments and commands. Update
tests/docs/readme-portuguese.test.ts lines 390-414 to extract all fenced blocks
from both README files and assert identical ordered content.
- Line 67: Update the repository URL in the README clone command to use the
canonical OlaBakare/sorokeep repository, matching the CI, npm, and license badge
links.

In `@src/core/costs.ts`:
- Around line 298-305: Validate all recentBaseFees samples before computing
midpoint averages or trendMultiplier, rejecting any non-finite or negative
value. Return the established defined invalid-options error for invalid samples
and preserve normal projection behavior for valid inputs. Add coverage for NaN,
Infinity, and negative fee samples.
- Around line 189-197: Update the public costs-tool flow that calls
getExtensionCosts to retrieve ordered recent base-fee samples and include them
in the options alongside period. Ensure the existing options?.recentBaseFees
branch in the costs calculation receives those samples so trendProjection is
populated for user-facing requests.

In `@tests/docs/readme-portuguese.test.ts`:
- Around line 417-422: Update the heading-count assertion in the “has at least
as many headings as the English README” test to require exact parity between
ptHeadings and enHeadings, preventing removed English sections from being masked
by unrelated Portuguese headings.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c149f36a-9ff6-4a76-87b9-9e07bc4e89de

📥 Commits

Reviewing files that changed from the base of the PR and between 35d9237 and b611101.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (6)
  • README.md
  • README.pt.md
  • src/core/costs.ts
  • tests/core/costs.test.ts
  • tests/docs/readme-badges.test.ts
  • tests/docs/readme-portuguese.test.ts
📜 Review details
🧰 Additional context used
🪛 ast-grep (0.44.1)
tests/docs/readme-badges.test.ts

[warning] 15-15: Filesystem path is not a string literal; a request-/variable-derived path can enable path traversal. Validate and normalize the path before use.
Context: fs.readFileSync(README_PATH, "utf-8")
Note: [CWE-22] Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

(detect-non-literal-fs-filename-typescript)

tests/docs/readme-portuguese.test.ts

[warning] 12-12: Filesystem path is not a string literal; a request-/variable-derived path can enable path traversal. Validate and normalize the path before use.
Context: fs.readFileSync(README_PT_PATH, "utf-8")
Note: [CWE-22] Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

(detect-non-literal-fs-filename-typescript)


[warning] 16-16: Filesystem path is not a string literal; a request-/variable-derived path can enable path traversal. Validate and normalize the path before use.
Context: fs.readFileSync(README_EN_PATH, "utf-8")
Note: [CWE-22] Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

(detect-non-literal-fs-filename-typescript)

🪛 LanguageTool
README.pt.md

[uncategorized] ~36-~36: Substitua por “pára de”.
Context: ...de um contrato expirar, todo o contrato para de funcionar. Se as entradas de armazename...

(PARA_DE)


[style] ~44-~44: Para conferir mais clareza ao seu texto, prefira mover o advérbio.
Context: ...ocs.openzeppelin.com/stellar-contracts) deliberadamente deixa o gerenciamento de TTL de armazenamento d...

(COLOCAÇÃO_ADVÉRBIO)


[misspelling] ~58-~58: Quando escrita sem acento, esta palavra é um verbo. Se pretende referir-se a um substantivo ou adjetivo, deve utilizar a forma acentuada.
Context: ... do Sorokeep - Segurança Avançada — Integra com AWS Secrets Manager e HashiCorp Vau...

(DIACRITICS)


[locale-violation] ~58-~58: “Manager” é um estrangeirismo. É preferível dizer “gestor”, “gerente” ou “treinador”.
Context: ...ça Avançada** — Integra com AWS Secrets Manager e HashiCorp Vault para resolução segura...

(PT_BARBARISMS_REPLACE_MANAGER)


[locale-violation] ~59-~59: “templates” é um estrangeirismo. É preferível dizer “modelos”.
Context: ...Production-Ready** — Inclui Dockerfile, templates de serviço systemd e GitHub Actions par...

(PT_BARBARISMS_REPLACE_TEMPLATES)


[uncategorized] ~173-~173: Se é uma abreviatura, falta um ponto. Se for uma expressão, coloque entre aspas.
Context: ... Intervalo de polling em milissegundos (mín: 10.000) | 300000 (5 min) | | `-r, --...

(ABREVIATIONS_PUNCTUATION)


[locale-violation] ~247-~247: “target” é um estrangeirismo. É preferível dizer “objetivo” ou “alvo”.
Context: ...drão | |-------|-----------|--------| | --target-ttl <ledgers> | TTL para o qual estend...

(PT_BARBARISMS_REPLACE_TARGET)


[misspelling] ~251-~251: Esta é uma palavra só.
Context: ...biente contendo a chave secreta | — | | --auto-extend | Habilitar extensão automática do dae...

(AUTO)


[misspelling] ~274-~274: Esta é uma palavra só.
Context: ... armazenadas no banco de dados. Ao usar --auto-extend, apenas a chave pública e o nome da va...

(AUTO)


[uncategorized] ~329-~329: Encontrada possível ausência de vírgula.
Context: ...es` Visualize logs de uso de recursos (instruções CPU, bytes de memória, estruturas de ta...

(AI_PT_HYDRA_LEO_MISSING_COMMA)


[grammar] ~341-~341: Possível erro de concordância de número.
Context: ...extensão e restauração simultaneamente, evitando gargalos de número de sequência. --- ### `soro...

(GENERAL_NUMBER_AGREEMENT_ERRORS)


[style] ~369-~369: Para conferir mais clareza ao seu texto, busque usar uma linguagem mais concisa.
Context: ... ## Alertas O Sorokeep entrega alertas através de múltiplos canais: webhooks, **Slack...

(ATRAVES_DE_POR_VIA)


[uncategorized] ~384-~384: Esta conjunção deve ser separada por vírgulas e só deve ser utilizada no início duma frase para efeitos de estilo.
Context: ... | warning | TTL restante abaixo do limite mas acima de 25% | Entrada precisa de atenç...

(VERB_COMMA_CONJUNCTION)


[uncategorized] ~434-~434: Pontuação duplicada
Context: ...ou você pode fornecer o seu próprio com --secret). Ele é exibido uma vez no momen...

(DOUBLE_PUNCTUATION_XML)


[typographical] ~442-~442: Símbolo sem par: “]” aparentemente está ausente
Context: ...um app Slack com escopo chat:write em [api.slack.com/apps](https://api.slack.co...

(UNPAIRED_BRACKETS)


[locale-violation] ~637-~637: “budget” é um estrangeirismo. É preferível dizer “orçamento” ou “verba”.
Context: ... body.ok - Comandos CLI — Alerts, budget, guard, costs, watch, status, daemon, c...

(PT_BARBARISMS_REPLACE_BUDGET)


[uncategorized] ~658-~658: Pontuação duplicada
Context: ...ocê configura a extensão automática com --keypair-env, o Sorokeep armazena apenas...

(DOUBLE_PUNCTUATION_XML)


[uncategorized] ~658-~658: Pontuação duplicada
Context: ...ente em tempo de execução. Se você usar --keypair para uma operação única, a chav...

(DOUBLE_PUNCTUATION_XML)


[inconsistency] ~666-~666: O URL contém o caratére inválido segundo RFC 1738. Os caratéres especiais podem ser codificados com % seguido de dois números hexadecimais. Context: ...# Quais redes são suportadas? Testnet (https://soroban-testnet.stellar.org`) e Mainnet (`https://mainnet.sorobanrpc....

(URL_VALIDATION)


[inconsistency] ~666-~666: O URL contém o caratére inválido segundo RFC 1738. Os caratéres especiais podem ser codificados com % seguido de dois números hexadecimais. Context: ...oroban-testnet.stellar.org) e Mainnet (https://mainnet.sorobanrpc.com). Você também pode apontar o Sorokeep par...

(URL_VALIDATION)


[uncategorized] ~666-~666: Pontuação duplicada
Context: ...a qualquer endpoint RPC customizado com --rpc-url. ### E os alertas por e-mail? ...

(DOUBLE_PUNCTUATION_XML)


[uncategorized] ~670-~670: Pontuação duplicada
Context: ...a não foi implementado. O CLI rejeitará --type email com uma mensagem de erro cla...

(DOUBLE_PUNCTUATION_XML)


[typographical] ~692-~692: Símbolo sem par: “]” aparentemente está ausente
Context: ...tor Abdulmalik Alayande - GitHub: [@AbdulmalikAlayande](https://github.com/...

(UNPAIRED_BRACKETS)

🪛 markdownlint-cli2 (0.23.0)
README.pt.md

[warning] 128-128: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


[warning] 417-417: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


[warning] 466-466: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


[warning] 549-549: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🪛 OpenGrep (1.25.0)
tests/docs/readme-badges.test.ts

[ERROR] 102-102: Dynamic command passed to child_process.exec/execSync. Use child_process.execFile or spawn with an argument array instead.

(coderabbit.command-injection.exec-js)


[ERROR] 113-113: Dynamic command passed to child_process.exec/execSync. Use child_process.execFile or spawn with an argument array instead.

(coderabbit.command-injection.exec-js)

🔇 Additional comments (2)
README.md (1)

3-7: LGTM!

Also applies to: 25-31

tests/docs/readme-badges.test.ts (1)

1-120: LGTM!

Comment thread README.pt.md
Comment thread README.pt.md
Comment thread README.pt.md
Comment thread src/core/costs.ts
Comment thread src/core/costs.ts
Comment thread tests/docs/readme-portuguese.test.ts
@OlaBakare

Copy link
Copy Markdown
Contributor Author

Please, your review is needed

@gitguardian

gitguardian Bot commented Jul 29, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

Since your pull request originates from a forked repository, GitGuardian is not able to associate the secrets uncovered with secret incidents on your GitGuardian dashboard.
Skipping this check run and merging your pull request will create secret incidents on your GitGuardian dashboard.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
- - Generic High Entropy Secret ded54f4 tests/commands/guard-cli-export-import.test.ts View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

AbdulmalikAlayande added a commit that referenced this pull request Jul 30, 2026
…cope)

Adds README.pt.md and a language-switcher link in README.md, per #476.

Trimmed from the original PR before merging:
- src/core/costs.ts / tests/core/costs.test.ts (an unrelated fee-trend
  cost-forecasting feature — that's issue #498's scope, not #476's)
- README/README.pt.md badge blocks and tests/docs/readme-badges.test.ts
  (badges are issue #488's scope; the URLs also pointed at the
  contributor's own fork - github.com/OlaBakare/sorokeep - not this repo,
  which would have shown broken/wrong CI and license badges on the real
  README)

The translation itself (README.pt.md, tests/docs/readme-portuguese.test.ts)
is unchanged and verified: 56/56 tests pass.
@AbdulmalikAlayande
AbdulmalikAlayande merged commit ab2869f into TegoLabs:main Jul 30, 2026
3 of 5 checks passed
@AbdulmalikAlayande

Copy link
Copy Markdown
Collaborator

Merged as d56c167 on main — but trimmed down before merging, want to be transparent about why:

This PR bundled three different things together:

  1. The Portuguese README translation (README.pt.md + switcher link) — this is issue docs: translate README into Portuguese #476's actual scope, and it's genuinely good work. Kept as-is, 56/56 tests pass.
  2. A fee-trend cost-forecasting feature in src/core/costs.ts — this is issue feat(core): add extension-cost forecasting that accounts for network fee trends #498's scope, a completely different, unrelated feature. Dropped from this merge; feel free to open a separate PR against feat(core): add extension-cost forecasting that accounts for network fee trends #498 if you'd like credit for that work too, it looked reasonable on a skim.
  3. CI/npm/license badges in both READMEs — that's issue docs: add build/coverage/npm-version/license badges to README #488's scope, and the URLs pointed at your own fork (github.com/OlaBakare/sorokeep) rather than this repo, which would have shown broken/wrong CI status and license badges on the actual project README. Dropped from this merge.

Going forward, please keep PRs scoped to the issue's "Files You May Touch" section — it keeps review fast and avoids exactly this kind of trim-before-merge. Verified locally: lint, typecheck, full suite (1098/1098), build, and audit all clean.

@coderabbitai coderabbitai Bot mentioned this pull request Aug 1, 2026
3 of 11 tasks
AbdulmalikAlayande added a commit that referenced this pull request Aug 2, 2026
…cope)

Adds README.pt.md and a language-switcher link in README.md, per #476.

Trimmed from the original PR before merging:
- src/core/costs.ts / tests/core/costs.test.ts (an unrelated fee-trend
  cost-forecasting feature — that's issue #498's scope, not #476's)
- README/README.pt.md badge blocks and tests/docs/readme-badges.test.ts
  (badges are issue #488's scope; the URLs also pointed at the
  contributor's own fork - github.com/OlaBakare/sorokeep - not this repo,
  which would have shown broken/wrong CI and license badges on the real
  README)

The translation itself (README.pt.md, tests/docs/readme-portuguese.test.ts)
is unchanged and verified: 56/56 tests pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants