Steps to reproduce:
- Create a content type with a boolean field
- If you don't already have more than one language enabled on the site, enable an additional language and configuration translation.
- Create a new view, with fields display.
- Add the boolean field to the fields in the view.
- In the views field settings, choose 'Custom' from 'Output format', and enter values for "Custom output for TRUE" and "Custom output for FALSE"
- Save the view
- Choose to add a translation for the view
- Look at the 'field' variables available for translation for the boolean field, and you'll see that the custom output you entered in step 5 is not available for translation.
Actual result:
Custom values entered for "Custom output for TRUE" and "Custom output for FALSE" are not displayed in the Translate View interface.
Expected result:
Custom values entered for "Custom output for TRUE" and "Custom output for FALSE" should be displayed in the Translate View interface, so that they can be translated.
Comment | File | Size | Author |
---|---|---|---|
#3 | Screenshot 2017-02-03 15.58.35.png | 88.96 KB | nicrodgers |
#3 | Screenshot 2017-02-03 15.58.49.png | 78.36 KB | nicrodgers |
#2 | 2849529-views_translate_boolean_custom_text-02.patch | 575 bytes | nicrodgers |
Comments
Comment #2
nicrodgersComment #3
nicrodgersScreenshot showing views config before the patch (you can't see the custom boolean values):
Screenshot showing views config after applying the patch (you can see the custom boolean values are available for translation):
Comment #4
nicrodgersComment #5
nicrodgersComment #7
nicrodgersComment #8
nicrodgersComment #9
teemuaro CreditAttribution: teemuaro at Drontti Oy commentedNot 100% sure this doesn't break something else (feel free to further review), but the patch applies cleanly and makes the custom boolean text translatable
Comment #10
teemuaro CreditAttribution: teemuaro at Drontti Oy commentedI tested that this works with both 8.3.x-dev and 8.4.x-dev so I think we should use 8.4.x tag?
Comment #11
nicrodgersHey @teemuaro thanks for reviewing, glad it's working ok.
Given the comment "Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch." I think this bug fix isn't a disruptive change or a new development, so my interpretation of that would be to set this for 8.3.x but am happy to be corrected!
cheers, Nic
Comment #12
teemuaro CreditAttribution: teemuaro at Drontti Oy commentedYeah, sounds reasonable to me.
Comment #13
alexpottI pondered about asking for a test. Tests serve two purposes - one to check functionality - here we don't need that because the making a piece of config translatable is well tested in of itself. The other purpose of tests is to prevent regression. I'm not sure that this is worth it here because if a future patch switches this back we should ask questions. However if another committer feels different and asks before I commit this - I'll support that. I'm ambivalent. Waiting for the test on 8.3.x to pass and for me to have had some sleep.
Comment #14
alexpottComment #15
alexpott@teemuaro it would be great if you comment in #10 contained evidence of testing such as screenshots.
Comment #16
alexpottCommitted and pushed c7dd821 to 8.4.x and 2713868 to 8.3.x. Thanks!
Comment #19
Gábor HojtsyThanks!