Skip to content

Commit

Permalink
feat(translations-ru): more translations (part 2)
Browse files Browse the repository at this point in the history
  • Loading branch information
DEgITx committed May 18, 2018
1 parent 09688e6 commit 7f91b9e
Show file tree
Hide file tree
Showing 14 changed files with 286 additions and 106 deletions.
72 changes: 36 additions & 36 deletions src/app/config-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ export default class ConfigPage extends Page {
return (
<div>
<div className='row center pad0-75'>
<RaisedButton label="Back to main page" primary={true} onClick={() => {
<RaisedButton label={__('Back to main page')} primary={true} onClick={() => {
window.router('/')
}} />
</div>
<div className='column center w100p pad0-75'>
<Toggle
style={{marginTop: '10px'}}
label="Enabled network scanning"
label={__('Enabled network scanning')}
toggled={this.options.indexer}
onToggle={(e, checked) => {
this.options.indexer = checked
Expand All @@ -58,11 +58,11 @@ export default class ConfigPage extends Page {
/>
<div className='column w100p'>
<div className='row inline w100p'>
<div style={{flex: 1}}>Scanning port</div>
<div style={{flex: 1}}>{__('Scanning port')}</div>
<TextField
style={{width: 65}}
hintText="Port"
errorText={this.options.spiderPort > 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)
Expand All @@ -75,16 +75,16 @@ export default class ConfigPage extends Page {
}}
/>
</div>
<div className='fs0-75' style={{color: 'grey'}}>* For current work TCP and UDP ports must be fully open and forward in case of router usage</div>
<div className='fs0-75' style={{color: 'grey'}}>* {__('For current work TCP and UDP ports must be fully open and forward in case of router usage')}</div>
</div>

<div className='column w100p'>
<div className='row inline w100p'>
<div style={{flex: 1}}>Trackers responce port</div>
<div style={{flex: 1}}>{__('Trackers responce port')}</div>
<TextField
style={{width: 65}}
hintText="Port"
errorText={this.options.udpTrackersPort > 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)
Expand All @@ -97,12 +97,12 @@ export default class ConfigPage extends Page {
}}
/>
</div>
<div className='fs0-75' style={{color: 'grey'}}>* For current work UDP port must be fully open and forward in case of router usage</div>
<div className='fs0-75' style={{color: 'grey'}}>* {__('For current work UDP port must be fully open and forward in case of router usage')}</div>
</div>

<Toggle
style={{marginTop: '10px'}}
label="Enabled UPnP"
label={__('Enabled UPnP')}
toggled={this.options.upnp}
onToggle={(e, checked) => {
this.options.upnp = checked
Expand All @@ -111,10 +111,10 @@ export default class ConfigPage extends Page {
/>

<div className='row inline w100p'>
<div style={{flex: 1}}>Collection directory</div>
<div style={{flex: 1}}>{__('Collection directory')}</div>
<TextField
hintText="Db path"
errorText={this.options.dbPath && this.options.dbPath.length > 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))
Expand All @@ -124,7 +124,7 @@ export default class ConfigPage extends Page {
this.forceUpdate()
}}
/>
<RaisedButton style={{marginLeft: 20}} label="Browse" primary={true} onClick={() => {
<RaisedButton style={{marginLeft: 20}} label={__('Browse')} primary={true} onClick={() => {
if(!dialog)
return
const dir = dialog.showOpenDialog({properties: ['openDirectory']})[0]
Expand All @@ -137,9 +137,9 @@ export default class ConfigPage extends Page {
</div>

<div className='row inline w100p'>
<div style={{flex: 1}}>Download torrents directory</div>
<div style={{flex: 1}}>{__('Download torrents directory')}</div>
<TextField
hintText="Download path"
hintText={__('Download path')}
value={this.options.client && this.options.client.downloadPath}
onChange={(e, value) => {
if(!fs.existsSync(value))
Expand All @@ -149,7 +149,7 @@ export default class ConfigPage extends Page {
this.forceUpdate()
}}
/>
<RaisedButton style={{marginLeft: 20}} label="Browse" primary={true} onClick={() => {
<RaisedButton style={{marginLeft: 20}} label={__('Browse')} primary={true} onClick={() => {
if(!dialog)
return
const dir = dialog.showOpenDialog({properties: ['openDirectory']})[0]
Expand All @@ -161,10 +161,10 @@ export default class ConfigPage extends Page {
}} />
</div>

<div style={{marginTop: 10}}>P2P Rats network settings:</div>
<div style={{marginTop: 10}}>{__('P2P Rats network settings')}:</div>
<Toggle
style={{marginTop: '10px'}}
label="Enabled p2p search"
label={__('Enabled p2p search')}
toggled={this.options.p2p}
onToggle={(e, checked) => {
this.options.p2p = this.options.indexer && checked
Expand All @@ -174,18 +174,18 @@ export default class ConfigPage extends Page {
<div className='column w100p'>
<Toggle
style={{marginTop: '10px'}}
label="Enabled bootstrap peers"
label={__('Enabled bootstrap peers')}
toggled={this.options.p2pBootstrap}
onToggle={(e, checked) => {
this.options.p2pBootstrap = checked
this.forceUpdate()
}}
/>
<div className='fs0-75' style={{color: 'grey'}}>* Use extrnral bootstrap nodes to get p2p peers when network setted wrong or need external source</div>
<div className='fs0-75' style={{color: 'grey'}}>* {__('Use extrnral bootstrap nodes to get p2p peers when network setted wrong or need external source')}</div>
</div>
<div className='column w100p'>
<div className='row inline w100p'>
<div style={{flex: 1}}>Max peers limit (current: {this.options.p2pConnections})</div>
<div style={{flex: 1}}>{__('Max peers limit')} ({__('current')}: {this.options.p2pConnections})</div>
<Slider
min={10}
max={25}
Expand All @@ -202,21 +202,21 @@ export default class ConfigPage extends Page {
<div className='column w100p'>
<Toggle
style={{marginTop: '10px'}}
label="P2P torrents replication"
label={__('P2P torrents replication')}
toggled={this.options.p2pReplication}
onToggle={(e, checked) => {
this.options.p2pReplication = checked
this.forceUpdate()
}}
/>
<div className='fs0-75' style={{color: 'grey'}}>* Enable torrents replication from another rats clients. Dont recomended if torrent scanner works correct.</div>
<div className='fs0-75' style={{color: 'grey'}}>* {__('Enable torrents replication from another rats clients. Dont recomended if torrent scanner works correct')}.</div>
</div>


<div style={{marginTop: 10}}>Torrent network scanner settings:</div>
<div style={{marginTop: 10}}>{__('Torrent network scanner settings')}:</div>
<div className='column w100p'>
<div className='row inline w100p'>
<div style={{flex: 1}}>Scanner walk speed (current: {this.options.spider && this.options.spider.walkInterval}) [affected after program reload]</div>
<div style={{flex: 1}}>{__('Scanner walk speed')} ({__('current')}: {this.options.spider && this.options.spider.walkInterval}) [{__('affected after program reload')}]</div>
<Slider
min={1}
max={150}
Expand All @@ -229,12 +229,12 @@ export default class ConfigPage extends Page {
}}
/>
</div>
<div className='fs0-75' style={{color: 'grey'}}>* 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</div>
<div className='fs0-75' style={{color: 'grey'}}>* {__('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</div>
</div>
<div className='column w100p'>
<div className='row inline w100p'>
<div style={{flex: 1}}>Nodes usage (current: {this.options.spider && this.options.spider.nodesUsage})</div>
<div style={{flex: 1}}>{__('Nodes usage')} ({__('current')}: {this.options.spider && this.options.spider.nodesUsage})</div>
<Slider
min={0}
max={1000}
Expand All @@ -247,13 +247,13 @@ export default class ConfigPage extends Page {
}}
/>
</div>
<div className='fs0-75' style={{color: 'grey'}}>* 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).
<div className='fs0-75' style={{color: 'grey'}}>* {__('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')}).
</div>
</div>
<div className='column w100p'>
<div className='row inline w100p'>
<div style={{flex: 1}}>Reduce network packages (current: {this.options.spider && this.options.spider.packagesLimit})</div>
<div style={{flex: 1}}>{__('Reduce network packages')} ({__('current')}: {this.options.spider && this.options.spider.packagesLimit})</div>
<Slider
min={0}
max={2000}
Expand All @@ -266,19 +266,19 @@ export default class ConfigPage extends Page {
}}
/>
</div>
<div className='fs0-75' style={{color: 'grey'}}>* 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).
<div className='fs0-75' style={{color: 'grey'}}>* {__('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')}).
</div>
</div>

{
this.settingsSavedMessage
&&
<div style={{color: 'green'}}>Settings saved</div>
<div style={{color: 'green'}}>{__('Settings saved')}</div>
}

<div className='row center pad0-75'>
<RaisedButton label="Save Settings" primary={true} onClick={() => {
<RaisedButton label={__('Save Settings')} primary={true} onClick={() => {
this.saveSettings()
}} />
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/app/download-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default class TopPage extends Page {
return (
<div>
<div className='column center w100p pad0-75'>
<RaisedButton label="Back to main page" primary={true} onClick={() => {
<RaisedButton label={__('Back to main page')} primary={true} onClick={() => {
window.router('/')
}} />
<List style={{paddingBottom: '70px'}} className='animated recent-torrents'>
Expand Down
36 changes: 18 additions & 18 deletions src/app/filters-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default class ConfigPage extends Page {
return (
<div>
<div className='row center pad0-75'>
<RaisedButton label="Back to main page" primary={true} onClick={() => {
<RaisedButton label={__("Back to main page")} primary={true} onClick={() => {
window.router('/')
}} />
</div>
Expand All @@ -48,7 +48,7 @@ export default class ConfigPage extends Page {

<div className='column w100p'>
<div className='row inline w100p'>
<div style={{flex: 1}}>Max files per torrent (current: {this.options.filters && this.options.filters.maxFiles})</div>
<div style={{flex: 1}}>{__('Max files per torrent')} ({__('current')}: {this.options.filters && this.options.filters.maxFiles})</div>
<Slider
min={0}
max={50000}
Expand All @@ -61,7 +61,7 @@ export default class ConfigPage extends Page {
}}
/>
<TextField
hintText="Max files"
hintText={__('Max files')}
className='pad0-75'
style={{width: 200}}
value={this.options.filters && this.options.filters.maxFiles}
Expand All @@ -74,13 +74,13 @@ export default class ConfigPage extends Page {
}}
/>
</div>
<div className='fs0-75' style={{color: 'grey'}}>* 0 - Disabled.
<div className='fs0-75' style={{color: 'grey'}}>* 0 - {__('Disabled')}.
</div>
</div>

<div className='column w100p'>
<div className='row inline w100p'>
<div style={{flex: 1}}>Torrent name regular extension filtering</div>
<div style={{flex: 1}}>{__('Torrent name regular extension filtering')}</div>
<TextField
hintText="regex"
className='pad0-75'
Expand All @@ -96,7 +96,7 @@ export default class ConfigPage extends Page {
/>
<SelectField
style={{marginLeft: 15}}
floatingLabelText="Examples"
floatingLabelText={__('Examples')}
value={this.options.filters && this.options.filters.namingRegExp}
onChange={(event, index, value) => {
if(!this.options.filters)
Expand All @@ -106,14 +106,14 @@ export default class ConfigPage extends Page {
this.forceUpdate()
}}
>
<MenuItem value={String.raw`^[А-Яа-я0-9A-Za-z.!@?#"$%&:;() *\+,\/;\-=[\\\]\^_{|}<>\u0400-\u04FF]+$`} primaryText="Russian + English only (With symbols)" />
<MenuItem value={'^[0-9A-Za-z.!@?#"$%&:;() *\+,\/;\-=[\\\]\^_{|}<>]+$'} primaryText="English only (With symbols)" />
<MenuItem value={'^((?!badword).)*$'} primaryText="Ignore badword" />
<MenuItem value={String.raw`^[А-Яа-я0-9A-Za-z.!@?#"$%&:;() *\+,\/;\-=[\\\]\^_{|}<>\u0400-\u04FF]+$`} primaryText={__('Russian + English only (With symbols)')} />
<MenuItem value={'^[0-9A-Za-z.!@?#"$%&:;() *\+,\/;\-=[\\\]\^_{|}<>]+$'} primaryText={__('English only (With symbols)')} />
<MenuItem value={'^((?!badword).)*$'} primaryText={__('Ignore badword')} />
</SelectField>
</div>
<Toggle
style={{marginTop: '10px'}}
label="Negative regular extension filtering"
label={__('Negative regular extension filtering')}
toggled={this.options.filters && this.options.filters.namingRegExpNegative}
onToggle={(e, checked) => {
if(!this.options.filters)
Expand All @@ -124,13 +124,13 @@ export default class ConfigPage extends Page {
}}
/>
<div className='fs0-75' style={{color: 'grey'}}>
* - clean string means disabled
* - {__('clean string means disabled')}
</div>
</div>

<Toggle
style={{marginTop: '10px'}}
label="Adult filter"
label={__('Adult filter')}
toggled={this.options.filters && this.options.filters.adultFilter}
onToggle={(e, checked) => {
if(!this.options.filters)
Expand All @@ -145,32 +145,32 @@ export default class ConfigPage extends Page {
{
this.toRemoveProbably && this.toRemoveProbably > 0
?
<div style={{color: 'orange'}}>Torrents to clean: {this.toRemoveProbably}</div>
<div style={{color: 'orange'}}>{__('Torrents to clean')}: {this.toRemoveProbably}</div>
:
null
}
{
this.toRemove && this.toRemove > 0
?
<div style={{color: 'red'}}>Torrents cleaned: {this.toRemove}</div>
<div style={{color: 'red'}}>{__('Torrents cleaned')}: {this.toRemove}</div>
:
null
}

{
this.settingsSavedMessage
&&
<div style={{color: 'green'}}>Settings saved</div>
<div style={{color: 'green'}}>{__('Settings saved')}</div>
}

<div className='row center pad0-75'>
<RaisedButton label="Check torrents" primary={true} onClick={() => {
<RaisedButton label={__('Check torrents')} primary={true} onClick={() => {
window.torrentSocket.emit('removeTorrents', true, window.customLoader((toRemove) => {
this.toRemoveProbably = toRemove
this.forceUpdate()
}));
}} />
<RaisedButton label="Clean torrents" secondary={true} onClick={() => {
<RaisedButton label={__('Clean torrents')} secondary={true} onClick={() => {
window.torrentSocket.emit('removeTorrents', false, window.customLoader((toRemove) => {
this.toRemove = toRemove
this.forceUpdate()
Expand All @@ -179,7 +179,7 @@ export default class ConfigPage extends Page {
</div>

<div className='row center pad0-75'>
<RaisedButton label="Save Settings" primary={true} onClick={() => {
<RaisedButton label={__('Save Settings')} primary={true} onClick={() => {
this.saveSettings()
}} />
</div>
Expand Down
Loading

0 comments on commit 7f91b9e

Please sign in to comment.