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

Missing translations can cause confusing behaviour to occur #2045

Open
geekazodium opened this issue Aug 26, 2023 · 5 comments
Open

Missing translations can cause confusing behaviour to occur #2045

geekazodium opened this issue Aug 26, 2023 · 5 comments

Comments

@geekazodium
Copy link
Contributor

geekazodium commented Aug 26, 2023

Missing translations may cause features to load while not setting the flag that indicates features have loaded, causing multiple instances of features being created when texturepacks are reloaded and is hard to troubleshoot as error is completely unrelated to the weird behavior.

@geekazodium
Copy link
Contributor Author

geekazodium commented Aug 26, 2023

(cleaned up comments)

@geekazodium geekazodium changed the title TexturePacks reloading causes FeatureManager.init() to be called again and can create multiple instances of features Missing translations may cause features to load while not setting the flag that indicates features have loaded, causing multiple instances of features being created and is hard to troubleshoot Aug 28, 2023
@geekazodium geekazodium changed the title Missing translations may cause features to load while not setting the flag that indicates features have loaded, causing multiple instances of features being created and is hard to troubleshoot Missing translations can cause confusing behaviour to occur Aug 28, 2023
@geekazodium geekazodium reopened this Aug 28, 2023
@magicus
Copy link
Member

magicus commented Sep 3, 2023

I don't fully understand. Are you talking about when a required automatically generated i18n key is missing, which causes the feature to fail loading in development mode?

@geekazodium
Copy link
Contributor Author

basically the features do successfully load, but the problem is that the flag that remembers the feature is loaded isn't set so when textures are reloaded it will try to load another instance of features making really confusing stuff to happen sometimes

@geekazodium
Copy link
Contributor Author

I don't fully understand. Are you talking about when a required automatically generated i18n key is missing, which causes the feature to fail loading in development mode?

I don't actually know this super well, do assert statements only have an effect in development env?

@geekazodium
Copy link
Contributor Author

the thing is missing translation keys for configurations in development would not completely fail the feature from loading, the feature loads, but then when I change textures it will load a new instance of the feature without unloading the current instance, meaning you get 2 instances of the feature, this was kinda painful to troubleshoot because the error seems completely unrelated to the unintended behavior.

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

2 participants