Skip to content

Commit

Permalink
Fix incomplete localization
Browse files Browse the repository at this point in the history
  • Loading branch information
jaszhix committed Jan 19, 2017
1 parent 0d8c331 commit 49799c5
Show file tree
Hide file tree
Showing 7 changed files with 122 additions and 37 deletions.
15 changes: 12 additions & 3 deletions app/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -442,15 +442,24 @@
"searchSession": {
"message": "Search Session"
},
"synchronized": {
"message": "Synchronized"
},
"synchronizeSession": {
"message": "Synchronize Session"
},
"desynchronizeSession": {
"message": "Desynchronize Session"
},
"restoreSession": {
"message": "Restore Session"
},
"removeSession": {
"message": "Remove Session"
},
"window": {
"message": "Window"
},
"closeWindow": {
"message": "Close Window"
},
Expand Down Expand Up @@ -643,10 +652,10 @@
"contributeHeader": {
"message": "Why contribute?"
},
"specialThanks": {
"message": "Special Thanks"
},
"license": {
"message": "license"
},
"faq": {
"message": "FAQ"
}
}
16 changes: 14 additions & 2 deletions app/_locales/es/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"message": "marcadores"
},
"tabs": {
"message": "pestañas"
"message": "lengüetas"
},
"sessions": {
"message": "sesiones"
Expand Down Expand Up @@ -243,7 +243,7 @@
"message": "Preferencias"
},
"about": {
"message": "Acerca de"
"message": "Sobre"
},
"enableContextMenu": {
"message": "Habilitar menú contextual"
Expand Down Expand Up @@ -440,15 +440,24 @@
"searchSession": {
"message": "Sesión de búsqueda"
},
"synchronized": {
"message": "Sincronizado"
},
"synchronizeSession": {
"message": "Sincronizar sesión"
},
"desynchronizeSession": {
"message": "Desincronizar sesión"
},
"restoreSession": {
"message": "Restaurar sesion"
},
"removeSession": {
"message": "Eliminar sesión"
},
"window": {
"message": "Ventana"
},
"closeWindow": {
"message": "Cerrar ventana"
},
Expand Down Expand Up @@ -641,6 +650,9 @@
"contributeHeader": {
"message": "¿Por qué contribuir?"
},
"specialThanks": {
"message": "Gracias Especiales"
},
"license": {
"message": "license"
}
Expand Down
31 changes: 21 additions & 10 deletions app/scripts/components/about.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,30 @@ import {utilityStore} from './stores/main';
import {Btn, Col, Row} from './bootstrap';

import changelog from 'html!markdown!../../../changelog.md';
import support from 'html!markdown!../../../support.md';
/*let supportFile = `html!markdown!../../../support_${chrome.i18n.getUILanguage()}.md`;
import support from supportFile;*/
import license from 'html!markdown!../../../COPYING';

var Contribute = React.createClass({
render:function(){
let contributeFile;
let locale = chrome.i18n.getUILanguage();
if (locale === 'es') {
contributeFile = require('html!markdown!../../../contribute_es.md');
} else {
contributeFile = require('html!markdown!../../../contribute.md');
}
function createMarkup() { return {__html: contributeFile};}
return (
<div style={{marginTop: '49px'}}>
<h4>Why contribute?</h4>
<p>Tab Master 5000 is free of cost and doesn't generate any revenue directly. If you are a happier Chrome user because of this extension, a donation will help me ration more time to this project. As a developer, I have to choose my time wisely, and while I love working on it, it is not always easy to sit down and improve the extension while I have other obligations.</p>
<p>If you are a developer and would like to contribute time to this project, you can submit pull requests to this project's master branch on Github.</p>
<p>Submitting bug reports and suggesting new features on Github or the Chrome Web Store is also helpful.</p>
<p>All contributors will be listed on this page after each extension update unless they opt out.</p>
<p>Thanks for using Tab Master!</p>
<p>Jason Hicks</p>
<h4>{utils.t('contributeHeader')}</h4>
<div dangerouslySetInnerHTML={createMarkup()} />
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
<input type="hidden" name="cmd" value="_s-xclick" />
<input type="hidden" name="hosted_button_id" value="8VL34HHRFN3LS" />
<Btn className="ntg-top-btn" name="submit">PayPal</Btn>
</form>
<h4>Special Thanks</h4>
<h4>{utils.t('specialThanks')}</h4>
<ul>
<li>Alex Dorey</li>
<li>Joel Zipkin</li>
Expand Down Expand Up @@ -63,7 +67,14 @@ var License = React.createClass({

var Support = React.createClass({
render(){
function createMarkup() { return {__html: support};}
let supportFile;
let locale = chrome.i18n.getUILanguage();
if (locale === 'es') {
supportFile = require('html!markdown!../../../support_es.md');
} else {
supportFile = require('html!markdown!../../../support.md');
}
function createMarkup() { return {__html: supportFile};}
return (
<div style={{marginTop: '49px'}}>
<Col size="2" />
Expand Down
44 changes: 22 additions & 22 deletions app/scripts/components/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,14 +341,14 @@ var Theming = React.createClass({
<Col size="4" style={{marginTop: '28px'}}>
<Row>
{themeFields2.map((field, i)=>{
return <ColorPickerContainer key={field.themeKey} onChange={()=>this.setState({boldUpdate: true})} hoverBg={p.theme.settingsItemHover} color={p.theme[field.themeKey]} themeKey={field.themeKey} label={field.label}/>;
return <ColorPickerContainer key={field.themeKey} onChange={()=>this.setState({boldUpdate: true})} hoverBg={p.theme.settingsItemHover} color={p.theme[field.themeKey]} themeKey={field.themeKey} label={utils.t(field.themeKey)}/>;
})}
</Row>
</Col>
<Col size="4" style={{marginTop: '28px'}}>
<Row>
{themeFields3.map((field, i)=>{
return <ColorPickerContainer key={field.themeKey} onChange={()=>this.setState({boldUpdate: true})} hoverBg={p.theme.settingsItemHover} color={p.theme[field.themeKey]} themeKey={field.themeKey} label={field.label}/>;
return <ColorPickerContainer key={field.themeKey} onChange={()=>this.setState({boldUpdate: true})} hoverBg={p.theme.settingsItemHover} color={p.theme[field.themeKey]} themeKey={field.themeKey} label={utils.t(field.themeKey)}/>;
})}
</Row>
</Col>
Expand Down Expand Up @@ -447,9 +447,9 @@ var Sessions = React.createClass({
var s = this.state;
p.modal.footer = (
<div>
<Btn onClick={()=>sessionsStore.exportSessions(p.sessions)} className="ntg-setting-btn" icon="database-export">Export</Btn>
<Btn onClick={this.triggerInput} className="ntg-setting-btn" icon="database-insert">Import</Btn>
<Btn onClick={()=>sessionsStore.v2Save({tabs: p.allTabs, label: s.sessionLabelValue})} className="ntg-setting-btn pull-right" icon="floppy-disk">Save Session</Btn>
<Btn onClick={()=>sessionsStore.exportSessions(p.sessions)} className="ntg-setting-btn" icon="database-export">{utils.t('export')}</Btn>
<Btn onClick={this.triggerInput} className="ntg-setting-btn" icon="database-insert">{utils.t('import')}</Btn>
<Btn onClick={()=>sessionsStore.v2Save({tabs: p.allTabs, label: s.sessionLabelValue})} className="ntg-setting-btn pull-right" icon="floppy-disk">{utils.t('saveSession')}</Btn>
</div>
);
state.set({modal: p.modal});
Expand Down Expand Up @@ -545,7 +545,7 @@ var Sessions = React.createClass({
return (
<div className="sessions">
<Col size="6" className="session-col" onMouseLeave={()=>this.handleSessionHoverOut(-1)}>
<h4>Saved Sessions {p.sessions.length > 0 ? `(${p.sessions.length})` : null}</h4>
<h4>{utils.t('savedSessions')} {p.sessions.length > 0 ? `(${p.sessions.length})` : null}</h4>
{p.sessions.map((session, i)=>{
var time = _.capitalize(moment(session.timeStamp).fromNow());
var _time = time === 'A few seconds ago' ? 'Seconds ago' : time;
Expand All @@ -559,13 +559,13 @@ var Sessions = React.createClass({
return int;
};
var tabsCount = getTabsCount();
var sessionTitle = `${session.label ? session.label : _time}: ${session.tabs.length} Window${session.tabs.length > 1 ? 's' : ''}, ${tabsCount} Tab${tabsCount > 1 ? 's' : ''}`;
var sessionTitle = `${session.label ? session.label : _time}: ${session.tabs.length} ${utils.t('window')}${session.tabs.length > 1 ? 's' : ''}, ${tabsCount} ${utils.t('tab')}${tabsCount > 1 ? 's' : ''}`;
return (
<Row onMouseEnter={()=>this.handleSessionHoverIn(i)} onMouseLeave={()=>this.handleSessionHoverOut(i)} key={i} className="ntg-session-row" style={{backgroundColor: s.sessionHover === i ? p.theme.settingsItemHover : 'initial', minHeight: '30px'}}>
<Row style={{marginBottom: s.expandedSession === i ? '1px' : 'initial'}}>
<div style={{width: 'auto', float: 'left', display: 'inline', position: 'relative', top: '1px'}}>
<div onClick={(e)=>this.expandSelectedSession(i, e)} className={"ntg-session-text session-text-"+i} style={{paddingBottom: s.expandedSession === i ? '4px' : 'initial', cursor: 'pointer'}}>
{p.prefs.syncedSession === session.id ? <span title="Synchronized" style={{paddingRight: '5px', color: p.theme.bodyText}}><i className="icon-sync"/></span> : null}
{p.prefs.syncedSession === session.id ? <span title={utils.t('synchronized')}style={{paddingRight: '5px', color: p.theme.bodyText}}><i className="icon-sync"/></span> : null}
{sessionTitle}
</div>
</div>
Expand All @@ -577,39 +577,39 @@ var Sessions = React.createClass({
icon="cross"
faStyle={{fontSize: '18px', position: 'relative', top: '0px'}}
noIconPadding={true}
data-tip="Remove Session" /> : null}
data-tip={utils.t('removeSession')} /> : null}
{s.sessionHover === i ?
<Btn
onClick={()=>sessionsStore.restore(session, p.prefs.screenshot)}
className="ntg-session-btn"
icon="folder-open2"
faStyle={{fontSize: '14px', position: 'relative', top: '0px'}}
noIconPadding={true}
data-tip="Restore Session"/> : null}
data-tip={utils.t('restoreSession')}/> : null}
{s.sessionHover === i && p.prefs.sessionsSync ?
<Btn
onClick={()=>msgStore.setPrefs({syncedSession: p.prefs.syncedSession === session.id ? null : session.id})}
className="ntg-session-btn"
icon="sync"
faStyle={{fontWeight: p.prefs.syncedSession === session.id ? '600' : 'initial', position: 'relative', top: '0px'}}
noIconPadding={true}
data-tip={p.prefs.syncedSession === session.id ? 'Desynchronize Session' : 'Synchronize Session'}/> : null}
data-tip={p.prefs.syncedSession === session.id ? utils.t('desynchronizeSession') : utils.t('synchronizeSession')}/> : null}
{s.sessionHover === i ?
<Btn
onClick={()=>this.setState({searchField: i, expandedSession: i})}
className="ntg-session-btn"
icon="search4"
faStyle={{fontSize: '13px', position: 'relative', top: '0px'}}
noIconPadding={true}
data-tip="Search Session"/> : null}
data-tip={utils.t('searchSession')}/> : null}
{!s.labelSession ? s.sessionHover === i && s.labelSession !== i ?
<Btn
onClick={()=>this.setState({labelSession: i, expandedSession: i})}
className="ntg-session-btn"
icon="pencil"
faStyle={{fontSize: '13px', position: 'relative', top: '0px'}}
noIconPadding={true}
data-tip="Edit Label" /> : null : null}
data-tip={utils.t('editLabel')} /> : null : null}
</div>
</Row>
{s.expandedSession === i ?
Expand All @@ -628,7 +628,7 @@ var Sessions = React.createClass({
value={s.sessionLabelValue}
className="form-control label-session-input"
style={{backgroundColor: p.theme.settingsBg, color: p.theme.bodyText}}
placeholder={session.label ? session.label : 'Label...'}
placeholder={session.label ? session.label : `${utils.t('label')}...`}
onChange={this.setLabel} />
</form>
</Col>
Expand All @@ -644,12 +644,12 @@ var Sessions = React.createClass({
value={s.search}
className="form-control session-field"
style={{backgroundColor: p.theme.settingsBg, color: p.theme.bodyText}}
placeholder="Search session..."
placeholder={`${utils.t('searchSession')}...`}
onChange={(e)=>this.setState({search: e.target.value})} />
</Col> : null}
</Row>
{session.tabs.map((_window, w)=>{
var windowTitle = `Window ${w + 1}: ${_window.length} Tabs`;
var windowTitle = `${utils.t('window')} ${w + 1}: ${_window.length} ${utils.t('tabs')}`;
return (
<Row key={w} className="ntg-session-row" style={{backgroundColor: s.windowHover === w ? p.theme.settingsItemHover : p.theme.settingsBg}} onMouseEnter={()=>this.setState({windowHover: w})}>
<Row className="ntg-session-text" style={{marginBottom: s.selectedSavedSessionWindow === w || s.search.length > 0 ? '1px' : 'initial', minHeight: '22px'}}>
Expand All @@ -662,7 +662,7 @@ var Sessions = React.createClass({
icon="folder-open2"
faStyle={{fontSize: '14px', position: 'relative', top: '0px'}}
noIconPadding={true}
data-tip="Restore Window"/> : null}
data-tip={utils.t('restoreWindow')}/> : null}
</div>
</Row>
{s.selectedSavedSessionWindow === w || s.search.length > 0 ?
Expand All @@ -689,7 +689,7 @@ var Sessions = React.createClass({
icon="cross"
faStyle={{fontSize: '18px', position: 'relative', top: '0px'}}
noIconPadding={true}
data-tip="Remove Tab" />: null}
data-tip={utils.t('removeTab')} />: null}
</Col>
</Row>
);
Expand All @@ -707,9 +707,9 @@ var Sessions = React.createClass({

</Col>
<Col size="6" className="session-col" onMouseLeave={()=>this.setState({currentSessionHover: -1})}>
<h4>Current Session</h4>
<h4>{utils.t('currentSession')}</h4>
{p.allTabs ? p.allTabs.map((_window, w)=>{
var windowTitle = `Window ${w + 1}: ${_window.length} Tabs`;
var windowTitle = `${utils.t('window')} ${w + 1}: ${_window.length} ${_.upperFirst(utils.t('tabs'))}`;
return (
<Row key={w} className="ntg-session-row" style={{backgroundColor: s.currentSessionHover === w ? p.theme.settingsItemHover : 'initial'}} onMouseEnter={()=>this.setState({currentSessionHover: w})} onMouseLeave={()=>this.setState({currentSessionTabHover: -1})}>
<Row className="ntg-session-text">
Expand All @@ -722,7 +722,7 @@ var Sessions = React.createClass({
icon="cross"
faStyle={{fontSize: '18px', position: 'relative', top: '0px'}}
noIconPadding={true}
data-tip="Close Window" /> : null}
data-tip={utils.t('closeWindow')} /> : null}
</div>
</Row>
{s.selectedCurrentSessionWindow === w ?
Expand All @@ -747,7 +747,7 @@ var Sessions = React.createClass({
icon="cross"
faStyle={{fontSize: '18px', position: 'relative', top: '0px'}}
noIconPadding={true}
data-tip="Close Tab" /> : null}
data-tip={utils.t('closeTab')} /> : null}
</div>
</Row>
);
Expand Down
11 changes: 11 additions & 0 deletions contribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Tab Master 5000 is free of cost and doesn't generate any revenue directly. If you are a happier Chrome user because of this extension, a donation will help me ration more time to this project. As a developer, I have to choose my time wisely, and while I love working on it, it is not always easy to sit down and improve the extension while I have other obligations.

If you are a developer and would like to contribute time to this project, you can submit pull requests to this project's master branch on Github.

Submitting bug reports and suggesting new features on Github or the Chrome Web Store is also helpful.

All contributors will be listed on this page after each extension update unless they opt out.

Thanks for using Tab Master!

Jason Hicks
11 changes: 11 additions & 0 deletions contribute_es.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Tab Master 5000 está libre de costo y no genera ningún ingreso directamente. Si eres un usuario de Chrome más feliz debido a esta extensión, una donación me ayudará a racionar más tiempo a este proyecto. Como desarrollador, tengo que escoger mi tiempo sabiamente, y aunque me encanta trabajar en él, no siempre es fácil sentarse y mejorar la extensión mientras tengo otras obligaciones.

Si es un desarrollador y desea contribuir con tiempo a este proyecto, puede enviar solicitudes de extracción a la rama principal de este proyecto en Github.

También es útil enviar informes de errores y sugerir nuevas funciones en Github o Chrome Web Store.

Todos los contribuyentes aparecerán en esta página después de cada actualización de la extensión, a menos que se retiren.

Gracias por usar Tab Master!

Jason Hicks
Loading

0 comments on commit 49799c5

Please sign in to comment.