Refactor tasks translation file to have one placeholder per task-type

Fixes #979
This commit is contained in:
Alan Jean
2023-01-29 06:28:00 +04:00
parent 5e342cbbdf
commit ccf96fd843
2 changed files with 11 additions and 5 deletions
+6 -4
View File
@@ -1,5 +1,4 @@
{
"write_initial_prompt": "Write your prompt here...",
"default": {
"unchanged_title": "No changes",
"unchanged_message": "Are you sure you would like to continue?"
@@ -12,18 +11,21 @@
"label": "Create Initial Prompts",
"desc": "Write initial prompts to help Open Assistant to try replying to diverse messages.",
"overview": "Create an initial message to send to the assistant",
"instruction": "Provide the initial prompts"
"instruction": "Provide the initial prompts",
"response_placeholder": "Write your prompt here..."
},
"reply_as_user": {
"label": "Reply as User",
"desc": "Chat with Open Assistant and help improve it's responses as you interact with it.",
"overview": "Given the following conversation, provide an adequate reply",
"instruction": "Provide the user's reply"
"instruction": "Provide the user's reply",
"response_placeholder": "Write your reply here..."
},
"reply_as_assistant": {
"label": "Reply as Assistant",
"desc": "Help Open Assistant improve its responses to conversations with other users.",
"overview": "Given the following conversation, provide an adequate reply"
"overview": "Given the following conversation, provide an adequate reply",
"response_placeholder": "Write your reply here..."
},
"rank_user_replies": {
"label": "Rank User Replies",
+5 -1
View File
@@ -58,7 +58,11 @@ export const CreateTask = ({
text={inputText}
onTextChange={textChangeHandler}
thresholds={{ low: 20, medium: 40, goal: 50 }}
textareaProps={{ placeholder: t("tasks:write_initial_prompt"), isDisabled, isReadOnly: !isEditable }}
textareaProps={{
placeholder: t(getTypeSafei18nKey(`tasks:${taskType.id}.response_placeholder`)),
isDisabled,
isReadOnly: !isEditable,
}}
/>
</Stack>
</>