ineedbots / iw4_bot_warfare

The Bot Warfare mod for MW2
https://www.moddb.com/mods/bot-warfare
112 stars 27 forks source link

Add rudimentary translation support #79

Closed Bluscream closed 5 months ago

Bluscream commented 7 months ago

Boiled down version of #71 with only the translation stuff.

Scripts used to generate the translation layer can be found here

Ideally one would use a proper localized_strings table. But at the time when i wrote the translations i did not know they can be used by mods and even today i'm still not sure how to use "proper" iw4 localizations

diamante0018 commented 6 months ago

This is the worst way possible, to do localization. Not only does this make NO practical sense when you take an overview look at the implementation that is:

This also makes no sense at a lower level because:

No sane person will merge this in its current state

It is shocking in its current state actually because the IW4 engine natively supports localized string 🤯

Look at the CoD 4 modding tools to learn how to do this properly. Scrap this PR and start over by using str files.

https://github.com/promod/CoD4-Mod-Tools/tree/master/raw/english/localizedstrings

diamante0018 commented 6 months ago

I would like to clarify, what I meant to suggest is that if you were to do such a thing as introduce localization stuff to this mod you should use the native str system.

However, you have no indication this feature is even wanted or appreciated in this repository. You should first ask the admin of the project using the issue tracker to see if something can be done about any feature before wasting any of your time. Even if you were to do this PR right you don't know if it will ever get merged which is a big waste added on top of this already botched PR.

Bluscream commented 6 months ago

What are you even on about. I clearly stated in my initial post that this is not ideal and i had to do it this way because of lack of knowledge/proper digestable documentation. tldr; i would prefer localized strings and did gave that a short try but didnt get it working after fiddling with it for an hour. This pr however took me about an hour and actually resulting in working translations. If anyone with extensive iw4 localization knowledge wants to take on the task, they are free to refactor this if they feel like doing some good.

About your second point of this potentially not being wanted; it might be true that ineedbots does not want translations, but how does that matter actually? I created the code for it anyway out of necessity for my own servers and sharing is caring. The repo owner is always free to close any PR that he feels is out of scope (preferably with a short reasonig :eyes:) and admins that want translations so bad that they can live with unoptimal code can just yoink the modifications from this pr whenever they want.

If you find grammar errors, you can keep them (i'm on mobile) Also to you personally; The only productive thing you did in your comments to this PR is providing a link to some docs for everyone that stumbles upon this. And in response to your Yandere dev references, i dont like that guy either, but for his attitude rather than his code. Remember, the only thing worse than a bad solution is no solution :)

ineedbots commented 5 months ago

localized strings would be a better solution also this will quickly run out of SL strings as the compiler processes all the strings. I'm going to close this as I don't think this fits. A personal solution would to just translate the strings inside of _bot_chat