Giter Site home page Giter Site logo

Comments (5)

Martimiz avatar Martimiz commented on August 14, 2024

Wow, that one caught me by surprise - how come I never even looked for that? :( I just happily went along with the earlier suggestion... Looks like it's working nicely though, I can't really think of anything that would break that wouldn't break in the other solution...

I couldn't find a similar option to force the duplicate URLSegment right on creation of a new translation though. Is there something else I've missed?

Martine

Martine

from silverstripe-languageprefix.

hubertusanton avatar hubertusanton commented on August 14, 2024

Hi Martine,

That's indeed something which doesnt work i see (when creating a translation)

Bart

from silverstripe-languageprefix.

Martimiz avatar Martimiz commented on August 14, 2024

I could hackishly fix this in an onBeforeWrite() but I feel this should really be a Translatable issue/enhancement...

from silverstripe-languageprefix.

Martimiz avatar Martimiz commented on August 14, 2024

I've changed the previewtest branch to use your solution, The LanguagePrefixTranslatable class is no longer necessary, so it is removed.

I've added a (temporary) LanguagePrefix::onBeforeWrite() to keep the original URLSegment intact if duplicate URLSegments are allowed and created a request to the Translatable module to allow for this feature.

Please could you test the 'previewtest' branch, before I merge it into master?

from silverstripe-languageprefix.

Martimiz avatar Martimiz commented on August 14, 2024

No further comments, so I'm going to merge this into master

from silverstripe-languageprefix.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.