fix: restore i18n-enabled Cobra dependency #964

Open
ChasquiLabo wants to merge 1 commits from escuela-comun/abra:fix/918-cobra-i18n into main
First-time contributor

Summary

Restores the internationalization support for help flags originally implemented in PR #786.

That PR introduced the i18n-enabled Cobra dependency (v1.10.2-i18n), allowing translated help flags such as --ayuda to work correctly alongside --help and -h.

However, the subsequent dependency update in PR #823 replaced v1.10.2-i18n with v1.10.2, unintentionally removing the original fix and reintroducing the unable to redefine 'h' shorthand panic.

This PR restores the original dependency to resolve #918 without modifying Abra's command implementation.

Changes

  • Restore github.com/decentral1se/cobra v1.10.2-i18n in go.mod.
  • Add the corresponding checksums to go.sum.
  • Preserve the translated help functionality introduced in PR #786.

Testing

Tested against the current Abra main branch on Ubuntu 26.04, using Go 1.27.4.

  • Reproduced the original panic with Cobra v1.10.2.
  • Confirmed that restoring v1.10.2-i18n resolves the issue.
  • Verified that --help, -h, and --ayuda work correctly in Spanish, including application subcommands.
  • Built successfully using go build -mod=mod.

Note: The vendor/ directory has not been updated and may require synchronization for default vendor-mode builds.

AI assistance

This regression was investigated and the fix developed with assistance from ChatGPT (LLM). All changes were manually reviewed and tested in a dedicated development environment.

Fixes #918.

Summary Restores the internationalization support for help flags originally implemented in PR #786. That PR introduced the i18n-enabled Cobra dependency (`v1.10.2-i18n`), allowing translated help flags such as `--ayuda` to work correctly alongside `--help` and `-h`. However, the subsequent dependency update in PR #823 replaced `v1.10.2-i18n` with `v1.10.2`, unintentionally removing the original fix and reintroducing the `unable to redefine 'h' shorthand` panic. This PR restores the original dependency to resolve #918 without modifying Abra's command implementation. Changes - Restore `github.com/decentral1se/cobra v1.10.2-i18n` in `go.mod`. - Add the corresponding checksums to `go.sum`. - Preserve the translated help functionality introduced in PR #786. Testing Tested against the current Abra `main` branch on Ubuntu 26.04, using Go 1.27.4. - Reproduced the original panic with Cobra `v1.10.2`. - Confirmed that restoring `v1.10.2-i18n` resolves the issue. - Verified that `--help`, `-h`, and `--ayuda` work correctly in Spanish, including application subcommands. - Built successfully using `go build -mod=mod`. Note: The `vendor/` directory has not been updated and may require synchronization for default vendor-mode builds. AI assistance This regression was investigated and the fix developed with assistance from ChatGPT (LLM). All changes were manually reviewed and tested in a dedicated development environment. Fixes #918.
ChasquiLabo added 1 commit 2026-11-11 17:53:17 +00:00
fix: restore i18n-enabled Cobra dependency
continuous-integration/drone/pr Build is failing
f6f0f96867
Owner

I think we'll need to wait for toolshed/organising#678 before making a decision here. If people want to push that process forward, please speak to federation members and help out! Thank you for disclosing how the change set was created!

I think we'll need to wait for https://git.coopcloud.tech/toolshed/organising/issues/678 before making a decision here. If people want to push that process forward, please speak to federation members and help out! Thank you for disclosing how the change set was created!
Some required checks failed
continuous-integration/drone/pr Build is failing
You are not authorized to merge this pull request.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u https://git.coopcloud.tech/escuela-comun/abra fix/918-cobra-i18n:escuela-comun-fix/918-cobra-i18n
git checkout escuela-comun-fix/918-cobra-i18n
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: toolshed/abra#964