Steps to reproduce:

  1. Create a content type with a boolean field
  2. If you don't already have more than one language enabled on the site, enable an additional language and configuration translation.
  3. Create a new view, with fields display.
  4. Add the boolean field to the fields in the view.
  5. In the views field settings, choose 'Custom' from 'Output format', and enter values for "Custom output for TRUE" and "Custom output for FALSE"
  6. Save the view
  7. Choose to add a translation for the view
  8. 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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nicrodgers created an issue. See original summary.

nicrodgers’s picture

nicrodgers’s picture

Screenshot 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):

nicrodgers’s picture

Issue summary: View changes
nicrodgers’s picture

Issue tags: +language-config

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

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. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

nicrodgers’s picture

Version: 8.3.x-dev » 8.2.x-dev
nicrodgers’s picture

Version: 8.2.x-dev » 8.3.x-dev
Assigned: nicrodgers » Unassigned
teemuaro’s picture

Status: Needs review » Reviewed & tested by the community

Not 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

teemuaro’s picture

Version: 8.3.x-dev » 8.4.x-dev

I 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?

nicrodgers’s picture

Hey @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

teemuaro’s picture

Version: 8.4.x-dev » 8.3.x-dev

Yeah, sounds reasonable to me.

alexpott’s picture

I 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.

alexpott’s picture

alexpott’s picture

@teemuaro it would be great if you comment in #10 contained evidence of testing such as screenshots.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed c7dd821 to 8.4.x and 2713868 to 8.3.x. Thanks!

  • alexpott committed c7dd821 on 8.4.x
    Issue #2849529 by nicrodgers: Unable to translate boolean custom true...

  • alexpott committed 2713868 on 8.3.x
    Issue #2849529 by nicrodgers: Unable to translate boolean custom true...
Gábor Hojtsy’s picture

Issue tags: +D8MI

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.