Download & Extend

Usability: block title override

Project:Drupal core
Version:8.x-dev
Component:block.module
Category:task
Priority:normal
Assigned:floretan
Status:needs work

Issue Summary

I was working on a website in German, and noticed that the translator had translated the <none> placeholder (used to indicate that a block should not have a title) to <keine> (German for "none"), which of course doesn't work.

I'll file an issue against the German localization, but to keep translators from having to making these kinds of mistakes (they're not supposed to be developers) we should put non-localizable parts of strings passed to t() into placeholders:

t('Use <em>&lt;none&gt;</em> to display no title, or leave blank to use the default block title.')

should be

t('Use !none to display no title, or leave blank to use the default block title.', array('!none' => '<em>&lt;none&gt;</em>'))

This is just one example that I ran into, if there are more cases like this they should be added to this patch.

AttachmentSizeStatusTest resultOperations
block.admin_.inc_.patch1.05 KBIgnored: Check issue status.NoneNone

Comments

#1

Title:block.module help text misleading for translators» Usability: block title override
Category:bug report» task
Assigned to:Anonymous» floretan

After discussing this issue with my friend who is a translator and who pointed out that the token <none> didn't make sense on a localized website, I decided to completely remove the token from the user interface. The idea was based on panels2's block title override interface and looks like this:

screenshot 0

screenshot 1

Here's a preliminary functional patch.

AttachmentSizeStatusTest resultOperations
Screenshot.png7.75 KBIgnored: Check issue status.NoneNone
Screenshot-1.png10.37 KBIgnored: Check issue status.NoneNone
block-title-override-265413-1.patch4.37 KBIgnored: Check issue status.NoneNone

#2

Component:block.module» usability

Moving all usability issues to Drupal - component usability.

#3

#4

Re-rolled patch (also removed some unrelated chunk from a different issue).

I also took a look at #202837: Make it easier to customize a block title and there seems to be a few issues with that patch that aren't present with this one, so I decided to go ahead with it.

AttachmentSizeStatusTest resultOperations
block-title-override-265413-4.patch4 KBIgnored: Check issue status.NoneNone

#5

Status:needs review» needs work

I definitely like the idea behind this usability improvement, but I think it still needs work.

Upon applying the patch, the block configure page did change as expected (see Picture 6). However upon checking the box, no field appeared. I had to save the form, and then click configure again before I was presented withe the Overwrite Block Title field (see Picture 7).

AttachmentSizeStatusTest resultOperations
Picture 6.png33.2 KBIgnored: Check issue status.NoneNone
Picture 7.png36.24 KBIgnored: Check issue status.NoneNone

#6

Version:7.x-dev» 8.x-dev
Component:usability» block.module
nobody click here