@@ -42,14 +42,15 @@ class Invoice extends Component {
42
42
this . handleInputChange = this . handleInputChange . bind ( this ) ;
43
43
this . handleTaxChange = this . handleTaxChange . bind ( this ) ;
44
44
this . handleVisibilityChange = this . handleVisibilityChange . bind ( this ) ;
45
+ this . t = this . props . t ;
45
46
}
46
47
47
48
componentDidMount ( ) {
48
49
ipc . on ( 'no-access-directory' , ( event , message ) => {
49
50
openDialog ( {
50
51
type : 'warning' ,
51
- title : 'No Access Permisison' ,
52
- message : ` ${ message } . Please choose a different directory!` ,
52
+ title : this . t ( 'settings:invoice:noaccess:title' ) ,
53
+ message : message + this . t ( 'settings:invoice:noaccess:message' ) ,
53
54
} ) ;
54
55
} ) ;
55
56
@@ -146,23 +147,23 @@ class Invoice extends Component {
146
147
} = this . state ;
147
148
return (
148
149
< div >
149
- < label className = "itemLabel" > Tax Settings </ label >
150
+ < label className = "itemLabel" > { this . t ( 'settings:invoice:tax:heading' ) } </ label >
150
151
< Section >
151
152
< Row >
152
153
< Field >
153
- < label className = "itemLabel" > Tax ID </ label >
154
+ < label className = "itemLabel" > { this . t ( 'settings:invoice:tax:taxid' ) } </ label >
154
155
< input
155
156
name = "tin"
156
157
type = "text"
157
158
value = { tax . tin }
158
159
onChange = { this . handleTaxChange }
159
- placeholder = "Registration Number"
160
+ placeholder = { this . t ( 'settings:invoice:tax:taxidplaceholder' ) }
160
161
/>
161
162
</ Field >
162
163
</ Row >
163
164
< Row >
164
165
< Field >
165
- < label className = "itemLabel" > Tax Amount </ label >
166
+ < label className = "itemLabel" > { this . t ( 'settings:invoice:tax:amount' ) } </ label >
166
167
< input
167
168
name = "amount"
168
169
type = "number"
@@ -173,24 +174,24 @@ class Invoice extends Component {
173
174
/>
174
175
</ Field >
175
176
< Field >
176
- < label className = "itemLabel" > Tax Method </ label >
177
+ < label className = "itemLabel" > { this . t ( 'settings:invoice:tax:method:heading' ) } </ label >
177
178
< select
178
179
name = "method"
179
180
value = { tax . method }
180
181
onChange = { this . handleTaxChange }
181
182
>
182
- < option value = "default" > Default </ option >
183
- < option value = "reverse" > Reverse Charge </ option >
183
+ < option value = "default" > { this . t ( 'settings:invoice:tax:method:default' ) } </ option >
184
+ < option value = "reverse" > { this . t ( 'settings:invoice:tax:method:reverse' ) } </ option >
184
185
</ select >
185
186
</ Field >
186
187
</ Row >
187
188
</ Section >
188
189
189
- < label className = "itemLabel" > Required Fields </ label >
190
+ < label className = "itemLabel" > { this . t ( 'settings:invoice:reqfields:heading' ) } </ label >
190
191
< Section >
191
192
< Row >
192
193
< Field >
193
- < label className = "itemLabel" > Due Date </ label >
194
+ < label className = "itemLabel" > { this . t ( 'settings:invoice:reqfields:duedate' ) } </ label >
194
195
< label className = "switch" >
195
196
< input
196
197
name = "dueDate"
@@ -202,7 +203,7 @@ class Invoice extends Component {
202
203
</ label >
203
204
</ Field >
204
205
< Field >
205
- < label className = "itemLabel" > Currency </ label >
206
+ < label className = "itemLabel" > { this . t ( 'settings:common:currency' ) } </ label >
206
207
< label className = "switch" >
207
208
< input
208
209
name = "currency"
@@ -215,7 +216,7 @@ class Invoice extends Component {
215
216
</ Field >
216
217
217
218
< Field >
218
- < label className = "itemLabel" > Discount </ label >
219
+ < label className = "itemLabel" > { this . t ( 'settings:invoice:reqfields:discount' ) } </ label >
219
220
< label className = "switch" >
220
221
< input
221
222
name = "discount"
@@ -227,7 +228,7 @@ class Invoice extends Component {
227
228
</ label >
228
229
</ Field >
229
230
< Field >
230
- < label className = "itemLabel" > Tax </ label >
231
+ < label className = "itemLabel" > { this . t ( 'settings:invoice:reqfields:tax' ) } </ label >
231
232
< label className = "switch" >
232
233
< input
233
234
name = "tax"
@@ -239,7 +240,7 @@ class Invoice extends Component {
239
240
</ label >
240
241
</ Field >
241
242
< Field >
242
- < label className = "itemLabel" > Note </ label >
243
+ < label className = "itemLabel" > { this . t ( 'settings:invoice:reqfields:note' ) } </ label >
243
244
< label className = "switch" >
244
245
< input
245
246
name = "note"
@@ -253,11 +254,11 @@ class Invoice extends Component {
253
254
</ Row >
254
255
</ Section >
255
256
256
- < label className = "itemLabel" > Other </ label >
257
+ < label className = "itemLabel" > { this . t ( 'settings:invoice:other:heading' ) } </ label >
257
258
< Section >
258
259
< Row >
259
260
< Field >
260
- < label className = "itemLabel" > Currency </ label >
261
+ < label className = "itemLabel" > { this . t ( 'settings:common:currency' ) } </ label >
261
262
< select
262
263
name = "currency"
263
264
value = { currency }
@@ -267,20 +268,20 @@ class Invoice extends Component {
267
268
</ select >
268
269
</ Field >
269
270
< Field >
270
- < label className = "itemLabel" > Template </ label >
271
+ < label className = "itemLabel" > { this . t ( 'settings:invoice:other:template:heading' ) } </ label >
271
272
< select
272
273
name = "template"
273
274
value = { template }
274
275
onChange = { this . handleInputChange }
275
276
>
276
- < option value = "minimal" > Minimal </ option >
277
- < option value = "business" > Business </ option >
277
+ < option value = "minimal" > { this . t ( 'settings:invoice:other:template:minimal' ) } </ option >
278
+ < option value = "business" > { this . t ( 'settings:invoice:other:template:business' ) } </ option >
278
279
</ select >
279
280
</ Field >
280
281
</ Row >
281
282
< Row >
282
283
< Field >
283
- < label className = "itemLabel" > Date Format </ label >
284
+ < label className = "itemLabel" > { this . t ( 'settings:invoice:other:dateformat' ) } </ label >
284
285
< select
285
286
name = "dateFormat"
286
287
value = { dateFormat }
@@ -315,7 +316,7 @@ class Invoice extends Component {
315
316
</ select >
316
317
</ Field >
317
318
< Field >
318
- < label className = "itemLabel" > PDF Export Directory </ label >
319
+ < label className = "itemLabel" > { this . t ( 'settings:invoice:other:exportdir' ) } </ label >
319
320
< div className = "input-group" >
320
321
< input
321
322
className = "form-control"
0 commit comments