Browse Source

translation of MenuProfil and Notification component's on the header

AlexiCauvin 6 years ago
parent
commit
51d000cadb

+ 6 - 1
frontend/i18next.scanner/en/translation.json View File

14
   "Move": "Move",
14
   "Move": "Move",
15
   "Download": "Download",
15
   "Download": "Download",
16
   "Archive": "Archive",
16
   "Archive": "Archive",
17
-  "Delete": "Delete"
17
+  "Delete": "Delete",
18
+  "My Account": "My Account",
19
+  "Logout": "Logout",
20
+  "Notification": "Notification",
21
+  "Archive Topic": "Archive Topic",
22
+  "Deleted File": "Deleted File"
18
 }
23
 }

+ 6 - 1
frontend/i18next.scanner/fr/translation.json View File

14
   "Move": "Déplacer",
14
   "Move": "Déplacer",
15
   "Download": "Télécharger",
15
   "Download": "Télécharger",
16
   "Archive": "Archiver",
16
   "Archive": "Archiver",
17
-  "Delete": "Supprimer"
17
+  "Delete": "Supprimer",
18
+  "My Account": "Mon Compte",
19
+  "Logout": "Se Déconnecter",
20
+  "Notification": "Notification",
21
+  "Archive Topic": "Conversation archivée",
22
+  "Deleted File": "Fichier supprimé"
18
 }
23
 }

+ 4 - 3
frontend/src/component/Header/MenuActionListItem/MenuProfil.jsx View File

2
 import { Link } from 'react-router-dom'
2
 import { Link } from 'react-router-dom'
3
 import PropTypes from 'prop-types'
3
 import PropTypes from 'prop-types'
4
 import { PAGE } from '../../../helper.js'
4
 import { PAGE } from '../../../helper.js'
5
+import { translate } from 'react-i18next'
5
 
6
 
6
 const MenuProfil = props => {
7
 const MenuProfil = props => {
7
   return props.user.logged
8
   return props.user.logged
17
           <div className='profilgroup__setting dropdown-menu' aria-labelledby='dropdownMenuButton'>
18
           <div className='profilgroup__setting dropdown-menu' aria-labelledby='dropdownMenuButton'>
18
             <Link className='setting__link dropdown-item' to={PAGE.ACCOUNT}>
19
             <Link className='setting__link dropdown-item' to={PAGE.ACCOUNT}>
19
               <i className='fa fa-fw fa-user-o mr-2' />
20
               <i className='fa fa-fw fa-user-o mr-2' />
20
-              Mon compte
21
+              {props.t('My Account')}
21
             </Link>
22
             </Link>
22
             {/* <div className='setting__link dropdown-item'>Mot de passe</div> */}
23
             {/* <div className='setting__link dropdown-item'>Mot de passe</div> */}
23
             <div className='setting__link dropdown-item' onClick={props.onClickLogout}>
24
             <div className='setting__link dropdown-item' onClick={props.onClickLogout}>
24
               <i className='fa fa-fw fa-sign-out mr-2' />
25
               <i className='fa fa-fw fa-sign-out mr-2' />
25
-              Se déconnecter
26
+              {props.t('Logout')}
26
             </div>
27
             </div>
27
           </div>
28
           </div>
28
         </div>
29
         </div>
30
     )
31
     )
31
     : ''
32
     : ''
32
 }
33
 }
33
-export default MenuProfil
34
+export default translate()(MenuProfil)
34
 
35
 
35
 MenuProfil.propTypes = {
36
 MenuProfil.propTypes = {
36
   user: PropTypes.object.isRequired,
37
   user: PropTypes.object.isRequired,

+ 5 - 4
frontend/src/component/Header/MenuActionListItem/Notification.jsx View File

1
 import React from 'react'
1
 import React from 'react'
2
+import { translate } from 'react-i18next'
2
 // import PropTypes from 'prop-types'
3
 // import PropTypes from 'prop-types'
3
 
4
 
4
 const Notification = props => {
5
 const Notification = props => {
13
           aria-haspopup='true'
14
           aria-haspopup='true'
14
           aria-expanded='false'
15
           aria-expanded='false'
15
         >
16
         >
16
-          Notification
17
+          {props.t('Notification')}
17
         </button>
18
         </button>
18
         <div className='timeline__subdropdown dropdown-menu' aria-labelledby='headerDropdownMenuButton'>
19
         <div className='timeline__subdropdown dropdown-menu' aria-labelledby='headerDropdownMenuButton'>
19
           <div className='timeline__subdropdown__text dropdown-item' >
20
           <div className='timeline__subdropdown__text dropdown-item' >
20
-            Conversation archivé
21
+            {props.t("Archive Topic")}
21
           </div>
22
           </div>
22
           <div className='timeline__subdropdown__text dropdown-item' >
23
           <div className='timeline__subdropdown__text dropdown-item' >
23
-            Fichier supprimé
24
+            {props.t('Deleted File')}
24
           </div>
25
           </div>
25
         </div>
26
         </div>
26
       </div>
27
       </div>
27
     </li>
28
     </li>
28
   )
29
   )
29
 }
30
 }
30
-export default Notification
31
+export default translate()(Notification)