diff --git a/src/app/config-page.js b/src/app/config-page.js index f8ddb8c..f538181 100644 --- a/src/app/config-page.js +++ b/src/app/config-page.js @@ -40,14 +40,14 @@ export default class ConfigPage extends Page { return (
- { + { window.router('/') }} />
{ this.options.indexer = checked @@ -58,11 +58,11 @@ export default class ConfigPage extends Page { />
-
Scanning port
+
{__('Scanning port')}
0 ? undefined : "This field is required"} + hintText={__('Port')} + errorText={this.options.spiderPort > 0 ? undefined : __('This field is required')} value={this.options.spiderPort} onChange={(e, value) => { if(!value) @@ -75,16 +75,16 @@ export default class ConfigPage extends Page { }} />
-
* For current work TCP and UDP ports must be fully open and forward in case of router usage
+
* {__('For current work TCP and UDP ports must be fully open and forward in case of router usage')}
-
Trackers responce port
+
{__('Trackers responce port')}
0 ? undefined : "This field is required"} + errorText={this.options.udpTrackersPort > 0 ? undefined : __('This field is required')} value={this.options.udpTrackersPort} onChange={(e, value) => { if(!value) @@ -97,12 +97,12 @@ export default class ConfigPage extends Page { }} />
-
* For current work UDP port must be fully open and forward in case of router usage
+
* {__('For current work UDP port must be fully open and forward in case of router usage')}
{ this.options.upnp = checked @@ -111,10 +111,10 @@ export default class ConfigPage extends Page { />
-
Collection directory
+
{__('Collection directory')}
0 ? undefined : "This field is required"} + hintText={__('Db path')} + errorText={this.options.dbPath && this.options.dbPath.length > 0 ? undefined : __('This field is required')} value={this.options.dbPath} onChange={(e, value) => { if(!fs.existsSync(value)) @@ -124,7 +124,7 @@ export default class ConfigPage extends Page { this.forceUpdate() }} /> - { + { if(!dialog) return const dir = dialog.showOpenDialog({properties: ['openDirectory']})[0] @@ -137,9 +137,9 @@ export default class ConfigPage extends Page {
-
Download torrents directory
+
{__('Download torrents directory')}
{ if(!fs.existsSync(value)) @@ -149,7 +149,7 @@ export default class ConfigPage extends Page { this.forceUpdate() }} /> - { + { if(!dialog) return const dir = dialog.showOpenDialog({properties: ['openDirectory']})[0] @@ -161,10 +161,10 @@ export default class ConfigPage extends Page { }} />
-
P2P Rats network settings:
+
{__('P2P Rats network settings')}:
{ this.options.p2p = this.options.indexer && checked @@ -174,18 +174,18 @@ export default class ConfigPage extends Page {
{ this.options.p2pBootstrap = checked this.forceUpdate() }} /> -
* Use extrnral bootstrap nodes to get p2p peers when network setted wrong or need external source
+
* {__('Use extrnral bootstrap nodes to get p2p peers when network setted wrong or need external source')}
-
Max peers limit (current: {this.options.p2pConnections})
+
{__('Max peers limit')} ({__('current')}: {this.options.p2pConnections})
{ this.options.p2pReplication = checked this.forceUpdate() }} /> -
* Enable torrents replication from another rats clients. Dont recomended if torrent scanner works correct.
+
* {__('Enable torrents replication from another rats clients. Dont recomended if torrent scanner works correct')}.
-
Torrent network scanner settings:
+
{__('Torrent network scanner settings')}:
-
Scanner walk speed (current: {this.options.spider && this.options.spider.walkInterval}) [affected after program reload]
+
{__('Scanner walk speed')} ({__('current')}: {this.options.spider && this.options.spider.walkInterval}) [{__('affected after program reload')}]
-
* Low value - fast initial scanning and high cpu usage. High Value - low cpu usage but very slow scanning. - Good value between 3-60. Defaul value: 5
+
* {__('Low value')} - {__('fast initial scanning and high cpu usage')}. {__('High Value')} - {__('low cpu usage but very slow scanning')}. + {__('Good value between')} 3-60. {__('Defaul value')}: 5
-
Nodes usage (current: {this.options.spider && this.options.spider.nodesUsage})
+
{__('Nodes usage')} ({__('current')}: {this.options.spider && this.options.spider.nodesUsage})
-
* Low Value - very low usage of nodes, low network traffic, slow torrent scanning. High value - high traffic, fast scanning, high routers usage. - Recomended value between 10-1000. Defaul value: 100. 0 - Ignore this option (no limit). +
* {__('Low Value')} - {__('very low usage of nodes, low network traffic, slow torrent scanning')}. {__('High value')} - {__('high traffic, fast scanning, high routers usage')}. + {__('Recomended value between')} 10-1000. {__('Defaul value')}: 100. 0 - {__('Ignore this option')} ({__('no limit')}).
-
Reduce network packages (current: {this.options.spider && this.options.spider.packagesLimit})
+
{__('Reduce network packages')} ({__('current')}: {this.options.spider && this.options.spider.packagesLimit})
-
* Low Value - ignore more usless network packages, lower traffic and routers usage. High Value - high traffic and router usage in prospect. - Recomended value between 300-2000. Defaul value: 500. 0 - Ignore this option (no limit). +
* {__('Low Value')} - {__('ignore more usless network packages, lower traffic and routers usage')}. {__('High Value')} - {__('high traffic and router usage in prospect')}. + {__('Recomended value between')} 300-2000. {__('Defaul value')}: 500. 0 - {__('Ignore this option')} ({__('no limit')}).
{ this.settingsSavedMessage && -
Settings saved
+
{__('Settings saved')}
}
- { + { this.saveSettings() }} />
diff --git a/src/app/download-page.js b/src/app/download-page.js index 6fbaf8d..96c3940 100644 --- a/src/app/download-page.js +++ b/src/app/download-page.js @@ -40,7 +40,7 @@ export default class TopPage extends Page { return (
- { + { window.router('/') }} /> diff --git a/src/app/filters-page.js b/src/app/filters-page.js index 6a60cdd..3fb82ef 100644 --- a/src/app/filters-page.js +++ b/src/app/filters-page.js @@ -39,7 +39,7 @@ export default class ConfigPage extends Page { return (
- { + { window.router('/') }} />
@@ -48,7 +48,7 @@ export default class ConfigPage extends Page {
-
Max files per torrent (current: {this.options.filters && this.options.filters.maxFiles})
+
{__('Max files per torrent')} ({__('current')}: {this.options.filters && this.options.filters.maxFiles})
-
* 0 - Disabled. +
* 0 - {__('Disabled')}.
-
Torrent name regular extension filtering
+
{__('Torrent name regular extension filtering')}
{ if(!this.options.filters) @@ -106,14 +106,14 @@ export default class ConfigPage extends Page { this.forceUpdate() }} > - \u0400-\u04FF]+$`} primaryText="Russian + English only (With symbols)" /> - ]+$'} primaryText="English only (With symbols)" /> - + \u0400-\u04FF]+$`} primaryText={__('Russian + English only (With symbols)')} /> + ]+$'} primaryText={__('English only (With symbols)')} /> +
{ if(!this.options.filters) @@ -124,13 +124,13 @@ export default class ConfigPage extends Page { }} />
- * - clean string means disabled + * - {__('clean string means disabled')}
{ if(!this.options.filters) @@ -145,14 +145,14 @@ export default class ConfigPage extends Page { { this.toRemoveProbably && this.toRemoveProbably > 0 ? -
Torrents to clean: {this.toRemoveProbably}
+
{__('Torrents to clean')}: {this.toRemoveProbably}
: null } { this.toRemove && this.toRemove > 0 ? -
Torrents cleaned: {this.toRemove}
+
{__('Torrents cleaned')}: {this.toRemove}
: null } @@ -160,17 +160,17 @@ export default class ConfigPage extends Page { { this.settingsSavedMessage && -
Settings saved
+
{__('Settings saved')}
}
- { + { window.torrentSocket.emit('removeTorrents', true, window.customLoader((toRemove) => { this.toRemoveProbably = toRemove this.forceUpdate() })); }} /> - { + { window.torrentSocket.emit('removeTorrents', false, window.customLoader((toRemove) => { this.toRemove = toRemove this.forceUpdate() @@ -179,7 +179,7 @@ export default class ConfigPage extends Page {
- { + { this.saveSettings() }} />
diff --git a/src/app/index-page.js b/src/app/index-page.js index b99f497..cf18aec 100644 --- a/src/app/index-page.js +++ b/src/app/index-page.js @@ -40,7 +40,7 @@ export default class IndexPage extends Page { searchText={Search.instance().currentSearch} resultSelector={ { @@ -68,13 +68,13 @@ export default class IndexPage extends Page { }) }} > - - - - - - - + + + + + + + } diff --git a/src/app/input-files-filter.js b/src/app/input-files-filter.js index 3cfd69d..4f65df1 100644 --- a/src/app/input-files-filter.js +++ b/src/app/input-files-filter.js @@ -38,7 +38,7 @@ export default class InputFilesFilter extends Component { return (
this.setState({enabled: !this.state.enabled})} @@ -53,17 +53,17 @@ export default class InputFilesFilter extends Component { onChange={files => this.setState({ files })} /> this.setState({filesMax: value})} className='filter-control-border' > - - - - - - + + + + + +
diff --git a/src/app/input-size.js b/src/app/input-size.js index 7d07ec8..6c478e3 100644 --- a/src/app/input-size.js +++ b/src/app/input-size.js @@ -38,7 +38,7 @@ export default class InputSize extends Component { return (
this.setState({enabled: !this.state.enabled})} @@ -54,7 +54,7 @@ export default class InputSize extends Component { onChange={size => this.setState({ size })} /> this.setState({maxSize: value})} className='filter-control-border' diff --git a/src/app/recent-torrents.js b/src/app/recent-torrents.js index 7c83c0b..d6a3e32 100644 --- a/src/app/recent-torrents.js +++ b/src/app/recent-torrents.js @@ -139,13 +139,13 @@ export default class RecentTorrents extends Component { return ( - { + { window.router('/top'); }} /> - { + { this.pauseAndContinue() }} /> - Most recent torrents{this.displayQueue.length > 0 ? ` (and ${this.displayQueue.length} more)` : null} + {__('Most recent torrents')}{this.displayQueue.length > 0 ? ` (${__('and')} ${this.displayQueue.length} ${__('more')})` : null} { diff --git a/src/app/search-advanced-controls.js b/src/app/search-advanced-controls.js index 670d48d..74dbb54 100644 --- a/src/app/search-advanced-controls.js +++ b/src/app/search-advanced-controls.js @@ -31,18 +31,18 @@ export default class AdvancedSearchControl extends Component { return (
this.setState({type: value})} > - - - - - - - + + + + + + +
this.setState({size, maxSize, sizeEnabled: enabled})} /> diff --git a/src/app/search-results.js b/src/app/search-results.js index 2092ee6..5499880 100644 --- a/src/app/search-results.js +++ b/src/app/search-results.js @@ -15,7 +15,7 @@ export default class SearchResults extends Component { || (this.props.filesSearchResults && this.props.filesSearchResults.length > 0) ?
- Search results for {this.props.searchText} + {__('Search results for')} {this.props.searchText}
{this.props.resultSelector}
: @@ -36,7 +36,7 @@ export default class SearchResults extends Component { this.props.moreTorrentsEnabled && !this.props.moreTorrentsIndicator ?
- More Torrents} onClick={() => { + {__('More Torrents')}} onClick={() => { if(this.props.onMoreTorrents) this.props.onMoreTorrents(); }} /> @@ -69,7 +69,7 @@ export default class SearchResults extends Component { this.props.moreFilesEnabled && !this.props.moreFilesIndicator ?
- { + { if(this.props.onMoreFiles) this.props.onMoreFiles(); }} /> @@ -125,7 +125,7 @@ export default class SearchResults extends Component { c-5.292-6.087-7.944-13.459-7.944-22.108C63.521,74.195,66.173,66.825,71.465,60.749z"/> -
no torrents for {this.props.searchText} were found
+
{__('no torrents for')} {this.props.searchText} {__('were found')}
: null diff --git a/src/app/top-page.js b/src/app/top-page.js index 0ac1e75..2f356fc 100644 --- a/src/app/top-page.js +++ b/src/app/top-page.js @@ -18,19 +18,19 @@ export default class TopPage extends Page { this.topTorrents = {}; this.types = ['main', 'video', 'audio', 'books', 'pictures', 'application', 'archive'] this.descriptions = { - main: 'All', - video: 'Video', - audio: 'Audio/Music', - books: 'Books', - pictures: 'Pictures/Images', - application: 'Apps/Games', - archive: 'Archives' + main: __('All'), + video: __('Video'), + audio: __('Audio/Music'), + books: __('Books'), + pictures: __('Pictures/Images'), + application: __('Apps/Games'), + archive: __('Archives') } this.times = { - overall: 'Overall', - hours: 'Last hour', - week: 'Last week', - month: 'Last month' + overall: __('Overall'), + hours: __('Last hour'), + week: __('Last week'), + month: __('Last month') } this.state = {type: 'main', time: 'overall'} } @@ -157,7 +157,7 @@ export default class TopPage extends Page { torrents.length > 0 &&
- More Torrents} onClick={() => { + {__('More Torrents')}} onClick={() => { this.loadMoreTorrents(type) }} /> diff --git a/src/app/torrent-page.js b/src/app/torrent-page.js index feb387e..1beeacc 100644 --- a/src/app/torrent-page.js +++ b/src/app/torrent-page.js @@ -409,7 +409,7 @@ export default class TorrentPage extends Page { onClick={() => { window.torrentSocket.emit('downloadCancel', this.torrent.hash) }} - label="Cancel download" + label={__('Cancel download')} secondary={true} icon={} /> diff --git a/src/app/torrent.js b/src/app/torrent.js index 972f36d..259851c 100644 --- a/src/app/torrent.js +++ b/src/app/torrent.js @@ -283,9 +283,9 @@ export default class Torrent extends Component { torrent.seeders || torrent.leechers || torrent.completed ?
- 0 ? '#00C853' : 'grey')}}>{torrent.seeders} seeders - 0 ? '#AA00FF' : 'grey'), marginLeft: '12px'}}>{torrent.leechers} leechers - 0 ? '#FF6D00' : 'grey'), marginLeft: '12px'}}>{torrent.completed} completed + 0 ? '#00C853' : 'grey')}}>{torrent.seeders} {__('seeders')} + 0 ? '#AA00FF' : 'grey'), marginLeft: '12px'}}>{torrent.leechers} {__('leechers')} + 0 ? '#FF6D00' : 'grey'), marginLeft: '12px'}}>{torrent.completed} {__('completed')}
: null diff --git a/translations/en.json b/translations/en.json index bc7f897..1abb212 100644 --- a/translations/en.json +++ b/translations/en.json @@ -49,6 +49,96 @@ "redirect": "redirect", "safe search enabled": "safe search enabled", "Search torrent or file": "Search torrent or file", - "What to search?": "What to search?" + "What to search?": "What to search?", + "not available": "not available", + "Sort by": "Sort by", + "None": "None", + "Seeders": "Seeders", + "Name": "Name", + "Size": "Size", + "Added date": "Added date", + "Completed": "Completed", + "top": "top", + "running": "running", + "Most recent torrents": "Most recent torrents", + "All": "All", + "Video": "Video", + "Audio/Music": "Audio/Music", + "Books": "Books", + "Pictures/Images": "Pictures/Images", + "Apps/Games": "Apps/Games", + "Archives": "Archives", + "Overall": "Overall", + "Last hour": "Last hour", + "Last week": "Last week", + "Last month": "Last month", + "More Torrents": "More Torrents", + "Filter content type": "Filter content type", + "Audio": "Audio", + "Pictures": "Pictures", + "Applications": "Applications", + "Disk Images": "Disk Images", + "Size filter": "Size filter", + "Size type max": "Size type max", + "Files filter": "Files filter", + "Size type": "Size type", + "Files or less": "Files or less", + "safe search disabled": "safe search disabled", + "Back to main page": "Back to main page", + "Max files per torrent": "Max files per torrent", + "current": "current", + "Max files": "Max files", + "Disabled": "Disabled", + "Torrent name regular extension filtering": "Torrent name regular extension filtering", + "Examples": "Examples", + "Russian + English only (With symbols)": "Russian + English only (With symbols)", + "English only (With symbols)": "English only (With symbols)", + "Ignore badword": "Ignore badword", + "Negative regular extension filtering": "Negative regular extension filtering", + "clean string means disabled": "clean string means disabled", + "Adult filter": "Adult filter", + "Check torrents": "Check torrents", + "Clean torrents": "Clean torrents", + "Save Settings": "Save Settings", + "Enabled network scanning": "Enabled network scanning", + "Scanning port": "Scanning port", + "Port": "Port", + "This field is required": "This field is required", + "For current work TCP and UDP ports must be fully open and forward in case of router usage": "For current work TCP and UDP ports must be fully open and forward in case of router usage", + "Trackers responce port": "Trackers responce port", + "For current work UDP port must be fully open and forward in case of router usage": "For current work UDP port must be fully open and forward in case of router usage", + "Enabled UPnP": "Enabled UPnP", + "Collection directory": "Collection directory", + "Db path": "Db path", + "Browse": "Browse", + "Download torrents directory": "Download torrents directory", + "Download path": "Download path", + "P2P Rats network settings": "P2P Rats network settings", + "Enabled p2p search": "Enabled p2p search", + "Enabled bootstrap peers": "Enabled bootstrap peers", + "Use extrnral bootstrap nodes to get p2p peers when network setted wrong or need external source": "Use extrnral bootstrap nodes to get p2p peers when network setted wrong or need external source", + "Max peers limit": "Max peers limit", + "P2P torrents replication": "P2P torrents replication", + "Enable torrents replication from another rats clients. Dont recomended if torrent scanner works correct": "Enable torrents replication from another rats clients. Dont recomended if torrent scanner works correct", + "Torrent network scanner settings": "Torrent network scanner settings", + "Scanner walk speed": "Scanner walk speed", + "affected after program reload": "affected after program reload", + "Low value": "Low value", + "fast initial scanning and high cpu usage": "fast initial scanning and high cpu usage", + "High Value": "High Value", + "low cpu usage but very slow scanning": "low cpu usage but very slow scanning", + "Good value between": "Good value between", + "Defaul value": "Defaul value", + "Nodes usage": "Nodes usage", + "Low Value": "Low Value", + "very low usage of nodes, low network traffic, slow torrent scanning": "very low usage of nodes, low network traffic, slow torrent scanning", + "High value": "High value", + "high traffic, fast scanning, high routers usage": "high traffic, fast scanning, high routers usage", + "Recomended value between": "Recomended value between", + "Ignore this option": "Ignore this option", + "no limit": "no limit", + "Reduce network packages": "Reduce network packages", + "ignore more usless network packages, lower traffic and routers usage": "ignore more usless network packages, lower traffic and routers usage", + "high traffic and router usage in prospect": "high traffic and router usage in prospect" } } \ No newline at end of file diff --git a/translations/ru.json b/translations/ru.json index ef357c0..3ec729a 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -49,6 +49,96 @@ "redirect": "переадресация", "safe search enabled": "безопасный поиск включен", "Search torrent or file": "Искать торрент или файл", - "What to search?": "Что искать?" + "What to search?": "Что искать?", + "not available": "недоступное", + "Sort by": "Сортировать по", + "None": "Нету", + "Seeders": "Сидеры", + "Name": "Имя", + "Size": "Размер", + "Added date": "Дата добавления", + "Completed": "Завершено", + "top": "топ", + "running": "запущено", + "Most recent torrents": "Самые актуальные торренты", + "All": "Все", + "Video": "Видер", + "Audio/Music": "Аудио/Музыка", + "Books": "Книги", + "Pictures/Images": "Картинки/Изображения", + "Apps/Games": "Приложения/Игры", + "Archives": "Архивы", + "Overall": "За все время", + "Last hour": "За последний час", + "Last week": "За последнюю неделю", + "Last month": "За последний месяц", + "More Torrents": "Больше торрентов", + "Filter content type": "Фильтровать по типу", + "Audio": "Аудио", + "Pictures": "Кантинки", + "Applications": "Приложения", + "Disk Images": "Дисковые образы", + "Size filter": "Фильтр по размеру", + "Size type max": "Максимальный размер (тип)", + "Files filter": "Фильтр файлов", + "Size type": "Тип размера", + "Files or less": "Файлов или меньше", + "safe search disabled": "безопасный поиск отключен", + "Back to main page": "Вернуться на главную страницу", + "Max files per torrent": "Максимальное количество файлов на торрент", + "current": "текущее", + "Max files": "Максимально файлов", + "Disabled": "Отключено", + "Torrent name regular extension filtering": "Фильтр имени торрентов по регулярному выражению", + "Examples": "Примеры", + "Russian + English only (With symbols)": "Русский + Английский (С символами)", + "English only (With symbols)": "Только Английский (С символами)", + "Ignore badword": "Игнорировать плохое слово", + "Negative regular extension filtering": "Фильтрация по негативному регулярному выражению", + "clean string means disabled": "пустая строка означает что отключено", + "Adult filter": "Фильтр 18+", + "Check torrents": "Проверить торренты", + "Clean torrents": "Очистить торренты", + "Save Settings": "Сохранить торренты", + "Enabled network scanning": "Включить сканер сети", + "Scanning port": "Сканировать порт", + "Port": "Порт", + "This field is required": "Это необходимое поле", + "For current work TCP and UDP ports must be fully open and forward in case of router usage": "Для нормальной работы TCP и UDP порты должны быть полностью открыты и проброшенны, в случае использования роутера", + "Trackers responce port": "Порт получение ответов от трекеров", + "For current work UDP port must be fully open and forward in case of router usage": "Дня нормальной работы UDP порт должен быть полностью открыт и проброшен, в случае использования роутера.", + "Enabled UPnP": "Включить UPnP", + "Collection directory": "Директория коллекции", + "Db path": "Путь базы данных", + "Browse": "Выбрать", + "Download torrents directory": "Папка скачки торрентов", + "Download path": "Папка скачки", + "P2P Rats network settings": "P2P Крысиные настройки сети", + "Enabled p2p search": "Включить p2p поиск", + "Enabled bootstrap peers": "Включить начальные узлы", + "Use extrnral bootstrap nodes to get p2p peers when network setted wrong or need external source": "Использовать дополнительные источники для получения пиров, когда сеть настроена неверна, или нужен дополнительный источник", + "Max peers limit": "Максимальное количество пиров", + "P2P torrents replication": "P2P репликация торрентов", + "Enable torrents replication from another rats clients. Dont recomended if torrent scanner works correct": "Включить репликацию торрентов из других крысиных клиентов. Не рекомендуется если сканер торрентов работает корректно", + "Torrent network scanner settings": "Настройка сканера торрентов", + "Scanner walk speed": "Скорость прохода", + "affected after program reload": "применяется после перезагрузки программы", + "Low value": "Маленькое значение", + "fast initial scanning and high cpu usage": "быстрое начало сканирования и высокая нагрузка на cpu", + "High Value": "Высокое значение", + "low cpu usage but very slow scanning": "маленькое использование cpu, но медленное сканирование", + "Good value between": "Хорошо значание между", + "Defaul value": "Значение по умолчанию", + "Nodes usage": "Использование узлов", + "Low Value": "Маленькое значание", + "very low usage of nodes, low network traffic, slow torrent scanning": "маленькое использование узлов, маленький сетевой траффик, медленное сканирование сети", + "High value": "Высокое значение", + "high traffic, fast scanning, high routers usage": "большой траффик, быстроение сканирование, большое использование роутеров", + "Recomended value between": "Рекомендуемое значение между", + "Ignore this option": "Игнорировать эту опцию", + "no limit": "без ограничений", + "Reduce network packages": "Сократить количество сетевых пакетов", + "ignore more usless network packages, lower traffic and routers usage": "игнорировать больше сетевых пакетов, меньше трафик и использование роутеров", + "high traffic and router usage in prospect": "большой траффик и выскокая нагрузка на роутер в перспективе" } } \ No newline at end of file