In Drupal 5 I created a content type called 'eBook', but on the node/add page it gets changed to 'EBook'. I thought this wouldn't be a big deal because I could just change it with localization, but unfortunately I was wrong - it's not translatable.

<?php
'title' => drupal_ucfirst($type->name),
?>

The node/add page is the only place where this happens, so it's also an inconsistency.

I propose that either the function to make the first letter uppercase (drupal_ucfirst) be removed, or modified so it can be translated easily.

I'll create a patch later.

Is there any chance it could be back ported to 6.x and/or 5.x too?

Comments

Rowanw’s picture

Title: Node-type name is auto-capitalized » Name of content type is incorrectly capitalized
Status: Active » Needs review
StatusFileSize
new737 bytes

There's not much to this patch, it just removes drupal_ucfirst().

floretan’s picture

Priority: Normal » Minor
Status: Needs review » Reviewed & tested by the community

There was already a long thread related to this in #84146: Capitalize menu, link, etc. titles throughout core..

However, since then the help text for a content type's human-readable name has been changed from

It is recommended that this name consists only of lowercase letters.

to

It is recommended that this name begin with a capital letter.

These instructions are redundant with the call to drupal_ucfirst(), so I don't think it would hurt consistency if we removed the call to drupal_ucfirst() to allow edge cases like 'eBook' to always start with a lowercase letter.

catch’s picture

Status: Reviewed & tested by the community » Needs work

No longer applies.

dmitrig01’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new1.04 KB

does now

lilou’s picture

Patch still applied to CVS HEAD.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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