Closed (fixed)
Project:
Heartbeat
Version:
6.x-4.11
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Dec 2010 at 13:39 UTC
Updated:
26 Jul 2011 at 11:43 UTC
Jump to comment: Most recent file
Hi,
if not fixed meanwhile, there is the translation of the merge_end_separator / merge_separator missing.
At least the " and " in merge_end_separator needs to be translated ;-)
I found no issue for that, so I guess there is no improvement since 6.x-4.10.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | patch-1007520.patch | 8.92 KB | Stalski |
Comments
Comment #1
TS79 commented... may be some addtional bool settings: merge_end_separator_translation / merge_separator_translation
are benefitial to avoid, that a simple comma (eg. ", ") gets added to translateable strings.
So translated string only has to be used, if these settings are set to TRUE, otherwise current implementation should be used without any translation...
Comment #2
Stalski commenteda regular expression checking if a word is alfanumeric or something, could make this work in general.
Comment #3
TS79 commentedright, the reguar expression is a smart and efficient solution
Comment #4
TS79 commentedwhat about separators like single tags (eg "<br />")?Comment #5
Stalski commentedcommitted to be tested!!
The br is a good point. I will wrap it further with html entities so they are dropped out first.
Comment #6
TS79 commentedTranslation works so far.
But messages with transletable concat-args now aleays appear as overwritten (with "revert" link) at /admin/build/heartbeat/list.
Comment #7
Stalski commentedThat problem does not exist here.
For the other things, they will be included in next commit and release.
Comment #8
Stalski commentedComment #9
TS79 commentedAnother issue I recognised with these 2 seperators.
The spaces before should be left away.
2 Examples for a grouped message with the separators I applied in brackets:
"Some user changed their profile pictures:
User1 [,] User2 [and] User3"
"Some user changed their profile pictures:
User1 [,] User2 [and] 5 more"
I think the spaces, which are not included into the seperators can be eliminated completely.
At least the spaces before merge_seperator have to be eliminated.
Now the 2 examples without any spaces, but a little bit extended separators:
"Some user changed their profile pictures:
User1[, ]User2[and ]User3"
"Some user changed their profile pictures:
User1[, ]User2[and ]5 more"
I think grammar can be applied correct in this way. The advantage of this implementation is, that if you want to show some thumbnail user-pictures instead as grouped variable, you set all seperators to an empty string, add a little maring to the pics and get a listing like on Facebook:
"Some users changed their profile pictures:
Picture1|Picture2|5 more"
The affected code:
Comment #10
TS79 commentedSorry, I did not expect your fix some minutes before submission :)
Comment #11
Stalski commentedI know that, but i will not fix that. All people that have it installed now, will loose there separators and their sites would be screwed. I will not provide a update path for this that runs through all the message templates to override them "where in some cases the script might screw up things".
So that is something for drupal7 i will fix, but not in drupal6. It just would break too much.
Comment #12
TS79 commentedyes, i know about the upgrade path problem.
concerning the overwrite problem i posted for the messages, you are right. i needed to export them to include the two new parameter into message config.
so finally there is only one message left with status overwritten: heartbeat_add_comment. i think message definition in heartbeat_heartbeat_message_info() has to be actualized as well.
Comment #13
TS79 commentedthe exported message with the 2 new attributes:
Comment #14
Stalski commentedFixed and committed.
Comment #15
Stalski commentedComment #16
TS79 commentedsince you changed somethings for separation parsing, there is now the need to export the other messages in heartbeat_heartbeat_message_info() as well. this integrates the new two attributes to them. at the moment all message except the one in last comment (heartbeat_add_comment) are shown as revertable in message list.
Comment #17
rburgundy commentedsubscribing
Comment #18
Stalski commentedI reverted so there are no _t variables in the export. You can always create the changed and configured templates as features or use your own templates that do have them.
I skipped the check on merge_seperator_t.
Imo, the default is best as it is now. Most sites are not translatable and the changes are to big to other users.