Git Product home page Git Product logo

Comments (15)

tobi avatar tobi commented on August 18, 2024

Which one in particular?

from liquid.

cveneziani avatar cveneziani commented on August 18, 2024

Especially syntax errors

from liquid.

DBA avatar DBA commented on August 18, 2024

My 0.02 cents

This could be an interesting improvement for liquid 3 ;)

from liquid.

phoet avatar phoet commented on August 18, 2024

@cveneziani is there still a need for this feature?

from liquid.

cveneziani avatar cveneziani commented on August 18, 2024

@phoet yes it is. In fact, in some parts of my app, I have a WYSIWYG editor that uses some Liquid templates.
I directly display the Liquid errors on rendering failure.

For now I use regular expressions to match current error messages, extract variables and then translate them.
It's pretty ugly.

from liquid.

phoet avatar phoet commented on August 18, 2024

@cveneziani i don't think that this will happen. there are several issues like this one here: #112

from liquid.

fw42 avatar fw42 commented on August 18, 2024

i18n seems like overkill, but I don't see a problem with implementing customizable error messages.

from liquid.

cveneziani avatar cveneziani commented on August 18, 2024

I agree. I'd just like to find a way to handle this gracefully on my side.

from liquid.

phoet avatar phoet commented on August 18, 2024

@cveneziani i think that using the new lexer/parser might solve this issue for you #235

from liquid.

fw42 avatar fw42 commented on August 18, 2024

@phoet: How's that?

from liquid.

phoet avatar phoet commented on August 18, 2024

@fw42 as far as i understood, the new lexer/parser is able to give a more detailed feedback about what is wrong in the template. this should help @cveneziani with I have a WYSIWYG editor that uses some Liquid templates. I directly display the Liquid errors on rendering failure

from liquid.

trishume avatar trishume commented on August 18, 2024

@phoet Unfortunately it does not fix this. In fact it only makes @cveneziani's existing solution with regexes harder to use by including more variety in the error messages it gives back.

from liquid.

fw42 avatar fw42 commented on August 18, 2024

@sirupsen, do you maybe want to take this? I was thinking of maybe having all the error messages in a central place. Shouldn't have a performance impact. If people want to translate them, they could just overwrite them. Possibly on a per-template basis so that it's easy to support multi-language environments.

from liquid.

fw42 avatar fw42 commented on August 18, 2024

@cveneziani, take a look at #241. Does that solve your problem?

from liquid.

cveneziani avatar cveneziani commented on August 18, 2024

This seems to do the job. Thanks for finally addressing this request.
Hope that soon, there will be a new release. Can't wait to play with.

from liquid.

Related Issues (20)

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.