Closed (fixed)
Project:
Buddylist
Version:
5.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Aug 2007 at 12:59 UTC
Updated:
25 Sep 2007 at 20:01 UTC
Jump to comment: Most recent file
The following message string:
You haven't made any @buddies, yet.
You can add a @buddy by visiting a user's profile page.
is not translatable.
This string is provided in buddylist.module, line 1717-1723.
The providing function buddylist_empty_text_default() seems to be not ok.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | buddylist_default_text_163947.patch | 2.13 KB | dldege |
Comments
Comment #1
dldege commentedThe issue here is that the default message gets translated and then stored into the variables table. Its not translated dynamically. If you want to change it, simply put your translated text into the text area on the buddylist settings page.
OR
you have to clear that variable from the variables table, change your translation words, then revisit the buddylist settings page so that the default string gets the new substitutions.
It might be considered that the untranslated string should be stored in the variables table. I'll see what the other maintainers think about that.
Comment #2
haus commentedThanks very much for your quick reply.
Yes, your suggestion above works for now.
But how can I do it for a multi lingual site?
Comment #3
dldege commentedYou can't - which is why I think we need to change how this written. I'm hoping for feedback from other maintainers but I think that the solution is to store the template in variables and then translate it when used
For example,
Current way ...
Proposed way ...
We'd need to just change a couple lines to make this work.
Comment #4
dldege commentedAre you up for creating a patch for this?
Comment #5
haus commentedThanks for your quick reply, again.
I'm afraid that I will not be able to supply a path because I'm not familiar with Drupal-conform programming. I'm just learning, asking and trying to get my site to do what I want.
Therefore I will only be able to change the message texts by using the admin page.
Comment #6
dldege commentedOK, no problem - I'll fix this as soon as I talk it over with the other developers.
Comment #7
yngens commentedThe same problem with 'You currently do not have any pending buddies requests from other users.' and 'You do not have any pending buddies requests that you have made.' on /buddylist/user/buddies/requests
I tried the above suggested methods. It helped with 'You haven't made any @buddies, yet.', but not with these two strings.
Comment #8
dldege commentedThis would be a slightly different issue where the strings used in the module are missing the translation support needed to convert buddy and buddies. If you can look at give me some line numbers that would be quite helpful.
You'll be looking at the various drupal_set_message() calls in the code and whenever you want buddy/buddies translated it should be @buddy or @buddies and inside a call to the t() function.
Comment #9
yngens commentedIt is line 847:
It correctly gives !someone, but can not find the words in between (currently, not have any pending, requests from other users) in localization module. I tried different ways of putting t( but unfortunately could not figure out the right way.
Comment #10
dldege commentedPlease submit a new issue for this other problem - this issue will only address the problem with
buddylist_empty_text_default()Comment #11
dldege commentedHere is a patch for this made against the current DRUPAL-5 head version of the module.
Please test and report back your outcome.
Thanks.
Comment #12
yngens commentedIt works, but it is extremely hard to translate into other languages with structures not similar to English. I think it would be much better if you would leave buddies not separately translatable, but together with a string. Anyway, I worked my way out. Thank you very much!
Comment #13
dldege commentedCould you please elaborate - I don't follow. The string is user settable and run through the t() function so I don't see why its not translatable in other languages. I don't have any real experience with doing translations so I apologize for my lack of understanding.
Comment #14
yngens commentedThe structure of the sentences in other languages can be very different or even opposite to English. And sometimes with an order of expressions (words) defined in original code it is real headache to provide sounding translation. The problem with @buddies arises not only with regard to sentence structure, but also with applying different grammatic cases. For example, simple English word "buddies" in Russian will have different forms in different cases:
buddies - друзья (who?), друзей (from whom?), друзьям (to whom?), друзьями (with whom), etc. And it is just impossible to translate one word (as it is suggested now in the module) for it to fit to every different case. That is why I believe that @buddies and other strings that might have different cases in other languages should not be translated separately, but together with the whole expressions.
Anyway, as I said before now it is, at least, possible to translate. Thank you very much!
Comment #15
dldege commentedThanks for the details. I understand what you mean know. That problem happens even in English - for example I used member/members for buddy/buddies and you get sentences that don't make sense like "Contgratulations, Joe is now your member".
I hope to do more work on how the message confirmations and the strings are handled to address this and other issues.
I've committed this patch though to fix this particular issue.
Comment #16
(not verified) commented