Text glitch on group admin page

Update: [PR pending]

When logged in as admin, I see “enter username” on the group editor, but when logged in as a non-admin member, I see “[en.admin.groups.selector_placeholder]”:

15

I’ll see if I can create a PR to fix this - I’m assuming that customised text with “admin.” prefix is not available to non-admin clients.

1 Like

I have created a PR with a fix:

https://github.com/discourse/discourse/pull/5473

11 Likes

One odd thing here @eviltrout is that we have admin client localization file but do not have moderator client localization file. Would make sense either to centralize so we have “staff” client/server locale files, or split so there is both admin and moderator stuff.

2 Likes

I’ve always thought of the admin locale as “admin section” so it should apply to moderators too. I’m happy to rename it to staff if that makes it more clear. Either way if you are on an /admin path it should be loaded.

2 Likes

Hmm :thinking: so how is this bug possible?

It should be loaded but perhaps it is currently not.

It may be the path?

I see the missing translation on my localhost “goodguys” group when logged in as the non-Staff group owner.

http://localhost/groups/goodguys/edit

The “Add Members” input.

<input name="user-selector-renamed" 
 placeholder="[en.admin.groups.selector_placeholder]" 
 id="member-selector" class="ember-text-field ember-view" 
 style="width: 150px;" type="text"> 

These two are OK

<input name="flair_url" placeholder="(Optional) Image URL or Font Awesome class" id="ember1637" 
 class="ember-text-field ember-view" type="text"> 
<input name="flair_bg_color" placeholder="(Optional) Hex color value" id="ember1638" 
 class="group-flair-bg-color ember-text-field ember-view" type="text"> 
2 Likes

OH I just reviewed this again and think the change is correct (thought the github diff makes it very hard to understand)

What is happening is that you have a non staff group owner and need to allow the public group edit tab to work. It was sharing locale stuff with the staff locale file so it clearly fails.

@tgxworld can you review this and perhaps clean it up.

What we want to make sure is that we don’t have duplicate strings in admin/non-admin and duplicate templates here.

2 Likes

Fixed in

https://github.com/discourse/discourse/commit/3e1afbedc521a6687a9575b4319b821ada7f3bd1

8 Likes