File tree Expand file tree Collapse file tree 4 files changed +16
-4
lines changed
packages/cli/src/formatters Expand file tree Collapse file tree 4 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,10 @@ export const format: FormatFn<SmartlingJson> = msgs => {
1313 for ( const [ id , msg ] of Object . entries ( msgs ) ) {
1414 results [ id ] = {
1515 message : msg . defaultMessage ! ,
16- description : msg . description ,
16+ description :
17+ typeof msg . description === 'string'
18+ ? msg . description
19+ : JSON . stringify ( msg . description ) ,
1720 }
1821 }
1922 return results
Original file line number Diff line number Diff line change @@ -15,7 +15,10 @@ export const format: FormatFn<StructuredJson> = msgs => {
1515 for ( const [ id , msg ] of Object . entries ( msgs ) ) {
1616 results [ id ] = {
1717 translation : msg . defaultMessage ! ,
18- notes : msg . description ,
18+ notes :
19+ typeof msg . description === 'string'
20+ ? msg . description
21+ : JSON . stringify ( msg . description ) ,
1922 }
2023 }
2124 return results
Original file line number Diff line number Diff line change @@ -41,7 +41,10 @@ export const format: FormatFn<SmartlingJson> = msgs => {
4141 for ( const [ id , msg ] of Object . entries ( msgs ) ) {
4242 results [ id ] = {
4343 message : msg . defaultMessage ! ,
44- description : msg . description ,
44+ description :
45+ typeof msg . description === 'string'
46+ ? msg . description
47+ : JSON . stringify ( msg . description ) ,
4548 }
4649 }
4750 return results
Original file line number Diff line number Diff line change @@ -15,7 +15,10 @@ export const format: FormatFn<StructuredJson> = msgs => {
1515 for ( const [ id , msg ] of Object . entries ( msgs ) ) {
1616 results [ id ] = {
1717 string : msg . defaultMessage ! ,
18- developer_comment : msg . description ,
18+ developer_comment :
19+ typeof msg . description === 'string'
20+ ? msg . description
21+ : JSON . stringify ( msg . description ) ,
1922 }
2023 }
2124 return results
You can’t perform that action at this time.
0 commit comments