Skip to content

Commit 4f4c6b0

Browse files
committed
🔧 🌐 force locale for decimalSeparator
1 parent f4eb5df commit 4f4c6b0

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/renderer/components/AccountsPane.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,19 +89,19 @@
8989
<p>
9090
{{ 'ACCOUNTS_PANE.CARDS.BANK' | translate }}
9191
<span class="amount" :class="{ 'has-text-danger': account.inBank <= 0 }">
92-
{{account.inBank | format}} <icon size="is-small" :fa="account.currency"/>
92+
{{account.inBank.toLocaleString($root.settings.language)}} <icon size="is-small" :fa="account.currency"/>
9393
</span>
9494
</p>
9595
<p>
9696
{{ 'ACCOUNTS_PANE.CARDS.TODAY' | translate }}
9797
<span class="amount" :class="{ 'has-text-danger': account.today <= 0 }">
98-
{{account.today | format}} <icon size="is-small" :fa="account.currency"/>
98+
{{account.today.toLocaleString($root.settings.language)}} <icon size="is-small" :fa="account.currency"/>
9999
</span>
100100
</p>
101101
<p>
102102
{{ 'ACCOUNTS_PANE.CARDS.FUTURE' | translate }}
103103
<span class="amount" :class="{ 'has-text-danger': account.future <= 0 }">
104-
{{account.future | format}} <icon size="is-small" :fa="account.currency"/>
104+
{{account.future.toLocaleString($root.settings.language)}} <icon size="is-small" :fa="account.currency"/>
105105
</span>
106106
</p>
107107
</small>

src/renderer/components/MainPane/accountsDetail.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@
6969
<td><div class="is-not-too-large">{{row.beneficiary}}</div></td>
7070
<td>{{row.category}}</td>
7171
<td><div class="is-not-too-large">{{row.label}}</div></td>
72-
<td class="has-text-centered" :class="{'has-text-danger': !isFuture(row)}">{{row.amount < 0 ? row.amount: ''}}</td>
73-
<td class="has-text-centered" :class="{'has-text-success': !row.isClicked && !isFuture(row)}">{{row.amount >= 0 ? row.amount.toLocaleString(): ''}}</td>
72+
<td class="has-text-centered" :class="{'has-text-danger': !isFuture(row)}">{{row.amount < 0 ? row.amount.toLocaleString($root.settings.language): ''}}</td>
73+
<td class="has-text-centered" :class="{'has-text-success': !row.isClicked && !isFuture(row)}">{{row.amount >= 0 ? row.amount.toLocaleString($root.settings.language): ''}}</td>
7474
</tr>
7575
</transition-group>
7676
</table>

src/renderer/filters.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import Vue from 'vue'
44
import moment from 'moment'
55
import path from 'path'
66

7-
const decimalSeperator = 1.1.toLocaleString().substring(1, 2)
87
let globSettings = jsonfile.readFileSync(path.join(__static, 'settings.json'))
8+
const decimalSeperator = 1.1.toLocaleString(globSettings.language).substring(1, 2)
99
const lang = jsonfile.readFileSync(`${__static}/lang/${globSettings.language}_.json`)
1010
i18njs.add(globSettings.language, '', lang)
1111
i18njs.setLang(globSettings.language)

0 commit comments

Comments
 (0)