Closed AterIgnis closed 1 year ago
I've pushed a new release that should fix this issue. Let me know if you run into any other issues.
Also, what system/module is that? Next major release should have breaking changes but I don't have any external modules to test the impact on the Language Provider changes.
Hello, i've tested new version and it still have some issues.
I suppose in https://github.com/mclemente/fvtt-module-polyglot/blob/8086cf56ec13eaa483d05906610ae823608596f6/module/api.js#L101
there is need to change to
this.providers[providerInstance.id] = providerInstance;
as availableLanguageProviders seems to not be used anymore and also .id is a part of instance, not a base class.
As for system/module, we use D35E system with custom module for homebrews, we had some times in the past where some of the language settings were reset (possibly due to module load errors leading to custom languages missing from system sometimes, but i am not sure if this is a cause), so I decided to make LanguageProvider for it few days ago, using example from https://github.com/mclemente/fvtt-module-polyglot/wiki/API (which needs updating too, ex. last line should be calling game.polyglot.api.registerModule now but full example and detailed walkthrough have different calls in that place)
Ok, latest release should have that line fixed too.
Yes, the documentation is a bit outdated now with the changes. There are more upcoming changes to the Language Provider, so I held out on changing it for now. E.g. the originalAlphabets
and originalTongues
are being merged into a languages
getter, which will also allow to set the way the randomization is done for each language instead of global setting.
Looks like it is working now, thanks.
Describe the bug Functions registerModule(moduleId, languageProvider) and registerSystem(languageProvider) call #register(source, type, languageProvider) but provide two arguments instead of three (type is missing)
To Reproduce
Expected behavior Language provider registered successfully
Screenshots
Additional context Add any other context about the problem here.