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

lang-fr-fr.yml: expected version 3, but got 4 #114

Closed
karthanistyr opened this issue Jan 13, 2022 · 7 comments
Closed

lang-fr-fr.yml: expected version 3, but got 4 #114

karthanistyr opened this issue Jan 13, 2022 · 7 comments

Comments

@karthanistyr
Copy link
Contributor

On a completely fresh install of paper 1.18.1 and vane 1.6.7

[14:20:05 INFO]: [vane-bedtime] Enabling vane-bedtime v1.6.7
[14:20:05 ERROR]: [vane-bedtime] lang-fr-fr.yml: expected version 3, but got 4
[14:20:05 ERROR]: [vane-bedtime] This language file is for a future version of vane-bedtime.
[14:20:05 ERROR]: [vane-bedtime] Please use the correct file for this version, or use an officially
[14:20:05 ERROR]: [vane-bedtime] supported language file.
[14:20:05 ERROR]: [vane-bedtime] Invalid localization file. Shutting down.

Vane core is set for lang: "fr-fr" and vane bedtime to lang: "inherit"
Maybe I made a mistake updating the version on that file ?

@karthanistyr karthanistyr changed the title Invalid lang file lang-fr-fr.yml: expected version 3, got verion 4 lang-fr-fr.yml: expected version 3, but got 4 Jan 13, 2022
@oddlama
Copy link
Owner

oddlama commented Jan 13, 2022

Would probably be my mistake though, as I have to make sure all version numbers are in sync. Can you work around the issue by just decreasing the version to 3 for that file?

I'll definitely leave this issue open till next release so I remember to re-check the language files. Thanks for reporting!

@karthanistyr
Copy link
Contributor Author

karthanistyr commented Jan 13, 2022

I guess it's me yes: 3d6b412

Is there a workaround for vane overwriting the file everytime I restart the server ? I edit the file down to version: 3 but it gets overwritten back to 4 when the server restarts

@oddlama
Copy link
Owner

oddlama commented Jan 13, 2022

Ah damn. Unfortunately there isn't. The language files are not intended to be modified by the users so they will be overwritten if a new version is shipped in the jar file. If you manage to compile the plugin you could simply fix it for your version until I have the time to make a fix. Otherwise, users are encouraged to copy files to e.g. fr-fr-custom.yml to make changes to them, so you could also just do that. Copy the file, change the version, edit the language field in the config.yml. Sorry for the inconvenience.

I notice that this whole behavior isn't ideal at the moment. I guess I should maybe overhaul the language file system a little.

Notes to self:

  • Allow language files to inherit another language file, so you can easily override a single variable without breaking updates
  • Why are static language files even written to the plugins directory if they are not to be changed? (As a reference maybe?)

@karthanistyr
Copy link
Contributor Author

Your proposed workaround is the better solution.
My own laziness had me to switch core to en; some messages are in english but most of the mod's contents are localised client-side so it's not so bad while this gets fixed eventually.

Thanks!

@ryantheleach
Copy link
Contributor

Why are static language files even written to the plugins directory if they are not to be changed? (As a reference maybe?)

Yep, as a reference. I'd recommend naming them with .example or something.

@oddlama oddlama closed this as completed in 18dd649 Feb 4, 2022
@oddlama
Copy link
Owner

oddlama commented Feb 4, 2022

Yeah good idea. This is now tracked by #118

@TBG-FR
Copy link
Contributor

TBG-FR commented Oct 17, 2024

Got the same issue today with the latest plugin version...

  • When putting fr-fr in vane-core config I had an issue because other vane plugins where in inherit mode and all versions (expected/defined) are different for each plugin

  • When putting fr-fr in all plugins config, I still had an issue with vane-trifle

[19:23:49 INFO]: [vane-trifles] Enabling vane-trifles v1.15.0
[19:23:49 ERROR]: [vane-trifles] lang-fr-fr.yml: expected version 4, but got 5
[19:23:49 ERROR]: [vane-trifles] This language file is for a future version of vane-trifles.
[19:23:49 ERROR]: [vane-trifles] Please use the correct file for this version, or use an officially
[19:23:49 ERROR]: [vane-trifles] supported language file.
[19:23:49 ERROR]: [vane-trifles] Invalid localization file. Shutting down.
[19:23:49 INFO]: [FastAsyncWorldEdit] Enabling FastAsyncWorldEdit v2.11.3-SNAPS

IMO that issue should not make the server stop, that's quite annoying...

In fact I think that something is broken, because the language doesn't change even after putting correct values in each plugin config...

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

4 participants