There are several things that would need to be fixed before we are going to release drupal 4.4. One of that is proper translation..

- The basic roles 'Anonymous user'/'Anonymous' & 'Authenticated user' aren't translatable on the following places (admin >> users / admin >> users >> roles / admin >> users >> permission / )

Comments

killes@www.drop.org’s picture

Title: Translation issues » make standard roles translatable

Changing title.

Stefan Nagtegaal’s picture

Component: base system » user system
Priority: Normal » Critical

This is still a problem.. The default roles 'Anonymous user' and 'Authenticated user' can not be translated.

axel’s picture

But why this bug is critical? Drupal works on such manner long time. This bug don't prevent Drupal to work. I think priority of this bug must be set as 'normal', but not 'critical'.

moshe weitzman’s picture

Category: bug » feature
Priority: Critical » Normal
ñull’s picture

I would say either committed to multilingual / localization or not. Calling it a feature seems to say "translation has a low priority". When that is the case, why all the trouble to localize? Jus drop localization and make life easier!

All depends on the chosen concept of Drupal. If you choose Drupal to be multilingual / localized, then this is definitely is a bug. You cannot expect a non-english speaker to understand these special users.

What happens when I just translate them in table role? Would it break Drupal?

schalker’s picture

As I can tell, standard roles still can not be translated. Is this correct? Is there a work-around or some plan to implement this?

I'd agree with the former poster com2 that this is more a bug than a feature request: I love the locale module, but I cannot see a reason why almost everything is translateable, but not the standard roles. If there is no reason for this behaviour from a user-point-of-view, then this is a bug, I'd say.

schalker’s picture

Category: feature » bug

Sorry, it's me again. I searched on and on to find a similar bug report, but I haven't found one. So as two people think this is a bug, I change the category of this issue back to "bug report".

Cvbge’s picture

Status: Active » Needs review
StatusFileSize
new1.84 KB

Patch not tested, but it's quite simple. I'd like to hear some thoughts about t()ing default roles (anonymous and authenticated user).

Cvbge’s picture

Status: Needs review » Needs work

Ok, this won't work, because roles are selected from db when put on admin/access.

The only way I see to solve this (although it's still not clean) is to
a) make default roles editable (so user can change the 'anonymous user' to something else), but not deletable
b) make sure anon user and auth user have static id
c) do not check in code for name, but for role id

Need to think about it...

Stefan Nagtegaal’s picture

Indeed Cvbge.. Even in the latest CVS version 24-08-2005 this is still an issue..
It's the last 2 strings which could not be properly translated which really frustrates me, and hopefully other users..

Probably we can fix this issue when adding id's to the roles? Or by defining them as constants?

DEFINE('ANONYMOUS_USER', t('Anonymous user'));
DEFINE('AUTHENTICATED_USER', t('Authenticated user'));

The pro's of the defined constants method is that we can also get rid of the 'Anonymous user'-option on the settings page, because it becomes translatable..

What do you think, will this work?

killes@www.drop.org’s picture

Assigned: Unassigned » killes@www.drop.org
Status: Needs work » Needs review
StatusFileSize
new1.65 KB

Here is a new attempt at this. Thanks to Moshe's patch this is now easy.

Stefan Nagtegaal’s picture

Status: Needs review » Reviewed & tested by the community

Easy as peanutbutter!

Sorry Killes, I promissed todo this myself, but the lack of time held me away from this..

You rock! Thanks..

this is definitaly Ready To be committed!

dries’s picture

Status: Reviewed & tested by the community » Needs work

Another patch invalidated this patch. Should be easy to fix. Thanks.

killes@www.drop.org’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new1.81 KB

Updated. Also initialize user->roles

killes@www.drop.org’s picture

Status: Reviewed & tested by the community » Needs work

Doesn't work as is.

t() is not available so early in the request.

chx’s picture

Title: make standard roles translatable » make standard roles and user names translatable

markus reports http://drupal.org/node/48198 that anonymous user name should be translatable. I think the two is so closely related that you need to roll them into one patch.

markus_petrux’s picture

Though, while thinking how to translate roles (not easy atm, 'cause they are used before t() is ready), 'Anonymous' translation could be fixed.

Both are different things that may probably end up solved through 2 different patches. That's why I opened the other issue. You could focus on fixing the roles translation problem here.

killes@www.drop.org’s picture

Title: make standard roles and user names translatable » make standard roles translatable
Status: Needs work » Needs review
StatusFileSize
new1.42 KB

The anon user name is different as there is a variable to change it.

Anyway, here is a new patch for the roles. It translates on output. extractor.php probably needs to be changed to add appropriate strings to user-module.pot.

drumm’s picture

Status: Needs review » Needs work

It seems like this technique requires hunting for every place we output the roles. Why not translate them in user_roles() and user_load()?

dmitrig01’s picture

Version: x.y.z » 6.x-dev
Component: user system » language system
gábor hojtsy’s picture

Drumm has a point here. Why can't we centralize the translation of these roles?

gábor hojtsy’s picture

Title: make standard roles translatable » Make standard roles translatable
Version: 6.x-dev » 7.x-dev
Category: bug » task

Moving to D7.

gpk’s picture

Version: 7.x-dev » 6.x-dev
Status: Needs work » Closed (duplicate)

I think this is a dupe of #18954: "anonymous user" and "authenticated user" are not translateable that was fixed in Jan 2008.