updated as of #14
Should go into the render array now. Also, any hook_menu() item titles can/should go to the routing.yml now: #2032535: Resolve 'title' using the route and render array
Steps to test
- install latest d8 and enable config_translation module
- go to configuration, site information
- pick the translate tab
- notice the title
Can also see it on add translation and edit translation.
before:
after (without overlay):
after (with overlay):
after with #2068437-12: _title does not work on _form which fixes overlay
Related Issues
- #2032535: Resolve 'title' using the route and render array
- #2076059: Missing documentation for 'title/title callback' using the route and render array
- #2076085: Resolve the need for a 'title callback' using the route
- needs: #2068437: _title does not work on _form (has a test similar that is trying to override a title in a form, makes it work for overlay)
Comment | File | Size | Author |
---|---|---|---|
#14 | overlay_with_core_form_fix.png | 178.61 KB | YesCT |
#13 | no_overlay.png | 138.42 KB | YesCT |
#12 | config_translation-2070055-9.patch | 2.31 KB | dawehner |
#6 | title.png | 8.94 KB | dawehner |
#6 | config_translation-2070055-6.patch | 1.85 KB | dawehner |
Comments
Comment #1
Gábor HojtsyHere is a first patch. It does not seem to do its duty at all on my fully updated and freshly installed machine. Any ideas? :/
Comment #2
xjmAlso see: #2032535-98: Resolve 'title' using the route and render array
Comment #3
YesCT CreditAttribution: YesCT commentedYeah, I took a look at the change notice, the issue, and was looking for other examples, and got a bit confused.
Comment #3.0
YesCT CreditAttribution: YesCT commentedUpdated issue summary.
Comment #3.1
YesCT CreditAttribution: YesCT commentedadded related issues.
Comment #4
YesCT CreditAttribution: YesCT commentedTrying to look into this more, so orienting myself to the task.
so added steps to test to the summary.
I put a before screenshot in the summary.
with the patch
Comment #4.0
YesCT CreditAttribution: YesCT commentedadded steps to test
Comment #4.1
YesCT CreditAttribution: YesCT commentedadded before screenshot so people know what kind of page we are talking about.
Comment #5
Gábor HojtsyYeah the patch is not working well :/
Comment #6
dawehnerTogether with a rerolled version of #2068437: _title does not work on _form this patch works for me, see screenshot
Comment #6.0
dawehnerretina screen! added width on img
Comment #7
Gábor HojtsyThe reroll does not seem to include both drupal_set_title()s AFAIS. #2068437: _title does not work on _form looks like a dependency indeed. It sounds like a problem that drupal_set_title() was depreciated without support to avoid using it... :) Postponing on that one.
Then the patch needs to be updated to include both set titles.
Comment #8
dawehnerI am sorry that I did not tested all possible codepaths.
Comment #9
YesCT CreditAttribution: YesCT commentedI didn't try it, but looking at it, I dont see #6 changing
drupal_set_title(t('Translations for %label', array('%label' => $group->getTitle())), PASS_THROUGH);
talking in irc...
Comment #10
YesCT CreditAttribution: YesCT commentedcross posting.
Comment #11
Gábor Hojtsy@dawehner: yeah, no problem :) Funny thing is your screenshot actually shows a drupal_set_title() that you did not change to #title :)
Comment #12
dawehnerI used the wrong git commit. Thanks YesCT for notifying!
Comment #12.0
dawehneradded related issue.
Comment #13
YesCT CreditAttribution: YesCT commentedoh... @dawehner mentioned in irc that the bug of it (#1) not working shows only in overlay.
I checked. and with just #1 and no overlay, I can verify that #1 works and #2068437-10: _title does not work on _form is not a solution:
[edit: I messed up with git. see next comment. specified here which patch in 2068437 I was trying.]
Comment #14
YesCT CreditAttribution: YesCT commentedwith #12 (config_translation-2070055-9.patch) here.
and #2068437-12: _title does not work on _form there,
then
it works both in overlay and without.
@Gábor Hojtsy thinks we can commit this here, as 2068437 will take care of the overlay bit.
I also looked at the patch and coding standards and it looks ok and makes sense to me. rtbc.
I can confirm that add and edit config translation titles are also good in overlay and without.
updating issue summary.
Comment #14.0
YesCT CreditAttribution: YesCT commentednoting postponed on.
Comment #14.1
YesCT CreditAttribution: YesCT commentedupdated and clarified overlay fix dependency
Comment #15
Gábor HojtsyYay, committed #12. Thanks all!
Comment #16
Gábor Hojtsy#2068437: _title does not work on _form also landed.
Comment #17.0
(not verified) CreditAttribution: commentedimg width