From c77f03ab57fb62de63edb56a04ff61753c9af00f Mon Sep 17 00:00:00 2001 From: klimashkin Date: Sun, 25 Oct 2015 17:17:27 -0700 Subject: [PATCH 01/85] English messages in controllers --- controllers/auth.js | 67 ++++++++++++++++++------------------- controllers/comment.js | 14 ++++---- controllers/mail.js | 2 +- controllers/photo.js | 26 +++++++------- controllers/photoCluster.js | 2 +- controllers/profile.js | 8 ++--- controllers/region.js | 2 +- controllers/routes.js | 2 +- controllers/subscr.js | 22 ++++++------ 9 files changed, 71 insertions(+), 74 deletions(-) diff --git a/controllers/auth.js b/controllers/auth.js index 311e3f4dd..3c4d14c8f 100755 --- a/controllers/auth.js +++ b/controllers/auth.js @@ -46,7 +46,7 @@ function login(socket, data, cb) { User.getAuthenticated(data.login, data.pass, function (err, user, reason) { if (err) { logger.error('Auth login User.getAuthenticated: ', err); - return cb({ message: 'Ошибка авторизации', error: true }); + return cb({ message: 'Authorizes error', error: true }); } // Если есть пользователь, значит проверка успешна @@ -65,7 +65,7 @@ function login(socket, data, cb) { case User.failedLogin.NOT_FOUND: case User.failedLogin.PASSWORD_INCORRECT: // note: these cases are usually treated the same - don't tell the user *why* the login failed, only that it did - cb({ message: 'Неправильная пара логин-пароль', error: true }); + cb({ message: 'Incorrect combination of login and password', error: true }); break; case User.failedLogin.MAX_ATTEMPTS: // send email or otherwise notify user that account is temporarily locked @@ -80,19 +80,19 @@ function login(socket, data, cb) { } // Registration -const registerPublicError = { message: 'Ошибка регистрации', error: true }; +const registerPublicError = { message: 'Registration error', error: true }; function register(data, cb) { var error = '', - success = 'Учетная запись создана успешно. Для завершения регистрации следуйте инструкциям, отправленным на указанный вами e-mail', //'Account has been successfully created. To confirm registration, follow the instructions sent to Your e-mail', + success = 'Account has been successfully created. To confirm registration, follow the instructions sent to Your e-mail', confirmKey = ''; if (!data.login) { - error += 'Заполните имя пользователя. '; // 'Fill in the login field. ' + error += 'Fill in the login field. '; } else { if (data.login !== 'anonymous' && !data.login.match(/^[\.\w-]{3,15}$/i) || !data.login.match(/^[A-za-z].*$/i) || !data.login.match(/^.*\w$/i)) { - error += 'Имя пользователя должно содержать от 3 до 15 латинских символов и начинаться с буквы. ' + - 'В состав слова могут входить цифры, точка, подчеркивание и тире. '; + error += 'User name must contain between 3 and 15 Latin characters and begin with a letter. ' + + 'The words can contain digits, dot, dash, and underscore. '; } } if (!data.email) { @@ -104,7 +104,7 @@ function register(data, cb) { error += 'Fill in the password field. '; } if (data.pass !== data.pass2) { - error += 'Пароли не совпадают.'; + error += 'Password mismatch.'; } if (error) { return cb({ message: error, error: true }); @@ -118,14 +118,14 @@ function register(data, cb) { }, function (err, user) { if (err) { logger.error('Auth register User.findOne: ', err); - return cb({ message: 'Ошибка регистрации', error: true }); + return cb({ message: 'Registration error', error: true }); } if (user) { if (user.login.toLowerCase() === data.login.toLowerCase()) { - error += 'Пользователь с таким именем уже зарегистрирован. '; //'User with such login already exists. ' + error += 'User with such login is already registered. '; } if (user.email === data.email) { - error += 'Пользователь с таким email уже зарегистрирован.'; //'User with such email already exists.' + error += 'User with such email is already registered.'; } return cb({ message: error, error: true }); } @@ -177,17 +177,17 @@ function register(data, cb) { sendMail({ sender: 'noreply', receiver: { alias: data.login, email: data.email }, - subject: 'Подтверждение регистрации', + subject: 'Confirmation of registration', head: true, body: regTpl({ data, config, confirmKey, username: data.login, - greeting: 'Спасибо за регистрацию на проекте PastVu!', + greeting: 'Thank you for registering on the PastVu project!', linkvalid: moment.duration(ms('2d')).humanize() + ' (до ' + moment().utc().lang('ru').add(ms('2d')).format("LLL") + ')' }), - text: 'Перейдите по следующей ссылке: ' + config.client.origin + '/confirm/' + confirmKey + text: 'Click the following link: ' + config.client.origin + '/confirm/' + confirmKey }); } ); @@ -195,8 +195,8 @@ function register(data, cb) { } // Отправка на почту запроса на восстановление пароля -var successPublic = { message: 'Запрос успешно отправлен. Для продолжения процедуры следуйте инструкциям, высланным на Ваш e-mail' }, //success = 'The data is successfully sent. To restore password, follow the instructions sent to Your e-mail', - recallPublicError = { message: 'Ошибка восстановления пароля', error: true }; +var successPublic = { message: 'The data is successfully sent. To restore password, follow the instructions sent to Your e-mail' }, + recallPublicError = { message: 'Password recovery failed', error: true }; function recall(iAm, data, cb) { var confirmKey = ''; @@ -219,7 +219,7 @@ function recall(iAm, data, cb) { return cb(recallPublicError); } if (!user) { - return cb({ message: 'Пользователя с таким логином или e-mail не существует', error: true }); //'User with such login or e-mail does not exist' + return cb({ message: 'User with such login or e-mail does not exist', error: true }); } // Если залогинен и пытается восстановить не свой аккаунт, то проверяем что это админ if (iAm.registered && iAm.user.login !== data.login && !iAm.isAdmin) { @@ -250,7 +250,7 @@ function recall(iAm, data, cb) { sendMail({ sender: 'noreply', receiver: { alias: data.login, email: data.email }, - subject: 'Запрос на восстановление пароля', + subject: 'Password recovery request', head: true, body: recallTpl({ data, @@ -259,14 +259,14 @@ function recall(iAm, data, cb) { username: data.disp, linkvalid: moment.duration(ms('2d')).humanize() + ' (до ' + moment().utc().lang('ru').add(ms('2d')).format("LLL") + ')' }), - text: 'Перейдите по следующей ссылке: ' + config.client.origin + '/confirm/' + confirmKey + text: 'Click the following link: ' + config.client.origin + '/confirm/' + confirmKey }); } ); } // Смена пароля по запросу восстановлния из почты -var passChangeRecallPublicError = { message: 'Ошибка смены пароля', error: true }; +var passChangeRecallPublicError = { message: 'Failed changing the password', error: true }; function passChangeRecall(iAm, data, cb) { var error = '', key = data.key; @@ -315,25 +315,25 @@ function passChangeRecall(iAm, data, cb) { return cb(passChangeRecallPublicError); } - cb({ message: 'Новый пароль сохранен успешно' }); + cb({ message: 'New password saved successfully' }); } ); }); } // Смена пароля в настройках пользователя с указанием текущего пароля -var passChangePublicError = { message: 'Ошибка смены пароля', error: true }; +var passChangePublicError = { message: 'Failed changing the password', error: true }; function passChange(iAm, data, cb) { var error = ''; if (!iAm.registered || !data || iAm.user.login !== data.login) { - return cb({ message: 'Вы не авторизованны для этой операции', error: true }); // 'You are not authorized for this action' + return cb({ message: 'You are not authorized for this action', error: true }); } if (!data.pass || !data.passNew || !data.passNew2) { - error += 'Заполните все поля. '; // 'Fill in all password fields. '; + error += 'Fill in all password fields. '; } if (data.passNew !== data.passNew2) { - error += 'Новые пароли не совпадают. '; // 'New passwords do not match each other.'; + error += 'New passwords do not match each other. '; } if (error) { return cb({ message: error, error: true }); @@ -352,16 +352,16 @@ function passChange(iAm, data, cb) { logger.error('Auth passChange iAm.user.save: ', err); return cb(passChangePublicError); } - cb({ message: 'Новый пароль установлен успешно' }); //'Password was changed successfully!' + cb({ message: 'Password was change successfully' }); }); } else { - cb({ message: 'Текущий пароль не верен', error: true }); //'Current password incorrect' + cb({ message: 'Current password is incorrect', error: true }); } }); } //Проверка ключа confirm -var checkConfirmPublicError = { message: 'Ошибка подтверждения ключа', error: true }; +var checkConfirmPublicError = { message: 'Error confirmation key', error: true }; function checkConfirm(data, cb) { if (!data || !Utils.isType('string', data.key) || data.key.length < 7 || data.key.length > 8) { cb({ message: 'Bad params', error: true }); @@ -369,18 +369,18 @@ function checkConfirm(data, cb) { } var key = data.key; - UserConfirm.findOne({ key: key }).populate('user').exec(function (err, confirm) { + UserConfirm.findOne({ key }).populate('user').exec(function (err, confirm) { if (err) { logger.error('Auth checkConfirm UserConfirm.findOne: ', err); return cb(checkConfirmPublicError); } if (!confirm || !confirm.user) { - return cb({ message: 'Переданного вами ключа не существует', error: true }); + return cb({ message: 'The key you passed does not exist', error: true }); } var user = confirm.user, avatar; - if (key.length === 7) { //Confirm registration + if (key.length === 7) { // Confirm registration step( function () { user.active = true; @@ -395,13 +395,12 @@ function checkConfirm(data, cb) { } cb({ - message: 'Спасибо, регистрация подтверждена! Теперь вы можете войти в систему, используя ваш логин и пароль', + message: 'Thank you! Your registration is confirmed. Now you can login using your username and password', type: 'noty' }); - //cb({message: 'Thank you! Your registration is confirmed. Now you can enter using your username and password', type: 'noty'}); } ); - } else if (key.length === 8) { //Confirm pass change + } else if (key.length === 8) { // Confirm pass change if (user.avatar) { if (preaddrs.length) { avatar = preaddrs[0] + '/_a/h/' + user.avatar; diff --git a/controllers/comment.js b/controllers/comment.js index 2b0ef918f..723a61624 100644 --- a/controllers/comment.js +++ b/controllers/comment.js @@ -25,13 +25,13 @@ const maxRegionLevel = constants.region.maxLevel; const commentsUserPerPage = 20; const msg = { - deny: 'У вас нет разрешения на это действие', // 'You do not have permission for this action' - noUser: 'Запрашиваемый пользователь не существует', - noObject: 'Комментируемого объекта не существует, или модераторы перевели его в недоступный вам режим', - noComments: 'Операции с комментариями на этой странице запрещены', - noCommentExists: 'Комментария не существует', - badParams: 'Неверные параметры запроса', - maxLength: 'Комментарий длиннее допустимого значения (' + commentMaxLength + ')' + deny: 'You do not have permission for this action', + noUser: 'Requested user is not exists', + noObject: 'Commented object does not exist or moderators changed it status, which is not available to you', + noComments: 'Operations with comments on this page are prohibited', + noCommentExists: 'Comment does not exists', + badParams: 'Invalid request parameters', + maxLength: 'Comments longer than max value (' + commentMaxLength + ')' }; const permissions = { diff --git a/controllers/mail.js b/controllers/mail.js index 67a46e219..e13b73fce 100755 --- a/controllers/mail.js +++ b/controllers/mail.js @@ -30,7 +30,7 @@ export async function send(options) { 'X-Laziness-level': 1000 }, html: options.body, - text: options.text || 'Зайдите, чтобы посмотреть' + text: options.text || 'Visit to see' }; if (Array.isArray(options.attachments) && options.attachments.length) { diff --git a/controllers/photo.js b/controllers/photo.js index 12851b2fc..dfb5c7825 100755 --- a/controllers/photo.js +++ b/controllers/photo.js @@ -32,16 +32,16 @@ const privateDir = path.join(config.storePath, 'private/photos'); const status = constants.photo.status; const parsingFieldsSet = new Set(constants.photo.parsingFields); const msg = { - deny: 'У вас нет прав на это действие', - noUser: 'Запрашиваемый пользователь не существует', - noPhoto: 'Запрашиваемой фотографии не существует или не доступна', - noRegion: 'Такого региона не существует', - badParams: 'Неверные параметры запроса', - needReason: 'Необходимо указать причину операции', + deny: 'You do not have permission for this action', + noUser: 'The requested user does not exist', + noPhoto: 'Requested photo does not exist or it is not available to you', + noRegion: 'Such region does not exist', + badParams: 'Invalid request parameters', + needReason: 'Reason for the operation is not specified', // Две кнопки: "Посмотреть", "Продолжить <сохранение|изменение статуса>" - changed: 'С момента обновления вами страницы, информация на ней была кем-то изменена', - anotherStatus: 'Фотография уже в другом статусе, обновите страницу', - mustCoord: 'Фотография должна иметь координату или быть привязана к региону вручную' + changed: 'From the moment you had got the page, the information on it has been altered by someone', + anotherStatus: 'Photo is already in other status, refresh the page', + mustCoord: 'The photo must have coordinates or be tied to the region manually' }; var historyFields = constants.photo.historyFields, @@ -1754,14 +1754,14 @@ function photoCheckPublickRequired(photo) { } if (_.isEmpty(photo.title)) { - throw { message: 'Необходимо заполнить название фотографии' }; + throw { message: 'You must fill in the title of the photo' }; } if (!_.isNumber(photo.year) || !_.isNumber(photo.year2) || photo.year < 1826 || photo.year > 2000 || photo.year2 < photo.year && photo.year2 > 2000) { throw { - message: 'Опубликованные фотогрфии должны содержать предполагаемую датировку фотографии в интервале 1826—2000гг.' + message: 'Published photos must be in the range of 1826-2000 years' }; } @@ -2201,7 +2201,7 @@ var convertUserPhotos = Bluebird.method(function (iAm, data) { throw { message: msg.deny }; } if (usersWhoConvertingNonIndividualPhotos[data.login]) { - throw { message: 'Вы уже отправили запрос и он еще выполняется. Попробуйте позже' }; + throw { message: 'You have already sent a request and it is still running. Try again later' }; } var stampStart = new Date(); @@ -2656,7 +2656,7 @@ var giveObjHist = Bluebird.method(function (iAm, data) { }) .spread(function (photoUser, histories) { if (_.isEmpty(histories)) { - throw { message: 'Для объекта еще нет истории' }; + throw { message: 'The object has no history' }; } var haveDiff; diff --git a/controllers/photoCluster.js b/controllers/photoCluster.js index ec1496f98..ae9760a68 100644 --- a/controllers/photoCluster.js +++ b/controllers/photoCluster.js @@ -8,7 +8,7 @@ import { Cluster, ClusterParams } from '../models/Cluster'; const logger = log4js.getLogger('photoCluster.js'); const msg = { - deny: 'У вас нет прав на это действие' + deny: 'You do not have permission for this action' }; export let clusterParams; // Parameters of cluster diff --git a/controllers/profile.js b/controllers/profile.js index 9a5e45165..8cba2bdda 100755 --- a/controllers/profile.js +++ b/controllers/profile.js @@ -21,7 +21,7 @@ const privateDir = path.join(config.storePath, 'private/avatars/'); const publicDir = path.join(config.storePath, 'public/avatars/'); const msg = { badParams: 'Bad params', - deny: 'У вас нет прав на это действие', + deny: 'You do not have permission for this action', nouser: 'Requested user does not exist', nosetting: 'Such setting does not exists' @@ -328,7 +328,7 @@ function changeEmail(iAm, data, cb) { } data.email = data.email.toLowerCase(); if (!data.email.match(/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)) { - return cb({ message: 'Недействительный email. Проверьте корректность ввода.', error: true }); + return cb({ message: 'Invalid email. Check the correctness of input.', error: true }); } step( @@ -352,7 +352,7 @@ function changeEmail(iAm, data, cb) { return cb({ message: err.message, error: true }); } if (u && u.login !== user.login) { - return cb({ message: 'Такой email уже используется другим пользователем', error: true }); + return cb({ message: 'This email is already in use by another user', error: true }); } if (data.pass) { @@ -363,7 +363,7 @@ function changeEmail(iAm, data, cb) { if (isMatch) { saveEmail(); } else { - cb({ message: 'Неверный пароль', error: true }); + cb({ message: 'Incorrect password', error: true }); } }); } else { diff --git a/controllers/region.js b/controllers/region.js index 23dabb04d..182cb9ffc 100644 --- a/controllers/region.js +++ b/controllers/region.js @@ -1357,7 +1357,7 @@ async function saveUserRegions(socket, data) { throw { message: msg.badParams }; } if (data.regions.length > maxRegionLevel) { - throw { message: 'Вы можете выбрать до ' + maxRegionLevel + ' регионов' }; + throw { message: 'You can select up to ' + maxRegionLevel + ' regions' }; } // Check that transfered valid region numbers diff --git a/controllers/routes.js b/controllers/routes.js index d861270e8..645bf16d5 100644 --- a/controllers/routes.js +++ b/controllers/routes.js @@ -199,7 +199,7 @@ export function loadController(app) { res.statusCode = 200; res.render('status/badbrowser', { agent: req.browser && req.browser.agent, - title: 'Вы используете устаревшую версию браузера' + title: 'You are using outdated browser version' }); }); diff --git a/controllers/subscr.js b/controllers/subscr.js index 029996dec..59871099e 100644 --- a/controllers/subscr.js +++ b/controllers/subscr.js @@ -19,9 +19,9 @@ import { UserNoty, UserObjectRel } from '../models/UserStates'; const logger = log4js.getLogger('subscr.js'); const msg = { - badParams: 'Неверные параметры запроса', - deny: 'У вас нет разрешения на это действие', // 'You do not have permission for this action' - noObject: 'Комментируемого объекта не существует, или модераторы перевели его в недоступный вам режим', + badParams: 'Invalid query parameters', + deny: 'You do not have permission for this action', + noObject: 'Commented object does not exist or moderators changed it status, which is not available to you', nouser: 'Requested user does not exist' }; @@ -34,8 +34,8 @@ const sortNotice = (a, b) => a.brief.newest < b.brief.newest ? 1 : (a.brief.newe const sortSubscr = ({ ccount_new: aCount = 0, sbscr_create: aDate}, { ccount_new: bCount = 0, sbscr_create: bDate}) => aCount < bCount ? 1 : aCount > bCount ? - 1 : aDate < bDate ? 1 : aDate > bDate ? -1 : 0; const declension = { - comment: [' новый комментарий', ' новых комментария', ' новых комментариев'], - commentUnread: [' непрочитанный', ' непрочитанных', ' непрочитанных'] + comment: [' new comment', ' new comments'], + commentUnread: [' unread'] }; /** @@ -384,9 +384,9 @@ async function sendUserNotice(userId) { totalNewestComments += newest; - obj.briefFormat = { newest: newest + Utils.format.wordEndOfNum(newest, declension.comment) }; + obj.briefFormat = { newest: newest + ' new comment' + (newest > 1 ? 's' : '') }; if (newest !== unread) { - obj.briefFormat.unread = unread + Utils.format.wordEndOfNum(unread, declension.commentUnread); + obj.briefFormat.unread = unread + declension.commentUnread; } result.push(obj); @@ -406,7 +406,7 @@ async function sendUserNotice(userId) { await sendMail({ sender: 'noreply', receiver: { alias: String(user.disp), email: user.email }, - subject: 'Новое уведомление', + subject: 'New notification', head: true, body: noticeTpl({ user, @@ -414,11 +414,9 @@ async function sendUserNotice(userId) { news: newsResult, photos: photosResult, username: String(user.disp), - greeting: 'Уведомление о событиях на PastVu' + greeting: 'Notification about events on PastVu' }), - text: totalNewestComments + - (totalNewestComments === 1 ? ' новый коментарий' : ' новых ' + - (totalNewestComments < 5 ? 'комментария' : 'комментариев')) + text: totalNewestComments + ' new comment' + (totalNewestComments > 1 ? 's' : '') }); } From 8b17482858d910b1066c664c8f1d47d4c81faa7b Mon Sep 17 00:00:00 2001 From: klimashkin Date: Sun, 25 Oct 2015 18:44:33 -0700 Subject: [PATCH 02/85] Translate admin section --- controllers/region.js | 2 +- public/js/module/admin/conveyer.js | 6 +-- public/js/module/admin/region.js | 76 +++++++++++++-------------- public/js/module/admin/regionCheck.js | 6 +-- public/js/module/admin/submenu.js | 12 ++--- views/module/admin/conveyer.jade | 30 +++++------ views/module/admin/main.jade | 34 ++++++------ views/module/admin/newsEdit.jade | 20 +++---- views/module/admin/region.jade | 60 ++++++++++----------- views/module/admin/regionCheck.jade | 8 +-- views/module/admin/regionList.jade | 28 +++++----- views/module/map/mapClusterCalc.jade | 10 ++-- 12 files changed, 146 insertions(+), 146 deletions(-) diff --git a/controllers/region.js b/controllers/region.js index 182cb9ffc..93fd46b87 100644 --- a/controllers/region.js +++ b/controllers/region.js @@ -1116,7 +1116,7 @@ async function giveRegionsByGeo(iAm, data) { } data.geo = data.geo.reverse(); - const regions = await getRegionsByGeoPoint(data.geo, { _id: 0, cid: 1, title_local: 1, parents: 1 }); + const regions = await getRegionsByGeoPoint(data.geo, { _id: 0, cid: 1, title_en: 1, parents: 1 }); if (_.isEmpty(regions)) { throw { message: msg.noregions }; diff --git a/public/js/module/admin/conveyer.js b/public/js/module/admin/conveyer.js index cac60b2ab..0f33b24cb 100644 --- a/public/js/module/admin/conveyer.js +++ b/public/js/module/admin/conveyer.js @@ -379,7 +379,7 @@ define([ }, series: [ { - name: 'Фотографий в очереди', + name: 'Photos in the queue', data: this.conveyerLengthData, tooltip: { valueDecimals: 0 @@ -393,7 +393,7 @@ define([ }, series: [ { - name: 'Фотографий конвертированно', + name: 'Converted photos', data: this.conveyerConvertData, tooltip: { valueDecimals: 0 @@ -434,7 +434,7 @@ define([ window.noty( { - text: 'Конвейер будет очищен.
Подтвердить операцию?', + text: 'The conveyor will be cleared.
Confirm the operation?', type: 'confirm', layout: 'center', modal: true, diff --git a/public/js/module/admin/region.js b/public/js/module/admin/region.js index a31a60e79..0e0ee5ad1 100644 --- a/public/js/module/admin/region.js +++ b/public/js/module/admin/region.js @@ -336,7 +336,7 @@ define([ //Создание маркера центра региона centerMarkerCreate: function () { var _this = this; - this.centerMarker = L.marker(this.region.center(), {draggable: true, title: 'Центр региона', icon: L.icon({iconSize: [26, 43], iconAnchor: [13, 36], iconUrl: '/img/map/pinEdit.png', className: 'centerMarker'})}) + this.centerMarker = L.marker(this.region.center(), {draggable: true, title: 'Center of region', icon: L.icon({iconSize: [26, 43], iconAnchor: [13, 36], iconUrl: '/img/map/pinEdit.png', className: 'centerMarker'})}) .on('dragstart', function () { _this.region.centerAuto(false); _this.centerValid(true); @@ -467,7 +467,7 @@ define([ parentIsChanged; if (!saveData.geo) { - window.noty({text: 'GeoJSON обязателен!', type: 'error', layout: 'center', timeout: 2000, force: true}); + window.noty({text: 'GeoJSON is mandatory!', type: 'error', layout: 'center', timeout: 2000, force: true}); return false; } if (saveData.geo === this.geoStringOrigin) { @@ -475,7 +475,7 @@ define([ } if (!saveData.title_en) { - window.noty({text: 'Нужно заполнить английское название', type: 'error', layout: 'center', timeout: 2000, force: true}); + window.noty({text: 'It is necessary to fill in English name', type: 'error', layout: 'center', timeout: 2000, force: true}); return false; } @@ -489,7 +489,7 @@ define([ if (this.haveParent() === '1') { saveData.parent = Number(this.parentCid()); if (!saveData.parent) { - window.noty({text: 'Если уровень региона ниже Страны, необходимо указать номер родительского региона!', type: 'error', layout: 'center', timeout: 5000, force: true}); + window.noty({text: 'If the level is below the country level, you must specify the id of the parent region!', type: 'error', layout: 'center', timeout: 5000, force: true}); return false; } } else { @@ -513,7 +513,7 @@ define([ var resultStat = data && data.resultStat; if (!error) { - var msg = 'Регион ' + this.region.title_local() + ' успешно ' + (parentIsChanged ? 'перенесён и ' : '') + 'сохранен
', + var msg = 'Region ' + this.region.title_en() + ' has been successfully ' + (parentIsChanged ? 'transferred and ' : '') + 'saved
', geoChangePhotosCount; if (resultStat && Object.keys(resultStat).length) { @@ -521,27 +521,27 @@ define([ geoChangePhotosCount = resultStat.photosCountAfterGeo - resultStat.photosCountBeforeGeo; if (geoChangePhotosCount) { - msg += '
' + Math.abs(geoChangePhotosCount) + ' фотографий ' + (geoChangePhotosCount > 0 ? 'добавлено в регион' : 'удалено из региона') + ' вследствии изменения коордиант поолигона.'; + msg += '
' + Math.abs(geoChangePhotosCount) + ' photos are ' + (geoChangePhotosCount > 0 ? 'added to the region' : 'removed from the region') + ' because of polygon coordinates changing.'; } } if (typeof resultStat.commentsCountBefore === 'number' && typeof resultStat.commentsCountAfter === 'number') { geoChangePhotosCount = resultStat.commentsCountAfter - resultStat.commentsCountBefore; if (geoChangePhotosCount) { - msg += '
' + Math.abs(geoChangePhotosCount) + ' комментариев ' + (geoChangePhotosCount > 0 ? 'добавлено в регион' : 'удалено из региона') + ' вследствии переноса фотографий.'; + msg += '
' + Math.abs(geoChangePhotosCount) + ' comments are ' + (geoChangePhotosCount > 0 ? 'added to the region' : 'removed from the region') + ' because of photos transfer.'; } } if (resultStat.affectedPhotos) { - msg += '
' + resultStat.affectedPhotos + ' фотографий переехали по дереву вслед за регионом.'; + msg += '
' + resultStat.affectedPhotos + ' photos have been moved following the region.'; } if (resultStat.affectedComments) { - msg += '
' + resultStat.affectedComments + ' комментариев переехали вслед за своими фотографиями.'; + msg += '
' + resultStat.affectedComments + ' comments have been moved following their photos. '; } if (resultStat.affectedUsers) { - msg += '
У ' + resultStat.affectedUsers + ' пользователей были сокрашены "Мои регионы".'; + msg += '
' + resultStat.affectedUsers + ' users have been reduced in "my regions" count.'; } if (resultStat.affectedMods) { - msg += '
У ' + resultStat.affectedMods + ' модераторов были сокрашены модерируемые регионы.'; + msg += '
' + resultStat.affectedMods + ' moderators have been reduced moderators regions.'; } } window.noty({text: msg, type: 'alert', layout: 'center', force: true, @@ -588,25 +588,25 @@ define([ this.exe(true); var cid = this.region.cid(), - title = this.region.title_local(), + title = this.region.title_en(), regionParent, that = this, childLenArr = this.childLenArr(), - msg = 'Регион ' + title + ' будет удален
'; + msg = 'Region ' + title + ' will be removed
'; if (childLenArr.length) { - msg += '
Также будут удалено ' + childLenArr.reduce(function (previousValue, currentValue) { + msg += '
Also ' + childLenArr.reduce(function (previousValue, currentValue) { return previousValue + currentValue; - }) + ' дочерних регионов
'; + }) + '
children regions will be removed
'; } - msg += 'Все объекты, входящие в этот регион и в дочерние, '; + msg += 'All objects within the region and it children, '; if (!this.region.parents().length) { - msg += 'будут присвоены Открытому морю
'; + msg += 'will be assigned to the Open sea
'; } else { regionParent = _.last(this.region.parents()); - msg += 'остануться в вышестоящем регионе ' + regionParent.title_local() + '
'; + msg += 'will remain in upper region ' + regionParent.title_en() + '
'; } - msg += '
Это может занять несколько минут. Подтверждаете?
Операция продолжит выполняться даже при закрытии браузера'; + msg += '
It may take a few minutes. Confirm?
The operation continues to run even if you close your browser'; window.noty( { @@ -622,18 +622,18 @@ define([ speed: 500 }, buttons: [ - {addClass: 'btn btn-danger', text: 'Да', onClick: function ($noty) { + {addClass: 'btn btn-danger', text: 'Yes', onClick: function ($noty) { $noty.close(); window.noty( { - text: 'Изменения будут необратимы.
Вы действительно хотите удалить регион ' + title + '?', + text: 'The changes will be irreversible.
Are you sure you want to delete the region ' + title + '?', type: 'confirm', layout: 'center', modal: true, force: true, buttons: [ - {addClass: 'btn btn-danger', text: 'Да', onClick: function ($noty) { + {addClass: 'btn btn-danger', text: 'Yes', onClick: function ($noty) { // this = button element // $noty = $noty element if ($noty.$buttons && $noty.$buttons.find) { @@ -648,23 +648,23 @@ define([ .off('click'); if (data && !data.error) { - msg = 'Регион ' + title + ' успешно удалён
'; + msg = 'Region ' + title + ' removed successfully
'; if (data.affectedPhotos) { - msg += '' + data.affectedPhotos + ' фотографий сменили региональную принадлежность.
'; + msg += '' + data.affectedPhotos + ' photo have been changed their regions.
'; } if (data.affectedComments) { - msg += '' + data.affectedComments + ' комментариев сменили региональную принадлежность вслед за своими фотографиями.
'; + msg += '' + data.affectedComments + ' comments have been moved following their photos.
'; } if (data.homeAffectedUsers) { - msg += 'У ' + data.homeAffectedUsers + ' пользователей домашние регионы были заменены на ' + data.homeReplacedWith.title_en + ' (номер ' + data.homeReplacedWith.cid + ').
'; + msg += '' + data.homeAffectedUsers + ' users chenged theire home regions to ' + data.homeReplacedWith.title_en + ' (id ' + data.homeReplacedWith.cid + ').
'; } if (data.affectedUsers) { - msg += 'У ' + data.affectedUsers + ' пользователей были сокрашены "Мои регионы".
'; + msg += '' + data.affectedUsers + ' users have been reduced in "my regions" count.
'; } if (data.affectedMods) { - msg += 'У ' + data.affectedMods + ' модераторов были сокрашены модерируемые регионы.'; + msg += '' + data.affectedMods + ' moderators have been reduced moderators regions.'; if (data.affectedModsLose) { - msg += 'Из них ' + data.affectedModsLose + ' пользователей лишились роли модератора.'; + msg += '' + data.affectedModsLose + ' of them lost moderation status.'; } msg += '
'; } @@ -688,7 +688,7 @@ define([ socket.emit('removeRegion', {cid: cid}); }}, - {addClass: 'btn btn-success', text: 'Нет', onClick: function ($noty) { + {addClass: 'btn btn-success', text: 'No', onClick: function ($noty) { $noty.close(); that.exe(false); }} @@ -696,7 +696,7 @@ define([ } ); }}, - {addClass: 'btn btn-primary', text: 'Отмена', onClick: function ($noty) { + {addClass: 'btn btn-primary', text: 'Cancel', onClick: function ($noty) { $noty.close(); that.exe(false); }} @@ -706,16 +706,16 @@ define([ return false; }, changeParentWarn: function (cb, ctx) { - var msg = 'Вы хотите поменять положение региона в иерархии.', + var msg = 'You want to change the position of the region in the hierarchy.', childLenArr = this.childLenArr(); if (childLenArr.length) { - msg += '
При этом также будут перенесены ' + childLenArr.reduce(function (previousValue, currentValue) { + msg += '
Also will be moved ' + childLenArr.reduce(function (previousValue, currentValue) { return previousValue + currentValue; - }) + ' дочерних регионов
'; + }) + '
child regions
'; } - msg += '
У пользователей, одновременно подписанных на переносимые регионы и их новые родительские, подписка на переносимые будет удалена, т.к. подписка родительских включает и дочерние регионы. То же касается региональных модераторских прав.'; - msg += '
Это может занять несколько минут. Подтверждаете?
Операция продолжит выполняться даже при закрытии браузера'; + msg += '
Users, who signed on moved regions and their new parents, subscription on moved will be removed, because subscription includes parent and child regions. The same applies to regional moderator permissions.'; + msg += '
It may take a few minutes. Confirm?
The operation continues to run even if you close your browser'; window.noty( { @@ -725,11 +725,11 @@ define([ modal: true, force: true, buttons: [ - {addClass: 'btn btn-warning', text: 'Да', onClick: function ($noty) { + {addClass: 'btn btn-warning', text: 'Yes', onClick: function ($noty) { cb.call(ctx, true); $noty.close(); }}, - {addClass: 'btn btn-success', text: 'Нет', onClick: function ($noty) { + {addClass: 'btn btn-success', text: 'No', onClick: function ($noty) { cb.call(ctx, false); $noty.close(); }} diff --git a/public/js/module/admin/regionCheck.js b/public/js/module/admin/regionCheck.js index d36208463..18de512e9 100644 --- a/public/js/module/admin/regionCheck.js +++ b/public/js/module/admin/regionCheck.js @@ -22,7 +22,7 @@ define([ "{{=it.geo}}
" + "PastVuGoogle" + "" + - "{{~it.parr :value:index}}{{=value.title_local}}
{{~}}" + + "{{~it.parr :value:index}}{{=value.title_en}}
{{~}}" + "" + "{{~it.garr :value:index}}{{=value}}
{{~}}" + "" + @@ -122,7 +122,7 @@ define([ this.map.panTo(geo); this.goToGeo(geo); } else { - window.noty({text: 'Неверный формат', type: 'error', layout: 'center', timeout: 1000, force: true}); + window.noty({text: 'Incorrect format', type: 'error', layout: 'center', timeout: 1000, force: true}); } }, goToGeo: function (geo) { @@ -135,7 +135,7 @@ define([ this.updateRegion(geo); }, markerCreate: function (geo) { - this.marker = L.marker(geo, {draggable: true, title: 'Точка для проверки региона', icon: L.icon({iconSize: [26, 43], iconAnchor: [13, 36], popupAnchor: [0, -36], iconUrl: '/img/map/pinEdit.png', className: 'pointMarkerEdit'})}) + this.marker = L.marker(geo, {draggable: true, title: 'Point for region check', icon: L.icon({iconSize: [26, 43], iconAnchor: [13, 36], popupAnchor: [0, -36], iconUrl: '/img/map/pinEdit.png', className: 'pointMarkerEdit'})}) .on('dragstart', function () { this.updateRegionAbort(); this.marker.closePopup(); diff --git a/public/js/module/admin/submenu.js b/public/js/module/admin/submenu.js index a95b100f5..ddbf8964e 100644 --- a/public/js/module/admin/submenu.js +++ b/public/js/module/admin/submenu.js @@ -12,18 +12,18 @@ define(['underscore', 'knockout', 'm/_moduleCliche', 'globalVM', 'text!tpl/admin this.submenus = { index: [ - { name: 'Главная', href: '/admin', section: 'main' }, - { name: 'Новости', href: '/admin/news', section: 'news' } + { name: 'Main', href: '/admin', section: 'main' }, + { name: 'News', href: '/admin/news', section: 'news' } ], map: [ - { name: 'Кластеры', href: '/admin/map/cluster', section: 'cluster' } + { name: 'Clusters', href: '/admin/map/cluster', section: 'cluster' } ], photo: [ - { name: 'Конвейер конвертаций', href: '/admin/photo/conveyer', section: 'conveyer' } + { name: 'Conversions conveyor', href: '/admin/photo/conveyer', section: 'conveyer' } ], region: [ - { name: 'Список и просмотр', href: '/admin/region', section: 'region' }, - { name: 'Проверка по точке', href: '/admin/region/check', section: 'regionCheck' } + { name: 'List and view', href: '/admin/region', section: 'region' }, + { name: 'Check by point', href: '/admin/region/check', section: 'regionCheck' } ] }; diff --git a/views/module/admin/conveyer.jade b/views/module/admin/conveyer.jade index 84b828dad..5a2ede876 100644 --- a/views/module/admin/conveyer.jade +++ b/views/module/admin/conveyer.jade @@ -1,45 +1,45 @@ .conveyerModuleWrapper(data-bind="with: repository[M!M]") - h4 Управление конвейером конвертаций фотографий + h4 Conveyor control .row .col-xs-5.col-md-4 - h5 Действия + h5 Actions button.btn.btn-sm(type="button", data-bind="css: {disabled: exe(), 'btn-warning': conveyerEnabled(), 'btn-success': !conveyerEnabled()}, click: startstop, attr: {disabled: exe()}") span.glyphicon(data-bind="css: {'glyphicon-stop': conveyerEnabled(), 'glyphicon-play': !conveyerEnabled()}") - span(data-bind="text: conveyerEnabled() ? ' Остановить' : ' Запустить'") + span(data-bind="text: conveyerEnabled() ? ' Stop' : ' Start'") button.btn.btn-sm.btn-danger(type="button", data-bind="css: {disabled: exe()}, click: clearConveyer, attr: {disabled: exe()}") span.glyphicon.glyphicon-trash - | Очистить + | Clear br br .toConvertSection - h5 Отправить на конвертацию все фото: + h5 Send to convert all photos: form.form-inline .form-group - | Номера фотографий:  + | Photos id:  input.form-control(type="number", placeholder="min", data-bind="attr: {disabled: exe()}, value: reconvertCidMin, valueUpdate: 'afterkeydown'", style="width: 70px;") input.form-control(type="number", placeholder="max", data-bind="attr: {disabled: exe()}, value: reconvertCidMax, valueUpdate: 'afterkeydown'", style="width: 70px;") |   form.form-inline .form-group - | Номер региона:  + | Region id:  input.form-control(type="number", data-bind="attr: {disabled: exe()}, value: reconvertRegion, valueUpdate: 'afterkeydown'", style="width: 70px;") |   - button.btn.btn-primary(data-bind="click: toConvert, attr: {disabled: exe()}") Cтарт + button.btn.btn-primary(data-bind="click: toConvert, attr: {disabled: exe()}") Start .col-xs-7.col-md-8(style="padding-left: 10px;") - h5 Текущее состояние конвейера - div(data-bind="css: {'text-success': conveyerEnabled(), 'text-error': !conveyerEnabled()}, text: conveyerEnabled() ? 'Конвейер активен' : 'Конвейер остановлен'") + h5 The current state of the conveyor + div(data-bind="css: {'text-success': conveyerEnabled(), 'text-error': !conveyerEnabled()}, text: conveyerEnabled() ? 'Conveyor is active' : 'Conveyor is stopped'") div span.stateRate(data-bind="text:converted()") - span.stateDesc Конвертированно с песледней 10-минутки + span.stateDesc Converted since last 10-minute div span.stateRate(data-bind="text:clength()") - span.stateDesc Длина конвейера + span.stateDesc Conveyor length div span.stateRate(data-bind="text:cmaxlength()") - span.stateDesc Максимальная длина конвейера с песледней 10-минутки + span.stateDesc Maximum conveyor length since last 10-minute br - h5 Сконвертированно + h5 Converted #conveyerConvertGraph br - h5 Максимальная длина конвейера + h5 Maximum conveyor length #conveyerLengthGraph \ No newline at end of file diff --git a/views/module/admin/main.jade b/views/module/admin/main.jade index 5bcb3aa8a..215d7dd98 100644 --- a/views/module/admin/main.jade +++ b/views/module/admin/main.jade @@ -1,5 +1,5 @@ .mainAdmin(data-bind="with: repository[M!M]") - h6 Текущие соединения + h6 Current connections div span.stateRate .rate(data-bind="text: onlines.users()") @@ -7,7 +7,7 @@ .rate(data-bind="text: (onlines.all() - onlines.users())") | / .rate(data-bind="text: onlines.all()") - span.stateDesc Посетителей авторизованных/анонимных/всего + span.stateDesc Visitors authorised/anonymous/total div span.stateRate .rate(data-bind="text: onlines.sessUC()") @@ -15,7 +15,7 @@ .rate(data-bind="text: onlines.sessAC()") | / .rate(data-bind="text: (onlines.sessUC() + onlines.sessAC())") - span.stateDesc(data-bind="text: 'Активных сессий авторизованных/анонимных/всего. С нулем соединений: [' + onlines.sessUZC() + '/' + onlines.sessAZC() + ']. Без соединений: [' + onlines.sessUNC() + '/' + onlines.sessANC() + '].'") + span.stateDesc(data-bind="text: 'Active sessionsauthorised/anonymous/total. With zero connections: [' + onlines.sessUZC() + '/' + onlines.sessAZC() + ']. With no connections: [' + onlines.sessUNC() + '/' + onlines.sessANC() + '].'") div span.stateRate @@ -24,7 +24,7 @@ .rate(data-bind="text: onlines.sessWCAC()") | / .rate(data-bind="text: (onlines.sessWCUC() + onlines.sessWCAC())") - span.stateDesc Ожидающих сессий авторизованных/анонимных/всего + span.stateDesc Sessions waiting connections authorised/anonymous/total div span.stateRate .rate(data-bind="text: onlines.sockUC()") @@ -32,9 +32,9 @@ .rate(data-bind="text: onlines.sockAC()") | / .rate(data-bind="text: (onlines.sockUC() + onlines.sockAC())") - span.stateDesc Активных соединений авторизованных/анонимных/всего + span.stateDesc Active connections authorised/anonymous/total div - span.stateDesc Хэши объектов пользователя в памяти:  + span.stateDesc Map of user objects in memory:  span.stateRate | usSid: .rate(data-bind="text: ' '+ onlines.cusSid()") @@ -43,7 +43,7 @@ | , usId: .rate(data-bind="text: ' '+ onlines.cusId()") div - span.stateDesc Хэши сессий в памяти:  + span.stateDesc Map of sessions in memory:  span.stateRate | sessConnected: .rate(data-bind="text: ' '+ onlines.csessConnected()") @@ -52,23 +52,23 @@ | , sessWaitingSelect: .rate(data-bind="text: ' '+ onlines.csessWaitingSelect()") .desc - strong Активная сессия - | - один браузер клиента с открытым pastvu хотябы на одной вкладке. Если есть с нулем соединений, значит закрытие соединения не очистило сессию (норма по нулям). Если есть без соединения, значит сессия проскочила в активную без установки реального соединения (норма по нулям). + strong Active session + | - one client browser with opened pastvu at least in one tab. If exists with zero connections, means that connection closing didn't clear session (should not be). If without connection, means session jumped in active state without socket connection (should not be). br - strong Ожидающая сессия - | - клиент, прошедший рукопожатие (handshake), но не установивший в дальнейшем реального соединения. Такая сессия удаляется через 5 минут, если соединение так и не будет установлено. + strong Waiting session + | - client passed handshake, but still have no reac socket connection. Such session remove in 5 minutes if connection would not established. br - strong Активное соединение - | - каждая открытая клиентом вкладка активной сессии + strong Active connection + | - every opened browser tab of active session br br - | В каждой сессии (браузере) клиента может быть несколько открытых соединений (вкладок) + | In each client session (broeser) can be several opened connections (tabs) br - | Пользователь, авторизованный (залогиненный) в нескольких браузерах одновременно, считается как один, но имеет несколько сессий, по количеству открытых браузеров. Поэтому "активных сессий авторизованных" может быть больше числа авторизованных. + | User, who authorised in several browser at the same time, counts as one, but have several sessions according the number of open browsers. That's why number of active authorised sessions may be more then number of authorised br //ko if: headers().length - h6 Заголовки АКТИВНЫХ сессий без соединений (при наличии): + h6 Headers of ACTIVE sessions without connections (if exists): div(data-bind="foreach: headers") | ------- .headers(data-bind="html: $data") @@ -76,7 +76,7 @@ // /ko //ko if: headersWC().length - h6 Заголовки ОЖИАЮЩИХ сессий без соединений (при наличии): + h6 Headers of WAITING sessions without connections (if exists): div(data-bind="foreach: headersWC") | ------- .headers(data-bind="html: $data") diff --git a/views/module/admin/newsEdit.jade b/views/module/admin/newsEdit.jade index f6555a3e5..2c3409319 100644 --- a/views/module/admin/newsEdit.jade +++ b/views/module/admin/newsEdit.jade @@ -1,21 +1,21 @@ .adminNews(data-bind="with: repository[M!M]") - h4(data-bind="text: createMode() ? 'Создание новости' : 'Редактирование новости'") + h4(data-bind="text: createMode() ? 'News creation' : 'News edit'") form.form-horizontal(action='', autocomplete="off", method='POST', data-bind="event: {submit: submit}") .form-group - label.col-xs-3.col-md-2.col-lg-1.control-label Заголовок + label.col-xs-3.col-md-2.col-lg-1.control-label Title .col-xs-3.col-md-2 input.form-control(type='text', data-bind="value: news.title, valueUpdate: 'afterkeydown'") .form-group - label.col-xs-3.col-md-2.col-lg-1.control-label Публикация + label.col-xs-3.col-md-2.col-lg-1.control-label Publish .col-xs-3.col-md-2 .input-group.date#newsPdate input.form-control(data-format="DD.MM.YYYY HH:mm:ss", type="text") span.input-group-addon span.glyphicon.glyphicon-calendar .col-xs-4.col-md-3(style="text-align: right;") - button.btn.btn-sm.btn-primary.toggleTDate(type="button", title="Время, когда новость пропадет с главной. В общем списке она останется", data-bind="click: toggleTDate") - span(data-bind="text: tDateExists() ? 'Убрать время скрытия с главной' : 'Добавить время скрытия с главной'") + button.btn.btn-sm.btn-primary.toggleTDate(type="button", title="The time when the news will disappear from the main page. In the general list it will remain", data-bind="click: toggleTDate") + span(data-bind="text: tDateExists() ? 'Remove hidding time from the main page' : 'Add hidding time from the main page'") //ko if: tDateExists() .col-xs-3.col-md-2 .input-group.date#newsTdate @@ -28,21 +28,21 @@ .checkbox label input(type="checkbox", data-bind="checked: news.nocomments") - | Без комментариев + | Without comments .form-group .textName button.btn.btn-sm.btn-primary.toggleNotice(type="button", data-bind="click: toggleNotice") - span(data-bind="text: noticeExists() ? 'Убрать краткую версию' : 'Добавить краткую версию'") + span(data-bind="text: noticeExists() ? 'Remove short version' : 'Add short version'") //ko if: noticeExists() - span.text-muted Краткая версия + span.text-muted Short version // /ko //ko if: noticeExists() textarea#newsNotice // /ko .form-group - .textName Полная версия + .textName Full version textarea#newsPrimary .form-group button.btn.btn-success(type="submit") span.glyphicon.glyphicon-ok - | Сохранить \ No newline at end of file + | Save \ No newline at end of file diff --git a/views/module/admin/region.jade b/views/module/admin/region.jade index 22449468c..7395b2cdf 100644 --- a/views/module/admin/region.jade +++ b/views/module/admin/region.jade @@ -1,47 +1,47 @@ .adminRegion(data-bind="with: repository[M!M]") - h4(data-bind="text: createMode() ? 'Создание региона' : 'Редактирование региона'") + h4(data-bind="text: createMode() ? 'Region creation' : 'Region editing'") form.form-horizontal(action='', autocomplete="off", method='POST', data-bind="event: {submit: save}") .form-group - label.col-xs-4.col-sm-3.col-lg-2.control-label Название + label.col-xs-4.col-sm-3.col-lg-2.control-label Title .col-xs-3.col-sm-2 - input.form-control(type='text', data-bind="value: region.title_en, valueUpdate: 'keyup'", placeholder="(EN) Английское", required="required", autocorrect="off", autocapitalize="off") + input.form-control(type='text', data-bind="value: region.title_en, valueUpdate: 'keyup'", placeholder="(EN) English", required="required", autocorrect="off", autocapitalize="off") .col-xs-3.col-sm-2 - input.form-control(type='text', data-bind="value: region.title_local, valueUpdate: 'keyup'", placeholder="(RU) Русское", autocorrect="off", autocapitalize="off") + input.form-control(type='text', data-bind="value: region.title_local, valueUpdate: 'keyup'", placeholder="(RU) Russian", autocorrect="off", autocapitalize="off") //ko if: !createMode() .form-group label.col-xs-4.col-sm-3.col-lg-2.control-label .col-xs-8.col-sm-9.col-lg-10 p.form-control-static - | Номер: + | Id: strong(data-bind="text: ' ' + region.cid()") - | ; Уровень: + | ; Level: strong(data-bind="text: ' ' + (Number(haveParent()) ? region.parents().length + 1 : 1)") - | ; Полигонов: + | ; Polygon count: strong(data-bind="text: ' ' + formatNum(region.polynum.exterior())") //ko if: region.polynum.interior() | (+ strong(data-bind="text: formatNum(region.polynum.interior())") - | выколотых) + | outter) // /ko - | ; Вершин: + | ; Vertex count: strong(data-bind="text: ' ' + (formatNum(region.pointsnum() - region.polynum.exterior() - region.polynum.interior()))") | ;  - a(data-bind="attr: {href: '/admin/region?hl=' + region.cid()}") Показать в дереве регионов + a(data-bind="attr: {href: '/admin/region?hl=' + region.cid()}") Show in regions tree // /ko .form-group - label.col-xs-4.col-sm-3.col-lg-2.control-label Родительский регион + label.col-xs-4.col-sm-3.col-lg-2.control-label Parent region .col-xs-6.col-sm-4 .row .col-xs-8.col-sm-9.col-md-8.col-lg-6 label.radio-inline input.thr(type="radio", id="parent_radios_0", name="parent_radios", value="0", data-bind="checked: haveParent") - | Отсутствует + | Is absent label.radio-inline input.thr(type="radio", id="parent_radios_1", name="parent_radios", value="1", data-bind="checked: haveParent") - | Есть + | Exists //ko if: Number(haveParent()) .col-xs-4.col-sm-3.col-lg-3 - input.form-control(type='text', data-bind="value: parentCid, valueUpdate: 'keyup'", placeholder="Номер родительского региона", required="required", autocorrect="off", autocapitalize="off") + input.form-control(type='text', data-bind="value: parentCid, valueUpdate: 'keyup'", placeholder="Id of perent region", required="required", autocorrect="off", autocapitalize="off") // /ko //ko if: region.parents().length || childLenArr().length .form-group @@ -55,7 +55,7 @@ |   // /ko //ko if: !createMode() - span.current(title="Текущий регион", data-bind="text: ' ' + region.title_en()") + span.current(title="Current region", data-bind="text: ' ' + region.title_en()") // /ko //ko foreach: childLenArr |   @@ -64,33 +64,33 @@ // /ko // /ko .form-group - label.col-xs-4.col-sm-3.col-lg-2.control-label Доп. параметры + label.col-xs-4.col-sm-3.col-lg-2.control-label Additional parameters .col-xs-8.col-sm-9.col-lg-10(style="padding-top: 3px") .dopparam - abbr(title="Центральная точка региона в его домашнем положении") Центр + abbr(title="The central point of the region in it home position") Center | : - input.form-control.input-sm.center(type="text", data-bind="centerInput: true, attr: {readonly: region.centerAuto(), placeholder: region.centerAuto() ? 'Пока не рассчитан' : 'Не задан'}, css: {invalid: !region.centerAuto() && !centerValid()}") + input.form-control.input-sm.center(type="text", data-bind="centerInput: true, attr: {readonly: region.centerAuto(), placeholder: region.centerAuto() ? 'Not yet calculated' : 'Not specified'}, css: {invalid: !region.centerAuto() && !centerValid()}") .btn-group.btn-group-sm - button.btn.btn-primary.yes(type="button", data-bind="css: {active: region.centerAuto()}, click: centerAutoToggle") Авто - button.btn.btn-primary.no(type="button", data-bind="css: {active: !region.centerAuto()}, click: centerAutoToggle") Вручную + button.btn.btn-primary.yes(type="button", data-bind="css: {active: region.centerAuto()}, click: centerAutoToggle") Auto + button.btn.btn-primary.no(type="button", data-bind="css: {active: !region.centerAuto()}, click: centerAutoToggle") Manual br .dopparam - abbr(title="Bounding box - прямоугольник, в который целиком вписан регион") Bbox + abbr(title="Bounding box - rectangle in which entire region is fits") Bbox | : - input.form-control.input-sm.bbox(type="text", readonly, data-bind="attr: {value: region.bbox() ? region.bbox().join(', ') : ''}", placeholder="Пока не рассчитан") + input.form-control.input-sm.bbox(type="text", readonly, data-bind="attr: {value: region.bbox() ? region.bbox().join(', ') : ''}", placeholder="Not yet calculated") .dopparam - abbr(title="Прямоугольник, который должен быть виден в домашнем положении карты для данного региона. Нужен для расчета масштаба") Bbox дом + abbr(title="The rectangle that should be visible in the home position of the map. We need to calculate the scale") Bbox home | .: .btn-group.btn-group-sm - button.btn.btn-primary.yes(type="button", data-bind="css: {active: bboxAuto()}, click: bboxHomeToggle") Как bbox - button.btn.btn-primary.no(type="button", data-bind="css: {active: !bboxAuto()}, click: bboxHomeToggle") Вручную + button.btn.btn-primary.yes(type="button", data-bind="css: {active: bboxAuto()}, click: bboxHomeToggle") As bbox + button.btn.btn-primary.no(type="button", data-bind="css: {active: !bboxAuto()}, click: bboxHomeToggle") Manual //ko if: !bboxAuto() - input.form-control.input-sm.bbox(type="text", data-bind="bboxhomeInput: true, attr: {readonly: bboxAuto()}, css: {invalid: !bboxAuto() && !bboxhomeValid()}", placeholder="Не задан") + input.form-control.input-sm.bbox(type="text", data-bind="bboxhomeInput: true, attr: {readonly: bboxAuto()}, css: {invalid: !bboxAuto() && !bboxhomeValid()}", placeholder="Not specified") // /ko //ko if: createMode() || showGeo() .form-group label.col-xs-4.col-sm-3.col-lg-2.control-label - | Геометрия + | Geometry br | GeoJSON .col-xs-8.col-sm-9.col-lg-10 @@ -99,13 +99,13 @@ .form-group button.btn.btn-success(type="submit", data-bind="attr: {disabled: exe()}") span.glyphicon.glyphicon-ok - | Сохранить + | Save button.btn.btn-danger(type="button", data-bind="click: remove, attr: {disabled: exe()}") span.glyphicon.glyphicon-remove - | Удалить + | Remove //ko if: !createMode() button.btn.btn-primary(type="button", data-bind="click: function () {showGeo(!showGeo())}, attr: {disabled: exe()}") span.glyphicon.glyphicon-th-list - span(data-bind="text: showGeo() ? ' Скрыть координаты' : ' Показать координаты'") + span(data-bind="text: showGeo() ? ' Hide coordinates' : ' Show coordinates'") // /ko .map(data-bind="style: {height: mh()}") diff --git a/views/module/admin/regionCheck.jade b/views/module/admin/regionCheck.jade index e67540802..ba26c0799 100644 --- a/views/module/admin/regionCheck.jade +++ b/views/module/admin/regionCheck.jade @@ -1,13 +1,13 @@ .adminRegionCheck(data-bind="with: repository[M!M]") - h4 Поиск регионов по точке + h4 Regions search by point coordinates .topinfo - span.infotxt Кликните на карту или введите координаты через запятую: + span.infotxt Click on the map or enter the coordinates separated by commas: .inputGeoWrap .input-group - input.form-control.input-sm.inputGeo(type="text", data-bind="event: {keyup: inputEnter}", placeholder="Широта, долгота") + input.form-control.input-sm.inputGeo(type="text", data-bind="event: {keyup: inputEnter}", placeholder="Latitude, Longitude") span.input-group-addon(data-bind="click: inputGeo") span.glyphicon.glyphicon-screenshot .extlnk - span.infotxt Ссылка на отображаемую точку: + span.infotxt Link to the point: input.form-control.input-sm.inputLink(type="text", onclick="this.select();", readonly, data-bind="value: location.host + location.pathname + link()") .map(data-bind="style: {height: mh()}") \ No newline at end of file diff --git a/views/module/admin/regionList.jade b/views/module/admin/regionList.jade index 6dd6735b0..58d402f3d 100644 --- a/views/module/admin/regionList.jade +++ b/views/module/admin/regionList.jade @@ -1,36 +1,36 @@ .adminRegions(data-bind="with: repository[M!M]") - h4 Список регионов + h4 List of regions .regionsStat .stat - span Всего регионов: + span Total regions count: b(data-bind="text: ' '+formatNum(stat.common.regionsCount)") - span   По уровням: + span   By level: //ko foreach: stat.byLevel //ko if: $index() > 0 span.glyphicon.glyphicon-play // /ko - b(data-bind="text: ' ' + $parent.formatNum($data.regionsCount) + ' ', attr: {title: ($index() + 1) + ' уровень'}") + b(data-bind="text: ' ' + $parent.formatNum($data.regionsCount) + ' ', attr: {title: ($index() + 1) + ' level'}") // /ko .stat - span Всего вершин: + span Total vertex count: b(data-bind="text: ' '+formatNum(stat.common.pointsCount)") - span   По уровням: + span   By level: //ko foreach: stat.byLevel //ko if: $index() > 0 span.glyphicon.glyphicon-play // /ko - b(data-bind="text: ' ' + $parent.formatNum($data.pointsCount) + ' ', attr: {title: ($index() + 1) + ' уровень'}") + b(data-bind="text: ' ' + $parent.formatNum($data.pointsCount) + ' ', attr: {title: ($index() + 1) + ' level'}") // /ko .regionsHead a.headElem.interact(href="/admin/region/create") span.glyphicon.glyphicon-plus - | Добавить + | Add .headElem.interact(data-bind="click: expandAll") span.glyphicon.glyphicon-chevron-down - | Раскрыть все + | Expand all .headElem.interact(data-bind="click: collapseAll") span.glyphicon.glyphicon-chevron-up - | Свернуть все + | Collapse all .tree.well.well-sm ul(data-bind="template: {name: 'treeNode', foreach: regions}") @@ -38,10 +38,10 @@ li(data-bind="css: {isparent: $data.childLen}") .lirow(data-bind="css: {hl: $data.hl}") //ko if: $data.childLen - .chevron(data-bind="click: $parents[$data.level].collapseToggle, attr: {title: ($data.opened() ? 'Скрыть' : 'Показать') + ' дочерние регионы'}") + .chevron(data-bind="click: $parents[$data.level].collapseToggle, attr: {title: ($data.opened() ? 'Hide' : 'Show') + ' children regions'}") span.glyphicon(data-bind="css: {'glyphicon-chevron-up': $data.opened(), 'glyphicon-chevron-down': !$data.opened()}") // /ko - a.name(title="Открыть регион", data-bind="attr: {href: '/admin/region/' + $data.cid}") + a.name(title="Open region", data-bind="attr: {href: '/admin/region/' + $data.cid}") span.glyphicon.glyphicon-globe span(data-bind="text: ' ' + $data.title_local") //ko if: $data.childLen @@ -53,9 +53,9 @@ // /ko // /ko //ko if: $data.level < 5 - a.addChild(title="Создать дочерний регион", data-bind="attr: {href: '/admin/region/create?parent=' + $data.cid}") + a.addChild(title="Create shild region", data-bind="attr: {href: '/admin/region/create?parent=' + $data.cid}") span.glyphicon.glyphicon-plus - | Добавить потомка + | Add descendant // /ko //ko if: $data.childLen && $data.opened() //ko template: {name: 'treeNode', foreach: $data.regions} diff --git a/views/module/map/mapClusterCalc.jade b/views/module/map/mapClusterCalc.jade index 98941ff84..917db6839 100644 --- a/views/module/map/mapClusterCalc.jade +++ b/views/module/map/mapClusterCalc.jade @@ -1,6 +1,6 @@ .mapModuleWrapper(data-bind="with: repository[M!M]") - h3 Параметры размера кластера - p Для установки нового размера кластера, захватите прозрачный прямоугольник на карте и перемещайте его или его границу в необходимых пределах. Для приенения изменений нажмите кнопку Сохранить. + h4 Cluster size parameters + p To set a new cluster size, grab a transparent rectangle on the map and move it or its borders to the extent necessary. To apply your changes, click Save. .mapContainer(data-bind="css: {}") .map .clusterContainer @@ -17,10 +17,10 @@ // /ko // /ko dl.dl-horizontal - dt(data-bind="text: 'Текущие размеры:'") + dt(data-bind="text: 'Current sizes:'") dd(data-bind="text: '' + wCurr() + ' x ' + hCurr() + ''") dl.dl-horizontal(data-bind="style: {display: changed() ? '' : 'none'}") - dt(data-bind="text: 'Новые размеры:'") + dt(data-bind="text: 'New sizes:'") dd(data-bind="text: '' + wNew() + ' x ' + hNew() + ''") .clusterButt(data-bind="style: {display: changed() ? '' : 'none'}") button.btn.btn-primary.btnSave(type="button", data-bind="css: {disabled: exe()}, click: save, attr: {disabled: exe()}") @@ -29,6 +29,6 @@ button.btn.btn-warning.btnSave(type="button", data-bind="click: cancel") span.glyphicon.glyphicon-exclamation-sign | Cancel - p(style="margin-top: 6px; margin-bottom: 0;", data-bind="style: {display: exe() && changed() ? '' : 'none'}") Процесс расчета новых параметров на разных уровнях зума: + p(style="margin-top: 6px; margin-bottom: 0;", data-bind="style: {display: exe() && changed() ? '' : 'none'}") The process of calculating the new parameters at different levels of zoom: .progress.progress-striped.active(data-bind="style: {display: exe() && changed() ? '' : 'none'}") .progress-bar.progress-bar-success(data-bind="style: {width: exePercent() + '%'}") \ No newline at end of file From c80f1aaa44f9c27208a4e4e620e82ce064515b5b Mon Sep 17 00:00:00 2001 From: klimashkin Date: Sun, 25 Oct 2015 19:14:38 -0700 Subject: [PATCH 03/85] Translate comment section --- public/js/module/comment/comments.js | 42 +++++++++++++-------------- public/js/module/comment/hist.js | 6 ++-- views/module/comment/cdotadd.jade | 18 ++++++------ views/module/comment/cdotanonym.jade | 4 +-- views/module/comment/cdotauth.jade | 10 +++---- views/module/comment/cdotdel.jade | 4 +-- views/module/comment/cdotdelopen.jade | 6 ++-- views/module/comment/comments.jade | 20 ++++++------- views/module/comment/hist.jade | 22 +++++++------- 9 files changed, 66 insertions(+), 66 deletions(-) diff --git a/public/js/module/comment/comments.js b/public/js/module/comment/comments.js index 77fdb3eab..eab812473 100644 --- a/public/js/module/comment/comments.js +++ b/public/js/module/comment/comments.js @@ -317,7 +317,7 @@ define(['underscore', 'underscore.string', 'Browser', 'Utils', 'socket!', 'Param socket.once('subscrResult', function (result) { if (!result || result.error) { window.noty({ - text: result && result.message || 'Ошибка подписки', + text: result && result.message || 'Subscription error', type: 'error', layout: 'center', timeout: 2000, @@ -696,7 +696,7 @@ define(['underscore', 'underscore.string', 'Browser', 'Utils', 'socket!', 'Param if ($withContent.length) { window.noty({ - text: 'У вас есть незавершенный комментарий. Отправьте или отмените его и переходите к новому', + text: 'Do you have an incomplete comment. Send or cancel it and move on to new', type: 'warning', layout: 'center', timeout: 3000, @@ -790,7 +790,7 @@ define(['underscore', 'underscore.string', 'Browser', 'Utils', 'socket!', 'Param action += '.own'; } - this.reasonSelect(action, 'Причина удаления', function (cancel, reason) { + this.reasonSelect(action, 'Removing reason', function (cancel, reason) { if (cancel) { $('.hlRemove', this.$cmts).removeClass('hlRemove'); return; @@ -848,7 +848,7 @@ define(['underscore', 'underscore.string', 'Browser', 'Utils', 'socket!', 'Param } if (count > 1) { - msg = 'Удалено комментариев: ' + count + ',
от ' + result.countUsers + ' пользователя(ей)'; + msg = '' + count + ' comments are removed,
from ' + result.countUsers + ' user(s)'; } ga('send', 'event', 'comment', 'delete', 'comment delete success', count); } else { @@ -876,7 +876,7 @@ define(['underscore', 'underscore.string', 'Browser', 'Utils', 'socket!', 'Param $('[data-origin="' + cid + '"]', that.$cmts).add($c).addClass('hlRestore'); window.noty({ - text: 'Восстановить комментарий и его потомков, которые были удалены вместе с ним
(подсвечены зеленым)?', + text: 'Restore comment and his children that were deleted along with it
(highlighted in green)?', type: 'confirm', layout: 'center', modal: true, @@ -889,7 +889,7 @@ define(['underscore', 'underscore.string', 'Browser', 'Utils', 'socket!', 'Param }, buttons: [ { - addClass: 'btn btn-success', text: 'Да', onClick: function ($noty) { + addClass: 'btn btn-success', text: 'Yes', onClick: function ($noty) { if (restoring) { return; } @@ -944,7 +944,7 @@ define(['underscore', 'underscore.string', 'Browser', 'Utils', 'socket!', 'Param } }, { - addClass: 'btn btn-warning', text: 'Отмена', onClick: function ($noty) { + addClass: 'btn btn-warning', text: 'Cancel', onClick: function ($noty) { $('.hlRestore', that.$cmts).removeClass('hlRestore'); $noty.close(); } @@ -972,7 +972,7 @@ define(['underscore', 'underscore.string', 'Browser', 'Utils', 'socket!', 'Param if (error) { console.error(data && data.message || 'No comments data received'); - $('.delico', $c).removeClass('loading').html('Показать'); + $('.delico', $c).removeClass('loading').html('Show'); that.loadingDel = false; } else { that.usersRanks(data.users); @@ -1044,14 +1044,14 @@ define(['underscore', 'underscore.string', 'Browser', 'Utils', 'socket!', 'Param maxWidthRatio: 0.75, animateScale: true, offIcon: { - text: 'Отмена', click: function () { + text: 'Cancel', click: function () { cb.call(ctx, true); this.reasonDestroy(); }, ctx: this }, btns: [ { - css: 'btn-warning', text: 'Выполнить', glyphicon: 'glyphicon-ok', click: function () { + css: 'btn-warning', text: 'Execute', glyphicon: 'glyphicon-ok', click: function () { var reason = this.reasonVM.getReason(); if (reason) { cb.call(ctx, null, reason); @@ -1060,7 +1060,7 @@ define(['underscore', 'underscore.string', 'Browser', 'Utils', 'socket!', 'Param }, ctx: this }, { - css: 'btn-success', text: 'Отмена', click: function () { + css: 'btn-success', text: 'Cancel', click: function () { cb.call(ctx, true); this.reasonDestroy(); }, ctx: this @@ -1159,11 +1159,11 @@ define(['underscore', 'underscore.string', 'Browser', 'Utils', 'socket!', 'Param $cparent; if (!result) { - window.noty({ text: 'Ошибка отправки комментария', type: 'error', layout: 'center', timeout: 2000, force: true }); + window.noty({ text: 'Comment sending error', type: 'error', layout: 'center', timeout: 2000, force: true }); } else { if (result.error || !result.comment) { window.noty({ - text: result.message || 'Ошибка отправки комментария', + text: result.message || 'Comment sending error', type: 'error', layout: 'center', timeout: 2000, @@ -1238,11 +1238,11 @@ define(['underscore', 'underscore.string', 'Browser', 'Utils', 'socket!', 'Param socket.once('updateCommentResult', function (result) { if (!result) { - window.noty({ text: 'Ошибка редактирования комментария', type: 'error', layout: 'center', timeout: 2000, force: true }); + window.noty({ text: 'Comment editing error', type: 'error', layout: 'center', timeout: 2000, force: true }); } else { if (result.error || !result.comment) { window.noty({ - text: result.message || 'Ошибка редактирования комментария', + text: result.message || 'Comment editing error', type: 'error', layout: 'center', timeout: 2000, @@ -1314,12 +1314,12 @@ define(['underscore', 'underscore.string', 'Browser', 'Utils', 'socket!', 'Param module: 'm/comment/hist', options: { cid: cid, type: this.type }, modal: { - topic: 'История изменений комментария', + topic: 'History of comment changes', animateScale: true, curtainClick: { click: this.closeHistory, ctx: this }, - offIcon: { text: 'Закрыть', click: this.closeHistory, ctx: this }, + offIcon: { text: 'Close', click: this.closeHistory, ctx: this }, btns: [ - { css: 'btn-primary', text: 'Закрыть', click: this.closeHistory, ctx: this } + { css: 'btn-primary', text: 'Close', click: this.closeHistory, ctx: this } ] }, callback: function (vm) { @@ -1432,7 +1432,7 @@ define(['underscore', 'underscore.string', 'Browser', 'Utils', 'socket!', 'Param this.navScrollCounterOn(); } else { // Если дерево еще скрыто, т.е. receive еще не было, просто пишем сколько новых комментариев ниже - $('.navigator .down', this.$dom).addClass('active').find('.navTxt').attr('title', 'Следующий непрочитанный комментарий').text(this.countNew()); + $('.navigator .down', this.$dom).addClass('active').find('.navTxt').attr('title', 'Next unread comment').text(this.countNew()); this.navScrollCounterOff(); } } else { @@ -1484,11 +1484,11 @@ define(['underscore', 'underscore.string', 'Browser', 'Utils', 'socket!', 'Param up.classList[upCount ? 'add' : 'remove']('active'); up.querySelector('.navTxt').innerHTML = upCount ? upCount : ''; - up[upCount ? 'setAttribute' : 'removeAttribute']('title', 'Предыдущий непрочитанный комментарий'); + up[upCount ? 'setAttribute' : 'removeAttribute']('title', 'Previous unread comment'); down.classList[downCount ? 'add' : 'remove']('active'); down.querySelector('.navTxt').innerHTML = downCount ? downCount : ''; - down[downCount ? 'setAttribute' : 'removeAttribute']('title', 'Следующий непрочитанный комментарий'); + down[downCount ? 'setAttribute' : 'removeAttribute']('title', 'Next unread comment'); } }); }); \ No newline at end of file diff --git a/public/js/module/comment/hist.js b/public/js/module/comment/hist.js index db96e4839..117dc5f71 100644 --- a/public/js/module/comment/hist.js +++ b/public/js/module/comment/hist.js @@ -6,9 +6,9 @@ define(['underscore', 'Utils', 'socket!', 'Params', 'knockout', 'knockout.mappin 'use strict'; var tplHist, changeFragTexts = { - f1: ' Добавлен фрагмент', - f2: ' Изменен фрагмент', - f3: ' Удален фрагмент' + f1: ' Fragment is added', + f2: ' Fragment is changed', + f3: ' Fragment is removed' }; return Cliche.extend({ diff --git a/views/module/comment/cdotadd.jade b/views/module/comment/cdotadd.jade index 1eb1d40f8..73c27dd7a 100644 --- a/views/module/comment/cdotadd.jade +++ b/views/module/comment/cdotadd.jade @@ -8,36 +8,36 @@ textarea.form-control.cinput(wrap="soft", maxlength="12000") .cinputLabel | {{?it.level}} - | Нажмите, чтобы написать комментарий + | Push to write comment | {{??}} - | Нажмите, чтобы написать комментарий первого уровня + | Push to write first level comment br - small(style="font-style: italic") Чтобы ответить на существующий комментарий, нажмите под ним Ответить + small(style="font-style: italic") To reply to existing comment, click Reply beneath it | {{?}} form.form-inline button.btn.btn-success.btn-sm.btnCommentSend(type="button", data-bind="click: send, attr: {disabled: exe()}") span.glyphicon.glyphicon-comment - | Отправить + | Send button.btn.btn-warning.btn-sm.btnCommentCancel(type="button", data-bind="click: cancel, attr: {disabled: exe()}") span.glyphicon.glyphicon-remove - | Отмена + | Cancel // ko if: canFrag button.btn.btn-primary.btn-sm.btnCommentFrag(type="button", data-bind="click: fragClick, attr: {disabled: exe()}") span.glyphicon.glyphicon-picture - | Фрагмент + | Fragment // ko if: fraging() button.btn.btn-primary.btn-sm.btnCommentFragDel(type="button", data-bind="click: fragDelete, attr: {disabled: exe()}") span.glyphicon.glyphicon-remove - | Очистить фрагмент + | Clear fragment // /ko // /ko .checkbox.replySubscr // ko if: subscr() - | Вы подписаны на новые комментарии в данной теме + | You are subscribed to new comments in this topic // /ko // ko ifnot: subscr() //- Устанавливаем checked как атрибут, чтобы его нажатие не изменяло настройку пользователя label input.chkSubscr(type="checkbox", data-bind="attr:{checked: auth.iAm.settings.subscr_auto_reply() ? 'checked' : null}, event: {click: chkSubscrClickBind}") - span(style="vertical-align: top;") Подписаться на тему + span(style="vertical-align: top;") Subscribe to topic // /ko \ No newline at end of file diff --git a/views/module/comment/cdotanonym.jade b/views/module/comment/cdotanonym.jade index 492bd12c5..f1c6ac626 100644 --- a/views/module/comment/cdotanonym.jade +++ b/views/module/comment/cdotanonym.jade @@ -14,12 +14,12 @@ .dotDelimeter · a.frag(href="{{='?hl=frag-'+c.cid}}") span.glyphicon.glyphicon-picture - | Комментируемый фрагмент + | Commented fragment | {{?}} .dotDelimeter · a.stamp(data-replace="true", href="{{='?hl=comment-'+c.cid}}") {{=it.fDate(new Date(c.stamp))}} | {{?c.lastChanged}} .dotDelimeter · - .changed(title="Показать историю изменений") {{='Изменен '+it.fDateIn(new Date(c.lastChanged))}} + .changed(title="Show history of changes") {{='Изменен '+it.fDateIn(new Date(c.lastChanged))}} | {{?}} .ctext {{=c.txt}} \ No newline at end of file diff --git a/views/module/comment/cdotauth.jade b/views/module/comment/cdotauth.jade index 4eb86ac4c..117ec1e9f 100644 --- a/views/module/comment/cdotauth.jade +++ b/views/module/comment/cdotauth.jade @@ -17,25 +17,25 @@ .dotDelimeter · a.frag(href="{{='?hl=frag-'+c.cid}}") span.glyphicon.glyphicon-picture - | Комментируемый фрагмент + | Commented fragment | {{?}} .dotDelimeter · a.stamp(data-replace="true", href="?hl=comment-{{=c.cid}}") {{=it.fDate(new Date(c.stamp))}} | {{?c.lastChanged}} .dotDelimeter · - .changed(title="Показать историю изменений") {{='Изменен '+it.fDateIn(new Date(c.lastChanged))}} + .changed(title="Show history of changes") {{='Изменен '+it.fDateIn(new Date(c.lastChanged))}} | {{?}} .ctext {{=c.txt}} | {{?it.reply}} .cacts - span.cact.reply Ответить + span.cact.reply Reply | {{?it.mod || c.can.edit}} .dotDelimeter · - span.cact.edit Редактировать + span.cact.edit Edit | {{?}} | {{?it.mod || c.can.del}} .dotDelimeter · - span.cact.remove Удалить + span.cact.remove Remove | {{?}} | {{?}} | {{?}} \ No newline at end of file diff --git a/views/module/comment/cdotdel.jade b/views/module/comment/cdotdel.jade index 67b16ffe1..2d1a23b76 100644 --- a/views/module/comment/cdotdel.jade +++ b/views/module/comment/cdotdel.jade @@ -1,5 +1,5 @@ .c.cdel(id="c{{=c.cid}}", class="l{{=c.level}}") - .delico Показать + .delico Show .cbody .chead a(class="author", href="{{='/u/'+c.user.login}}") {{=c.user.disp}} @@ -9,4 +9,4 @@ .dotDelimeter · a.stamp(data-replace="true", href="{{='?hl=comment-'+c.cid}}") {{=it.fDate(new Date(c.stamp))}} .dotDelimeter · - .changed(title="Показать историю изменений") {{='Комментарий удален '+it.fDateIn(new Date(c.lastChanged))}} \ No newline at end of file + .changed(title="Show history of changes") {{='Comment was removed at '+it.fDateIn(new Date(c.lastChanged))}} \ No newline at end of file diff --git a/views/module/comment/cdotdelopen.jade b/views/module/comment/cdotdelopen.jade index 0f470b960..b96886d0d 100644 --- a/views/module/comment/cdotdelopen.jade +++ b/views/module/comment/cdotdelopen.jade @@ -13,13 +13,13 @@ .dotDelimeter · a(class="stamp{{?c.delroot!==true}} dis{{?}}", data-replace="true", href="{{= c.delroot===true ? ('?hl=comment-'+c.cid) : 'javascript: void(0)'}}") {{=it.fDate(new Date(c.stamp))}} .dotDelimeter · - .changed(title="Показать историю изменений") {{='Удален '+it.fDateIn(new Date(c.lastChanged))}} + .changed(title="Show history of changes") {{='Removed at '+it.fDateIn(new Date(c.lastChanged))}} .ctext {{=c.txt}} | {{?c.delroot===true}} .cacts - span.cact.hidedel Свернуть + span.cact.hidedel Roll up | {{?it.mod}} .dotDelimeter · - span.cact.restore Восстановить + span.cact.restore Restore | {{?}} | {{?}} \ No newline at end of file diff --git a/views/module/comment/comments.jade b/views/module/comment/comments.jade index 8b48807eb..8d9e8b606 100644 --- a/views/module/comment/comments.jade +++ b/views/module/comment/comments.jade @@ -1,28 +1,28 @@ .fullComments(data-bind="with: repository[M!M]") .cmtsHead - a.count.headElem.interact(href="?hl=comments", data-replace="true", data-bind="html: count() + (countNew() ? ' +' + countNew() + '' : '')", title="Ссылка на область комментариев") + a.count.headElem.interact(href="?hl=comments", data-replace="true", data-bind="html: count() + (countNew() ? ' +' + countNew() + '' : '')", title="Link to the comments area") //ko if: canReply() - .addZero.headElem.interact.strokeBefore(data-bind="click: replyZero", title="Добавить комментарий первого уровня") + .addZero.headElem.interact.strokeBefore(data-bind="click: replyZero", title="Add first level comment") span.glyphicon.glyphicon-edit - | Добавить + | Add // /ko //ko if: !auth.loggedIn() - .addZero.headElem.interact.strokeBefore(data-bind="click: function(data, evt){auth.show('login')}", title="Кликните, чтобы войти или зарегистрироваться") + .addZero.headElem.interact.strokeBefore(data-bind="click: function(data, evt){auth.show('login')}", title="Click to login or register") span.glyphicon.glyphicon-log-in - | Войдите, чтобы поделиться мнением + | Log in to share your opinion // /ko //ko if: auth.loggedIn() - .commSubscr.headElem.interact.strokeBefore(data-bind="click: subscribe, css: {isSubscr: subscr()}, attr: {title: subscr() ? 'Вы подписаны на новые комментарии. Нажмите, чтобы отписаться' : 'Подписаться на новые комментарии'}") + .commSubscr.headElem.interact.strokeBefore(data-bind="click: subscribe, css: {isSubscr: subscr()}, attr: {title: subscr() ? 'You are subscribed for new comments. Click to unsubscribe' : 'Subscribe to new comments'}") span.glyphicon.glyphicon-envelope - span(data-bind="text: subscr() ? ' Отписаться' : ' Подписаться'") + span(data-bind="text: subscr() ? ' Subscribe' : ' Unsubscribe'") // /ko //ko if: canModerate() - .noComments.headElem.interact(data-bind="click: setNoComments, attr: {title: (nocomments() ? 'Разрешить' : 'Запретить')+' дальнейшее комментирование'}") + .noComments.headElem.interact(data-bind="click: setNoComments, attr: {title: (nocomments() ? 'Allow' : 'Disallow')+' further commenting'}") span.glyphicon(data-bind="css: nocomments() ? 'glyphicon-ok-sign' : 'glyphicon-minus-sign'") - span(data-bind="text: nocomments() ? ' Разрешить комментирование' : ' Запретить комментирование'") + span(data-bind="text: nocomments() ? ' Allow commenting' : ' Disallow commenting'") // /ko //ko if: auth.loggedIn() && nocomments() - span.cantComment Комментирование запрещено + span.cantComment Commenting is not allowed // /ko .commentsLoad(data-bind="style: {display: loading() ? '' : 'none'}")   diff --git a/views/module/comment/hist.jade b/views/module/comment/hist.jade index 18ea7e9dc..174403fa1 100644 --- a/views/module/comment/hist.jade +++ b/views/module/comment/hist.jade @@ -11,10 +11,10 @@ | {{?h.role}} |   .role - | {{?h.role===5}}как модератор - | {{?h.roleregion}} региона  - a(target="_blank", href="{{='/ps?f=r!' + h.roleregion.cid}}") {{=h.roleregion.title_local}}{{?}} - | {{??h.role>9}}как администратор{{?}} + | {{?h.role===5}}as moderator + | {{?h.roleregion}} of region  + a(target="_blank", href="{{='/ps?f=r!' + h.roleregion.cid}}") {{=h.roleregion.title_en}}{{?}} + | {{??h.role>9}}as administrator{{?}} | {{?}} .dotDelimeter · .histStamp {{=it.fDate(new Date(h.stamp))}} @@ -22,26 +22,26 @@ | {{?h.del}} .info.red span.glyphicon.glyphicon-remove - | Комментарий удален + | Comment is removed .histText | {{?h.del.origin || h.del.reason && h.del.reason.cid}} div - .histCat Причина: - | {{?h.del.origin}} Удаление родительского комментария  + .histCat Reason: + | {{?h.del.origin}} Removing of parent comment  a(href="?hl=comment-{{=h.del.origin}}") {{='#'+h.del.origin}} | {{??!!h.del.reason.title}} {{=h.del.reason.title}}{{?}} | {{?}} | {{?h.del.reason && h.del.reason.desc}} div - .histCat Описание: + .histCat Description: | {{=h.del.reason.desc}} | {{?}} | {{??h.restore}} .info.green span.glyphicon.glyphicon-repeat - | Комментарий восстановлен + | Comment is restored | {{??}} | {{?h.frag}} @@ -52,9 +52,9 @@ | {{?h.txtd}} .info span.glyphicon.glyphicon-pencil - | Отредактирован текст + | Text is edited // ko with: hist_id[{{=h.id}}] - .txtSwitch(data-bind="text: showdiff() ? 'Скрыть подсветку разницы' : 'Показать разницу', click: function () {showdiff(!showdiff())}") + .txtSwitch(data-bind="text: showdiff() ? 'Hide difference highlighting' : 'Show difference', click: function () {showdiff(!showdiff())}") .histText(data-bind="html: showdiff() ? txtd : txt") // /ko | {{??}} From cb77837b0594e042e7315191141f3680e996e923 Mon Sep 17 00:00:00 2001 From: klimashkin Date: Sun, 25 Oct 2015 20:28:20 -0700 Subject: [PATCH 04/85] Translate common section --- public/js/module/common/auth.js | 2 +- public/js/module/common/dummy.js | 2 +- public/js/module/common/foot.js | 6 +- public/js/module/common/reason.js | 2 +- views/module/common/auth.jade | 100 +++++++++++++++--------------- views/module/common/foot.jade | 4 +- views/module/common/reason.jade | 2 +- views/module/common/share.jade | 6 +- views/module/common/top.jade | 14 ++--- 9 files changed, 69 insertions(+), 69 deletions(-) diff --git a/public/js/module/common/auth.js b/public/js/module/common/auth.js index cc284cee1..e98f17e86 100644 --- a/public/js/module/common/auth.js +++ b/public/js/module/common/auth.js @@ -410,7 +410,7 @@ define(['underscore', 'jquery', 'Utils', 'socket!', 'Params', 'knockout', 'm/_mo try { socket.once('logoutCommand', function (data) { if (data.error) { - window.noty({text: data.noconnect ? data.message : 'При попытке выхода возникла ошибка', type: 'error', layout: 'center', timeout: 4000, force: true}); + window.noty({text: data.noconnect ? data.message : 'Error', type: 'error', layout: 'center', timeout: 4000, force: true}); console.log('Logout error: ' + data.message); } diff --git a/public/js/module/common/dummy.js b/public/js/module/common/dummy.js index d3ba768d6..5cee26d97 100644 --- a/public/js/module/common/dummy.js +++ b/public/js/module/common/dummy.js @@ -8,7 +8,7 @@ define(['jquery', 'Utils', 'Params', 'globalVM', 'knockout', 'm/_moduleCliche', return Cliche.extend({ jade: jade, create: function () { - this.dummytext = ko.observable('Заглушка'); + this.dummytext = ko.observable('Dummy'); } }); diff --git a/public/js/module/common/foot.js b/public/js/module/common/foot.js index 0b6fd4c98..704b5767d 100644 --- a/public/js/module/common/foot.js +++ b/public/js/module/common/foot.js @@ -28,13 +28,13 @@ define(['underscore', 'Params', 'knockout', 'm/_moduleCliche', 'globalVM', 'rend { module: 'm/diff/about', modal: { - topic: 'О проекте', + topic: 'About', initWidth: '1000px', animateScale: true, curtainClick: {click: this.closeAbout, ctx: this}, - offIcon: {text: 'Закрыть', click: this.closeAbout, ctx: this}, + offIcon: {text: 'Close', click: this.closeAbout, ctx: this}, btns: [ - {css: 'btn-primary', text: 'Закрыть', click: this.closeAbout, ctx: this} + {css: 'btn-primary', text: 'close', click: this.closeAbout, ctx: this} ] }, callback: function (vm) { diff --git a/public/js/module/common/reason.js b/public/js/module/common/reason.js index e6f5476cf..8764f6e01 100644 --- a/public/js/module/common/reason.js +++ b/public/js/module/common/reason.js @@ -89,7 +89,7 @@ define(['underscore', 'jquery', 'Utils', 'socket!', 'Params', 'globalVM', 'knock descmax = selected.desc.max || 1000; if (desc.length < descmin || desc.length > descmax) { - this.errMsg('Длина описания должна быть в пределах ' + descmin + ' - ' + descmax + ' символов'); + this.errMsg('Description length must be between ' + descmin + ' and ' + descmax + ' symbols'); return false; } return { cid: cid, desc: desc }; diff --git a/views/module/common/auth.jade b/views/module/common/auth.jade index 03a591941..24361c7cd 100644 --- a/views/module/common/auth.jade +++ b/views/module/common/auth.jade @@ -10,44 +10,44 @@ .head Авторизация .form-group dl.dl-horizontal - dt Имя пользователя: + dt Username: dd - span(data-bind="click: function () {mode('reg')}") Регистрация + span(data-bind="click: function () {mode('reg')}") Registration .inputwrap span.glyphicon.glyphicon-user input.form-control(autocomplete="on", type="text", required="required", placeholder="Enter username or e-mail", name="login", autocorrect="off", autocapitalize="off") .form-group(style="margin-bottom:0;") dl.dl-horizontal - dt Пароль: + dt Password: dd - span(data-bind="click: function () {mode('recallRequest')}") Восстановить пароль + span(data-bind="click: function () {mode('recallRequest')}") Restore password .inputwrap span.glyphicon.glyphicon-lock input.form-control(type="password", required="required", placeholder="Enter password", name="pass", data-bind="event: {keypress: pressHandler}") .footnote - | Для безопасной работы на чужом компьютере, используйте приватную вкладку ( - a.lll(href="https://support.google.com/chrome/answer/95464", target="_blank") режим инкогнито + | For safe surfing on another computer, use a private tab ( + a.lll(href="https://support.google.com/chrome/answer/95464", target="_blank") incognito mode | ) .form-group(style="margin-bottom:20px;") - .text-warning.caps-warn(data-bind="style: {height: caps() ? '20px' : '0px'}"): span.glyphicon.glyphicon-warning-sign Caps Lock активен + .text-warning.caps-warn(data-bind="style: {height: caps() ? '20px' : '0px'}"): span.glyphicon.glyphicon-warning-sign Caps Lock is active .mess div(data-bind="text: msg()") .row.btnsAction .col-xs-6 - button.btn.btn-primary(type="submit") Вход + button.btn.btn-primary(type="submit") Lohin .col-xs-6.colright - button.btn.btn-primary(type="button", data-bind="click: formClose") Отмена + button.btn.btn-primary(type="button", data-bind="click: formClose") Cancel .cantLoging - a(href="", target="_blank", onclick="ga('send', 'event', 'support', 'click', 'support click login'); $(this).attr('href', 'mailto:support@pastvu.com?Subject=%5BНе%20могу%20войти%5D%20' + $(this).parents('form').find('[name=login]').val())") - | Не можете войти? + a(href="", target="_blank", onclick="ga('send', 'event', 'support', 'click', 'support click login'); $(this).attr('href', 'mailto:support@pastvu.com?Subject=%5BCant%20log%20in%5D%20' + $(this).parents('form').find('[name=login]').val())") + | You can not log in? | | | | | | | \ No newline at end of file diff --git a/views/module/common/foot.jade b/views/module/common/foot.jade index 026b02c72..d28e99005 100644 --- a/views/module/common/foot.jade +++ b/views/module/common/foot.jade @@ -1,8 +1,8 @@ .foot.fringe(data-bind="with: repository[M!M]") .rightSide.hide-text a.footElem.strokeAfter(href="mailto:support@pastvu.com", target="_blank", onclick="ga('send', 'event', 'support', 'click', 'support click common');") - | Поддержка: support@pastvu.com - .footElem.strokeAfter(data-bind="click: showAbout") О проекте + | Support: support@pastvu.com + .footElem.strokeAfter(data-bind="click: showAbout") About .footElem.copyright | PastVu  span.glyphicon.glyphicon-globe diff --git a/views/module/common/reason.jade b/views/module/common/reason.jade index affe1a6ea..046d1d409 100644 --- a/views/module/common/reason.jade +++ b/views/module/common/reason.jade @@ -10,7 +10,7 @@ .form-group //- Выводим заголовок описания, если он есть или это не свободное описание и вариантов выбора несколько //ko if: selected().desc.label || selections().length > 1 && Number(selected().cid) !== 0 - label.desclabel(for="desc", data-bind="html: selected().desc.label || ('Дополнительная информация' + (selected().desc.required ? '' : ' (опционально)'))") + label.desclabel(for="desc", data-bind="html: selected().desc.label || ('Additional info' + (selected().desc.required ? '' : ' (optional)'))") // /ko textarea#desc.form-control(data-bind="value: desc, attr: {placeholder: selected().desc.placeholder || '', minLength: minLength(), maxlength: selected().desc.max || '1000'}", style="resize: vertical;") .form-group diff --git a/views/module/common/share.jade b/views/module/common/share.jade index b1ce8cd25..2d3a6f986 100644 --- a/views/module/common/share.jade +++ b/views/module/common/share.jade @@ -1,6 +1,6 @@ .share(data-bind="with: repository[M!M]") .shareBlock - .shareName Разместить в социальных сетях + .shareName Share in social networks .socials //ko foreach: {data:socials, as: 'social'} .social(data-bind="click: social.action, style: {backgroundImage: 'url(\"'+ social.icon + '\")'}, attr: {title: social.name}") @@ -8,7 +8,7 @@ //ko if: options.linkPage hr .shareBlock - .shareName Ссылка на страницу + .shareName Link to this page .inputWrap(data-bind="style: {width: (location.host+options.linkPage).length * 7 + 30 + 'px'}") //-.input-group.input-group-sm input.form-control.inputLink(type="url", readonly, data-bind="click: linkClick, value: location.host + options.linkPage", autocorrect="off", autocapitalize="off") @@ -18,7 +18,7 @@ //ko if: options.linkObject hr .shareBlock - .shareName Ссылка на изображение + .shareName Link to image .inputWrap(data-bind="style: {width: (location.host+options.linkObject).length * 7 + 'px'}") //-.input-group.input-group-sm input.form-control.inputLink(type="url", readonly, data-bind="click: linkClick, value: location.host + options.linkObject", autocorrect="off", autocapitalize="off") diff --git a/views/module/common/top.jade b/views/module/common/top.jade index 6f9363108..3a05c15d6 100644 --- a/views/module/common/top.jade +++ b/views/module/common/top.jade @@ -1,22 +1,22 @@ #top(data-bind="with: repository[M!M]") .fringe#panel - a#brand(href='/', title="PastVu - ретроспектива среды обитания человечества") + a#brand(href='/', title="PastVu - retro photo of mankind's habitat") img.logo(src="/img/misc/logo.png") img.name(src="/img/misc/name-2x.png", srcset="/img/misc/name.png 1x, /img/misc/name-2x.png 2x") #panelTools.hide-text //ko if: auth.loggedIn() a#toUpload.labledIco.strokeAfter(href="/photoUpload") .glyphicon.glyphicon-cloud-upload - .text Загрузить фото + .text Upload photo // /ko a#gallery.labledIco.strokeAfter(href="/ps") .glyphicon.glyphicon-picture - .text Галерея + .text Gallery //ko if: auth.loggedIn() //ko if: can.adm() a#toAdmin.labledIco.strokeAfter(href="/admin", target="_blank") .glyphicon.glyphicon-cog - .text Админ + .text Admin // /ko a#toProfile.labledIco(data-bind="attr:{href: '/u/'+auth.iAm.login()}") .ico.fringe(data-bind="style: {backgroundImage: 'url('+profileAvatar()+')'}") @@ -25,14 +25,14 @@ //ko if: !auth.loggedIn() #toRegister.labledIco(data-bind="click: function(data, evt){auth.show('reg')}") .ico - .text Регистрация + .text Registration #toLogIn.labledIco.strokeBefore.iconAfter(data-bind="click: function(data, evt){auth.show('login')}") - .text Вход + .text Login .ico // /ko //ko if: auth.loggedIn() #toLogOut.labledIco.strokeBefore.iconAfter(data-bind="click: function(data, evt){auth.doLogout()}") - .text Выход + .text Exit .ico // /ko #lang.labledIco.langFlag.strokeBefore(data-bind="style:{'backgroundImage': 'url(/img/misc/flags/' + lang() + '.svg)'}, click: langClick") From 457ee2198ae483ee96cc48818129c1c876a9a0c8 Mon Sep 17 00:00:00 2001 From: klimashkin Date: Sun, 25 Oct 2015 20:37:49 -0700 Subject: [PATCH 05/85] Translate diff section --- public/js/module/appAdmin.js | 2 +- public/js/module/appMain.js | 2 +- public/js/module/diff/news.js | 2 +- public/js/module/diff/newsList.js | 2 +- views/module/diff/about.jade | 26 +++++++++++++------------- views/module/diff/news.jade | 4 ++-- views/module/diff/newsList.jade | 10 +++++----- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/public/js/module/appAdmin.js b/public/js/module/appAdmin.js index 6abe438c5..406375288 100644 --- a/public/js/module/appAdmin.js +++ b/public/js/module/appAdmin.js @@ -137,7 +137,7 @@ require([ } }; - moment.lang('ru'); + moment.lang('en'); $('body').append(html); ko.applyBindings(globalVM); diff --git a/public/js/module/appMain.js b/public/js/module/appMain.js index 784f27183..5cf8a70ba 100644 --- a/public/js/module/appMain.js +++ b/public/js/module/appMain.js @@ -181,7 +181,7 @@ require([ } }; - moment.lang('ru'); + moment.lang('en'); $('body').append(html); ko.applyBindings(globalVM); diff --git a/public/js/module/diff/news.js b/public/js/module/diff/news.js index 3db43e3ed..b10d626df 100644 --- a/public/js/module/diff/news.js +++ b/public/js/module/diff/news.js @@ -5,7 +5,7 @@ define(['underscore', 'Utils', 'socket!', 'Params', 'knockout', 'knockout.mappin 'use strict'; var newsDefault = { pdate: new Date(), - title: 'Нет заголовка', + title: 'No title', txt: '', ccount: 0, ccount_new: 0, diff --git a/public/js/module/diff/newsList.js b/public/js/module/diff/newsList.js index 8053ecc73..ad0d620ab 100644 --- a/public/js/module/diff/newsList.js +++ b/public/js/module/diff/newsList.js @@ -45,7 +45,7 @@ define([ }, routeHandler: function () { this.getAllNews(function (data) { - Utils.title.setTitle({title: 'Новости'}); + Utils.title.setTitle({title: 'News'}); ga('send', 'pageview'); }); }, diff --git a/views/module/diff/about.jade b/views/module/diff/about.jade index c06bafe2a..dfdfb5bb2 100644 --- a/views/module/diff/about.jade +++ b/views/module/diff/about.jade @@ -1,6 +1,6 @@ .about(data-bind="with: repository[M!M]") header.line - | PastVu - проект по сбору свидетельств прошлого в фотографиях. Взгляд на историю среды обитания человечества. + | PastVu - project to collect vintage photographs. A look at the history of humanity habitat. .userrow hr .row.usercenter @@ -12,8 +12,8 @@ div.back(data-bind="style: {backgroundImage: 'url(/_a/d/' + avatars['Ilya'] + ')'}") | Ilya .lineBody - .humanName Илья Варламов - .humanAbout Автор оригинальной идеи + .humanName Ilya Varlamov + .humanAbout The author of the original idea a.line.clearfix(target="_blank", href="/u/Duche", ontouchstart="this.classList.toggle('hover');") .flip-container .flipper @@ -21,8 +21,8 @@ div.back(data-bind="style: {backgroundImage: 'url(/_a/d/' + avatars['Duche'] + ')'}") | Duche .lineBody - .humanName Алексей Дук - .humanAbout Продюсер проекта + .humanName Alex Duk + .humanAbout Producer of the project .col-xs-6 a.line.clearfix(target="_blank", href="/u/klimashkin", ontouchstart="this.classList.toggle('hover');") .flip-container @@ -31,8 +31,8 @@ div.back(data-bind="style: {backgroundImage: 'url(/_a/d/' + avatars['klimashkin'] + ')'}") | klimashkin .lineBody - .humanName Павел Климашкин - .humanAbout Архитектор проекта, создатель платформы + .humanName Pavel Klimashkin + .humanAbout Project's architect, platform creator a.line.clearfix(target="_blank", href="/u/dema501", ontouchstart="this.classList.toggle('hover');") .flip-container .flipper @@ -40,8 +40,8 @@ div.back(data-bind="style: {backgroundImage: 'url(/_a/d/' + avatars['dema501'] + ')'}") | dema501 .lineBody - .humanName Дмитрий Башлов - .humanAbout Системное администрирование + .humanName Dmitry Bashlov + .humanAbout System administration a.line.clearfix(target="_blank", href="/u/abdulla_hasan", ontouchstart="this.classList.toggle('hover');") .flip-container .flipper @@ -50,12 +50,12 @@ | abdulla_hasan .lineBody .humanName Anvar Paganini - .humanAbout Инфраструктура, CRM + .humanAbout Infrastructure, Client relations .postrow div - | Поддержать развитие проекта вы можете  - a.donate(target="_blank", href="http://planeta.ru/139975") на нашей официальной странице - |  в сервисе Planeta.ru + | To support the development of the project, you can go  + a.donate(target="_blank", href="http://planeta.ru/139975") to our page at + |  Planeta.ru .postrow hr img.poster(src="/img/loading/Loading1.jpg") diff --git a/views/module/diff/news.jade b/views/module/diff/news.jade index 827253bc9..fcd498b23 100644 --- a/views/module/diff/news.jade +++ b/views/module/diff/news.jade @@ -1,5 +1,5 @@ .newsApart(data-bind="with: repository[M!M]") - .newsHeader Новости проекта + .newsHeader Project news .news .novelAuthor @@ -17,7 +17,7 @@ .dotDelimeter · a.newsEdit(data-bind="attr: {href: '/admin/news/edit/' + news.cid()}") span.glyphicon.glyphicon-pencil - | Редактировать + | Edit // /ko .newsTxt(data-bind="html: news.txt()") hr diff --git a/views/module/diff/newsList.jade b/views/module/diff/newsList.jade index 415bf84bd..984b92219 100644 --- a/views/module/diff/newsList.jade +++ b/views/module/diff/newsList.jade @@ -1,10 +1,10 @@ .newsWrapper(data-bind="with: repository[M!M]") - .newsHeader Новости проекта + .newsHeader Project news //ko if: canEdit() .row a.addNews(href="/admin/news/create") span.glyphicon.glyphicon-plus - | Добавить новость + | Add news // /ko .news //ko foreach: news @@ -15,7 +15,7 @@ img(data-bind="attr: {src: $data.user.avatar}") .newsDate(data-bind="text: moment($data.pdate).format('D MMM YYYY')") //ko if: $data.ccount - a.comm(data-bind="html: $data.ccount + ($data.ccount_new ? ' +' + $data.ccount_new + '' : ''), attr: {href: '/news/' + $data.cid + '?hl=comments'}", title="Перейти к комментариям новости") + a.comm(data-bind="html: $data.ccount + ($data.ccount_new ? ' +' + $data.ccount_new + '' : ''), attr: {href: '/news/' + $data.cid + '?hl=comments'}", title="Jump to news comments") // /ko .newsBody .newsHead @@ -26,10 +26,10 @@ .dotDelimeter · a.newsEdit(data-bind="attr: {href: '/admin/news/edit/' + $data.cid}") span.glyphicon.glyphicon-pencil - | Редактировать + | Edit // /ko .newsNotice(data-bind="html: $data.notice, css: {expandable: $data.expand}") //ko if: $data.expand - a.newsExpand(data-bind="attr: {href: '/news/' + $data.cid}") [Читать полностью..] + a.newsExpand(data-bind="attr: {href: '/news/' + $data.cid}") [Read more..] // /ko // /ko \ No newline at end of file From e2cc3a63056689d88199198083c122fba5ea5ba8 Mon Sep 17 00:00:00 2001 From: klimashkin Date: Sun, 25 Oct 2015 20:40:08 -0700 Subject: [PATCH 06/85] moment lang in auth.js --- controllers/auth.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers/auth.js b/controllers/auth.js index 3c4d14c8f..951590ee7 100755 --- a/controllers/auth.js +++ b/controllers/auth.js @@ -27,7 +27,7 @@ const msg = { let recallTpl; let regTpl; -moment.lang('ru'); +moment.lang('en'); // Вход в систему function login(socket, data, cb) { @@ -185,7 +185,7 @@ function register(data, cb) { confirmKey, username: data.login, greeting: 'Thank you for registering on the PastVu project!', - linkvalid: moment.duration(ms('2d')).humanize() + ' (до ' + moment().utc().lang('ru').add(ms('2d')).format("LLL") + ')' + linkvalid: moment.duration(ms('2d')).humanize() + ' (till ' + moment().utc().lang('en').add(ms('2d')).format("LLL") + ')' }), text: 'Click the following link: ' + config.client.origin + '/confirm/' + confirmKey }); @@ -257,7 +257,7 @@ function recall(iAm, data, cb) { config, confirmKey, username: data.disp, - linkvalid: moment.duration(ms('2d')).humanize() + ' (до ' + moment().utc().lang('ru').add(ms('2d')).format("LLL") + ')' + linkvalid: moment.duration(ms('2d')).humanize() + ' (till ' + moment().utc().lang('en').add(ms('2d')).format("LLL") + ')' }), text: 'Click the following link: ' + config.client.origin + '/confirm/' + confirmKey }); From f71607df5993273804f0115ad615211e0316dd28 Mon Sep 17 00:00:00 2001 From: klimashkin Date: Sun, 25 Oct 2015 23:37:44 -0700 Subject: [PATCH 07/85] Translate main section --- public/js/module/main/bottomPanel.js | 36 ++++++++-------- public/js/module/main/mainPage.js | 2 +- views/module/main/bottomPanel.jade | 64 ++++++++++++++-------------- views/module/main/commentsFeed.jade | 2 +- 4 files changed, 53 insertions(+), 51 deletions(-) diff --git a/public/js/module/main/bottomPanel.js b/public/js/module/main/bottomPanel.js index 373d3a8e1..dcfdf6797 100644 --- a/public/js/module/main/bottomPanel.js +++ b/public/js/module/main/bottomPanel.js @@ -5,11 +5,11 @@ define(['underscore', 'Browser', 'Utils', 'socket!', 'Params', 'knockout', 'knoc 'use strict'; var catsObj = { - photosToApprove: {name: 'Ожидают подтверждения', tpl: 'photosTpl'}, - photos: {name: 'Новые фото', tpl: 'photosTpl'}, - photosNoGeo: {name: 'Где это?', tpl: 'photosTpl'}, - ratings: {name: 'Рейтинги', tpl: 'ratingsTpl'}, - stats: {name: 'Статистика', tpl: 'statsTpl'} + photosToApprove: {name: 'Awaiting confirmation', tpl: 'photosTpl'}, + photos: {name: 'New photos', tpl: 'photosTpl'}, + photosNoGeo: {name: 'Where is it?', tpl: 'photosTpl'}, + ratings: {name: 'Rating', tpl: 'ratingsTpl'}, + stats: {name: 'Statistic', tpl: 'statsTpl'} }, cats = [ 'photos', @@ -22,11 +22,11 @@ define(['underscore', 'Browser', 'Utils', 'socket!', 'Params', 'knockout', 'knoc ], imgFailTpl = _.template('
${ txt }
'), declension = { - user: [' пользователь', ' пользователя', ' пользователей'], - reg: [' зарегистрирован', ' зарегистрированых', ' зарегистрированых'], - photo: [' фотография', ' фотографии', ' фотографий'], - comment: [' комментарий', ' комментария', ' комментариев'], - view: [' просмотр', ' просмотра', ' просмотров'] + user: [' user'], + reg: [' registerd'], + photo: [' photo'], + comment: [' comment'], + view: [' view'] }; return Cliche.extend({ @@ -288,7 +288,7 @@ define(['underscore', 'Browser', 'Utils', 'socket!', 'Params', 'knockout', 'knoc } else { this.stats.all = data.all; this.stats.common = data.common; - this.stats.common.onlineTxt = 'Сейчас на сайте ' + data.common.onall + Utils.format.wordEndOfNum(data.common.onall, declension.user) + ', из них ' + data.common.onreg + Utils.format.wordEndOfNum(data.common.onall, declension.reg); + this.stats.common.onlineTxt = 'Now ' + data.common.onall + declension.user + (data.common.onall > 1 ? 's' : '') + ' is online, ' + data.common.onreg + ' of them are registered'; } success = true; } @@ -320,10 +320,11 @@ define(['underscore', 'Browser', 'Utils', 'socket!', 'Params', 'knockout', 'knoc photo.link = '/p/' + photo.cid; if (!photo.title) { - photo.title = 'Без названия'; + photo.title = 'Without title'; } if (numField && numFormat) { - photo.amount = photo[numField] + Utils.format.wordEndOfNum(photo[numField], numFormat); + var amount = photo[numField]; + photo.amount = amount + numFormat[0] + (amount > 1 ? 's' : ''); } if (regionsHash && photo.rs !== undefined) { for (j = photo.rs.length; j--;) { @@ -346,7 +347,8 @@ define(['underscore', 'Browser', 'Utils', 'socket!', 'Params', 'knockout', 'knoc user.link = '/u/' + user.login + (linkSection ? '/' + linkSection : ''); user.title = user.disp; if (numField && numFormat) { - user.amount = user[numField] + Utils.format.wordEndOfNum(user[numField], numFormat); + var amount = user[numField]; + user.amount = amount + numFormat[0] + (amount > 1 ? 's' : ''); } } return users; @@ -362,11 +364,11 @@ define(['underscore', 'Browser', 'Utils', 'socket!', 'Params', 'knockout', 'knoc event.target.style.visibility = 'hidden'; if (data.conv) { - content = imgFailTpl({style: 'margin-top:7px;padding-top:20px; background: url(/img/misc/photoConvWhite.png) 50% 0 no-repeat;', txt: 'Превью уже создается
пожалуйста, обновите позже'}); + content = imgFailTpl({style: 'margin-top:7px;padding-top:20px; background: url(/img/misc/photoConvWhite.png) 50% 0 no-repeat;', txt: 'Preview is creating
please update later'}); } else if (data.convqueue) { - content = imgFailTpl({style: 'margin-top:7px;', txt: '
Превью скоро будет создано'}); + content = imgFailTpl({style: 'margin-top:7px;', txt: '
Preview will be created soon'}); } else { - content = imgFailTpl({style: 'margin-top:7px;padding-top:25px; background: url(/img/misc/imgw.png) 50% 0 no-repeat;', txt: 'Превью недоступно'}); + content = imgFailTpl({style: 'margin-top:7px;padding-top:25px; background: url(/img/misc/imgw.png) 50% 0 no-repeat;', txt: 'Preview is unavailable'}); } $photoBox.append(content); parent.classList.add('showPrv'); diff --git a/public/js/module/main/mainPage.js b/public/js/module/main/mainPage.js index 56230558b..b43afb605 100644 --- a/public/js/module/main/mainPage.js +++ b/public/js/module/main/mainPage.js @@ -43,7 +43,7 @@ define(['underscore', 'Utils', 'Params', 'knockout', 'knockout.mapping', 'm/_mod this.show(); }, show: function () { - Utils.title.setTitle({title: 'Главная'}); + Utils.title.setTitle({title: 'Main'}); this.sizesCalc(); globalVM.func.showContainer(this.$container); this.showing = true; diff --git a/views/module/main/bottomPanel.jade b/views/module/main/bottomPanel.jade index 7347398bc..ba125932a 100644 --- a/views/module/main/bottomPanel.jade +++ b/views/module/main/bottomPanel.jade @@ -1,7 +1,7 @@ .bottomPanel(data-bind="with: repository[M!M]") //ko if: news().length > 0 .news - .newsHeader Новости проекта + .newsHeader Project news //ko foreach: news //ko if: $index() hr @@ -10,13 +10,13 @@ .newsLeft .newsDate(data-bind="text: moment($data.pdate).format('D MMM')") //ko if: $data.ccount - a.newsComms(data-bind="html: $data.ccount + ($data.ccount_new ? '
+' + $data.ccount_new + '
' : ''), attr: {href: '/news/' + $data.cid + '?hl=comments'}", title="Перейти к комментариям новости") + a.newsComms(data-bind="html: $data.ccount + ($data.ccount_new ? '
+' + $data.ccount_new + '
' : ''), attr: {href: '/news/' + $data.cid + '?hl=comments'}", title="Jump to news comments") // /ko .newsBody a.newsTitle(data-bind="text: $data.title, attr: {href: '/news/' + $data.cid}") .newsNotice(data-bind="html: $data.notice") //ko if: $data.expand - a.newsExpand(data-bind="attr: {href: '/news/' + $data.cid}") [Читать полностью..] + a.newsExpand(data-bind="attr: {href: '/news/' + $data.cid}") [Read more..] // /ko // /ko // /ko @@ -28,7 +28,7 @@ // /ko li a(target="_blank", href="/news") - | Архив новостей + | News archive span.glyphicon.glyphicon-share //ko if: catActive() .catContent(data-bind="template: catsObj[catActive()].tpl") @@ -54,7 +54,7 @@ a.rightBlock.comm(data-bind="html: $data.ccount + ($data.ccount_new ? ' +' + $data.ccount_new + '' : ''), attr: {href: $data.link + '?hl=comments'}", title="Комментарии") // /ko //ko if: $data.changed - a.rightBlock.changed(data-bind="attr: {href: $data.link + '?history=1'}", title="Фотография изменена с момента прошлого просмотра") + a.rightBlock.changed(data-bind="attr: {href: $data.link + '?history=1'}", title="Photo has been changed since last view") span.glyphicon.glyphicon-pencil // /ko // /ko @@ -70,41 +70,41 @@ | @@ -123,13 +123,13 @@ .onlineStat(data-bind="text: stats.common.onlineTxt") .row .col-xs-12 - .catHead Весь проект - .statrow(data-bind="text: 'Зарегистрированных пользователей: ' + stats.all.userCount") - .statrow(data-bind="text: 'Фотографий: ' + stats.all.pallCount") - .statrow(data-bind="text: 'Больше всего фотографий относится к ' + stats.all.photoYear.pop.year + ' году, их ' + stats.all.photoYear.pop.count") - .statrow(data-bind="text: 'Сегодня новых фотографий: ' + stats.all.pdayCount") - .statrow(data-bind="text: 'За неделю новых фотографий: ' + stats.all.pweekCount") - .statrow(data-bind="text: 'Комментариев: ' + stats.all.callCount") - .statrow(data-bind="text: 'Сегодня новых комментариев: ' + stats.all.cdayCount") - .statrow(data-bind="text: 'За неделю новых комментариев: ' + stats.all.cweekCount") + .catHead The entire project + .statrow(data-bind="text: 'Registered users: ' + stats.all.userCount") + .statrow(data-bind="text: 'Photos: ' + stats.all.pallCount") + .statrow(data-bind="text: 'Vast majority of photos refers to ' + stats.all.photoYear.pop.year + ' year, ' + stats.all.photoYear.pop.count") + .statrow(data-bind="text: 'New photos today: ' + stats.all.pdayCount") + .statrow(data-bind="text: 'New photos this week: ' + stats.all.pweekCount") + .statrow(data-bind="text: 'Comments: ' + stats.all.callCount") + .statrow(data-bind="text: 'Today new comments: ' + stats.all.cdayCount") + .statrow(data-bind="text: 'New comments this week: ' + stats.all.cweekCount") | \ No newline at end of file diff --git a/views/module/main/commentsFeed.jade b/views/module/main/commentsFeed.jade index 5563aa889..4cbd64a02 100644 --- a/views/module/main/commentsFeed.jade +++ b/views/module/main/commentsFeed.jade @@ -1,7 +1,7 @@ .commentsFeed(data-bind="with: repository[M!M]") //-a.help(href="http://start.planeta.ru/campaigns/1694", target="_blank", title="Узнайте как помочь проекту") img.img-responsive.helpimg(data-bind="attr: {src: '/img/misc/fund2/bn_right_' + _.random(1,4) + '.jpg'}", alt="Помогите PastVu") - .ribbonHead.lineBehind: span Новые комментарии + .ribbonHead.lineBehind: span New comments .commentsBody | \ No newline at end of file diff --git a/views/module/photo/hist.jade b/views/module/photo/hist.jade index e0dfb4e85..3d8787467 100644 --- a/views/module/photo/hist.jade +++ b/views/module/photo/hist.jade @@ -1,16 +1,16 @@ .objHist(data-bind="with: repository[M!M]") // ko if: haveDiff() - .diffSwitch(data-bind="text: showDiff() ? 'Скрыть подсветку разницы значений' : 'Показать разницу значений', click: switchDiff") + .diffSwitch(data-bind="text: showDiff() ? 'Hide difference highlighting' : 'Show difference highlighting', click: switchDiff") // /ko ul.media-list.hists //ko if: haveDiff() && switchDiff2() - .diffSwitch(data-bind="text: showDiff() ? 'Скрыть подсветку разницы значений' : 'Показать разницу значений', click: switchDiff") + .diffSwitch(data-bind="text: showDiff() ? 'Hide difference highlighting' : 'Show difference highlighting', click: switchDiff") // /ko | @@ -35,10 +35,10 @@ a.author(target="_blank", href="{{='/u/'+h.user.login}}") {{=h.user.disp}} ='{{?h.role}} ' .role - | {{?h.role===5}}как модератор - | {{?h.roleregion}} региона  - a(target="_blank", href="{{='/ps?f=r!' + h.roleregion.cid}}") {{=h.roleregion.title_local}}{{?}} - | {{??h.role>9}}как администратор{{?}} + | {{?h.role===5}}as moderator + | {{?h.roleregion}} of region  + a(target="_blank", href="{{='/ps?f=r!' + h.roleregion.cid}}") {{=h.roleregion.title_en}}{{?}} + | {{??h.role>9}}as administrator{{?}} | {{?}} .dotDelimeter · a.histStamp(data-replace="true", href="/p/{{=it.cid}}?history={{=h.stamp}}") {{=it.fDate(new Date(h.stamp))}} @@ -52,7 +52,7 @@ | {{?h.del}} .info.red.iconed span.glyphicon.glyphicon-minus - | Удален{{?h.del.length>1}}ы{{??}}о{{?}}: + | Removed{{?h.del.length>1}}{{??}}{{?}}: | {{~h.del :del:delIndex}} | {{?delIndex}},{{?}} span.del {{=it.fields[del]}} @@ -62,12 +62,12 @@ | {{?h.values.nocomments !== undefined}} .info.iconed(class="{{?h.values.nocomments}}red{{??}}green{{?}}") span.glyphicon(class="glyphicon-{{?h.values.nocomments}}ban-circle{{??}}ok{{?}}") - | Комментирование {{?h.values.nocomments}}запрещено{{??}}разрешено{{?}} + | Commenting is {{?h.values.nocomments}}forbidden{{??}}allowed{{?}} | {{?}} | {{?h.reason}} .value - .name Причина + .name Reason .val | {{?h.reason.cid}}{{=it.reasonsHash[h.reason.cid].title}}{{?}} | {{?h.reason.desc}} diff --git a/views/module/photo/photo.jade b/views/module/photo/photo.jade index 6341a150a..b008ed1f7 100644 --- a/views/module/photo/photo.jade +++ b/views/module/photo/photo.jade @@ -17,7 +17,7 @@ span(data-bind="text: ' ' + msg()") //ko if: msgLink() | [ - a.msgLink(data-replace="true", data-bind="attr: {href: msgLink()}") Подробнее.. + a.msgLink(data-replace="true", data-bind="attr: {href: msgLink()}") More details.. | ] // /ko // /ko @@ -35,10 +35,10 @@ .photoLoading .toolsRht .tool.watched - span.glyphicon.glyphicon-eye-open.light(title="Количество просмотров фотографии") - .watch(data-bind="text: toolsNumFormat(p.vdcount()), attr: {title: p.vdcount()+ ' раз смотрели сегодня'}") - .watch(data-bind="text: toolsNumFormat(p.vwcount()), attr: {title: p.vwcount()+ ' раз смотрели за неделю'}") - .watch(data-bind="text: toolsNumFormat(p.vcount()), attr: {title: p.vcount()+ ' раз смотрели всего'}") + span.glyphicon.glyphicon-eye-open.light(title="Number of photo's views") + .watch(data-bind="text: toolsNumFormat(p.vdcount()), attr: {title: p.vdcount()+ ' times viewed today'}") + .watch(data-bind="text: toolsNumFormat(p.vwcount()), attr: {title: p.vwcount()+ ' times viewed this week'}") + .watch(data-bind="text: toolsNumFormat(p.vcount()), attr: {title: p.vcount()+ ' times viewed total'}") .toolsBtm(data-bind="style: {width: ws() + 'px'}") span.toolsTxt | Размеры:  @@ -50,17 +50,17 @@ |  |  a.sizeOrigin(target="_blank", data-bind="attr:{href: '/_p/a/' + p.file()}, text: p.w() + '×' + p.h()") //ko if: hscalePossible() - button.btn.btn-xxs.btn-primary(data-state="hscaleTumbler", data-bind="css: {active: hscaleTumbler()}, click: stateChange", title="Подгонять по высоте видимой области") + button.btn.btn-xxs.btn-primary(data-state="hscaleTumbler", data-bind="css: {active: hscaleTumbler()}, click: stateChange", title="Adjust by the height of the visible area") span.glyphicon.glyphicon-resize-vertical // /ko - button.btn.btn-xxs.btn-primary(data-state="watermarkShow", data-bind="css: {active: watermarkShow()}, click: stateChange", title="Показывать вотермарк фотографии") + button.btn.btn-xxs.btn-primary(data-state="watermarkShow", data-bind="css: {active: watermarkShow()}, click: stateChange", title="Show photo's watermark") | W //ko if: p.s()===statuses.keys.PUBLIC - a.btn.btn-xxs.btn-primary(href="?share=1", data-replace="true", title="Поделиться") + a.btn.btn-xxs.btn-primary(href="?share=1", data-replace="true", title="Share") span.glyphicon.glyphicon-share-alt // /ko //ko if: !edit() - a.btn.btn-xxs(data-bind="click:download,css: downloadCSSClass(), attr: {href:'/_p/a/'+p.file(), download:p.cid()+' '+(p.title()||'').replace(/[\/|]/g, '-')+'.jpg', title:'Скачать '+(downLoadOrigin()?'оригинал ':'в полном размере ')+p.w() + '×' + p.h()}") + a.btn.btn-xxs(data-bind="click:download,css: downloadCSSClass(), attr: {href:'/_p/a/'+p.file(), download:p.cid()+' '+(p.title()||'').replace(/[\/|]/g, '-')+'.jpg', title:'Download '+(downLoadOrigin()?'original ':'full size ')+p.w() + '×' + p.h()}") span.glyphicon.glyphicon-save // /ko @@ -88,7 +88,7 @@ // /ko .rightrow.photoMap.mContainer.mHidden(data-bind="allowBindings: false, style: {height: mapH()}") //ko if: nearestRibbon().length - .rightrow: .lineBehind: span Ближайшие фотографии + .rightrow: .lineBehind: span Nearest photos .rightrow.nearesTiles(data-bind="foreach: nearestRibbon") a.photoPreview(data-bind="attr: {href: '/p/' + cid, title: $data.title}"): .photoBox img.img(data-bind="attr: {src: sfile, title: $data.title}, event: {load: $parent.onPreviewLoad, error: $parent.onPreviewErr}, style: {width: $parent.thumbW, height: $parent.thumbH}") @@ -101,52 +101,52 @@ //ko if: can.edit() button.btn.btn-primary(type="button", data-bind="click: editSave, attr: {disabled: exe()}") span.glyphicon.glyphicon-pencil - | Редактировать + | Edit // /ko //ko if: can.ready() - button.btn.btn-success(type="button", title="Отправить на премодерацию и дальнейшую публикацию", data-bind="click: ready, attr: {disabled: exe()}") + button.btn.btn-success(type="button", title="Send to premoderation and further publishing", data-bind="click: ready, attr: {disabled: exe()}") span.glyphicon.glyphicon-check - | На публикацию + | To publishing // /ko //ko if: can.approve() - button.btn.btn-success(type="button", title="Подтвердить и опубликовать эту фотографию", data-bind="click: approve, attr: {disabled: exe()}") + button.btn.btn-success(type="button", title="Confirm and publish this photo", data-bind="click: approve, attr: {disabled: exe()}") span.glyphicon.glyphicon-ok - | Опубликовать + | Publish // /ko //ko if: can.revision() - button.btn.btn-warning(type="button", title="Отправить пользователю на доработку", data-bind="click: toRevision, attr: {disabled: exe()}") + button.btn.btn-warning(type="button", title="Send to user for revision", data-bind="click: toRevision, attr: {disabled: exe()}") span.glyphicon.glyphicon-check - | На доработку + | To revision // /ko //ko if: can.revoke() - button.btn.btn-danger(type="button", data-bind="click: revoke, attr: {disabled: exe()}", title="Отозвать эту фотографию, снять с возможной публикации") + button.btn.btn-danger(type="button", data-bind="click: revoke, attr: {disabled: exe()}", title="Revoke this photo from possible publication") span.glyphicon.glyphicon-remove - | Отозвать + | Revoke // /ko //ko if: can.reject() - button.btn.btn-danger(type="button", data-bind="click: reject, attr: {disabled: exe()}", title="Отклонить фотографию, снять с возможной публикации") + button.btn.btn-danger(type="button", data-bind="click: reject, attr: {disabled: exe()}", title="Reject this photo from possible publication") span.glyphicon.glyphicon-remove - | Отклонить + | Reject // /ko //ko if: can.activate() button.btn.btn-success(type="button", data-bind="click: toggleDisable, attr: {disabled: exe()}") span.glyphicon.glyphicon-ok-sign - | Активировать + | Activate // /ko //ko if: can.deactivate() button.btn.btn-warning(type="button", data-bind="click: toggleDisable, attr: {disabled: exe()}") span.glyphicon.glyphicon-exclamation-sign - | Деактивировать + | Deactivate // /ko //ko if: can.remove() button.btn.btn-danger(type="button", data-bind="click: remove, attr: {disabled: exe()}") span.glyphicon.glyphicon-trash - | Удалить + | Remove // /ko //ko if: can.restore() button.btn.btn-success(type="button", data-bind="click: restore, attr: {disabled: exe()}") span.glyphicon.glyphicon-repeat - span Восстановить + span Restore // /ko | @@ -154,10 +154,10 @@ | //-DATA VIEW MODE @@ -178,12 +178,12 @@ //ko foreach: p.regions | , .region - a(data-bind="text: $data.title_local(), attr: {href: '/ps?f=r!' + $data.cid()}") + a(data-bind="text: $data.title_en(), attr: {href: '/ps?f=r!' + $data.cid()}") // /ko //ko if: !p.geo() =', ' .region - a(data-bind="text: 'Где это?', attr: {href: '/ps?f=geo!0_r!' + p.regions()[p.regions().length-1].cid()}", style="color: #BEA265;") + a(data-bind="text: 'Where is it?', attr: {href: '/ps?f=geo!0_r!' + p.regions()[p.regions().length-1].cid()}", style="color: #BEA265;") // /ko // /ko //ko if: p.desc().length @@ -218,7 +218,7 @@ //ko if: p.cdate .infoBlock .info - a(href="?history=1", data-replace="true", data-bind="css: {changed: p.changed()}, html: 'Последнее изменение ' + fDateIn(p.cdate())") + a(href="?history=1", data-replace="true", data-bind="css: {changed: p.changed()}, html: 'Last changed at ' + fDateIn(p.cdate())") // /ko //-a.help.visible-lg(href="http://start.planeta.ru/campaigns/1694", target="_blank", title="Узнайте как помочь проекту") @@ -229,7 +229,7 @@ | \ No newline at end of file From 525347a7996d219bc6ad66c07d5e7966f17bd6a8 Mon Sep 17 00:00:00 2001 From: klimashkin Date: Mon, 26 Oct 2015 01:26:24 -0700 Subject: [PATCH 10/85] Fix at bottom --- views/module/main/bottomPanel.jade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/module/main/bottomPanel.jade b/views/module/main/bottomPanel.jade index ba125932a..281739eea 100644 --- a/views/module/main/bottomPanel.jade +++ b/views/module/main/bottomPanel.jade @@ -63,7 +63,7 @@ a.photoPreview.withInfo.nextPhoto(data-bind="attr: {href: moreLink()}") .nextPhotoTxt span.glyphicon.glyphicon-fast-forward - | Еще.. + | More.. // /ko | From ad26a07f721585e32330c320ad75e13270951aeb Mon Sep 17 00:00:00 2001 From: klimashkin Date: Mon, 26 Oct 2015 01:28:54 -0700 Subject: [PATCH 11/85] Translate fix on photo page --- public/js/module/photo/photo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/module/photo/photo.js b/public/js/module/photo/photo.js index 4c53db3b2..94e502a8b 100644 --- a/public/js/module/photo/photo.js +++ b/public/js/module/photo/photo.js @@ -175,7 +175,7 @@ define(['underscore', 'Utils', 'socket!', 'Params', 'knockout', 'knockout.mappin owner: this }); - var userInfoTpl = _.template('Добавил${ addEnd } ${ name }, ${ stamp }'); + var userInfoTpl = _.template('Added by ${ name }, ${ stamp }'); this.userInfo = this.co.userInfo = ko.computed(function () { return userInfoTpl( { From 1eb2f51069357e398d5857e327be7d974ad8bbdc Mon Sep 17 00:00:00 2001 From: klimashkin Date: Mon, 26 Oct 2015 03:06:19 -0700 Subject: [PATCH 12/85] Fix region title in en --- public/js/module/photo/photo.js | 2 +- public/js/module/region/select.js | 14 +++++++------- views/module/main/bottomPanel.jade | 2 +- views/module/region/select.jade | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/public/js/module/photo/photo.js b/public/js/module/photo/photo.js index 94e502a8b..0925acff1 100644 --- a/public/js/module/photo/photo.js +++ b/public/js/module/photo/photo.js @@ -793,7 +793,7 @@ define(['underscore', 'Utils', 'socket!', 'Params', 'knockout', 'knockout.mappin text: 'Apply', glyphicon: 'glyphicon-ok', click: function () { - var regions = this.regselectVM.getSelectedRegionsFull(['cid', 'title_local']); + var regions = this.regselectVM.getSelectedRegionsFull(['cid', 'title_en']); if (regions.length > 1) { window.noty({ diff --git a/public/js/module/region/select.js b/public/js/module/region/select.js index d744be1a8..25e70bd02 100644 --- a/public/js/module/region/select.js +++ b/public/js/module/region/select.js @@ -27,8 +27,8 @@ define([ this.selectedInitTkns = []; if (this.selectedInit && this.selectedInit.length) { this.selectedInit.forEach(function (region) { - this.selectedInitHash[region.title_local] = region; - this.selectedInitTkns.push({value: region.title_local, label: region.title_local}); + this.selectedInitHash[region.title_en] = region; + this.selectedInitTkns.push({value: region.title_en, label: region.title_en}); }, this); } @@ -239,7 +239,7 @@ define([ //Ручное удаление токена, работает полной заменой токенов, кроме удаляемого. //Поэтому для удаляемого токена событие onRemoveToken не сработает, но сработает onCreateToken для каждого неудаляемого removeToken: function (region) { - var title = region.title_local, + var title = region.title_en, tkn = this.$dom.find('.regionstkn'), tokensExists; @@ -327,7 +327,7 @@ define([ //Сортируем массив по уровням и названиям в пределах одного уровня arr.sort(function (a, b) { - return a.parents.length < b.parents.length || a.parents.length === b.parents.length && a.title_local < b.title_local ? -1 : 1; + return a.parents.length < b.parents.length || a.parents.length === b.parents.length && a.title_en < b.title_en ? -1 : 1; }); function incrementParentsChildLen(region, deepestLevel) { @@ -353,7 +353,7 @@ define([ region.childLenAll = 0; //Количество всех потомков region.childLenArr = [0]; //Массив количеств потомков - selected = this.selectedInitHash[region.title_local] !== undefined; + selected = this.selectedInitHash[region.title_en] !== undefined; region.selectable = ko.observable(true); region.selected = ko.observable(selected); region.opened = ko.observable(selected); @@ -375,8 +375,8 @@ define([ } hash[region.cid] = region; - this.regionsTypehead.push({title: region.title_local, tokens: [region.title_local, region.title_en]}); - this.regionsHashByTitle[region.title_local] = region; + this.regionsTypehead.push({title: region.title_en, tokens: [region.title_en, region.title_local]}); + this.regionsHashByTitle[region.title_en] = region; } //У изначально выбранных регионов делаем невыбираемыми другие регионы этой ветки diff --git a/views/module/main/bottomPanel.jade b/views/module/main/bottomPanel.jade index 281739eea..634a697ab 100644 --- a/views/module/main/bottomPanel.jade +++ b/views/module/main/bottomPanel.jade @@ -46,7 +46,7 @@ //ko if: $data.rs .regions(data-bind="foreach: $data.rs", title=" ") | , - a.shortRegion(data-bind="css: {where: !$data.cid}, attr: {href: '/ps?f='+(!$data.cid ? 'geo!0'+($parent.rs[$index()+1] ? '_r!'+$parent.rs[$index()+1].cid : '') : 'r!'+$data.cid), title: $data.title_local}, text: $data.title_local") + a.shortRegion(data-bind="css: {where: !$data.cid}, attr: {href: '/ps?f='+(!$data.cid ? 'geo!0'+($parent.rs[$index()+1] ? '_r!'+$parent.rs[$index()+1].cid : '') : 'r!'+$data.cid), title: $data.title_en}, text: $data.title_en") // /ko //ko if: $data.ccount || $data.changed .rightBlocks diff --git a/views/module/region/select.jade b/views/module/region/select.jade index 4f07c1022..09f538f7d 100644 --- a/views/module/region/select.jade +++ b/views/module/region/select.jade @@ -38,8 +38,8 @@ .chevron(data-bind="click: $parents[$data.level].collapseToggle, attr: {title: ($data.opened() ? 'Скрыть' : 'Раскрыть') + ' дочерние регионы'}") span.glyphicon(data-bind="css: {'glyphicon-minus': $data.opened(), 'glyphicon-plus': !$data.opened()}") // /ko - .name(data-bind="click: function() {$parents[$data.level].clickNode($data.title_local)}, attr: {title: $data.selected() ? 'Снять выбор' : ($data.selectable() ? 'Выбрать регион' : '')}") - span(data-bind="text: ' ' + $data.title_local") + .name(data-bind="click: function() {$parents[$data.level].clickNode($data.title_en)}, attr: {title: $data.selected() ? 'Снять выбор' : ($data.selectable() ? 'Выбрать регион' : '')}") + span(data-bind="text: ' ' + $data.title_en") //ko if: $data.childLen && $data.opened() //ko template: {name: 'treeNode', foreach: $data.regions} // /ko From 63ad1871f2d078ed38ce9fd0c1e72ccef12b869b Mon Sep 17 00:00:00 2001 From: klimashkin Date: Mon, 26 Oct 2015 12:44:23 -0700 Subject: [PATCH 13/85] Lohin - login --- views/module/common/auth.jade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/module/common/auth.jade b/views/module/common/auth.jade index 24361c7cd..7906bd18b 100644 --- a/views/module/common/auth.jade +++ b/views/module/common/auth.jade @@ -34,7 +34,7 @@ div(data-bind="text: msg()") .row.btnsAction .col-xs-6 - button.btn.btn-primary(type="submit") Lohin + button.btn.btn-primary(type="submit") Login .col-xs-6.colright button.btn.btn-primary(type="button", data-bind="click: formClose") Cancel .cantLoging From eb28c6d6a351e9fce75cb2e1d6210103c52569e0 Mon Sep 17 00:00:00 2001 From: klimashkin Date: Mon, 26 Oct 2015 13:11:19 -0700 Subject: [PATCH 14/85] Log In Log Out --- views/module/common/auth.jade | 2 +- views/module/common/top.jade | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/views/module/common/auth.jade b/views/module/common/auth.jade index 7906bd18b..17b236b2c 100644 --- a/views/module/common/auth.jade +++ b/views/module/common/auth.jade @@ -34,7 +34,7 @@ div(data-bind="text: msg()") .row.btnsAction .col-xs-6 - button.btn.btn-primary(type="submit") Login + button.btn.btn-primary(type="submit") Log In .col-xs-6.colright button.btn.btn-primary(type="button", data-bind="click: formClose") Cancel .cantLoging diff --git a/views/module/common/top.jade b/views/module/common/top.jade index 3a05c15d6..7cd1449d7 100644 --- a/views/module/common/top.jade +++ b/views/module/common/top.jade @@ -27,12 +27,12 @@ .ico .text Registration #toLogIn.labledIco.strokeBefore.iconAfter(data-bind="click: function(data, evt){auth.show('login')}") - .text Login + .text Log In .ico // /ko //ko if: auth.loggedIn() #toLogOut.labledIco.strokeBefore.iconAfter(data-bind="click: function(data, evt){auth.doLogout()}") - .text Exit + .text Log Out .ico // /ko #lang.labledIco.langFlag.strokeBefore(data-bind="style:{'backgroundImage': 'url(/img/misc/flags/' + lang() + '.svg)'}, click: langClick") From f257501f4e21ea89fa254a7f0013ac2dd317cc89 Mon Sep 17 00:00:00 2001 From: klimashkin Date: Mon, 26 Oct 2015 13:13:03 -0700 Subject: [PATCH 15/85] Registration -> Sign Up --- public/js/i18n.js | 10 +++++----- views/module/common/top.jade | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/public/js/i18n.js b/public/js/i18n.js index b8c1a073a..009dc9703 100644 --- a/public/js/i18n.js +++ b/public/js/i18n.js @@ -6,13 +6,13 @@ define(['knockout', 'knockout.mapping', 'Utils'], function(ko, ko_mapping, Utils "use strict"; var i18n = { en : { - login : 'Login', - logout : 'Logout', - register : 'Registration', + login : 'Log In', + logout : 'Log Out', + register : 'Sign Up', mod : 'Moderation', admin : 'Administration', - gallery : 'Галерея', - image_upload : 'Загрузить фото' + gallery : 'Gallery', + image_upload : 'Upload' }, ru : { login : 'Вход', diff --git a/views/module/common/top.jade b/views/module/common/top.jade index 7cd1449d7..e81630095 100644 --- a/views/module/common/top.jade +++ b/views/module/common/top.jade @@ -25,7 +25,7 @@ //ko if: !auth.loggedIn() #toRegister.labledIco(data-bind="click: function(data, evt){auth.show('reg')}") .ico - .text Registration + .text Sign Up #toLogIn.labledIco.strokeBefore.iconAfter(data-bind="click: function(data, evt){auth.show('login')}") .text Log In .ico From 5681b3cfa0ece34082c3167d0bcd1c89f7b8bba2 Mon Sep 17 00:00:00 2001 From: klimashkin Date: Mon, 26 Oct 2015 14:25:41 -0700 Subject: [PATCH 16/85] Translate select section --- public/js/module/region/select.js | 2 +- views/module/region/select.jade | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/public/js/module/region/select.js b/public/js/module/region/select.js index 25e70bd02..bb26d4f38 100644 --- a/public/js/module/region/select.js +++ b/public/js/module/region/select.js @@ -252,7 +252,7 @@ define([ selectRegion: function (region) { if (this.checkBranchSelected(region)) { - window.noty({text: 'Нельзя одновременно выбирать родительский и дочерний регионы', type: 'error', layout: 'center', timeout: 3000, force: true}); + window.noty({text: 'You can not choose the parent and child regions simultaneously', type: 'error', layout: 'center', timeout: 3000, force: true}); return false; } region.selected(true); diff --git a/views/module/region/select.jade b/views/module/region/select.jade index 09f538f7d..9fa4432ef 100644 --- a/views/module/region/select.jade +++ b/views/module/region/select.jade @@ -6,27 +6,27 @@ //ko ifnot: loading() h4.namehead span.glyphicon.glyphicon-globe - span(data-bind="text: ' Выбор регион' + (options.max > 1 ? 'ов' : 'а')") + span(data-bind="text: ' Region' + (options.max > 1 ? 's' : '') + ' select'") .offsetwrap - div Вводите имя региона непосредственно в поле выбора или найдите его вручную в дереве регионов ниже + div Type the name of the region directly in the input or find it in the below tree //ko if: options.max > 1 - div(data-bind="text: 'Возможно выбрать ' + (options.min ? 'от ' + options.min: '')+ ' до ' + options.max + ' регионов, они не должны быть вложены друг в друга'") + div(data-bind="text: 'Allowed to select ' + (options.min ? 'from ' + options.min: 'up ')+ ' to ' + options.max + ' regions, they should not be nested within each other'") // /ko .inputwrap.surrogate .inputwrap.origin .input-group.regionsgroup - span.input-group-addon Выбор: - input.regionstkn.form-control(type="text", placeholder="Начните вводить имя региона") + span.input-group-addon Selection: + input.regionstkn.form-control(type="text", placeholder="Start to type region name") .offsetwrap .regionsHead .headElem.interact(data-bind="click: expandAll") span.glyphicon.glyphicon-plus - | Раскрыть все + | Expand all .headElem.interact(data-bind="click: collapseAll") span.glyphicon.glyphicon-minus - | Свернуть все + | Collapse all .tree ul(data-bind="template: {name: 'treeNode', foreach: regionsTree}") // /ko @@ -35,10 +35,10 @@ li(data-bind="css: {isparent: $data.childLen}") .lirow(data-bind="css: {selected: $data.selected(), selectable: $data.selectable()}") //ko if: $data.childLen - .chevron(data-bind="click: $parents[$data.level].collapseToggle, attr: {title: ($data.opened() ? 'Скрыть' : 'Раскрыть') + ' дочерние регионы'}") + .chevron(data-bind="click: $parents[$data.level].collapseToggle, attr: {title: ($data.opened() ? 'Collapse' : 'Expand') + ' children regions'}") span.glyphicon(data-bind="css: {'glyphicon-minus': $data.opened(), 'glyphicon-plus': !$data.opened()}") // /ko - .name(data-bind="click: function() {$parents[$data.level].clickNode($data.title_en)}, attr: {title: $data.selected() ? 'Снять выбор' : ($data.selectable() ? 'Выбрать регион' : '')}") + .name(data-bind="click: function() {$parents[$data.level].clickNode($data.title_en)}, attr: {title: $data.selected() ? 'Remove selection' : ($data.selectable() ? 'Select region' : '')}") span(data-bind="text: ' ' + $data.title_en") //ko if: $data.childLen && $data.opened() //ko template: {name: 'treeNode', foreach: $data.regions} From f42b525f14543ea63c5fee4527d21b56d7baaaec Mon Sep 17 00:00:00 2001 From: klimashkin Date: Mon, 26 Oct 2015 16:37:54 -0700 Subject: [PATCH 17/85] Translate mail templates --- views/mail/head.jade | 2 +- views/mail/notice.jade | 62 +++++++++++++++++------------------ views/mail/recall.jade | 8 ++--- views/mail/registration.jade | 16 ++++----- views/module/common/auth.jade | 2 +- 5 files changed, 45 insertions(+), 45 deletions(-) diff --git a/views/mail/head.jade b/views/mail/head.jade index 37841a0c3..48c6e8f49 100644 --- a/views/mail/head.jade +++ b/views/mail/head.jade @@ -5,7 +5,7 @@ table(style="width: 100%; margin-top: 0px; background-color: #214A78; color: #F2 img(src='cid:pastvulogo', style="width: 47px; height: 49px; vertical-align: middle; border-image-width: 0; border-width: 0px;") td(style="line-height: 1.4em;") span(style="vertical-align: middle;") - | Здравствуйте, #{username}! + | Hello, #{username}! if greeting br = greeting \ No newline at end of file diff --git a/views/mail/notice.jade b/views/mail/notice.jade index afcb7e32d..1a5511398 100644 --- a/views/mail/notice.jade +++ b/views/mail/notice.jade @@ -1,38 +1,38 @@ mixin noticeLi(arr, path) - each val in arr - - usersLogin = Object.keys(val.brief.users) - li(style="margin-left: 10px;") - a(href=origin + path + val.cid + '?hl=comment-unread&utm_campaign=notification&utm_source=notify_letter&utm_medium=email', target='_blank')= val.title - div(style="margin-left: 13px;") - = val.briefFormat.newest - if val.briefFormat.unread - = ' (всего ' + val.briefFormat.unread + ')' - if usersLogin.length > 1 - div(style="margin-left: 13px; margin-bottom: 4px;") - | Авторы: - each login, index in usersLogin - if (index < 6) - if (index > 0) - | , - = ' ' + val.brief.users[login] - if usersLogin.length > 6 - = ' и др.' - if usersLogin.length === 1 - div(style="margin-left: 13px; margin-bottom: 4px;") - | Автор: #{val.brief.users[usersLogin[0]]} + each val in arr + - usersLogin = Object.keys(val.brief.users) + li(style="margin-left: 10px;") + a(href=origin + path + val.cid + '?hl=comment-unread&utm_campaign=notification&utm_source=notify_letter&utm_medium=email', target='_blank')= val.title + div(style="margin-left: 13px;") + = val.briefFormat.newest + if val.briefFormat.unread + = ' (' + val.briefFormat.unread + ' total)' + if usersLogin.length > 1 + div(style="margin-left: 13px; margin-bottom: 4px;") + | Authors: + each login, index in usersLogin + if (index < 6) + if (index > 0) + | , + = ' ' + val.brief.users[login] + if usersLogin.length > 6 + = ' et al.' + if usersLogin.length === 1 + div(style="margin-left: 13px; margin-bottom: 4px;") + | Author: #{val.brief.users[usersLogin[0]]} include head - var origin = config.client.origin -p На момент отправки данного уведомления в подписанных вами темах было добавлено следующее количество комментариев: +p At the time of sending this notice the following number of comments was added to topics, which you have subscribed: if news.length - p(style="margin-bottom: 2px;") - strong Новости: - +noticeLi(news, '/news/') + p(style="margin-bottom: 2px;") + strong News: + +noticeLi(news, '/news/') if photos.length - p(style="margin-bottom: 2px;") - strong Фотографии: - +noticeLi(photos, '/p/') + p(style="margin-bottom: 2px;") + strong Photos: + +noticeLi(photos, '/p/') p - | Управлять подписанными материалами вы можете на странице подписок: #{config.client.host + '/u/' + user.login + '/subscriptions'} - br - | Задать интервал уведомления вы можете на странице настроек: #{config.client.host + '/u/' + user.login + '/settings'} \ No newline at end of file + | Manage your subscriptions you can on subscription page: #{config.client.host + '/u/' + user.login + '/subscriptions'} + br + | Set the notification interval you can on the settings page: #{config.client.host + '/u/' + user.login + '/settings'} \ No newline at end of file diff --git a/views/mail/recall.jade b/views/mail/recall.jade index 6dbb3cbce..696a7f2ea 100644 --- a/views/mail/recall.jade +++ b/views/mail/recall.jade @@ -1,12 +1,12 @@ include head p - | Для Вашей учетной записи был создан запрос на восстановление пароля на проекте PastVu. + | Password recovery request was created for your PastVu account. br - | Если Вы не производили таких действий на нашем сайте, то просто проигнорируйте и удалите письмо. + | If you didn't request it, just ignore this email. p - | Для ввода нового пароля перейдите по следующей ссылке: + | Click on the following link to enter a new password: br a(href=config.client.origin + '/confirm/' + confirmKey, target='_blank') = config.client.host + '/confirm/' + confirmKey br - small Ссылка действительна #{linkvalid}, по истечении которых Вам будет необходимо запрашивать смену пароля повторно + small The link is valid for #{linkvalid}, after which you will need to request a password change again diff --git a/views/mail/registration.jade b/views/mail/registration.jade index f4cdec59c..9b9ce0c6c 100644 --- a/views/mail/registration.jade +++ b/views/mail/registration.jade @@ -1,22 +1,22 @@ include head p(style="padding-left: 3px; border-style: solid; border-width: 0px 0px 0px 3px; border-color: #5D88B6;") - | Вы указали следующие реквизиты: + | You have specified the following details: br - | Логин: #{data.login} + | Login username: #{data.login} br | E-mail: #{data.email} br - small Для лучшей безопасности мы не храним оригинал вашего пароля. Если вы его забудете, просто установите новый с помощью процедуры восстановления на сайте + small For better security, we do not store your original password. If you forget it, just set the new one with recovery procedures on the site p - | Мы требуем от всех пользователей подтверждения регистрации, для проверки того, что введённый e-mail адрес реальный. + | We require that all new users should to confirm their email, to be sure that email is real. br - | Это требуется для защиты от спамеров и многократной регистрации. + | This is required for protection against spammers and multiple registration. p(style="padding-left: 3px; border-style: solid; border-width: 0px 0px 0px 3px; border-color: #5D88B6;") - | Для активации Вашего аккаунта, пройдите по следующей ссылке: + | To activate your account, click the following link: br a(href=config.client.origin + '/confirm/' + confirmKey, target='_blank') = config.client.host + '/confirm/' + confirmKey br - small Ссылка действительна #{linkvalid}, по истечении которых Вам будет необходимо зарегистрироваться повторно + small The link is valid for #{linkvalid}, after which you will need to register again p(style="color: #999;") - small Вы получили это письмо, так как этот e-mail адрес был использован при регистрации. Если Вы не регистрировались на нашем сайте, то просто проигнорируйте и удалите письмо. \ No newline at end of file + small You have received this letter because this email address was used for registration. If you didn't register on our website, simply ignore and delete the email. \ No newline at end of file diff --git a/views/module/common/auth.jade b/views/module/common/auth.jade index 17b236b2c..e698be321 100644 --- a/views/module/common/auth.jade +++ b/views/module/common/auth.jade @@ -114,7 +114,7 @@ .head Request for new password .form-group div(style="text-align: center; max-width: 350px; margin-bottom: 10px;") - | You will receive a link for changing password form without entering the current one. Submit request? + | You will receive a link for changing password without entering the current one. Submit request? .mess div(data-bind="text: msg()") .form-group From 7467d142902ac0145bdb4ac0d328ca49e0a9a185 Mon Sep 17 00:00:00 2001 From: klimashkin Date: Mon, 26 Oct 2015 17:09:52 -0700 Subject: [PATCH 18/85] Replace tabs with spaces in views --- views/api/help.jade | 126 ++++---- views/includes/head_top_cap.jade | 174 +++++------ views/includes/nojs.jade | 26 +- views/mail/head.jade | 20 +- views/mail/recall.jade | 18 +- views/mail/registration.jade | 34 +- views/module/admin/conveyer.jade | 88 +++--- views/module/admin/main.jade | 158 +++++----- views/module/admin/menu.jade | 8 +- views/module/admin/newsEdit.jade | 92 +++--- views/module/admin/region.jade | 220 ++++++------- views/module/admin/regionCheck.jade | 24 +- views/module/admin/regionList.jade | 124 ++++---- views/module/admin/submenu.jade | 10 +- views/module/appAdmin.jade | 8 +- views/module/comment/cdotadd.jade | 84 ++--- views/module/comment/cdotanonym.jade | 48 +-- views/module/comment/cdotauth.jade | 72 ++--- views/module/comment/cdotdel.jade | 22 +- views/module/comment/cdotdelopen.jade | 48 +-- views/module/comment/comments.jade | 78 ++--- views/module/comment/hist.jade | 120 +++---- views/module/common/auth.jade | 432 +++++++++++++------------- views/module/common/foot.jade | 16 +- views/module/common/reason.jade | 36 +-- views/module/diff/about.jade | 120 +++---- views/module/diff/news.jade | 44 +-- views/module/diff/newsList.jade | 68 ++-- views/module/main/bottomPanel.jade | 260 ++++++++-------- views/module/main/commentsFeed.jade | 42 +-- views/module/main/mainPage.jade | 8 +- views/module/map/map.jade | 108 +++---- views/module/map/mapClusterCalc.jade | 66 ++-- views/module/map/navSlider.jade | 48 +-- views/module/modal.jade | 40 +-- views/module/photo/gallery.jade | 228 +++++++------- views/module/region/select.jade | 84 ++--- views/module/user/brief.jade | 104 +++---- views/module/user/photoUpload.jade | 122 ++++---- views/module/user/profile.jade | 156 +++++----- views/module/user/tabs.jade | 28 +- views/module/user/userPage.jade | 16 +- 42 files changed, 1814 insertions(+), 1814 deletions(-) diff --git a/views/api/help.jade b/views/api/help.jade index 40c9d8d11..c6b5dc118 100644 --- a/views/api/help.jade +++ b/views/api/help.jade @@ -1,68 +1,68 @@ doctype html html - head - meta(http-equiv="content-type", content="text/html; charset=utf-8") - meta(http-equiv="X-UA-Compatible", content="IE=Edge") - meta(name="apple-mobile-web-app-capable", content="yes") - title Документация API PastVu + head + meta(http-equiv="content-type", content="text/html; charset=utf-8") + meta(http-equiv="X-UA-Compatible", content="IE=Edge") + meta(name="apple-mobile-web-app-capable", content="yes") + title Документация API PastVu - body - h2 Документация API PastVu - span(style="color: #999") Версия 0.2.0 - h3 Параметры запроса - table - caption - tbody - tr - td app* - td Идентификатор приложения. Выдаётся администратором по запросу на адрес support@pastvu.com - tr - td rid* - td Идентификатор запроса. Строка, позволяющая запрашиваемому приложению соотнести ответ с запросом. Возвращается в ответе - tr - td stamp* - td Время (UTC) отправки запроса в формате unix-time (количество миллисекунд с 1970/01/01). Запрос должен быть не старше 10 секунд. Возвращается в ответе - tr - td method* - td Метод запроса из перечисленных ниже - tr - td data - td Параметры метода в формате JSON - | * Обязательные параметры запроса + body + h2 Документация API PastVu + span(style="color: #999") Версия 0.2.0 + h3 Параметры запроса + table + caption + tbody + tr + td app* + td Идентификатор приложения. Выдаётся администратором по запросу на адрес support@pastvu.com + tr + td rid* + td Идентификатор запроса. Строка, позволяющая запрашиваемому приложению соотнести ответ с запросом. Возвращается в ответе + tr + td stamp* + td Время (UTC) отправки запроса в формате unix-time (количество миллисекунд с 1970/01/01). Запрос должен быть не старше 10 секунд. Возвращается в ответе + tr + td method* + td Метод запроса из перечисленных ниже + tr + td data + td Параметры метода в формате JSON + | * Обязательные параметры запроса - h3 Структура ответа - | В случае корректно переданных параметров запроса сервер вернёт JSON (Content-Type: application/json; charset=utf-8) следующей структуры: - table - caption - tbody - tr - td rid - td Переданный клиентом идентификатор запроса - tr - td stamp - td Переданное клиентом время отправки запроса - tr - td result - td Результат выполнения метода. Структура зависит от метода. Может отсутствовать в случае ошибки - tr - td error - td Объект в случае ошибки. {code: , text: } + h3 Структура ответа + | В случае корректно переданных параметров запроса сервер вернёт JSON (Content-Type: application/json; charset=utf-8) следующей структуры: + table + caption + tbody + tr + td rid + td Переданный клиентом идентификатор запроса + tr + td stamp + td Переданное клиентом время отправки запроса + tr + td result + td Результат выполнения метода. Структура зависит от метода. Может отсутствовать в случае ошибки + tr + td error + td Объект в случае ошибки. {code: , text: } - h3 Методы запроса - table - tbody - tr - td photo.get - td - | Возвращает объект фотографии - div Структура - div Структура - tr - td photos.near - td Возвращает массив фотографий, ближайших переданной координате. Массив отсортирован по возрастанию расстояния - tr - td map.getBounds - td Возвращает массивы кластеров и фотографий для карты, входящих в переданные границы - tr - td comments.getByObj - td Возвращает дерево комментариев для фотографии \ No newline at end of file + h3 Методы запроса + table + tbody + tr + td photo.get + td + | Возвращает объект фотографии + div Структура + div Структура + tr + td photos.near + td Возвращает массив фотографий, ближайших переданной координате. Массив отсортирован по возрастанию расстояния + tr + td map.getBounds + td Возвращает массивы кластеров и фотографий для карты, входящих в переданные границы + tr + td comments.getByObj + td Возвращает дерево комментариев для фотографии \ No newline at end of file diff --git a/views/includes/head_top_cap.jade b/views/includes/head_top_cap.jade index acdb40afb..4588e96f4 100644 --- a/views/includes/head_top_cap.jade +++ b/views/includes/head_top_cap.jade @@ -5,105 +5,105 @@ meta(name="apple-mobile-web-app-capable", content="yes") link(rel="shortcut icon", href="/favicon.ico") title!= title style. - html, body { - height: 100%; - min-height: 100%; - } + html, body { + height: 100%; + min-height: 100%; + } - html { - font-family: Arial, sans-serif; - -ms-text-size-adjust: 100%; - -webkit-text-size-adjust: 100%; - } + html { + font-family: Arial, sans-serif; + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; + } - body { - margin: 0; - } + body { + margin: 0; + } - a { - text-decoration: none; - background: transparent; - } + a { + text-decoration: none; + background: transparent; + } - .fringe { - position: relative; - width: auto; - margin: 1px; - color: #f2f2f2; - text-decoration: none; - border: 1px solid #C3C7DD; - background-color: #285991; - box-shadow: 0 0 0 1px #000, 0 2px 4px 0 #222; - } + .fringe { + position: relative; + width: auto; + margin: 1px; + color: #f2f2f2; + text-decoration: none; + border: 1px solid #C3C7DD; + background-color: #285991; + box-shadow: 0 0 0 1px #000, 0 2px 4px 0 #222; + } - .centering_content { - height: 100%; - text-align: center; - } + .centering_content { + height: 100%; + text-align: center; + } - .centering_content:before { - content: ''; - display: inline-block; - height: 100%; - vertical-align: middle; - margin-right: -0.25em; /* Adjusts for spacing */ - } + .centering_content:before { + content: ''; + display: inline-block; + height: 100%; + vertical-align: middle; + margin-right: -0.25em; /* Adjusts for spacing */ + } - .top { - top: 1px; - height: 30px; - margin: 0; - border-width: 0 0 1px 0; - -webkit-box-shadow: 0 1px 0 0 #000, 0 -1px 0 0 #000, 1px 2px 4px 0 #222; - box-shadow: 0 1px 0 0 #000, 0 -1px 0 0 #000, 1px 2px 4px 0 #222; - } + .top { + top: 1px; + height: 30px; + margin: 0; + border-width: 0 0 1px 0; + -webkit-box-shadow: 0 1px 0 0 #000, 0 -1px 0 0 #000, 1px 2px 4px 0 #222; + box-shadow: 0 1px 0 0 #000, 0 -1px 0 0 #000, 1px 2px 4px 0 #222; + } - .brand { - position: relative; - display: inline-block; - left: 1px; - width: 306px; - line-height: 30px; - } + .brand { + position: relative; + display: inline-block; + left: 1px; + width: 306px; + line-height: 30px; + } - .brand .logo, .brand .name { - vertical-align: top; - } + .brand .logo, .brand .name { + vertical-align: top; + } - .brand .logo { - width: 30px; - height: 30px; - } + .brand .logo { + width: 30px; + height: 30px; + } - .brand .name { - width: 275px; - height: 29px; - } + .brand .name { + width: 275px; + height: 29px; + } - .cent { - height: calc(100% - 32px); - } + .cent { + height: calc(100% - 32px); + } - .content { - position: relative; - display: inline-block; - max-width: 800px; - margin: 20px 12px; - padding: 20px; - vertical-align: middle; - color: #285991; - border-color: #eee; - background-color: #eee; - -webkit-box-shadow: 0 1px 40px 6px #888, inset 0 0 15px 3px #c7c7c7; - box-shadow: 0 1px 40px 6px #888, inset 0 0 15px 3px #c7c7c7; - } + .content { + position: relative; + display: inline-block; + max-width: 800px; + margin: 20px 12px; + padding: 20px; + vertical-align: middle; + color: #285991; + border-color: #eee; + background-color: #eee; + -webkit-box-shadow: 0 1px 40px 6px #888, inset 0 0 15px 3px #c7c7c7; + box-shadow: 0 1px 40px 6px #888, inset 0 0 15px 3px #c7c7c7; + } - .support { - margin-top: 5px; - text-align: right; - font-size: 12px; - } + .support { + margin-top: 5px; + text-align: right; + font-size: 12px; + } - .support a { - padding: 5px 0; - } + .support a { + padding: 5px 0; + } diff --git a/views/includes/nojs.jade b/views/includes/nojs.jade index 66e5d0e0e..4bb84f0b5 100644 --- a/views/includes/nojs.jade +++ b/views/includes/nojs.jade @@ -1,16 +1,16 @@ | #nojs(style="position:relative;z-index:1000;padding:.3em 1em 0;text-align:center;line-height:1.5;font-size:1.1em;font-weight:bold;background-color:#FFDC84;border-bottom:1px solid #c3c7dd;") - //-Если по ссылке с параметром _nojs=1 перешли с включенным JavaScript, то убираем с помощью него сообщение и редиректим на страницу без параметра - script(type="text/javascript"). - (function(){ - var s = location.search.replace(/&?_nojs=1/g, ''), newpath = location.pathname + (s === '?' ? '' : s); - if (window.history && window.history.replaceState) {window.history.replaceState({}, null, newpath);} else {window.location = newpath;} - document.getElementById('nojs').style.display = 'none'; - }()); - div К сожалению, в вашем браузере выключен JavaScript, который необходим для полноценной работы сайта PastVu.com - div Перейдите по следующей ссылке, чтобы узнать почему это важно и как это исправить: - a(href="http://www.enable-javascript.com/ru/", rel="nofollow", target="_blank", style="display:inline-block;color:#3b5998;") www.enable-javascript.com/ru - div(style="font-size:0.8em;") - a(href='mailto:support@pastvu.comm?subject=Сайт выдаёт сообщение об отсутствии JavaScript&body=Добрый день! Идентификатор моего браузера: '+(agent&&agent.source?agent.source:''), target="_blank") - | [Напишите, если мы ошибаемся: support@pastvu.com] + //-Если по ссылке с параметром _nojs=1 перешли с включенным JavaScript, то убираем с помощью него сообщение и редиректим на страницу без параметра + script(type="text/javascript"). + (function(){ + var s = location.search.replace(/&?_nojs=1/g, ''), newpath = location.pathname + (s === '?' ? '' : s); + if (window.history && window.history.replaceState) {window.history.replaceState({}, null, newpath);} else {window.location = newpath;} + document.getElementById('nojs').style.display = 'none'; + }()); + div К сожалению, в вашем браузере выключен JavaScript, который необходим для полноценной работы сайта PastVu.com + div Перейдите по следующей ссылке, чтобы узнать почему это важно и как это исправить: + a(href="http://www.enable-javascript.com/ru/", rel="nofollow", target="_blank", style="display:inline-block;color:#3b5998;") www.enable-javascript.com/ru + div(style="font-size:0.8em;") + a(href='mailto:support@pastvu.comm?subject=Сайт выдаёт сообщение об отсутствии JavaScript&body=Добрый день! Идентификатор моего браузера: ' + (agent && agent.source ? agent.source : ''), target="_blank") + | [Напишите, если мы ошибаемся: support@pastvu.com] | \ No newline at end of file diff --git a/views/mail/head.jade b/views/mail/head.jade index 48c6e8f49..0e1234d56 100644 --- a/views/mail/head.jade +++ b/views/mail/head.jade @@ -1,11 +1,11 @@ table(style="width: 100%; margin-top: 0px; background-color: #214A78; color: #F2F2F2; border-width: 0px;", border="0", cellspacing="0", cellpadding="0") - tbody - tr - td(style="width: 47px; padding-left: 2px; padding-right: 5px;") - img(src='cid:pastvulogo', style="width: 47px; height: 49px; vertical-align: middle; border-image-width: 0; border-width: 0px;") - td(style="line-height: 1.4em;") - span(style="vertical-align: middle;") - | Hello, #{username}! - if greeting - br - = greeting \ No newline at end of file + tbody + tr + td(style="width: 47px; padding-left: 2px; padding-right: 5px;") + img(src='cid:pastvulogo', style="width: 47px; height: 49px; vertical-align: middle; border-image-width: 0; border-width: 0px;") + td(style="line-height: 1.4em;") + span(style="vertical-align: middle;") + | Hello, #{username}! + if greeting + br + = greeting \ No newline at end of file diff --git a/views/mail/recall.jade b/views/mail/recall.jade index 696a7f2ea..f93571408 100644 --- a/views/mail/recall.jade +++ b/views/mail/recall.jade @@ -1,12 +1,12 @@ include head p - | Password recovery request was created for your PastVu account. - br - | If you didn't request it, just ignore this email. + | Password recovery request was created for your PastVu account. + br + | If you didn't request it, just ignore this email. p - | Click on the following link to enter a new password: - br - a(href=config.client.origin + '/confirm/' + confirmKey, target='_blank') - = config.client.host + '/confirm/' + confirmKey - br - small The link is valid for #{linkvalid}, after which you will need to request a password change again + | Click on the following link to enter a new password: + br + a(href=config.client.origin + '/confirm/' + confirmKey, target='_blank') + = config.client.host + '/confirm/' + confirmKey + br + small The link is valid for #{linkvalid}, after which you will need to request a password change again diff --git a/views/mail/registration.jade b/views/mail/registration.jade index 9b9ce0c6c..669f0d925 100644 --- a/views/mail/registration.jade +++ b/views/mail/registration.jade @@ -1,22 +1,22 @@ include head p(style="padding-left: 3px; border-style: solid; border-width: 0px 0px 0px 3px; border-color: #5D88B6;") - | You have specified the following details: - br - | Login username: #{data.login} - br - | E-mail: #{data.email} - br - small For better security, we do not store your original password. If you forget it, just set the new one with recovery procedures on the site + | You have specified the following details: + br + | Login username: #{data.login} + br + | E-mail: #{data.email} + br + small For better security, we do not store your original password. If you forget it, just set the new one with recovery procedures on the site p - | We require that all new users should to confirm their email, to be sure that email is real. - br - | This is required for protection against spammers and multiple registration. + | We require that all new users should to confirm their email, to be sure that email is real. + br + | This is required for protection against spammers and multiple registration. p(style="padding-left: 3px; border-style: solid; border-width: 0px 0px 0px 3px; border-color: #5D88B6;") - | To activate your account, click the following link: - br - a(href=config.client.origin + '/confirm/' + confirmKey, target='_blank') - = config.client.host + '/confirm/' + confirmKey - br - small The link is valid for #{linkvalid}, after which you will need to register again + | To activate your account, click the following link: + br + a(href=config.client.origin + '/confirm/' + confirmKey, target='_blank') + = config.client.host + '/confirm/' + confirmKey + br + small The link is valid for #{linkvalid}, after which you will need to register again p(style="color: #999;") - small You have received this letter because this email address was used for registration. If you didn't register on our website, simply ignore and delete the email. \ No newline at end of file + small You have received this letter because this email address was used for registration. If you didn't register on our website, simply ignore and delete the email. \ No newline at end of file diff --git a/views/module/admin/conveyer.jade b/views/module/admin/conveyer.jade index 5a2ede876..cf28e020e 100644 --- a/views/module/admin/conveyer.jade +++ b/views/module/admin/conveyer.jade @@ -1,45 +1,45 @@ .conveyerModuleWrapper(data-bind="with: repository[M!M]") - h4 Conveyor control - .row - .col-xs-5.col-md-4 - h5 Actions - button.btn.btn-sm(type="button", data-bind="css: {disabled: exe(), 'btn-warning': conveyerEnabled(), 'btn-success': !conveyerEnabled()}, click: startstop, attr: {disabled: exe()}") - span.glyphicon(data-bind="css: {'glyphicon-stop': conveyerEnabled(), 'glyphicon-play': !conveyerEnabled()}") - span(data-bind="text: conveyerEnabled() ? ' Stop' : ' Start'") - button.btn.btn-sm.btn-danger(type="button", data-bind="css: {disabled: exe()}, click: clearConveyer, attr: {disabled: exe()}") - span.glyphicon.glyphicon-trash - | Clear - br - br - .toConvertSection - h5 Send to convert all photos: - form.form-inline - .form-group - | Photos id:  - input.form-control(type="number", placeholder="min", data-bind="attr: {disabled: exe()}, value: reconvertCidMin, valueUpdate: 'afterkeydown'", style="width: 70px;") - input.form-control(type="number", placeholder="max", data-bind="attr: {disabled: exe()}, value: reconvertCidMax, valueUpdate: 'afterkeydown'", style="width: 70px;") - |   - form.form-inline - .form-group - | Region id:  - input.form-control(type="number", data-bind="attr: {disabled: exe()}, value: reconvertRegion, valueUpdate: 'afterkeydown'", style="width: 70px;") - |   - button.btn.btn-primary(data-bind="click: toConvert, attr: {disabled: exe()}") Start - .col-xs-7.col-md-8(style="padding-left: 10px;") - h5 The current state of the conveyor - div(data-bind="css: {'text-success': conveyerEnabled(), 'text-error': !conveyerEnabled()}, text: conveyerEnabled() ? 'Conveyor is active' : 'Conveyor is stopped'") - div - span.stateRate(data-bind="text:converted()") - span.stateDesc Converted since last 10-minute - div - span.stateRate(data-bind="text:clength()") - span.stateDesc Conveyor length - div - span.stateRate(data-bind="text:cmaxlength()") - span.stateDesc Maximum conveyor length since last 10-minute - br - h5 Converted - #conveyerConvertGraph - br - h5 Maximum conveyor length - #conveyerLengthGraph \ No newline at end of file + h4 Conveyor control + .row + .col-xs-5.col-md-4 + h5 Actions + button.btn.btn-sm(type="button", data-bind="css: {disabled: exe(), 'btn-warning': conveyerEnabled(), 'btn-success': !conveyerEnabled()}, click: startstop, attr: {disabled: exe()}") + span.glyphicon(data-bind="css: {'glyphicon-stop': conveyerEnabled(), 'glyphicon-play': !conveyerEnabled()}") + span(data-bind="text: conveyerEnabled() ? ' Stop' : ' Start'") + button.btn.btn-sm.btn-danger(type="button", data-bind="css: {disabled: exe()}, click: clearConveyer, attr: {disabled: exe()}") + span.glyphicon.glyphicon-trash + | Clear + br + br + .toConvertSection + h5 Send to convert all photos: + form.form-inline + .form-group + | Photos id:  + input.form-control(type="number", placeholder="min", data-bind="attr: {disabled: exe()}, value: reconvertCidMin, valueUpdate: 'afterkeydown'", style="width: 70px;") + input.form-control(type="number", placeholder="max", data-bind="attr: {disabled: exe()}, value: reconvertCidMax, valueUpdate: 'afterkeydown'", style="width: 70px;") + |   + form.form-inline + .form-group + | Region id:  + input.form-control(type="number", data-bind="attr: {disabled: exe()}, value: reconvertRegion, valueUpdate: 'afterkeydown'", style="width: 70px;") + |   + button.btn.btn-primary(data-bind="click: toConvert, attr: {disabled: exe()}") Start + .col-xs-7.col-md-8(style="padding-left: 10px;") + h5 The current state of the conveyor + div(data-bind="css: {'text-success': conveyerEnabled(), 'text-error': !conveyerEnabled()}, text: conveyerEnabled() ? 'Conveyor is active' : 'Conveyor is stopped'") + div + span.stateRate(data-bind="text:converted()") + span.stateDesc Converted since last 10-minute + div + span.stateRate(data-bind="text:clength()") + span.stateDesc Conveyor length + div + span.stateRate(data-bind="text:cmaxlength()") + span.stateDesc Maximum conveyor length since last 10-minute + br + h5 Converted + #conveyerConvertGraph + br + h5 Maximum conveyor length + #conveyerLengthGraph \ No newline at end of file diff --git a/views/module/admin/main.jade b/views/module/admin/main.jade index 215d7dd98..77e0ffe45 100644 --- a/views/module/admin/main.jade +++ b/views/module/admin/main.jade @@ -1,83 +1,83 @@ .mainAdmin(data-bind="with: repository[M!M]") - h6 Current connections - div - span.stateRate - .rate(data-bind="text: onlines.users()") - | / - .rate(data-bind="text: (onlines.all() - onlines.users())") - | / - .rate(data-bind="text: onlines.all()") - span.stateDesc Visitors authorised/anonymous/total - div - span.stateRate - .rate(data-bind="text: onlines.sessUC()") - | / - .rate(data-bind="text: onlines.sessAC()") - | / - .rate(data-bind="text: (onlines.sessUC() + onlines.sessAC())") - span.stateDesc(data-bind="text: 'Active sessionsauthorised/anonymous/total. With zero connections: [' + onlines.sessUZC() + '/' + onlines.sessAZC() + ']. With no connections: [' + onlines.sessUNC() + '/' + onlines.sessANC() + '].'") + h6 Current connections + div + span.stateRate + .rate(data-bind="text: onlines.users()") + | / + .rate(data-bind="text: (onlines.all() - onlines.users())") + | / + .rate(data-bind="text: onlines.all()") + span.stateDesc Visitors authorised/anonymous/total + div + span.stateRate + .rate(data-bind="text: onlines.sessUC()") + | / + .rate(data-bind="text: onlines.sessAC()") + | / + .rate(data-bind="text: (onlines.sessUC() + onlines.sessAC())") + span.stateDesc(data-bind="text: 'Active sessionsauthorised/anonymous/total. With zero connections: [' + onlines.sessUZC() + '/' + onlines.sessAZC() + ']. With no connections: [' + onlines.sessUNC() + '/' + onlines.sessANC() + '].'") - div - span.stateRate - .rate(data-bind="text: onlines.sessWCUC()") - | / - .rate(data-bind="text: onlines.sessWCAC()") - | / - .rate(data-bind="text: (onlines.sessWCUC() + onlines.sessWCAC())") - span.stateDesc Sessions waiting connections authorised/anonymous/total - div - span.stateRate - .rate(data-bind="text: onlines.sockUC()") - | / - .rate(data-bind="text: onlines.sockAC()") - | / - .rate(data-bind="text: (onlines.sockUC() + onlines.sockAC())") - span.stateDesc Active connections authorised/anonymous/total - div - span.stateDesc Map of user objects in memory:  - span.stateRate - | usSid: - .rate(data-bind="text: ' '+ onlines.cusSid()") - | , usLogin: - .rate(data-bind="text: ' '+ onlines.cusLogin()") - | , usId: - .rate(data-bind="text: ' '+ onlines.cusId()") - div - span.stateDesc Map of sessions in memory:  - span.stateRate - | sessConnected: - .rate(data-bind="text: ' '+ onlines.csessConnected()") - | , sessWaitingConnect: - .rate(data-bind="text: ' '+ onlines.csessWaitingConnect()") - | , sessWaitingSelect: - .rate(data-bind="text: ' '+ onlines.csessWaitingSelect()") - .desc - strong Active session - | - one client browser with opened pastvu at least in one tab. If exists with zero connections, means that connection closing didn't clear session (should not be). If without connection, means session jumped in active state without socket connection (should not be). - br - strong Waiting session - | - client passed handshake, but still have no reac socket connection. Such session remove in 5 minutes if connection would not established. - br - strong Active connection - | - every opened browser tab of active session - br - br - | In each client session (broeser) can be several opened connections (tabs) - br - | User, who authorised in several browser at the same time, counts as one, but have several sessions according the number of open browsers. That's why number of active authorised sessions may be more then number of authorised - br + div + span.stateRate + .rate(data-bind="text: onlines.sessWCUC()") + | / + .rate(data-bind="text: onlines.sessWCAC()") + | / + .rate(data-bind="text: (onlines.sessWCUC() + onlines.sessWCAC())") + span.stateDesc Sessions waiting connections authorised/anonymous/total + div + span.stateRate + .rate(data-bind="text: onlines.sockUC()") + | / + .rate(data-bind="text: onlines.sockAC()") + | / + .rate(data-bind="text: (onlines.sockUC() + onlines.sockAC())") + span.stateDesc Active connections authorised/anonymous/total + div + span.stateDesc Map of user objects in memory:  + span.stateRate + | usSid: + .rate(data-bind="text: ' '+ onlines.cusSid()") + | , usLogin: + .rate(data-bind="text: ' '+ onlines.cusLogin()") + | , usId: + .rate(data-bind="text: ' '+ onlines.cusId()") + div + span.stateDesc Map of sessions in memory:  + span.stateRate + | sessConnected: + .rate(data-bind="text: ' '+ onlines.csessConnected()") + | , sessWaitingConnect: + .rate(data-bind="text: ' '+ onlines.csessWaitingConnect()") + | , sessWaitingSelect: + .rate(data-bind="text: ' '+ onlines.csessWaitingSelect()") + .desc + strong Active session + | - one client browser with opened pastvu at least in one tab. If exists with zero connections, means that connection closing didn't clear session (should not be). If without connection, means session jumped in active state without socket connection (should not be). + br + strong Waiting session + | - client passed handshake, but still have no reac socket connection. Such session remove in 5 minutes if connection would not established. + br + strong Active connection + | - every opened browser tab of active session + br + br + | In each client session (broeser) can be several opened connections (tabs) + br + | User, who authorised in several browser at the same time, counts as one, but have several sessions according the number of open browsers. That's why number of active authorised sessions may be more then number of authorised + br - //ko if: headers().length - h6 Headers of ACTIVE sessions without connections (if exists): - div(data-bind="foreach: headers") - | ------- - .headers(data-bind="html: $data") - br - // /ko + //ko if: headers().length + h6 Headers of ACTIVE sessions without connections (if exists): + div(data-bind="foreach: headers") + | ------- + .headers(data-bind="html: $data") + br + // /ko - //ko if: headersWC().length - h6 Headers of WAITING sessions without connections (if exists): - div(data-bind="foreach: headersWC") - | ------- - .headers(data-bind="html: $data") - // /ko \ No newline at end of file + //ko if: headersWC().length + h6 Headers of WAITING sessions without connections (if exists): + div(data-bind="foreach: headersWC") + | ------- + .headers(data-bind="html: $data") + // /ko \ No newline at end of file diff --git a/views/module/admin/menu.jade b/views/module/admin/menu.jade index f78efc01f..bd929713c 100644 --- a/views/module/admin/menu.jade +++ b/views/module/admin/menu.jade @@ -1,5 +1,5 @@ .adminMenu(data-bind="with: repository[M!M]") - nav.navbar.navbar-pastvu - ul.nav.navbar-nav(data-bind="foreach: menuItems") - li(data-bind="css: {active: $data.section === $parent.section()}") - a(data-bind="text: $data.name, attr: {href: ($data.disable ? '' : $data.href)}, css: {disabled: $data.disable}") \ No newline at end of file + nav.navbar.navbar-pastvu + ul.nav.navbar-nav(data-bind="foreach: menuItems") + li(data-bind="css: {active: $data.section === $parent.section()}") + a(data-bind="text: $data.name, attr: {href: ($data.disable ? '' : $data.href)}, css: {disabled: $data.disable}") \ No newline at end of file diff --git a/views/module/admin/newsEdit.jade b/views/module/admin/newsEdit.jade index 2c3409319..573ffbb6c 100644 --- a/views/module/admin/newsEdit.jade +++ b/views/module/admin/newsEdit.jade @@ -1,48 +1,48 @@ .adminNews(data-bind="with: repository[M!M]") - h4(data-bind="text: createMode() ? 'News creation' : 'News edit'") + h4(data-bind="text: createMode() ? 'News creation' : 'News edit'") - form.form-horizontal(action='', autocomplete="off", method='POST', data-bind="event: {submit: submit}") - .form-group - label.col-xs-3.col-md-2.col-lg-1.control-label Title - .col-xs-3.col-md-2 - input.form-control(type='text', data-bind="value: news.title, valueUpdate: 'afterkeydown'") - .form-group - label.col-xs-3.col-md-2.col-lg-1.control-label Publish - .col-xs-3.col-md-2 - .input-group.date#newsPdate - input.form-control(data-format="DD.MM.YYYY HH:mm:ss", type="text") - span.input-group-addon - span.glyphicon.glyphicon-calendar - .col-xs-4.col-md-3(style="text-align: right;") - button.btn.btn-sm.btn-primary.toggleTDate(type="button", title="The time when the news will disappear from the main page. In the general list it will remain", data-bind="click: toggleTDate") - span(data-bind="text: tDateExists() ? 'Remove hidding time from the main page' : 'Add hidding time from the main page'") - //ko if: tDateExists() - .col-xs-3.col-md-2 - .input-group.date#newsTdate - input.form-control(data-format="DD.MM.YYYY HH:mm:ss", type="text") - span.input-group-addon - span.glyphicon.glyphicon-calendar - // /ko - .form-group - .col-xs-3.col-xs-offset-3.col-md-2.col-md-offset-2.col-lg-offset-1 - .checkbox - label - input(type="checkbox", data-bind="checked: news.nocomments") - | Without comments - .form-group - .textName - button.btn.btn-sm.btn-primary.toggleNotice(type="button", data-bind="click: toggleNotice") - span(data-bind="text: noticeExists() ? 'Remove short version' : 'Add short version'") - //ko if: noticeExists() - span.text-muted Short version - // /ko - //ko if: noticeExists() - textarea#newsNotice - // /ko - .form-group - .textName Full version - textarea#newsPrimary - .form-group - button.btn.btn-success(type="submit") - span.glyphicon.glyphicon-ok - | Save \ No newline at end of file + form.form-horizontal(action='', autocomplete="off", method='POST', data-bind="event: {submit: submit}") + .form-group + label.col-xs-3.col-md-2.col-lg-1.control-label Title + .col-xs-3.col-md-2 + input.form-control(type='text', data-bind="value: news.title, valueUpdate: 'afterkeydown'") + .form-group + label.col-xs-3.col-md-2.col-lg-1.control-label Publish + .col-xs-3.col-md-2 + .input-group.date#newsPdate + input.form-control(data-format="DD.MM.YYYY HH:mm:ss", type="text") + span.input-group-addon + span.glyphicon.glyphicon-calendar + .col-xs-4.col-md-3(style="text-align: right;") + button.btn.btn-sm.btn-primary.toggleTDate(type="button", title="The time when the news will disappear from the main page. In the general list it will remain", data-bind="click: toggleTDate") + span(data-bind="text: tDateExists() ? 'Remove hidding time from the main page' : 'Add hidding time from the main page'") + //ko if: tDateExists() + .col-xs-3.col-md-2 + .input-group.date#newsTdate + input.form-control(data-format="DD.MM.YYYY HH:mm:ss", type="text") + span.input-group-addon + span.glyphicon.glyphicon-calendar + // /ko + .form-group + .col-xs-3.col-xs-offset-3.col-md-2.col-md-offset-2.col-lg-offset-1 + .checkbox + label + input(type="checkbox", data-bind="checked: news.nocomments") + | Without comments + .form-group + .textName + button.btn.btn-sm.btn-primary.toggleNotice(type="button", data-bind="click: toggleNotice") + span(data-bind="text: noticeExists() ? 'Remove short version' : 'Add short version'") + //ko if: noticeExists() + span.text-muted Short version + // /ko + //ko if: noticeExists() + textarea#newsNotice + // /ko + .form-group + .textName Full version + textarea#newsPrimary + .form-group + button.btn.btn-success(type="submit") + span.glyphicon.glyphicon-ok + | Save \ No newline at end of file diff --git a/views/module/admin/region.jade b/views/module/admin/region.jade index 7395b2cdf..347c58083 100644 --- a/views/module/admin/region.jade +++ b/views/module/admin/region.jade @@ -1,111 +1,111 @@ .adminRegion(data-bind="with: repository[M!M]") - h4(data-bind="text: createMode() ? 'Region creation' : 'Region editing'") - form.form-horizontal(action='', autocomplete="off", method='POST', data-bind="event: {submit: save}") - .form-group - label.col-xs-4.col-sm-3.col-lg-2.control-label Title - .col-xs-3.col-sm-2 - input.form-control(type='text', data-bind="value: region.title_en, valueUpdate: 'keyup'", placeholder="(EN) English", required="required", autocorrect="off", autocapitalize="off") - .col-xs-3.col-sm-2 - input.form-control(type='text', data-bind="value: region.title_local, valueUpdate: 'keyup'", placeholder="(RU) Russian", autocorrect="off", autocapitalize="off") - //ko if: !createMode() - .form-group - label.col-xs-4.col-sm-3.col-lg-2.control-label - .col-xs-8.col-sm-9.col-lg-10 - p.form-control-static - | Id: - strong(data-bind="text: ' ' + region.cid()") - | ; Level: - strong(data-bind="text: ' ' + (Number(haveParent()) ? region.parents().length + 1 : 1)") - | ; Polygon count: - strong(data-bind="text: ' ' + formatNum(region.polynum.exterior())") - //ko if: region.polynum.interior() - | (+ - strong(data-bind="text: formatNum(region.polynum.interior())") - | outter) - // /ko - | ; Vertex count: - strong(data-bind="text: ' ' + (formatNum(region.pointsnum() - region.polynum.exterior() - region.polynum.interior()))") - | ;  - a(data-bind="attr: {href: '/admin/region?hl=' + region.cid()}") Show in regions tree - // /ko - .form-group - label.col-xs-4.col-sm-3.col-lg-2.control-label Parent region - .col-xs-6.col-sm-4 - .row - .col-xs-8.col-sm-9.col-md-8.col-lg-6 - label.radio-inline - input.thr(type="radio", id="parent_radios_0", name="parent_radios", value="0", data-bind="checked: haveParent") - | Is absent - label.radio-inline - input.thr(type="radio", id="parent_radios_1", name="parent_radios", value="1", data-bind="checked: haveParent") - | Exists - //ko if: Number(haveParent()) - .col-xs-4.col-sm-3.col-lg-3 - input.form-control(type='text', data-bind="value: parentCid, valueUpdate: 'keyup'", placeholder="Id of perent region", required="required", autocorrect="off", autocapitalize="off") - // /ko - //ko if: region.parents().length || childLenArr().length - .form-group - label.col-xs-4.col-sm-3.col-lg-2.control-label - .col-xs-8.col-sm-9.col-lg-10 - p.form-control-static.regions - //ko foreach: region.parents - a(data-bind="text: ' ' + $data.title_en(), attr: {href: '/admin/region/' + $data.cid()}") - |   - span.glyphicon.glyphicon-play - |   - // /ko - //ko if: !createMode() - span.current(title="Current region", data-bind="text: ' ' + region.title_en()") - // /ko - //ko foreach: childLenArr - |   - span.glyphicon.glyphicon-play - span(data-bind="text: ' ' + $data") - // /ko - // /ko - .form-group - label.col-xs-4.col-sm-3.col-lg-2.control-label Additional parameters - .col-xs-8.col-sm-9.col-lg-10(style="padding-top: 3px") - .dopparam - abbr(title="The central point of the region in it home position") Center - | : - input.form-control.input-sm.center(type="text", data-bind="centerInput: true, attr: {readonly: region.centerAuto(), placeholder: region.centerAuto() ? 'Not yet calculated' : 'Not specified'}, css: {invalid: !region.centerAuto() && !centerValid()}") - .btn-group.btn-group-sm - button.btn.btn-primary.yes(type="button", data-bind="css: {active: region.centerAuto()}, click: centerAutoToggle") Auto - button.btn.btn-primary.no(type="button", data-bind="css: {active: !region.centerAuto()}, click: centerAutoToggle") Manual - br - .dopparam - abbr(title="Bounding box - rectangle in which entire region is fits") Bbox - | : - input.form-control.input-sm.bbox(type="text", readonly, data-bind="attr: {value: region.bbox() ? region.bbox().join(', ') : ''}", placeholder="Not yet calculated") - .dopparam - abbr(title="The rectangle that should be visible in the home position of the map. We need to calculate the scale") Bbox home - | .: - .btn-group.btn-group-sm - button.btn.btn-primary.yes(type="button", data-bind="css: {active: bboxAuto()}, click: bboxHomeToggle") As bbox - button.btn.btn-primary.no(type="button", data-bind="css: {active: !bboxAuto()}, click: bboxHomeToggle") Manual - //ko if: !bboxAuto() - input.form-control.input-sm.bbox(type="text", data-bind="bboxhomeInput: true, attr: {readonly: bboxAuto()}, css: {invalid: !bboxAuto() && !bboxhomeValid()}", placeholder="Not specified") - // /ko - //ko if: createMode() || showGeo() - .form-group - label.col-xs-4.col-sm-3.col-lg-2.control-label - | Geometry - br - | GeoJSON - .col-xs-8.col-sm-9.col-lg-10 - textarea.form-control(wrap="soft", rows="5", data-bind="value: region.geo, valueUpdate: 'keyup'", placeholder="{ type: 'Polygon | MultiPolygon', coordinates: [[ [] ]] }", required="required") - // /ko - .form-group - button.btn.btn-success(type="submit", data-bind="attr: {disabled: exe()}") - span.glyphicon.glyphicon-ok - | Save - button.btn.btn-danger(type="button", data-bind="click: remove, attr: {disabled: exe()}") - span.glyphicon.glyphicon-remove - | Remove - //ko if: !createMode() - button.btn.btn-primary(type="button", data-bind="click: function () {showGeo(!showGeo())}, attr: {disabled: exe()}") - span.glyphicon.glyphicon-th-list - span(data-bind="text: showGeo() ? ' Hide coordinates' : ' Show coordinates'") - // /ko - .map(data-bind="style: {height: mh()}") + h4(data-bind="text: createMode() ? 'Region creation' : 'Region editing'") + form.form-horizontal(action='', autocomplete="off", method='POST', data-bind="event: {submit: save}") + .form-group + label.col-xs-4.col-sm-3.col-lg-2.control-label Title + .col-xs-3.col-sm-2 + input.form-control(type='text', data-bind="value: region.title_en, valueUpdate: 'keyup'", placeholder="(EN) English", required="required", autocorrect="off", autocapitalize="off") + .col-xs-3.col-sm-2 + input.form-control(type='text', data-bind="value: region.title_local, valueUpdate: 'keyup'", placeholder="(RU) Russian", autocorrect="off", autocapitalize="off") + //ko if: !createMode() + .form-group + label.col-xs-4.col-sm-3.col-lg-2.control-label + .col-xs-8.col-sm-9.col-lg-10 + p.form-control-static + | Id: + strong(data-bind="text: ' ' + region.cid()") + | ; Level: + strong(data-bind="text: ' ' + (Number(haveParent()) ? region.parents().length + 1 : 1)") + | ; Polygon count: + strong(data-bind="text: ' ' + formatNum(region.polynum.exterior())") + //ko if: region.polynum.interior() + | (+ + strong(data-bind="text: formatNum(region.polynum.interior())") + | outter) + // /ko + | ; Vertex count: + strong(data-bind="text: ' ' + (formatNum(region.pointsnum() - region.polynum.exterior() - region.polynum.interior()))") + | ;  + a(data-bind="attr: {href: '/admin/region?hl=' + region.cid()}") Show in regions tree + // /ko + .form-group + label.col-xs-4.col-sm-3.col-lg-2.control-label Parent region + .col-xs-6.col-sm-4 + .row + .col-xs-8.col-sm-9.col-md-8.col-lg-6 + label.radio-inline + input.thr(type="radio", id="parent_radios_0", name="parent_radios", value="0", data-bind="checked: haveParent") + | Is absent + label.radio-inline + input.thr(type="radio", id="parent_radios_1", name="parent_radios", value="1", data-bind="checked: haveParent") + | Exists + //ko if: Number(haveParent()) + .col-xs-4.col-sm-3.col-lg-3 + input.form-control(type='text', data-bind="value: parentCid, valueUpdate: 'keyup'", placeholder="Id of perent region", required="required", autocorrect="off", autocapitalize="off") + // /ko + //ko if: region.parents().length || childLenArr().length + .form-group + label.col-xs-4.col-sm-3.col-lg-2.control-label + .col-xs-8.col-sm-9.col-lg-10 + p.form-control-static.regions + //ko foreach: region.parents + a(data-bind="text: ' ' + $data.title_en(), attr: {href: '/admin/region/' + $data.cid()}") + |   + span.glyphicon.glyphicon-play + |   + // /ko + //ko if: !createMode() + span.current(title="Current region", data-bind="text: ' ' + region.title_en()") + // /ko + //ko foreach: childLenArr + |   + span.glyphicon.glyphicon-play + span(data-bind="text: ' ' + $data") + // /ko + // /ko + .form-group + label.col-xs-4.col-sm-3.col-lg-2.control-label Additional parameters + .col-xs-8.col-sm-9.col-lg-10(style="padding-top: 3px") + .dopparam + abbr(title="The central point of the region in it home position") Center + | : + input.form-control.input-sm.center(type="text", data-bind="centerInput: true, attr: {readonly: region.centerAuto(), placeholder: region.centerAuto() ? 'Not yet calculated' : 'Not specified'}, css: {invalid: !region.centerAuto() && !centerValid()}") + .btn-group.btn-group-sm + button.btn.btn-primary.yes(type="button", data-bind="css: {active: region.centerAuto()}, click: centerAutoToggle") Auto + button.btn.btn-primary.no(type="button", data-bind="css: {active: !region.centerAuto()}, click: centerAutoToggle") Manual + br + .dopparam + abbr(title="Bounding box - rectangle in which entire region is fits") Bbox + | : + input.form-control.input-sm.bbox(type="text", readonly, data-bind="attr: {value: region.bbox() ? region.bbox().join(', ') : ''}", placeholder="Not yet calculated") + .dopparam + abbr(title="The rectangle that should be visible in the home position of the map. We need to calculate the scale") Bbox home + | .: + .btn-group.btn-group-sm + button.btn.btn-primary.yes(type="button", data-bind="css: {active: bboxAuto()}, click: bboxHomeToggle") As bbox + button.btn.btn-primary.no(type="button", data-bind="css: {active: !bboxAuto()}, click: bboxHomeToggle") Manual + //ko if: !bboxAuto() + input.form-control.input-sm.bbox(type="text", data-bind="bboxhomeInput: true, attr: {readonly: bboxAuto()}, css: {invalid: !bboxAuto() && !bboxhomeValid()}", placeholder="Not specified") + // /ko + //ko if: createMode() || showGeo() + .form-group + label.col-xs-4.col-sm-3.col-lg-2.control-label + | Geometry + br + | GeoJSON + .col-xs-8.col-sm-9.col-lg-10 + textarea.form-control(wrap="soft", rows="5", data-bind="value: region.geo, valueUpdate: 'keyup'", placeholder="{ type: 'Polygon | MultiPolygon', coordinates: [[ [] ]] }", required="required") + // /ko + .form-group + button.btn.btn-success(type="submit", data-bind="attr: {disabled: exe()}") + span.glyphicon.glyphicon-ok + | Save + button.btn.btn-danger(type="button", data-bind="click: remove, attr: {disabled: exe()}") + span.glyphicon.glyphicon-remove + | Remove + //ko if: !createMode() + button.btn.btn-primary(type="button", data-bind="click: function () {showGeo(!showGeo())}, attr: {disabled: exe()}") + span.glyphicon.glyphicon-th-list + span(data-bind="text: showGeo() ? ' Hide coordinates' : ' Show coordinates'") + // /ko + .map(data-bind="style: {height: mh()}") diff --git a/views/module/admin/regionCheck.jade b/views/module/admin/regionCheck.jade index ba26c0799..707bc0853 100644 --- a/views/module/admin/regionCheck.jade +++ b/views/module/admin/regionCheck.jade @@ -1,13 +1,13 @@ .adminRegionCheck(data-bind="with: repository[M!M]") - h4 Regions search by point coordinates - .topinfo - span.infotxt Click on the map or enter the coordinates separated by commas: - .inputGeoWrap - .input-group - input.form-control.input-sm.inputGeo(type="text", data-bind="event: {keyup: inputEnter}", placeholder="Latitude, Longitude") - span.input-group-addon(data-bind="click: inputGeo") - span.glyphicon.glyphicon-screenshot - .extlnk - span.infotxt Link to the point: - input.form-control.input-sm.inputLink(type="text", onclick="this.select();", readonly, data-bind="value: location.host + location.pathname + link()") - .map(data-bind="style: {height: mh()}") \ No newline at end of file + h4 Regions search by point coordinates + .topinfo + span.infotxt Click on the map or enter the coordinates separated by commas: + .inputGeoWrap + .input-group + input.form-control.input-sm.inputGeo(type="text", data-bind="event: {keyup: inputEnter}", placeholder="Latitude, Longitude") + span.input-group-addon(data-bind="click: inputGeo") + span.glyphicon.glyphicon-screenshot + .extlnk + span.infotxt Link to the point: + input.form-control.input-sm.inputLink(type="text", onclick="this.select();", readonly, data-bind="value: location.host + location.pathname + link()") + .map(data-bind="style: {height: mh()}") \ No newline at end of file diff --git a/views/module/admin/regionList.jade b/views/module/admin/regionList.jade index 58d402f3d..4b3620e2f 100644 --- a/views/module/admin/regionList.jade +++ b/views/module/admin/regionList.jade @@ -1,64 +1,64 @@ .adminRegions(data-bind="with: repository[M!M]") - h4 List of regions - .regionsStat - .stat - span Total regions count: - b(data-bind="text: ' '+formatNum(stat.common.regionsCount)") - span   By level: - //ko foreach: stat.byLevel - //ko if: $index() > 0 - span.glyphicon.glyphicon-play - // /ko - b(data-bind="text: ' ' + $parent.formatNum($data.regionsCount) + ' ', attr: {title: ($index() + 1) + ' level'}") - // /ko - .stat - span Total vertex count: - b(data-bind="text: ' '+formatNum(stat.common.pointsCount)") - span   By level: - //ko foreach: stat.byLevel - //ko if: $index() > 0 - span.glyphicon.glyphicon-play - // /ko - b(data-bind="text: ' ' + $parent.formatNum($data.pointsCount) + ' ', attr: {title: ($index() + 1) + ' level'}") - // /ko - .regionsHead - a.headElem.interact(href="/admin/region/create") - span.glyphicon.glyphicon-plus - | Add - .headElem.interact(data-bind="click: expandAll") - span.glyphicon.glyphicon-chevron-down - | Expand all - .headElem.interact(data-bind="click: collapseAll") - span.glyphicon.glyphicon-chevron-up - | Collapse all - .tree.well.well-sm - ul(data-bind="template: {name: 'treeNode', foreach: regions}") + h4 List of regions + .regionsStat + .stat + span Total regions count: + b(data-bind="text: ' '+formatNum(stat.common.regionsCount)") + span   By level: + //ko foreach: stat.byLevel + //ko if: $index() > 0 + span.glyphicon.glyphicon-play + // /ko + b(data-bind="text: ' ' + $parent.formatNum($data.regionsCount) + ' ', attr: {title: ($index() + 1) + ' level'}") + // /ko + .stat + span Total vertex count: + b(data-bind="text: ' '+formatNum(stat.common.pointsCount)") + span   By level: + //ko foreach: stat.byLevel + //ko if: $index() > 0 + span.glyphicon.glyphicon-play + // /ko + b(data-bind="text: ' ' + $parent.formatNum($data.pointsCount) + ' ', attr: {title: ($index() + 1) + ' level'}") + // /ko + .regionsHead + a.headElem.interact(href="/admin/region/create") + span.glyphicon.glyphicon-plus + | Add + .headElem.interact(data-bind="click: expandAll") + span.glyphicon.glyphicon-chevron-down + | Expand all + .headElem.interact(data-bind="click: collapseAll") + span.glyphicon.glyphicon-chevron-up + | Collapse all + .tree.well.well-sm + ul(data-bind="template: {name: 'treeNode', foreach: regions}") - | \ No newline at end of file + | \ No newline at end of file diff --git a/views/module/admin/submenu.jade b/views/module/admin/submenu.jade index 43c4d3908..9700b85b4 100644 --- a/views/module/admin/submenu.jade +++ b/views/module/admin/submenu.jade @@ -1,6 +1,6 @@ .adminSubMenu(data-bind="with: repository[M!M]") - ul.nav.nav-pills.nav-stacked - //ko foreach: menuItems - li(data-bind="css: {active: $data.section === $parent.section()}") - a(data-bind="text: $data.name, attr: {href: ($data.disable ? '' : $data.href)}, css: {disabled: $data.disable}") - // /ko \ No newline at end of file + ul.nav.nav-pills.nav-stacked + //ko foreach: menuItems + li(data-bind="css: {active: $data.section === $parent.section()}") + a(data-bind="text: $data.name, attr: {href: ($data.disable ? '' : $data.href)}, css: {disabled: $data.disable}") + // /ko \ No newline at end of file diff --git a/views/module/appAdmin.jade b/views/module/appAdmin.jade index fe13a4a64..c0ab33cdb 100644 --- a/views/module/appAdmin.jade +++ b/views/module/appAdmin.jade @@ -1,8 +1,8 @@ .mContainer.mHidden#topContainer .page-wrap: .row - .col-xs-2.mContainer.mHidden#subMenuContainer - .col-xs-10 - .mContainer.mHidden#menuContainer - .mContainer.mHidden#bodyContainer + .col-xs-2.mContainer.mHidden#subMenuContainer + .col-xs-10 + .mContainer.mHidden#menuContainer + .mContainer.mHidden#bodyContainer footer.mContainer#footContainer .mContainer.mNoDisplay.mFadeIn#auth \ No newline at end of file diff --git a/views/module/comment/cdotadd.jade b/views/module/comment/cdotadd.jade index 73c27dd7a..9cc69c8f7 100644 --- a/views/module/comment/cdotadd.jade +++ b/views/module/comment/cdotadd.jade @@ -1,43 +1,43 @@ .c.cadd(class="l{{=it.level}}", data-cid="{{=it.cid}}", data-level="{{=it.level}}", data-type="{{=it.type}}") - a.hrefava(href="{{='/u/'+it.user.login}}", target="_blank") - | {{?it.user.avatar === undefined}} - .overprint {{=it.user.disp[0]}} - | {{?}} - img.cava(src="{{=it.user.avatar || '/img/caps/avatarth.png'}}") - .cbody - textarea.form-control.cinput(wrap="soft", maxlength="12000") - .cinputLabel - | {{?it.level}} - | Push to write comment - | {{??}} - | Push to write first level comment - br - small(style="font-style: italic") To reply to existing comment, click Reply beneath it - | {{?}} - form.form-inline - button.btn.btn-success.btn-sm.btnCommentSend(type="button", data-bind="click: send, attr: {disabled: exe()}") - span.glyphicon.glyphicon-comment - | Send - button.btn.btn-warning.btn-sm.btnCommentCancel(type="button", data-bind="click: cancel, attr: {disabled: exe()}") - span.glyphicon.glyphicon-remove - | Cancel - // ko if: canFrag - button.btn.btn-primary.btn-sm.btnCommentFrag(type="button", data-bind="click: fragClick, attr: {disabled: exe()}") - span.glyphicon.glyphicon-picture - | Fragment - // ko if: fraging() - button.btn.btn-primary.btn-sm.btnCommentFragDel(type="button", data-bind="click: fragDelete, attr: {disabled: exe()}") - span.glyphicon.glyphicon-remove - | Clear fragment - // /ko - // /ko - .checkbox.replySubscr - // ko if: subscr() - | You are subscribed to new comments in this topic - // /ko - // ko ifnot: subscr() - //- Устанавливаем checked как атрибут, чтобы его нажатие не изменяло настройку пользователя - label - input.chkSubscr(type="checkbox", data-bind="attr:{checked: auth.iAm.settings.subscr_auto_reply() ? 'checked' : null}, event: {click: chkSubscrClickBind}") - span(style="vertical-align: top;") Subscribe to topic - // /ko \ No newline at end of file + a.hrefava(href="{{='/u/'+it.user.login}}", target="_blank") + | {{?it.user.avatar === undefined}} + .overprint {{=it.user.disp[0]}} + | {{?}} + img.cava(src="{{=it.user.avatar || '/img/caps/avatarth.png'}}") + .cbody + textarea.form-control.cinput(wrap="soft", maxlength="12000") + .cinputLabel + | {{?it.level}} + | Push to write comment + | {{??}} + | Push to write first level comment + br + small(style="font-style: italic") To reply to existing comment, click Reply beneath it + | {{?}} + form.form-inline + button.btn.btn-success.btn-sm.btnCommentSend(type="button", data-bind="click: send, attr: {disabled: exe()}") + span.glyphicon.glyphicon-comment + | Send + button.btn.btn-warning.btn-sm.btnCommentCancel(type="button", data-bind="click: cancel, attr: {disabled: exe()}") + span.glyphicon.glyphicon-remove + | Cancel + // ko if: canFrag + button.btn.btn-primary.btn-sm.btnCommentFrag(type="button", data-bind="click: fragClick, attr: {disabled: exe()}") + span.glyphicon.glyphicon-picture + | Fragment + // ko if: fraging() + button.btn.btn-primary.btn-sm.btnCommentFragDel(type="button", data-bind="click: fragDelete, attr: {disabled: exe()}") + span.glyphicon.glyphicon-remove + | Clear fragment + // /ko + // /ko + .checkbox.replySubscr + // ko if: subscr() + | You are subscribed to new comments in this topic + // /ko + // ko ifnot: subscr() + //- Устанавливаем checked как атрибут, чтобы его нажатие не изменяло настройку пользователя + label + input.chkSubscr(type="checkbox", data-bind="attr:{checked: auth.iAm.settings.subscr_auto_reply() ? 'checked' : null}, event: {click: chkSubscrClickBind}") + span(style="vertical-align: top;") Subscribe to topic + // /ko \ No newline at end of file diff --git a/views/module/comment/cdotanonym.jade b/views/module/comment/cdotanonym.jade index f1c6ac626..944b49845 100644 --- a/views/module/comment/cdotanonym.jade +++ b/views/module/comment/cdotanonym.jade @@ -1,25 +1,25 @@ .c(id="c{{=c.cid}}", class="l{{=c.level}}") - a.hrefava(href="{{='/u/'+c.user.login}}") - | {{?c.user.avatar === undefined}} - .overprint {{=c.user.disp[0]}} - | {{?}} - img.cava(src="{{=c.user.avatar || '/img/caps/avatarth.png'}}") - .cbody - .chead - a.author(class="{{?c.user.online}}online{{?}}", href="{{='/u/'+c.user.login}}") {{=c.user.disp}} - | {{?c.user.rnks}} - .ranks {{=c.user.rnks}} - | {{?}} - | {{?c.frag}} - .dotDelimeter · - a.frag(href="{{='?hl=frag-'+c.cid}}") - span.glyphicon.glyphicon-picture - | Commented fragment - | {{?}} - .dotDelimeter · - a.stamp(data-replace="true", href="{{='?hl=comment-'+c.cid}}") {{=it.fDate(new Date(c.stamp))}} - | {{?c.lastChanged}} - .dotDelimeter · - .changed(title="Show history of changes") {{='Изменен '+it.fDateIn(new Date(c.lastChanged))}} - | {{?}} - .ctext {{=c.txt}} \ No newline at end of file + a.hrefava(href="{{='/u/'+c.user.login}}") + | {{?c.user.avatar === undefined}} + .overprint {{=c.user.disp[0]}} + | {{?}} + img.cava(src="{{=c.user.avatar || '/img/caps/avatarth.png'}}") + .cbody + .chead + a.author(class="{{?c.user.online}}online{{?}}", href="{{='/u/'+c.user.login}}") {{=c.user.disp}} + | {{?c.user.rnks}} + .ranks {{=c.user.rnks}} + | {{?}} + | {{?c.frag}} + .dotDelimeter · + a.frag(href="{{='?hl=frag-'+c.cid}}") + span.glyphicon.glyphicon-picture + | Commented fragment + | {{?}} + .dotDelimeter · + a.stamp(data-replace="true", href="{{='?hl=comment-'+c.cid}}") {{=it.fDate(new Date(c.stamp))}} + | {{?c.lastChanged}} + .dotDelimeter · + .changed(title="Show history of changes") {{='Изменен '+it.fDateIn(new Date(c.lastChanged))}} + | {{?}} + .ctext {{=c.txt}} \ No newline at end of file diff --git a/views/module/comment/cdotauth.jade b/views/module/comment/cdotauth.jade index 117ec1e9f..4985b0177 100644 --- a/views/module/comment/cdotauth.jade +++ b/views/module/comment/cdotauth.jade @@ -2,40 +2,40 @@ | {{#def.del}} | {{??}} .c(id="c{{=c.cid}}", class="l{{=c.level}}{{?c.isnew}} isnew{{?}}") - a.hrefava(href="{{='/u/'+c.user.login}}", target="_blank") - | {{?c.user.avatar === undefined}} - .overprint {{=c.user.disp[0]}} - | {{?}} - img.cava(src="{{=c.user.avatar || '/img/caps/avatarth.png'}}") - .cbody - .chead - a(class="author{{?c.user.online}} online{{?}}", href="{{='/u/'+c.user.login}}") {{=c.user.disp}} - | {{?c.user.rnks}} - .ranks {{=c.user.rnks}} - | {{?}} - | {{?c.frag}} - .dotDelimeter · - a.frag(href="{{='?hl=frag-'+c.cid}}") - span.glyphicon.glyphicon-picture - | Commented fragment - | {{?}} - .dotDelimeter · - a.stamp(data-replace="true", href="?hl=comment-{{=c.cid}}") {{=it.fDate(new Date(c.stamp))}} - | {{?c.lastChanged}} - .dotDelimeter · - .changed(title="Show history of changes") {{='Изменен '+it.fDateIn(new Date(c.lastChanged))}} - | {{?}} - .ctext {{=c.txt}} - | {{?it.reply}} - .cacts - span.cact.reply Reply - | {{?it.mod || c.can.edit}} - .dotDelimeter · - span.cact.edit Edit - | {{?}} - | {{?it.mod || c.can.del}} - .dotDelimeter · - span.cact.remove Remove - | {{?}} - | {{?}} + a.hrefava(href="{{='/u/'+c.user.login}}", target="_blank") + | {{?c.user.avatar === undefined}} + .overprint {{=c.user.disp[0]}} + | {{?}} + img.cava(src="{{=c.user.avatar || '/img/caps/avatarth.png'}}") + .cbody + .chead + a(class="author{{?c.user.online}} online{{?}}", href="{{='/u/'+c.user.login}}") {{=c.user.disp}} + | {{?c.user.rnks}} + .ranks {{=c.user.rnks}} + | {{?}} + | {{?c.frag}} + .dotDelimeter · + a.frag(href="{{='?hl=frag-'+c.cid}}") + span.glyphicon.glyphicon-picture + | Commented fragment + | {{?}} + .dotDelimeter · + a.stamp(data-replace="true", href="?hl=comment-{{=c.cid}}") {{=it.fDate(new Date(c.stamp))}} + | {{?c.lastChanged}} + .dotDelimeter · + .changed(title="Show history of changes") {{='Изменен '+it.fDateIn(new Date(c.lastChanged))}} + | {{?}} + .ctext {{=c.txt}} + | {{?it.reply}} + .cacts + span.cact.reply Reply + | {{?it.mod || c.can.edit}} + .dotDelimeter · + span.cact.edit Edit + | {{?}} + | {{?it.mod || c.can.del}} + .dotDelimeter · + span.cact.remove Remove + | {{?}} + | {{?}} | {{?}} \ No newline at end of file diff --git a/views/module/comment/cdotdel.jade b/views/module/comment/cdotdel.jade index 2d1a23b76..b4efd1f9c 100644 --- a/views/module/comment/cdotdel.jade +++ b/views/module/comment/cdotdel.jade @@ -1,12 +1,12 @@ .c.cdel(id="c{{=c.cid}}", class="l{{=c.level}}") - .delico Show - .cbody - .chead - a(class="author", href="{{='/u/'+c.user.login}}") {{=c.user.disp}} - | {{?c.user.rnks}} - .ranks {{=c.user.rnks}} - | {{?}} - .dotDelimeter · - a.stamp(data-replace="true", href="{{='?hl=comment-'+c.cid}}") {{=it.fDate(new Date(c.stamp))}} - .dotDelimeter · - .changed(title="Show history of changes") {{='Comment was removed at '+it.fDateIn(new Date(c.lastChanged))}} \ No newline at end of file + .delico Show + .cbody + .chead + a(class="author", href="{{='/u/'+c.user.login}}") {{=c.user.disp}} + | {{?c.user.rnks}} + .ranks {{=c.user.rnks}} + | {{?}} + .dotDelimeter · + a.stamp(data-replace="true", href="{{='?hl=comment-'+c.cid}}") {{=it.fDate(new Date(c.stamp))}} + .dotDelimeter · + .changed(title="Show history of changes") {{='Comment was removed at '+it.fDateIn(new Date(c.lastChanged))}} \ No newline at end of file diff --git a/views/module/comment/cdotdelopen.jade b/views/module/comment/cdotdelopen.jade index b96886d0d..5d893a91c 100644 --- a/views/module/comment/cdotdelopen.jade +++ b/views/module/comment/cdotdelopen.jade @@ -1,25 +1,25 @@ .c.delopen(id="c{{=c.cid}}", class="l{{=c.level}}", data-origin="{{=c.del.origin || 0}}") - a.hrefava(href="{{='/u/'+c.user.login}}", target="_blank") - | {{?c.user.avatar === undefined}} - .overprint {{=c.user.disp[0]}} - | {{?}} - img.cava(src="{{=c.user.avatar || '/img/caps/avatarth.png'}}") - .cbody - .chead - a(class="author{{?c.user.online}} online{{?}}", href="{{='/u/'+c.user.login}}") {{=c.user.disp}} - | {{?c.user.rnks}} - .ranks {{=c.user.rnks}} - | {{?}} - .dotDelimeter · - a(class="stamp{{?c.delroot!==true}} dis{{?}}", data-replace="true", href="{{= c.delroot===true ? ('?hl=comment-'+c.cid) : 'javascript: void(0)'}}") {{=it.fDate(new Date(c.stamp))}} - .dotDelimeter · - .changed(title="Show history of changes") {{='Removed at '+it.fDateIn(new Date(c.lastChanged))}} - .ctext {{=c.txt}} - | {{?c.delroot===true}} - .cacts - span.cact.hidedel Roll up - | {{?it.mod}} - .dotDelimeter · - span.cact.restore Restore - | {{?}} - | {{?}} \ No newline at end of file + a.hrefava(href="{{='/u/'+c.user.login}}", target="_blank") + | {{?c.user.avatar === undefined}} + .overprint {{=c.user.disp[0]}} + | {{?}} + img.cava(src="{{=c.user.avatar || '/img/caps/avatarth.png'}}") + .cbody + .chead + a(class="author{{?c.user.online}} online{{?}}", href="{{='/u/'+c.user.login}}") {{=c.user.disp}} + | {{?c.user.rnks}} + .ranks {{=c.user.rnks}} + | {{?}} + .dotDelimeter · + a(class="stamp{{?c.delroot!==true}} dis{{?}}", data-replace="true", href="{{= c.delroot===true ? ('?hl=comment-'+c.cid) : 'javascript: void(0)'}}") {{=it.fDate(new Date(c.stamp))}} + .dotDelimeter · + .changed(title="Show history of changes") {{='Removed at '+it.fDateIn(new Date(c.lastChanged))}} + .ctext {{=c.txt}} + | {{?c.delroot===true}} + .cacts + span.cact.hidedel Roll up + | {{?it.mod}} + .dotDelimeter · + span.cact.restore Restore + | {{?}} + | {{?}} \ No newline at end of file diff --git a/views/module/comment/comments.jade b/views/module/comment/comments.jade index 8d9e8b606..a1b1c436c 100644 --- a/views/module/comment/comments.jade +++ b/views/module/comment/comments.jade @@ -1,42 +1,42 @@ .fullComments(data-bind="with: repository[M!M]") - .cmtsHead - a.count.headElem.interact(href="?hl=comments", data-replace="true", data-bind="html: count() + (countNew() ? ' +' + countNew() + '' : '')", title="Link to the comments area") - //ko if: canReply() - .addZero.headElem.interact.strokeBefore(data-bind="click: replyZero", title="Add first level comment") - span.glyphicon.glyphicon-edit - | Add - // /ko - //ko if: !auth.loggedIn() - .addZero.headElem.interact.strokeBefore(data-bind="click: function(data, evt){auth.show('login')}", title="Click to login or register") - span.glyphicon.glyphicon-log-in - | Log in to share your opinion - // /ko - //ko if: auth.loggedIn() - .commSubscr.headElem.interact.strokeBefore(data-bind="click: subscribe, css: {isSubscr: subscr()}, attr: {title: subscr() ? 'You are subscribed for new comments. Click to unsubscribe' : 'Subscribe to new comments'}") - span.glyphicon.glyphicon-envelope - span(data-bind="text: subscr() ? ' Subscribe' : ' Unsubscribe'") - // /ko - //ko if: canModerate() - .noComments.headElem.interact(data-bind="click: setNoComments, attr: {title: (nocomments() ? 'Allow' : 'Disallow')+' further commenting'}") - span.glyphicon(data-bind="css: nocomments() ? 'glyphicon-ok-sign' : 'glyphicon-minus-sign'") - span(data-bind="text: nocomments() ? ' Allow commenting' : ' Disallow commenting'") - // /ko - //ko if: auth.loggedIn() && nocomments() - span.cantComment Commenting is not allowed - // /ko - .commentsLoad(data-bind="style: {display: loading() ? '' : 'none'}")   + .cmtsHead + a.count.headElem.interact(href="?hl=comments", data-replace="true", data-bind="html: count() + (countNew() ? ' +' + countNew() + '' : '')", title="Link to the comments area") + //ko if: canReply() + .addZero.headElem.interact.strokeBefore(data-bind="click: replyZero", title="Add first level comment") + span.glyphicon.glyphicon-edit + | Add + // /ko + //ko if: !auth.loggedIn() + .addZero.headElem.interact.strokeBefore(data-bind="click: function(data, evt){auth.show('login')}", title="Click to login or register") + span.glyphicon.glyphicon-log-in + | Log in to share your opinion + // /ko + //ko if: auth.loggedIn() + .commSubscr.headElem.interact.strokeBefore(data-bind="click: subscribe, css: {isSubscr: subscr()}, attr: {title: subscr() ? 'You are subscribed for new comments. Click to unsubscribe' : 'Subscribe to new comments'}") + span.glyphicon.glyphicon-envelope + span(data-bind="text: subscr() ? ' Subscribe' : ' Unsubscribe'") + // /ko + //ko if: canModerate() + .noComments.headElem.interact(data-bind="click: setNoComments, attr: {title: (nocomments() ? 'Allow' : 'Disallow')+' further commenting'}") + span.glyphicon(data-bind="css: nocomments() ? 'glyphicon-ok-sign' : 'glyphicon-minus-sign'") + span(data-bind="text: nocomments() ? ' Allow commenting' : ' Disallow commenting'") + // /ko + //ko if: auth.loggedIn() && nocomments() + span.cantComment Commenting is not allowed + // /ko + .commentsLoad(data-bind="style: {display: loading() ? '' : 'none'}")   - .cmts + .cmts - //ko if: countNew() - .navigator(data-bind="css: {touch: touch}") - .arrow - .navigatorInn - .countAll(data-bind="text: '+' + countNew()") - .up(data-bind="click: navUp") - span.glyphicon.glyphicon-arrow-up - .navTxt - .down(data-bind="click: navDown") - .navTxt - span.glyphicon.glyphicon-arrow-down - // /ko \ No newline at end of file + //ko if: countNew() + .navigator(data-bind="css: {touch: touch}") + .arrow + .navigatorInn + .countAll(data-bind="text: '+' + countNew()") + .up(data-bind="click: navUp") + span.glyphicon.glyphicon-arrow-up + .navTxt + .down(data-bind="click: navDown") + .navTxt + span.glyphicon.glyphicon-arrow-down + // /ko \ No newline at end of file diff --git a/views/module/comment/hist.jade b/views/module/comment/hist.jade index 174403fa1..9e8fc67e2 100644 --- a/views/module/comment/hist.jade +++ b/views/module/comment/hist.jade @@ -1,69 +1,69 @@ .commentHist(data-bind="with: repository[M!M]") - | \ No newline at end of file + | {{~}} + | \ No newline at end of file diff --git a/views/module/common/auth.jade b/views/module/common/auth.jade index e698be321..748f8df22 100644 --- a/views/module/common/auth.jade +++ b/views/module/common/auth.jade @@ -1,225 +1,225 @@ #auth_curtain.centering_content(data-bind="with: repository[M!M]") - //ko if: mode() - form.fringe(action='', autocomplete="on", method='POST', data-bind="attr: {name: mode() + 'Form'}, css: {working: working(), finish: finish()}, event: {submit: submit}") - //ko template: {name: mode() + 'Tpl'} - // /ko - // /ko + //ko if: mode() + form.fringe(action='', autocomplete="on", method='POST', data-bind="attr: {name: mode() + 'Form'}, css: {working: working(), finish: finish()}, event: {submit: submit}") + //ko template: {name: mode() + 'Tpl'} + // /ko + // /ko - | + | - | + | - | + | - | + | - | + | - | + | - | \ No newline at end of file + | \ No newline at end of file diff --git a/views/module/common/foot.jade b/views/module/common/foot.jade index d28e99005..999aba978 100644 --- a/views/module/common/foot.jade +++ b/views/module/common/foot.jade @@ -1,9 +1,9 @@ .foot.fringe(data-bind="with: repository[M!M]") - .rightSide.hide-text - a.footElem.strokeAfter(href="mailto:support@pastvu.com", target="_blank", onclick="ga('send', 'event', 'support', 'click', 'support click common');") - | Support: support@pastvu.com - .footElem.strokeAfter(data-bind="click: showAbout") About - .footElem.copyright - | PastVu  - span.glyphicon.glyphicon-globe - | 2009 - 2015 + .rightSide.hide-text + a.footElem.strokeAfter(href="mailto:support@pastvu.com", target="_blank", onclick="ga('send', 'event', 'support', 'click', 'support click common');") + | Support: support@pastvu.com + .footElem.strokeAfter(data-bind="click: showAbout") About + .footElem.copyright + | PastVu  + span.glyphicon.glyphicon-globe + | 2009 - 2015 diff --git a/views/module/common/reason.jade b/views/module/common/reason.jade index 046d1d409..41a1fe6a6 100644 --- a/views/module/common/reason.jade +++ b/views/module/common/reason.jade @@ -1,19 +1,19 @@ .reason(data-bind="with: repository[M!M]") - //ko if: title() - h5(data-bind="html: title()") - // /ko - form - //ko if: selections().length > 1 - .form-group - select#presetoptions.form-control(size="1", data-bind="options: selections, optionsValue: 'cid', optionsText: 'title', value: selectedCid") - // /ko - .form-group - //- Выводим заголовок описания, если он есть или это не свободное описание и вариантов выбора несколько - //ko if: selected().desc.label || selections().length > 1 && Number(selected().cid) !== 0 - label.desclabel(for="desc", data-bind="html: selected().desc.label || ('Additional info' + (selected().desc.required ? '' : ' (optional)'))") - // /ko - textarea#desc.form-control(data-bind="value: desc, attr: {placeholder: selected().desc.placeholder || '', minLength: minLength(), maxlength: selected().desc.max || '1000'}", style="resize: vertical;") - .form-group - //ko if: errMsg() - .error(data-bind="html: errMsg()") - // /ko \ No newline at end of file + //ko if: title() + h5(data-bind="html: title()") + // /ko + form + //ko if: selections().length > 1 + .form-group + select#presetoptions.form-control(size="1", data-bind="options: selections, optionsValue: 'cid', optionsText: 'title', value: selectedCid") + // /ko + .form-group + //- Выводим заголовок описания, если он есть или это не свободное описание и вариантов выбора несколько + //ko if: selected().desc.label || selections().length > 1 && Number(selected().cid) !== 0 + label.desclabel(for="desc", data-bind="html: selected().desc.label || ('Additional info' + (selected().desc.required ? '' : ' (optional)'))") + // /ko + textarea#desc.form-control(data-bind="value: desc, attr: {placeholder: selected().desc.placeholder || '', minLength: minLength(), maxlength: selected().desc.max || '1000'}", style="resize: vertical;") + .form-group + //ko if: errMsg() + .error(data-bind="html: errMsg()") + // /ko \ No newline at end of file diff --git a/views/module/diff/about.jade b/views/module/diff/about.jade index dfdfb5bb2..b6a938249 100644 --- a/views/module/diff/about.jade +++ b/views/module/diff/about.jade @@ -1,61 +1,61 @@ .about(data-bind="with: repository[M!M]") - header.line - | PastVu - project to collect vintage photographs. A look at the history of humanity habitat. - .userrow - hr - .row.usercenter - .col-xs-6 - a.line.clearfix(target="_blank", href="/u/Ilya", ontouchstart="this.classList.toggle('hover');") - .flip-container - .flipper - div.front(style="background-image: url(/img/misc/Ilya.jpg)") - div.back(data-bind="style: {backgroundImage: 'url(/_a/d/' + avatars['Ilya'] + ')'}") - | Ilya - .lineBody - .humanName Ilya Varlamov - .humanAbout The author of the original idea - a.line.clearfix(target="_blank", href="/u/Duche", ontouchstart="this.classList.toggle('hover');") - .flip-container - .flipper - div.front(style="background-image: url(/img/misc/Duche.jpg)") - div.back(data-bind="style: {backgroundImage: 'url(/_a/d/' + avatars['Duche'] + ')'}") - | Duche - .lineBody - .humanName Alex Duk - .humanAbout Producer of the project - .col-xs-6 - a.line.clearfix(target="_blank", href="/u/klimashkin", ontouchstart="this.classList.toggle('hover');") - .flip-container - .flipper - div.front(style="background-image: url(/img/misc/klimashkin.jpg)") - div.back(data-bind="style: {backgroundImage: 'url(/_a/d/' + avatars['klimashkin'] + ')'}") - | klimashkin - .lineBody - .humanName Pavel Klimashkin - .humanAbout Project's architect, platform creator - a.line.clearfix(target="_blank", href="/u/dema501", ontouchstart="this.classList.toggle('hover');") - .flip-container - .flipper - div.front(style="background-image: url(/img/misc/dema501.png)") - div.back(data-bind="style: {backgroundImage: 'url(/_a/d/' + avatars['dema501'] + ')'}") - | dema501 - .lineBody - .humanName Dmitry Bashlov - .humanAbout System administration - a.line.clearfix(target="_blank", href="/u/abdulla_hasan", ontouchstart="this.classList.toggle('hover');") - .flip-container - .flipper - div.front(style="background-image: url(/img/misc/abdulla_hasan.png)") - div.back(data-bind="style: {backgroundImage: 'url(/_a/d/' + avatars['abdulla_hasan'] + ')'}") - | abdulla_hasan - .lineBody - .humanName Anvar Paganini - .humanAbout Infrastructure, Client relations - .postrow - div - | To support the development of the project, you can go  - a.donate(target="_blank", href="http://planeta.ru/139975") to our page at - |  Planeta.ru - .postrow - hr - img.poster(src="/img/loading/Loading1.jpg") + header.line + | PastVu - project to collect vintage photographs. A look at the history of humanity habitat. + .userrow + hr + .row.usercenter + .col-xs-6 + a.line.clearfix(target="_blank", href="/u/Ilya", ontouchstart="this.classList.toggle('hover');") + .flip-container + .flipper + div.front(style="background-image: url(/img/misc/Ilya.jpg)") + div.back(data-bind="style: {backgroundImage: 'url(/_a/d/' + avatars['Ilya'] + ')'}") + | Ilya + .lineBody + .humanName Ilya Varlamov + .humanAbout The author of the original idea + a.line.clearfix(target="_blank", href="/u/Duche", ontouchstart="this.classList.toggle('hover');") + .flip-container + .flipper + div.front(style="background-image: url(/img/misc/Duche.jpg)") + div.back(data-bind="style: {backgroundImage: 'url(/_a/d/' + avatars['Duche'] + ')'}") + | Duche + .lineBody + .humanName Alex Duk + .humanAbout Producer of the project + .col-xs-6 + a.line.clearfix(target="_blank", href="/u/klimashkin", ontouchstart="this.classList.toggle('hover');") + .flip-container + .flipper + div.front(style="background-image: url(/img/misc/klimashkin.jpg)") + div.back(data-bind="style: {backgroundImage: 'url(/_a/d/' + avatars['klimashkin'] + ')'}") + | klimashkin + .lineBody + .humanName Pavel Klimashkin + .humanAbout Project's architect, platform creator + a.line.clearfix(target="_blank", href="/u/dema501", ontouchstart="this.classList.toggle('hover');") + .flip-container + .flipper + div.front(style="background-image: url(/img/misc/dema501.png)") + div.back(data-bind="style: {backgroundImage: 'url(/_a/d/' + avatars['dema501'] + ')'}") + | dema501 + .lineBody + .humanName Dmitry Bashlov + .humanAbout System administration + a.line.clearfix(target="_blank", href="/u/abdulla_hasan", ontouchstart="this.classList.toggle('hover');") + .flip-container + .flipper + div.front(style="background-image: url(/img/misc/abdulla_hasan.png)") + div.back(data-bind="style: {backgroundImage: 'url(/_a/d/' + avatars['abdulla_hasan'] + ')'}") + | abdulla_hasan + .lineBody + .humanName Anvar Paganini + .humanAbout Infrastructure, Client relations + .postrow + div + | To support the development of the project, you can go  + a.donate(target="_blank", href="http://planeta.ru/139975") to our page at + |  Planeta.ru + .postrow + hr + img.poster(src="/img/loading/Loading1.jpg") diff --git a/views/module/diff/news.jade b/views/module/diff/news.jade index fcd498b23..d8ed021a1 100644 --- a/views/module/diff/news.jade +++ b/views/module/diff/news.jade @@ -1,24 +1,24 @@ .newsApart(data-bind="with: repository[M!M]") - .newsHeader Project news + .newsHeader Project news - .news - .novelAuthor - a.avatar.pull-left.fringe(data-bind="attr: {href: '/u/' + news.user.login()}") - img(data-bind="attr: {src: news.user.avatar()}, event: {load: onImgLoad}") - .authorInfo - a.authorName(data-bind="text: news.user.disp(), attr: {href: '/u/' + news.user.login()}") - .newsDate(data-bind="text: moment(news.pdate()).format('D MMMM YYYY, HH:mm')") - .novel - //-.newsDate(data-bind="text: moment(news.pdate()).format('D MMM YYYY')") - .newsBody - .newsHead - .newsTitle(data-bind="text: news.title()") - //ko if: canEdit() - .dotDelimeter · - a.newsEdit(data-bind="attr: {href: '/admin/news/edit/' + news.cid()}") - span.glyphicon.glyphicon-pencil - | Edit - // /ko - .newsTxt(data-bind="html: news.txt()") - hr - .commentsContainer.clearfix.mContainer.mHidden(data-bind="allowBindings: false") + .news + .novelAuthor + a.avatar.pull-left.fringe(data-bind="attr: {href: '/u/' + news.user.login()}") + img(data-bind="attr: {src: news.user.avatar()}, event: {load: onImgLoad}") + .authorInfo + a.authorName(data-bind="text: news.user.disp(), attr: {href: '/u/' + news.user.login()}") + .newsDate(data-bind="text: moment(news.pdate()).format('D MMMM YYYY, HH:mm')") + .novel + //-.newsDate(data-bind="text: moment(news.pdate()).format('D MMM YYYY')") + .newsBody + .newsHead + .newsTitle(data-bind="text: news.title()") + //ko if: canEdit() + .dotDelimeter · + a.newsEdit(data-bind="attr: {href: '/admin/news/edit/' + news.cid()}") + span.glyphicon.glyphicon-pencil + | Edit + // /ko + .newsTxt(data-bind="html: news.txt()") + hr + .commentsContainer.clearfix.mContainer.mHidden(data-bind="allowBindings: false") diff --git a/views/module/diff/newsList.jade b/views/module/diff/newsList.jade index 984b92219..9ca6b1bf0 100644 --- a/views/module/diff/newsList.jade +++ b/views/module/diff/newsList.jade @@ -1,35 +1,35 @@ .newsWrapper(data-bind="with: repository[M!M]") - .newsHeader Project news - //ko if: canEdit() - .row - a.addNews(href="/admin/news/create") - span.glyphicon.glyphicon-plus - | Add news - // /ko - .news - //ko foreach: news - hr - .novel.clearfix - .newsLeft - .newsAvatar.fringe(data-bind="attr: {href: '/u/' + $data.user.login}") - img(data-bind="attr: {src: $data.user.avatar}") - .newsDate(data-bind="text: moment($data.pdate).format('D MMM YYYY')") - //ko if: $data.ccount - a.comm(data-bind="html: $data.ccount + ($data.ccount_new ? ' +' + $data.ccount_new + '' : ''), attr: {href: '/news/' + $data.cid + '?hl=comments'}", title="Jump to news comments") - // /ko - .newsBody - .newsHead - a.newsTitle(data-bind="text: $data.title, attr: {href: '/news/' + $data.cid}") - .dotDelimeter · - a.authorName(data-bind="text: $data.user.disp, attr: {href: '/u/' + $data.user.login}") - //ko if: $parent.canEdit() - .dotDelimeter · - a.newsEdit(data-bind="attr: {href: '/admin/news/edit/' + $data.cid}") - span.glyphicon.glyphicon-pencil - | Edit - // /ko - .newsNotice(data-bind="html: $data.notice, css: {expandable: $data.expand}") - //ko if: $data.expand - a.newsExpand(data-bind="attr: {href: '/news/' + $data.cid}") [Read more..] - // /ko - // /ko \ No newline at end of file + .newsHeader Project news + //ko if: canEdit() + .row + a.addNews(href="/admin/news/create") + span.glyphicon.glyphicon-plus + | Add news + // /ko + .news + //ko foreach: news + hr + .novel.clearfix + .newsLeft + .newsAvatar.fringe(data-bind="attr: {href: '/u/' + $data.user.login}") + img(data-bind="attr: {src: $data.user.avatar}") + .newsDate(data-bind="text: moment($data.pdate).format('D MMM YYYY')") + //ko if: $data.ccount + a.comm(data-bind="html: $data.ccount + ($data.ccount_new ? ' +' + $data.ccount_new + '' : ''), attr: {href: '/news/' + $data.cid + '?hl=comments'}", title="Jump to news comments") + // /ko + .newsBody + .newsHead + a.newsTitle(data-bind="text: $data.title, attr: {href: '/news/' + $data.cid}") + .dotDelimeter · + a.authorName(data-bind="text: $data.user.disp, attr: {href: '/u/' + $data.user.login}") + //ko if: $parent.canEdit() + .dotDelimeter · + a.newsEdit(data-bind="attr: {href: '/admin/news/edit/' + $data.cid}") + span.glyphicon.glyphicon-pencil + | Edit + // /ko + .newsNotice(data-bind="html: $data.notice, css: {expandable: $data.expand}") + //ko if: $data.expand + a.newsExpand(data-bind="attr: {href: '/news/' + $data.cid}") [Read more..] + // /ko + // /ko \ No newline at end of file diff --git a/views/module/main/bottomPanel.jade b/views/module/main/bottomPanel.jade index 634a697ab..e26a86f32 100644 --- a/views/module/main/bottomPanel.jade +++ b/views/module/main/bottomPanel.jade @@ -1,135 +1,135 @@ .bottomPanel(data-bind="with: repository[M!M]") - //ko if: news().length > 0 - .news - .newsHeader Project news - //ko foreach: news - //ko if: $index() - hr - // /ko - .novel.clearfix - .newsLeft - .newsDate(data-bind="text: moment($data.pdate).format('D MMM')") - //ko if: $data.ccount - a.newsComms(data-bind="html: $data.ccount + ($data.ccount_new ? '
+' + $data.ccount_new + '
' : ''), attr: {href: '/news/' + $data.cid + '?hl=comments'}", title="Jump to news comments") - // /ko - .newsBody - a.newsTitle(data-bind="text: $data.title, attr: {href: '/news/' + $data.cid}") - .newsNotice(data-bind="html: $data.notice") - //ko if: $data.expand - a.newsExpand(data-bind="attr: {href: '/news/' + $data.cid}") [Read more..] - // /ko - // /ko - // /ko - nav.navbar.navbar-pastvu.catMenu - ul.nav.navbar-nav - //ko foreach: cats - li(data-bind="css: {loading: $data === $parent.catLoading(), active: $data === $parent.catActive()}, click: $parent.catClickBind") - a(data-bind="text: $parent.catsObj[$data].name") - // /ko - li - a(target="_blank", href="/news") - | News archive - span.glyphicon.glyphicon-share - //ko if: catActive() - .catContent(data-bind="template: catsObj[catActive()].tpl") - // /ko + //ko if: news().length > 0 + .news + .newsHeader Project news + //ko foreach: news + //ko if: $index() + hr + // /ko + .novel.clearfix + .newsLeft + .newsDate(data-bind="text: moment($data.pdate).format('D MMM')") + //ko if: $data.ccount + a.newsComms(data-bind="html: $data.ccount + ($data.ccount_new ? '
+' + $data.ccount_new + '
' : ''), attr: {href: '/news/' + $data.cid + '?hl=comments'}", title="Jump to news comments") + // /ko + .newsBody + a.newsTitle(data-bind="text: $data.title, attr: {href: '/news/' + $data.cid}") + .newsNotice(data-bind="html: $data.notice") + //ko if: $data.expand + a.newsExpand(data-bind="attr: {href: '/news/' + $data.cid}") [Read more..] + // /ko + // /ko + // /ko + nav.navbar.navbar-pastvu.catMenu + ul.nav.navbar-nav + //ko foreach: cats + li(data-bind="css: {loading: $data === $parent.catLoading(), active: $data === $parent.catActive()}, click: $parent.catClickBind") + a(data-bind="text: $parent.catsObj[$data].name") + // /ko + li + a(target="_blank", href="/news") + | News archive + span.glyphicon.glyphicon-share + //ko if: catActive() + .catContent(data-bind="template: catsObj[catActive()].tpl") + // /ko - | + | - | + | - | + | - | \ No newline at end of file + | \ No newline at end of file diff --git a/views/module/main/commentsFeed.jade b/views/module/main/commentsFeed.jade index 7083697d4..b82d4a0b5 100644 --- a/views/module/main/commentsFeed.jade +++ b/views/module/main/commentsFeed.jade @@ -1,23 +1,23 @@ .commentsFeed(data-bind="with: repository[M!M]") - //-a.help(href="http://start.planeta.ru/campaigns/1694", target="_blank", title="Узнайте как помочь проекту") - img.img-responsive.helpimg(data-bind="attr: {src: '/img/misc/fund2/bn_right_' + _.random(1,4) + '.jpg'}", alt="Помогите PastVu") - .ribbonHead.lineBehind: span New comments - .commentsBody + //-a.help(href="http://start.planeta.ru/campaigns/1694", target="_blank", title="Узнайте как помочь проекту") + img.img-responsive.helpimg(data-bind="attr: {src: '/img/misc/fund2/bn_right_' + _.random(1,4) + '.jpg'}", alt="Помогите PastVu") + .ribbonHead.lineBehind: span New comments + .commentsBody - | \ No newline at end of file + | \ No newline at end of file diff --git a/views/module/main/mainPage.jade b/views/module/main/mainPage.jade index fac793901..43703a081 100644 --- a/views/module/main/mainPage.jade +++ b/views/module/main/mainPage.jade @@ -1,5 +1,5 @@ .mainPage(data-bind="with: repository[M!M]") - .mainL - .mContainer.mHidden#mapContainer - .mContainer.mHidden#bottomPanel - .mainR.mContainer.mHidden.mFadeIn#commentsFeed + .mainL + .mContainer.mHidden#mapContainer + .mContainer.mHidden#bottomPanel + .mainR.mContainer.mHidden.mFadeIn#commentsFeed diff --git a/views/module/map/map.jade b/views/module/map/map.jade index d3cba6eb7..9716f76f8 100644 --- a/views/module/map/map.jade +++ b/views/module/map/map.jade @@ -1,58 +1,58 @@ .mapModuleWrapper(data-bind="with: repository[M!M]") - .mapContainer(data-bind="css: {embedded: embedded}") - .map + .mapContainer(data-bind="css: {embedded: embedded}") + .map - //ko if: embedded - .mapInfos - //ko if: editing() - .mapInfo.geoInput - input(type="text", data-bind="value: geoInputComputed, valueUpdate: 'keyup', event: {focusout: geoInputBlur}", placeholder="Широта, долгота") - .mapInfo.info.geoInfo - //ko if: point.geo() - button.btn.btn-sm.btn-warning(type="button", data-bind="click: delPointGeo") - span.glyphicon.glyphicon-remove-circle - | Reset the coordinates - // /ko - //ko ifnot: point.geo() - span.glyphicon.glyphicon-map-marker - | To set the coordinates, click on the map - // /ko - // /ko + //ko if: embedded + .mapInfos + //ko if: editing() + .mapInfo.geoInput + input(type="text", data-bind="value: geoInputComputed, valueUpdate: 'keyup', event: {focusout: geoInputBlur}", placeholder="Широта, долгота") + .mapInfo.info.geoInfo + //ko if: point.geo() + button.btn.btn-sm.btn-warning(type="button", data-bind="click: delPointGeo") + span.glyphicon.glyphicon-remove-circle + | Reset the coordinates + // /ko + //ko ifnot: point.geo() + span.glyphicon.glyphicon-map-marker + | To set the coordinates, click on the map + // /ko + // /ko - //ko if: !editing() && !point.geo() - .mapInfo.warn - span.glyphicon.glyphicon-warning-sign - | Coordinates of photo are not specified - // /ko - // /ko + //ko if: !editing() && !point.geo() + .mapInfo.warn + span.glyphicon.glyphicon-warning-sign + | Coordinates of photo are not specified + // /ko + // /ko - .mapYearSelector - .yearSlider - .ui-slider-handle.L - .ui-slider-handle.R - .yearOuter.L - .yearOuter.R - .mapNavigation.mContainer.mHidden - .trtools - .trtool.trtoolbutt.openModePanel.fringe(data-bind="css: {no: !openNewTab()}, click: function () {openNewTab(!openNewTab())}, attr: {title: (openNewTab() ? 'Enable' : 'Disable') + ' opening of a photo in a new window'}") - span.glyphicon.glyphicon-share - //ko if: !embedded - .trtool.trtoolbutt.link.fringe(data-bind="click: showLink", title="Link to current map position") - span.glyphicon.glyphicon-link - //ko if: linkShow() - input.inputLink(type="url", readonly, data-bind="click: linkClick, value: location.host + location.pathname + link()", autocorrect="off", autocapitalize="off") - // /ko - // /ko - .trtool.layersPanel.fringe(data-bind="css: {open: layersOpen()}") - .currentLayer(data-bind="click: toggleLayers, attr: {title: layersOpen() ? 'Click to hide layer vaiarnts' : 'Click to show available map layers'}") - .currentLayerTxt(data-bind="text: layerActiveDesc()") - img.layerImg(src='/img/map/layers.png') - .layerSystems(data-bind="style: {width: (layersOpen() ? 104 * layers().length : 64) + 'px'}") - .h_separator - //ko foreach: {data: $data.layers, as: 'system'} - .layerSystem(data-bind="css: {selected: system.selected()}") - .layerHead(data-bind="text: system.desc") - //ko foreach: {data:system.types, as: 'type'} - .layerType(data-bind="css: {selected: type.selected()}, text: type.desc, click: function () {$parents[1].selectLayer(system.id, type.id)}") - // /ko - // /ko + .mapYearSelector + .yearSlider + .ui-slider-handle.L + .ui-slider-handle.R + .yearOuter.L + .yearOuter.R + .mapNavigation.mContainer.mHidden + .trtools + .trtool.trtoolbutt.openModePanel.fringe(data-bind="css: {no: !openNewTab()}, click: function () {openNewTab(!openNewTab())}, attr: {title: (openNewTab() ? 'Enable' : 'Disable') + ' opening of a photo in a new window'}") + span.glyphicon.glyphicon-share + //ko if: !embedded + .trtool.trtoolbutt.link.fringe(data-bind="click: showLink", title="Link to current map position") + span.glyphicon.glyphicon-link + //ko if: linkShow() + input.inputLink(type="url", readonly, data-bind="click: linkClick, value: location.host + location.pathname + link()", autocorrect="off", autocapitalize="off") + // /ko + // /ko + .trtool.layersPanel.fringe(data-bind="css: {open: layersOpen()}") + .currentLayer(data-bind="click: toggleLayers, attr: {title: layersOpen() ? 'Click to hide layer vaiarnts' : 'Click to show available map layers'}") + .currentLayerTxt(data-bind="text: layerActiveDesc()") + img.layerImg(src='/img/map/layers.png') + .layerSystems(data-bind="style: {width: (layersOpen() ? 104 * layers().length : 64) + 'px'}") + .h_separator + //ko foreach: {data: $data.layers, as: 'system'} + .layerSystem(data-bind="css: {selected: system.selected()}") + .layerHead(data-bind="text: system.desc") + //ko foreach: {data:system.types, as: 'type'} + .layerType(data-bind="css: {selected: type.selected()}, text: type.desc, click: function () {$parents[1].selectLayer(system.id, type.id)}") + // /ko + // /ko diff --git a/views/module/map/mapClusterCalc.jade b/views/module/map/mapClusterCalc.jade index 917db6839..26ac625e5 100644 --- a/views/module/map/mapClusterCalc.jade +++ b/views/module/map/mapClusterCalc.jade @@ -1,34 +1,34 @@ .mapModuleWrapper(data-bind="with: repository[M!M]") - h4 Cluster size parameters - p To set a new cluster size, grab a transparent rectangle on the map and move it or its borders to the extent necessary. To apply your changes, click Save. - .mapContainer(data-bind="css: {}") - .map - .clusterContainer - .clusterRect(data-bind="style: {borderColor: changed() ? '#FF0808' : '#2daf2e', borderStyle: changed() ? 'dashed' : 'solid'}") - .layersPanel.fringe(data-bind="css: {open: layersOpen()}") - .currentLayer(data-bind="text: layerActiveDesc(), click: toggleLayers") - .layerSystems(data-bind="style: {width: (104 * (layersOpen() ? layers().length : 1)) + 'px'}") - .h_separator - //ko foreach: {data: $data.layers, as: 'system'} - .layerSystem(data-bind="css: {selected: system.selected()}") - .layerHead(data-bind="text: system.desc") - //ko foreach: {data:system.types, as: 'type'} - .layerType(data-bind="css: {selected: type.selected()}, text: type.desc, click: function () {$parents[1].selectLayer(system.id, type.id)}") - // /ko - // /ko - dl.dl-horizontal - dt(data-bind="text: 'Current sizes:'") - dd(data-bind="text: '' + wCurr() + ' x ' + hCurr() + ''") - dl.dl-horizontal(data-bind="style: {display: changed() ? '' : 'none'}") - dt(data-bind="text: 'New sizes:'") - dd(data-bind="text: '' + wNew() + ' x ' + hNew() + ''") - .clusterButt(data-bind="style: {display: changed() ? '' : 'none'}") - button.btn.btn-primary.btnSave(type="button", data-bind="css: {disabled: exe()}, click: save, attr: {disabled: exe()}") - span.glyphicon.glyphicon-ok - | Save and start conversion - button.btn.btn-warning.btnSave(type="button", data-bind="click: cancel") - span.glyphicon.glyphicon-exclamation-sign - | Cancel - p(style="margin-top: 6px; margin-bottom: 0;", data-bind="style: {display: exe() && changed() ? '' : 'none'}") The process of calculating the new parameters at different levels of zoom: - .progress.progress-striped.active(data-bind="style: {display: exe() && changed() ? '' : 'none'}") - .progress-bar.progress-bar-success(data-bind="style: {width: exePercent() + '%'}") \ No newline at end of file + h4 Cluster size parameters + p To set a new cluster size, grab a transparent rectangle on the map and move it or its borders to the extent necessary. To apply your changes, click Save. + .mapContainer(data-bind="css: {}") + .map + .clusterContainer + .clusterRect(data-bind="style: {borderColor: changed() ? '#FF0808' : '#2daf2e', borderStyle: changed() ? 'dashed' : 'solid'}") + .layersPanel.fringe(data-bind="css: {open: layersOpen()}") + .currentLayer(data-bind="text: layerActiveDesc(), click: toggleLayers") + .layerSystems(data-bind="style: {width: (104 * (layersOpen() ? layers().length : 1)) + 'px'}") + .h_separator + //ko foreach: {data: $data.layers, as: 'system'} + .layerSystem(data-bind="css: {selected: system.selected()}") + .layerHead(data-bind="text: system.desc") + //ko foreach: {data:system.types, as: 'type'} + .layerType(data-bind="css: {selected: type.selected()}, text: type.desc, click: function () {$parents[1].selectLayer(system.id, type.id)}") + // /ko + // /ko + dl.dl-horizontal + dt(data-bind="text: 'Current sizes:'") + dd(data-bind="text: '' + wCurr() + ' x ' + hCurr() + ''") + dl.dl-horizontal(data-bind="style: {display: changed() ? '' : 'none'}") + dt(data-bind="text: 'New sizes:'") + dd(data-bind="text: '' + wNew() + ' x ' + hNew() + ''") + .clusterButt(data-bind="style: {display: changed() ? '' : 'none'}") + button.btn.btn-primary.btnSave(type="button", data-bind="css: {disabled: exe()}, click: save, attr: {disabled: exe()}") + span.glyphicon.glyphicon-ok + | Save and start conversion + button.btn.btn-warning.btnSave(type="button", data-bind="click: cancel") + span.glyphicon.glyphicon-exclamation-sign + | Cancel + p(style="margin-top: 6px; margin-bottom: 0;", data-bind="style: {display: exe() && changed() ? '' : 'none'}") The process of calculating the new parameters at different levels of zoom: + .progress.progress-striped.active(data-bind="style: {display: exe() && changed() ? '' : 'none'}") + .progress-bar.progress-bar-success(data-bind="style: {width: exePercent() + '%'}") \ No newline at end of file diff --git a/views/module/map/navSlider.jade b/views/module/map/navSlider.jade index e85df2300..30bfa1d92 100644 --- a/views/module/map/navSlider.jade +++ b/views/module/map/navSlider.jade @@ -1,25 +1,25 @@ .mapNavigator(data-bind="with: repository[M!M]") - .stateWrap(data-bind="css: {pinned: pinned(), hover: hover(), canOpen: canOpen()}") - .navpanel(data-bind="style: {height: panelH() + 'px'}") - .mup.fringe.butt(data-bind="event: {'click': function () { pan('up') }}") - span.glyphicon.glyphicon-arrow-up - .mright.fringe.butt(data-bind="event: {'click': function () { pan('right') }}") - span.glyphicon.glyphicon-arrow-right - .mdown.fringe.butt(data-bind="event: {'click': function () { pan('down') }}") - span.glyphicon.glyphicon-arrow-down - .mleft.fringe.butt(data-bind="event: {'click': function () { pan('left') }}") - span.glyphicon.glyphicon-arrow-left - .mhome.fringe.butt(data-bind="click: toHome, attr: {title: 'Set map to home region ' + (auth.loggedIn() ? auth.iAm.regionHome.title_local() : 'Moscow')}") - span.glyphicon.glyphicon-home - .zoomin.fringe.butt.inout(data-bind="event: {'click': function () { changeZoom(1) }}") - span.glyphicon.glyphicon-plus - .zoomout.fringe.butt.inout(data-bind="event: {'click': function () { changeZoom(-1) }}") - span.glyphicon.glyphicon-minus - .stick.fringe - .sliderArea(data-bind="css: {sliding: sliding()}") - //ko foreach: dashes - .dash(data-bind="style: {height: $parent.step() + 'px'}, attr: {'data-zoom': $data}") - // /ko - .slider.fringe(data-bind="text: sliderOnZoom(), style: {bottom: (step() * (sliderOnZoom() - minZoom())) + 'px'}") - .pinArea - .pin.fringe(data-bind="click: togglePin") + .stateWrap(data-bind="css: {pinned: pinned(), hover: hover(), canOpen: canOpen()}") + .navpanel(data-bind="style: {height: panelH() + 'px'}") + .mup.fringe.butt(data-bind="event: {'click': function () { pan('up') }}") + span.glyphicon.glyphicon-arrow-up + .mright.fringe.butt(data-bind="event: {'click': function () { pan('right') }}") + span.glyphicon.glyphicon-arrow-right + .mdown.fringe.butt(data-bind="event: {'click': function () { pan('down') }}") + span.glyphicon.glyphicon-arrow-down + .mleft.fringe.butt(data-bind="event: {'click': function () { pan('left') }}") + span.glyphicon.glyphicon-arrow-left + .mhome.fringe.butt(data-bind="click: toHome, attr: {title: 'Set map to home region ' + (auth.loggedIn() ? auth.iAm.regionHome.title_local() : 'Moscow')}") + span.glyphicon.glyphicon-home + .zoomin.fringe.butt.inout(data-bind="event: {'click': function () { changeZoom(1) }}") + span.glyphicon.glyphicon-plus + .zoomout.fringe.butt.inout(data-bind="event: {'click': function () { changeZoom(-1) }}") + span.glyphicon.glyphicon-minus + .stick.fringe + .sliderArea(data-bind="css: {sliding: sliding()}") + //ko foreach: dashes + .dash(data-bind="style: {height: $parent.step() + 'px'}, attr: {'data-zoom': $data}") + // /ko + .slider.fringe(data-bind="text: sliderOnZoom(), style: {bottom: (step() * (sliderOnZoom() - minZoom())) + 'px'}") + .pinArea + .pin.fringe(data-bind="click: togglePin") diff --git a/views/module/modal.jade b/views/module/modal.jade index 5f5e4d3f2..327824622 100644 --- a/views/module/modal.jade +++ b/views/module/modal.jade @@ -1,23 +1,23 @@ .neoModalCurtain(class="{{?it.animateScale}}animateScale{{?}}") - .neoModal.fringe(style="width:{{=it.initWidth || 'auto'}};", data-bind="style: {maxWidth: (P.window.w() * {{=it.maxWidthRatio || 0.8}} >> 0) + 'px'}") - .neoModalTools.fringe - span.modalCaption {{=it.topic || ''}} - | {{?it.offIcon}} - .off(title="{{=it.offIcon.text}}") - span.glyphicon.glyphicon-off - | {{?}} - .neoModalContainer.mContainer.mHidden(class="{{?it.withScroll}}scroll{{?}}", data-bind="style: {maxHeight: P.window.h() - 120 + 'px'{{?it.fullHeight}}, minHeight: P.window.h() - 120 + 'px'{{?}}}") + .neoModal.fringe(style="width:{{=it.initWidth || 'auto'}};", data-bind="style: {maxWidth: (P.window.w() * {{=it.maxWidthRatio || 0.8}} >> 0) + 'px'}") + .neoModalTools.fringe + span.modalCaption {{=it.topic || ''}} + | {{?it.offIcon}} + .off(title="{{=it.offIcon.text}}") + span.glyphicon.glyphicon-off + | {{?}} + .neoModalContainer.mContainer.mHidden(class="{{?it.withScroll}}scroll{{?}}", data-bind="style: {maxHeight: P.window.h() - 120 + 'px'{{?it.fullHeight}}, minHeight: P.window.h() - 120 + 'px'{{?}}}") - //-Подложка под верхнюю тень тулбара модального окна - .tsb + //-Подложка под верхнюю тень тулбара модального окна + .tsb - | {{?it.btns && it.btns.length}} - .neoModalFoot - | {{~it.btns :b:index}} - button.btn.btn-xs(class="{{=b.css}}") - | {{?b.glyphicon}} - span.glyphicon(class="{{=b.glyphicon}}") - | {{?}} - | {{=b.text}} - | {{~}} - | {{?}} \ No newline at end of file + | {{?it.btns && it.btns.length}} + .neoModalFoot + | {{~it.btns :b:index}} + button.btn.btn-xs(class="{{=b.css}}") + | {{?b.glyphicon}} + span.glyphicon(class="{{=b.glyphicon}}") + | {{?}} + | {{=b.text}} + | {{~}} + | {{?}} \ No newline at end of file diff --git a/views/module/photo/gallery.jade b/views/module/photo/gallery.jade index fa1bf6a8b..ae43aba3b 100644 --- a/views/module/photo/gallery.jade +++ b/views/module/photo/gallery.jade @@ -1,118 +1,118 @@ .gallery(data-bind="with: repository[M!M]") - .thumbs(data-bind="style: {width: panelW()}") - //ko if: topTitle() - .row.rowoffset: .col-xs-12.topcol: .pageHeader(data-bind="text: topTitle()") - // /ko + .thumbs(data-bind="style: {width: panelW()}") + //ko if: topTitle() + .row.rowoffset: .col-xs-12.topcol: .pageHeader(data-bind="text: topTitle()") + // /ko - .row.rowoffset - .col-xs-12.col-sm-7.col-lg-4.topcol(data-bind="css: {invisible: !loadedFirst()}") - .filter(data-bind="css: {opened: filter.open(), inactive: !filter.active()}") - .ftitle(data-bind="attr: {title: 'Фильтр. ' + (filter.active() ? 'Switch off' : 'Switch on')}, click: function () {filter.active(!filter.active())}") - span.glyphicon.glyphicon-filter - .fopen(data-bind="attr: {title: filter.open() ? 'Collapse' : 'Expand'}, click: function () {filter.open(!filter.open())}") - span.glyphicon.glyphicon-list-alt - .fvals - .regions - .filterName Regions: - .filterVars - //ko if: !filter.disp.r().length - span.region - span.glyphicon.glyphicon-globe - | Whole world - // /ko - //ko foreach: filter.disp.r - span.region.candis(data-bind="css: {dis: $parent._.contains($parent.filter.disp.rdis(), $data.cid)}") - span(data-bind="text: $data.title_en") - .rtgl.only(title="Leave active only this region", data-bind="click: function() {$parent.fronly($data.cid);}") - span.glyphicon.glyphicon-ok - .rtgl.dis(title="Toggle activity of this region", data-bind="click: function() {$parent.frdis($data.cid);}") - span.glyphicon.glyphicon-off - // /ko - span.regionEdit(data-bind="click: regionSelect") - span.glyphicon.glyphicon-pencil - | Change - .row.others - //ko if: filter.can.s() - .row.svars - .filterName Status: - .filterVars(data-bind="foreach: filter.available.s") - label.checkbox-inline.s - input(type="checkbox", data-bind="attr: {value: s}, checked: $parent.filter.disp.s") - span(data-bind="text: title") - // /ko - .row.geovars - .filterName Coordinates: - .filterVars - label.checkbox-inline - input(type="checkbox", value="1", data-bind="checked: filter.disp.geo, click: fgeoclk") - span Setted - label.checkbox-inline - input(type="checkbox", value="0", data-bind="checked: filter.disp.geo, click: fgeoclk") - span Not setted (Where is it?) - .col-xs-12.col-sm-5.col-lg-4.col-lg-push-4.topcol.switch(data-bind="css: {invisible: !loadedFirst()}") - span.brief(data-bind="text: briefText") - //ko if: photos().length - .btn-group - button.btn.btn-primary(title="Page by page", data-bind="click: function () {feedSelect(false)}, css: {active: !feed()}") - span.glyphicon.glyphicon-book - button.btn.btn-primary(title="Feed", data-bind="click: function () {feedSelect(true)}, css: {active: feed()}") - span.glyphicon.glyphicon-th-list - // /ko - .clearfix.hidden-lg - .col-xs-12.col-lg-4.col-lg-pull-4.pag(data-bind="css: {loading: !feed() && loading(), hasPag: paginationShow()}") - //ko if: paginationShow() - //ko template: {name: 'photoPagerTpl'} - // /ko - // /ko + .row.rowoffset + .col-xs-12.col-sm-7.col-lg-4.topcol(data-bind="css: {invisible: !loadedFirst()}") + .filter(data-bind="css: {opened: filter.open(), inactive: !filter.active()}") + .ftitle(data-bind="attr: {title: 'Фильтр. ' + (filter.active() ? 'Switch off' : 'Switch on')}, click: function () {filter.active(!filter.active())}") + span.glyphicon.glyphicon-filter + .fopen(data-bind="attr: {title: filter.open() ? 'Collapse' : 'Expand'}, click: function () {filter.open(!filter.open())}") + span.glyphicon.glyphicon-list-alt + .fvals + .regions + .filterName Regions: + .filterVars + //ko if: !filter.disp.r().length + span.region + span.glyphicon.glyphicon-globe + | Whole world + // /ko + //ko foreach: filter.disp.r + span.region.candis(data-bind="css: {dis: $parent._.contains($parent.filter.disp.rdis(), $data.cid)}") + span(data-bind="text: $data.title_en") + .rtgl.only(title="Leave active only this region", data-bind="click: function() {$parent.fronly($data.cid);}") + span.glyphicon.glyphicon-ok + .rtgl.dis(title="Toggle activity of this region", data-bind="click: function() {$parent.frdis($data.cid);}") + span.glyphicon.glyphicon-off + // /ko + span.regionEdit(data-bind="click: regionSelect") + span.glyphicon.glyphicon-pencil + | Change + .row.others + //ko if: filter.can.s() + .row.svars + .filterName Status: + .filterVars(data-bind="foreach: filter.available.s") + label.checkbox-inline.s + input(type="checkbox", data-bind="attr: {value: s}, checked: $parent.filter.disp.s") + span(data-bind="text: title") + // /ko + .row.geovars + .filterName Coordinates: + .filterVars + label.checkbox-inline + input(type="checkbox", value="1", data-bind="checked: filter.disp.geo, click: fgeoclk") + span Setted + label.checkbox-inline + input(type="checkbox", value="0", data-bind="checked: filter.disp.geo, click: fgeoclk") + span Not setted (Where is it?) + .col-xs-12.col-sm-5.col-lg-4.col-lg-push-4.topcol.switch(data-bind="css: {invisible: !loadedFirst()}") + span.brief(data-bind="text: briefText") + //ko if: photos().length + .btn-group + button.btn.btn-primary(title="Page by page", data-bind="click: function () {feedSelect(false)}, css: {active: !feed()}") + span.glyphicon.glyphicon-book + button.btn.btn-primary(title="Feed", data-bind="click: function () {feedSelect(true)}, css: {active: feed()}") + span.glyphicon.glyphicon-th-list + // /ko + .clearfix.hidden-lg + .col-xs-12.col-lg-4.col-lg-pull-4.pag(data-bind="css: {loading: !feed() && loading(), hasPag: paginationShow()}") + //ko if: paginationShow() + //ko template: {name: 'photoPagerTpl'} + // /ko + // /ko - //ko if: u && canAdd() - a.photoPreview.withInfo.fringe.addPhoto(href="/photoUpload") - img.img(src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", data-bind="style: {width: w, height: h}") - .plusPhoto - .desc Upload photo.. - // /ko - //ko foreach: photos - .photoPreview.withStatus.withInfo.fringe(data-bind="attr: {title: title}, css: ($parent.feed() ? 'trans ' : '') + 's' + $data.s") - a.photoBox(data-bind="attr: {href: '/p/' + cid, target: $parent.feed() ? '_blank' : '_self'}") - img.img(data-bind="attr: {src: sfile, alt: title}, event: {load: $parent.onPreviewLoad, error: $parent.onPreviewErr}, style: {width: $parent.w, height: $parent.h}") - .curtain - //ko if: status.icon - .status.fringe(data-bind="attr: {title: status.tip}") - span.glyphicon(data-bind="css: status.icon") - // /ko - .info - a.title(data-bind="text: title, attr: {href: '/p/' + cid, target: $parent.feed() ? '_blank' : '_self'}") - //ko if: $data.rs - .regions(data-bind="foreach: $data.rs", title=" ") - | , - a.shortRegion(data-bind="css: {where: !$data.cid}, attr: {href: '/ps?f='+(!$data.cid ? 'geo!0'+($parent.rs[$index()+1] ? '_r!'+$parent.rs[$index()+1].cid : '') : 'r!'+$data.cid), title: $data.title_en}, text: $data.title_en") - // /ko - //ko if: $data.ccount || $data.changed - .rightBlocks - //ko if: $data.ccount - a.rightBlock.comm(data-bind="html: $data.ccount + ($data.ccount_new ? ' +' + $data.ccount_new + '' : ''), attr: {href: '/p/' + cid + '?hl=comments', target: $parent.feed() ? '_blank' : '_self'}", title="Comments") - // /ko - //ko if: $data.changed - a.rightBlock.changed(data-bind="attr: {href: '/p/' + cid + '?history=1', target: $parent.feed() ? '_blank' : '_self'}", title="Photo has been changed since last visit") - span.glyphicon.glyphicon-pencil - // /ko - // /ko - // /ko - //ko if: feed() - .photoPreview.withInfo.loadingPhoto(data-bind="style: {visibility: loading() ? 'visible' : 'hidden', width: w, height: h}") - .loadPhoto Loading - // /ko - //ko if: photos().length && paginationShow() - .rowoffset.pag(data-bind="template: {name: 'photoPagerTpl'}") - // /ko + //ko if: u && canAdd() + a.photoPreview.withInfo.fringe.addPhoto(href="/photoUpload") + img.img(src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", data-bind="style: {width: w, height: h}") + .plusPhoto + .desc Upload photo.. + // /ko + //ko foreach: photos + .photoPreview.withStatus.withInfo.fringe(data-bind="attr: {title: title}, css: ($parent.feed() ? 'trans ' : '') + 's' + $data.s") + a.photoBox(data-bind="attr: {href: '/p/' + cid, target: $parent.feed() ? '_blank' : '_self'}") + img.img(data-bind="attr: {src: sfile, alt: title}, event: {load: $parent.onPreviewLoad, error: $parent.onPreviewErr}, style: {width: $parent.w, height: $parent.h}") + .curtain + //ko if: status.icon + .status.fringe(data-bind="attr: {title: status.tip}") + span.glyphicon(data-bind="css: status.icon") + // /ko + .info + a.title(data-bind="text: title, attr: {href: '/p/' + cid, target: $parent.feed() ? '_blank' : '_self'}") + //ko if: $data.rs + .regions(data-bind="foreach: $data.rs", title=" ") + | , + a.shortRegion(data-bind="css: {where: !$data.cid}, attr: {href: '/ps?f='+(!$data.cid ? 'geo!0'+($parent.rs[$index()+1] ? '_r!'+$parent.rs[$index()+1].cid : '') : 'r!'+$data.cid), title: $data.title_en}, text: $data.title_en") + // /ko + //ko if: $data.ccount || $data.changed + .rightBlocks + //ko if: $data.ccount + a.rightBlock.comm(data-bind="html: $data.ccount + ($data.ccount_new ? ' +' + $data.ccount_new + '' : ''), attr: {href: '/p/' + cid + '?hl=comments', target: $parent.feed() ? '_blank' : '_self'}", title="Comments") + // /ko + //ko if: $data.changed + a.rightBlock.changed(data-bind="attr: {href: '/p/' + cid + '?history=1', target: $parent.feed() ? '_blank' : '_self'}", title="Photo has been changed since last visit") + span.glyphicon.glyphicon-pencil + // /ko + // /ko + // /ko + //ko if: feed() + .photoPreview.withInfo.loadingPhoto(data-bind="style: {visibility: loading() ? 'visible' : 'hidden', width: w, height: h}") + .loadPhoto Loading + // /ko + //ko if: photos().length && paginationShow() + .rowoffset.pag(data-bind="template: {name: 'photoPagerTpl'}") + // /ko - | \ No newline at end of file + | \ No newline at end of file diff --git a/views/module/region/select.jade b/views/module/region/select.jade index 9fa4432ef..fd2a053d5 100644 --- a/views/module/region/select.jade +++ b/views/module/region/select.jade @@ -1,47 +1,47 @@ .regsel(data-bind="with: repository[M!M]") - //ko if: loading() - .loading Загрузка - // /ko + //ko if: loading() + .loading Загрузка + // /ko - //ko ifnot: loading() - h4.namehead - span.glyphicon.glyphicon-globe - span(data-bind="text: ' Region' + (options.max > 1 ? 's' : '') + ' select'") - .offsetwrap - div Type the name of the region directly in the input or find it in the below tree - //ko if: options.max > 1 - div(data-bind="text: 'Allowed to select ' + (options.min ? 'from ' + options.min: 'up ')+ ' to ' + options.max + ' regions, they should not be nested within each other'") - // /ko + //ko ifnot: loading() + h4.namehead + span.glyphicon.glyphicon-globe + span(data-bind="text: ' Region' + (options.max > 1 ? 's' : '') + ' select'") + .offsetwrap + div Type the name of the region directly in the input or find it in the below tree + //ko if: options.max > 1 + div(data-bind="text: 'Allowed to select ' + (options.min ? 'from ' + options.min: 'up ')+ ' to ' + options.max + ' regions, they should not be nested within each other'") + // /ko - .inputwrap.surrogate - .inputwrap.origin - .input-group.regionsgroup - span.input-group-addon Selection: - input.regionstkn.form-control(type="text", placeholder="Start to type region name") + .inputwrap.surrogate + .inputwrap.origin + .input-group.regionsgroup + span.input-group-addon Selection: + input.regionstkn.form-control(type="text", placeholder="Start to type region name") - .offsetwrap - .regionsHead - .headElem.interact(data-bind="click: expandAll") - span.glyphicon.glyphicon-plus - | Expand all - .headElem.interact(data-bind="click: collapseAll") - span.glyphicon.glyphicon-minus - | Collapse all - .tree - ul(data-bind="template: {name: 'treeNode', foreach: regionsTree}") - // /ko + .offsetwrap + .regionsHead + .headElem.interact(data-bind="click: expandAll") + span.glyphicon.glyphicon-plus + | Expand all + .headElem.interact(data-bind="click: collapseAll") + span.glyphicon.glyphicon-minus + | Collapse all + .tree + ul(data-bind="template: {name: 'treeNode', foreach: regionsTree}") + // /ko - | \ No newline at end of file + | \ No newline at end of file diff --git a/views/module/user/brief.jade b/views/module/user/brief.jade index c94b928d1..bdcb1f150 100644 --- a/views/module/user/brief.jade +++ b/views/module/user/brief.jade @@ -1,55 +1,55 @@ .user_brief(data-bind="with: repository[M!M]") - .briefBlock - .avatar.fringe - img(data-bind="attr: {src: user.avatar(), alt: user.disp()}, event: {load: onAvaLoad, error: onAvaError}") - //ko if: avaexe() - .avaLoadCurtain - // /ko - //ko if: canAva() - button.btn.btn-sm.btn-primary.avaEdit(data-bind="click: avaActionToggle, css: {disabled: avaexe()}, attr: {disabled: avaexe()}", title="Редактировать аватару") - span.glyphicon.glyphicon-pencil - //ko if: avaction() - .avaAction - input.avaInput(type="file", name="files[]") - button.btn.btn-primary.avaSelect(data-bind="click: avaSelect, css: {disabled: avaexe()}, attr: {disabled: avaexe()}", title="Загрузить новое изображение") - span.glyphicon.glyphicon-picture - | Сменить - //ko if: avaExists() - button.btn.btn-primary.avaDel(data-bind="click: avaDel, css: {disabled: avaexe()}, attr: {disabled: avaexe()}", title="Удалить загруженное изображение") - span.glyphicon.glyphicon-remove - | Удалить - // /ko - // /ko - // /ko + .briefBlock + .avatar.fringe + img(data-bind="attr: {src: user.avatar(), alt: user.disp()}, event: {load: onAvaLoad, error: onAvaError}") + //ko if: avaexe() + .avaLoadCurtain + // /ko + //ko if: canAva() + button.btn.btn-sm.btn-primary.avaEdit(data-bind="click: avaActionToggle, css: {disabled: avaexe()}, attr: {disabled: avaexe()}", title="Редактировать аватару") + span.glyphicon.glyphicon-pencil + //ko if: avaction() + .avaAction + input.avaInput(type="file", name="files[]") + button.btn.btn-primary.avaSelect(data-bind="click: avaSelect, css: {disabled: avaexe()}, attr: {disabled: avaexe()}", title="Загрузить новое изображение") + span.glyphicon.glyphicon-picture + | Сменить + //ko if: avaExists() + button.btn.btn-primary.avaDel(data-bind="click: avaDel, css: {disabled: avaexe()}, attr: {disabled: avaexe()}", title="Удалить загруженное изображение") + span.glyphicon.glyphicon-remove + | Удалить + // /ko + // /ko + // /ko - .userName(data-bind="text: user.disp()") - //ko if: rn() - .roleName(data-bind="text: rn(), css: rc()") - // /ko + .userName(data-bind="text: user.disp()") + //ko if: rn() + .roleName(data-bind="text: rn(), css: rc()") + // /ko - //-.row(data-bind="style: {display: can_pm() ? '': 'none'}") - button.btn.btn-primary(type="button", data-bind="event: {}") - span.glyphicon.glyphicon-envelope - span Send message - .briefBlock - .head Общее - .h_separator - table.briefTable - tbody - tr - td Регистрация: - td(data-bind="text: moment(user.regdate()).format('D MMMM YYYY')") - tr - td Статус: - td(data-bind="text: user.online() ? 'Онлайн' : 'Оффлайн', css: {online : user.online()}") - .briefBlock - .head Краткая статистика - .h_separator - table.briefTable - tbody - tr - td Фотографий: - td(data-bind="text: user.pcount()") - tr - td Комментариев: - td(data-bind="text: user.ccount()") + //-.row(data-bind="style: {display: can_pm() ? '': 'none'}") + button.btn.btn-primary(type="button", data-bind="event: {}") + span.glyphicon.glyphicon-envelope + span Send message + .briefBlock + .head Общее + .h_separator + table.briefTable + tbody + tr + td Регистрация: + td(data-bind="text: moment(user.regdate()).format('D MMMM YYYY')") + tr + td Статус: + td(data-bind="text: user.online() ? 'Онлайн' : 'Оффлайн', css: {online : user.online()}") + .briefBlock + .head Краткая статистика + .h_separator + table.briefTable + tbody + tr + td Фотографий: + td(data-bind="text: user.pcount()") + tr + td Комментариев: + td(data-bind="text: user.ccount()") diff --git a/views/module/user/photoUpload.jade b/views/module/user/photoUpload.jade index 527392539..59819e0b2 100644 --- a/views/module/user/photoUpload.jade +++ b/views/module/user/photoUpload.jade @@ -1,65 +1,65 @@ .user_photoUpload(data-bind="with: repository[M!M]") - //-.text-danger(style="margin-bottom: 5px;") - | Внимание! Временно принимаются только фотографии в пределах России, Белоруссии и УкраиныСНГ, остальные будут отклонены. Подробности  - a(target="_blank", href="/news/97") здесь - .toptext(data-bind="html: toptext()") + //-.text-danger(style="margin-bottom: 5px;") + | Внимание! Временно принимаются только фотографии в пределах России, Белоруссии и УкраиныСНГ, остальные будут отклонены. Подробности  + a(target="_blank", href="/news/97") здесь + .toptext(data-bind="html: toptext()") - //ko if: canLoad() - .warn(style="font-size: 12px; color: #A57A30;") - | Согласно  - a(href="/news/95", target="_blank") Правилам - | , к публикации будут допущены фотографии: - br - | Снятые до 2000 года включительно, имеющие историческую ценность и отображающие объект съемки в уникальном ракурсе или времени - form.uploadForm(method="POST", enctype="multipart/form-data") - #addFiles - input.fileInput(type="file", name="files[]", accept="image/*", multiple) - button.btn.btn-primary.fileSelect(data-bind="click: selectFile") - span.glyphicon.glyphicon-plus - | Добавить... - .addfiles_area.centering_content(data-bind="css: {hide: !filereader()}") - #or.centering_content или - span Перетащите фотографии сюда - #dropzone + //ko if: canLoad() + .warn(style="font-size: 12px; color: #A57A30;") + | Согласно  + a(href="/news/95", target="_blank") Правилам + | , к публикации будут допущены фотографии: + br + | Снятые до 2000 года включительно, имеющие историческую ценность и отображающие объект съемки в уникальном ракурсе или времени + form.uploadForm(method="POST", enctype="multipart/form-data") + #addFiles + input.fileInput(type="file", name="files[]", accept="image/*", multiple) + button.btn.btn-primary.fileSelect(data-bind="click: selectFile") + span.glyphicon.glyphicon-plus + | Добавить... + .addfiles_area.centering_content(data-bind="css: {hide: !filereader()}") + #or.centering_content или + span Перетащите фотографии сюда + #dropzone - //-Отображаем возможное кол-во к загрузке, если менее 50 разрешено - //ko if: canCount() < 50 - .canCount(data-bind="text: 'Вы можете добавить еще ' + canCount() + ' фото'") - // /ko + //-Отображаем возможное кол-во к загрузке, если менее 50 разрешено + //ko if: canCount() < 50 + .canCount(data-bind="text: 'Вы можете добавить еще ' + canCount() + ' фото'") + // /ko - div(data-bind="style: {display: fileList().length > 0 ? '' : 'none'}") - .allprogress(data-bind="style: {visibility: filesUploading()? 'visible' : 'hidden'}") - .progress.progress-striped.active - .progress-bar(data-bind="style: {width: fileProgressAll() + '%'}") - .extText(data-bind="text: fileProgressAllText()") - table.table.table-striped.table-hover.filesTable - caption Добавленные фотографии - tbody - //ko foreach: fileList - tr - td.preview - div.forcanvas(data-bind="attr: {'data-fileuid': ext.uid}, css: {noValid: !ext.valid, tooBig: ext.tooBigPreview}") - //ko if: ext.tooBigPreview - .msg Слишком большая для превью - // /ko - td.desc - div(data-bind="text: name") - //ko if: ext.valid - div(data-bind="text: ext.humansize") - // /ko - div.fileMsg(data-bind="text: ext.msg(), css: ext.msgCss()") - //ko if: ext.valid - .progress.progress-striped.active(data-bind="style: {visibility: ext.uploading()? 'visible' : 'hidden'}") - .progress-bar.progress-bar-success(data-bind="style: {width: ext.progress() + '%'}") - // /ko - td.fileButtons - //ko if: ext.valid && !$parent.options.auto && !ext.uploaded() - button.btn.btn-success(data-bind="click: function () {$parent.startFile($data)}, css: {disabled: ext.uploading()}, attr: {disabled: ext.uploading()}") - span.glyphicon.glyphicon-upload - | Загрузить - // /ko - button.btn(data-bind="click: function () {$parent.cancelFile($data)}, css: {'btn-warning': !ext.uploaded(), 'btn-danger': ext.uploaded()}") - span.glyphicon(data-bind="css: {'glyphicon-ban-circle': !ext.uploaded(), 'glyphicon-remove-circle': ext.uploaded()}") - span(data-bind="text: ext.uploaded() ? ' Удалить' : ' Отменить'") - // /ko - // /ko \ No newline at end of file + div(data-bind="style: {display: fileList().length > 0 ? '' : 'none'}") + .allprogress(data-bind="style: {visibility: filesUploading()? 'visible' : 'hidden'}") + .progress.progress-striped.active + .progress-bar(data-bind="style: {width: fileProgressAll() + '%'}") + .extText(data-bind="text: fileProgressAllText()") + table.table.table-striped.table-hover.filesTable + caption Добавленные фотографии + tbody + //ko foreach: fileList + tr + td.preview + div.forcanvas(data-bind="attr: {'data-fileuid': ext.uid}, css: {noValid: !ext.valid, tooBig: ext.tooBigPreview}") + //ko if: ext.tooBigPreview + .msg Слишком большая для превью + // /ko + td.desc + div(data-bind="text: name") + //ko if: ext.valid + div(data-bind="text: ext.humansize") + // /ko + div.fileMsg(data-bind="text: ext.msg(), css: ext.msgCss()") + //ko if: ext.valid + .progress.progress-striped.active(data-bind="style: {visibility: ext.uploading()? 'visible' : 'hidden'}") + .progress-bar.progress-bar-success(data-bind="style: {width: ext.progress() + '%'}") + // /ko + td.fileButtons + //ko if: ext.valid && !$parent.options.auto && !ext.uploaded() + button.btn.btn-success(data-bind="click: function () {$parent.startFile($data)}, css: {disabled: ext.uploading()}, attr: {disabled: ext.uploading()}") + span.glyphicon.glyphicon-upload + | Загрузить + // /ko + button.btn(data-bind="click: function () {$parent.cancelFile($data)}, css: {'btn-warning': !ext.uploaded(), 'btn-danger': ext.uploaded()}") + span.glyphicon(data-bind="css: {'glyphicon-ban-circle': !ext.uploaded(), 'glyphicon-remove-circle': ext.uploaded()}") + span(data-bind="text: ext.uploaded() ? ' Удалить' : ' Отменить'") + // /ko + // /ko \ No newline at end of file diff --git a/views/module/user/profile.jade b/views/module/user/profile.jade index 91117bc03..4aeb4de14 100644 --- a/views/module/user/profile.jade +++ b/views/module/user/profile.jade @@ -1,79 +1,79 @@ .user_profile(data-bind="with: repository[M!M]") - form.form-horizontal(data-bind="css: {canBeEdit: canBeEdit(), cannotBeEdit: !canBeEdit()}") - .form-group - label.col-sm-3.col-md-2.control-label(for="inName") Псевдоним - .col-sm-9.col-md-9 - p.form-control-static - span.glyphicon.glyphicon-user - span.loginName(data-bind="text: ' ' + u.login()") - .form-group(data-bind="style: {display: canBeEdit() || u.firstName().length || u.lastName().length > 0 ? '' : 'none'}") - label.col-sm-3.col-md-2.control-label(for="inName") Реальное имя - .col-sm-3.col-md-2 - input.form-control(type="text", id="inName", data-bind="attr: {size: u.firstName().length, disabled: !editMode()}, value: u.firstName, valueUpdate: 'afterkeydown'") - .col-sm-3.col-md-2 - input.form-control(type="text", id="inLastName", data-bind="attr: {disabled: !editMode()}, value: u.lastName, valueUpdate: 'afterkeydown'") - .form-group - label.col-sm-3.col-md-2.control-label(for="inBirthdate") Дата рождения - .col-sm-3.col-md-2 - input#inBirthdate.form-control(type="text", data-bind="attr: {disabled: !editMode()}, value: u.birthdate, valueUpdate: 'keyup'") - .form-group - label.col-sm-3.col-md-2.control-label(for="inSex2") Пол - .col-sm-4.col-md-3 - input.form-control(type="text", id="inSex2", disabled, data-bind="style: {display: (!canBeEdit() ? '' : 'none')}, value: u.sex()=='m' ? 'Male' : 'Female'") - div(data-bind="style: {display: canBeEdit() ? '' : 'none'}") - label.radio-inline - input(type="radio", id='inSex', name="sex", value="m", data-bind="checked: u.sex, attr: {disabled: !editMode()}") - |  Мужчина - label.radio-inline - input(type="radio", id='inSex', name="sex", value="f", data-bind="checked: u.sex, attr: {disabled: !editMode()}") - |  Женщина - .form-group(data-bind="style: {display: canBeEdit() || u.country().length || u.city().length > 0 ? '' : 'none'}") - label.col-sm-3.col-md-2.control-label(for="inResidence") Резиденция - .col-sm-3.col-md-2 - input.form-control(type="text", id='inResidence', data-bind="attr: {disabled: !editMode()}, size: u.country().length, value: u.country, valueUpdate: 'afterkeydown'") - .col-sm-3.col-md-2 - input.form-control(type="text", id="inResidence2", data-bind="attr: {disabled: !editMode()}, value: u.city, valueUpdate: 'afterkeydown'") - .form-group(data-bind="style: {display: canBeEdit() || u.work().length > 0 ? '' : 'none'}") - label.col-sm-3.col-md-2.control-label(for="inInterested") Деятельность - .col-sm-3.col-md-2 - input.form-control(type="text", id='inInterested', data-bind="attr: {disabled: !editMode()}, value: u.work, valueUpdate: 'afterkeydown'") - .form-group(data-bind="style: {display: canBeEdit() || u.www().length > 0 ? '' : 'none'}") - label.col-sm-3.col-md-2.control-label(for="inWebsite") Website - .col-sm-3.col-md-2 - input.form-control(type="text", id='inWebsite', data-bind="attr: {disabled: !editMode()}, value: u.www, valueUpdate: 'afterkeydown'") - .form-group(data-bind="style: {display: canBeEdit() || u.lj().length > 0 ? '' : 'none'}") - label.col-sm-3.col-md-2.control-label(for="inLJ") ЖЖ - .col-sm-3.col-md-2 - input.form-control(type="text", id='inLJ', data-bind="attr: {disabled: !editMode()}, value: u.lj, valueUpdate: 'afterkeydown'") - .form-group(data-bind="style: {display: canBeEdit() || u.skype().length > 0 ? '' : 'none'}") - label.col-sm-3.col-md-2.control-label(for="inSkype") Skype - .col-sm-3.col-md-2 - input.form-control(type="text", id='inSkype', data-bind="attr: {disabled: !editMode()}, value: u.skype, valueUpdate: 'afterkeydown'") - .form-group(data-bind="style: {display: canBeEdit() || u.icq().length > 0 ? '' : 'none'}") - label.col-sm-3.col-md-2.control-label(for="inICQ") icq - .col-sm-3.col-md-2 - input.form-control(type="text", id='inICQ', data-bind="attr: {disabled: !editMode()}, value: u.icq, valueUpdate: 'afterkeydown'") - .form-group(data-bind="style: {display: canBeEdit() || u.aim().length > 0 ? '' : 'none'}") - label.col-sm-3.col-md-2.control-label(for="inaim") aim - .col-sm-3.col-md-2 - input.form-control(type="text", id='inaim', data-bind="attr: {disabled: !editMode()}, value: u.aim, valueUpdate: 'afterkeydown'") - .form-group(data-bind="style: {display: canBeEdit() || u.flickr().length > 0 ? '' : 'none'}") - label.col-sm-3.col-md-2.control-label(for="inflickr") flickr - .col-sm-3.col-md-2 - input.form-control(type="text", id='inflickr', data-bind="attr: {disabled: !editMode()}, value: u.flickr, valueUpdate: 'afterkeydown'") - .form-group(data-bind="style: {display: canBeEdit() || u.blogger().length > 0 ? '' : 'none'}") - label.col-sm-3.col-md-2.control-label(for="inBlogger") Blogger - .col-sm-3.col-md-2 - input.form-control(type="text", id='inBlogger', data-bind="attr: {disabled: !editMode()}, value: u.blogger, valueUpdate: 'afterkeydown'") - .form-group(data-bind="style: {display: canBeEdit() || u.aboutme().length > 0 ? '' : 'none'}") - label.col-sm-3.col-md-2.control-label(for="inaboutme") Обо мне - .col-sm-7.col-md-8 - textarea.form-control(rows="4", id='inaboutme', data-bind="attr: {disabled: !editMode()}, value: u.aboutme, valueUpdate: 'afterkeydown'") - .form-group(data-bind="style: {display: canBeEdit() ? '' : 'none'}") - .col-sm-12 - button.btn.btn-primary(type="button", data-bind="css: {'btn-success': editMode()}, event: {click: function(data, event) { if (!data.editMode()){data.edit(true)} else{data.saveUser()}}}") - span.glyphicon(data-bind="css: {'glyphicon-pencil': !editMode(), 'glyphicon-ok': editMode()}") - span(data-bind="text: editMode() ? ' Сохранить профиль' : ' Редактировать'") - button.btn.btn-danger(type="button", data-bind="style: {display: editMode() ? '' : 'none'}, event: {click: function(data, event) { if (data.editMode()) {data.cancelUser()}}}") - span.glyphicon.glyphicon-remove - | Отмена \ No newline at end of file + form.form-horizontal(data-bind="css: {canBeEdit: canBeEdit(), cannotBeEdit: !canBeEdit()}") + .form-group + label.col-sm-3.col-md-2.control-label(for="inName") Псевдоним + .col-sm-9.col-md-9 + p.form-control-static + span.glyphicon.glyphicon-user + span.loginName(data-bind="text: ' ' + u.login()") + .form-group(data-bind="style: {display: canBeEdit() || u.firstName().length || u.lastName().length > 0 ? '' : 'none'}") + label.col-sm-3.col-md-2.control-label(for="inName") Реальное имя + .col-sm-3.col-md-2 + input.form-control(type="text", id="inName", data-bind="attr: {size: u.firstName().length, disabled: !editMode()}, value: u.firstName, valueUpdate: 'afterkeydown'") + .col-sm-3.col-md-2 + input.form-control(type="text", id="inLastName", data-bind="attr: {disabled: !editMode()}, value: u.lastName, valueUpdate: 'afterkeydown'") + .form-group + label.col-sm-3.col-md-2.control-label(for="inBirthdate") Дата рождения + .col-sm-3.col-md-2 + input#inBirthdate.form-control(type="text", data-bind="attr: {disabled: !editMode()}, value: u.birthdate, valueUpdate: 'keyup'") + .form-group + label.col-sm-3.col-md-2.control-label(for="inSex2") Пол + .col-sm-4.col-md-3 + input.form-control(type="text", id="inSex2", disabled, data-bind="style: {display: (!canBeEdit() ? '' : 'none')}, value: u.sex()=='m' ? 'Male' : 'Female'") + div(data-bind="style: {display: canBeEdit() ? '' : 'none'}") + label.radio-inline + input(type="radio", id='inSex', name="sex", value="m", data-bind="checked: u.sex, attr: {disabled: !editMode()}") + |  Мужчина + label.radio-inline + input(type="radio", id='inSex', name="sex", value="f", data-bind="checked: u.sex, attr: {disabled: !editMode()}") + |  Женщина + .form-group(data-bind="style: {display: canBeEdit() || u.country().length || u.city().length > 0 ? '' : 'none'}") + label.col-sm-3.col-md-2.control-label(for="inResidence") Резиденция + .col-sm-3.col-md-2 + input.form-control(type="text", id='inResidence', data-bind="attr: {disabled: !editMode()}, size: u.country().length, value: u.country, valueUpdate: 'afterkeydown'") + .col-sm-3.col-md-2 + input.form-control(type="text", id="inResidence2", data-bind="attr: {disabled: !editMode()}, value: u.city, valueUpdate: 'afterkeydown'") + .form-group(data-bind="style: {display: canBeEdit() || u.work().length > 0 ? '' : 'none'}") + label.col-sm-3.col-md-2.control-label(for="inInterested") Деятельность + .col-sm-3.col-md-2 + input.form-control(type="text", id='inInterested', data-bind="attr: {disabled: !editMode()}, value: u.work, valueUpdate: 'afterkeydown'") + .form-group(data-bind="style: {display: canBeEdit() || u.www().length > 0 ? '' : 'none'}") + label.col-sm-3.col-md-2.control-label(for="inWebsite") Website + .col-sm-3.col-md-2 + input.form-control(type="text", id='inWebsite', data-bind="attr: {disabled: !editMode()}, value: u.www, valueUpdate: 'afterkeydown'") + .form-group(data-bind="style: {display: canBeEdit() || u.lj().length > 0 ? '' : 'none'}") + label.col-sm-3.col-md-2.control-label(for="inLJ") ЖЖ + .col-sm-3.col-md-2 + input.form-control(type="text", id='inLJ', data-bind="attr: {disabled: !editMode()}, value: u.lj, valueUpdate: 'afterkeydown'") + .form-group(data-bind="style: {display: canBeEdit() || u.skype().length > 0 ? '' : 'none'}") + label.col-sm-3.col-md-2.control-label(for="inSkype") Skype + .col-sm-3.col-md-2 + input.form-control(type="text", id='inSkype', data-bind="attr: {disabled: !editMode()}, value: u.skype, valueUpdate: 'afterkeydown'") + .form-group(data-bind="style: {display: canBeEdit() || u.icq().length > 0 ? '' : 'none'}") + label.col-sm-3.col-md-2.control-label(for="inICQ") icq + .col-sm-3.col-md-2 + input.form-control(type="text", id='inICQ', data-bind="attr: {disabled: !editMode()}, value: u.icq, valueUpdate: 'afterkeydown'") + .form-group(data-bind="style: {display: canBeEdit() || u.aim().length > 0 ? '' : 'none'}") + label.col-sm-3.col-md-2.control-label(for="inaim") aim + .col-sm-3.col-md-2 + input.form-control(type="text", id='inaim', data-bind="attr: {disabled: !editMode()}, value: u.aim, valueUpdate: 'afterkeydown'") + .form-group(data-bind="style: {display: canBeEdit() || u.flickr().length > 0 ? '' : 'none'}") + label.col-sm-3.col-md-2.control-label(for="inflickr") flickr + .col-sm-3.col-md-2 + input.form-control(type="text", id='inflickr', data-bind="attr: {disabled: !editMode()}, value: u.flickr, valueUpdate: 'afterkeydown'") + .form-group(data-bind="style: {display: canBeEdit() || u.blogger().length > 0 ? '' : 'none'}") + label.col-sm-3.col-md-2.control-label(for="inBlogger") Blogger + .col-sm-3.col-md-2 + input.form-control(type="text", id='inBlogger', data-bind="attr: {disabled: !editMode()}, value: u.blogger, valueUpdate: 'afterkeydown'") + .form-group(data-bind="style: {display: canBeEdit() || u.aboutme().length > 0 ? '' : 'none'}") + label.col-sm-3.col-md-2.control-label(for="inaboutme") Обо мне + .col-sm-7.col-md-8 + textarea.form-control(rows="4", id='inaboutme', data-bind="attr: {disabled: !editMode()}, value: u.aboutme, valueUpdate: 'afterkeydown'") + .form-group(data-bind="style: {display: canBeEdit() ? '' : 'none'}") + .col-sm-12 + button.btn.btn-primary(type="button", data-bind="css: {'btn-success': editMode()}, event: {click: function(data, event) { if (!data.editMode()){data.edit(true)} else{data.saveUser()}}}") + span.glyphicon(data-bind="css: {'glyphicon-pencil': !editMode(), 'glyphicon-ok': editMode()}") + span(data-bind="text: editMode() ? ' Сохранить профиль' : ' Редактировать'") + button.btn.btn-danger(type="button", data-bind="style: {display: editMode() ? '' : 'none'}, event: {click: function(data, event) { if (data.editMode()) {data.cancelUser()}}}") + span.glyphicon.glyphicon-remove + | Отмена \ No newline at end of file diff --git a/views/module/user/tabs.jade b/views/module/user/tabs.jade index 4be02cf81..060710a54 100644 --- a/views/module/user/tabs.jade +++ b/views/module/user/tabs.jade @@ -1,15 +1,15 @@ .span9-10 - .navbar - .navbar-inner - ul.nav - li.active - a(href="#") Profile - li - a(href="#") Messages - li - a(href="#") Photo - li - a(href="#") Blogs - li - a(href="#") Comments - .row.mContainer#profile \ No newline at end of file + .navbar + .navbar-inner + ul.nav + li.active + a(href="#") Profile + li + a(href="#") Messages + li + a(href="#") Photo + li + a(href="#") Blogs + li + a(href="#") Comments + .row.mContainer#profile \ No newline at end of file diff --git a/views/module/user/userPage.jade b/views/module/user/userPage.jade index 97f9c69bc..96143fc28 100644 --- a/views/module/user/userPage.jade +++ b/views/module/user/userPage.jade @@ -1,9 +1,9 @@ .row.userPage(data-bind="with: repository[M!M]") - .col-xs-12.col-sm-3.col-lg-2(style="z-index:2;") - .mContainer.mNoDisplay.mFadeIn.affix-top.userBrief(data-bind="style: {width: briefW()}") - .col-xs-12.col-sm-9.col-lg-10.userBody - nav.navbar.navbar-pastvu.user_menu - ul.nav.navbar-nav(data-bind="foreach: menuItems") - li(data-bind="css: {active: $data.section === $parent.section()}") - a(data-bind="text: $data.name, attr: {href: ($data.disable ? '' : $data.href)}, css: {disabled: $data.disable}") - .mContainer.mHidden.mFadeIn#user_content \ No newline at end of file + .col-xs-12.col-sm-3.col-lg-2(style="z-index:2;") + .mContainer.mNoDisplay.mFadeIn.affix-top.userBrief(data-bind="style: {width: briefW()}") + .col-xs-12.col-sm-9.col-lg-10.userBody + nav.navbar.navbar-pastvu.user_menu + ul.nav.navbar-nav(data-bind="foreach: menuItems") + li(data-bind="css: {active: $data.section === $parent.section()}") + a(data-bind="text: $data.name, attr: {href: ($data.disable ? '' : $data.href)}, css: {disabled: $data.disable}") + .mContainer.mHidden.mFadeIn#user_content \ No newline at end of file From 21af8bb8cfcbe52be3da96de0e7da781da565683 Mon Sep 17 00:00:00 2001 From: klimashkin Date: Mon, 26 Oct 2015 20:03:48 -0700 Subject: [PATCH 19/85] Status pages translate --- views/module/region/select.jade | 2 +- views/status/500.jade | 2 +- views/status/badbrowser.jade | 16 ++++++++-------- views/status/myua.jade | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/views/module/region/select.jade b/views/module/region/select.jade index fd2a053d5..a9f56b4e2 100644 --- a/views/module/region/select.jade +++ b/views/module/region/select.jade @@ -1,6 +1,6 @@ .regsel(data-bind="with: repository[M!M]") //ko if: loading() - .loading Загрузка + .loading Loading // /ko //ko ifnot: loading() diff --git a/views/status/500.jade b/views/status/500.jade index 03b9ec612..5a245ff41 100644 --- a/views/status/500.jade +++ b/views/status/500.jade @@ -34,5 +34,5 @@ html body a.msg(href="/") - span Sorry, server failed to fulfill an apparently request + span Sorry, server failed to fulfill request span(style="display: block; font-size: 18px; line-height: 18px;") [click here to go to the main page] \ No newline at end of file diff --git a/views/status/badbrowser.jade b/views/status/badbrowser.jade index 99d7d8a13..8d1e89075 100644 --- a/views/status/badbrowser.jade +++ b/views/status/badbrowser.jade @@ -4,7 +4,7 @@ html include ../includes/head_top_cap body .top.fringe - a.brand(href='/', title="PastVu - ретроспектива среды обитания человечества") + a.brand(href='/', title="PastVu - retro photos of mankind's habitat") img.logo(src="/img/misc/logo.png") img.name(src="/img/misc/name-2x.png", srcset="/img/misc/name.png 1x, /img/misc/name-2x.png 2x") style. @@ -57,18 +57,18 @@ body .cent.centering_content .content.fringe p - span Команда PastVu считает, что ваш браузер + span PastVu team considers, that your browser if agent && agent.family span.curr=' '+agent.family+' '+agent.major - span устарел и не отвечает современным требованиям, по которым разработан наш сайт + span is obsolete and does not meet modern requirements, which developed our website br br - | Пожалуйста, обновите ваш браузер или установите с официального сайта один из перечисленных ниже. + | Please upgrade your browser or install one of the following from the official website. br - | Это займет всего несколько минут, но откроет вам быстрый современный интернет. + | It will take a few minutes, but will open you a fast modern Internet. br br - | А после установки возвращайтесь к нам - на самый большой архив исторических фотографий PastVu.com! + | After installation return to us - the largest archive of history photos PastVu.com! .browsers a.chrome(href="http://www.google.com/chrome", target="_blank") Google Chrome a.firefox(href="http://www.mozilla.org", target="_blank") Mozilla Firefox @@ -76,5 +76,5 @@ body a.safari(href="http://www.apple.com/safari", target="_blank") Apple Safari a.yandex(href="http://browser.yandex.net", target="_blank") Yandex .support - a(href='mailto:support@pastvu.comm?subject=Сайт выдаёт сообщение об устаревшем браузере&body=Добрый день! Идентификатор моего браузера: '+(agent&&agent.source?agent.source:''), target="_blank") - | Напишите, если мы ошибаемся: support@pastvu.com \ No newline at end of file + a(href='mailto:support@pastvu.comm?subject=Website displays a message about an outdated browser&body=Good afternoon! My browser: '+(agent&&agent.source?agent.source:''), target="_blank") + | Please write, if we are mistaken: support@pastvu.com \ No newline at end of file diff --git a/views/status/myua.jade b/views/status/myua.jade index c48e06977..b2cb41ab2 100644 --- a/views/status/myua.jade +++ b/views/status/myua.jade @@ -4,7 +4,7 @@ html include ../includes/head_top_cap body .top.fringe - a.brand(href='/', title="PastVu - ретроспектива среды обитания человечества") + a.brand(href='/', title="PastVu - retro photos of mankind's habitat") img.logo(src="/img/misc/logo.png") img.name(src="/img/misc/name-2x.png", srcset="/img/misc/name.png 1x, /img/misc/name-2x.png 2x") style. From 95b2b10b89ab4e941e9b4b95f981a9296d8c2e9d Mon Sep 17 00:00:00 2001 From: klimashkin Date: Mon, 26 Oct 2015 22:04:24 -0700 Subject: [PATCH 20/85] Translate user section --- public/js/module/admin/conveyer.js | 6 +- public/js/module/photo/photo.js | 4 +- public/js/module/region/select.js | 2 +- public/js/module/user/brief.js | 18 +-- public/js/module/user/comments.js | 10 +- public/js/module/user/manage.js | 34 +++--- public/js/module/user/photoUpload.js | 28 ++--- public/js/module/user/settings.js | 46 ++++---- public/js/module/user/subscr.js | 4 +- public/js/module/user/userPage.js | 24 ++-- public/js/noties.js | 2 +- views/module/user/brief.jade | 24 ++-- views/module/user/comments.jade | 18 +-- views/module/user/manage.jade | 52 ++++----- views/module/user/photoUpload.jade | 24 ++-- views/module/user/profile.jade | 28 ++--- views/module/user/settings.jade | 166 +++++++++++++-------------- views/module/user/subscr.jade | 24 ++-- 18 files changed, 255 insertions(+), 259 deletions(-) diff --git a/public/js/module/admin/conveyer.js b/public/js/module/admin/conveyer.js index 0f33b24cb..3ad9ad1c0 100644 --- a/public/js/module/admin/conveyer.js +++ b/public/js/module/admin/conveyer.js @@ -447,7 +447,7 @@ define([ }, buttons: [ { - addClass: 'btn btn-danger', text: 'Да', + addClass: 'btn btn-danger', text: 'Yes', onClick: function ($noty) { // this = button element // $noty = $noty element @@ -464,7 +464,7 @@ define([ $noty.$message.children().html((data && data.message) || ''); - okButton.text('Закрыть').on('click', function () { + okButton.text('Close').on('click', function () { $noty.close(); this.exe(false); this.statFast(); @@ -474,7 +474,7 @@ define([ } }, { - addClass: 'btn btn-primary', text: 'Отмена', + addClass: 'btn btn-primary', text: 'Cancel', onClick: function ($noty) { $noty.close(); _this.exe(false); diff --git a/public/js/module/photo/photo.js b/public/js/module/photo/photo.js index 0925acff1..7daf2cc8e 100644 --- a/public/js/module/photo/photo.js +++ b/public/js/module/photo/photo.js @@ -1374,8 +1374,8 @@ define(['underscore', 'Utils', 'socket!', 'Params', 'knockout', 'knockout.mappin self.exe(true); noties.confirm({ message: 'The photo will be moved to the Trash, and misses the turn to the publication
Confirm the operation?', - okText: 'Да', - cancelText: 'Нет', + okText: 'Yes', + cancelText: 'No', onOk: function (confirmer) { confirmer.disable(); diff --git a/public/js/module/region/select.js b/public/js/module/region/select.js index bb26d4f38..35bb49e12 100644 --- a/public/js/module/region/select.js +++ b/public/js/module/region/select.js @@ -223,7 +223,7 @@ define([ } } } else { - $(e.relatedTarget).addClass('invalid').attr('title', 'Нет такого региона'); + $(e.relatedTarget).addClass('invalid').attr('title', 'No such region'); } }, //Событие удаления токена непосредственно из поля diff --git a/public/js/module/user/brief.js b/public/js/module/user/brief.js index 05b828ad9..1408dd918 100644 --- a/public/js/module/user/brief.js +++ b/public/js/module/user/brief.js @@ -6,11 +6,11 @@ define(['underscore', 'Params', 'knockout', 'socket!', 'm/_moduleCliche', 'globa 'use strict'; var mess = { - ftype: 'Тип файла не соответствует правилам', - fmax: 'Файл больше разрешенного размера', - fmin: 'Файл слишком мал', - fpx: 'Согласно правилам, размер изображения должен быть не менее 100px по каждой из сторон', - finvalid: 'Файл не прошел валидацию' //Сообщение по умолчанию для валидации + ftype: 'File type does not correspond site rules', + fmax: 'File is bigger then allowed', + fmin: 'File is too small', + fpx: 'According the rules, image size must be at least 100px for each sides', + finvalid: 'The file has not passed validation' //Сообщение по умолчанию для валидации }; return Cliche.extend({ @@ -155,13 +155,13 @@ define(['underscore', 'Params', 'knockout', 'socket!', 'm/_moduleCliche', 'globa if (receivedFile && receivedFile.file) { if (receivedFile.error) { - window.noty({text: mess[receivedFile.error] || mess.finvalid || 'Ошибка загрузки аватары', type: 'error', layout: 'center', timeout: 4000, force: true}); + window.noty({text: mess[receivedFile.error] || mess.finvalid || 'Failed to load avatar', type: 'error', layout: 'center', timeout: 4000, force: true}); this.avaexe(false); ga('send', 'event', 'avatar', 'upload', 'avatar upload error'); } else { socket.once('changeAvatarResult', function (result) { if (!result || result.error || !result.avatar) { - window.noty({text: result && result.message || 'Ошибка создания аватары', type: 'error', layout: 'center', timeout: 4000, force: true}); + window.noty({text: result && result.message || 'Failed to create avatar', type: 'error', layout: 'center', timeout: 4000, force: true}); ga('send', 'event', 'avatar', 'upload', 'avatar upload error'); } else { if (this.user.login() !== this.auth.iAm.login()) { @@ -181,7 +181,7 @@ define(['underscore', 'Params', 'knockout', 'socket!', 'm/_moduleCliche', 'globa } }, avaFail: function (e, data) { - window.noty({text: data && data.message || 'Ошибка загрузки аватары', type: 'error', layout: 'center', timeout: 4000, force: true}); + window.noty({text: data && data.message || 'Failed to load avatar', type: 'error', layout: 'center', timeout: 4000, force: true}); this.avaexe(false); }, @@ -189,7 +189,7 @@ define(['underscore', 'Params', 'knockout', 'socket!', 'm/_moduleCliche', 'globa this.avaexe(true); socket.once('delAvatarResult', function (result) { if (!result || result.error) { - window.noty({text: result && result.message || 'Ошибка удаления аватары', type: 'error', layout: 'center', timeout: 4000, force: true}); + window.noty({text: result && result.message || 'Failed to remove avatar', type: 'error', layout: 'center', timeout: 4000, force: true}); } else { if (this.user.login() !== this.auth.iAm.login()) { //Если меняем не себе, обновляем модель вручную. Себе обновления пришлет _session diff --git a/public/js/module/user/comments.js b/public/js/module/user/comments.js index 55a29c2c2..519f5fb3e 100644 --- a/public/js/module/user/comments.js +++ b/public/js/module/user/comments.js @@ -72,9 +72,9 @@ define(['underscore', 'Utils', 'socket!', 'Params', 'knockout', 'knockout.mappin var count = this.types[this.type() + '_persist'](), txt = ''; if (count) { - txt = 'Показаны ' + this.pageFirstItem() + ' - ' + this.pageLastItem() + ' из ' + count; + txt = '' + this.pageFirstItem() + ' - ' + this.pageLastItem() + ' of ' + count + ' are shown'; } else { - txt = 'Пользователь пока не оставил комментариев в данной категории'; + txt = 'User still has no comments in this category'; } return txt; }, this); @@ -217,12 +217,12 @@ define(['underscore', 'Utils', 'socket!', 'Params', 'knockout', 'knockout.mappin { module: 'm/comment/hist', modal: { - topic: 'История изменений комментария', + topic: 'History of comment\'s changes', animateScale: true, curtainClick: { click: this.closeHistory, ctx: this }, - offIcon: { text: 'Закрыть', click: this.closeHistory, ctx: this }, + offIcon: { text: 'Close', click: this.closeHistory, ctx: this }, btns: [ - { css: 'btn-primary', text: 'Закрыть', click: this.closeHistory, ctx: this } + { css: 'btn-primary', text: 'Close', click: this.closeHistory, ctx: this } ] }, options: { cid: cid, type: this.type() }, diff --git a/public/js/module/user/manage.js b/public/js/module/user/manage.js index 005f38c15..acc2d9de8 100644 --- a/public/js/module/user/manage.js +++ b/public/js/module/user/manage.js @@ -7,10 +7,10 @@ define(['underscore', 'Utils', 'socket!', 'Params', 'knockout', 'knockout.mappin } var ranksLang = { - mec: 'Меценат', - mec_silv: 'Серебряный меценат', - mec_gold: 'Золотой меценат', - adviser: 'Советник' + mec: 'Maecenas', + mec_silv: 'Silver maecenas', + mec_gold: 'Gold maecenas', + adviser: 'Counselor' }; return Cliche.extend({ @@ -32,10 +32,10 @@ define(['underscore', 'Utils', 'socket!', 'Params', 'knockout', 'knockout.mappin this.role = ko.observable(String(this.u_origin.role)); this.roles = [ - { cat: 'reg', name: 'Обычный пользователь' }, - { cat: 'mod', name: 'Модератор' }, - { cat: 'adm', name: 'Администратор' }, - { cat: 'sadm', name: 'Суперадминистратор' } + { cat: 'reg', name: 'Regular user' }, + { cat: 'mod', name: 'Moderator' }, + { cat: 'adm', name: 'Administrator' }, + { cat: 'sadm', name: 'Superadministrator' } ]; this.roleCategory = ko.computed({ read: function () { @@ -203,21 +203,21 @@ define(['underscore', 'Utils', 'socket!', 'Params', 'knockout', 'knockout.mappin selectedInit: this.regions() }, modal: { - topic: 'Изменение списка регионов для модерирования', + topic: 'Change the list of regions for moderation', initWidth: '900px', maxWidthRatio: 0.95, fullHeight: true, withScroll: true, - offIcon: { text: 'Отмена', click: this.closeRegionSelect, ctx: this }, + offIcon: { text: 'Cancel', click: this.closeRegionSelect, ctx: this }, btns: [ { - css: 'btn-success', text: 'Применить', glyphicon: 'glyphicon-ok', + css: 'btn-success', text: 'Apply', glyphicon: 'glyphicon-ok', click: function () { - var regions = this.regselectVM.getSelectedRegions(['cid', 'title_local']); + var regions = this.regselectVM.getSelectedRegions(['cid', 'title_en']); if (regions.length > 20) { window.noty({ - text: 'Допускается выбирать до 20 регионов', + text: 'Allowed to select up to 20 regions', type: 'error', layout: 'center', timeout: 3000, @@ -230,7 +230,7 @@ define(['underscore', 'Utils', 'socket!', 'Params', 'knockout', 'knockout.mappin }, ctx: this }, - { css: 'btn-warning', text: 'Отмена', click: this.closeRegionSelect, ctx: this } + { css: 'btn-warning', text: 'Cancel', click: this.closeRegionSelect, ctx: this } ] }, callback: function (vm) { @@ -256,7 +256,7 @@ define(['underscore', 'Utils', 'socket!', 'Params', 'knockout', 'knockout.mappin socket.once('setUserWatermarkChangeResult', function (result) { if (!result || result.error) { window.noty({ - text: result && result.message || 'Ошибка', + text: result && result.message || 'Error', type: 'error', layout: 'center', timeout: 4000, @@ -285,7 +285,7 @@ define(['underscore', 'Utils', 'socket!', 'Params', 'knockout', 'knockout.mappin socket.once('saveUserRanksResult', function (result) { if (!result || result.error || !result.saved) { window.noty({ - text: result && result.message || 'Ошибка сохранения звания', + text: result && result.message || 'Failed to save rank', type: 'error', layout: 'center', timeout: 4000, @@ -313,7 +313,7 @@ define(['underscore', 'Utils', 'socket!', 'Params', 'knockout', 'knockout.mappin socket.once('saveUserRulesResult', function (result) { if (!result || result.error || !result.saved) { window.noty({ - text: result && result.message || 'Ошибка сохранения звания', + text: result && result.message || 'Failed to save rank', type: 'error', layout: 'center', timeout: 4000, diff --git a/public/js/module/user/photoUpload.js b/public/js/module/user/photoUpload.js index abecfd57d..667911c82 100644 --- a/public/js/module/user/photoUpload.js +++ b/public/js/module/user/photoUpload.js @@ -6,14 +6,14 @@ define(['underscore', 'Browser', 'Utils', 'socket!', 'Params', 'knockout', 'knoc 'use strict'; var mess = { - fsuccess: 'Фотография успешно загружена', - fcount: 'Превышено разрешенное количество файлов', - - ftype: 'Тип файла не соответствует Правилам', - fmax: 'Файл больше разрешенного размера', - fmin: 'Файл слишком мал', - fpx: 'Согласно Правилам, размер изображения должен быть не менее 400px по каждой из сторон и не менее 800px по большей стороне', - finvalid: 'Файл не прошел валидацию' //Сообщение по умолчанию для валидации + fsuccess: 'Photo is successfully uploaded', + fcount: 'Allowed count of files exceeded', + + ftype: 'File type does not correspond to the Rules', + fmax: 'File is bigger then allowed', + fmin: 'File is too small', + fpx: 'According the rules, image size must be at least 400px on the smaller side and 800 on the larger side', + finvalid: 'The file has not passed validation' //Сообщение по умолчанию для валидации }; return Cliche.extend({ @@ -54,9 +54,9 @@ define(['underscore', 'Browser', 'Utils', 'socket!', 'Params', 'knockout', 'knoc this.canCount(this.canCountTotal); if (!this.canCount()) { - this.toptext('У вас нет свободных лимитов для загрузки файлов, так как вы имеете ' + this.u.pfcount() + ' неподтвержденных модератором фотографий. Это максимально разрешенное количество, установленное для вашего профиля.'); + this.toptext('You are out of limits for uploading photos, because you have ' + this.u.pfcount() + ' unconfirmed photos by moderator. It is maximum value for your profile type.'); } else { - this.toptext('Выберите фотографии, нажав на кнопку добавления' + (this.filereader() ? ' или перетащив их в пунктирную область' : '')); + this.toptext('Select photos by pushing add button' + (this.filereader() ? ' or draging them inside dashed area' : '')); this.canLoad(true); this.fileOptions = { @@ -172,7 +172,7 @@ define(['underscore', 'Browser', 'Utils', 'socket!', 'Params', 'knockout', 'knoc getLimit: function (cb, ctx) { socket.once('takeNewPhotosLimit', function (data) { if (!data || data.error) { - window.noty({text: 'Ошибка инициализации формы:' + data && data.message, type: 'error', layout: 'center', timeout: 4000, force: true}); + window.noty({text: 'Error form initialization:' + data && data.message, type: 'error', layout: 'center', timeout: 4000, force: true}); console.dir(data); } cb.call(ctx || window, data); @@ -253,7 +253,7 @@ define(['underscore', 'Browser', 'Utils', 'socket!', 'Params', 'knockout', 'knoc data.files.forEach(function (file, index) { file.ext.uploading(true); file.ext.uploaded(false); - this.setMessage(file, 'Пожалуйста подождите. Загрузка..', 'muted'); //Please wait. Loading.. + this.setMessage(file, 'Wait please. Loading..', 'muted'); //Please wait. Loading.. }, this); }, onFileSend: function (e, data) { @@ -300,7 +300,7 @@ define(['underscore', 'Browser', 'Utils', 'socket!', 'Params', 'knockout', 'knoc if (toSaveArr.length > 0) { socket.once('createPhotoCallback', function (data) { if (!data || data.error) { - window.noty({text: data && data.message || 'Ошибка создания фотографий', type: 'error', layout: 'center', timeout: 4000, force: true}); + window.noty({text: data && data.message || 'Failed to create photos', type: 'error', layout: 'center', timeout: 4000, force: true}); console.dir(data); } cb.call(ctx || window, data); @@ -366,7 +366,7 @@ define(['underscore', 'Browser', 'Utils', 'socket!', 'Params', 'knockout', 'knoc var that = this, options = this.fileOptions; - this.setMessage(file, 'Подготовка файла..', 'muted'); + this.setMessage(file, 'Preparing file..', 'muted'); loadImage( file, function (img) { diff --git a/public/js/module/user/settings.js b/public/js/module/user/settings.js index 479cbe7dc..8f3c3091e 100644 --- a/public/js/module/user/settings.js +++ b/public/js/module/user/settings.js @@ -210,8 +210,8 @@ define(['underscore', 'Utils', 'socket!', 'Params', 'knockout', 'knockout.mappin window.noty({ text: error ? data && data.message || 'Error occurred' : - warning ? 'Ни одной фотографии не отправлено на конвертацию' : - data.updated + ' фотографий отправлено на повторную конвертацию', + warning ? 'No photos are sent for conversion' : + data.updated + ' photos sent to the re-conversion', type: error ? 'error' : warning ? 'warning' : 'success', layout: 'center', timeout: 3000, @@ -235,10 +235,10 @@ define(['underscore', 'Utils', 'socket!', 'Params', 'knockout', 'knockout.mappin } noties.confirm({ - message: 'Вы уверены что хотите сбросить индивидуальные настройки подписи в фотографиях' + - (region ? ' указанного региона' : '') + '?', - okText: 'Да, сбросить', - cancelText: 'Отменить', + message: 'Are you sure you want to reset individual watermark settings on photos' + + (region ? ' in specified region' : '') + '?', + okText: 'Yes, reset', + cancelText: 'Cancel', onOk: function (confirmer) { socket.once('convertUserPhotosResult', function (data) { var error = !data || data.error; @@ -248,8 +248,8 @@ define(['underscore', 'Utils', 'socket!', 'Params', 'knockout', 'knockout.mappin window.noty({ text: error ? data && data.message || 'Error occurred' : - warning ? 'Не найдено ни одной фотографии с индивидуальными настройками подписи' : - 'У ' + data.updated + ' фотографий сброшены индивидуальные настройки подписи и они отправлены на повторную конвертацию', + warning ? 'There is no photos with custom watermark' : + 'Individual settings have been reset at ' + data.updated + ' photos and they were send to reconvert', type: error ? 'error' : warning ? 'warning' : 'success', layout: 'center', timeout: 3000, @@ -281,10 +281,10 @@ define(['underscore', 'Utils', 'socket!', 'Params', 'knockout', 'knockout.mappin } noties.confirm({ - message: 'Вы уверены что хотите сбросить индивидуальные настройки скачивания оргиналов фотографий' + - (region ? ' указанного региона' : '') + '?', - okText: 'Да, сбросить', - cancelText: 'Отменить', + message: 'Are you sure you want to reset individual download settings of photos' + + (region ? ' in specified region' : '') + '?', + okText: 'Yes, reset', + cancelText: 'Cancel', onOk: function (confirmer) { socket.once('resetIndividualDownloadOriginResult', function (data) { var error = !data || data.error; @@ -294,8 +294,8 @@ define(['underscore', 'Utils', 'socket!', 'Params', 'knockout', 'knockout.mappin window.noty({ text: error ? data && data.message || 'Error occurred' : - warning ? 'Не найдено ни одной фотографии с индивидуальными настройками скачивания' : - 'У ' + data.updated + ' фотографий сброшены индивидуальные настройки скачивания', + warning ? 'There is no photos with individual download settings' : + 'Individual download settings have been reset at ' + data.updated + ' photos', type: error ? 'error' : warning ? 'warning' : 'success', layout: 'center', timeout: 3000, @@ -463,16 +463,16 @@ define(['underscore', 'Utils', 'socket!', 'Params', 'knockout', 'knockout.mappin }, regionHomeSelect: function () { if (!this.regHomeselectVM) { - this.regionSelect([ko_mapping.toJS(this.u.regionHome)], 1, 1, 'Выбор домашнего региона', + this.regionSelect([ko_mapping.toJS(this.u.regionHome)], 1, 1, 'Home region selection', function (vm) { this.regHomeselectVM = vm; }, function () { - var regions = this.regHomeselectVM.getSelectedRegions(['cid', 'title_local']); + var regions = this.regHomeselectVM.getSelectedRegions(['cid', 'title_en']); if (regions.length !== 1) { window.noty({ - text: 'Необходимо выбрать один регион', + text: 'Necessary to choose only one region', type: 'error', layout: 'center', timeout: 2000, @@ -501,16 +501,16 @@ define(['underscore', 'Utils', 'socket!', 'Params', 'knockout', 'knockout.mappin }, regionFilterSelect: function () { if (!this.regselectVM) { - this.regionSelect(ko_mapping.toJS(this.u.regions), 0, 5, 'Изменение списка регионов для фильтрации по умолчанию', + this.regionSelect(ko_mapping.toJS(this.u.regions), 0, 5, 'List of regions for filtering by default', function (vm) { this.regselectVM = vm; }, function () { - var regions = this.regselectVM.getSelectedRegions(['cid', 'title_local']); + var regions = this.regselectVM.getSelectedRegions(['cid', 'title_en']); if (regions.length > 5) { window.noty({ - text: 'Допускается выбирать до 5 регионов', + text: 'Allowed to select up to 5 regions', type: 'error', layout: 'center', timeout: 3000, @@ -553,16 +553,16 @@ define(['underscore', 'Utils', 'socket!', 'Params', 'knockout', 'knockout.mappin maxWidthRatio: 0.95, fullHeight: true, withScroll: true, - offIcon: { text: 'Отмена', click: onCancel, ctx: ctx }, + offIcon: { text: 'Cancel', click: onCancel, ctx: ctx }, btns: [ { css: 'btn-success', - text: 'Применить', + text: 'Apply', glyphicon: 'glyphicon-ok', click: onApply, ctx: ctx }, - { css: 'btn-warning', text: 'Отмена', click: onCancel, ctx: ctx } + { css: 'btn-warning', text: 'Cancel', click: onCancel, ctx: ctx } ] }, callback: function (vm) { diff --git a/public/js/module/user/subscr.js b/public/js/module/user/subscr.js index 4238c0121..d806ce09a 100644 --- a/public/js/module/user/subscr.js +++ b/public/js/module/user/subscr.js @@ -73,9 +73,9 @@ define(['underscore', 'Utils', 'socket!', 'Params', 'knockout', 'knockout.mappin var count = this.types[this.type() + '_persist'](), txt = ''; if (count) { - txt = 'Показаны ' + this.pageFirstItem() + ' - ' + (this.pageLastItem() || this.pageSize()) + ' из ' + count; + txt = '' + this.pageFirstItem() + ' - ' + (this.pageLastItem() || this.pageSize()) + ' of ' + count + ' are shown'; } else { - txt = 'Пока нет подписок в данной категории'; + txt = 'Still has no subscription in this category'; } return txt; }, this); diff --git a/public/js/module/user/userPage.js b/public/js/module/user/userPage.js index abd2b616b..50f2d523b 100644 --- a/public/js/module/user/userPage.js +++ b/public/js/module/user/userPage.js @@ -53,18 +53,18 @@ define(['underscore', 'Utils', 'Params', 'renderer', 'knockout', 'knockout.mappi this.menuItems = this.co.menuItems = ko.computed(function () { var login = this.user.login(), result = [ - {name: 'Профиль', href: "/u/" + login, section: 'profile'}, - {name: 'Фотографии', href: "/u/" + login + "/photo", section: 'photo'}, - {name: 'Комментарии', href: "/u/" + login + "/comments", section: 'comments'} + {name: 'Profile', href: "/u/" + login, section: 'profile'}, + {name: 'Photos', href: "/u/" + login + "/photo", section: 'photo'}, + {name: 'Comments', href: "/u/" + login + "/comments", section: 'comments'} ]; if (this.auth.loggedIn() && (this.auth.iAm.login() === login || this.auth.iAm.role() > 9)) { - result.push({name: 'Подписки', href: "/u/" + login + "/subscriptions", section: 'subscriptions'}); - result.push({name: 'Настройки', href: "/u/" + login + "/settings", section: 'settings'}); + result.push({name: 'Subscriptions', href: "/u/" + login + "/subscriptions", section: 'subscriptions'}); + result.push({name: 'Settings', href: "/u/" + login + "/settings", section: 'settings'}); //result.push({name: 'Messages', href: "/u/" + login + '/pm', disable: true, section: 'pm'}); } if (this.auth.iAm.role() > 9) { - result.push({name: 'Управление', href: "/u/" + login + "/manage", section: 'manage'}); + result.push({name: 'Manage', href: "/u/" + login + "/manage", section: 'manage'}); } return result; }, this); @@ -192,22 +192,22 @@ define(['underscore', 'Utils', 'Params', 'renderer', 'knockout', 'knockout.mappi } else { moduleOptions.options.goUpload = true; //Если нет, говорим что надо открыть при загрузке галереи } - Utils.title.setTitle({pre: 'Загрузка - ', title: this.user.disp()}); + Utils.title.setTitle({pre: 'Upload - ', title: this.user.disp()}); } else { - Utils.title.setTitle({pre: 'Галерея - ', title: this.user.disp()}); + Utils.title.setTitle({pre: 'Gallery - ', title: this.user.disp()}); } } else if (section === 'comments') { module = 'm/user/comments'; - Utils.title.setTitle({pre: 'Комментарии - ', title: this.user.disp()}); + Utils.title.setTitle({pre: 'Comments - ', title: this.user.disp()}); } else if (section === 'subscriptions') { module = 'm/user/subscr'; - Utils.title.setTitle({pre: 'Подписки - ', title: this.user.disp()}); + Utils.title.setTitle({pre: 'Subscriptions - ', title: this.user.disp()}); } else if (section === 'settings') { module = 'm/user/settings'; - Utils.title.setTitle({pre: 'Настройки - ', title: this.user.disp()}); + Utils.title.setTitle({pre: 'Settings - ', title: this.user.disp()}); } else if (section === 'manage') { module = 'm/user/manage'; - Utils.title.setTitle({pre: 'Управление - ', title: this.user.disp()}); + Utils.title.setTitle({pre: 'Manage - ', title: this.user.disp()}); } this.section(section); diff --git a/public/js/noties.js b/public/js/noties.js index 3790cde4d..1a470c3a7 100644 --- a/public/js/noties.js +++ b/public/js/noties.js @@ -80,7 +80,7 @@ define(['underscore', 'jquery', 'Utils', 'Params'], function (_, $, Utils, P) { } }, { - addClass: 'btn btn-primary', text: params.cancelText || 'Отмена', onClick: function ($noty) { + addClass: 'btn btn-primary', text: params.cancelText || 'Cancel', onClick: function ($noty) { $noty.close(); params.onCancel && params.onCancel.call(params.ctx); } diff --git a/views/module/user/brief.jade b/views/module/user/brief.jade index bdcb1f150..9e9941f21 100644 --- a/views/module/user/brief.jade +++ b/views/module/user/brief.jade @@ -6,18 +6,18 @@ .avaLoadCurtain // /ko //ko if: canAva() - button.btn.btn-sm.btn-primary.avaEdit(data-bind="click: avaActionToggle, css: {disabled: avaexe()}, attr: {disabled: avaexe()}", title="Редактировать аватару") + button.btn.btn-sm.btn-primary.avaEdit(data-bind="click: avaActionToggle, css: {disabled: avaexe()}, attr: {disabled: avaexe()}", title="Edit avatar") span.glyphicon.glyphicon-pencil //ko if: avaction() .avaAction input.avaInput(type="file", name="files[]") - button.btn.btn-primary.avaSelect(data-bind="click: avaSelect, css: {disabled: avaexe()}, attr: {disabled: avaexe()}", title="Загрузить новое изображение") + button.btn.btn-primary.avaSelect(data-bind="click: avaSelect, css: {disabled: avaexe()}, attr: {disabled: avaexe()}", title="Upload new image") span.glyphicon.glyphicon-picture - | Сменить + | Change //ko if: avaExists() - button.btn.btn-primary.avaDel(data-bind="click: avaDel, css: {disabled: avaexe()}, attr: {disabled: avaexe()}", title="Удалить загруженное изображение") + button.btn.btn-primary.avaDel(data-bind="click: avaDel, css: {disabled: avaexe()}, attr: {disabled: avaexe()}", title="Remove image") span.glyphicon.glyphicon-remove - | Удалить + | Remove // /ko // /ko // /ko @@ -32,24 +32,24 @@ span.glyphicon.glyphicon-envelope span Send message .briefBlock - .head Общее + .head Common .h_separator table.briefTable tbody tr - td Регистрация: + td Registration: td(data-bind="text: moment(user.regdate()).format('D MMMM YYYY')") tr - td Статус: - td(data-bind="text: user.online() ? 'Онлайн' : 'Оффлайн', css: {online : user.online()}") + td Status: + td(data-bind="text: user.online() ? 'Online' : 'Offline', css: {online : user.online()}") .briefBlock - .head Краткая статистика + .head Brief statistics .h_separator table.briefTable tbody tr - td Фотографий: + td Photos: td(data-bind="text: user.pcount()") tr - td Комментариев: + td Comments: td(data-bind="text: user.ccount()") diff --git a/views/module/user/comments.jade b/views/module/user/comments.jade index 1f1424a11..cff472dea 100644 --- a/views/module/user/comments.jade +++ b/views/module/user/comments.jade @@ -1,10 +1,10 @@ .comments(data-bind="with: repository[M!M]") - h4(data-bind="text: itsMe()?'Ваши комментарии':'Комментарии пользователя'") + h4(data-bind="text: itsMe()?'Your comments':'User comments'") ul.nav.nav-tabs li(data-bind="css: {active: type() === 'photo'}") - a(data-bind="attr: {href: pageUrl()}, text: 'В фотографиях [' + types['photo_persist']() + ']'") + a(data-bind="attr: {href: pageUrl()}, text: 'For photos [' + types['photo_persist']() + ']'") li(data-bind="css: {active: type() === 'news'}") - a(data-bind="attr: {href: pageUrl() + '?type=news'}, text: 'В новостях [' + types['news_persist']() + ']'") + a(data-bind="attr: {href: pageUrl() + '?type=news'}, text: 'For news [' + types['news_persist']() + ']'") .navContent .row .col-xs-6.col-md-3.topcol @@ -23,7 +23,7 @@ a.commentStamp(data-bind="attr: {href: $data.link}, text: moment($data.stamp).calendar()") //ko if: $data.lastChanged .dotDelimeter · - .commentChanged(title="Показать историю изменений", data-bind="text: 'Изменен ' + moment($data.lastChanged).calendar().toLowerCase(), click: function () {$parent.showHistory($data.cid)}") + .commentChanged(title="Show history of changes", data-bind="text: 'Changed at ' + moment($data.lastChanged).calendar().toLowerCase(), click: function () {$parent.showHistory($data.cid)}") // /ko a.commentText(data-bind="attr: {href: $data.link}, html: $data.txt") | @@ -36,18 +36,18 @@ a.commentStamp(data-bind="attr: {href: $data.link}, text: moment($data.stamp).calendar()") //ko if: $data.lastChanged .dotDelimeter · - .commentChanged(title="Показать историю изменений", data-bind="text: 'Изменен ' + moment($data.lastChanged).calendar().toLowerCase(), click: function () {$parent.showHistory($data.cid)}") + .commentChanged(title="Show history of changes", data-bind="text: 'Changed at ' + moment($data.lastChanged).calendar().toLowerCase(), click: function () {$parent.showHistory($data.cid)}") // /ko a.commentText(style="margin-left:29px", data-bind="attr: {href: $data.link}, html: $data.txt") | | \ No newline at end of file diff --git a/views/module/user/manage.jade b/views/module/user/manage.jade index 0772547a8..11f9a963e 100644 --- a/views/module/user/manage.jade +++ b/views/module/user/manage.jade @@ -2,7 +2,7 @@ .panel-group#accordion .panel.panel-pastvu .panel-heading: .panel-title - a.accordion-toggle(data-toggle="collapse", href="#credentials") Полномочия + a.accordion-toggle(data-toggle="collapse", href="#credentials") Credentials .panel-collapse.collapse.in#credentials: .panel-body form .form-group @@ -13,58 +13,58 @@ .form-group: .col-xs-12 .checkbox: label input(type="checkbox", value = '5', data-bind="checked: role") - | Региональный:  + | Regions:  //ko if: !regions().length span.region span.glyphicon.glyphicon-globe - | Весь мир + | Whole world // /ko //ko foreach: regions - span.region.candrop(title="Убрать регион", data-bind="click: function() {$parent.regionDrop($data.cid);}") - span(data-bind="text: $data.title_local") + span.region.candrop(title="Remove region", data-bind="click: function() {$parent.regionDrop($data.cid);}") + span(data-bind="text: $data.title_en") // /ko span.regionEdit(data-bind="click: regionSelect") span.glyphicon.glyphicon-pencil - | Изменить + | Change .checkbox: label input(type="checkbox", disabled) - | Языковой + | Language // /ko //ko if: credentialsChanged() .form-group: .col-xs-12 button.btn.btn-sm.btn-success(type="button", data-bind="event: {click: saveCredentials}, attr: {disabled: exe()}") span.glyphicon.glyphicon-ok - | Сохранить полномочия + | Save credentials button.btn.btn-sm.btn-danger(type="button", data-bind="event: {click: cancelCredentials}, attr: {disabled: exe()}") span.glyphicon.glyphicon-remove - | Отмена + | Cancel // /ko .panel.panel-pastvu .panel-heading: .panel-title - a.accordion-toggle(data-toggle="collapse", href="#ranks") Ограничения + a.accordion-toggle(data-toggle="collapse", href="#ranks") Restrictions .panel-collapse.collapse.in#ranks: .panel-body dl.dl-horizontal dt.helpexists - abbr(title="Разрешать менять подпись на своих фотографиях и управлять настройками скачивания оригинала" + - " отправлять свои фотографии на переконвертацию") + abbr(title="Allow to change watermark on own photos and manage download of original settings," + + " send own photos to reconvert") span.glyphicon.glyphicon-info-sign - | Может менять вотермарк и правила скачивания + | Can change watermark and download origin settings dd .btn-group.btn-group-sm - button.btn.btn-primary.yes(type="button", data-bind="css: {active: !u.nowaterchange()}, click: changewaterchange") Да - button.btn.btn-primary.no(type="button", data-bind="css: {active: u.nowaterchange()}, click: changewaterchange") Нет + button.btn.btn-primary.yes(type="button", data-bind="css: {active: !u.nowaterchange()}, click: changewaterchange") Yes + button.btn.btn-primary.no(type="button", data-bind="css: {active: u.nowaterchange()}, click: changewaterchange") No p.text-muted(style="padding:6px 0 0 6px;line-height:1.1;font-size:11px;") sup(style="margin-left:-6px;") * - | Это глобальная настройка для пользователя, действующая на возможность изменения им соответствующих настроек в профиле и индивидуальных настроек в каждой фотографии. При этом в каждой фотографии можно запретить/разрешить это индивидуально + | This is a global setting for the user, affecting on the possibility of changing settings in their profile and individual settings for each photo. For each photo it can disable/enable it individually .panel.panel-pastvu .panel-heading: .panel-title - a.accordion-toggle(data-toggle="collapse", href="#ranks") Специальные настройки + a.accordion-toggle(data-toggle="collapse", href="#ranks") Special settings .panel-collapse.collapse.in#ranks: .panel-body - .setTitle Присваиваемые звания + .setTitle Assigned ranks form: .form-group //ko foreach: ranks label.checkbox-inline @@ -72,17 +72,17 @@ span(data-bind="text: $data.desc") // /ko - .setTitle Лимит количества неподтвержденных фотографий - div(data-bind="html: 'Действующая настройка: '+photoNewLimitOrigin()+''", style="margin-bottom: 2px;") - .calcInfo(data-bind="html: 'Доступный лимит: '+photoNewCan()+''") - .calcInfo(data-bind="html: 'Всего неподтвержденных: '+u.pfcount()+''") - .calcInfo(data-bind="html: 'Всего опубликованных: '+u.pcount()+''") + .setTitle Limit of unconfirmed photos + div(data-bind="html: 'Current setting: '+photoNewLimitOrigin()+''", style="margin-bottom: 2px;") + .calcInfo(data-bind="html: 'Available limit: '+photoNewCan()+''") + .calcInfo(data-bind="html: 'Total unconfirmed: '+u.pfcount()+''") + .calcInfo(data-bind="html: 'Total published: '+u.pcount()+''") form.form-inline(style="margin-top: 7px;"): .form-group .radio: label.radio-inline input(type="radio", value="auto", name="photo_new_radios", data-bind="checked: photoNewLimitOption") - | Авто + | Auto .radio: label.radio-inline input(type="radio", value="manual", name="photo_new_radios", data-bind="checked: photoNewLimitOption") - | Вручную + | Manual .form-group - input.form-control.input-sm.photoLimit(type="text", title="Число от 0 до 10000", maxlength="5", pattern="[0-9]{1,5}", data-bind="value: photoNewLimit, valueUpdate: 'keyup', attr: {disabled: photoNewLimitOption() === 'auto'}, css: {}") \ No newline at end of file + input.form-control.input-sm.photoLimit(type="text", title="A number between 0 and 10000", maxlength="5", pattern="[0-9]{1,5}", data-bind="value: photoNewLimit, valueUpdate: 'keyup', attr: {disabled: photoNewLimitOption() === 'auto'}, css: {}") \ No newline at end of file diff --git a/views/module/user/photoUpload.jade b/views/module/user/photoUpload.jade index 59819e0b2..7077b32ab 100644 --- a/views/module/user/photoUpload.jade +++ b/views/module/user/photoUpload.jade @@ -6,25 +6,25 @@ //ko if: canLoad() .warn(style="font-size: 12px; color: #A57A30;") - | Согласно  - a(href="/news/95", target="_blank") Правилам - | , к публикации будут допущены фотографии: + | According  + a(href="/news/95", target="_blank") the Rules + | , these kind of photos will be allowed for publishing: br - | Снятые до 2000 года включительно, имеющие историческую ценность и отображающие объект съемки в уникальном ракурсе или времени + | Filmed up to 2000 year, having historical value and display the subject in a unique angle or time form.uploadForm(method="POST", enctype="multipart/form-data") #addFiles input.fileInput(type="file", name="files[]", accept="image/*", multiple) button.btn.btn-primary.fileSelect(data-bind="click: selectFile") span.glyphicon.glyphicon-plus - | Добавить... + | Add... .addfiles_area.centering_content(data-bind="css: {hide: !filereader()}") - #or.centering_content или - span Перетащите фотографии сюда + #or.centering_content or + span Drag photo here #dropzone //-Отображаем возможное кол-во к загрузке, если менее 50 разрешено //ko if: canCount() < 50 - .canCount(data-bind="text: 'Вы можете добавить еще ' + canCount() + ' фото'") + .canCount(data-bind="text: 'You can add another ' + canCount() + ' photos'") // /ko div(data-bind="style: {display: fileList().length > 0 ? '' : 'none'}") @@ -33,14 +33,14 @@ .progress-bar(data-bind="style: {width: fileProgressAll() + '%'}") .extText(data-bind="text: fileProgressAllText()") table.table.table-striped.table-hover.filesTable - caption Добавленные фотографии + caption Added photos tbody //ko foreach: fileList tr td.preview div.forcanvas(data-bind="attr: {'data-fileuid': ext.uid}, css: {noValid: !ext.valid, tooBig: ext.tooBigPreview}") //ko if: ext.tooBigPreview - .msg Слишком большая для превью + .msg Too big for preview // /ko td.desc div(data-bind="text: name") @@ -56,10 +56,10 @@ //ko if: ext.valid && !$parent.options.auto && !ext.uploaded() button.btn.btn-success(data-bind="click: function () {$parent.startFile($data)}, css: {disabled: ext.uploading()}, attr: {disabled: ext.uploading()}") span.glyphicon.glyphicon-upload - | Загрузить + | Upload // /ko button.btn(data-bind="click: function () {$parent.cancelFile($data)}, css: {'btn-warning': !ext.uploaded(), 'btn-danger': ext.uploaded()}") span.glyphicon(data-bind="css: {'glyphicon-ban-circle': !ext.uploaded(), 'glyphicon-remove-circle': ext.uploaded()}") - span(data-bind="text: ext.uploaded() ? ' Удалить' : ' Отменить'") + span(data-bind="text: ext.uploaded() ? ' Remove' : ' Cancel'") // /ko // /ko \ No newline at end of file diff --git a/views/module/user/profile.jade b/views/module/user/profile.jade index 4aeb4de14..4ba54f156 100644 --- a/views/module/user/profile.jade +++ b/views/module/user/profile.jade @@ -1,40 +1,40 @@ .user_profile(data-bind="with: repository[M!M]") form.form-horizontal(data-bind="css: {canBeEdit: canBeEdit(), cannotBeEdit: !canBeEdit()}") .form-group - label.col-sm-3.col-md-2.control-label(for="inName") Псевдоним + label.col-sm-3.col-md-2.control-label(for="inName") Username .col-sm-9.col-md-9 p.form-control-static span.glyphicon.glyphicon-user span.loginName(data-bind="text: ' ' + u.login()") .form-group(data-bind="style: {display: canBeEdit() || u.firstName().length || u.lastName().length > 0 ? '' : 'none'}") - label.col-sm-3.col-md-2.control-label(for="inName") Реальное имя + label.col-sm-3.col-md-2.control-label(for="inName") Real name .col-sm-3.col-md-2 input.form-control(type="text", id="inName", data-bind="attr: {size: u.firstName().length, disabled: !editMode()}, value: u.firstName, valueUpdate: 'afterkeydown'") .col-sm-3.col-md-2 input.form-control(type="text", id="inLastName", data-bind="attr: {disabled: !editMode()}, value: u.lastName, valueUpdate: 'afterkeydown'") .form-group - label.col-sm-3.col-md-2.control-label(for="inBirthdate") Дата рождения + label.col-sm-3.col-md-2.control-label(for="inBirthdate") Birthdate .col-sm-3.col-md-2 input#inBirthdate.form-control(type="text", data-bind="attr: {disabled: !editMode()}, value: u.birthdate, valueUpdate: 'keyup'") .form-group - label.col-sm-3.col-md-2.control-label(for="inSex2") Пол + label.col-sm-3.col-md-2.control-label(for="inSex2") Gender .col-sm-4.col-md-3 input.form-control(type="text", id="inSex2", disabled, data-bind="style: {display: (!canBeEdit() ? '' : 'none')}, value: u.sex()=='m' ? 'Male' : 'Female'") div(data-bind="style: {display: canBeEdit() ? '' : 'none'}") label.radio-inline - input(type="radio", id='inSex', name="sex", value="m", data-bind="checked: u.sex, attr: {disabled: !editMode()}") - |  Мужчина + input(type="radio", name="sex", value="m", data-bind="checked: u.sex, attr: {disabled: !editMode()}") + |  Male label.radio-inline - input(type="radio", id='inSex', name="sex", value="f", data-bind="checked: u.sex, attr: {disabled: !editMode()}") - |  Женщина + input(type="radio", name="sex", value="f", data-bind="checked: u.sex, attr: {disabled: !editMode()}") + |  Female .form-group(data-bind="style: {display: canBeEdit() || u.country().length || u.city().length > 0 ? '' : 'none'}") - label.col-sm-3.col-md-2.control-label(for="inResidence") Резиденция + label.col-sm-3.col-md-2.control-label(for="inResidence") Residence .col-sm-3.col-md-2 input.form-control(type="text", id='inResidence', data-bind="attr: {disabled: !editMode()}, size: u.country().length, value: u.country, valueUpdate: 'afterkeydown'") .col-sm-3.col-md-2 input.form-control(type="text", id="inResidence2", data-bind="attr: {disabled: !editMode()}, value: u.city, valueUpdate: 'afterkeydown'") .form-group(data-bind="style: {display: canBeEdit() || u.work().length > 0 ? '' : 'none'}") - label.col-sm-3.col-md-2.control-label(for="inInterested") Деятельность + label.col-sm-3.col-md-2.control-label(for="inInterested") Occupation .col-sm-3.col-md-2 input.form-control(type="text", id='inInterested', data-bind="attr: {disabled: !editMode()}, value: u.work, valueUpdate: 'afterkeydown'") .form-group(data-bind="style: {display: canBeEdit() || u.www().length > 0 ? '' : 'none'}") @@ -42,7 +42,7 @@ .col-sm-3.col-md-2 input.form-control(type="text", id='inWebsite', data-bind="attr: {disabled: !editMode()}, value: u.www, valueUpdate: 'afterkeydown'") .form-group(data-bind="style: {display: canBeEdit() || u.lj().length > 0 ? '' : 'none'}") - label.col-sm-3.col-md-2.control-label(for="inLJ") ЖЖ + label.col-sm-3.col-md-2.control-label(for="inLJ") LJ .col-sm-3.col-md-2 input.form-control(type="text", id='inLJ', data-bind="attr: {disabled: !editMode()}, value: u.lj, valueUpdate: 'afterkeydown'") .form-group(data-bind="style: {display: canBeEdit() || u.skype().length > 0 ? '' : 'none'}") @@ -66,14 +66,14 @@ .col-sm-3.col-md-2 input.form-control(type="text", id='inBlogger', data-bind="attr: {disabled: !editMode()}, value: u.blogger, valueUpdate: 'afterkeydown'") .form-group(data-bind="style: {display: canBeEdit() || u.aboutme().length > 0 ? '' : 'none'}") - label.col-sm-3.col-md-2.control-label(for="inaboutme") Обо мне + label.col-sm-3.col-md-2.control-label(for="inaboutme") About me .col-sm-7.col-md-8 textarea.form-control(rows="4", id='inaboutme', data-bind="attr: {disabled: !editMode()}, value: u.aboutme, valueUpdate: 'afterkeydown'") .form-group(data-bind="style: {display: canBeEdit() ? '' : 'none'}") .col-sm-12 button.btn.btn-primary(type="button", data-bind="css: {'btn-success': editMode()}, event: {click: function(data, event) { if (!data.editMode()){data.edit(true)} else{data.saveUser()}}}") span.glyphicon(data-bind="css: {'glyphicon-pencil': !editMode(), 'glyphicon-ok': editMode()}") - span(data-bind="text: editMode() ? ' Сохранить профиль' : ' Редактировать'") + span(data-bind="text: editMode() ? ' Save profile' : ' Edit'") button.btn.btn-danger(type="button", data-bind="style: {display: editMode() ? '' : 'none'}, event: {click: function(data, event) { if (data.editMode()) {data.cancelUser()}}}") span.glyphicon.glyphicon-remove - | Отмена \ No newline at end of file + | Cancel \ No newline at end of file diff --git a/views/module/user/settings.jade b/views/module/user/settings.jade index ab799e712..1e696b813 100644 --- a/views/module/user/settings.jade +++ b/views/module/user/settings.jade @@ -1,9 +1,9 @@ .user_settings(data-bind="with: repository[M!M]"): .panel-group#accordion .panel.panel-pastvu - .panel-heading: .panel-title: a(data-toggle="collapse", href="#privacy") Конфиденциальность + .panel-heading: .panel-title: a(data-toggle="collapse", href="#privacy") Privacy .panel-collapse.collapse.in#privacy: .panel-body dl.dl-horizontal - dt Мой email + dt My email dd: .row: .col-xs-9.col-sm-10.col-md-7.col-lg-4 .input-group input.form-control(type="email", data-bind="attr: {size: u.email().length, disabled: !editEmail()}, value: u.email, valueUpdate: 'afterkeydown', executeOnEnter: saveEmail") @@ -14,148 +14,146 @@ span.glyphicon.glyphicon-remove // /ko dl.dl-horizontal - dt Мой пароль + dt My password dd //ko if: itsMe() - button.btn.btn-sm.btn-primary(type="button", title="Сменить текущий пароль", data-bind="event:{click: function(data, evt){auth.show('passChange')}}") - span Сменить + button.btn.btn-sm.btn-primary(type="button", title="Change current password", data-bind="event:{click: function(data, evt){auth.show('passChange')}}") + span Change // /ko - button.btn.btn-sm.btn-primary(type="button", title="Сменить через почту без ввода текущего", data-bind="event:{click: function(data, evt){auth.showRecallRequest(u.login())}}") - span Запросить смену + button.btn.btn-sm.btn-primary(type="button", title="Change through email without entering current", data-bind="event:{click: function(data, evt){auth.showRecallRequest(u.login())}}") + span Request change dl.dl-horizontal - dt Показывать в обсуждениях реальное имя + dt Show real name in conversations dd: .btn-group.btn-group-sm - button.btn.btn-primary.yes(type="button", data-bind="css: {active: showName()}, click: toggleDisp") Да - button.btn.btn-primary.no(type="button", data-bind="css: {active: !showName()}, click: toggleDisp") Нет + button.btn.btn-primary.yes(type="button", data-bind="css: {active: showName()}, click: toggleDisp") Yes + button.btn.btn-primary.no(type="button", data-bind="css: {active: !showName()}, click: toggleDisp") No .panel.panel-pastvu - .panel-heading: .panel-title: a(data-toggle="collapse", href="#region") Регионы + .panel-heading: .panel-title: a(data-toggle="collapse", href="#region") Regions .panel-collapse.collapse.in#region: .panel-body dl.dl-horizontal dt.helpexists - abbr(title="Регион, который определяет некоторые настройки, например, позицию кнопки Домой на карте, первый элемент в списке выбора регионов и т.д.") + abbr(title="Region, which affect on some settings, for example, region of Home button on map, first element on list of regions etc.") span.glyphicon.glyphicon-info-sign |   span.glyphicon.glyphicon-home - | Домашний регион + | Home region dd span.region - span(data-bind="text: u.regionHome.title_local()") + span(data-bind="text: u.regionHome.title_en()") span.regionEdit(data-bind="click: regionHomeSelect") span.glyphicon.glyphicon-pencil - | Изменить + | Change //ko if: u.role() === 5 && u.mod_regions() dl.dl-horizontal.forMod dt.helpexists - abbr(title="Регионы, в которых вы являетесь модератором. Назначаются администратором") + abbr(title="Regions, where you are moderator. Assigned by administrator") span.glyphicon.glyphicon-info-sign - | Модерируемые мной регионы + | Regions where I'm moderator dd //ko if: !u.mod_regions().length span.region span.glyphicon.glyphicon-globe - | Весь мир + | Whole world // /ko //ko foreach: u.mod_regions span.region - span(data-bind="text: $data.title_local()") + span(data-bind="text: $data.title_en)") // /ko // /ko dl.dl-horizontal dt.helpexists - abbr(title="Регионы, по которым будет производится автоматическая фильтрация контента") + abbr(title="Regions, which define automatic content filtration") span.glyphicon.glyphicon-info-sign |   span.glyphicon.glyphicon-filter - | Фильтрация данных по умолчанию + | Filter by default dd: span.panel-block .radio(style="margin-top:0"): label input(type="radio", name="regfilter_radios", value="all", data-bind="checked: regfiltercheck") span.glyphicon.glyphicon-globe - | Весь мир (без фильтра) + | Whole world (no filter) .radio: label input(type="radio", name="regfilter_radios", value="home", data-bind="checked: regfiltercheck") span.glyphicon.glyphicon-home - | Домашний регион + | Home region .radio(style="margin-bottom:5px"): label input(type="radio", name="regfilter_radios", value="list", data-bind="checked: regfiltercheck") span.glyphicon.glyphicon-list - span Список + span List //ko if: regfiltercheck() === 'list' | :  //ko foreach: u.regions - span.region.candrop(title="Убрать из моих регионов", data-bind="click: function() {$parent.regionDrop($data.cid());}") - span(data-bind="text: $data.title_local()") + span.region.candrop(title="Remove from my regions", data-bind="click: function() {$parent.regionDrop($data.cid());}") + span(data-bind="text: $data.title_en()") // /ko //ko if: u.regions().length span.regionEdit(data-bind="click: regionFilterSelect") span.glyphicon.glyphicon-pencil - | Изменить + | Change // /ko // /ko dl.dl-horizontal dt.helpexists(style="color: #27578d;") - | По умолчанию фильтровать по выбранным регионам: + | Filter by default with selected regions: dd dl.dl-horizontal.dl-tight dt.helpexists - abbr(title="Фотографии пользователей, доступые в соответствующих профилях") + abbr(title="Photos which located in users profile") span.glyphicon.glyphicon-info-sign - | Галереи пользователей + | Users photos dd .btn-group.btn-group-sm - button.btn.btn-primary.yes(type="button", data-bind="css: {active: u.settings.r_f_user_gal()}, click: regionUserGal") Да - button.btn.btn-primary.no(type="button", data-bind="css: {active: !u.settings.r_f_user_gal()}, click: regionUserGal") Нет + button.btn.btn-primary.yes(type="button", data-bind="css: {active: u.settings.r_f_user_gal()}, click: regionUserGal") Yes + button.btn.btn-primary.no(type="button", data-bind="css: {active: !u.settings.r_f_user_gal()}, click: regionUserGal") No dl.dl-horizontal.dl-tight dt.helpexists - abbr(title="Полоса фотографий, находящаяся рядом с именем пользователя, на странице просмотра загруженной им фотогафии") + abbr(title="Strip, which located close to user avatar on photo page") span.glyphicon.glyphicon-info-sign - | Полосу других фотографий пользователя + | Strip of other user's photos dd .btn-group.btn-group-sm - button.btn.btn-primary.yes(type="button", data-bind="css: {active: u.settings.r_f_photo_user_gal()}, click: regionPhotoUserGal") Да - button.btn.btn-primary.no(type="button", data-bind="css: {active: !u.settings.r_f_photo_user_gal()}, click: regionPhotoUserGal") Нет + button.btn.btn-primary.yes(type="button", data-bind="css: {active: u.settings.r_f_photo_user_gal()}, click: regionPhotoUserGal") Yes + button.btn.btn-primary.no(type="button", data-bind="css: {active: !u.settings.r_f_photo_user_gal()}, click: regionPhotoUserGal") No .panel.panel-pastvu - .panel-heading: .panel-title: a(data-toggle="collapse", href="#photo") Фотографии + .panel-heading: .panel-title: a(data-toggle="collapse", href="#photo") Photos .panel-collapse.collapse.in#photo: .panel-body dl.dl-horizontal dt.helpexists - abbr(title="Показывать по умолчанию вотермарк pastvu.com, встроенный в изображение") + abbr(title="Show pastvu.com watermark by default, embedded in image") span.glyphicon.glyphicon-info-sign - | Показывать вотермарк фотографии + | Show watermark by default dd .btn-group.btn-group-sm - button.btn.btn-primary.yes(type="button", data-bind="css: {active: u.settings.photo_show_watermark()}, click: watermarkShow") Да - button.btn.btn-primary.no(type="button", data-bind="css: {active: !u.settings.photo_show_watermark()}, click: watermarkShow") Нет + button.btn.btn-primary.yes(type="button", data-bind="css: {active: u.settings.photo_show_watermark()}, click: watermarkShow") Yes + button.btn.btn-primary.no(type="button", data-bind="css: {active: !u.settings.photo_show_watermark()}, click: watermarkShow") No //ko if: u.nowaterchange() dl.dl-horizontal: .helpexists: abbr.text-danger span.glyphicon.glyphicon-warning-sign - span(data-bind="text: ' Администратор запретил ' + (itsMe()?'вам':'пользователю') + ' управлять настройками установки подписи на ' + (itsMe()?'ваших':'его') + ' фотографиях'") + span(data-bind="text: ' Administrator has forbidden ' + (itsMe()?'you':'user') + ' to change watermark settings on ' + (itsMe()?'your':'his') + ' photos'") // /ko .watersingcontrol(data-bind="css: {deny: itsMe() && u.nowaterchange()}") dl.dl-horizontal dt.helpexists - abbr(title="Поведение можно менять для каждой отдельной фотографии на странице её редактирования") + abbr(title="Behavior can be changed for each photo individually on edit page") span.glyphicon.glyphicon-info-sign - | Подпись на вотермарке - br - | загружаемых мной фотографий + | Text on watermark on my photos dd: span.panel-block .btn-group.btn-group-sm(style="margin-bottom:8px") - button.btn.btn-primary.yes(type="button", data-bind="css: {active: !!u.settings.photo_watermark_add_sign()}, click: watersignAdd") Да - button.btn.btn-primary.no(type="button", data-bind="css: {active: !u.settings.photo_watermark_add_sign()}, click: watersignAdd") Нет + button.btn.btn-primary.yes(type="button", data-bind="css: {active: !!u.settings.photo_watermark_add_sign()}, click: watersignAdd") Yes + button.btn.btn-primary.no(type="button", data-bind="css: {active: !u.settings.photo_watermark_add_sign()}, click: watersignAdd") No br // ko if: !!u.settings.photo_watermark_add_sign() .radio(style="margin-top:3px"): label input(type="radio", name="watersign", value="true", data-bind="checked: watersigncheck") - | Настройки системы ( + | System settings ( span(style="color:#777", data-bind="text: 'uploaded by ' + u.login()") | ) .radio(style="margin-top:0"): .input-group(style="max-width:500px") input(type="radio", name="watersign", value="custom", data-bind="checked: watersigncheck") - span.input-group-addon Текст + span.input-group-addon Text input.form-control(type="text", data-bind="attr: {disabled: watersigncheck()!=='custom'}, value: u.watersignCustom, symbols: {pattern:fields.watersignPattern,watch:u.watersignCustom,noMultiplySpace:true,maxLength:fields.watersignLength}, valueUpdate: 'input', executeOnEnter: watermarkCustomSave") span.input-group-addon.action.save(data-bind="style: {visibility: watersignCustomChanged() ? 'visible' : 'hidden'}, click: watermarkCustomSave") span.glyphicon.glyphicon-ok @@ -164,91 +162,89 @@ // /ko p.text-muted(style="padding-left:8px;line-height:1.1;font-size:11px;") sup(style="margin-left:-6px;") * - | Настройка сохраняется автоматически и будет применена ко всем вновь загружаемым фотографиям. Чтобы применить ее к существующим фотографиям, нажмите "применить" ниже + | Setting saves automatically and will be applied to all newly uploaded photos. To apply it to existing photos, push "Apply" below hr(style="margin:8px 0 9px;") - abbr(title="Отправить на переконвертацию свои фотографии, в которых подпись на вотермарке берется из текущих настроек профиля") - | Применить настройку к загруженным фотографиям, в которых нет индивидульных настроек подписи: + abbr(title="Send to reconvert own photos, which have no individual watermark setting") + | Apply setting to existing photos, which have no individual watermark setting: div label.radio-inline input(type="radio", name="reconvert", value="all", data-bind="checked: reconvertcheck") - | Все + | All label.radio-inline input(type="radio", name="reconvert", value="region", data-bind="checked: reconvertcheck") span - | В регионе - input.form-control(id="reconvertRegion", data-bind="attr: {disabled: reconvertcheck()!=='region'}", style="display:inline-block;margin-left:6px;width:180px;", type="number", placeholder="Введите номер региона", maxlength="6") - button.btn.btn-sm.btn-primary(type="button", style="margin: 5px 0 8px;", data-bind="click: reconvertPhotos, attr: {disabled: reconvertingPhotos()}") Применить + | Within region + input.form-control(id="reconvertRegion", data-bind="attr: {disabled: reconvertcheck()!=='region'}", style="display:inline-block;margin-left:6px;width:180px;", type="number", placeholder="Type region id", maxlength="6") + button.btn.btn-sm.btn-primary(type="button", style="margin: 5px 0 8px;", data-bind="click: reconvertPhotos, attr: {disabled: reconvertingPhotos()}") Apply hr(style="margin:8px 0 9px;") - abbr(title="Сбросить установленные индивидульные настройки подписи в фотографиях (если такие устанавливались)") - | Сбросить установленные в фотографиях индивидульные настройки подписи + abbr(title="Reset individual watermark settings") + | Reset individual watermark settings div label.radio-inline input(type="radio", name="resetwatersign", value="all", data-bind="checked: resetwatersigncheck") - | Все + | All label.radio-inline input(type="radio", name="resetwatersign", value="region", data-bind="checked: resetwatersigncheck") span - | В регионе - input.form-control(id="resetwatersignRegion", data-bind="attr: {disabled: resetwatersigncheck()!=='region'}", style="display:inline-block;margin-left:6px;width:180px;", type="number", placeholder="Введите номер региона", maxlength="6") + | Within region + input.form-control(id="resetwatersignRegion", data-bind="attr: {disabled: resetwatersigncheck()!=='region'}", style="display:inline-block;margin-left:6px;width:180px;", type="number", placeholder="Type region id", maxlength="6") button.btn.btn-sm.btn-primary(type="button", style="margin: 5px 0 8px;", data-bind="click: individualWatersignReset, attr: {disabled: reconvertingPhotos()}") Сбросить p.text-muted(style="padding-left:8px;line-height:1.1;font-size:11px;") sup(style="margin-left:-6px;") * - | Фотографиям будет установлена настройка подписи по умолчанию, указанная выше. Эти фотографии будут отправлены на переконвертацию автоматически + | Photos will receive setting by default, which specified above. This photos will be reconverted automatically dl.dl-horizontal dt.helpexists - abbr(title="Другие зарегистрированные пользователи смогут скачивать оригиналы ваших фотографий") + abbr(title="Another registered users will be able to download file that you uploaded") span.glyphicon.glyphicon-info-sign - | Разрешать скачивать оригинал - br - | моих фотографий + | Allow to download origin of my photos dd: span.panel-block .btn-group.btn-group-sm(style="margin-bottom:8px") - button.btn.btn-primary.yes(type="button", data-bind="attr: {disabled: !u.settings.photo_watermark_add_sign()}, css: {active: !u.settings.photo_watermark_add_sign() || !u.settings.photo_disallow_download_origin()}, click: disallowDownloadOrigin") Да - button.btn.btn-primary.no(type="button", data-bind="attr: {disabled: !u.settings.photo_watermark_add_sign()}, css: {active: !!u.settings.photo_watermark_add_sign() && !!u.settings.photo_disallow_download_origin()}, click: disallowDownloadOrigin") Нет + button.btn.btn-primary.yes(type="button", data-bind="attr: {disabled: !u.settings.photo_watermark_add_sign()}, css: {active: !u.settings.photo_watermark_add_sign() || !u.settings.photo_disallow_download_origin()}, click: disallowDownloadOrigin") Yes + button.btn.btn-primary.no(type="button", data-bind="attr: {disabled: !u.settings.photo_watermark_add_sign()}, css: {active: !!u.settings.photo_watermark_add_sign() && !!u.settings.photo_disallow_download_origin()}, click: disallowDownloadOrigin") No p.text-muted(style="padding-left:8px;line-height:1.1;font-size:11px;") sup(style="margin-left:-6px;") * - | Запретить скачивать оригинал можно только в случае наличия подписи на вотермарке фотографии + | Disallowance of downloading original can be established only for photo that has text on watermark p.text-muted(style="padding-left:8px;line-height:1.1;font-size:11px;") sup(style="margin-left:-6px;") * - | Для других пользователей кнопка скачивания фотографии будет окрашена в зеленый цвет, если скачивание оригинала разрешено. Вы всегда сможете скачивать оригиналы своих фотографий, а если другие пользователи не могут этого делать согласно вашей настройке, то для вас кнопка скачивания будет синей с зеленой стрелкой + | For another users download button will be green, if original download is allowed. You always will be able to download original file of your photos, if other users can't do it, button will be blue with green arrow hr(style="margin:8px 0 9px;") - | Сбросить установленные в фотографиях индивидульные настройки разрешения на скачивание + | Reset individual settings about downloading original photo div label.radio-inline input(type="radio", name="disallowDownloadOrigin", value="all", data-bind="checked: resetDisallowDownloadOrigin") - | Все + | All label.radio-inline input(type="radio", name="disallowDownloadOrigin", value="region", data-bind="checked: resetDisallowDownloadOrigin") span - | В регионе - input.form-control(id="resetDisallowDownloadOriginRegion", data-bind="attr: {disabled: resetDisallowDownloadOrigin()!=='region'}", style="display:inline-block;margin-left:6px;width:180px;", type="number", placeholder="Введите номер региона", maxlength="6") - button.btn.btn-sm.btn-primary(type="button", style="margin: 5px 0 8px;", data-bind="click: individualDisallowDownloadOriginReset, attr: {disabled: reconvertingPhotos()}") Сбросить + | In region + input.form-control(id="resetDisallowDownloadOriginRegion", data-bind="attr: {disabled: resetDisallowDownloadOrigin()!=='region'}", style="display:inline-block;margin-left:6px;width:180px;", type="number", placeholder="Type region id", maxlength="6") + button.btn.btn-sm.btn-primary(type="button", style="margin: 5px 0 8px;", data-bind="click: individualDisallowDownloadOriginReset, attr: {disabled: reconvertingPhotos()}") Reset p.text-muted(style="padding-left:8px;line-height:1.1;font-size:11px;") sup(style="margin-left:-6px;") * - | В каждой фотографии вы можете устанавливать разрешение на скачивание индивидуально. Здесь вы можете сбросить индивидуальную настройку в этих фотографиях и к ним будет применена общая, указанная выше + | For each photo you can set allowance of downloading original individually. Here you can reset such individual settings and common setting, specified above, will be applied to them .panel.panel-pastvu - .panel-heading: .panel-title: a(data-toggle="collapse", href="#notice") Подписка и уведомления + .panel-heading: .panel-title: a(data-toggle="collapse", href="#notice") Subscription and notification .panel-collapse.collapse.in#notice: .panel-body dl.dl-horizontal dt.helpexists - abbr(title="Исходное состояние опции «Подписаться на тему» при отправке комментария") + abbr(title="Default state of «Subscribe» checkbox at comment writing form") span.glyphicon.glyphicon-info-sign - | Автоподписка при комментировании темы + | Automatic subscription when comment topic dd .btn-group.btn-group-sm - button.btn.btn-primary.yes(type="button", data-bind="css: {active: u.settings.subscr_auto_reply()}, click: autoReply") Да - button.btn.btn-primary.no(type="button", data-bind="css: {active: !u.settings.subscr_auto_reply()}, click: autoReply") Нет + button.btn.btn-primary.yes(type="button", data-bind="css: {active: u.settings.subscr_auto_reply()}, click: autoReply") Yes + button.btn.btn-primary.no(type="button", data-bind="css: {active: !u.settings.subscr_auto_reply()}, click: autoReply") No dl.dl-horizontal dt.helpexists - abbr(title="Минимальное время, которое должно пройти между отправками писем с уведомлением") + abbr(title="Minimal amount of time between sending of notification letter") span.glyphicon.glyphicon-info-sign - | Минимальный интервал между отправками + | Minimum interval between sending dd.throttle(data-bind="foreach: vars.subscr_throttle") label.radio-inline input(type="radio", name="subscr_throttle_radios", data-bind="attr: {id: 'subscr_throttle_radios_' + $index(), value: ''+$data}, checked: $parent.u.settings.subscr_throttle") - span(data-bind="text: ($data/60000 > 59 ? $data/3600000 + 'ч' : $data/60000 + 'мин')") \ No newline at end of file + span(data-bind="text: ($data/60000 > 59 ? $data/3600000 + 'h' : $data/60000 + 'm')") \ No newline at end of file diff --git a/views/module/user/subscr.jade b/views/module/user/subscr.jade index 1b78a1995..c5dec3f65 100644 --- a/views/module/user/subscr.jade +++ b/views/module/user/subscr.jade @@ -1,16 +1,16 @@ .subscr(data-bind="with: repository[M!M]") - h4(data-bind="text: (itsMe()?'Ваши подписки':'Подписки пользователя')+' на комментарии'") + h4(data-bind="text: (itsMe()?'Your subscriptions':'User subscriptions')") //ko if: nextNoty() !== null .pagOverTop .nextNoty span.glyphicon.glyphicon-bullhorn - span.text-success(data-bind="text: 'Отправка следующего уведомления запланирована на ' + nextNoty().calendar().toLowerCase() + ' (' + nextNoty().fromNow() + ')'") + span.text-success(data-bind="text: 'Sending next notice is scheduled for ' + nextNoty().calendar().toLowerCase() + ' (' + nextNoty().fromNow() + ')'") // /ko ul.nav.nav-tabs li(data-bind="css: {active: type() === 'photo'}") - a(data-bind="attr: {href: pageUrl()}, text: 'Фотографии [' + types['photo_persist']() + ']'") + a(data-bind="attr: {href: pageUrl()}, text: 'Photos [' + types['photo_persist']() + ']'") li(data-bind="css: {active: type() === 'news'}") - a(data-bind="attr: {href: pageUrl() + '?type=news'}, text: 'Новости [' + types['news_persist']() + ']'") + a(data-bind="attr: {href: pageUrl() + '?type=news'}, text: 'Nesw [' + types['news_persist']() + ']'") .navContent .row .col-xs-6.col-md-3.topcol @@ -26,9 +26,9 @@ a.objTitle(data-bind="attr: {href: $data.link}, text: $data.title") //ko if: $data.ccount br - a.count(data-bind="html: $data.ccount + ($data.ccount_new ? ' +' + $data.ccount_new + '' : ''), attr: {href: $data.link + '?hl=comments'}", title="Комментарии") + a.count(data-bind="html: $data.ccount + ($data.ccount_new ? ' +' + $data.ccount_new + '' : ''), attr: {href: $data.link + '?hl=comments'}", title="Comments") //ko if: $data.sbscr_noty - .planed(title="Сообщение о новых комментариях запланированно к отправке в предстоящем уведомлении.") + .planed(title="Message about new comment is scheduled to be sent in the next notice.") span.glyphicon.glyphicon-bullhorn // /ko // /ko @@ -39,9 +39,9 @@ a.objTitle(data-bind="attr: {href: $data.link}, text: $data.cid + '. ' + $data.title") //ko if: $data.ccount br - a.count(data-bind="html: $data.ccount + ($data.ccount_new ? ' +' + $data.ccount_new + '' : ''), attr: {href: $data.link + '?hl=comments'}", title="Комментарии") + a.count(data-bind="html: $data.ccount + ($data.ccount_new ? ' +' + $data.ccount_new + '' : ''), attr: {href: $data.link + '?hl=comments'}", title="Comments") //ko if: $data.sbscr_noty - .planed(title="Сообщение о новых комментариях запланированно к отправке в предстоящем уведомлении.") + .planed(title="Message about new comment is scheduled to be sent in the next notice.") span.glyphicon.glyphicon-bullhorn // /ko // /ko @@ -49,11 +49,11 @@ | \ No newline at end of file From fa8bf1c534599928331d77102694ef9742ab1a6d Mon Sep 17 00:00:00 2001 From: klimashkin Date: Mon, 26 Oct 2015 22:27:24 -0700 Subject: [PATCH 21/85] AM/PM time format in comments --- public/js/lib/Utils.js | 41 +++++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/public/js/lib/Utils.js b/public/js/lib/Utils.js index 8398db2e3..1cb1ce057 100755 --- a/public/js/lib/Utils.js +++ b/public/js/lib/Utils.js @@ -472,25 +472,42 @@ define(['jquery', 'underscore', 'underscore.string', 'lib/jsuri', 'lib/jquery/pl format: (function () { var dateFormat = (function () { var months = [ - 'января', 'февраля', 'марта', 'апреля', 'мая', 'июня', 'июля', 'августа', 'сентября', 'октября', 'ноября', 'декабря' + 'january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december' ], weekDays = [ - 'Воскресенье', 'Понедельник', 'Вторник', 'Среда', 'Четверг', 'Пятница', 'Суббота' + 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ], weekDaysIn = [ - 'в воскресенье', 'в понедельник', 'во вторник', 'в среду', 'в четверг', 'в пятницу', 'в субботу' + 'at sunday', 'at monday', 'at tuesday', 'at wednesday', 'at thursday', 'at friday', 'at saturday' ]; function dMMYYYYhhmm(date) { - var hours = date.getHours(), - mintues = date.getMinutes(); - return date.getDate() + ' ' + months[date.getMonth()] + ' ' + date.getFullYear() + ', ' + (hours > 9 ? hours : '0' + hours) + ':' + (mintues > 9 ? mintues : '0' + mintues); + return date.getDate() + ' ' + months[date.getMonth()] + ' ' + date.getFullYear() + ', ' + hhmm(date); } function hhmm(date) { var hours = date.getHours(), - mintues = date.getMinutes(); - return (hours > 9 ? hours : '0' + hours) + ':' + (mintues > 9 ? mintues : '0' + mintues); + mintues = date.getMinutes(), + ext; + + if (hours > 12) { + ext = 'PM'; + hours -= 12; + + if (hours < 10) { + hours = '0' + hours; + } else if (hours === 12) { + hours = '12'; + ext = 'AM'; + } + } else if (hours < 12) { + hours = hours < 10 ? '0' + hours : hours; + ext = 'AM'; + } else if (hours === 12) { + ext = 'PM'; + } + + return hours + ':' + (mintues > 9 ? mintues : '0' + mintues) + ' ' + ext; } // Возвращает дату относительно переданной в формате "Сегодня в 12:15" @@ -504,10 +521,10 @@ define(['jquery', 'underscore', 'underscore.string', 'lib/jsuri', 'lib/jquery/pl if (dateMs < Utils.times.midnight - Utils.times.msDay) { result = weekDays[date.getDay()] + ', ' + dateFormat.hhmm(date); } else { - result = 'Вчера в ' + dateFormat.hhmm(date); + result = 'Yesterday at ' + dateFormat.hhmm(date); } } else { - result = 'Сегодня в ' + dateFormat.hhmm(date); + result = 'Today at ' + dateFormat.hhmm(date); } return result; @@ -523,10 +540,10 @@ define(['jquery', 'underscore', 'underscore.string', 'lib/jsuri', 'lib/jquery/pl if (dateMs < Utils.times.midnight - Utils.times.msDay) { result = weekDaysIn[date.getDay()] + ', ' + dateFormat.hhmm(date); } else { - result = 'вчера в ' + dateFormat.hhmm(date); + result = 'yesterday at ' + dateFormat.hhmm(date); } } else { - result = 'сегодня в ' + dateFormat.hhmm(date); + result = 'today at ' + dateFormat.hhmm(date); } return result; From 5f762bb41311534af66e0fe0f492cbdf87fb6e8e Mon Sep 17 00:00:00 2001 From: klimashkin Date: Mon, 26 Oct 2015 22:43:26 -0700 Subject: [PATCH 22/85] No connection messages translate --- public/js/globalVM.js | 8 ++++---- public/js/socket.js | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/public/js/globalVM.js b/public/js/globalVM.js index 2022197af..10902051d 100644 --- a/public/js/globalVM.js +++ b/public/js/globalVM.js @@ -61,10 +61,10 @@ define(['jquery', 'Browser', 'Utils', 'underscore', 'Params', 'i18n', 'knockout' repository: {}, ranks: { - mec: {src: '/img/rank/bronse.jpg', title: 'Меценат'}, - mec_silv: {src: '/img/rank/silver.jpg', title: 'Серебряный меценат'}, - mec_gold: {src: '/img/rank/gold.jpg', title: 'Золотой меценат'}, - adviser: {src: '/img/rank/adviser.jpg', title: 'Советник'} + mec: {src: '/img/rank/bronse.jpg', title: 'Maecenas'}, + mec_silv: {src: '/img/rank/silver.jpg', title: 'Silver maecenas'}, + mec_gold: {src: '/img/rank/gold.jpg', title: 'Gold maecenas'}, + adviser: {src: '/img/rank/adviser.jpg', title: 'counselor'} }, func: { diff --git a/public/js/socket.js b/public/js/socket.js index b10b6944f..5a2e06e9d 100755 --- a/public/js/socket.js +++ b/public/js/socket.js @@ -21,9 +21,9 @@ define(['module'], function (module) { firstConnected = false, //Флаг первоначального коннекта firstConnectSubscribers = [], - disconnectionDataReturn = {error: true, noconnect: true, message: 'Нет соединения с сервером, повторите после восстановления связи'}, - noСonnWait = '
Нет соединения с сервером, пробую подключиться.. После восстановления связи сообщение пропадет автоматически
', - noСonnFail = '
Не удалось автоматически подключиться к серверу. Продолжать попытки
', + disconnectionDataReturn = {error: true, noconnect: true, message: 'No connection with the server, please try again after reconnecting'}, + noСonnWait = '
No connection with the server, trying to connect .. After the restoration of connection message will disappear automatically
', + noСonnFail = '
Failed to connect to the server automatically. Keep trying
', $noСonnWait, $noСonnFail; From c8a883c1440f99a01879705644d74a55d650b624 Mon Sep 17 00:00:00 2001 From: klimashkin Date: Mon, 26 Oct 2015 23:31:26 -0700 Subject: [PATCH 23/85] Typo fix --- views/module/common/auth.jade | 2 +- views/module/user/manage.jade | 2 +- views/module/user/subscr.jade | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/views/module/common/auth.jade b/views/module/common/auth.jade index 748f8df22..ae3e2d698 100644 --- a/views/module/common/auth.jade +++ b/views/module/common/auth.jade @@ -7,7 +7,7 @@ // /ko |