With all the huge improvements going on in HEAD right now, I'd like to bring up a really trivial one, but it's something that has always bugged me. Maybe I'm anal, but I think all the page/callback/block titles should convert from all lowercase to a capital first letter of the phrase and the rest lowercase. We are being strict about sentences (messages) starting with a capital letter and ending with a period. I mean something like this breadcrumb example: Home » Administer » Settings » Content types <http://local.bigideas.com/?q=admin/settings> instead of Home » administer » settings » content types It really starts to get inconsistent when looking a forums which should use a capital forum name. Thoughts? -- Rob Roy Barreca Founder and COO Electronic Insight Corporation http://www.electronicinsight.com rob@electronicinsight.com
On 9/12/06, Rob Barreca <rob@electronicinsight.com> wrote:
It really starts to get inconsistent when looking a forums which should use a capital forum name.
I suggest that you use locale module to create a language file that achieves you want: http://drupal.org/node/24593 If you did so it would be a great thing to maintain in CVS and link to from that page. I believe that lower case titles are a Drupalism that you are unlikely to change... Regards, Greg -- Greg Knaddison | Growing Venture Solutions Denver, CO | http://growingventuresolutions.com Technology Solutions for Communities, Individuals, and Small Businesses
Rob Barreca wrote:
With all the huge improvements going on in HEAD right now, I'd like to bring up a really trivial one, but it's something that has always bugged me. Maybe I'm anal, but I think all the page/callback/block titles should convert from all lowercase to a capital first letter of the phrase and the rest lowercase.
We are being strict about sentences (messages) starting with a capital letter and ending with a period. I mean something like this breadcrumb example:
Home » Administer » Settings » Content types <http://local.bigideas.com/?q=admin/settings>
instead of
Home » administer » settings » content types
It really starts to get inconsistent when looking a forums which should use a capital forum name.
If someone wants to put forth all the effort to capitalize every menu item title and drupal_set_title() and get everyone to agree on it, I'd be happy to commit it. -- Neil Drumm http://delocalizedham.com/
On Tuesday 12 September 2006 16:53, Neil Drumm wrote:
Rob Barreca wrote:
With all the huge improvements going on in HEAD right now, I'd like to bring up a really trivial one, but it's something that has always bugged me. Maybe I'm anal, but I think all the page/callback/block titles should convert from all lowercase to a capital first letter of the phrase and the rest lowercase.
[ s n i p ]
If someone wants to put forth all the effort to capitalize every menu item title and drupal_set_title() and get everyone to agree on it, I'd be happy to commit it.
Split into mutilple smaller patches so they are considered sooner? This as it has been a hot button of mine, as well. -- Jason Flatt http://www.oadae.net/ Father of Six: http://www.flattfamily.com/ (Joseph, 13; Cramer, 11; Travis, 9; Angela; Harry, 5; and William, 12:04 am, 12-29-2005) Linux User: http://www.sourcemage.org/ Drupal Fanatic: http://drupal.org/
Jason Flatt wrote:
On Tuesday 12 September 2006 16:53, Neil Drumm wrote:
Rob Barreca wrote:
With all the huge improvements going on in HEAD right now, I'd like to bring up a really trivial one, but it's something that has always bugged me. Maybe I'm anal, but I think all the page/callback/block titles should convert from all lowercase to a capital first letter of the phrase and the rest lowercase.
[ s n i p ]
If someone wants to put forth all the effort to capitalize every menu item title and drupal_set_title() and get everyone to agree on it, I'd be happy to commit it.
Split into mutilple smaller patches so they are considered sooner?
This as it has been a hot button of mine, as well.
On my sites I just use CSS to capitalize.
On my sites I just use CSS to capitalize.
You can get close with text-transform: capitalize, but this capitalizes all the first letters. And, up to now, it seems the "Drupal way" for fieldsets and field labels is "Capital first letter of phrase only". I prefer this, and would like to have all of Drupal consistent. Rob Roy Barreca Founder and COO Electronic Insight Corporation http://www.electronicinsight.com rob@electronicinsight.com Earl Miles wrote:
Jason Flatt wrote:
On Tuesday 12 September 2006 16:53, Neil Drumm wrote:
Rob Barreca wrote:
With all the huge improvements going on in HEAD right now, I'd like to bring up a really trivial one, but it's something that has always bugged me. Maybe I'm anal, but I think all the page/callback/block titles should convert from all lowercase to a capital first letter of the phrase and the rest lowercase.
[ s n i p ]
If someone wants to put forth all the effort to capitalize every menu item title and drupal_set_title() and get everyone to agree on it, I'd be happy to commit it.
Split into mutilple smaller patches so they are considered sooner?
This as it has been a hot button of mine, as well.
On my sites I just use CSS to capitalize.
You can get close with text-transform: capitalize, but this capitalizes all the first letters. And, up to now, it seems the
Actually, you can use a pseudo-element to capitalize only the first letter: p:first-letter { text-transform: uppercase; } <p>this is some text.</p> becomes: This is some text.
"Drupal way" for fieldsets and field labels is "Capital first letter of phrase only". I prefer this, and would like to have all of Drupal consistent.
Rob Roy Barreca Founder and COO Electronic Insight Corporation http://www.electronicinsight.com rob@electronicinsight.com
Earl Miles wrote:
Jason Flatt wrote:
On Tuesday 12 September 2006 16:53, Neil Drumm wrote:
Rob Barreca wrote:
With all the huge improvements going on in HEAD right now, I'd like to bring up a really trivial one, but it's something that has always bugged me. Maybe I'm anal, but I think all the page/callback/block titles should convert from all lowercase to a capital first letter of the phrase and the rest lowercase.
[ s n i p ]
If someone wants to put forth all the effort to capitalize every menu item title and drupal_set_title() and get everyone to agree on it, I'd be happy to commit it.
Split into mutilple smaller patches so they are considered sooner?
This as it has been a hot button of mine, as well.
On my sites I just use CSS to capitalize.
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
On Wednesday 13 September 2006 03:06, Farsheed wrote:
You can get close with text-transform: capitalize, but this capitalizes all the first letters. And, up to now, it seems the
Actually, you can use a pseudo-element to capitalize only the first letter:
p:first-letter { text-transform: uppercase; }
I read what someone (not Farsheed) said on this thread about not wanting to capitalize because that would be putting a thematic choice into Drupal core. In my personal opinion, having all-lowercase is also a thematic choice in its own right; see also "e. e. cummings". :-) Whatever we pick, it is a thematic choice. But, that being said, I think at the core level we need to make a choice of something extremely consistent and stay with it. I don't mind updating my contrib modules for new API changes, but *please* don't make me also have to edit my string constants every couple of releases just to change capitalization. With that in mind, my preference would be to leave Drupal core as it is now, all lower case, and encourage themes to use "text-transform: capitalize" or the "first-letter" pseudo-element as described above. All lower case is very easy for a programmer to remember -- not that we're too stupid to think of other things (re: the comment about security/scalability/etc.), but simply that we don't need one more thing to worry about when there is little value-add in doing so. When I'm writing a contrib module, let me think about the functionality of the code and nothing else. So, -1 for changing capitalization in Drupal core for 5.0. And +1 for adding the two excellent CSS suggestions I've quoted above into Drupal's theme and module documentation -- remember, not everyone who deploys Drupal and decides to customize their CSS will be an expert at CSS. This one style may be the only thing they want to change from a prebuilt theme's stylesheet. I'd also recommend cross-referencing that documentation from the programmers' guide where it states the lowercase policy, since it is also relevant there. Scott -- ------------------------------------------------------------------------------- Syscrusher (Scott Courtney) Drupal page: http://drupal.org/user/9184 syscrusher at 4th dot com Home page: http://4th.com/
On Wednesday 13 September 2006 08:58, Syscrusher wrote:
But, that being said, I think at the core level we need to make a choice of something extremely consistent and stay with it. I don't mind updating my contrib modules for new API changes, but *please* don't make me also have to edit my string constants every couple of releases just to change capitalization.
With that in mind, my preference would be to leave Drupal core as it is now, all lower case, and encourage themes to use "text-transform: capitalize" or the "first-letter" pseudo-element as described above.
All lower case is very easy for a programmer to remember -- not that we're too stupid to think of other things (re: the comment about security/scalability/etc.), but simply that we don't need one more thing to worry about when there is little value-add in doing so. When I'm writing a contrib module, let me think about the functionality of the code and nothing else.
I am going to "me too" sticking with the current all-lowercase standard. - It's easier to remember than "wait, do we capitalize first word, all words or just important words?" One less thing for me to have to keep track of. - It's one less thing to break, especially during a freeze but at any time. - It doesn't buy us anything. Going through conversion pain for a clear benefit is one thing, but I don't see how this gets us anything. You can still get the capitalization you want now via CSS or, if you have a weird case where that wouldn't work, you can selectively translate strings. - It's putting style into the code. Style belongs in CSS, right? :-) If there's currently a confusion in core where some things are mixed case and some are all-lowercase, then yes, that's a bug. The fix for that bug is to correct the mixed-case labels to lowercase. -- Larry Garfield AIM: LOLG42 larry@garfieldtech.com ICQ: 6817012 "If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it." -- Thomas Jefferson
Larry Garfield wrote:
- It doesn't buy us anything. Going through conversion pain for a clear benefit is one thing, but I don't see how this gets us anything. You can still get the capitalization you want now via CSS or, if you have a weird case where that wouldn't work, you can selectively translate strings.
Well, no. As stated in several messages: You can't translate 'title of article' => 'Title of Article' with CSS. You can translate 'Title of Article' to 'title of article' and 'Title Of Article' with CSS. That's what it buys us.
It seems there are several guys around here that do not do more than one theme per month or such. Well, when it comes to theme development I think I have some experience (3 themes per month) to conclude that it's much easier go from "Title of Things" to "title of things" than the other way around. "title of things" - wrong capitalization, and in all sites we try to change it. It's stupid to have node titles with the right capitalization (entered by the users) but then we have admin (and module) pages with lowercase. Then you say: "ah you can use CSS". Duhhh! Try to apply capitalization with CSS to two diferent existent capitalization systems. "Title Of Things" - simply wrong but it's what CSS does. "Title of Things" - or it will be already present in core, or you'll have to do funtions to do it right. The performance goes down, the work goes up! It's so simple, and Earl said it all: the only way to have correct capitalization without pain for theme developers! Fernando Silva www.openquest.pt On 9/14/06, Earl Miles <merlin@logrus.com> wrote:
Larry Garfield wrote:
- It doesn't buy us anything. Going through conversion pain for a clear benefit is one thing, but I don't see how this gets us anything. You can still get the capitalization you want now via CSS or, if you have a weird case where that wouldn't work, you can selectively translate strings.
Well, no. As stated in several messages:
You can't translate 'title of article' => 'Title of Article' with CSS.
You can translate 'Title of Article' to 'title of article' and 'Title Of Article' with CSS.
That's what it buys us.
This is a no brainer as outlined by Earl and others. +1 for 'Title of Things' Earl Miles wrote:
Larry Garfield wrote:
- It doesn't buy us anything. Going through conversion pain for a clear benefit is one thing, but I don't see how this gets us anything. You can still get the capitalization you want now via CSS or, if you have a weird case where that wouldn't work, you can selectively translate strings.
Well, no. As stated in several messages:
You can't translate 'title of article' => 'Title of Article' with CSS.
You can translate 'Title of Article' to 'title of article' and 'Title Of Article' with CSS.
That's what it buys us.
Jason Flatt wrote:
Split into mutilple smaller patches so they are considered sooner?
Capitalizing is straightforward and would look rather incomplete if half-done. A big patch to change first-letter capitalization, and only that would be appropriate. I'm half expecting someone who has been developing Drupal for years to say something about how lowercased titles are the best. I'd like to make sure such things are addressed and people generally agree. -- Neil Drumm http://delocalizedham.com/
Capitalizing is straightforward and would look rather incomplete if half-done. A big patch to change first-letter capitalization, and only that would be appropriate.
I'm half expecting someone who has been developing Drupal for years to say something about how lowercased titles are the best. I'd like to make sure such things are addressed and people generally agree.
Agreed on both counts: the patch will just cover capitalization but would be way easier to do it all in one swoop and I'd like to hear some more +1s before going ahead. Rob Roy Barreca Founder and COO Electronic Insight Corporation http://www.electronicinsight.com rob@electronicinsight.com Neil Drumm wrote:
Jason Flatt wrote:
Split into mutilple smaller patches so they are considered sooner?
Capitalizing is straightforward and would look rather incomplete if half-done. A big patch to change first-letter capitalization, and only that would be appropriate.
I'm half expecting someone who has been developing Drupal for years to say something about how lowercased titles are the best. I'd like to make sure such things are addressed and people generally agree.
On Tuesday 12 September 2006 20:21, Neil Drumm wrote:
I'm half expecting someone who has been developing Drupal for years to say something about how lowercased titles are the best. I'd like to make sure such things are addressed and people generally agree.
Yeah, I am, too, which is why I'm not jumping on the band wagon to make big, sweeping changes right now. (That and an extreme lack of time.) -- Jason Flatt http://www.oadae.net/ Father of Six: http://www.flattfamily.com/ (Joseph, 13; Cramer, 11; Travis, 9; Angela; Harry, 5; and William, 12:04 am, 12-29-2005) Linux User: http://www.sourcemage.org/ Drupal Fanatic: http://drupal.org/
Split into mutilple smaller patches so they are considered sooner?
What is a "small patch" in this case? Limiting each patch to just change capitalization for one module or one .inc file? Once there is somewhat of an agreement, I'll add this to the todo list. IMO this will improve the overall look of Drupal even if just a little bit. Thanks for the replies, Rob Roy Barreca Founder and COO Electronic Insight Corporation http://www.electronicinsight.com rob@electronicinsight.com Jason Flatt wrote:
On Tuesday 12 September 2006 16:53, Neil Drumm wrote:
Rob Barreca wrote:
With all the huge improvements going on in HEAD right now, I'd like to bring up a really trivial one, but it's something that has always bugged me. Maybe I'm anal, but I think all the page/callback/block titles should convert from all lowercase to a capital first letter of the phrase and the rest lowercase.
[ s n i p ]
If someone wants to put forth all the effort to capitalize every menu item title and drupal_set_title() and get everyone to agree on it, I'd be happy to commit it.
Split into mutilple smaller patches so they are considered sooner?
This as it has been a hot button of mine, as well.
Rob Barreca wrote:
What is a "small patch" in this case? Limiting each patch to just change capitalization for one module or one .inc file?
More correctly, there should be a minimal number of changes in each patch. Fixing two bugs in the same file is two changes. Changing the capitalization style for one page element in every file is really one change. Usually, this means 'smaller number of lines changed' in practice. -- Neil Drumm http://delocalizedham.com/
page/block/etc titles should ideally be named uniquely, something that becomes non-obvious when you have Things Named With Mixed Case. enforcing lowercase is simpler to handle and work with in a framework than being case agnostic. Also, this is specifically a theming issue and should be kept out of core. For example, what if my drupal install implemented all titles using FIR? I would have no use for this capitalization. Plus, deciding what to capitalize is too much work for the developer brain. CSS / PHPTemplate it, that way you actually get more consistency, even. -Arnab On 9/12/06, Neil Drumm <drumm@delocalizedham.com> wrote:
Rob Barreca wrote:
What is a "small patch" in this case? Limiting each patch to just change capitalization for one module or one .inc file?
More correctly, there should be a minimal number of changes in each patch. Fixing two bugs in the same file is two changes. Changing the capitalization style for one page element in every file is really one change. Usually, this means 'smaller number of lines changed' in practice.
-- Neil Drumm http://delocalizedham.com/
Arnab Nandi wrote:
page/block/etc titles should ideally be named uniquely, something that becomes non-obvious when you have Things Named With Mixed Case. enforcing lowercase is simpler to handle and work with in a framework than being case agnostic.
Page titles are in no way used as a unique identifier.
Also, this is specifically a theming issue and should be kept out of core. For example, what if my drupal install implemented all titles using FIR? I would have no use for this capitalization. Plus, deciding what to capitalize is too much work for the developer brain.
I think any brain capable of juggling functionality, security, scalability, and code style can properly capitalize some phrases.
CSS / PHPTemplate it, that way you actually get more consistency, even.
The default cases have to be consistent, and hopefully the most correct for most people. Titles which are not consistent, capitalized or not, will simply be rejected in core. It is the same as the policy I have of not committing form #descriptions which are not complete and punctuated English sentences. The availability of ways to cover up mistakes isn't an excuse to make them. Drupal core (and contributed modules) should stay consistent without extra abstraction layers which can cause confusion about why what you typed isn't what is output. The option to use CSS or PHP to change cases in the theme is certainly available and encouraged for contributed themes. -- Neil Drumm http://delocalizedham.com/
Neil Drumm wrote:
them. Drupal core (and contributed modules) should stay consistent
Actually, a case change would require changes to contrib modules. So this whole thing is a moot point until we get a release out. -- Neil Drumm http://delocalizedham.com/
Neil Drumm wrote:
Also, this is specifically a theming issue and should be kept out of core. For example, what if my drupal install implemented all titles using FIR? I would have no use for this capitalization. Plus, deciding what to capitalize is too much work for the developer brain.
I think any brain capable of juggling functionality, security, scalability, and code style can properly capitalize some phrases.
CSS / PHPTemplate it, that way you actually get more consistency, even.
The default cases have to be consistent, and hopefully the most correct for most people. Titles which are not consistent, capitalized or not, will simply be rejected in core. It is the same as the policy I have of not committing form #descriptions which are not complete and punctuated English sentences.
The availability of ways to cover up mistakes isn't an excuse to make them. Drupal core (and contributed modules) should stay consistent without extra abstraction layers which can cause confusion about why what you typed isn't what is output.
Hear, hear! Well said, Neil. +1 to the idea of capitalizing phrases as was suggested by the thread starter. ..chrisxj
On 9/13/06, Neil Drumm <drumm@delocalizedham.com> wrote:
Arnab Nandi wrote:
page/block/etc titles should ideally be named uniquely...
Page titles are in no way used as a unique identifier.
Please read what I wrote, and in its entirety.
Plus, deciding what to capitalize is too much work for the developer brain.
I think any brain capable of juggling functionality, security, scalability, and code style can properly capitalize some phrases.
There are 38 large-sized emails on this thread within the last 20 hours, most voicing their opinions about what form of capitalization to choose. I think this is a quantified example of my point. Let's shift over to capitalization, and we'll have an entire handbook section devoted to it, with examples, and discussion forums debating over which alphabets to capitalize.
The default cases have to be consistent, and hopefully the most correct for most people. Titles which are not consistent, capitalized or not, will simply be rejected in core. It is the same as the policy I have of not committing form #descriptions which are not complete and punctuated English sentences. The availability of ways to cover up mistakes isn't an excuse to make them. Drupal core (and contributed modules) should stay consistent without extra abstraction layers which can cause confusion about why what you typed isn't what is output.
Sure, I agree. My opinion is that lowercase is the simplest to maintain over such a large international developer base. Introducing uppercase opens up a minefield of variations - CamelCase, hungarianNotation, andWhoKnows_what_else. The intention of sticking to lowercase implies that only the text is important - NOT it's case. Have it in uppercase for all you want. The choice of a framework often depends on what's easiest to work with (and this does not mean WP : i mean it from a devel's perspective). Having to deal with trivialities such as these would frustrate any serious newbie. As an aside, I would also like to point out the existence of many, many languages spoken across the world which do not have the concept of Uppercase, which is an artifact unique only to a very very small subset of the languages in this world. -Arnab
The funny thing to me is that the rule is to use American spelling in Drupal, but titles are not capitalized as they are in American English.
Arnab Nandi wrote:
On 9/13/06, Neil Drumm <drumm@delocalizedham.com> wrote:
Arnab Nandi wrote:
page/block/etc titles should ideally be named uniquely...
Page titles are in no way used as a unique identifier. Please read what I wrote, and in its entirety. I did, but I still couldn't figure out exactly what you meant by those first two sentences, or why you thought them true. In particular, exactly what "becomes non-obvious when you have Things Named With Mixed Case", and why? Is it that it's harder to tell when two titles are the same except for case? I don't see why that would be true. There are 38 large-sized emails on this thread within the last 20 hours, most voicing their opinions about what form of capitalization to choose. I think this is a quantified example of my point. ...
This doesn't indicate that it's difficult, just that many people are opinionated about it. Gary
If someone wants to put forth all the effort to capitalize every menu item title and drupal_set_title() and get everyone to agree on it, I'd be happy to commit it.
I wasn't going to bother mentioning it, but me and Dries already agreed to do this conversion before the string freeze ;). Steven Wittens
When I first started using and developing for Drupal, the all lower case thing bothered me, but not too much. Later I got used to it as a Drupalism. I am all for changing that, but a code freeze is not the time to do it. Also remember that contribs have to catch up otherwise sites will look ugly and inconsistent. Can we also get feedback from the usability folks on this (Laura? Trae? others?)
On Sep 13, 2006, at 7:44 AM, Khalid B wrote:
Can we also get feedback from the usability folks on this (Laura? Trae? others?)
I just wonder if this is appropriate, considering we're moving towards /less/ hard-coded formatting and /more/ control of display in themes. Already in theming we have to wrestle much hard-coded presentation. Does a *stylistic* change in core that doesn't increase the power of theming achieve much of anything? As to the style, I prefer all lower, titles capitalization or all upper. content types (+1 consistency) Content Types (+1 for Titles of Things) CONTENT TYPES (+1 for consistency, -1 for shouting) and not Content types (-1 for ungrammatical application of capitalization since it's not a sentence). See, more difference of opinion. And this should be hard-coded into core? Laura
Laura Scott wrote:
content types (+1 consistency) Content Types (+1 for Titles of Things) CONTENT TYPES (+1 for consistency, -1 for shouting)
and not Content types (-1 for ungrammatical application of capitalization since it's not a sentence).
Whoa, someone who agrees with me. I'd given up on that one. But I'm with Laura.
On Wed, 13 Sep 2006, Laura Scott wrote:
content types (+1 consistency) Content Types (+1 for Titles of Things) CONTENT TYPES (+1 for consistency, -1 for shouting)
and not Content types (-1 for ungrammatical application of capitalization since it's not a sentence).
Laura, whether this is ungrammatical depends on where you live. In Europe, many languages have rules to not capitalize all letters in titles. Since we are dealing with an English application, we should abide to the US or UK conventions. Whether they differ in this aspect, I don't know. Gabor
On 9/13/06, Laura Scott <laura@pingv.com> wrote:
On Sep 13, 2006, at 7:44 AM, Khalid B wrote:
Can we also get feedback from the usability folks on this (Laura? Trae? others?)
This is not a usability issue. It's *almost* personal preference :P
I just wonder if this is appropriate, considering we're moving towards /less/ hard-coded formatting and /more/ control of display in themes. Already in theming we have to wrestle much hard-coded presentation. Does a *stylistic* change in core that doesn't increase the power of theming achieve much of anything?
I saw a comment earlier from Steven saying he and Dries had "decided to implement this". I'd prefer not to spend this cycle dealing with it, but punt to the beginning of the next cycle. I agree with Laura's comment that this doesn't achieve much of anything -- if it's consistently lower case (whether e.e. cummings-style Drupal-ism or not), let's leave it that way. Someone make a locale-pack if they want it a different way. -- Boris Mann Vancouver 778-896-2747 San Francisco 415-367-3595 Skype borismann http://www.bryght.com
On Wed, 13 Sep 2006, Boris Mann wrote:
I'd prefer not to spend this cycle dealing with it, but punt to the beginning of the next cycle. I agree with Laura's comment that this doesn't achieve much of anything -- if it's consistently lower case (whether e.e. cummings-style Drupal-ism or not), let's leave it that way. Someone make a locale-pack if they want it a different way.
No need to make a locale pack, it is too resource intensive for such a simple task. This is a themeing issue. We theme menu items and page titles at weblabor.hu to be uppercase (not relying on CSS, but doing uppercasing in PHP). Default menu link theme function: function theme_menu_item_link($item, $link_item) { return l($item['title'], $link_item['path'], array_key_exists('description', $item) ? array('title' => $item['description']) : array()); } Our menu link theme function: function azigazi_menu_item_link($item, $link_item) { return l(wllib_ucfirst($item['title']), $link_item['path'], array_key_exists('description', $item) ? array('title' => $items['description']) : array()); } Look, it is so easy. Note that this is Drupal 4.6 theme code used on Weblabor.hu. In Drupal 4.7, you have a built in drupal_ucfirst() function to use. The wllib_ucfirst() function is our custom library function for this, but does just the same. To be honest, the above code does not fix lowercase menu items in help text, but it was a nonissue for us. Gabor
Default menu link theme function:
function theme_menu_item_link($item, $link_item) { return l($item['title'], $link_item['path'], array_key_exists('description', $item) ? array('title' => $item['description']) : array()); }
Our menu link theme function:
function azigazi_menu_item_link($item, $link_item) { return l(wllib_ucfirst($item['title']), $link_item['path'], array_key_exists('description', $item) ? array('title' => $items['description']) : array()); }
Look, it is so easy.
gabor - how dare you propose a simple and excellent resolution to our long, boring conversation that will certainly end up with zero implementation. this list will go silent if you keep that up.
Gabor Hojtsy wrote:
On Wed, 13 Sep 2006, Boris Mann wrote: ... function azigazi_menu_item_link($item, $link_item) { return l(wllib_ucfirst($item['title']), $link_item['path'], array_key_exists('description', $item) ? array('title' => $items['description']) : array()); }
Look, it is so easy. Note that this is Drupal 4.6 theme code used on Weblabor.hu. In Drupal 4.7, you have a built in drupal_ucfirst() function to use. The wllib_ucfirst() function is our custom library function for this, but does just the same. This won't work if the menu item is something like "eBay Listings", for example. Sure it's a bit contrived, and wouldn't apply to Drupal's core modules, but it's a legitimate case. The core should not assume that this is a viable solution in all situations.
A different argument is that this requires PHP, yet as people have said, it's a theme issue. For theming customizations, CSS solutions should be preferred over PHP solutions, just to better meet the needs of designers who are less familiar with programming. As has already been pointed out, the CSS facilities aren't nearly smart enough to do capitalization, but they work fine for doing all lowercase or all uppercase. Gary
Boris Mann wrote:
On 9/13/06, Laura Scott <laura@pingv.com> wrote:
On Sep 13, 2006, at 7:44 AM, Khalid B wrote:
Can we also get feedback from the usability folks on this (Laura? Trae? others?)
This is not a usability issue. It's *almost* personal preference :P I disagree.
There's certainly a fair amount of evidence that mixed-case is, in general, easier to read than all upper case, and to a lesser extent, all lower case. While it would be a mistake to assume that data is conclusive for this particular situation (since reading menus or titles isn't the same as reading paragraphs of text), it's also a mistake to say that there are no usability implications. Also, user satisfaction is considered by many to be a usability attribute, or at least something that must concern the people who worry about creating usable interfaces. As you say, this involves personal preference, which is surely a user satisfaction issue. In other words, Drupal should support all variations, and hence the default should be chosen to make such support as simple and as straightforward as possible. To me, that suggests the default (which one way or another is set manually) should be the one that's most difficult to automate, i.e. some popular standard for capitalization of titles. Gary
On Wednesday 13 September 2006 17:23, Gary Feldman wrote:
To me, that suggests the default (which one way or another is set manually) should be the one that's most difficult to automate, i.e. some popular standard for capitalization of titles.
Gary
Which is exactly the problem. "Some popular standard" could mean anything. Not even Americans can agree on what is Correct Title Case(tm) in American English. How do we expect an international community to do so? :-) I see very little gain here for a lot of debate and work. -- Larry Garfield AIM: LOLG42 larry@garfieldtech.com ICQ: 6817012 "If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it." -- Thomas Jefferson
Actually... you've just made the case for NOT doing titles capitalization. ;)
Content Types (+1 for Titles of Things)
"Titles of Things" would become "Titles Of Things," which is wrong. So, let's leave it lowercase: the only fully-consistent, non-shouting format. Others have outlined a plethora of CSS or PHP styling options for whatever output format you're ultimately after. -Angie
Angela Byron wrote:
Actually... you've just made the case for NOT doing titles capitalization. ;)
Content Types (+1 for Titles of Things)
"Titles of Things" would become "Titles Of Things," which is wrong.
So, let's leave it lowercase: the only fully-consistent, non-shouting format. Others have outlined a plethora of CSS or PHP styling options for whatever output format you're ultimately after.
Well actually when you put it that way, 'Titles of Things' is the only one that's right when used as a base, and then if you WANT it lowercase or uppercasing just the first, that's easier to do automatically. But I *can't* get 'titles of things' ==> 'Titles of Things' without writing a smart capitalization parser.
On 9/13/06, Earl Miles <merlin@logrus.com> wrote:
Well actually when you put it that way, 'Titles of Things' is the only one that's right when used as a base, and then if you WANT it lowercase or uppercasing just the first, that's easier to do automatically.
But I *can't* get 'titles of things' ==> 'Titles of Things' without writing a smart capitalization parser.
Totally agreed. -- Greg Knaddison | Growing Venture Solutions Denver, CO | http://growingventuresolutions.com Technology Solutions for Communities, Individuals, and Small Businesses
On 9/13/06, Greg Knaddison - GVS <Greg@growingventuresolutions.com> wrote:
On 9/13/06, Earl Miles <merlin@logrus.com> wrote:
Well actually when you put it that way, 'Titles of Things' is the only one that's right when used as a base, and then if you WANT it lowercase or uppercasing just the first, that's easier to do automatically.
But I *can't* get 'titles of things' ==> 'Titles of Things' without writing a smart capitalization parser.
Totally agreed.
This would be my preference too. Maybe we could setup a poll on drupal.org to get a wider range of opinions? (and avoid a bunch of "me too" messages) andrew
But I *can't* get 'titles of things' ==> 'Titles of Things' without writing a smart capitalization parser. That's a good point and would provide the most flexibility for CSS text transformation. And, I suppose that is the correct US English way for titles of things.
The standard Drupal way for field and fieldset titles is to *just* capitalize the first word. If we go the 'Titles of Things' route, then we should change the field(set) titles standard to use this as well IMHO. Rob Roy Barreca Founder and COO Electronic Insight Corporation http://www.electronicinsight.com rob@electronicinsight.com Earl Miles wrote:
Angela Byron wrote:
Actually... you've just made the case for NOT doing titles capitalization. ;)
Content Types (+1 for Titles of Things)
"Titles of Things" would become "Titles Of Things," which is wrong.
So, let's leave it lowercase: the only fully-consistent, non-shouting format. Others have outlined a plethora of CSS or PHP styling options for whatever output format you're ultimately after.
Well actually when you put it that way, 'Titles of Things' is the only one that's right when used as a base, and then if you WANT it lowercase or uppercasing just the first, that's easier to do automatically.
But I *can't* get 'titles of things' ==> 'Titles of Things' without writing a smart capitalization parser.
After all, you can customize it with locale.module. 2006/9/13, Earl Miles <merlin@logrus.com>:
Angela Byron wrote:
Actually... you've just made the case for NOT doing titles capitalization. ;)
Content Types (+1 for Titles of Things)
"Titles of Things" would become "Titles Of Things," which is wrong.
So, let's leave it lowercase: the only fully-consistent, non-shouting format. Others have outlined a plethora of CSS or PHP styling options for whatever output format you're ultimately after.
Well actually when you put it that way, 'Titles of Things' is the only one that's right when used as a base, and then if you WANT it lowercase or uppercasing just the first, that's easier to do automatically.
But I *can't* get 'titles of things' ==> 'Titles of Things' without writing a smart capitalization parser.
On 9/13/06, Earl Miles <merlin@logrus.com> wrote:
Konstantin Käfer wrote:
After all, you can customize it with locale.module.
Sure, if I'm willing to take the performance hit.
Ditto ... disabling locale on a busy site make a HUGE difference.
I want to encourage the fact to capitalise the mentioned strings! Let's break it now, instead of later.. If you guys need people to help providing patches let me know... Steef
On Sep 13, 2006, at 10:55 AM, Angela Byron wrote:
Actually... you've just made the case for NOT doing titles capitalization. ;)
I was trying rhetorically to make the case to leave things be, including not titles capitalization. I was responding to the stylistic preferences b/c everyone has a preference, which makes the entire discussion rather a distraction for core coding, imho.
Content Types (+1 for Titles of Things)
"Titles of Things" would become "Titles Of Things," which is wrong.
Right. Any function that does not refer to a Manual of Style (Chicago, MLA, whatever) on that would Lead To Errors. Laura
On 13 Sep 2006, at 01:31, Rob Barreca wrote:
Home » Administer » Settings » Content types
instead of
Home » administer » settings » content types
I'm OK with this as long we write 'Content types' and not 'Content Types'. That is, we capitalize the first letter only. I agree with Neil that we should try to do it in one swoop. -- Dries Buytaert :: http://www.buytaert.net/
On 13 Sep 2006, at 9:58 AM, Dries Buytaert wrote:
I'm OK with this as long we write 'Content types' and not 'Content Types'. That is, we capitalize the first letter only. I agree with Neil that we should try to do it in one swoop.
wouldn't this also affect all translation strings ?
On Wed, 13 Sep 2006, adrian rossouw wrote:
On 13 Sep 2006, at 9:58 AM, Dries Buytaert wrote:
I'm OK with this as long we write 'Content types' and not 'Content Types'. That is, we capitalize the first letter only. I agree with Neil that we should try to do it in one swoop.
wouldn't this also affect all translation strings ?
It would. Changing menu item capitalization also affects menu items mentioned in help text. Gabor
Gabor Hojtsy wrote:
On Wed, 13 Sep 2006, adrian rossouw wrote:
On 13 Sep 2006, at 9:58 AM, Dries Buytaert wrote:
I'm OK with this as long we write 'Content types' and not 'Content Types'. That is, we capitalize the first letter only. I agree with Neil that we should try to do it in one swoop.
wouldn't this also affect all translation strings ?
It would. Changing menu item capitalization also affects menu items mentioned in help text.
This is definitely not a change that can be done during code freeze. It would be nice to collect this information in a postponed issue. That might make us remember things like menu item references in help text. -- Neil Drumm http://delocalizedham.com/
Ok, this thread has gone on long enough; it's time for some action: http://drupal.org/node/84146 Here's a start of a patch. Hopefully those who brought this issue up in the first place can now take it home. -Angie
participants (26)
-
adrian rossouw -
Alex Cochrane -
andrew morton -
Angela Byron -
Arnab Nandi -
Boris Mann -
Chris Johnson -
Dries Buytaert -
Earl Miles -
Farsheed -
Fernando Silva -
Gabor Hojtsy -
Gary Feldman -
Greg Knaddison - GVS -
Jason Flatt -
Khalid B -
Konstantin Käfer -
Larry Garfield -
Laura Scott -
Moshe Weitzman -
Neil Drumm -
Rob Barreca -
Rowan Kerr -
Stefan Nagtegaal -
Steven Wittens -
Syscrusher