feat(translations-ru): translation to russian (part 1)

This commit is contained in:
Alexey Kasyanchuk 2018-05-18 08:04:22 +03:00
parent 3056779895
commit 7f172cf6be
6 changed files with 92 additions and 40 deletions

View File

@ -163,7 +163,7 @@ class Header extends React.Component {
transition: '1s' transition: '1s'
}}> }}>
<RaisedButton <RaisedButton
label="Search" label={__('Search')}
onClick={() => { onClick={() => {
window.router('/') window.router('/')
}} }}
@ -200,7 +200,7 @@ class Header extends React.Component {
} }
/> />
<RaisedButton <RaisedButton
label="Downloads" label={__('Downloads')}
onClick={() => { onClick={() => {
window.router('/downloads') window.router('/downloads')
}} }}
@ -224,7 +224,7 @@ class Header extends React.Component {
} }
/> />
<RaisedButton <RaisedButton
label="Top" label={__('Top')}
onClick={() => { onClick={() => {
window.router('/top') window.router('/top')
}} }}

View File

@ -24,7 +24,7 @@ class Search extends Component {
this.state = { this.state = {
searchingIndicator: false, searchingIndicator: false,
safeSearchText: 'safe search enabled', safeSearchText: __('safe search enabled'),
safeSearchColor: 'rgb(0, 188, 212)', safeSearchColor: 'rgb(0, 188, 212)',
moreTorrentsIndicator: false, moreTorrentsIndicator: false,
moreFilesIndicator: false, moreFilesIndicator: false,
@ -239,11 +239,11 @@ class Search extends Component {
this.notSafeSearch = ch; this.notSafeSearch = ch;
if(ch) if(ch)
{ {
return {safeSearchText: 'safe search disabled', safeSearchColor: '#EC407A'} return {safeSearchText: __('safe search disabled'), safeSearchColor: '#EC407A'}
} }
else else
{ {
return {safeSearchText: 'safe search enabled', safeSearchColor: 'rgb(0, 188, 212)'} return {safeSearchText: __('safe search enabled'), safeSearchColor: 'rgb(0, 188, 212)'}
} }
} }
render() { render() {
@ -259,8 +259,8 @@ class Search extends Component {
<div className='row inline w100p pad0-75 search-row' style={{minWidth: '35em', backgroundColor: 'white', paddingTop: 0, paddingBottom: this.searchError ? 17 : 0, margin: 5, borderRadius: 3}}> <div className='row inline w100p pad0-75 search-row' style={{minWidth: '35em', backgroundColor: 'white', paddingTop: 0, paddingBottom: this.searchError ? 17 : 0, margin: 5, borderRadius: 3}}>
<TextField <TextField
style={{marginTop: -12}} style={{marginTop: -12}}
hintText="Search torrent or file" hintText={__('Search torrent or file')}
floatingLabelText="What to search?" floatingLabelText={__('What to search?')}
fullWidth={true} fullWidth={true}
ref='searchInput' ref='searchInput'
defaultValue={this.searchValue} defaultValue={this.searchValue}
@ -273,7 +273,7 @@ class Search extends Component {
onChange={e => { onChange={e => {
this.searchValue = e.target.value this.searchValue = e.target.value
if(this.searchValue.length < 3 && this.searchValue.length > 0) if(this.searchValue.length < 3 && this.searchValue.length > 0)
this.searchError = 'too short string for search'; this.searchError = __('too short string for search');
else else
this.searchError = undefined; this.searchError = undefined;
this.forceUpdate() this.forceUpdate()
@ -307,7 +307,7 @@ class Search extends Component {
/> />
</div> </div>
<RaisedButton style={{marginLeft: '10px'}} label="Search" primary={true} onClick={() =>{ <RaisedButton style={{marginLeft: '10px'}} label={__('Search')} primary={true} onClick={() =>{
this.search() this.search()
}} /> }} />
</div> </div>

View File

@ -72,12 +72,12 @@ const TorrentFiles = (props) => {
filesList.length > 0 filesList.length > 0
? ?
<div className='w100p'> <div className='w100p'>
<Subheader inset={true}>Content of the torrent:</Subheader> <Subheader inset={true}>{__('Content of the torrent')}:</Subheader>
{treeToTorrentFiles(tree)} {treeToTorrentFiles(tree)}
</div> </div>
: :
<div className='column center'> <div className='column center'>
<span className='pad0-75'>Processing files...</span> <span className='pad0-75'>{__('Processing files')}...</span>
<LinearProgress mode="indeterminate" /> <LinearProgress mode="indeterminate" />
</div> </div>
} }
@ -89,23 +89,23 @@ const TorrentInformation = (props) => {
let torrent = props.torrent; let torrent = props.torrent;
return ( return (
<List className='w100p'> <List className='w100p'>
<Subheader inset={true}>Information about torrent</Subheader> <Subheader inset={true}>{__('Information about torrent')}</Subheader>
<ListItem <ListItem
//leftAvatar={<Avatar icon={<ActionAssignment />} backgroundColor={blue500} />} //leftAvatar={<Avatar icon={<ActionAssignment />} backgroundColor={blue500} />}
rightIcon={<ActionInfo />} rightIcon={<ActionInfo />}
primaryText="Torrent Name" primaryText={__('Torrent Name')}
secondaryText={<span className='break-word' style={{whiteSpace: 'normal'}}>{torrent.name}</span>} secondaryText={<span className='break-word' style={{whiteSpace: 'normal'}}>{torrent.name}</span>}
/> />
<ListItem <ListItem
// leftAvatar={<Avatar icon={<EditorInsertChart />} backgroundColor={yellow600} />} // leftAvatar={<Avatar icon={<EditorInsertChart />} backgroundColor={yellow600} />}
rightIcon={<ActionInfo />} rightIcon={<ActionInfo />}
primaryText="Torrent Size" primaryText={__('Torrent Size')}
secondaryText={formatBytes(torrent.size)} secondaryText={formatBytes(torrent.size)}
/> />
<ListItem <ListItem
// leftAvatar={<Avatar icon={<EditorInsertChart />} backgroundColor={yellow600} />} // leftAvatar={<Avatar icon={<EditorInsertChart />} backgroundColor={yellow600} />}
rightIcon={<ActionInfo />} rightIcon={<ActionInfo />}
primaryText="Torrent contains files" primaryText={__('Torrent contains files')}
secondaryText={torrent.files} secondaryText={torrent.files}
onClick={() => { onClick={() => {
if(!props.parent) if(!props.parent)
@ -119,19 +119,19 @@ const TorrentInformation = (props) => {
<ListItem <ListItem
// leftAvatar={<Avatar icon={<EditorInsertChart />} backgroundColor={yellow600} />} // leftAvatar={<Avatar icon={<EditorInsertChart />} backgroundColor={yellow600} />}
rightIcon={<ActionInfo />} rightIcon={<ActionInfo />}
primaryText="Indexed/Added torrent date" primaryText={__('Indexed/Added torrent date')}
secondaryText={moment(torrent.added * 1000).format('MMMM Do YYYY, hh:mm')} secondaryText={moment(torrent.added * 1000).format('MMMM Do YYYY, hh:mm')}
/> />
<ListItem <ListItem
// leftAvatar={<Avatar icon={<EditorInsertChart />} backgroundColor={yellow600} />} // leftAvatar={<Avatar icon={<EditorInsertChart />} backgroundColor={yellow600} />}
rightIcon={<ActionInfo />} rightIcon={<ActionInfo />}
primaryText="Content type" primaryText={__('Content type')}
secondaryText={torrent.contentType || 'unknown'} secondaryText={torrent.contentType || 'unknown'}
/> />
<ListItem <ListItem
// leftAvatar={<Avatar icon={<EditorInsertChart />} backgroundColor={yellow600} />} // leftAvatar={<Avatar icon={<EditorInsertChart />} backgroundColor={yellow600} />}
rightIcon={<ActionInfo />} rightIcon={<ActionInfo />}
primaryText="Category" primaryText={__('Category')}
secondaryText={torrent.contentCategory || 'unknown'} secondaryText={torrent.contentCategory || 'unknown'}
/> />
</List> </List>
@ -337,8 +337,8 @@ export default class TorrentPage extends Page {
value={this.state.value} value={this.state.value}
onChange={this.handleChange} onChange={this.handleChange}
> >
<Tab label="Back to main" value="main" /> <Tab label={__('Back to main')} value="main" />
<Tab label="Information" value="info" > <Tab label={__('Information')} value="info" >
<div className='column w100p'> <div className='column w100p'>
<div className='row w100p torrent-information-row'> <div className='row w100p torrent-information-row'>
<div className='info-table'> <div className='info-table'>
@ -363,7 +363,7 @@ export default class TorrentPage extends Page {
<RaisedButton <RaisedButton
href={`magnet:?xt=urn:btih:${this.torrent.hash}`} href={`magnet:?xt=urn:btih:${this.torrent.hash}`}
target="_self" target="_self"
label="Download" label={__('Download')}
backgroundColor='#00C853' backgroundColor='#00C853'
labelColor='white' labelColor='white'
style={{marginTop: 8}} style={{marginTop: 8}}
@ -399,7 +399,7 @@ export default class TorrentPage extends Page {
this.state.downloading this.state.downloading
&& &&
<div className='column center pad0-75' style={{width: '300px'}}> <div className='column center pad0-75' style={{width: '300px'}}>
<div className='fs0-75' style={{color: 'rgb(0, 188, 212)'}}>downloading {this.state.downloadProgress && (this.state.downloadProgress.progress * 100).toFixed(1)}%</div> <div className='fs0-75' style={{color: 'rgb(0, 188, 212)'}}>{__('downloading')} {this.state.downloadProgress && (this.state.downloadProgress.progress * 100).toFixed(1)}%</div>
<LinearProgress <LinearProgress
style={{marginTop: 3}} style={{marginTop: 3}}
mode="determinate" mode="determinate"
@ -420,9 +420,9 @@ export default class TorrentPage extends Page {
this.torrent.seeders || this.torrent.leechers || this.torrent.completed this.torrent.seeders || this.torrent.leechers || this.torrent.completed
? ?
<div className='fs0-85 pad0-75 center column'> <div className='fs0-85 pad0-75 center column'>
<div className='pad0-25' style={{color: '#00C853'}}>seeders: {this.torrent.seeders}</div> <div className='pad0-25' style={{color: '#00C853'}}>{__('seeders')}: {this.torrent.seeders}</div>
<div className='pad0-25' style={{color: '#AA00FF'}}>leechers: {this.torrent.leechers}</div> <div className='pad0-25' style={{color: '#AA00FF'}}>{__('leechers')}: {this.torrent.leechers}</div>
<div className='pad0-25' style={{color: '#FF6D00'}}>completed: {this.torrent.completed}</div> <div className='pad0-25' style={{color: '#FF6D00'}}>{__('completed')}: {this.torrent.completed}</div>
</div> </div>
: :
null null
@ -432,7 +432,7 @@ export default class TorrentPage extends Page {
? ?
<div className='row pad0-25'> <div className='row pad0-25'>
<RaisedButton <RaisedButton
label={`Good (${this.torrent.good})`} label={__('Good') + ` (${this.torrent.good})`}
labelColor="white" labelColor="white"
backgroundColor="#00C853" backgroundColor="#00C853"
icon={ icon={
@ -451,7 +451,7 @@ export default class TorrentPage extends Page {
/> />
<RaisedButton <RaisedButton
style={{marginLeft: '9px'}} style={{marginLeft: '9px'}}
label={`Bad (${this.torrent.bad})`} label={__('Bad') + ` (${this.torrent.bad})`}
labelColor="white" labelColor="white"
backgroundColor="#D50000" backgroundColor="#D50000"
icon={ icon={
@ -487,7 +487,7 @@ export default class TorrentPage extends Page {
height: '5px', height: '5px',
}} }}
/> />
<div className='row center pad0-75 fs0-85' style={{color: torrentRating >= 50 ? '#00E676' : '#FF3D00'}}>Torrent rating: {torrentRating}%</div> <div className='row center pad0-75 fs0-85' style={{color: torrentRating >= 50 ? '#00E676' : '#FF3D00'}}>{__('Torrent rating')}: {torrentRating}%</div>
</div> </div>
: :
null null
@ -496,7 +496,7 @@ export default class TorrentPage extends Page {
</div> </div>
</div> </div>
</Tab> </Tab>
<Tab label="Files" value="files" > <Tab label={__('Files')} value="files" >
<TorrentFiles torrent={this.torrent} /> <TorrentFiles torrent={this.torrent} />
</Tab> </Tab>
</Tabs> </Tabs>

View File

@ -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 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"/> C57.986,45.747,57.976,45.792,57.968,45.838z"/>
</svg> </svg>
<div style={{marginLeft: '5px'}}>{ formatBytes(this.stats.size, 1) } data</div> <div style={{marginLeft: '5px'}}>{ formatBytes(this.stats.size, 1) } {__('data')}</div>
</div> </div>
<div className='row inline' style={{color: '#f48641', fontSize: '1.15em', fill: '#f48641', marginLeft: '20px'}}> <div className='row inline' style={{color: '#f48641', fontSize: '1.15em', fill: '#f48641', marginLeft: '20px'}}>
@ -149,7 +149,7 @@ export default class TorrentsStatistic extends Component {
<path d="M38,46h-1c-0.552,0-1,0.447-1,1s0.448,1,1,1h1c0.552,0,1-0.447,1-1S38.552,46,38,46z"/> <path d="M38,46h-1c-0.552,0-1,0.447-1,1s0.448,1,1,1h1c0.552,0,1-0.447,1-1S38.552,46,38,46z"/>
</g> </g>
</svg> </svg>
<div style={{marginLeft: '5px'}}>{this.stats.torrents} torrents</div> <div style={{marginLeft: '5px'}}>{this.stats.torrents} {__('torrents')}</div>
</div> </div>
<div className='row inline' style={{color: '#f441e2', fontSize: '1.15em', fill: '#f441e2', marginLeft: '20px'}}> <div className='row inline' style={{color: '#f441e2', fontSize: '1.15em', fill: '#f441e2', marginLeft: '20px'}}>
@ -163,7 +163,7 @@ export default class TorrentsStatistic extends Component {
<path d="M38.914,0H6.5v60h47V14.586L38.914,0z M39.5,3.414L50.086,14H39.5V3.414z M8.5,58V2h29v14h14v42H8.5z"/> <path d="M38.914,0H6.5v60h47V14.586L38.914,0z M39.5,3.414L50.086,14H39.5V3.414z M8.5,58V2h29v14h14v42H8.5z"/>
</g> </g>
</svg> </svg>
<div style={{marginLeft: '5px'}}>{this.stats.files} files</div> <div style={{marginLeft: '5px'}}>{this.stats.files} {__('files')}</div>
</div> </div>
</div> </div>
@ -188,7 +188,7 @@ export default class TorrentsStatistic extends Component {
<circle cx="23.83" cy="23.323" r="7.271"/> <circle cx="23.83" cy="23.323" r="7.271"/>
</g> </g>
</svg> </svg>
<div style={{marginLeft: '5px'}}>{window.peers} peers</div> <div style={{marginLeft: '5px'}}>{window.peers} {__('peers')}</div>
</div> </div>
<div className='row inline' style={{color: window.peersTorrents > 0 ? '#19c687' : 'white', fontSize: '1.15em', fill: window.peersTorrents > 0 ? '#19c687' : 'white', marginLeft: '20px'}}> <div className='row inline' style={{color: window.peersTorrents > 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"/> 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"/>
</g> </g>
</svg> </svg>
<div style={{marginLeft: '5px'}}>{window.peersTorrents} remote torrents</div> <div style={{marginLeft: '5px'}}>{window.peersTorrents} {__('remote torrents')}</div>
</div> </div>
<div className='row inline' style={{color: window.p2pStatus == 2 ? '#78c619' : (window.p2pStatus == 1 ? '#c68319' : '#c6194a'), fontSize: '1.15em', fill: window.p2pStatus == 2 ? '#78c619' : (window.p2pStatus == 1 ? '#c68319' : '#c6194a'), marginLeft: '20px'}}> <div className='row inline' style={{color: window.p2pStatus == 2 ? '#78c619' : (window.p2pStatus == 1 ? '#c68319' : '#c6194a'), fontSize: '1.15em', fill: window.p2pStatus == 2 ? '#78c619' : (window.p2pStatus == 1 ? '#c68319' : '#c6194a'), marginLeft: '20px'}}>
@ -227,7 +227,7 @@ export default class TorrentsStatistic extends Component {
S29.964,45.019,27.454,45.019z"/> S29.964,45.019,27.454,45.019z"/>
</g> </g>
</svg> </svg>
<div style={{marginLeft: '5px'}}>not available</div> <div style={{marginLeft: '5px'}}>{__('not available')}</div>
</div> </div>
} }
{ {
@ -251,7 +251,7 @@ export default class TorrentsStatistic extends Component {
C402.324,327.846,355.546,305.994,305.994,305.994z"/> C402.324,327.846,355.546,305.994,305.994,305.994z"/>
</g> </g>
</svg> </svg>
<div style={{marginLeft: '5px'}}>redirect</div> <div style={{marginLeft: '5px'}}>{__('redirect')}</div>
</div> </div>
} }
{ {
@ -275,7 +275,7 @@ export default class TorrentsStatistic extends Component {
C402.324,327.846,355.546,305.994,305.994,305.994z"/> C402.324,327.846,355.546,305.994,305.994,305.994z"/>
</g> </g>
</svg> </svg>
<div style={{marginLeft: '5px'}}>direct</div> <div style={{marginLeft: '5px'}}>{__('direct')}</div>
</div> </div>
} }
</div> </div>

View File

@ -23,6 +23,32 @@
"Donate": "Donate", "Donate": "Donate",
"Help (Documentation)": "Help (Documentation)", "Help (Documentation)": "Help (Documentation)",
"Support (Discussion)": "Support (Discussion)", "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?"
} }
} }

View File

@ -23,6 +23,32 @@
"Donate": "Пожертвовать на развитие", "Donate": "Пожертвовать на развитие",
"Help (Documentation)": "Помощь (Документация)", "Help (Documentation)": "Помощь (Документация)",
"Support (Discussion)": "Помощь (Обсуждение)", "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?": "Что искать?"
} }
} }