Reuse l10n strings instead of duplicating them

This commit is contained in:
seotts 2021-03-23 15:45:03 -04:00
parent ccab9566b8
commit 60bf05fbbf
3 changed files with 3 additions and 5 deletions

View file

@ -239,7 +239,7 @@ class ComposeComment extends React.Component {
commentType: justMuted ? 'comment.type.unconstructive' : 'comment.type.unconstructive.past',
muteStepHeader: 'comment.unconstructive.header',
muteStepContent: [
justMuted ? 'comment.unconstructive.content1' : 'comment.unconstructive.content1.past',
justMuted ? 'comment.unconstructive.content1' : 'comment.type.unconstructive.past',
'comment.unconstructive.content2'
]
},
@ -248,7 +248,7 @@ class ComposeComment extends React.Component {
commentType: justMuted ? 'comment.type.vulgarity' : 'comment.type.vulgarity.past',
muteStepHeader: 'comment.vulgarity.header',
muteStepContent: [
justMuted ? 'comment.vulgarity.content1' : 'comment.vulgarity.content1.past',
justMuted ? 'comment.vulgarity.content1' : 'comment.type.vulgarity.past',
'comment.vulgarity.content2'
]
},

View file

@ -60,13 +60,11 @@
"comment.type.unconstructive.past": "It appears that one of your recent comments was saying something that might have been hurtful.",
"comment.unconstructive.header": "We encourage you to be supportive when commenting on other peoples projects",
"comment.unconstructive.content1": "It appears that your comment was saying something that might have been hurtful.",
"comment.unconstructive.content1.past": "It appears that one of your recent comments was saying something that might have been hurtful.",
"comment.unconstructive.content2": "If you think something could be better, you can say something you like about the project, and make a suggestion about how to improve it.",
"comment.type.vulgarity": "Your most recent comment appeared to include a bad word.",
"comment.type.vulgarity.past": "It appears that one of your recent comments contained a bad word.",
"comment.vulgarity.header": "We encourage you to use language thats appropriate for all ages.",
"comment.vulgarity.content1": "It appears that your comment contains a bad word.",
"comment.vulgarity.content1.past": "It appears that one of your recent comments contained a bad word.",
"comment.vulgarity.content2": "Scratch has users of all ages, so its important to use language that is appropriate for all Scratchers.",
"comment.type.spam": "Your most recent comment appeared to contain advertising, text art, or a chain message.",
"comment.type.spam.past": "It appears that one of your recent comments contained advertising, text art, or a chain message.",

View file

@ -571,7 +571,7 @@ describe('Compose Comment test', () => {
commentInstance.setState({muteType: 'vulgarity'});
expect(commentInstance.getMuteMessageInfo(false).commentType).toBe('comment.type.vulgarity.past');
expect(commentInstance.getMuteMessageInfo(false).muteStepContent[0]).toBe('comment.vulgarity.content1.past');
expect(commentInstance.getMuteMessageInfo(false).muteStepContent[0]).toBe('comment.type.vulgarity.past');
});
test('getMuteMessageInfo: muteType not set and just got muted', () => {