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

Improve Liquid Culture accessor #16956

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

hishamco
Copy link
Member

@hishamco hishamco commented Nov 5, 2024

Fixes #16957


public override string ToStringValue() => _culture.Name;

public override void WriteTo(TextWriter writer, TextEncoder encoder, CultureInfo cultureInfo)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WriteToAsync?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wrote another PR while you writing comments :)

sebastienros/fluid#709


public override bool Equals(FluidValue other)
{
throw new NotImplementedException();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe compare string representation with culture code? In case someone does Culture == 'en-US'

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please test it though, not sure when Equals is invoked

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please test it though, not sure when Equals is invoked

I can write a unit test, but I'm not sure when it called either :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve Liquid Culture accessor
2 participants