Skip to content

Commit

Permalink
Merge pull request #383 from ulayab/reason-placeholder
Browse files Browse the repository at this point in the history
enhance: #361 change placeholder and translate
  • Loading branch information
MrOrz committed Jan 25, 2021
2 parents 1bfe124 + 481a33e commit 7c7f92c
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .babelrc.js
Expand Up @@ -19,7 +19,7 @@ module.exports = {
"@babel/plugin-proposal-class-properties", // ttag extraction & resolve needs it, even though it's included in next/babel...
"@babel/plugin-proposal-optional-chaining",
[ // Need to be put last so that it can replace all strings
'ttag', {resolve: {translations: `i18n/${process.env.LOCALE || 'en_US'}.po`}}
'ttag', {resolve: {translations: `i18n/${process.env.LOCALE || 'en_US'}.po`}, dedent: true,}
],
]
}
16 changes: 15 additions & 1 deletion components/NewReplySection/ReplyForm/ReasonEditor.js
Expand Up @@ -257,7 +257,21 @@ const ReasonEditor = ({
required
className={classes.inputArea}
ref={editorRef}
placeholder="140 字以內"
placeholder={(() => {
if (replyType === 'NOT_ARTICLE') {
return t`Please briefly explain why this message should not be processed in Cofacts.`;
} else if (replyType === 'NOT_RUMOR') {
return t`As a brief intro for the references, please point out which part of the message is correct.`;
} else if (replyType === 'OPINIONATED') {
return t`Please briefly
1. explain which part of the message contains personal opinion
2. remind the audience that this is not factual`;
} else if (replyType === 'RUMOR') {
return t`As a brief intro for the references, please point out which part of the message is incorrect.`;
} else {
return '';
}
})()}
onChange={handleChange}
onKeyDown={handleKeyPress}
value={value}
Expand Down
28 changes: 27 additions & 1 deletion i18n/zh_TW.po
Expand Up @@ -679,7 +679,7 @@ msgstr "撰寫新回應"
msgid "Use existing replies"
msgstr "使用現有回應"

#: components/NewReplySection/ReplyForm/ReasonEditor.js:290
#: components/NewReplySection/ReplyForm/ReasonEditor.js:304
msgid "Keep composing my reply with this"
msgstr "延伸此回應來查核"

Expand Down Expand Up @@ -1049,6 +1049,32 @@ msgstr "資料佐證"
msgid "Source URL"
msgstr "連結網址"

#: components/NewReplySection/ReplyForm/ReasonEditor.js:262
msgid "Please briefly explain why this message should not be processed in Cofacts."
msgstr "請簡單說明為何 Cofacts 不該處理這則訊息"

#: components/NewReplySection/ReplyForm/ReasonEditor.js:264
msgid ""
"As a brief intro for the references, please point out which part of the "
"message is correct."
msgstr "請簡單說明它哪個部分是正確的,作為「資料來源」的導讀"

#: components/NewReplySection/ReplyForm/ReasonEditor.js:266
msgid ""
"Please briefly\n"
"1. explain which part of the message contains personal opinion\n"
"2. remind the audience that this is not factual"
msgstr ""
"請簡單說明:\n"
"1. 它哪個部分含有主觀意見之處\n"
"2. 提醒讀者這不是客觀事實"

#: components/NewReplySection/ReplyForm/ReasonEditor.js:270
msgid ""
"As a brief intro for the references, please point out which part of the "
"message is incorrect."
msgstr "請簡單說明不實之處,作為「資料來源」的導讀"

#: pages/index.js:41
msgctxt "site title"
msgid "Cofacts"
Expand Down

0 comments on commit 7c7f92c

Please sign in to comment.