Closed (fixed)
Project:
Availability Calendars
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
15 Jul 2009 at 18:49 UTC
Updated:
15 Aug 2009 at 05:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
nicholas.alipaz commentedattaching patch.
Additionally see a running version of this patch here:
http://sorkbeachrentals.regencyweb.info/lower-unit-availability.html
Comment #2
nicholas.alipaz commentedAny testers for this? I did a lot of work on it and was hoping for any input on the changes.
Comment #3
avpadernoComment #4
geodaniel commentedThanks for the patch. I've tried it out a little, and generally I'd say it looks good, though I have two comments about it. First, great that there is a key generated by the module now, but I'm not sure I'd always want it grouped in with the calendars, so could this perhaps be made into a block? Second, I don't think we can just wrap the single letter representations for days in the t() function, as they won't be properly translatable like that (e.g. T could be Tuesday or Thursday).
Comment #5
avpadernoAlso, the letter T is always the letter T in all the languages that use the Latin alphabet; it's more probable you are interested in translating the week days.
Comment #6
nicholas.alipaz commentedThat sounds reasonable. what about doing something like
Then just doing something like:
That would get us the first letter and allow for better translation. If you like it then I can repatch later this week.
For the key, that is a nice idea for adding it to a block, but I still think the option to include it within the page is nice too. Perhaps we could leave it there with the flag for turning it off/on of course. Then we could add an option for a block in a future change?
Let me know what you guys think.
Comment #7
avpadernoThat would not actually work for languages like Hebrew, Chinese; doing like you suggest, you will get the last character of the word, not the first (the last character because they write from right to left).
A better way is to use the short name of the week day ("Mon", "Tue", "Wed"); in this way, who translates the module understand what the words to translate are, and he will translate them correctly (in example, in Italian they become "Lun", "Mar", "Mer").
Comment #8
nicholas.alipaz commentedhhmm, I kind of wondered about that when I wrote it... I will think some more.
Comment #9
nicholas.alipaz commentedAnother option would be to use the first three letters as the archive module does:
http://drupal.org/files/issues/archieve.JPG
Comment #10
avpadernoIt still preferable to let the translator people decide the short name of the week days; in reference to languages like Hebrew, it's not possible to programmatically get a valid abbreviation for the week days.
What the module does is to use a function call like
t('Mon').Comment #11
nicholas.alipaz commentedActually, what you said is exactly what I am suggesting. Just use
t('Mon')as the header then let translators do what they like. no substr() parsing or anything.Comment #12
avpadernoI didn't correctly understand what you mean by "to use the first three letters".
What you suggested is the only way to proceed, I think.
Comment #13
nicholas.alipaz commentedOk, glad we agree, I will repatch that part. Do you or anyone have any input on the suggestion regarding the key as Dan mentioned?
Comment #14
avpadernoI actually didn't understand that reference to a key; I would be glad to give a suggestion, if somebody would tell me what it is exactly. :-)
Comment #15
nicholas.alipaz commentedTake a look at http://sorkbeachrentals.regencyweb.info/lower-unit-availability.html
Notice the "Key" (also known as a "Legend" to some folks), Dan is suggesting it not be listed within the area for the calendars. Put it in a block instead.
My opinion differs in that I think the option to show it among the calendars should remain, but the addition of a block should be an added feature. Of course the node edit form contains a flag to turn this key on/off on a per node basis.
Thanks.
Comment #16
avpadernoIn cases like this one, it is better to let the users decide what they like better.
I would add a setting so the user can decide if the key must appear or not, and I would also add a block for the key.
Comment #17
nicholas.alipaz commentedOK, I agree and that is precisely what I had suggested. I am going to open another issue for adding that feature. I will not be adding it in this patch, it is too large as is.
Comment #18
avpadernoIt is also better to keep feature requests separated.
Comment #19
nicholas.alipaz commentedIssue fixed. The changes have been commited (guess I didn't need the brackets in the commit :blush:):
http://drupal.org/cvs?commit=245738
I promise future changes will be better separated.
Comment #20
nicholas.alipaz commentedmarking fixed