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

sorting in gridfield does not take translation into account #447

Closed
sunnysideup opened this issue Jul 27, 2018 · 4 comments
Closed

sorting in gridfield does not take translation into account #447

sunnysideup opened this issue Jul 27, 2018 · 4 comments

Comments

@sunnysideup
Copy link

SS4.1 (CWP)

We have a DataObject that is translated.

When viewing it in the ModelAdmin and sorting it by the "translatable" Title of the object, it always uses the English term to sort even though in the other language the word should be in a different position (due to it starting with T instead of A).

How to replicate:

  1. add Fluent to a dataobject

  2. show dataobject in ModelAdmin

  3. translate Title into two languages for one of these DataObjects

  4. sort ModelAdmin by Title in Language 1

  5. switch Language using the Fluent Dropdown
    image

  6. sort dataObject again by Title

  7. Now note that the translated version is in the wrong spot in the sorted list.

@robbieaverill
Copy link
Contributor

We have fixed this already in fluent 4.1.x, but it wasn’t included in CWP 2.1.0. We need to iron out a couple of bugs, but would appreciate your feedback if you decide to pull the latest branch in to test it out! I’m going to close for now.

@sunnysideup
Copy link
Author

Thank you Robbie.

We have already upgraded to fluent 4.1.3 - but we are still experiencing this issue.

@robbieaverill
Copy link
Contributor

@sunnysideup sorry, I posted that from my phone so didn't have an issue to reference handy.

The duplicate issue is #208 and we fixed it with #415. These changes are in the 4.1 branch, but haven't been released yet. In order to pull them into CWP 2.1 you'd need to add an inline alias for fluent:

"require": {
    "tractorcow/silverstripe-fluent": "4.1.x-dev as 4.1.3"
}

@sunnysideup
Copy link
Author

Thank you.

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

No branches or pull requests

2 participants