Comments (15)
Which one in particular?
from liquid.
Especially syntax errors
from liquid.
My 0.02 cents
This could be an interesting improvement for liquid 3 ;)
from liquid.
@cveneziani is there still a need for this feature?
from liquid.
@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.
@cveneziani i don't think that this will happen. there are several issues like this one here: #112
from liquid.
i18n seems like overkill, but I don't see a problem with implementing customizable error messages.
from liquid.
I agree. I'd just like to find a way to handle this gracefully on my side.
from liquid.
@cveneziani i think that using the new lexer/parser might solve this issue for you #235
from liquid.
@phoet: How's that?
from liquid.
@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.
@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.
@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.
@cveneziani, take a look at #241. Does that solve your problem?
from liquid.
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)
- Possible to get full object & variable name with `strict_variables: true`?
- video_tag fully disable poster HOT 2
- Expose Liquid::Condition in public API
- alt attribute not set for media.preview_image with image_tag filter HOT 1
- Running rake example throws error
- Liquid rendering is unexpectedly changing the "context" attribute on non-Drop classes
- Liquid shopify skórki
- Add WISMOlabs to "Who uses Liquid?" wiki section
- App Block Missing Data On Theme Previews When Proceeded by a Hidden Section Containing an @app Block
- Sort orders by 'created_at' in paginate?
- Regarding deprecation of the total_discount
- Add limit to split filter, like split method in Ruby
- Liquid - Product Description Null Check Not Working
- Should strip_newlines also 'strip' LSEP ?
- Case statement evaluation renders multiple when conditions if a value is repeated
- String to Object? HOT 1
- ع
- Can't get key/value from hash HOT 5
- Allow overriding blank? method in drops HOT 1
- image_tag filter, incorrect width and height attribute values for SVG
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from liquid.