The words “Submit page” on the top of a node creation form always bothered me. “Create %node-type” is so much better imo. If an existing node is edited, the string isn’t shown but the node’s title is used.

The same goes for “Submit” as button label. With this patch, the label changes to “Save” if the node already exists (thus the user is editing it) and to “Create” if it’s a new node.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

StevenPatz’s picture

Priority: Critical » Normal
kkaefer’s picture

Priority: Normal » Critical

Spatz4000: String freeze issues that change interface strings are considered critical.

Also see http://drupal.org/node/100641.

m3avrck’s picture

Looks good to me -- I really like this change, makes a lot more sense usability wise IMO and I already implement a "hack" on a bunch of my sites to do the same.

webchick’s picture

Priority: Critical » Normal
FileSize
1.68 KB

Nice patch. I made one small addition which was to change the title when editing a node from "node title" to "Editing node title"

webchick’s picture

Also, bumped critical to normal because Dries doesn't want string freeze patches as critical.

webchick’s picture

FileSize
1.56 KB

re-roll with "Editing" changed to "Edit" and theme_placeholder around the node title, per kkaefer.

kkaefer’s picture

Sweet.

Chris Johnson’s picture

Looks good to me. RTBC, in my view.

RobRoy’s picture

Status: Needs review » Reviewed & tested by the community

Well let's RTBC this puppy. Should we include something in the update docs for any funky modules that check the $_POST['op'] == t('Submit') (now $form_values['op'])?

Steven’s picture

Status: Reviewed & tested by the community » Needs work

See my comment at http://drupal.org/node/100641 . I think 'create' as a title is good, but as a submit button is confusing.

hass’s picture

subscribe

Gábor Hojtsy’s picture

Please reroll against Drupal 6 taking Steven's comments into account.

cburschka’s picture

Version: 5.x-dev » 6.x-dev
Status: Needs work » Needs review
FileSize
1.05 KB

I presume that if #100641 takes care of the form buttons, this patch can limit itself to changing the page title?

Rerolled for 6.x on the above premise. This changes the "new node" title to "Create %type" and the "editing" title to "Edit %title".

hass’s picture

Status: Needs review » Needs work

i think you should use Edit @title and not %title

hass’s picture

additional the older patches contain a third line your patch is missing!?

kkaefer’s picture

Status: Needs work » Needs review

hass: No, the variable prefixes are correct. "Create @name" results in something like "Create story" whereas "Edit %title" results in "Edit An interesting story". (Note the theme placeholder). Also, the third line was not in the very first patch and falls into the area of http://drupal.org/node/100641.

Gábor Hojtsy’s picture

Status: Needs review » Fixed

Committed to Drupal 6.x-dev!

hass’s picture

But if we'd like italic text, why is this not done for "Create story", too? shouldn't it be in sync?

keith.smith’s picture

The patch at http://drupal.org/node/89196, awaiting reviews, adds the content type name in italics in the description, if not in the exact string your referring to.

Gábor Hojtsy’s picture

We use placeholders mostly for values, which break the flow of your reading. If you have a node titled "New employees", then "Edit /New emloyees/" looks better then "Edit New employees". Node type names however are quite controllable.

kkaefer’s picture

Content types aren't considered user submitted text (although they could be, just not for regular users) while the title of a node is clearly user-submitted and thus italic to indicate that.

cburschka’s picture

Or to put it differently, "Create page" is a proper sentence as it stands as you are indeed creating a page, but "Edit this is my test node" isn't. It sounds confusing until you remember to read it as "Edit 'this is my test node'" or "Edit this is my test node", because what you are editing isn't a this is my test node, but a page titled "this is my test node". ;)

(I hope the above paragraph is readable...)

Anonymous’s picture

Status: Fixed » Closed (fixed)