Repository navigation
docs: Brazilian Portuguese README translation with language switcher - #517
Conversation
- 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
|
@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! 🚀 |
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe 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. ChangesDocumentation updates
Cost forecasting
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (6)
README.mdREADME.pt.mdsrc/core/costs.tstests/core/costs.test.tstests/docs/readme-badges.test.tstests/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!
|
Please, your review is needed |
|
| 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
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- 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
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 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.
…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.
|
Merged as d56c167 on This PR bundled three different things together:
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. |
…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.
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