Skip to content
This repository was archived by the owner on Jul 2, 2023. It is now read-only.

Commit 866de20

Browse files
Merge pull request #118 from AndresMorelos/1.30.2
1.30.2
2 parents 6169130 + a03c13c commit 866de20

File tree

23 files changed

+63
-26
lines changed

23 files changed

+63
-26
lines changed

app.js

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,7 @@ function setInitialValues() {
308308
quitAtClose: false,
309309
},
310310
invoice: {
311-
exportNamingFormat:
312-
'{invoiceID}',
311+
exportNamingFormat: '{invoiceID}',
313312
exportDir: os.homedir(),
314313
template: 'default',
315314
dateFormat: 'MM/DD/YYYY',
@@ -533,11 +532,26 @@ function migrateData() {
533532
...configs,
534533
invoice: {
535534
...configs.invoice,
536-
exportNamingFormat:
537-
'{invoiceID}',
535+
exportNamingFormat: '{invoiceID}',
538536
},
539537
};
540538
},
539+
9: (configs) => {
540+
// Return current configs if this is the first time install
541+
const { defaultLanguage } = configs.general;
542+
if (defaultLanguage !== undefined && defaultLanguage === 'esES') {
543+
// Update current configs
544+
return {
545+
...configs,
546+
general: {
547+
...configs.general,
548+
defaultLanguage: 'es-ES',
549+
},
550+
};
551+
}
552+
553+
return configs;
554+
},
541555
};
542556
// Get the current Config
543557
const configs = appConfig.getSync();

app/App.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { getSecretKey, getLoadEncryptedData } from './reducers/LoginReducer'
2222
import Login from './containers/Login';
2323

2424
import windowStateKeeper from '../helpers/windowStateKeeper';
25-
import resize from './helpers/resize'
25+
import './helpers/resize'
2626
import { Notify } from '../helpers/notify'
2727
const ipc = require('electron').ipcRenderer;
2828

app/components/form/ItemRow.jsx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,25 @@ export class ItemRow extends Component {
139139

140140
uploadRowState() {
141141
const { updateRow, subItems } = this.props;
142+
const { subitems: stateSubItems } = this.state;
143+
144+
const subitemsToAdd = subItems.reduce((acc, item) => {
145+
const subitem = stateSubItems.find((subitem) => subitem.id === item.id);
146+
if (!subitem) {
147+
acc.push(item);
148+
}
149+
150+
if (subitem) {
151+
const itemUpdated = Object.assign(subitem, item);
152+
acc.push(itemUpdated);
153+
}
154+
155+
return acc;
156+
}, []);
157+
142158
updateRow({
143159
...this.state,
144-
subitems: [...subItems, ...this.state.subitems],
160+
subitems: subitemsToAdd,
145161
});
146162
}
147163

app/components/settings/General.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ class General extends Component {
105105
<option value="en">
106106
{t('settings:fields:language:en', { lng: 'en' })}
107107
</option>
108-
<option value="esES">
109-
{t('settings:fields:language:esES', { lng: 'esES' })}
108+
<option value="es-ES">
109+
{t('settings:fields:language:es-ES', { lng: 'es-ES' })}
110110
</option>
111111
<option value="fr">
112112
{t('settings:fields:language:fr', { lng: 'fr' })}

app/components/settings/_partials/invoice/Other.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const Other = function ({
5555
</ExportDir>
5656
<span style={{ color: '#757D75', fontSize: '13px' }}>
5757
{
58-
'{invoiceID} {createdAt.month} {createdAt.day} {createdAt.year} {date.month} {date.day} {date.year} {UUID}'
58+
'{invoiceID} {createdAt.month} {createdAt.MMMMM} {createdAt.day} {createdAt.year} {date.month} {date.MMMMM} {date.day} {date.year} {UUID}'
5959
}
6060
</span>
6161
</Field>

i18n/de/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"de": "Deutsch",
4242
"el": "Griechisch",
4343
"en": "Englisch",
44-
"esES": "Spanisch",
44+
"es-ES": "Spanisch",
4545
"fr": "Französisch",
4646
"id": "Indonesisch",
4747
"it": "Italienisch",

i18n/en/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"de": "German",
4848
"el": "Greek",
4949
"en": "English",
50-
"esES": "Spanish",
50+
"es-ES": "Spanish",
5151
"fr": "French",
5252
"id": "Indonesian",
5353
"it": "Italian",

i18n/esES/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"de": "German",
4343
"el": "Greek",
4444
"en": "English",
45-
"esES": "Español",
45+
"es-ES": "Español",
4646
"fr": "French",
4747
"id": "Indonesian",
4848
"it": "Italian",

i18n/fr/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"de": "Allemand",
4141
"el": "Grec",
4242
"en": "Anglais",
43-
"esES": "Espagnol",
43+
"es-ES": "Espagnol",
4444
"fr": "Français",
4545
"id": "Indonésien",
4646
"it": "Italien",

i18n/i18n.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ i18n.use(initReactI18next).init({
3333
id,
3434
it,
3535
sk,
36-
esES,
36+
'es-ES': esES,
3737
'ur-PK': urPK,
3838
vi,
3939
'zh-CN': zhCN,

0 commit comments

Comments
 (0)