Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localization errors when language isnt found #44

Open
wrefgtzweve opened this issue Feb 28, 2023 · 4 comments
Open

Localization errors when language isnt found #44

wrefgtzweve opened this issue Feb 28, 2023 · 4 comments

Comments

@wrefgtzweve
Copy link

wrefgtzweve commented Feb 28, 2023

Getting these serverside

addons/improved-stacker/lua/improvedstacker/localify.lua:157: Invalid language provided ('es-es')
   1.  unknown - [C]:-1
    2.  error - [C]:-1
     3.  L - addons/improved-stacker/lua/improvedstacker/localify.lua:157
      4.  LeftClick - addons/improved-stacker/lua/weapons/gmod_tool/stools/stacker_improved.lua:704
       5.  unknown - gamemodes/sandbox/entities/weapons/gmod_tool/shared.lua:226

Also happens for https://github.com/Mista-Tea/improved-weight, not sure if i should create a duplicate issue for it.

@dvdvideo1234
Copy link
Contributor

dvdvideo1234 commented Feb 28, 2023

Hey there, @Mista-Tea

It seems like according to Gmod specks the Spanish language is not coded es but instead es-es, which differs than the localization key of the library: https://wiki.facepunch.com/gmod/Addon_Localization

Pull request that attempts to fix this: #45

Maybe it is better to use a properties file. I've wrote a detailed tutorial in the wiki link provided. ( Currently used in TA for gmod_language )

@dvdvideo1234
Copy link
Contributor

Here is an example for English:
stacker_improved.txt

@Mista-Tea
Copy link
Owner

Sorry for the delay! I will try to look at this soon. I think I had fixed it in Improved Weight's version of Localify, or maybe the Localify repo itself, but haven't updated the hardcoded copies in stacker.

@dvdvideo1234
Copy link
Contributor

dvdvideo1234 commented Mar 6, 2023

Shouldn't be better to register the library as a sub module then assuming will be easier? With that way the copy will always get updated. They just stay as a pointer to another repo. I will be using it for my wire wrapper module ;)

https://github.blog/2016-02-01-working-with-submodules/

Looks like that ( folder named rock @ #HASH ):

image

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

No branches or pull requests

3 participants