Skip to content

feat:xgotext support string variables and const - #128

Closed
githubzhaoqian wants to merge 4 commits into
leonelquinteros:masterfrom
githubzhaoqian:master
Closed

githubzhaoqian wants to merge 4 commits into
leonelquinteros:masterfrom
githubzhaoqian:master

Conversation

@githubzhaoqian

@githubzhaoqian githubzhaoqian commented Feb 3, 2026 •

Copy link
Copy Markdown
Contributor

improvement

xgotext support string variables and const
Although it supports direct translation, I might want to reuse the text just by calling variables

What does this change implement/fix?

const testStr = "testStrVal"
str := "strValue"

fmt.Println(gotext.Get(testStr))
fmt.Println(gotext.Get(str))

@githubzhaoqian githubzhaoqian changed the title feat:xgotext support string variables feat:xgotext support string variables and const Feb 3, 2026
@leonelquinteros

Copy link
Copy Markdown
Owner

Hi @githubzhaoqian , thanks for your contribution!!

I like the idea, and i'd like to get it merged.
Could you add test to cover the use cases (positives and negatives if any) provided by this change?

Thanks again!

@githubzhaoqian

Copy link
Copy Markdown
Contributor Author

@leonelquinteros I'm very glad. I'll study it and submit the code a little later。

@leonelquinteros

Copy link
Copy Markdown
Owner

Thanks again for the contribution. We’ve moved this work to #137 so the original changes can be completed on a repository-owned branch, with the additional fixes, test coverage, and documentation updates. The original commits and authorship are preserved there. Please continue any review on #137.

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