BoltTranslate / Translate

Provides translation for contenttypes.
Other
43 stars 37 forks source link

Compatability with bolt 3.0 #24

Closed SvanteRichter closed 8 years ago

SvanteRichter commented 8 years ago

This is outdated, see #26 for info/code


Well, 3.0 is out, and we've know it was coming for some time... So I'm gonna try to use this as a tracker for the issues we encounter when moving the extension to 3.0.

Besides the obvious issues of extension structure we have

So hopefully I can map this out in this week and get a plan for it.

jnvsor commented 8 years ago

Any movement on this recently?

SvanteRichter commented 8 years ago

@jnvsor I'm working on it right now, it'll pretty much be a full rewrite though.

peterboorsma commented 8 years ago

I'm not trying to push you here but can you say anything about a releasedate?

SvanteRichter commented 8 years ago

@peterboorsma Well, the way I'm planning to implement it (localizing the values in the PRE_HYDRATE event) has a small bug that needs fixing in bolt before I can complete/test this...

But, hopefully it won't take long after that is fixed.

peterverraedt commented 8 years ago

@SahAssar It is also possible to implement it by overriding the fieldtypes and localize in custom hydrate and persist-handlers, following the implementation of repeaters. For an experimental implementation of this, my I18nTypeBase class. Note that I store translated values exactly as how repeaters work. Feel free to steal some code.

SvanteRichter commented 8 years ago

@peterverraedt Thanks, that was also my first thought when I couldn't get it working in hydration events, but IIRC that won't be very forward compatible (for 4.0). I have the basic save/persist/hydrate working now from the hydration and storage events, so now it should just be to fix up the menubuilder and then go bughunting :smile:

peterboorsma commented 8 years ago

I'm working on a site that needs your extension. Ik can help you with bug hunting.

SvanteRichter commented 8 years ago

@peterboorsma That'd be great! :smile: My first draft of this is in #26

Keep in mind that it's still pretty unpolished, but in my testing it's worked pretty well.

SvanteRichter commented 8 years ago

@peterboorsma Also, keep in mind that this is not compatible with latest stable due to bolt/bolt/pull/5518 not having landed yet... It will only work with 3.0-dev or master until the next 3.0 minor is released.

peterboorsma commented 8 years ago

Hmm.. I guess I have to wait until bolt/bolt#5518 is fixed then. I'll ask Gawain about it.

SvanteRichter commented 8 years ago

@peterboorsma Just to be clear, it is fixed and merged into bolt, it's just that we need to tag a new release of bolt for it to be included in (that's going to be 3.10).

SvanteRichter commented 8 years ago

As noted in https://github.com/bolt/bolt/wiki/Dev-meeting-2016-07-12 we are moving forward to getting it (bolt 3.0.10) tagged, but I'd like to get a fix for repeaters in first, so that the extension is compatible with arguably the most awesome new feature of bolt 3.0. I'm going to work/talk with rossriley on how to get it done.

Anyway, the rest of it should be pretty fine for testing, I've just disabled adding repeaters on the frontend (in legacy storage) to make sure we don't 500 a site that tries to use it. You can still save/use them on the backend though.

peterboorsma commented 8 years ago

I started using it. First error detected. :) See https://github.com/AnimalDesign/bolt-translate/issues/27

SvanteRichter commented 8 years ago

Closing as this is merged in... Will tag a release as soon as the next minor of bolt is tagged as that is required to make the repeaters work.