Skip to content

fix(xgotext): extract static string identifiers safely - #137

Merged
leonelquinteros merged 7 commits into
masterfrom
fix/xgotext-string-vars
Aug 10, 2026
Merged

leonelquinteros merged 7 commits into
masterfrom
fix/xgotext-string-vars

Conversation

@leonelquinteros

@leonelquinteros leonelquinteros commented Aug 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

Supersedes #128 and incorporates the original contribution from @githubzhaoqian, plus follow-up fixes, tests, and documentation.

  • resolve string constants, aliases, and declaration-time variable values
  • preserve identifier-to-value mapping for multi-name declarations
  • skip values that are dynamic or reassigned before use
  • safely reject unsupported getter arguments without panicking
  • cover directory and package-tree extraction paths

Validation

ok github.com/leonelquinteros/gotext (cached)
? github.com/leonelquinteros/gotext/cli/xgotext [no test files]
? github.com/leonelquinteros/gotext/cli/xgotext/fixtures [no test files]
? github.com/leonelquinteros/gotext/cli/xgotext/fixtures/pkg [no test files]
ok github.com/leonelquinteros/gotext/cli/xgotext/parser (cached)
ok github.com/leonelquinteros/gotext/cli/xgotext/parser/dir (cached)
ok github.com/leonelquinteros/gotext/cli/xgotext/parser/pkg-tree (cached)
ok github.com/leonelquinteros/gotext/plurals (cached)

Closes #128

@leonelquinteros
leonelquinteros merged commit 7239b63 into master Aug 10, 2026
5 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