Browse Source

Update README_traduction.md

Skylsmoi 6 years ago
parent
commit
c7eaacaaf9
No account linked to committer's email
1 changed files with 11 additions and 10 deletions
  1. 11 10
      README_traduction.md

+ 11 - 10
README_traduction.md View File

1
-## Tracim internationalization
1
+# Tracim internationalization
2
 
2
 
3
-### How to for Frontend part
3
+## How to for Frontend part
4
 
4
 
5
 In each frontend repo (frontend, frontend_app_..., frontend_lib), there is a folder i18next.scanner that holds every translation files in JSON.
5
 In each frontend repo (frontend, frontend_app_..., frontend_lib), there is a folder i18next.scanner that holds every translation files in JSON.
6
 
6
 
7
 ___
7
 ___
8
 
8
 
9
-#### I have found a translation error, how do I fix it ?
9
+### I have found a translation error, how do I fix it ?
10
 
10
 
11
 **If the error is in any language other than english:**
11
 **If the error is in any language other than english:**
12
 
12
 
32
 
32
 
33
 ___
33
 ___
34
 
34
 
35
-#### I have found an untranslated key in a language, how do I fix it ?
35
+### I have found an untranslated key in a language, how do I fix it ?
36
 
36
 
37
-It means you have found an english text although you have selected another language. 
37
+It means you have found an english text even though you have selected another language. 
38
 
38
 
39
-Do task a) and b) in the according .json file. In folder i18next.scanner.
39
+Do task a) and b) in the according .json file, in folder i18next.scanner.
40
 
40
 
41
 ___
41
 ___
42
 
42
 
43
-#### I have found untranslated key in a language but the key does not appear in the .json file.
43
+### I have found an untranslated key in a language but the key does not appear in the .json file.
44
 
44
 
45
 Do step 3).
45
 Do step 3).
46
 
46
 
57
 III) Check that `t` in available in your component, meanings your component must be wraped in the `translate()` higher order function
57
 III) Check that `t` in available in your component, meanings your component must be wraped in the `translate()` higher order function
58
 
58
 
59
 ``` javascript
59
 ``` javascript
60
+import React from 'react'
60
 import { translate } from 'react-i18next'
61
 import { translate } from 'react-i18next'
61
 
62
 
62
 class MyComponent extends React.Component {
63
 class MyComponent extends React.Component {
63
-    render () {
64
-        return (<div>{this.props.t('My untranslated key')}</div>)
65
-    }
64
+  render () {
65
+    return (<div>{this.props.t('My untranslated key')}</div>)
66
+  }
66
 }
67
 }
67
 
68
 
68
 export default translate()(MyComponent)
69
 export default translate()(MyComponent)