Node.js based forum software built for the modern web
`admin/manage/categories` translations
Peter Jaszkowiak94eb74646cce
diff --git a/public/language/en-GB/admin/manage/categories.json b/public/language/en-GB/admin/manage/categories.jsonnew file mode 100644index 0000000000..8bd5d5bfcf--- /dev/null+++ b/public/language/en-GB/admin/manage/categories.json@@ -0,0 +1,68 @@+{+ "settings": "Category Settings",+ "privileges": "Privileges",++ "name": "Category Name",+ "description": "Category Description",+ "bg-color": "Background Colour",+ "text-color": "Text Colour",+ "bg-image-size": "Background Image Size",+ "custom-class": "Custom Class",+ "num-recent-replies": "# of Recent Replies",+ "ext-link": "External Link",+ "upload-image": "Upload Image",+ "delete-image": "Remove",+ "category-image": "Category Image",+ "parent-category": "Parent Category",+ "optional-parent-category": "(Optional) Parent Category",+ "parent-category-none": "(None)",+ "copy-settings": "Copy Settings From",+ "optional-clone-settings": "(Optional) Clone Settings From Category",+ "purge": "Purge Category",++ "enable": "Enable",+ "disable": "Disable",+ "edit": "Edit",++ "select-category": "Select Category",+ "set-parent-category": "Set Parent Category",++ "privileges.description": "You can configure the access control privileges for this category in this section. Privileges can be granted on a per-user or a per-group basis. You can add a new user to this table by searching for them in the form below.",+ "privileges.warning": "<strong>Note</strong>: Privilege settings take effect immediately. It is not necessary to save the category after adjusting these settings.",+ "privileges.section-viewing": "Viewing Privileges",+ "privileges.section-posting": "Posting Privileges",+ "privileges.section-moderation": "Moderation Privileges",+ "privileges.section-user": "User",+ "privileges.search-user": "Add User",+ "privileges.no-users": "No user-specific privileges in this category.",+ "privileges.section-group": "Group",+ "privileges.group-private": "This group is private",+ "privileges.search-group": "Add Group",+ "privileges.copy-to-children": "Copy to Children",+ "privileges.copy-from-category": "Copy from Category",+ "privileges.inherit": "If the <code>registered-users</code> group is granted a specific privilege, all other groups receive an <strong>implicit privilege</strong>, even if they are not explicitly defined/checked. This implicit privilege is shown to you because all users are part of the <code>registered-users</code> user group, and so, privileges for additional groups need not be explicitly granted.",++ "analytics.back": "Back to Categories List",+ "analytics.title": "Analytics for \"%1\" category",+ "analytics.pageviews-hourly": "<strong>Figure 1</strong> – Hourly page views for this category</small>",+ "analytics.pageviews-daily": "<strong>Figure 2</strong> – Daily page views for this category</small>",+ "analytics.topics-daily": "<strong>Figure 3</strong> – Daily topics created in this category</small>",+ "analytics.posts-daily": "<strong>Figure 4</strong> – Daily posts made in this category</small>",++ "alert.created": "Created",+ "alert.create-success": "Category successfully created!",+ "alert.none-active": "You have no active categories.",+ "alert.create": "Create a Category",+ "alert.confirm-moderate": "<strong>Are you sure you wish to grant the moderation privilege to this user group?</strong> This group is public, and any users can join at will.",+ "alert.confirm-purge": "<p class=\"lead\">Do you really want to purge this category \"%1\"?</p><h5><strong class=\"text-danger\">Warning!</strong> All topics and posts in this category will be purged!</h5> <p class=\"help-block\">Purging a category will remove all topics and posts, and delete the category from the database. If you want to remove a category <em>temporarily</em>, you'll want to \"disable\" the category instead.</p>",+ "alert.purge-success": "Category purged!",+ "alert.copy-success": "Settings Copied!",+ "alert.set-parent-category": "Set Parent Category",+ "alert.updated": "Updated Categories",+ "alert.updated-success": "Category IDs %1 was successfully updated.",+ "alert.upload-image": "Upload category image",+ "alert.find-user": "Find a User",+ "alert.user-search": "Search for a user here...",+ "alert.find-group": "Find a Group",+ "alert.group-search": "Search for a group here..."+}\ No newline at end of filediff --git a/public/less/admin/manage/categories.less b/public/less/admin/manage/categories.lessindex 0f13af4deb..c0c0a544dc 100644--- a/public/less/admin/manage/categories.less+++ b/public/less/admin/manage/categories.less@@ -103,6 +103,7 @@ div.categories {border-top: 0;text-transform: uppercase;font-size: 9px;+ vertical-align: bottom;}.arrowed:after {diff --git a/public/src/admin/admin.js b/public/src/admin/admin.jsindex 217438e146..1c44a7e78d 100644--- a/public/src/admin/admin.js+++ b/public/src/admin/admin.js@@ -87,7 +87,7 @@url = url.replace(/\/\d+$/, '').split('/').slice(0, 3).join('/')- .split('?')[0];+ .split('?')[0].replace(/(\/+$)|(^\/+)/, '');// If index is requested, load the dashboardif (url === 'admin') {diff --git a/public/src/admin/manage/categories.js b/public/src/admin/manage/categories.jsindex 1042c723e6..acb55b82e9 100644--- a/public/src/admin/manage/categories.js+++ b/public/src/admin/manage/categories.js@@ -40,31 +40,29 @@ define('admin/manage/categories', ['vendor/jquery/serializeObject/jquery.ba-seritemplates.parse('admin/partials/categories/create', {categories: categories}, function (html) {- translator.translate(html, function (html) {- function submit() {- var formData = modal.find('form').serializeObject();- formData.description = '';- formData.icon = 'fa-comments';-- Categories.create(formData);- modal.modal('hide');- return false;- }+ function submit() {+ var formData = modal.find('form').serializeObject();+ formData.description = '';+ formData.icon = 'fa-comments';++ Categories.create(formData);+ modal.modal('hide');+ return false;+ }- var modal = bootbox.dialog({- title: 'Create a Category',- message: html,- buttons: {- save: {- label: 'Save',- className: 'btn-primary',- callback: submit- }+ var modal = bootbox.dialog({+ title: '[[admin/manage/categories:alert.create]]',+ message: html,+ buttons: {+ save: {+ label: '[[global:save]]',+ className: 'btn-primary',+ callback: submit}- });-- modal.find('form').on('submit', submit);+ }});++ modal.find('form').on('submit', submit);});});};@@ -77,8 +75,8 @@ define('admin/manage/categories', ['vendor/jquery/serializeObject/jquery.ba-seriapp.alert({alert_id: 'category_created',- title: 'Created',- message: 'Category successfully created!',+ title: '[[admin/manage/categories:alert.created]]',+ message: '[[admin/manage/categories:alert.create-success]]',type: 'success',timeout: 2000});@@ -91,10 +89,12 @@ define('admin/manage/categories', ['vendor/jquery/serializeObject/jquery.ba-serivar container = $('.categories');if (!categories || !categories.length) {- $('<div></div>')- .addClass('alert alert-info text-center')- .text('You have no active categories.')- .appendTo(container);+ translator.translate('[[admin/manage/categories:alert.none-active]]', function (text) {+ $('<div></div>')+ .addClass('alert alert-info text-center')+ .text(text)+ .appendTo(container);+ });} else {sortables = {};renderList(categories, container, 0);diff --git a/public/src/admin/manage/category.js b/public/src/admin/manage/category.jsindex 32da35b007..351c7a624b 100644--- a/public/src/admin/manage/category.js+++ b/public/src/admin/manage/category.js@@ -12,6 +12,45 @@ define('admin/manage/category', [var modified_categories = {};Category.init = function () {+ var modified_categories = {};++ function modified(el) {+ var cid = $(el).parents('form').attr('data-cid');++ if (cid) {+ modified_categories[cid] = modified_categories[cid] || {};+ modified_categories[cid][$(el).attr('data-name')] = $(el).val();++ app.flags = app.flags || {};+ app.flags._unsaved = true;+ }+ }++ function save(e) {+ e.preventDefault();++ if(Object.keys(modified_categories).length) {+ socket.emit('admin.categories.update', modified_categories, function (err, results) {+ if (err) {+ return app.alertError(err.message);+ }++ if (results && results.length) {+ app.flags._unsaved = false;+ app.alert({+ title: '[[admin/manage/categories:alert.updated]]',+ message: translator.compile(+ 'admin/manage/categories:alert.updated-success',+ results.join(', ')+ ),+ type: 'success',+ timeout: 2000+ });+ }+ });+ modified_categories = {};+ }+ }$('.blockclass, form.category select').each(function () {var $this = $(this);@@ -76,7 +115,10 @@ define('admin/manage/category', [$('.purge').on('click', function (e) {e.preventDefault();- bootbox.confirm('<p class="lead">Do you really want to purge this category "' + $('form.category').find('input[data-name="name"]').val() + '"?</p><h5><strong class="text-danger">Warning!</strong> All topics and posts in this category will be purged!</h5> <p class="help-block">Purging a category will remove all topics and posts, and delete the category from the database. If you want to remove a category <em>temporarily</em>, you\'ll want to "disable" the category instead.</p>', function (confirm) {+ bootbox.confirm(translator.compile(+ 'admin/manage/categories:alert.confirm-purge',+ $('form.category').find('input[data-name="name"]').val()+ ), function (confirm) {if (!confirm) {return;}@@ -84,7 +126,7 @@ define('admin/manage/category', [if (err) {return app.alertError(err.message);}- app.alertSuccess('Category purged!');+ app.alertSuccess('[[admin/manage/categories:alert.purge-success]]');ajaxify.go('admin/manage/categories');});});@@ -96,7 +138,7 @@ define('admin/manage/category', [if (err) {return app.alertError(err.message);}- app.alertSuccess('Settings Copied!');+ app.alertSuccess('[[admin/manage/categories:alert.copy-success]]');ajaxify.refresh();});});@@ -108,7 +150,7 @@ define('admin/manage/category', [var cid = inputEl.attr('data-cid');uploader.show({- title: 'Upload category image',+ title: '[[admin/manage/categories:alert.upload-image]]',route: config.relative_path + '/api/admin/category/uploadpicture',params: {cid: cid}}, function (imageUrlOnServer) {@@ -201,7 +243,7 @@ define('admin/manage/category', [if (member) {if (isGroup && privilege === 'groups:moderate' && !isPrivate && state) {- bootbox.confirm('<strong>Are you sure you wish to grant the moderation privilege to this user group?</strong> This group is public, and any users can join at will.', function (confirm) {+ bootbox.confirm('[[admin/manage/categories:alert.confirm-moderate]]', function (confirm) {if (confirm) {Category.setPrivilege(member, privilege, state, checkboxEl);} else {@@ -292,35 +334,33 @@ define('admin/manage/category', [templates.parse('partials/category_list', {categories: categories}, function (html) {- translator.translate(html, function (html) {- var modal = bootbox.dialog({- message: html,- title: 'Set Parent Category'- });+ var modal = bootbox.dialog({+ message: html,+ title: '[[admin/manage/categories:alert.set-parent-category]]'+ });- modal.find('li[data-cid]').on('click', function () {- var parentCid = $(this).attr('data-cid'),- payload = {};+ modal.find('li[data-cid]').on('click', function () {+ var parentCid = $(this).attr('data-cid'),+ payload = {};- payload[ajaxify.data.category.cid] = {- parentCid: parentCid- };+ payload[ajaxify.data.category.cid] = {+ parentCid: parentCid+ };- socket.emit('admin.categories.update', payload, function (err) {- if (err) {- return app.alertError(err.message);- }- var parent = categories.filter(function (category) {- return category && parseInt(category.cid, 10) === parseInt(parentCid, 10);- });- parent = parent[0];-- modal.modal('hide');- $('button[data-action="removeParent"]').parent().removeClass('hide');- $('button[data-action="setParent"]').addClass('hide');- var buttonHtml = '<i class="fa ' + parent.icon + '"></i> ' + parent.name;- $('button[data-action="changeParent"]').html(buttonHtml).parent().removeClass('hide');+ socket.emit('admin.categories.update', payload, function (err) {+ if (err) {+ return app.alertError(err.message);+ }+ var parent = categories.filter(function (category) {+ return category && parseInt(category.cid, 10) === parseInt(parentCid, 10);});+ parent = parent[0];++ modal.modal('hide');+ $('button[data-action="removeParent"]').parent().removeClass('hide');+ $('button[data-action="setParent"]').addClass('hide');+ var buttonHtml = '<i class="fa ' + parent.icon + '"></i> ' + parent.name;+ $('button[data-action="changeParent"]').html(buttonHtml).parent().removeClass('hide');});});});@@ -329,8 +369,8 @@ define('admin/manage/category', [Category.addUserToPrivilegeTable = function () {var modal = bootbox.dialog({- title: 'Find a User',- message: '<input class="form-control input-lg" placeholder="Search for a user here..." />',+ title: '[[admin/manage/categories:alert.find-user]]',+ message: '<input class="form-control input-lg" placeholder="[[admin/manage/categories:alert.user-search]]" />',show: true});@@ -357,8 +397,8 @@ define('admin/manage/category', [Category.addGroupToPrivilegeTable = function () {var modal = bootbox.dialog({- title: 'Find a Group',- message: '<input class="form-control input-lg" placeholder="Search for a group here..." />',+ title: '[[admin/manage/categories:alert.find-group]]',+ message: '<input class="form-control input-lg" placeholder="[[admin/manage/categories:alert.group-search]]" />',show: true});diff --git a/public/vendor/bootbox/wrapper.js b/public/vendor/bootbox/wrapper.jsindex bfc9457241..8e54e0e7db 100644--- a/public/vendor/bootbox/wrapper.js+++ b/public/vendor/bootbox/wrapper.js@@ -30,15 +30,15 @@ require(['translator'], function (shim) {$elem = dialog.call(bootbox, options);- if (/\[\[[a-zA-Z0-9\-_.\/:]+\]\]/.test($elem[0].outerHTML)) {+ if (/\[\[.+\]\]/.test($elem[0].outerHTML)) {nodes = descendantTextNodes($elem[0]);text = nodes.map(function (node) {return node.nodeValue;}).join(' || ');translator.translate(text).then(function (translated) {- translated.split(' || ').forEach(function (str, i) {- nodes[i].nodeValue = str;+ translated.split(' || ').forEach(function (html, i) {+ $(nodes[i]).replaceWith(html);});if (show) {$elem.modal('show');diff --git a/src/views/admin/manage/category-analytics.tpl b/src/views/admin/manage/category-analytics.tplindex eb02abd141..a582a3599e 100644--- a/src/views/admin/manage/category-analytics.tpl+++ b/src/views/admin/manage/category-analytics.tpl@@ -1,6 +1,8 @@-<a class="btn btn-primary" href="{config.relative_path}/admin/manage/categories"><i class="fa fa-fw fa-chevron-left"></i> Back to Categories List</a>+<a class="btn btn-primary" href="{config.relative_path}/admin/manage/categories">+ <i class="fa fa-fw fa-chevron-left"></i> [[admin/manage/categories:analytics.back]]+</a>-<h3>Analytics for "{name}" category</h3>+<h3>[[admin/manage/categories:analytics.title, {name}]]</h3><hr /><div class="row">@@ -12,7 +14,7 @@</p></div>- <div class="panel-footer"><small><strong>Figure 1</strong> – Hourly page views for this category</small></div>+ <div class="panel-footer"><small>[[admin/manage/categories:analytics.pageviews-hourly]]</div></div></div><div class="col-sm-6 text-center">@@ -23,7 +25,7 @@</p></div>- <div class="panel-footer"><small><strong>Figure 2</strong> – Daily page views for this category</small></div>+ <div class="panel-footer"><small>[[admin/manage/categories:analytics.pageviews-daily]]</div></div></div></div>@@ -36,7 +38,7 @@</p></div>- <div class="panel-footer"><small><strong>Figure 3</strong> – Daily topics created in this category</small></div>+ <div class="panel-footer"><small>[[admin/manage/categories:analytics.topics-daily]]</div></div></div><div class="col-sm-6 text-center">@@ -47,7 +49,7 @@</p></div>- <div class="panel-footer"><small><strong>Figure 4</strong> – Daily posts made in this category</small></div>+ <div class="panel-footer"><small>[[admin/manage/categories:analytics.posts-daily]]</div></div></div></div>\ No newline at end of filediff --git a/src/views/admin/manage/category.tpl b/src/views/admin/manage/category.tplindex 7b2638b584..4d006ad191 100644--- a/src/views/admin/manage/category.tpl+++ b/src/views/admin/manage/category.tpl@@ -1,8 +1,10 @@<div class="row"><form role="form" class="category" data-cid="{category.cid}"><ul class="nav nav-pills">- <li class="active"><a href="#category-settings" data-toggle="tab">Category Settings</a></li>- <li><a href="#privileges" data-toggle="tab">Privileges</a></li>+ <li class="active"><a href="#category-settings" data-toggle="tab">+ [[admin/manage/categories:settings]]+ </a></li>+ <li><a href="#privileges" data-toggle="tab">[[admin/manage/categories:privileges]]</a></li></ul><br /><div class="tab-content">@@ -10,30 +12,40 @@<div class="col-md-9"><div class="category-settings-form"><fieldset>- <label for="cid-{category.cid}-name">Category Name</label>- <input id="cid-{category.cid}-name" type="text" class="form-control" placeholder="Category Name" data-name="name" value="{category.name}" /><br />+ <label for="cid-{category.cid}-name">+ [[admin/manage/categories:name]]+ </label>+ <input id="cid-{category.cid}-name" type="text" class="form-control" placeholder="[[admin/manage/categories:name]]" data-name="name" value="{category.name}" /><br />- <label for="cid-{category.cid}-description">Category Description</label>- <input id="cid-{category.cid}-description" data-name="description" placeholder="Category Description" value="{category.description}" class="form-control category_description description"></input><br />+ <label for="cid-{category.cid}-description">+ [[admin/manage/categories:description]]+ </label>+ <input id="cid-{category.cid}-description" data-name="description" placeholder="[[admin/manage/categories:description]]" value="{category.description}" class="form-control category_description description" /><br /></fieldset><fieldset class="row"><div class="col-sm-4 col-xs-12"><div class="form-group">- <label for="cid-{category.cid}-bgColor">Background Colour</label>+ <label for="cid-{category.cid}-bgColor">+ [[admin/manage/categories:bg-color]]+ </label><input id="cid-{category.cid}-bgColor" placeholder="#0059b2" data-name="bgColor" value="{category.bgColor}" class="form-control category_bgColor" /></div></div><div class="col-sm-4 col-xs-12"><div class="form-group">- <label for="cid-{category.cid}-color">Text Colour</label>+ <label for="cid-{category.cid}-color">+ [[admin/manage/categories:text-color]]+ </label><input id="cid-{category.cid}-color" placeholder="#fff" data-name="color" value="{category.color}" class="form-control category_color" /></div></div><div class="col-sm-4 col-xs-12"><div class="form-group">- <label for="cid-{category.cid}-imageClass">Background Image Size</label>- <select id="cid-{category.cid}-imageClass" class="form-control" data-name="imageClass" data-value="{category.imageClass}">+ <label for="cid-{category.cid}-imageClass">+ [[admin/manage/categories:bg-image-size]]+ </label>+ <select id="cid-{category.cid}-imageClass" class="form-control" data-name="imageClass" data-value="{category.imageClass}"><option value="auto">auto</option><option value="cover">cover</option><option value="contain">contain</option>@@ -42,19 +54,25 @@</div><br /><div class="col-sm-4 col-xs-12"><div class="form-group">- <label for="cid-{category.cid}-class">Custom Class</label>+ <label for="cid-{category.cid}-class">+ [[admin/manage/categories:custom-class]]+ </label><input id="cid-{category.cid}-class" type="text" class="form-control" placeholder="col-md-6 col-xs-6" data-name="class" value="{category.class}" /></div></div><div class="col-sm-4 col-xs-12"><div class="form-group">- <label for="cid-{category.cid}-numRecentReplies"># of Recent Replies</label>+ <label for="cid-{category.cid}-numRecentReplies">+ [[admin/manage/categories:num-recent-replies]]+ </label><input id="cid-{category.cid}-numRecentReplies" type="text" class="form-control" placeholder="2" data-name="numRecentReplies" value="{category.numRecentReplies}" /></div></div><div class="col-sm-4 col-xs-12"><div class="form-group">- <label for="cid-{category.cid}-link">External Link</label>+ <label for="cid-{category.cid}-link">+ [[admin/manage/categories:ext-link]]+ </label><input id="cid-{category.cid}-link" type="text" class="form-control" placeholder="http://domain.com" data-name="link" value="{category.link}" /></div></div>@@ -81,38 +99,53 @@</div><div class="btn-group btn-group-justified"><div class="btn-group">- <button type="button" data-cid="{category.cid}" class="btn btn-default upload-button"><i class="fa fa-upload"></i> Upload Image</button>+ <button type="button" data-cid="{category.cid}" class="btn btn-default upload-button">+ <i class="fa fa-upload"></i>+ [[admin/manage/categories:upload-image]]+ </button></div><!-- IF category.image --><div class="btn-group">- <button class="btn btn-warning delete-image"><i data-name="icon" value="fa-times" class="fa fa-times"></i> Remove</button>+ <button class="btn btn-warning delete-image">+ <i data-name="icon" value="fa-times" class="fa fa-times"></i>+ [[admin/manage/categories:delete-image]]+ </button></div><!-- ENDIF category.image --></div><br /><fieldset><div class="form-group text-center">- <label for="category-image">Category Image</label>+ <label for="category-image">+ [[admin/manage/categories:category-image]]+ </label><br/>- <input id="category-image" type="text" class="form-control" placeholder="Category Image" data-name="image" value="{category.image}" />+ <input id="category-image" type="text" class="form-control" placeholder="[[admin/manage/categories:category-image]]" data-name="image" value="{category.image}" /></div></fieldset><fieldset><div class="form-group text-center">- <label for="cid-{category.cid}-parentCid">Parent Category</label>+ <label for="cid-{category.cid}-parentCid">[[admin/manage/categories:parent-category]]</label><br/><div class="btn-group <!-- IF !category.parent.name -->hide<!-- ENDIF !category.parent.name -->"><button type="button" class="btn btn-default" data-action="changeParent" data-parentCid="{category.parent.cid}"><i class="fa {category.parent.icon}"></i> {category.parent.name}</button><button type="button" class="btn btn-warning" data-action="removeParent" data-parentCid="{category.parent.cid}"><i class="fa fa-times"></i></button></div>- <button type="button" class="btn btn-default btn-block <!-- IF category.parent.name -->hide<!-- ENDIF category.parent.name -->" data-action="setParent"><i class="fa fa-sitemap"></i> (None)</button>+ <button type="button" class="btn btn-default btn-block <!-- IF category.parent.name -->hide<!-- ENDIF category.parent.name -->" data-action="setParent">+ <i class="fa fa-sitemap"></i>+ [[admin/manage/categories:parent-category-none]]+ </button></div></fieldset><hr/>- <button class="btn btn-info btn-block copy-settings"><i class="fa fa-files-o"></i> Copy Settings From</button>+ <button class="btn btn-info btn-block copy-settings">+ <i class="fa fa-files-o"></i> [[admin/manage/categories:copy-settings]]+ </button><hr />- <button class="btn btn-danger btn-block purge"><i class="fa fa-eraser"></i> Purge Category</button>+ <button class="btn btn-danger btn-block purge">+ <i class="fa fa-eraser"></i> [[admin/manage/categories:purge]]+ </button></div></div></div>@@ -120,12 +153,10 @@<div class="tab-pane fade col-xs-12" id="privileges"><p>- You can configure the access control privileges for this category in this section. Privileges can be granted on a per-user or- a per-group basis. You can add a new user to this table by searching for them in the form below.+ [[admin/manage/categories:privileges.description]]</p><p class="text-warning">- <strong>Note</strong>: Privilege settings take effect immediately. It is not necessary to save the category after adjusting- these settings.+ [[admin/manage/categories:privileges.warning]]</p><hr /><div class="privilege-table-container">@@ -139,4 +170,3 @@<button id="save" class="floating-button mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored"><i class="material-icons">save</i></button>-diff --git a/src/views/admin/partials/categories/category-rows.tpl b/src/views/admin/partials/categories/category-rows.tplindex 13e902fb99..1ceeefb9d4 100644--- a/src/views/admin/partials/categories/category-rows.tpl+++ b/src/views/admin/partials/categories/category-rows.tpl@@ -4,7 +4,13 @@<div class="row"><div class="col-md-9"><div class="clearfix">- <div class="icon" style="color: {categories.color}; background-color: {categories.bgColor};<!-- IF categories.backgroundImage --> background-image: url('{categories.backgroundImage}');<!-- ENDIF categories.backgroundImage -->">+ <div class="icon" style="+ color: {categories.color};+ background-color: {categories.bgColor};+ <!-- IF categories.backgroundImage -->+ background-image: url('{categories.backgroundImage}');+ <!-- ENDIF categories.backgroundImage -->+ "><i data-name="icon" value="{categories.icon}" class="fa {categories.icon}"></i></div><div class="information">@@ -17,10 +23,18 @@<div class="clearfix pull-right text-right"><div class="btn-group"><button data-cid="{categories.cid}" data-action="toggle" data-disabled="{categories.disabled}" class="btn <!-- IF categories.disabled -->btn-primary<!-- ELSE -->btn-danger<!-- ENDIF categories.disabled -->">- <!-- IF categories.disabled -->Enable<!-- ELSE -->Disable<!-- ENDIF categories.disabled -->+ <!-- IF categories.disabled -->+ [[admin/manage/categories:enable]]+ <!-- ELSE -->+ [[admin/manage/categories:disable]]+ <!-- ENDIF categories.disabled --></button>- <a href="./categories/{categories.cid}/analytics" class="btn btn-default"><i class="fa fa-line-chart"></i></a>- <a href="./categories/{categories.cid}" class="btn btn-default">Edit</a>+ <a href="./categories/{categories.cid}/analytics" class="btn btn-default">+ <i class="fa fa-line-chart"></i>+ </a>+ <a href="./categories/{categories.cid}" class="btn btn-default">+ [[admin/manage/categories:edit]]+ </a></div></div></div>diff --git a/src/views/admin/partials/categories/create.tpl b/src/views/admin/partials/categories/create.tplindex d4c551f1bf..436705b1d8 100644--- a/src/views/admin/partials/categories/create.tpl+++ b/src/views/admin/partials/categories/create.tpl@@ -1,10 +1,10 @@<form type="form"><div class="form-group">- <label for="name">Category Name</label>+ <label for="name">[[admin/manage/categories:name]]</label><input type="text" class="form-control" name="name" id="name" /></div><div class="form-group">- <label for="parentCid">(Optional) Parent Category</label>+ <label for="parentCid">[[admin/manage/categories:optional-parent-category]]</label><select class="form-control" name="parentCid" id="parentCid"><option value=""></option><!-- BEGIN categories -->@@ -14,7 +14,7 @@</div><div class="form-group">- <label for="cloneFromCid">(Optional) Clone Settings From Category</label>+ <label for="cloneFromCid">[[admin/manage/categories:optional-clone-settings]]</label><select class="form-control" name="cloneFromCid" id="cloneFromCid"><option value=""></option><!-- BEGIN categories -->diff --git a/src/views/admin/partials/categories/privileges.tpl b/src/views/admin/partials/categories/privileges.tplindex 28b5f0849f..f15d207d6c 100644--- a/src/views/admin/partials/categories/privileges.tpl+++ b/src/views/admin/partials/categories/privileges.tpl@@ -1,12 +1,18 @@<table class="table table-striped privilege-table"><tr class="privilege-table-header"><th colspan="2"></th>- <th class="arrowed" colspan="3">Viewing Privileges</th>- <th class="arrowed" colspan="7">Posting Privileges</th>- <th class="arrowed" colspan="2">Moderation Privileges</th>+ <th class="arrowed" colspan="3">+ [[admin/manage/categories:privileges.section-viewing]]+ </th>+ <th class="arrowed" colspan="7">+ [[admin/manage/categories:privileges.section-posting]]+ </th>+ <th class="arrowed" colspan="2">+ [[admin/manage/categories:privileges.section-moderation]]+ </th></tr><tr><!-- zebrastripe reset --></tr><tr>- <th colspan="2">User</th>+ <th colspan="2">[[admin/manage/categories:privileges.section-user]]</th><!-- BEGIN privileges.labels.users --><th class="text-center">{privileges.labels.users.name}</th><!-- END privileges.labels.users -->@@ -27,14 +33,18 @@<!-- END privileges.users --><tr><td colspan="{privileges.columnCount}">- <button type="button" class="btn btn-primary pull-right" data-ajaxify="false" data-action="search.user"> Add User</button>+ <button type="button" class="btn btn-primary pull-right" data-ajaxify="false" data-action="search.user">+ [[admin/manage/categories:privileges.search-user]]+ </button></td></tr><!-- ELSE --><tr><td colspan="{privileges.columnCount}">- <button type="button" class="btn btn-primary pull-right" data-ajaxify="false" data-action="search.user"> Add User</button>- No user-specific privileges in this category.+ [[admin/manage/categories:privileges.no-users]]+ <button type="button" class="btn btn-primary pull-right" data-ajaxify="false" data-action="search.user">+ [[admin/manage/categories:privileges.search-user]]+ </button></td></tr><!-- ENDIF privileges.users.length -->@@ -43,12 +53,18 @@<table class="table table-striped privilege-table"><tr class="privilege-table-header"><th colspan="2"></th>- <th class="arrowed" colspan="3">Viewing Privileges</th>- <th class="arrowed" colspan="7">Posting Privileges</th>- <th class="arrowed" colspan="2">Moderation Privileges</th>+ <th class="arrowed" colspan="3">+ [[admin/manage/categories:privileges.section-viewing]]+ </th>+ <th class="arrowed" colspan="7">+ [[admin/manage/categories:privileges.section-posting]]+ </th>+ <th class="arrowed" colspan="2">+ [[admin/manage/categories:privileges.section-moderation]]+ </th></tr><tr><!-- zebrastripe reset --></tr><tr>- <th colspan="2">Group</th>+ <th colspan="2">[[admin/manage/categories:privileges.section-group]]</th><!-- BEGIN privileges.labels.groups --><th class="text-center">{privileges.labels.groups.name}</th><!-- END privileges.labels.groups -->@@ -57,7 +73,7 @@<tr data-group-name="{privileges.groups.name}" data-private="<!-- IF privileges.groups.isPrivate -->1<!-- ELSE -->0<!-- ENDIF privileges.groups.isPrivate -->"><td><!-- IF privileges.groups.isPrivate -->- <i class="fa fa-lock text-muted" title="This group is private"></i>+ <i class="fa fa-lock text-muted" title="[[admin/manage/categories:privileges.group-private]]"></i><!-- ENDIF privileges.groups.isPrivate -->{privileges.groups.name}</td>@@ -68,16 +84,19 @@<tr><td colspan="{privileges.columnCount}"><div class="btn-toolbar">- <button type="button" class="btn btn-primary pull-right" data-ajaxify="false" data-action="search.group"> Add Group</button>- <button type="button" class="btn btn-info pull-right" data-ajaxify="false" data-action="copyToChildren"> Copy to Children</button>- <button type="button" class="btn btn-info pull-right" data-ajaxify="fakse" data-action="copyPrivilegesFrom"> Copy From Category</button>+ <button type="button" class="btn btn-primary pull-right" data-ajaxify="false" data-action="search.group">+ [[admin/manage/categories:privileges.search-group]]+ </button>+ <button type="button" class="btn btn-info pull-right" data-ajaxify="false" data-action="copyToChildren">+ [[admin/manage/categories:privileges.copy-to-children]]+ </button>+ <button type="button" class="btn btn-info pull-right" data-ajaxify="false" data-action="copyPrivilegesFrom">+ [[admin/manage/categories:privileges.copy-from-category]]+ </button></div></td></tr></table><div class="help-block">- If the <code>registered-users</code> group is granted a specific privilege, all other groups receive an- <strong>implicit privilege</strong>, even if they are not explicitly defined/checked. This implicit- privilege is shown to you because all users are part of the <code>registered-users</code> user group,- and so, privileges for additional groups need not be explicitly granted.+ [[admin/manage/categories:privileges.inherit]]</div>diff --git a/src/views/admin/partials/categories/select-category.tpl b/src/views/admin/partials/categories/select-category.tplindex 7e1f9f0d28..8c93286507 100644--- a/src/views/admin/partials/categories/select-category.tpl+++ b/src/views/admin/partials/categories/select-category.tpl@@ -1,6 +1,6 @@<form type="form"><div class="form-group">- <label for="select-cid">Select Category</label>+ <label for="select-cid">[[admin/manage/categories:select-category]]</label><select class="form-control" name="select-cid" id="select-cid"><!-- BEGIN categories --><option value="{categories.cid}">{categories.name}</option>diff --git a/src/views/admin/partials/categories/setParent.tpl b/src/views/admin/partials/categories/setParent.tplindex 805ff97b8f..e8e6b9f860 100644--- a/src/views/admin/partials/categories/setParent.tpl+++ b/src/views/admin/partials/categories/setParent.tpl@@ -2,14 +2,21 @@<div class="modal-dialog"><div class="modal-content"><div class="modal-header">- <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>- <h4 class="modal-title" id="setParentLabel">Set Parent Category</h4>+ <button type="button" class="close" data-dismiss="modal">+ <span aria-hidden="true">×</span>+ <span class="sr-only">[[global:buttons.close]]</span>+ </button>+ <h4 class="modal-title" id="setParentLabel">+ [[admin/manage/categories:set-parent-category]]+ </h4></div><div class="modal-body"><!-- IMPORT partials/category_list.tpl --></div><div class="modal-footer">- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>+ <button type="button" class="btn btn-default" data-dismiss="modal">+ [[global:buttons.close]]+ </button></div></div></div>