1
0
mirror of https://github.com/flarum/core.git synced 2025-10-13 07:54:25 +02:00

Merge pull request #575 from dcsjapan/admin-string-extraction

This commit is contained in:
Toby Zerner
2015-10-14 14:43:45 +10:30
11 changed files with 85 additions and 81 deletions

View File

@@ -28,7 +28,7 @@ export default class EditGroupModal extends Modal {
style: {backgroundColor: this.color()}
}) : '',
' ',
this.namePlural() || 'Create Group'
this.namePlural() || app.trans('core.admin.edit_group_title')
];
}
@@ -37,7 +37,7 @@ export default class EditGroupModal extends Modal {
<div className="Modal-body">
<div className="Form">
<div className="Form-group">
<label>Name</label>
<label>{app.trans('core.admin.edit_group_name_label')}</label>
<div className="EditGroupModal-name-input">
<input className="FormControl" placeholder="Singular (e.g. Mod)" value={this.nameSingular()} oninput={m.withAttr('value', this.nameSingular)}/>
<input className="FormControl" placeholder="Plural (e.g. Mods)" value={this.namePlural()} oninput={m.withAttr('value', this.namePlural)}/>
@@ -45,14 +45,14 @@ export default class EditGroupModal extends Modal {
</div>
<div className="Form-group">
<label>Color</label>
<label>{app.trans('core.admin.edit_group_color_label')}</label>
<input className="FormControl" placeholder="#aaaaaa" value={this.color()} oninput={m.withAttr('value', this.color)}/>
</div>
<div className="Form-group">
<label>Icon</label>
<label>{app.trans('core.admin.edit_group_icon_label')}</label>
<div className="helpText">
Enter the name of any <a href="http://fortawesome.github.io/Font-Awesome/icons/" tabindex="-1">FontAwesome</a> icon class, <em>without</em> the <code>fa-</code> prefix.
{app.trans('core.admin.edit_group_icon_text', {a: <a href="http://fortawesome.github.io/Font-Awesome/icons/" tabindex="-1"/>}, {em: <em/>}, {code: <code/>})}
</div>
<input className="FormControl" placeholder="bolt" value={this.icon()} oninput={m.withAttr('value', this.icon)}/>
</div>
@@ -62,11 +62,11 @@ export default class EditGroupModal extends Modal {
type: 'submit',
className: 'Button Button--primary EditGroupModal-save',
loading: this.loading,
children: 'Save Changes'
children: app.trans('core.admin.edit_group_submit_button')
})}
{this.group.exists && this.group.id() !== Group.ADMINISTRATOR_ID ? (
<button type="button" className="Button EditGroupModal-delete" onclick={this.delete.bind(this)}>
Delete Group
{app.trans('core.admin.edit_group_delete_button')}
</button>
) : ''}
</div>
@@ -95,7 +95,7 @@ export default class EditGroupModal extends Modal {
}
delete() {
if (confirm('Are you sure you want to delete this group? The group members will NOT be deleted.')) {
if (confirm(app.trans('core.admin.edit_group_delete_confirmation'))) {
this.group.delete().then(() => m.redraw());
this.hide();
}