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

Cordova offline support? #93

Closed
ksendra opened this issue Jul 17, 2015 · 15 comments
Closed

Cordova offline support? #93

ksendra opened this issue Jul 17, 2015 · 15 comments

Comments

@ksendra
Copy link

ksendra commented Jul 17, 2015

Hello,

do you have an estimate on when will this plugin support Cordova apps that operate offline? Not having a robust i18n support for offline apps is the only thing stopping me from doing a project in meteor...

Thanks

@theosp
Copy link
Collaborator

theosp commented Jul 17, 2015

There will be a new feature for v1.6 that might help with that as a side effect, but can't be sure as it is built to serve other purpose (langs preload).

If you can wait I believe that in the following months it will be developed.

If you can't wait, and you have budget to put into this feature development you are welcome to contact me by email daniel@meteorspark.com .

Thanks,
-Daniel

@derwaldgeist
Copy link

Bump.

I'd also like to see offline Cordova support for tap-i18n. And no, unfortunately I don't have a budget to finance this :-) So if there are not plans to develop this in the future, I will have to look for another solution as well.

Hence, @theosp: Are there any updates on the 1.6 feature you mentioned?

@theosp
Copy link
Collaborator

theosp commented Sep 4, 2015

Hi,

rc for v1.6 is ready on the v1.6-rc1 branch but the support added there to
the project-tap.i18n preloaded_lang option won't help with offline support.

Due to the fact that during the build process files are built in a way that
I can't guarantee that project-tap.i18n will load before the i18n.json
files, and even worse, I can't even know for sure whether or not it will
exist as it is optional. It was too tricky to decide on the build phase
which languages files should be compiled into the build (available for
offline) and which not. As the purpose for the preloaded_lang option was
actually to do something similar to what meteorhacks:fast-render is doing
and not to support offline it was eventually implemented in a simpler way
that gave up offline support.

-Daniel

On Fri, Sep 4, 2015 at 9:01 PM, Tom Brückner notifications@github.com
wrote:

Bump.

I'd also like to see offline Cordova support for tap-i18n. And no,
unfortunately I don't have a budget to finance this :-) So if there are not
plans to develop this in the future, I will have to look for another
solution as well.

Hence, @theosp https://github.com/theosp: Are there any updates on the
1.6 feature you mentioned?


Reply to this email directly or view it on GitHub
#93 (comment).

@derwaldgeist
Copy link

Thanks for coming back with these insights.

I think, for Cordova it would be best if all language files are added to the build. This would also ensure that every build update pushed to the mobile client (via hot code reload) also pushes the language files there. Having the files on the client for latency compensation is more important than saving bandwidth, IMHO. Of course, it would be great if they were not all loaded into the client's memory at the same time, but loaded on demand instead (via the http://meteor:local protocol inside the Cordova app).

@theosp
Copy link
Collaborator

theosp commented Sep 4, 2015

Loading all the lang files to the build for the Cordova arch is tricky too...

tap:i18n was designed to be in use by both packages and the app itself. From the app build process I don't have access to the already-built i18n files of the packages the app is using - I don't even know that they exist in the build plugin context. Which means that I can't come up with a single unified asset to be built for Cordova. Therefore, building and loading all the languages asset in Cordova will have to be more sophisticated to work.

By the way, adding languages files to the build for Cordova will be a breaking change that will require a new major release.

-Daniel

@IstoraMandiri
Copy link
Contributor

I've tried a few approaches, but as Daniel says the behaviour and order of the registerBuildPlugin API can be difficult to work with. Maybe it'll be easier to achieve with the new v1.2 API, but would require a substantial rebuild either way.

Couldn't find a perfect workaround. But hopefully this is better than nothing: https://github.com/TAPevents/i18n-bundler

@derwaldgeist
Copy link

Thanks for this package, will give it a try!

@theosp
Copy link
Collaborator

theosp commented Sep 20, 2015

Great job @hitchcott .

Added a note about this package to the README, with that, I think we can finally close this issue.

-Daniel

@theosp theosp closed this as completed Sep 20, 2015
@theosp
Copy link
Collaborator

theosp commented Oct 6, 2015

Reopening, high-likely that it can be implemented with v1.2 new build plugins API as part of tap:i18n core.

@theosp theosp reopened this Oct 6, 2015
@derwaldgeist
Copy link

Sounds good!

@IstoraMandiri
Copy link
Contributor

🎆

@Obiwarn
Copy link

Obiwarn commented Nov 1, 2015

+1
We even deployed our app already to find i18n not working when offline.

@derwaldgeist
Copy link

As I am getting closer to a public launch of my app, any progress on this would be highly appreciated.

@Obiwarn
Copy link

Obiwarn commented Nov 4, 2015

The
https://github.com/TAPevents/i18n-bundler
package works well for our app.

It is rather simple to integrate.

@derwaldgeist
Copy link

Great, forgot about this new package. Thanks for reminding.

@theosp theosp closed this as completed Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants