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

Support multiple project distributions #98

Open
thomasgodheim opened this issue Feb 11, 2025 · 1 comment
Open

Support multiple project distributions #98

thomasgodheim opened this issue Feb 11, 2025 · 1 comment

Comments

@thomasgodheim
Copy link

Hi!

I'd be very interested in seeing support for multiple distributions being consumed in an application. Our particular use case, and I'm sure many others will have this, is that we are maintaining shared libraries for re-usable components and plugins. These need translations as everything else and our applications are using a i18next library to provide said translations.

It would be a great benefit if we could set up the otaClient like new OTAClient([dist1, dist2]) to fetch both the shared library translations and the given application project translations.

Hope this might trigger some discussions and maybe a solution. Thanks!

T

@andrii-bodnar
Copy link
Member

Hi @thomasgodheim, thank you for the request!

I'm afraid this is not possible with the current OTA client API design. We have methods that work with the current distribution and return the details about that distribution. For example getHash, getManifestTimestamp, listLanguages, etc. Allowing multiple distributions will break them, overcomplicate things, and create more edge cases to handle (duplicate keys, available languages, etc.).

I would suggest creating a wrapper on your side that can initialize as many OTAClient as needed and manage the received content from these distributions. Then, expose the downloaded data in the format that best suits your needs.

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