tiny-world icon indicating copy to clipboard operation
tiny-world copied to clipboard

Move all strings to a common resource (or even better, to JSON)

Open mlange-42 opened this issue 1 year ago • 3 comments

For cleaning up the code base. Would make translations easier, in case we decide to go this route.

mlange-42 avatar Mar 17 '24 21:03 mlange-42

I could try to do this one.

I understand you want to just move strings to a common resource, you don't want translations yet.

Do you have an example on how to do this? 2 years ago I did something related at LazyGit https://github.com/jesseduffield/lazygit/pull/2852 I am a beginner with Go, I am just wondering why you didn't use the "Good first issue" label here, I believe this task may not be so simple to do...

KarlHeitmann avatar Oct 20 '25 17:10 KarlHeitmann

@KarlHeitmann Actually, I'm not sure whether this is really worth the effort, as the game has only like 1-2 browser plays per day.

I have no experience with translations. A first step could be to put strings into an embedded JSON file. JSON handling is Go is really easy, and certainly useful if you want to learn Go.

mlange-42 avatar Oct 20 '25 19:10 mlange-42

Thank you Martin!

I'm a newbie in Go (I've completed some courses in udemy), but I think a good way to improve my skills in a new language is doing this kind of work (that may be tedious). And if I get to know how to manage JSON in Go, it is a good plus.

Also, you are already handling JSON files, so it shouldn't be so difficult.

If I've got the time to do it, I'll give it a try. Thank you.

KarlHeitmann avatar Oct 21 '25 02:10 KarlHeitmann