TShock icon indicating copy to clipboard operation
TShock copied to clipboard

Soft coded strings

Open hakusaro opened this issue 7 years ago • 11 comments

Suggestion from Newy on Slack: user strings should be customizable in a config file so that we don't have language debates like in https://github.com/NyxStudios/TShock/commit/c4cf2d496ddd1dc871be77a861a793d78dd77da2.

screen shot 2016-10-10 at 8 41 15 pm

hakusaro avatar Oct 11 '16 02:10 hakusaro

I support this. Even with Orion, we're going to still have a shit load of soft coded strings of some form or another sitting in TShock. I think it's within scope.

hakusaro avatar Oct 11 '16 02:10 hakusaro

Comments from @WhiteXZ:

Use a resources file. They exist for a reason Do it properly if at all

Disclaimer: I don't know what he's saying/how to do/etc.

hakusaro avatar Oct 11 '16 03:10 hakusaro

Issue has also been made for Orion. More details about resource files: https://msdn.microsoft.com/en-us/library/7k989cfy(v=vs.90).aspx

x-link https://github.com/NyxStudios/Orion/issues/39

QuiCM avatar Oct 11 '16 08:10 QuiCM

I'd like to stress that the original suggestion was for user configurable strings. If resx files aren't user configurable we have two issues here and need to split them up.

hakusaro avatar Oct 11 '16 15:10 hakusaro

professorx [10:05 AM]
Yea I know. Tho as stated earlier those files aren't that readable People will most likely get lost somehow

(on resx files)

hakusaro avatar Oct 11 '16 16:10 hakusaro

If the goal of this issue is to make files user configurable only, then there is no problem. Resx are modifiable, no issues there either. There are no other issues @nicatronTg, you only got confused a bit by the misunderstanding that happened in Slack, sorry about that. I see you already mentioned what I said, so the only thing I'd like to discuss further is the implementation. Whether we will stick to resx, use a JSON file etc. Cc @WhiteXZ

ivanbiljan avatar Oct 11 '16 16:10 ivanbiljan

Marking this as blocked because it's a major project that should be re-raised when there's less important thinks that need work

QuiCM avatar Dec 11 '17 07:12 QuiCM

I'm always eager for this as i born in a non-english speaking country. Any implementation is ok, they are same in essence and effect. I'm willing to do this but the hardest part for me is the keywords of strings. My english level is far from the requirement of naming them well.

AxeelAnder avatar Jun 28 '19 09:06 AxeelAnder

@AxeelAnder happy for this to go ahead - probably via a json key/value store. if you're willing to champion it then we can organise assistance with keywords

QuiCM avatar Jul 18 '19 02:07 QuiCM

I converted almost every string concatenation into format for the convenience of next step.

Is it ok to modify il instructions to achieve the goal? It's relative easy compared to soft coded string(no need to make keys and replace hardcoded strings with it).

I can maintain a repo that contains all strings need to customize, everybody can use a patcher to generate a customized version.

AxeelAnder avatar Jul 18 '19 14:07 AxeelAnder

Preference would be for a json keystore simply so the end user is able to modify on the fly with ease

QuiCM avatar Jul 18 '19 22:07 QuiCM