Merge pull request #2767 from gschlager/i18n_fix04
FIX: Some default group names could not be translated
This commit is contained in:
commit
563a313179
|
@ -46,7 +46,7 @@ Discourse.DiscoveryCategoriesRoute = Discourse.Route.extend(Discourse.OpenCompos
|
|||
actions: {
|
||||
createCategory: function() {
|
||||
Discourse.Route.showModal(this, 'editCategory', Discourse.Category.create({
|
||||
color: 'AB9364', text_color: 'FFFFFF', group_permissions: [{group_name: 'everyone', permission_type: 1}],
|
||||
color: 'AB9364', text_color: 'FFFFFF', group_permissions: [{group_name: I18n.t('category.everyone_permission'), permission_type: 1}],
|
||||
available_groups: Discourse.Site.current().group_names,
|
||||
allow_badges: true
|
||||
}));
|
||||
|
|
|
@ -70,10 +70,6 @@ class Group < ActiveRecord::Base
|
|||
group.save!
|
||||
end
|
||||
|
||||
# the everyone group is special, it can include non-users so there is no
|
||||
# way to have the membership in a table
|
||||
return group if name == :everyone
|
||||
|
||||
group.name = I18n.t("groups.default_names.#{name}")
|
||||
|
||||
# don't allow shoddy localization to break this
|
||||
|
@ -82,6 +78,13 @@ class Group < ActiveRecord::Base
|
|||
group.name = name
|
||||
end
|
||||
|
||||
# the everyone group is special, it can include non-users so there is no
|
||||
# way to have the membership in a table
|
||||
if name == :everyone
|
||||
group.save!
|
||||
return group
|
||||
end
|
||||
|
||||
# Remove people from groups they don't belong in.
|
||||
#
|
||||
# BEWARE: any of these subqueries could match ALL the user records,
|
||||
|
|
|
@ -1265,6 +1265,7 @@ en:
|
|||
allow_badges_label: "Allow badges to be awarded in this category"
|
||||
edit_permissions: "Edit Permissions"
|
||||
add_permission: "Add Permission"
|
||||
everyone_permission: "everyone"
|
||||
this_year: "this year"
|
||||
position: "position"
|
||||
default_position: "Default Position"
|
||||
|
|
|
@ -120,14 +120,15 @@ en:
|
|||
errors:
|
||||
can_not_modify_automatic: "You can not modify an automatic group"
|
||||
default_names:
|
||||
everyone: "everyone"
|
||||
admins: "admins"
|
||||
moderators: "moderators"
|
||||
staff: "staff"
|
||||
trust_level_0: "trust_level_0"
|
||||
trust_level_1: "trust_level_1"
|
||||
trust_level_2: "trust_level_2"
|
||||
trust_level_3: "trust_level_3"
|
||||
trust_level_4: "trust_level_4"
|
||||
trust_level_5: "trust_level_5"
|
||||
|
||||
education:
|
||||
until_posts:
|
||||
|
|
Loading…
Reference in New Issue