File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ const Tags = ({
1313 attribute,
1414 description,
1515 error,
16- intlLabel ,
16+ label ,
1717 labelAction,
1818 name,
1919 onChange,
@@ -176,9 +176,7 @@ const Tags = ({
176176 style = { { position : "relative" } }
177177 ref = { inputEle }
178178 >
179- < Field . Label action = { labelAction } >
180- { intlLabel && formatMessage ( { id : intlLabel } ) }
181- </ Field . Label >
179+ { label && < Field . Label action = { labelAction } > { formatMessage ( { id : label , defaultMessage : "Tags" } ) } </ Field . Label > }
182180 < ThemeStyle />
183181 < Flex direction = "column" >
184182 < TagsInput
@@ -206,7 +204,7 @@ Tags.defaultProps = {
206204} ;
207205
208206Tags . propTypes = {
209- intlLabel : PropTypes . object . isRequired ,
207+ label : PropTypes . object . isRequired ,
210208 onChange : PropTypes . func . isRequired ,
211209 attribute : PropTypes . object . isRequired ,
212210 name : PropTypes . string . isRequired ,
Original file line number Diff line number Diff line change 11import pluginId from "./pluginId" ;
2+ import { getTranslation } from './utils/getTranslation' ;
23
34export default {
45 register ( app ) {
@@ -7,12 +8,12 @@ export default {
78 pluginId : pluginId ,
89 type : "text" ,
910 intlLabel : {
10- id : "tagsinput.tag. label" ,
11- defaultMessage : " TagsInput" ,
11+ id : getTranslation ( 'form. label' ) ,
12+ defaultMessage : ' TagsInput' ,
1213 } ,
1314 intlDescription : {
14- id : "tagsinput.tag. description" ,
15- defaultMessage : " TagsInput to add custom tags" ,
15+ id : getTranslation ( 'form. description' ) ,
16+ defaultMessage : ' TagsInput to add custom tags' ,
1617 } ,
1718 components : {
1819 Input : async ( ) =>
@@ -24,13 +25,13 @@ export default {
2425 base : [
2526 {
2627 sectionTitle : {
27- id : "tagsinput.tags .section.apiUrl" ,
28+ id : "form .section.apiUrl" ,
2829 defaultMessage : "API Url" ,
2930 } ,
3031 items : [
3132 {
3233 intlLabel : {
33- id : "tagsinput.tags.section .apiUrl" ,
34+ id : "form .apiUrl" ,
3435 defaultMessage : "Rest API URL for suggestions" ,
3536 } ,
3637 name : "options.apiUrl" ,
Original file line number Diff line number Diff line change 1+ {
2+ "form.label" : " TagsInput" ,
3+ "form.description" : " TagsInput to add custom tags" ,
4+ "form.section.apiUrl" : " API Url" ,
5+ "form.apiUrl" : " Rest API URL for suggestions"
6+ }
Original file line number Diff line number Diff line change 1+ import pluginId from '../pluginId' ;
2+
3+ const getTranslation = ( id ) => `${ pluginId } .${ id } ` ;
4+
5+ export { getTranslation } ;
You can’t perform that action at this time.
0 commit comments