Closed (fixed)
Project:
Drupal core
Version:
8.7.x-dev
Component:
Umami demo
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
15 Sep 2018 at 14:12 UTC
Updated:
13 Feb 2019 at 11:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
penyaskitoChanged twig templates for taking the translated bundle name.
Comment #3
penyaskitoScreenshots
Before:
After:
Comment #4
markconroy commentedThis is a very clever and simple patch. Thanks so much for taking the time to make Out of the Box even better @penyaskito.
Tested with default language (English) and also Irish. Marking as RTBC.
Comment #5
mpp commentedIndeed RTBC.
Comment #6
lauriiiDo you think it would make sense to add test coverage for this type of bugs?
Comment #7
mpp commented@lauriii, there should already be a test that checks if
label()returns the proper translation.Adding tests to see whether all strings used in templates are translated or not doesn't seem to make sense to me (we'd have to add thousands of tests).
Comment #8
borisson_I agree with this.
Comment #10
penyaskitoThat was a testbot failure.
Comment #11
lauriiiThe label should be rendered through a placeholder in the translation string to make sure we are compatible with all languages.
Comment #12
gábor hojtsyAgreed. Some languages need the verb and the label swapped in order which is not possible this way.
Comment #13
penyaskitoFixed with {% trans %}.
Comment #14
webflo commentedLooks great, i wrote the exact same patch a few minutes ago. I should have searched the issue first. @penyaskito++
Comment #16
lauriiiCommitted 24773d8 and pushed to 8.7.x. Also cherry-picked to 8.6.x. Thanks!
Comment #18
penyaskitoThanks! Tagging for tracking.