mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -05:00
Reuse l10n strings instead of duplicating them
This commit is contained in:
parent
ccab9566b8
commit
60bf05fbbf
3 changed files with 3 additions and 5 deletions
|
@ -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'
|
||||
]
|
||||
},
|
||||
|
|
|
@ -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 people’s 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 that’s 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 it’s 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.",
|
||||
|
|
|
@ -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', () => {
|
||||
|
|
Loading…
Reference in a new issue