@@ -9,6 +9,8 @@ import Resource from './Resource.jsx';
9
9
import Header from '../Header.jsx' ;
10
10
import SameNameBlock from './SameNameBlock.jsx' ;
11
11
import { DiscussionEmbed } from 'disqus-react' ;
12
+ import { t , Trans } from '@lingui/macro' ;
13
+ import { i18n } from "../../index.js"
12
14
13
15
const HIDDEN = [ 'topic' , 'resource' , 'thumbnail' , 'item' ] ;
14
16
@@ -39,17 +41,18 @@ class Item extends Component {
39
41
< Header conf = { conf } />
40
42
< div className = "Status row h5" >
41
43
< Link to = "/" className = "badge badge-pill badge-light TopicTag" >
42
- < span className = "badge badge-pill badge-dark oi oi-chevron-left" > </ span > Retour à l'accueil
44
+ < span className = "badge badge-pill badge-dark oi oi-chevron-left" > </ span >
45
+ < Trans > Retour à l'accueil</ Trans >
43
46
</ Link >
44
47
</ div >
45
48
< div className = "container-fluid" >
46
49
< div className = "App-content row" >
47
50
< div className = "col-md-4 p-4" >
48
51
< div className = "Description" >
49
- < h2 className = "h4 font-weight-bold text-center" > Description</ h2 >
52
+ < h2 className = "h4 font-weight-bold text-center" > < Trans > Description</ Trans > </ h2 >
50
53
< div className = "p-3" >
51
54
< div className = "Attributes" >
52
- < h3 className = "h4" > Attributs du document</ h3 >
55
+ < h3 className = "h4" > < Trans > Attributs du document</ Trans > </ h3 >
53
56
< hr />
54
57
< div >
55
58
{ attributes }
@@ -183,9 +186,9 @@ class Item extends Component {
183
186
}
184
187
}
185
188
186
- var placeholder = " Ajouter un attribut et une valeur..." ;
189
+ var placeholder = t ` Ajouter un attribut et une valeur...` ;
187
190
if ( this . state . attributeInputFocus ) {
188
- placeholder = " attribut : valeur" ;
191
+ placeholder = t ` attribut : valeur` ;
189
192
}
190
193
191
194
return (
@@ -194,7 +197,7 @@ class Item extends Component {
194
197
< input ref = { ( input ) => this . attributeInput = input } value = { this . state . attributeInputValue }
195
198
onChange = { attributeInputChange } onKeyDown = { attributeInputChangeKeyDown }
196
199
onFocus = { attributeInputFocus } onBlur = { attributeInputBlur }
197
- id = "new-attribute" className = "form-control" placeholder = { placeholder } type = "text" />
200
+ id = "new-attribute" className = "form-control" placeholder = { i18n . _ ( placeholder ) } type = "text" />
198
201
</ div >
199
202
< div className = "input-group-append" >
200
203
< button type = "button" className = "btn btn-sm ValidateButton btn"
@@ -278,7 +281,7 @@ class Item extends Component {
278
281
279
282
280
283
_removeTopic = async ( topicToDelete ) => {
281
- if ( window . confirm ( ' Voulez-vous réellement que l\ 'item affiché ne soit plus décrit à l\ 'aide de cette rubrique ?' ) ) {
284
+ if ( window . confirm ( i18n . _ ( t ` Voulez-vous réellement que l'item affiché ne soit plus décrit à l'aide de cette rubrique ?` ) ) ) {
282
285
return new Hypertopic ( ( await conf ) . services )
283
286
. item ( {
284
287
_id : this . props . match . params . item ,
0 commit comments