diff --git a/src/app/header.js b/src/app/header.js index 6083d3c1..5e6aa0db 100644 --- a/src/app/header.js +++ b/src/app/header.js @@ -163,7 +163,7 @@ class Header extends React.Component { transition: '1s' }}> { window.router('/') }} @@ -200,7 +200,7 @@ class Header extends React.Component { } /> { window.router('/downloads') }} @@ -224,7 +224,7 @@ class Header extends React.Component { } /> { window.router('/top') }} diff --git a/src/app/search.js b/src/app/search.js index d5530cc9..0bbd5e86 100644 --- a/src/app/search.js +++ b/src/app/search.js @@ -24,7 +24,7 @@ class Search extends Component { this.state = { searchingIndicator: false, - safeSearchText: 'safe search enabled', + safeSearchText: __('safe search enabled'), safeSearchColor: 'rgb(0, 188, 212)', moreTorrentsIndicator: false, moreFilesIndicator: false, @@ -239,11 +239,11 @@ class Search extends Component { this.notSafeSearch = ch; if(ch) { - return {safeSearchText: 'safe search disabled', safeSearchColor: '#EC407A'} + return {safeSearchText: __('safe search disabled'), safeSearchColor: '#EC407A'} } else { - return {safeSearchText: 'safe search enabled', safeSearchColor: 'rgb(0, 188, 212)'} + return {safeSearchText: __('safe search enabled'), safeSearchColor: 'rgb(0, 188, 212)'} } } render() { @@ -259,8 +259,8 @@ class Search extends Component {
{ this.searchValue = e.target.value if(this.searchValue.length < 3 && this.searchValue.length > 0) - this.searchError = 'too short string for search'; + this.searchError = __('too short string for search'); else this.searchError = undefined; this.forceUpdate() @@ -307,7 +307,7 @@ class Search extends Component { />
- { + { this.search() }} /> diff --git a/src/app/torrent-page.js b/src/app/torrent-page.js index a83f2f2f..feb387e7 100644 --- a/src/app/torrent-page.js +++ b/src/app/torrent-page.js @@ -72,12 +72,12 @@ const TorrentFiles = (props) => { filesList.length > 0 ?
- Content of the torrent: + {__('Content of the torrent')}: {treeToTorrentFiles(tree)}
:
- Processing files... + {__('Processing files')}...
} @@ -89,23 +89,23 @@ const TorrentInformation = (props) => { let torrent = props.torrent; return ( - Information about torrent + {__('Information about torrent')} } backgroundColor={blue500} />} rightIcon={} - primaryText="Torrent Name" + primaryText={__('Torrent Name')} secondaryText={{torrent.name}} /> } backgroundColor={yellow600} />} rightIcon={} - primaryText="Torrent Size" + primaryText={__('Torrent Size')} secondaryText={formatBytes(torrent.size)} /> } backgroundColor={yellow600} />} rightIcon={} - primaryText="Torrent contains files" + primaryText={__('Torrent contains files')} secondaryText={torrent.files} onClick={() => { if(!props.parent) @@ -119,19 +119,19 @@ const TorrentInformation = (props) => { } backgroundColor={yellow600} />} rightIcon={} - primaryText="Indexed/Added torrent date" + primaryText={__('Indexed/Added torrent date')} secondaryText={moment(torrent.added * 1000).format('MMMM Do YYYY, hh:mm')} /> } backgroundColor={yellow600} />} rightIcon={} - primaryText="Content type" + primaryText={__('Content type')} secondaryText={torrent.contentType || 'unknown'} /> } backgroundColor={yellow600} />} rightIcon={} - primaryText="Category" + primaryText={__('Category')} secondaryText={torrent.contentCategory || 'unknown'} /> @@ -337,8 +337,8 @@ export default class TorrentPage extends Page { value={this.state.value} onChange={this.handleChange} > - - + +
@@ -363,7 +363,7 @@ export default class TorrentPage extends Page { -
downloading {this.state.downloadProgress && (this.state.downloadProgress.progress * 100).toFixed(1)}%
+
{__('downloading')} {this.state.downloadProgress && (this.state.downloadProgress.progress * 100).toFixed(1)}%
-
seeders: {this.torrent.seeders}
-
leechers: {this.torrent.leechers}
-
completed: {this.torrent.completed}
+
{__('seeders')}: {this.torrent.seeders}
+
{__('leechers')}: {this.torrent.leechers}
+
{__('completed')}: {this.torrent.completed}
: null @@ -432,7 +432,7 @@ export default class TorrentPage extends Page { ?
-
= 50 ? '#00E676' : '#FF3D00'}}>Torrent rating: {torrentRating}%
+
= 50 ? '#00E676' : '#FF3D00'}}>{__('Torrent rating')}: {torrentRating}%
: null @@ -496,7 +496,7 @@ export default class TorrentPage extends Page {
- + diff --git a/src/app/torrent-statistic.js b/src/app/torrent-statistic.js index 23798b84..a1608f3d 100644 --- a/src/app/torrent-statistic.js +++ b/src/app/torrent-statistic.js @@ -129,7 +129,7 @@ export default class TorrentsStatistic extends Component { c0.4-0.112,0.79-0.227,1.168-0.346c0.004-0.001,0.009-0.003,0.013-0.004c2.961-0.936,5.22-2.099,6.693-3.427v8.346 C57.986,45.747,57.976,45.792,57.968,45.838z"/> -
{ formatBytes(this.stats.size, 1) } data
+
{ formatBytes(this.stats.size, 1) } {__('data')}
@@ -149,7 +149,7 @@ export default class TorrentsStatistic extends Component { -
{this.stats.torrents} torrents
+
{this.stats.torrents} {__('torrents')}
@@ -163,7 +163,7 @@ export default class TorrentsStatistic extends Component { -
{this.stats.files} files
+
{this.stats.files} {__('files')}
@@ -188,7 +188,7 @@ export default class TorrentsStatistic extends Component { -
{window.peers} peers
+
{window.peers} {__('peers')}
0 ? '#19c687' : 'white', fontSize: '1.15em', fill: window.peersTorrents > 0 ? '#19c687' : 'white', marginLeft: '20px'}}> @@ -203,7 +203,7 @@ export default class TorrentsStatistic extends Component { c-32.6,0-59.1-26.5-59.1-59.1c0-32.6,26.5-59.1,59.1-59.1s59.1,26.5,59.1,59.1C440.7,428,414.2,454.5,381.6,454.5z"/> -
{window.peersTorrents} remote torrents
+
{window.peersTorrents} {__('remote torrents')}
@@ -227,7 +227,7 @@ export default class TorrentsStatistic extends Component { S29.964,45.019,27.454,45.019z"/> -
not available
+
{__('not available')}
} { @@ -251,7 +251,7 @@ export default class TorrentsStatistic extends Component { C402.324,327.846,355.546,305.994,305.994,305.994z"/> -
redirect
+
{__('redirect')}
} { @@ -275,7 +275,7 @@ export default class TorrentsStatistic extends Component { C402.324,327.846,355.546,305.994,305.994,305.994z"/> -
direct
+
{__('direct')}
} diff --git a/translations/en.json b/translations/en.json index 29af5f23..bc7f8977 100644 --- a/translations/en.json +++ b/translations/en.json @@ -23,6 +23,32 @@ "Donate": "Donate", "Help (Documentation)": "Help (Documentation)", "Support (Discussion)": "Support (Discussion)", - "About (GitHub)": "About (GitHub)" + "About (GitHub)": "About (GitHub)", + "Information about torrent": "Information about torrent", + "Torrent Name": "Torrent Name", + "Torrent Size": "Torrent Size", + "Torrent contains files": "Torrent contains files", + "Indexed/Added torrent date": "Indexed/Added torrent date", + "Content type": "Content type", + "Category": "Category", + "Content of the torrent": "Content of the torrent", + "Back to main": "Back to main", + "Information": "Information", + "Download": "Download", + "seeders": "seeders", + "leechers": "leechers", + "completed": "completed", + "Files": "Files", + "Good": "Good", + "Bad": "Bad", + "data": "data", + "torrents": "torrents", + "files": "files", + "peers": "peers", + "remote torrents": "remote torrents", + "redirect": "redirect", + "safe search enabled": "safe search enabled", + "Search torrent or file": "Search torrent or file", + "What to search?": "What to search?" } } \ No newline at end of file diff --git a/translations/ru.json b/translations/ru.json index 0099e1bb..ef357c0d 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -23,6 +23,32 @@ "Donate": "Пожертвовать на развитие", "Help (Documentation)": "Помощь (Документация)", "Support (Discussion)": "Помощь (Обсуждение)", - "About (GitHub)": "О программе (на GitHub)" + "About (GitHub)": "О программе (на GitHub)", + "Information about torrent": "Информация о торренты", + "Torrent Name": "Название торрента", + "Torrent Size": "Размер торрента", + "Torrent contains files": "Торрент состоит из файлов", + "Indexed/Added torrent date": "Время индексирования/добавления", + "Content type": "Тип контента", + "Category": "Категория", + "Content of the torrent": "Содержимое торрента", + "Back to main": "Вернуться на главную", + "Information": "Информация", + "Download": "Скачать", + "seeders": "сидеров", + "leechers": "личеров", + "completed": "завершено", + "Files": "Файлы", + "Good": "Хороший", + "Bad": "Плохой", + "data": "данных", + "torrents": "торрентов", + "files": "файлов", + "peers": "пиров", + "remote torrents": "удаленных торрентов", + "redirect": "переадресация", + "safe search enabled": "безопасный поиск включен", + "Search torrent or file": "Искать торрент или файл", + "What to search?": "Что искать?" } } \ No newline at end of file