Flat-Badger-1971 / ArchiveHelper

0 stars 1 forks source link

Slash command "missing" does not work in other languages #12

Closed Stemuweb closed 5 months ago

Stemuweb commented 5 months ago

https://github.com/Flat-Badger-1971/ArchiveHelper/blob/47410e0a70e9c0ed533b1fd00c80ed882feb5620/misc/slash.lua#L14C1-L14C62

AH.Format uses the C modifier (Converts the first character to upper case, used to display names)

So, the variable missing begins with a capital letter and is compared with the arguments of the slash command in lower case. The match is always false.

Suggested code : local missing = AH.Format(_G.ARCHIVEHELPER_SLASH_MISSING):lower()

Flat-Badger-1971 commented 5 months ago

The main purpose of AH.Format is remove the gender modifiers. Since these will never been present in our translation files, it's not necessary, but the :lower() is a wise precaution.

I'll change it to this: local missing = GetString(_G.ARCHIVEHELPER_SLASH_MISSING):lower()