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}} {{#if model.automatic}}
<h3>{{model.name}}</h3> <h3>{{model.name}}</h3>
{{else}} {{else}}
<label for="name">{{i18n 'group.name'}}</label> <label for="name">{{i18n 'groups.name'}}</label>
{{text-field name="name" value=model.name placeholderKey="group.name_placeholder"}} {{text-field name="name" value=model.name placeholderKey="groups.name_placeholder"}}
{{/if}} {{/if}}
</div> </div>
{{#if model.id}} {{#if model.id}}
{{#unless model.automatic}} {{#unless model.automatic}}
<div> <div>
<label for="bio">{{i18n 'group.bio'}}</label> <label for="bio">{{i18n 'groups.bio'}}</label>
{{d-editor value=model.bio_raw}} {{d-editor value=model.bio_raw}}
</div> </div>
@ -69,6 +69,13 @@
{{i18n 'admin.groups.primary_group'}} {{i18n 'admin.groups.primary_group'}}
</label> </label>
</div> </div>
<div>
<label>
{{input type="checkbox" checked=model.public}}
{{i18n 'groups.public'}}
</label>
</div>
{{/unless}} {{/unless}}
<div> <div>

View File

@ -45,6 +45,6 @@ export default Ember.Component.extend({
@computed('flairPreviewImage') @computed('flairPreviewImage')
flairPreviewLabel(flairPreviewImage) { flairPreviewLabel(flairPreviewImage) {
const key = flairPreviewImage ? 'image' : 'icon'; 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 class="group-flair-left">
<div> <div>
<label for="flair_url">{{i18n 'group.flair_url'}}</label> <label for="flair_url">{{i18n 'groups.flair_url'}}</label>
{{text-field name="flair_url" {{text-field name="flair_url"
value=model.flair_url value=model.flair_url
placeholderKey="group.flair_url_placeholder"}} placeholderKey="groups.flair_url_placeholder"}}
</div> </div>
<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" {{text-field name="flair_bg_color"
class="group-flair-bg-color" class="group-flair-bg-color"
value=model.flair_bg_color value=model.flair_bg_color
placeholderKey="group.flair_bg_color_placeholder"}} placeholderKey="groups.flair_bg_color_placeholder"}}
</div> </div>
{{#if flairPreviewIcon}} {{#if flairPreviewIcon}}
<div> <div>
<label for="flair_color">{{i18n 'group.flair_color'}}</label> <label for="flair_color">{{i18n 'groups.flair_color'}}</label>
{{text-field name="flair_color" {{text-field name="flair_color"
class="group-flair-color" class="group-flair-color"
value=model.flair_color value=model.flair_color
placeholderKey="group.flair_color_placeholder"}} placeholderKey="groups.flair_color_placeholder"}}
</div> </div>
{{/if}} {{/if}}
<div> <div>
<strong>{{i18n 'group.flair_note'}}</strong> <strong>{{i18n 'groups.flair_note'}}</strong>
</div> </div>
</div> </div>

View File

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

View File

@ -23,7 +23,7 @@
{{#if canEditGroup}} {{#if canEditGroup}}
<span class="group-edit"> <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> </span>
{{/if}} {{/if}}
</div> </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"> <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'}} {{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"}} {{d-editor value=model.bio_raw class="edit-group-bio"}}
{{group-flair-inputs model=model}} {{group-flair-inputs model=model}}
<label> <label>
{{input type='checkbox' checked=model.public class="edit-group-public"}} {{input type='checkbox' checked=model.public class="edit-group-public"}}
{{i18n 'group.public'}} {{i18n 'groups.public'}}
</label> </label>
</form> </form>
{{/d-modal-body}} {{/d-modal-body}}

View File

@ -376,6 +376,11 @@ en:
other: "%{count} users" other: "%{count} users"
groups: 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: empty:
posts: "There is no post by members of this group." posts: "There is no post by members of this group."
members: "There is no member in this group." members: "There is no member in this group."
@ -383,6 +388,10 @@ en:
messages: "There is no message for this group." messages: "There is no message for this group."
topics: "There is no topic by members of this group." topics: "There is no topic by members of this group."
add: "Add" add: "Add"
join: "Join Group"
leave: "Leave Group"
name: "Name"
bio: "About Group"
selector_placeholder: "Add members" selector_placeholder: "Add members"
owner: "owner" owner: "owner"
visible: "Group is visible to all users" visible: "Group is visible to all users"
@ -421,6 +430,15 @@ en:
muted: muted:
title: "Muted" title: "Muted"
description: "You will never be notified of anything about new topics in this group." 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: user_action_groups:
"1": "Likes Given" "1": "Likes Given"
@ -1845,26 +1863,6 @@ en:
title: "Show the raw source diffs side-by-side" title: "Show the raw source diffs side-by-side"
button: '<i class="fa fa-columns"></i> Raw' 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: category:
can: 'can&hellip; ' can: 'can&hellip; '
none: '(no category)' none: '(no category)'