Dear folks,
I want to share my thoughts about the folder name abbreviation in the folder list. I am new out here, so bear with me.
I really dislike the abbreviation of folder names. I also don't understand why abbreviation is necessary. I can understand the abbreviation if the folder list has a fixed width. But since you can move the splitter at your convenience to show more of the folder names, I don't see why the folder names are abbreviated. Could it be a remnant of the past?
If I understand the information from http://trac.roundcube.net/ correctly the abbreviation was added as early as changeset 38 in October 2005. The vertical splitter seems to be added with changeset 1766 in September 2008. Doesn't the vertical splitter make abbreviation unnecessary?
list. At least make it optional for people who really dislike it (like me).
Looking at the tracker site I noticed some things I want to share also.
folder list from 16 to 25. But only for "Message mode" (when an e-mail was opened)! When you go back to the message list you will see the folder names get shortened! It seems like it was forgotten to change the maximum length in skins\default\templates\mail.html also.
as changeset 37. The used algorithm has not changed since then but it is totally bogus! The function does not shorten the string in the exact middle and the function makes the string two characters longer than the allowed maximum length!
The algorithm would only work if the place holder for the removed part is only one character. I suggest to change the function into something like this (untested!):
function abbreviate_string($str, $maxlength, $place_holder='...') { $length = mb_strlen($str);
if ($length > $maxlength) { $place_holder_length = mb_strlen($place_holder); $first_part_length = floor(($maxlength - $place_holder_length) / 2); $second_starting_location = $length - $maxlength + $first_part_length
mb_substr($str, $second_starting_location); }
return $str; }
I also wonder if the place holder "..." is a candidate for localization.
Thanks for your attention.
White _______________________________________________ List info: http://lists.roundcube.net/dev/