Unify group translations under same key.

This commit is contained in:
Guo Xiang Tan 2016-12-07 14:56:45 +08:00
parent c3b04c3054
commit b5cc5a6fb1
7 changed files with 49 additions and 44 deletions

View File

@ -4,15 +4,15 @@
{{#if model.automatic}}
<h3>{{model.name}}</h3>
{{else}}
<label for="name">{{i18n 'group.name'}}</label>
{{text-field name="name" value=model.name placeholderKey="group.name_placeholder"}}
<label for="name">{{i18n 'groups.name'}}</label>
{{text-field name="name" value=model.name placeholderKey="groups.name_placeholder"}}
{{/if}}
</div>
{{#if model.id}}
{{#unless model.automatic}}
<div>
<label for="bio">{{i18n 'group.bio'}}</label>
<label for="bio">{{i18n 'groups.bio'}}</label>
{{d-editor value=model.bio_raw}}
</div>
@ -63,12 +63,19 @@
</div>
{{#unless model.automatic}}
<div>
<label for="primary_group">
{{input type="checkbox" checked=model.primary_group}}
{{i18n 'admin.groups.primary_group'}}
</label>
</div>
<div>
<label for="primary_group">
{{input type="checkbox" checked=model.primary_group}}
{{i18n 'admin.groups.primary_group'}}
</label>
</div>
<div>
<label>
{{input type="checkbox" checked=model.public}}
{{i18n 'groups.public'}}
</label>
</div>
{{/unless}}
<div>

View File

@ -45,6 +45,6 @@ export default Ember.Component.extend({
@computed('flairPreviewImage')
flairPreviewLabel(flairPreviewImage) {
const key = flairPreviewImage ? 'image' : 'icon';
return I18n.t(`group.flair_preview_${key}`);
return I18n.t(`groups.flair_preview_${key}`);
}
});

View File

@ -1,31 +1,31 @@
<div class="group-flair-left">
<div>
<label for="flair_url">{{i18n 'group.flair_url'}}</label>
<label for="flair_url">{{i18n 'groups.flair_url'}}</label>
{{text-field name="flair_url"
value=model.flair_url
placeholderKey="group.flair_url_placeholder"}}
placeholderKey="groups.flair_url_placeholder"}}
</div>
<div>
<label for="flair_bg_color">{{i18n 'group.flair_bg_color'}}</label>
<label for="flair_bg_color">{{i18n 'groups.flair_bg_color'}}</label>
{{text-field name="flair_bg_color"
class="group-flair-bg-color"
value=model.flair_bg_color
placeholderKey="group.flair_bg_color_placeholder"}}
placeholderKey="groups.flair_bg_color_placeholder"}}
</div>
{{#if flairPreviewIcon}}
<div>
<label for="flair_color">{{i18n 'group.flair_color'}}</label>
<label for="flair_color">{{i18n 'groups.flair_color'}}</label>
{{text-field name="flair_color"
class="group-flair-color"
value=model.flair_color
placeholderKey="group.flair_color_placeholder"}}
placeholderKey="groups.flair_color_placeholder"}}
</div>
{{/if}}
<div>
<strong>{{i18n 'group.flair_note'}}</strong>
<strong>{{i18n 'groups.flair_note'}}</strong>
</div>
</div>

View File

@ -9,13 +9,13 @@
{{d-button action="leaveGroup"
class="btn-danger group-index-leave"
icon="minus"
label="group.leave"
label="groups.leave"
disabled=updatingMembership}}
{{else}}
{{d-button action="joinGroup"
class="group-index-join"
icon="plus"
label="group.join"
label="groups.join"
disabled=updatingMembership}}
{{/if}}
{{/if}}

View File

@ -23,7 +23,7 @@
{{#if canEditGroup}}
<span class="group-edit">
{{d-button action="showGroupEditor" label="group.edit.title" class="group-edit-btn" icon="pencil"}}
{{d-button action="showGroupEditor" label="groups.edit.title" class="group-edit-btn" icon="pencil"}}
</span>
{{/if}}
</div>

View File

@ -1,16 +1,16 @@
{{#d-modal-body title="group.title" class="edit-group groups"}}
{{#d-modal-body title="groups.edit.title" class="edit-group groups"}}
<form class="form-horizontal">
<label for='title'>{{i18n 'group.title'}}</label>
<label for='title'>{{i18n 'groups.edit.group_title'}}</label>
{{input type='text' name='title' value=model.title class='edit-group-title'}}
<label for='bio'>{{i18n 'group.bio'}}</label>
<label for='bio'>{{i18n 'groups.bio'}}</label>
{{d-editor value=model.bio_raw class="edit-group-bio"}}
{{group-flair-inputs model=model}}
<label>
{{input type='checkbox' checked=model.public class="edit-group-public"}}
{{i18n 'group.public'}}
{{i18n 'groups.public'}}
</label>
</form>
{{/d-modal-body}}

View File

@ -376,6 +376,11 @@ en:
other: "%{count} users"
groups:
edit:
title: 'Edit Group'
group_title: 'Title'
name_placeholder: "Group name, no spaces, same as username rule"
public: "Allow users to join/leave the group freely"
empty:
posts: "There is no post by members of this group."
members: "There is no member in this group."
@ -383,6 +388,10 @@ en:
messages: "There is no message for this group."
topics: "There is no topic by members of this group."
add: "Add"
join: "Join Group"
leave: "Leave Group"
name: "Name"
bio: "About Group"
selector_placeholder: "Add members"
owner: "owner"
visible: "Group is visible to all users"
@ -421,6 +430,15 @@ en:
muted:
title: "Muted"
description: "You will never be notified of anything about new topics in this group."
flair_url: "Avatar Flair Image"
flair_url_placeholder: "(Optional) Image URL or Font Awesome class"
flair_bg_color: "Avatar Flair Background Color"
flair_bg_color_placeholder: "(Optional) Hex color value"
flair_color: "Avatar Flair Color"
flair_color_placeholder: "(Optional) Hex color value"
flair_preview_icon: "Preview Icon"
flair_preview_image: "Preview Image"
flair_note: "Note: Flair will only show for a user's primary group."
user_action_groups:
"1": "Likes Given"
@ -1845,26 +1863,6 @@ en:
title: "Show the raw source diffs side-by-side"
button: '<i class="fa fa-columns"></i> Raw'
group:
edit:
title: 'Edit Group'
join: "Join Group"
leave: "Leave Group"
title: 'Title'
name: "Name"
bio: "About Group"
public: "Allow users to join/leave the group freely"
name_placeholder: "Group name, no spaces, same as username rule"
flair_url: "Avatar Flair Image"
flair_url_placeholder: "(Optional) Image URL or Font Awesome class"
flair_bg_color: "Avatar Flair Background Color"
flair_bg_color_placeholder: "(Optional) Hex color value"
flair_color: "Avatar Flair Color"
flair_color_placeholder: "(Optional) Hex color value"
flair_preview_icon: "Preview Icon"
flair_preview_image: "Preview Image"
flair_note: "Note: Flair will only show for a user's primary group."
category:
can: 'can&hellip; '
none: '(no category)'