Ver código fonte

https://github.com/tracim/tracim/issues/720, changing the placeholder according to apps via the translation function

AlexiCauvin 5 anos atrás
pai
commit
4c2e541b23

+ 2 - 1
frontend_app_html-document/i18next.scanner/en/translation.json Ver arquivo

@@ -1,4 +1,5 @@
1 1
 {
2 2
   "Last version": "Last version",
3
-  "Validate and create": "Validate and create"
3
+  "Validate and create": "Validate and create",
4
+  "Document's title": "Document's title"
4 5
 }

+ 2 - 1
frontend_app_html-document/i18next.scanner/fr/translation.json Ver arquivo

@@ -1,4 +1,5 @@
1 1
 {
2 2
   "Last version": "Dernière version",
3
-  "Validate and create": "Valider et créer"
3
+  "Validate and create": "Valider et créer",
4
+  "Document's title": "Titre du document"
4 5
 }

+ 1 - 0
frontend_app_html-document/src/container/PopupCreateHtmlDocument.jsx Ver arquivo

@@ -114,6 +114,7 @@ class PopupCreateHtmlDocument extends React.Component {
114 114
         contentName={this.state.newContentName}
115 115
         onChangeContentName={this.handleChangeNewContentName}
116 116
         btnValidateLabel={this.props.t('Validate and create')}
117
+        inputPlaceholder={this.props.t("Document's title")}
117 118
       />
118 119
     )
119 120
   }

+ 2 - 1
frontend_app_thread/i18next.scanner/en/translation.json Ver arquivo

@@ -1,3 +1,4 @@
1 1
 {
2
-  "Validate and create": "Validate and create"
2
+  "Validate and create": "Validate and create",
3
+  "Topic's subject": "Topic's subject"
3 4
 }

+ 2 - 1
frontend_app_thread/i18next.scanner/fr/translation.json Ver arquivo

@@ -1,3 +1,4 @@
1 1
 {
2
-  "Validate and create": "Valider et créer"
2
+  "Validate and create": "Valider et créer",
3
+  "Topic's subject": "Sujet de la discussion"
3 4
 }

+ 1 - 0
frontend_app_thread/src/container/PopupCreateThread.jsx Ver arquivo

@@ -122,6 +122,7 @@ class PopupCreateThread extends React.Component {
122 122
         contentName={this.state.newContentName}
123 123
         onChangeContentName={this.handleChangeNewContentName}
124 124
         btnValidateLabel={this.props.t('Validate and create')}
125
+        inputPlaceholder={this.props.t("Topic's subject")}
125 126
       />
126 127
     )
127 128
   }

+ 3 - 2
frontend_lib/src/component/CardPopup/CardPopupCreateContent.jsx Ver arquivo

@@ -27,7 +27,7 @@ const PopupCreateContent = props => {
27 27
           <input
28 28
             type='text'
29 29
             className='createcontent__form__input'
30
-            placeHolder='Nommez votre contenu...'
30
+            placeHolder={props.inputPlaceholder}
31 31
             value={props.contentName}
32 32
             onChange={props.onChangeContentName}
33 33
           />
@@ -64,7 +64,8 @@ PopupCreateContent.propTypes = {
64 64
   label: PropTypes.string,
65 65
   customColor: PropTypes.string,
66 66
   faIcon: PropTypes.string,
67
-  btnValidateLabel: PropTypes.string
67
+  btnValidateLabel: PropTypes.string,
68
+  inputPlaceholder: PropTypes.string
68 69
 }
69 70
 
70 71
 PopupCreateContent.defaultProps = {