diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-07-10 19:16:38 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-07-10 19:16:38 +1200 |
commit | b36a8688af39b0d43126d46275f83fa9c940ed62 (patch) | |
tree | 2b5ac4606c9850d010067db129388c0cbc521e03 | |
parent | c5bfe9746e7c0382ca5ab767486f425e96fd0ace (diff) | |
download | trackermap-server-b36a8688af39b0d43126d46275f83fa9c940ed62.tar.gz trackermap-server-b36a8688af39b0d43126d46275f83fa9c940ed62.tar.bz2 trackermap-server-b36a8688af39b0d43126d46275f83fa9c940ed62.zip |
Re-organize strings for localization
-rw-r--r-- | web/app/view/admin/ServerDialog.js | 8 | ||||
-rw-r--r-- | web/app/view/device/Device.js | 23 | ||||
-rw-r--r-- | web/app/view/device/DeviceController.js | 8 | ||||
-rw-r--r-- | web/app/view/device/DeviceDialog.js | 4 | ||||
-rw-r--r-- | web/app/view/login/Login.js | 4 | ||||
-rw-r--r-- | web/app/view/login/Register.js | 10 | ||||
-rw-r--r-- | web/app/view/report/Report.js | 16 | ||||
-rw-r--r-- | web/app/view/state/StateController.js | 16 | ||||
-rw-r--r-- | web/app/view/user/User.js | 12 | ||||
-rw-r--r-- | web/app/view/user/UserController.js | 8 | ||||
-rw-r--r-- | web/app/view/user/UserDialog.js | 14 | ||||
-rw-r--r-- | web/debug.html | 1 | ||||
-rw-r--r-- | web/l10n/en.js | 63 | ||||
-rw-r--r-- | web/l10n/ru.js | 119 | ||||
-rw-r--r-- | web/release.html | 1 |
15 files changed, 150 insertions, 157 deletions
diff --git a/web/app/view/admin/ServerDialog.js b/web/app/view/admin/ServerDialog.js index d3cbc3492..cc1fe2918 100644 --- a/web/app/view/admin/ServerDialog.js +++ b/web/app/view/admin/ServerDialog.js @@ -39,11 +39,11 @@ Ext.define('Traccar.view.admin.ServerDialog', { }, { xtype: 'numberfield', name: 'latitude', - fieldLabel: strings.server_latitude + fieldLabel: strings.position_latitude }, { xtype: 'numberfield', name: 'longitude', - fieldLabel: strings.server_longitude + fieldLabel: strings.position_longitude }, { xtype: 'numberfield', name: 'zoom', @@ -52,10 +52,10 @@ Ext.define('Traccar.view.admin.ServerDialog', { }, buttons: [{ - text: strings.dialog_save, + text: strings.shared_save, handler: 'onSaveClick' }, { - text: strings.dialog_cancel, + text: strings.shared_cancel, handler: 'onCancelClick' }] diff --git a/web/app/view/device/Device.js b/web/app/view/device/Device.js index 25c067242..0f8cb876e 100644 --- a/web/app/view/device/Device.js +++ b/web/app/view/device/Device.js @@ -29,39 +29,40 @@ Ext.define('Traccar.view.device.Device', { selType: 'rowmodel', tbar: [{ - text: strings.device_add, + text: strings.shared_add, handler: 'onAddClick', - reference: 'deviceAddButton' + reference: 'deviceAddButton', + glyph: 'xf067@FontAwesome' }, { - text: strings.device_edit, disabled: true, handler: 'onEditClick', - reference: 'deviceEditButton' + reference: 'deviceEditButton', + glyph: 'xf040@FontAwesome' }, { - text: strings.device_remove, disabled: true, handler: 'onRemoveClick', - reference: 'deviceRemoveButton' + reference: 'deviceRemoveButton', + glyph: 'xf00d@FontAwesome' }, { xtype: 'tbfill' }, { - text: strings.device_settings, + text: strings.settings_title, menu: [{ - text: strings.device_settings_user, + text: strings.settings_user, handler: 'onUserClick' }, { - text: strings.device_settings_server, + text: strings.settings_server, disabled: true, handler: 'onServerClick', reference: 'settingsServerButton' }, { - text: strings.device_settings_users, + text: strings.settings_users, disabled: true, handler: 'onUsersClick', reference: 'settingsUsersButton' }] }, { - text: strings.device_logout, + text: strings.login_logout, handler: 'onLogoutClick' }], diff --git a/web/app/view/device/DeviceController.js b/web/app/view/device/DeviceController.js index ba9eabb5a..c85ac731a 100644 --- a/web/app/view/device/DeviceController.js +++ b/web/app/view/device/DeviceController.js @@ -64,11 +64,11 @@ Ext.define('Traccar.view.device.DeviceController', { var device = this.getView().getSelectionModel().getSelection()[0]; Ext.Msg.show({ title: strings.device_dialog, - message: strings.device_remove_confirm, + message: strings.shared_remove_confirm, buttons: Ext.Msg.YESNO, buttonText: { - yes: strings.dialog_delete, - no: strings.dialog_cancel + yes: strings.shared_remove, + no: strings.shared_cancel }, fn: function(btn) { if (btn === 'yes') { @@ -105,7 +105,7 @@ Ext.define('Traccar.view.device.DeviceController', { onUsersClick: function() { Ext.create('Ext.window.Window', { - title: strings.login_users_title, + title: strings.settings_users, width: styles.window_width, height: styles.window_height, layout: 'fit', diff --git a/web/app/view/device/DeviceDialog.js b/web/app/view/device/DeviceDialog.js index 7a5a192bd..5d2b30ddc 100644 --- a/web/app/view/device/DeviceDialog.js +++ b/web/app/view/device/DeviceDialog.js @@ -45,10 +45,10 @@ Ext.define('Traccar.view.device.DeviceDialog', { }, buttons: [{ - text: strings.dialog_save, + text: strings.shared_save, handler: 'onSaveClick' }, { - text: strings.dialog_cancel, + text: strings.shared_cancel, handler: 'onCancelClick' }] diff --git a/web/app/view/login/Login.js b/web/app/view/login/Login.js index b1d3f34a7..fdaaadcfb 100644 --- a/web/app/view/login/Login.js +++ b/web/app/view/login/Login.js @@ -35,7 +35,7 @@ Ext.define('Traccar.view.login.Login', { items: [{ xtype: 'textfield', name: 'email', - fieldLabel: strings.login_email, + fieldLabel: strings.user_email, allowBlank: false, enableKeyEvents: true, listeners: { @@ -45,7 +45,7 @@ Ext.define('Traccar.view.login.Login', { }, { xtype: 'textfield', name: 'password', - fieldLabel: strings.login_password, + fieldLabel: strings.user_password, inputType: 'password', allowBlank: false, enableKeyEvents: true, diff --git a/web/app/view/login/Register.js b/web/app/view/login/Register.js index b6b570efe..909ed2fba 100644 --- a/web/app/view/login/Register.js +++ b/web/app/view/login/Register.js @@ -36,28 +36,28 @@ Ext.define('Traccar.view.login.Register', { items: [{ xtype: 'textfield', name: 'name', - fieldLabel: strings.login_name, + fieldLabel: strings.user_name, allowBlank: false }, { xtype: 'textfield', name: 'email', - fieldLabel: strings.login_email, + fieldLabel: strings.user_email, vtype: 'email', allowBlank: false }, { xtype: 'textfield', name: 'password', - fieldLabel: strings.login_password, + fieldLabel: strings.user_password, inputType: 'password', allowBlank: false }] }, buttons: [{ - text: strings.dialog_save, + text: strings.shared_save, handler: 'onCreateClick' }, { - text: strings.dialog_cancel, + text: strings.shared_cancel, handler: 'closeView' }] diff --git a/web/app/view/report/Report.js b/web/app/view/report/Report.js index df8843a55..d52243139 100644 --- a/web/app/view/report/Report.js +++ b/web/app/view/report/Report.js @@ -75,14 +75,14 @@ Ext.define('Traccar.view.report.Report', { }, columns: [ - { text: strings.report_valid, dataIndex: 'valid', flex: 1 }, - { text: strings.report_time, dataIndex: 'fixTime', flex: 1, xtype: 'datecolumn', format: styles.report_format }, - { text: strings.report_latitude, dataIndex: 'latitude', flex: 1 }, - { text: strings.report_longitude, dataIndex: 'longitude', flex: 1 }, - { text: strings.report_altitude, dataIndex: 'altitude', flex: 1 }, - { text: strings.report_speed, dataIndex: 'speed', flex: 1 }, - { text: strings.report_course, dataIndex: 'course', flex: 1 }, - { text: strings.report_address, dataIndex: 'address', flex: 1 } + { text: strings.position_valid, dataIndex: 'valid', flex: 1 }, + { text: strings.position_time, dataIndex: 'fixTime', flex: 1, xtype: 'datecolumn', format: styles.report_format }, + { text: strings.position_latitude, dataIndex: 'latitude', flex: 1 }, + { text: strings.position_longitude, dataIndex: 'longitude', flex: 1 }, + { text: strings.position_altitude, dataIndex: 'altitude', flex: 1 }, + { text: strings.position_speed, dataIndex: 'speed', flex: 1 }, + { text: strings.position_course, dataIndex: 'course', flex: 1 }, + { text: strings.position_address, dataIndex: 'address', flex: 1 } ] }); diff --git a/web/app/view/state/StateController.js b/web/app/view/state/StateController.js index 466b0ee5b..6f0c18b08 100644 --- a/web/app/view/state/StateController.js +++ b/web/app/view/state/StateController.js @@ -37,35 +37,35 @@ Ext.define('Traccar.view.state.StateController', { keys: { 'fixTime': { priority: 1, - name: strings.report_time + name: strings.position_time }, 'latitude': { priority: 2, - name: strings.report_latitude + name: strings.position_latitude }, 'longitude': { priority: 3, - name: strings.report_longitude + name: strings.position_longitude }, 'valid': { priority: 4, - name: strings.report_valid + name: strings.position_valid }, 'altitude': { priority: 5, - name: strings.report_altitude + name: strings.position_altitude }, 'speed': { priority: 6, - name: strings.report_speed + name: strings.position_speed }, 'course': { priority: 7, - name: strings.report_course + name: strings.position_course }, 'protocol': { priority: 8, - name: strings.state_protocol + name: strings.position_protocol } }, diff --git a/web/app/view/user/User.js b/web/app/view/user/User.js index fa9c9201a..76779ef79 100644 --- a/web/app/view/user/User.js +++ b/web/app/view/user/User.js @@ -28,16 +28,16 @@ Ext.define('Traccar.view.user.User', { selType: 'rowmodel', tbar: [{ - text: strings.device_add, + text: strings.shared_add, handler: 'onAddClick', reference: 'deviceAddButton' }, { - text: strings.device_edit, + text: strings.shared_edit, disabled: true, handler: 'onEditClick', reference: 'userEditButton' }, { - text: strings.device_remove, + text: strings.shared_remove, disabled: true, handler: 'onRemoveClick', reference: 'userRemoveButton' @@ -48,9 +48,9 @@ Ext.define('Traccar.view.user.User', { }, columns: [ - { text: strings.login_name, dataIndex: 'name', flex: 1 }, - { text: strings.login_email, dataIndex: 'email', flex: 1 }, - { text: strings.login_admin, dataIndex: 'admin', flex: 1 } + { text: strings.user_name, dataIndex: 'name', flex: 1 }, + { text: strings.user_email, dataIndex: 'email', flex: 1 }, + { text: strings.user_admin, dataIndex: 'admin', flex: 1 } ] }); diff --git a/web/app/view/user/UserController.js b/web/app/view/user/UserController.js index 2b587b3d3..510a7d6c8 100644 --- a/web/app/view/user/UserController.js +++ b/web/app/view/user/UserController.js @@ -47,12 +47,12 @@ Ext.define('Traccar.view.user.UserController', { onRemoveClick: function() { var user = this.getView().getSelectionModel().getSelection()[0]; Ext.Msg.show({ - title: strings.login_user_title, - message: strings.user_remove_confirm, + title: strings.settings_user, + message: strings.shared_remove_confirm, buttons: Ext.Msg.YESNO, buttonText: { - yes: strings.dialog_delete, - no: strings.dialog_cancel + yes: strings.shared_remove, + no: strings.shared_cancel }, fn: function(btn) { if (btn === 'yes') { diff --git a/web/app/view/user/UserDialog.js b/web/app/view/user/UserDialog.js index fba182eb1..3db21de6c 100644 --- a/web/app/view/user/UserDialog.js +++ b/web/app/view/user/UserDialog.js @@ -25,7 +25,7 @@ Ext.define('Traccar.view.user.UserDialog', { controller: 'userdialog', bodyPadding: styles.panel_padding, - title: strings.login_user_title, + title: strings.settings_user, resizable: false, modal: true, @@ -34,22 +34,22 @@ Ext.define('Traccar.view.user.UserDialog', { items: [{ xtype: 'textfield', name: 'name', - fieldLabel: strings.login_name + fieldLabel: strings.user_name }, { xtype: 'textfield', name: 'email', - fieldLabel: strings.login_email, + fieldLabel: strings.user_email, allowBlank: false }, { xtype: 'textfield', name: 'password', - fieldLabel: strings.login_password, + fieldLabel: strings.user_password, inputType: 'password', allowBlank: false }, { xtype: 'checkboxfield', name: 'admin', - fieldLabel: strings.login_admin, + fieldLabel: strings.user_admin, allowBlank: false, disabled: true, reference: 'adminField' @@ -57,10 +57,10 @@ Ext.define('Traccar.view.user.UserDialog', { }, buttons: [{ - text: strings.dialog_save, + text: strings.shared_save, handler: 'onSaveClick' }, { - text: strings.dialog_cancel, + text: strings.shared_cancel, handler: 'onCancelClick' }] diff --git a/web/debug.html b/web/debug.html index fb8f15676..dc0e3827e 100644 --- a/web/debug.html +++ b/web/debug.html @@ -4,6 +4,7 @@ <title>Traccar</title> <link rel="stylesheet" href="//cdn.sencha.com/ext/gpl/5.1.0/build/packages/ext-theme-neptune/build/resources/ext-theme-neptune-all.css"> <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/ol3/3.6.0/ol.css"> +<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"> <script src="//cdn.sencha.com/ext/gpl/5.1.0/build/ext-all-debug.js"></script> <script src="//cdn.sencha.com/ext/gpl/5.1.0/build/packages/ext-theme-neptune/build/ext-theme-neptune.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/ol3/3.6.0/ol-debug.js"></script> diff --git a/web/l10n/en.js b/web/l10n/en.js index 78970b5b0..881eb9fc3 100644 --- a/web/l10n/en.js +++ b/web/l10n/en.js @@ -1,36 +1,36 @@ var strings = { shared_loading: 'Loading...', + shared_save: 'Save', + shared_cancel: 'Cancel', + shared_add: 'Add', + shared_edit: 'Edit', + shared_remove: 'Remove', + shared_remove_confirm: 'Remove item?', error_title: 'Error', error_unknown: 'Unknown error', + user_name: 'Name', + user_email: 'Email', + user_password: 'Password', + user_admin: 'Admin', + login_title: 'Login', - login_user_title: 'User', - login_users_title: 'Users', - login_name: 'Name', - login_email: 'Email', - login_password: 'Password', - login_admin: 'Admin', login_register: 'Register', login_login: 'Login', login_failed: 'Incorrect email address or password', login_created: 'New user has been registered', - - user_remove_confirm: 'Remove user?', + login_logout: 'Logout', device_dialog: 'Device', device_title: 'Devices', device_name: 'Name', device_identifier: 'Identifier', - device_remove_confirm: 'Remove device?', - device_add: 'Add', - device_edit: 'Edit', - device_remove: 'Remove', - device_logout: 'Logout', - device_settings: 'Settings', - device_settings_user: 'Account', - device_settings_server: 'Server', - device_settings_users: 'Users', + + settings_title: 'Settings', + settings_user: 'Account', + settings_server: 'Server', + settings_users: 'Users', report_title: 'Reports', report_device: 'Device', @@ -38,29 +38,24 @@ var strings = { report_to: 'To', report_show: 'Show', report_clear: 'Clear', - report_time: 'Time', - report_valid: 'Valid', - report_latitude: 'Latitude', - report_longitude: 'Longitude', - report_altitude: 'Altitude', - report_speed: 'Speed', - report_course: 'Course', - report_address: 'Address', - server_title: 'Server settings', - server_latitude: 'Latitude', - server_longitude: 'Longitude', + position_time: 'Time', + position_valid: 'Valid', + position_latitude: 'Latitude', + position_longitude: 'Longitude', + position_altitude: 'Altitude', + position_speed: 'Speed', + position_course: 'Course', + position_address: 'Address', + position_protocol: 'Protocol', + + server_title: 'Server Settings', server_zoom: 'Zoom', server_registration: 'Registration', - dialog_save: 'Save', - dialog_delete: 'Delete', - dialog_cancel: 'Cancel', - map_title: 'Map', state_title: 'State', state_name: 'Parameter', - state_value: 'Value', - state_protocol: 'Protocol' + state_value: 'Value' }; diff --git a/web/l10n/ru.js b/web/l10n/ru.js index b678f2de1..4b599a36a 100644 --- a/web/l10n/ru.js +++ b/web/l10n/ru.js @@ -1,66 +1,61 @@ var strings = { - shared_loading: 'Loading...', - - error_title: 'Error', - error_unknown: 'Unknown error', - - login_title: 'Логин', - login_user_title: 'Пользователь', - login_users_title: 'Users', - login_name: 'Имя', - login_email: 'Email', - login_password: 'Пароль', - login_admin: 'Admin', + shared_loading: 'Загрузка...', + shared_save: 'Сохранить', + shared_cancel: 'Отмена', + shared_add: 'Добавить', + shared_edit: 'Редактировать', + shared_remove: 'Удалить', + shared_remove_confirm: 'Удалить элемент?', + + error_title: 'Ошибка', + error_unknown: 'Неизвестная ошибка', + + user_name: 'Имя', + user_email: 'Email', + user_password: 'Пароль', + user_admin: 'Администратор', + + login_title: 'Вход', login_register: 'Регистрация', login_login: 'Вход', - login_failed: 'Incorrect email address or password', - login_created: 'New user has been registered', - - user_remove_confirm: 'Remove user?', - - device_dialog: 'Device', - device_title: 'Devices', - device_name: 'Name', - device_identifier: 'Identifier', - device_remove_confirm: 'Remove device?', - device_add: 'Add', - device_edit: 'Edit', - device_remove: 'Remove', - device_logout: 'Logout', - device_settings: 'Settings', - device_settings_user: 'Account', - device_settings_server: 'Server', - device_settings_users: 'Users', - - report_title: 'Reports', - report_device: 'Device', - report_from: 'From', - report_to: 'To', - report_show: 'Show', - report_clear: 'Clear', - report_time: 'Time', - report_valid: 'Valid', - report_latitude: 'Latitude', - report_longitude: 'Longitude', - report_altitude: 'Altitude', - report_speed: 'Speed', - report_course: 'Course', - report_address: 'Address', - - server_title: 'Server settings', - server_latitude: 'Latitude', - server_longitude: 'Longitude', - server_zoom: 'Zoom', - server_registration: 'Registration', - - dialog_save: 'Save', - dialog_delete: 'Delete', - dialog_cancel: 'Cancel', - - map_title: 'Map', - - state_title: 'State', - state_name: 'Parameter', - state_value: 'Value', - state_protocol: 'Protocol' + login_failed: 'Неправильный email адрес или пароль', + login_created: 'Новый пользователь зарегистрирован', + login_logout: 'Выход', + + device_dialog: 'Устройство', + device_title: 'Устройства', + device_name: 'Название', + device_identifier: 'Идентификатор', + + settings_title: 'Настройки', + settings_user: 'Аккаунт', + settings_server: 'Сервер', + settings_users: 'Пользователи', + + report_title: 'Отчеты', + report_device: 'Устройтво', + report_from: 'С', + report_to: 'По', + report_show: 'Показать', + report_clear: 'Очистить', + + position_time: 'Время', + position_valid: 'Корректность', + position_latitude: 'Широта', + position_longitude: 'Долгота', + position_altitude: 'Высота', + position_speed: 'Скорость', + position_course: 'Курс', + position_address: 'Адрес', + position_protocol: 'Протокол', + + server_title: 'Настройки Сервера', + server_zoom: 'Приближение', + server_registration: 'Регистрация', + + map_title: 'Карта', + + state_title: 'Состояние', + state_name: 'Параметр', + state_value: 'Значение' }; diff --git a/web/release.html b/web/release.html index 8af15393e..70cd68ef3 100644 --- a/web/release.html +++ b/web/release.html @@ -4,6 +4,7 @@ <title>Traccar</title> <link rel="stylesheet" href="//cdn.sencha.com/ext/gpl/5.1.0/build/packages/ext-theme-neptune/build/resources/ext-theme-neptune-all.css"> <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/ol3/3.6.0/ol.min.css"> +<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"> <script src="//cdn.sencha.com/ext/gpl/5.1.0/build/ext-all.js"></script> <script src="//cdn.sencha.com/ext/gpl/5.1.0/build/packages/ext-theme-neptune/build/ext-theme-neptune.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/ol3/3.6.0/ol.min.js"></script> |