mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-06-30 16:40:05 +08:00
Extract more strings for localization (#1417)
Only English and Spanish translations added.
This commit is contained in:
@@ -20,13 +20,20 @@
|
||||
"messages": "Messages",
|
||||
"more_information": "More Information",
|
||||
"no": "No",
|
||||
"output": "Output",
|
||||
"parameters": "Parameters",
|
||||
"privacy_policy": "Privacy Policy",
|
||||
"prompt": "Prompt",
|
||||
"report_a_bug": "Report a Bug",
|
||||
"review": "Review",
|
||||
"sign_in": "Sign In",
|
||||
"sign_out": "Sign Out",
|
||||
"skip": "Skip",
|
||||
"status": "Status",
|
||||
"status_dashboard": "Status Dashboard",
|
||||
"send": "Send",
|
||||
"submit": "Submit",
|
||||
"submit_your_answer": "Submit your answer",
|
||||
"success": "Success",
|
||||
"terms_of_service": "Terms of Service",
|
||||
"title": "Open Assistant",
|
||||
|
||||
@@ -1,7 +1,35 @@
|
||||
{
|
||||
"accurate": "Accurate",
|
||||
"apolitical": "Apolitical",
|
||||
"appropriate": "Appropriate",
|
||||
"boring": "Boring",
|
||||
"clean": "Clean",
|
||||
"contains_pii": "Contains PII",
|
||||
"contains_pii.one_desc": "Contains personally identifying information",
|
||||
"creative": "Creative",
|
||||
"creative.one_desc": "Expresses creativity in responding to the task",
|
||||
"fails_task": "Fails Task",
|
||||
"fails_task.one_desc": "Fails to follow the correct instruction / task",
|
||||
"fails_task.question": "Is it a bad reply, as an answer to the prompt task?",
|
||||
"follows_instructions": "Follows Instructions",
|
||||
"harmful": "Harmful",
|
||||
"harmful.one_desc.line_1": "Content likely to cause excessive harm not justifiable in the context",
|
||||
"harmful.one_desc.line_2": "Harm refers to physical or mental damage or injury to someone or something. Excessive refers to a reasonable threshold of harm in the context, for instance damaging skin is not excessive in the context of surgery.",
|
||||
"harmless": "Harmless",
|
||||
"hate_speech": "Hate Speech",
|
||||
"hate_speech.explanation": "Content is abusive or threatening and expresses prejudice against a protected characteristic. Prejudice refers to preconceived views not based on reason. Protected characteristics include gender, ethnicity, religion, sexual orientation, and similar characteristics.",
|
||||
"hateful": "Hateful",
|
||||
"hateful.one_desc.line_1": "Content is abusive or threatening and expresses prejudice against a protected characteristic",
|
||||
"hateful.one_desc.line_2": "Prejudice refers to preconceived views not based on reason. Protected characteristics include gender, ethnicity, religion, sexual orientation, and similar characteristics.",
|
||||
"helpful": "Helpful",
|
||||
"helpful.one_desc": "Completes the task to a high standard",
|
||||
"high_quality": "High Quality",
|
||||
"humorous": "Humorous",
|
||||
"humorous.one_desc": "Contains humorous content including sarcasm",
|
||||
"inappropriate": "Inappropriate",
|
||||
"inappropriate.one_desc": "Inappropriate for customer assistant",
|
||||
"judgemental": "Judgemental",
|
||||
"judgemental.one_desc": "Expresses moral judgement",
|
||||
"label_highlighted_flag_instruction": "Select any that apply to the highlighted message:",
|
||||
"label_highlighted_likert_instruction": "Rate the highlighted message:",
|
||||
"label_highlighted_yes_no_instruction": "Answer the following question(s) about the highlighted message:",
|
||||
@@ -10,15 +38,42 @@
|
||||
"label_message_yes_no_instruction": "Answer the following question(s) about the message:",
|
||||
"lang_mismatch": "Not {{language}}",
|
||||
"lang_mismatch.explanation": "Not written in {{language}}.",
|
||||
"low_quality": "Low Quality",
|
||||
"misleading": "Misleading",
|
||||
"misleading.one_desc": "Contains text which is incorrect or misleading",
|
||||
"moral_judgement": "Judges Morality",
|
||||
"moral_judgement.explanation": "Expresses moral judgement.",
|
||||
"non_judgemental": "Non-judgemental",
|
||||
"non_sexual": "Non-sexual",
|
||||
"not_spam": "Not spam",
|
||||
"not_spam.explanation": "Suitable for training Open Assistant.",
|
||||
"not_appropriate": "Not Appropriate",
|
||||
"not_appropriate.explanation": "Inappropriate for a customer assistant.",
|
||||
"ordinary": "Ordinary",
|
||||
"pii": "Contains PII",
|
||||
"pii.explanation": "Contains personally identifying information. Examples include personal contact details, license and other identity numbers and banking details.",
|
||||
"polite": "Polite",
|
||||
"political": "Political",
|
||||
"political_content": "Political",
|
||||
"political_content.explanation": "Expresses political views.",
|
||||
"political.one_desc": "Expresses political views",
|
||||
"rude": "Rude",
|
||||
"rude.one_desc": "Contains rude, abusive, profane or insulting content",
|
||||
"safe": "Safe",
|
||||
"serious": "Serious",
|
||||
"spam": "Spam",
|
||||
"spam.question": "Is the message spam?",
|
||||
"spam.one_desc.line_1": "Seems to be intentionally low-quality or irrelevant",
|
||||
"spam.one_desc.line_2": "We consider the following unwanted content as spam: trolling, intentional undermining of our purpose, illegal material, material that violates our code of conduct, and other things that are inappropriate for our dataset. We collect these under the common heading of \"spam\".",
|
||||
"spam.one_desc.line_3": "This is not an assessment of whether this message is the best possible answer. Especially for prompts or user-replies, we very much want to retain all kinds of responses in the dataset, so that the assistant can learn to reply appropriately.",
|
||||
"spam.one_desc.line_4": "Please mark this text as spam only if it is clearly unsuited to be part of our dataset, as outlined above, and try not to make any subjective value-judgments beyond that.",
|
||||
"sexual": "Sexual",
|
||||
"sexual_content": "Sexual Content",
|
||||
"sexual_content.explanation": "Contains sexual content.",
|
||||
"spam.question": "Is the message spam?"
|
||||
"sexual.one_desc": "Contains sexual content",
|
||||
"threatening": "Threatening",
|
||||
"threatening.one_desc": "Contains a threat against a person or persons",
|
||||
"unhelpful": "Unhelpful",
|
||||
"violent": "Violent",
|
||||
"violent.one_desc": "Encourages or fails to discourage violence/abuse/terrorism/self-harm"
|
||||
}
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
"month": "Month",
|
||||
"monthly": "Monthly",
|
||||
"next": "Next",
|
||||
"no_email": "(No email)",
|
||||
"no_username": "(No username)",
|
||||
"overall": "Overall",
|
||||
"previous": "Previous",
|
||||
"prompt": "Prompts",
|
||||
@@ -25,6 +27,7 @@
|
||||
"top_5_contributors_today": "Top 5 Contributors Today",
|
||||
"total": "Total",
|
||||
"user": "User",
|
||||
"username": "Username",
|
||||
"view_all": "View all",
|
||||
"week": "Week",
|
||||
"weekly": "Weekly",
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
{
|
||||
"any_feedback_on_this_task": "Any feedback on this task?",
|
||||
"available_task_count": "{{count}} tasks available",
|
||||
"default": {
|
||||
"unchanged_title": "No changes",
|
||||
"unchanged_message": "Are you sure you would like to continue?"
|
||||
@@ -78,7 +80,6 @@
|
||||
"desc": "Provide labels for a prompt.",
|
||||
"overview": "Read the following conversation and then answer the question about the last reply in the discussion."
|
||||
},
|
||||
"available_task_count": "{{count}} tasks available",
|
||||
"writing_wrong_langauge_a_b": "You appear to be writing in {{detected_lang}} but this will be submitted as {{submit_lang}}.",
|
||||
"submitted_as": "This will be submitted as {{submit_lang}}"
|
||||
"submitted_as": "This will be submitted as {{submit_lang}}",
|
||||
"writing_wrong_langauge_a_b": "You appear to be writing in {{detected_lang}} but this will be submitted as {{submit_lang}}."
|
||||
}
|
||||
|
||||
@@ -20,13 +20,20 @@
|
||||
"messages": "Mensajes",
|
||||
"more_information": "Más información",
|
||||
"no": "No",
|
||||
"output": "Salida",
|
||||
"parameters": "Parámetros",
|
||||
"privacy_policy": "Política de privacidad",
|
||||
"prompt": "Indicación",
|
||||
"report_a_bug": "Informar de un error",
|
||||
"review": "Revisar",
|
||||
"sign_in": "Iniciar sesión",
|
||||
"sign_out": "Cerrar sesión",
|
||||
"skip": "Saltar",
|
||||
"status": "Estado",
|
||||
"status_dashboard": "Tablón de estado",
|
||||
"send": "Enviar",
|
||||
"submit": "Enviar",
|
||||
"submit_your_answer": "Enviar tu respuesta",
|
||||
"success": "Éxito",
|
||||
"terms_of_service": "Términos de servicio",
|
||||
"title": "Open Assistant",
|
||||
|
||||
@@ -1,24 +1,79 @@
|
||||
{
|
||||
"accurate": "Preciso",
|
||||
"apolitical": "Apolítico",
|
||||
"appropriate": "Apropriado",
|
||||
"boring": "Aburrido",
|
||||
"clean": "Limpio",
|
||||
"contains_pii": "Contiene PII",
|
||||
"contains_pii.one_desc": "Contiene información de identificación personal (PII)",
|
||||
"creative": "Creativo",
|
||||
"creative.one_desc": "Expresa creatividad en la respuesta a la tarea",
|
||||
"fails_task": "Falla en la tarea",
|
||||
"fails_task.one_desc": "Falla en seguir las instrucciones/tareas correctas",
|
||||
"fails_task.question": "¿Es una mala respuesta, según la tarea pedida?",
|
||||
"follows_instructions": "Sigue las instrucciones",
|
||||
"harmful": "Dañino",
|
||||
"harmful.one_desc.line_1": "Contenido que probablemente cause daño excesivo no justificable por el contexto",
|
||||
"harmful.one_desc.line_2": "Daño se refiere a hacer daño o causar heridas a alguien o algo. Excesivo se refiere a un nivel de daño razonable en el contexto, por ejemplo, dañar la piel no es excesivo en el contexto de una operación.",
|
||||
"harmless": "Inofensivo",
|
||||
"hate_speech": "Incitación al odio",
|
||||
"hate_speech.explanation": "El contenido es ofensivo o amenazante y expresa un prejuicio contra una característica protegida. El prejuicio se refiere a las opiniones preconcebidas que no se basan en la razón. Las características protegidas incluyen género, etnia, religión, orientación sexual y características similares.",
|
||||
"hateful": "Odiosa",
|
||||
"hateful.one_desc.line_1": "El contenido es abusivo o amenazante y expresa prejuicio contra una característica protegida",
|
||||
"hateful.one_desc.line_2": "El prejuicio se refiere a puntos de vista preconcebidos que no se basan en la razón. Las características protegidas incluyen género, etnia, religión, orientación sexual y características similares.",
|
||||
"helpful": "Útil",
|
||||
"helpful.one_desc": "Completa la tarea con un alto nivel",
|
||||
"high_quality": "Alta calidad",
|
||||
"humorous": "Humorístico",
|
||||
"humorous.one_desc": "Contiene contenido humorístico, incluyendo sarcasmo.",
|
||||
"inappropriate": "Inapropiado",
|
||||
"inappropriate.one_desc": "Inapropiado para asistente de cliente",
|
||||
"judgemental": "Moralista",
|
||||
"judgemental.one_desc": "Expresa un juicio moral",
|
||||
"label_highlighted_flag_instruction": "Selecciona cualquiera que sea adecuada para el mensaje resaltado:",
|
||||
"label_highlighted_likert_instruction": "Califica el mensaje resaltado:",
|
||||
"label_highlighted_yes_no_instruction": "Contesta la(s) siguiente(s) pregunta(s) sobre el mensaje resaltado:",
|
||||
"label_message_flag_instruction": "Selecciona cualquiera que sea adecuada para el mensaje:",
|
||||
"label_message_likert_instruction": "Califica el mensaje:",
|
||||
"label_message_yes_no_instruction": "Contesta la(s) siguiente(s) pregunta(s) sobre el mensaje:",
|
||||
"lang_mismatch": "Idioma incorrecto",
|
||||
"lang_mismatch.explanation": "No está escrito en el idioma seleccionado actualmente.",
|
||||
"lang_mismatch": "No está en {{language}}",
|
||||
"lang_mismatch.explanation": "No está escrito en {{language}}.",
|
||||
"low_quality": "Baja calidad",
|
||||
"misleading": "Engañoso",
|
||||
"misleading.one_desc": "Contiene texto incorrecto o engañoso",
|
||||
"moral_judgement": "Juicio moral",
|
||||
"moral_judgement.explanation": "Expresa un juicio moral.",
|
||||
"non_judgemental": "No crítico",
|
||||
"non_sexual": "No es sexual",
|
||||
"not_spam": "No es spam",
|
||||
"not_spam.explanation": "Apto para entrenar Open Assistant.",
|
||||
"not_appropriate": "No apropiada",
|
||||
"not_appropriate.explanation": "No apropiada para un asistente de cliente.",
|
||||
"not_appropriate.explanation": "No apropiada para un asistente.",
|
||||
"ordinary": "Corriente",
|
||||
"pii": "Contiene información de identificación personal (PII)",
|
||||
"pii.explanation": "Contiene información personal como detalles de contacto personal, números de identificación o detalles bancarios",
|
||||
"polite": "Educado",
|
||||
"political": "Político",
|
||||
"political_content": "Contenido político",
|
||||
"political_content.explanation": "Expresa una opinión política.",
|
||||
"political.one_desc": "Expresa opiniones políticas",
|
||||
"rude": "Maleducado",
|
||||
"rude.one_desc": "Contiene contenido grosero, abusivo, soez o insultante.",
|
||||
"safe": "Seguro",
|
||||
"serious": "Serio",
|
||||
"spam": "Spam",
|
||||
"spam.question": "¿Es el mensaje spam?",
|
||||
"spam.one_desc.line_1": "Parece ser intencionalmente de baja calidad o irrelevante",
|
||||
"spam.one_desc.line_2": "Consideramos el siguiente contenido no deseado como spam: trolear, socavación intencionada de nuestro propósito, material ilegal, material que viola nuestro código de conducta y otras cosas que son inapropiadas para nuestro conjunto de datos. Recopilamos todo esto bajo el encabezado común de \"spam\".",
|
||||
"spam.one_desc.line_3": "Esta no es una evaluación de si este mensaje es la mejor respuesta posible. Especialmente para las instrucciones o las respuestas de los usuarios, queremos conservar todo tipo de respuestas en el conjunto de datos, para que el asistente pueda aprender a responder adecuadamente.",
|
||||
"spam.one_desc.line_4": "Marque este texto como spam solo si es claramente inadecuado para ser parte de nuestro conjunto de datos, como se describe anteriormente, y trate de no hacer ningún juicio de valor subjetivo más allá de eso.",
|
||||
"sexual": "Sexual",
|
||||
"sexual_content": "Contenido sexual",
|
||||
"sexual_content.explanation": "Contiene contenido sexual.",
|
||||
"spam.question": "¿Es el mensaje spam?"
|
||||
"sexual.one_desc": "Contiene contenido sexual",
|
||||
"threatening": "Amenazante",
|
||||
"threatening.one_desc": "Contiene una amenaza contra una o varias personas",
|
||||
"unhelpful": "De poca ayuda",
|
||||
"violent": "Violento",
|
||||
"violent.one_desc": "Fomenta o no desalienta la violencia, el abuso, el terrorismo o las autolesiones"
|
||||
}
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
"month": "Mes",
|
||||
"monthly": "Mensual",
|
||||
"next": "Siguiente",
|
||||
"no_email": "(Sin dirección de correo)",
|
||||
"no_username": "(Sin nombre de usuario)",
|
||||
"overall": "Global",
|
||||
"previous": "Anterior",
|
||||
"prompt": "Indicaciones",
|
||||
@@ -25,6 +27,7 @@
|
||||
"top_5_contributors_today": "5 mayores contribuidores hoy",
|
||||
"total": "Total",
|
||||
"user": "Usuario",
|
||||
"username": "Nombre de usuario",
|
||||
"view_all": "Ver todos",
|
||||
"week": "Semana",
|
||||
"weekly": "Semanal",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"any_feedback_on_this_task": "¿Alguna realimentación sobre esta tarea?",
|
||||
"available_task_count": "{{count}} tareas disponibles",
|
||||
"classify_assistant_reply": {
|
||||
"label": "Clasificar respuesta del asistente",
|
||||
@@ -79,6 +80,6 @@
|
||||
"instruction": "Proporciona la respuesta del usuario",
|
||||
"response_placeholder": "Escribe tu respuesta aquí..."
|
||||
},
|
||||
"writing_wrong_langauge_a_b": "Parece que estás escribiendo en {{detected_lang}} pero esto se enviará como {{submit_lang}}.",
|
||||
"submitted_as": "Esto será enviado como {{submit_lang}}"
|
||||
"submitted_as": "Esto será enviado como {{submit_lang}}",
|
||||
"writing_wrong_langauge_a_b": "Parece que estás escribiendo en {{detected_lang}} pero esto se enviará como {{submit_lang}}."
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import {
|
||||
Textarea,
|
||||
useDisclosure,
|
||||
} from "@chakra-ui/react";
|
||||
import { useTranslation } from "next-i18next";
|
||||
import { useState } from "react";
|
||||
|
||||
interface SkipButtonProps extends ButtonProps {
|
||||
@@ -18,6 +19,7 @@ interface SkipButtonProps extends ButtonProps {
|
||||
}
|
||||
|
||||
export const SkipButton = ({ onSkip, ...props }: SkipButtonProps) => {
|
||||
const { t } = useTranslation(["common", "tasks"]);
|
||||
const { isOpen, onOpen: showModal, onClose: closeModal } = useDisclosure();
|
||||
const [value, setValue] = useState("");
|
||||
|
||||
@@ -30,25 +32,25 @@ export const SkipButton = ({ onSkip, ...props }: SkipButtonProps) => {
|
||||
return (
|
||||
<>
|
||||
<Button size="lg" variant="outline" onClick={showModal} {...props}>
|
||||
Skip
|
||||
{t("skip")}
|
||||
</Button>
|
||||
<Modal isOpen={isOpen} onClose={closeModal}>
|
||||
<ModalOverlay />
|
||||
<ModalContent>
|
||||
<ModalHeader>Skip</ModalHeader>
|
||||
<ModalHeader>{t("skip")}</ModalHeader>
|
||||
<ModalCloseButton />
|
||||
<ModalBody>
|
||||
<Textarea
|
||||
value={value}
|
||||
onChange={(e) => setValue(e.target.value)}
|
||||
resize="none"
|
||||
placeholder="Any feedback on this task?"
|
||||
placeholder={t("tasks:any_feedback_on_this_task")}
|
||||
/>
|
||||
</ModalBody>
|
||||
|
||||
<ModalFooter>
|
||||
<Button colorScheme="blue" mr={3} onClick={onSubmit}>
|
||||
Send
|
||||
{t("send")}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</ModalContent>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Box, Grid, GridItem, Text, useColorModeValue } from "@chakra-ui/react";
|
||||
import { useTranslation } from "next-i18next";
|
||||
import React from "react";
|
||||
import { useState } from "react";
|
||||
import { LikertButtons } from "src/components/Buttons/LikertButtons";
|
||||
@@ -18,160 +19,154 @@ interface LabelInfo {
|
||||
inverted: boolean;
|
||||
}
|
||||
|
||||
const getLabelInfo = (label: string): LabelInfo => {
|
||||
const getLabelInfo = (label: string, t: (key: string) => string): LabelInfo => {
|
||||
switch (label) {
|
||||
case "spam":
|
||||
return {
|
||||
zeroText: "Not Spam",
|
||||
zeroDescription: ["Suitable for training Open Assistant."],
|
||||
oneText: "Spam",
|
||||
zeroText: t("not_spam"),
|
||||
zeroDescription: [t("not_spam.explanation")],
|
||||
oneText: t("spam"),
|
||||
oneDescription: [
|
||||
"Seems to be intentionally low-quality or irrelevant",
|
||||
'We consider the following unwanted content as spam: trolling, intentional undermining of our purpose, illegal material, material that violates our code of conduct, and other things that are inappropriate for our dataset. We collect these under the common heading of "spam".',
|
||||
"This is not an assessment of whether this message is the best possible answer. Especially for prompts or user-replies, we very much want to retain all kinds of responses in the dataset, so that the assistant can learn to reply appropriately.",
|
||||
"Please mark this text as spam only if it is clearly unsuited to be part of our dataset, as outlined above, and try not to make any subjective value-judgments beyond that.",
|
||||
t("spam.one_desc.line_1"),
|
||||
t("spam.one_desc.line_2"),
|
||||
t("spam.one_desc.line_3"),
|
||||
t("spam.one_desc.line_4"),
|
||||
],
|
||||
inverted: true,
|
||||
};
|
||||
case "fails_task":
|
||||
return {
|
||||
zeroText: "Follows Instructions",
|
||||
zeroText: t("follows_instructions"),
|
||||
zeroDescription: [],
|
||||
oneText: "Fails Task",
|
||||
oneDescription: ["Fails to follow the correct instruction / task"],
|
||||
oneText: t("fails_task"),
|
||||
oneDescription: [t("fails_task.one_desc")],
|
||||
inverted: true,
|
||||
};
|
||||
case "not_appropriate":
|
||||
return {
|
||||
zeroText: "Appropriate",
|
||||
zeroText: t("appropriate"),
|
||||
zeroDescription: [],
|
||||
oneText: "Inappropriate",
|
||||
oneDescription: ["Inappropriate for customer assistant"],
|
||||
oneText: t("inappropriate"),
|
||||
oneDescription: [t("inappropriate.one_desc")],
|
||||
inverted: true,
|
||||
};
|
||||
case "violence":
|
||||
return {
|
||||
zeroText: "Harmless",
|
||||
zeroText: t("harmless"),
|
||||
zeroDescription: [],
|
||||
oneText: "Violent",
|
||||
oneDescription: ["Encourages or fails to discourage violence/abuse/terrorism/self-harm"],
|
||||
oneText: t("violent"),
|
||||
oneDescription: [t("violent.one_desc")],
|
||||
inverted: true,
|
||||
};
|
||||
case "excessive_harm":
|
||||
return {
|
||||
zeroText: "Safe",
|
||||
zeroText: t("safe"),
|
||||
zeroDescription: [],
|
||||
oneText: "Harmful",
|
||||
oneDescription: [
|
||||
"Content likely to cause excessive harm not justifiable in the context",
|
||||
"Harm refers to physical or mental damage or injury to someone or something. Excessive refers to a reasonable threshold of harm in the context, for instance damaging skin is not excessive in the context of surgery.",
|
||||
],
|
||||
oneText: t("harmful"),
|
||||
oneDescription: [t("harmful.one_desc.line_1"), t("harmful.one_desc.line_2")],
|
||||
inverted: true,
|
||||
};
|
||||
case "sexual_content":
|
||||
return {
|
||||
zeroText: "Non Sexual",
|
||||
zeroText: t("non_sexual"),
|
||||
zeroDescription: [],
|
||||
oneText: "Sexual",
|
||||
oneDescription: ["Contains sexual content"],
|
||||
oneText: t("sexual"),
|
||||
oneDescription: [t("sexual.one_desc")],
|
||||
inverted: true,
|
||||
};
|
||||
case "toxicity":
|
||||
return {
|
||||
zeroText: "Polite",
|
||||
zeroText: t("polite"),
|
||||
zeroDescription: [],
|
||||
oneText: "Rude",
|
||||
oneDescription: ["Contains rude, abusive, profane or insulting content"],
|
||||
oneText: t("rude"),
|
||||
oneDescription: [t("rude.one_desc")],
|
||||
inverted: true,
|
||||
};
|
||||
case "moral_judgement":
|
||||
return {
|
||||
zeroText: "Non-Judgemental",
|
||||
zeroText: t("non_judgemental"),
|
||||
zeroDescription: [],
|
||||
oneText: "Judgemental",
|
||||
oneDescription: ["Expresses moral judgement"],
|
||||
oneText: t("judgemental"),
|
||||
oneDescription: [t("judgemental.one_desc")],
|
||||
inverted: true,
|
||||
};
|
||||
case "political_content":
|
||||
return {
|
||||
zeroText: "Apolitical",
|
||||
zeroText: t("apolitical"),
|
||||
zeroDescription: [],
|
||||
oneText: "Political",
|
||||
oneDescription: ["Expresses political views"],
|
||||
oneText: t("political"),
|
||||
oneDescription: [t("political.one_desc")],
|
||||
inverted: true,
|
||||
};
|
||||
case "humor":
|
||||
return {
|
||||
zeroText: "Serious",
|
||||
zeroText: t("serious"),
|
||||
zeroDescription: [],
|
||||
oneText: "Humorous",
|
||||
oneDescription: ["Contains humorous content including sarcasm"],
|
||||
oneText: t("humorous"),
|
||||
oneDescription: [t("humorous.one_desc")],
|
||||
inverted: false,
|
||||
};
|
||||
case "hate_speech":
|
||||
return {
|
||||
zeroText: "Safe",
|
||||
zeroText: t("safe"),
|
||||
zeroDescription: [],
|
||||
oneText: "Hateful",
|
||||
oneDescription: [
|
||||
"Content is abusive or threatening and expresses prejudice against a protected characteristic",
|
||||
"Prejudice refers to preconceived views not based on reason. Protected characteristics include gender, ethnicity, religion, sexual orientation, and similar characteristics.",
|
||||
],
|
||||
oneText: t("hateful"),
|
||||
oneDescription: [t("hateful.one_desc.line_1"), t("hateful.one_desc.line_2")],
|
||||
inverted: true,
|
||||
};
|
||||
case "threat":
|
||||
return {
|
||||
zeroText: "Safe",
|
||||
zeroText: t("safe"),
|
||||
zeroDescription: [],
|
||||
oneText: "Threatening",
|
||||
oneDescription: ["Contains a threat against a person or persons"],
|
||||
oneText: t("threatening"),
|
||||
oneDescription: [t("threatening.one_desc")],
|
||||
inverted: true,
|
||||
};
|
||||
case "misleading":
|
||||
return {
|
||||
zeroText: "Accurate",
|
||||
zeroText: t("accurate"),
|
||||
zeroDescription: [],
|
||||
oneText: "Misleading",
|
||||
oneDescription: ["Contains text which is incorrect or misleading"],
|
||||
oneText: t("misleading"),
|
||||
oneDescription: [t("misleading.one_desc")],
|
||||
inverted: true,
|
||||
};
|
||||
case "helpfulness":
|
||||
return {
|
||||
zeroText: "Unhelpful",
|
||||
zeroText: t("unhelpful"),
|
||||
zeroDescription: [],
|
||||
oneText: "Helpful",
|
||||
oneDescription: ["Completes the task to a high standard"],
|
||||
oneText: t("helpful"),
|
||||
oneDescription: [t("helpful.one_desc")],
|
||||
inverted: false,
|
||||
};
|
||||
case "creative":
|
||||
return {
|
||||
zeroText: "Boring",
|
||||
zeroText: t("boring"),
|
||||
zeroDescription: [],
|
||||
oneText: "Creative",
|
||||
oneDescription: ["Expresses creativity in responding to the task"],
|
||||
oneText: t("creative"),
|
||||
oneDescription: [t("creative.one_desc")],
|
||||
inverted: false,
|
||||
};
|
||||
case "pii":
|
||||
return {
|
||||
zeroText: "Clean",
|
||||
zeroText: t("clean"),
|
||||
zeroDescription: [],
|
||||
oneText: "Contains PII",
|
||||
oneDescription: ["Contains personally identifying information"],
|
||||
oneText: t("contains_pii"),
|
||||
oneDescription: [t("contains_pii.one_desc")],
|
||||
inverted: false,
|
||||
};
|
||||
case "quality":
|
||||
return {
|
||||
zeroText: "Low Quality",
|
||||
zeroText: t("low_quality"),
|
||||
zeroDescription: [],
|
||||
oneText: "High Quality",
|
||||
oneText: t("high_quality"),
|
||||
oneDescription: [],
|
||||
inverted: false,
|
||||
};
|
||||
case "creativity":
|
||||
return {
|
||||
zeroText: "Ordinary",
|
||||
zeroText: t("ordinary"),
|
||||
zeroDescription: [],
|
||||
oneText: "Creative",
|
||||
oneText: t("creative"),
|
||||
oneDescription: [],
|
||||
inverted: false,
|
||||
};
|
||||
@@ -187,6 +182,7 @@ const getLabelInfo = (label: string): LabelInfo => {
|
||||
};
|
||||
|
||||
export const LabelLikertGroup = ({ labelIDs, onChange, isEditable = true }: LabelInputGroupProps) => {
|
||||
const { t } = useTranslation("labelling");
|
||||
const [labelValues, setLabelValues] = useState<number[]>(Array.from({ length: labelIDs.length }).map(() => null));
|
||||
|
||||
const cardColor = useColorModeValue("gray.50", "gray.800");
|
||||
@@ -194,7 +190,7 @@ export const LabelLikertGroup = ({ labelIDs, onChange, isEditable = true }: Labe
|
||||
return (
|
||||
<Grid templateColumns={"minmax(min-content, 30em)"} rowGap={2}>
|
||||
{labelIDs.map((labelId, idx) => {
|
||||
const { zeroText, oneText, zeroDescription, oneDescription, inverted } = getLabelInfo(labelId);
|
||||
const { zeroText, oneText, zeroDescription, oneDescription, inverted } = getLabelInfo(labelId, t);
|
||||
|
||||
let textA = zeroText;
|
||||
let textB = oneText;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Box, Flex, IconButton, Progress, Tooltip, useColorModeValue } from "@chakra-ui/react";
|
||||
import { useTranslation } from "next-i18next";
|
||||
import { Edit2 } from "lucide-react";
|
||||
import { SkipButton } from "src/components/Buttons/Skip";
|
||||
import { SubmitButton } from "src/components/Buttons/Submit";
|
||||
@@ -25,13 +26,14 @@ export const TaskControls = ({
|
||||
onSubmit,
|
||||
onSkip,
|
||||
}: TaskControlsProps) => {
|
||||
const { t } = useTranslation();
|
||||
const backgroundColor = useColorModeValue("white", "gray.800");
|
||||
|
||||
return (
|
||||
<Box width="full" bg={backgroundColor} borderRadius="xl" shadow="base">
|
||||
{isLoading && <Progress size="sm" isIndeterminate />}
|
||||
<Flex p="6" gap="4" direction={["column", "row"]}>
|
||||
<TaskInfo id={task.id} output="Submit your answer" />
|
||||
<TaskInfo id={task.id} output={t("submit_your_answer")} />
|
||||
<Flex width={["full", "fit-content"]} justify="center" ml="auto" gap={2}>
|
||||
{taskStatus.mode === "EDIT" ? (
|
||||
<>
|
||||
@@ -42,7 +44,7 @@ export const TaskControls = ({
|
||||
isDisabled={taskStatus.replyValidity === "INVALID"}
|
||||
onClick={onReview}
|
||||
>
|
||||
Review
|
||||
{t("review")}
|
||||
</SubmitButton>
|
||||
</>
|
||||
) : (
|
||||
@@ -56,7 +58,7 @@ export const TaskControls = ({
|
||||
isDisabled={taskStatus.mode === "SUBMITTED"}
|
||||
onClick={onSubmit}
|
||||
>
|
||||
Submit
|
||||
{t("submit")}
|
||||
</SubmitButton>
|
||||
</>
|
||||
)}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Box, Flex, Text, TextProps, useColorModeValue } from "@chakra-ui/react";
|
||||
import { useTranslation } from "next-i18next";
|
||||
|
||||
const TitleClasses: TextProps = {
|
||||
fontWeight: "semibold",
|
||||
@@ -13,6 +14,7 @@ const LabelClasses: TextProps = {
|
||||
};
|
||||
|
||||
export const TaskInfo = ({ id, output }: { id: string; output: string }) => {
|
||||
const { t } = useTranslation();
|
||||
const titleColor = useColorModeValue("gray.700", "gray.400");
|
||||
|
||||
return (
|
||||
@@ -20,7 +22,7 @@ export const TaskInfo = ({ id, output }: { id: string; output: string }) => {
|
||||
<Flex direction="column">
|
||||
<Flex alignItems="center" gap="2">
|
||||
<Text {...TitleClasses} color={titleColor}>
|
||||
Prompt
|
||||
{t("prompt")}
|
||||
</Text>
|
||||
<Text {...LabelClasses} data-cy="task-id">
|
||||
{id}
|
||||
@@ -28,7 +30,7 @@ export const TaskInfo = ({ id, output }: { id: string; output: string }) => {
|
||||
</Flex>
|
||||
<Flex alignItems="center" gap="2">
|
||||
<Text {...TitleClasses} color={titleColor}>
|
||||
Output
|
||||
{t("output")}
|
||||
</Text>
|
||||
<Text {...LabelClasses}>{output}</Text>
|
||||
</Flex>
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useSession } from "next-auth/react";
|
||||
import React from "react";
|
||||
export { getDefaultStaticProps as getStaticProps } from "src/lib/default_static_props";
|
||||
import { Pencil } from "lucide-react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useTranslation } from "next-i18next";
|
||||
import { SurveyCard } from "src/components/Survey/SurveyCard";
|
||||
import { get } from "src/lib/api";
|
||||
import { getTypeSafei18nKey } from "src/lib/i18n";
|
||||
@@ -41,15 +41,15 @@ export default function Account() {
|
||||
<Title>{t("your_account")}</Title>
|
||||
<Divider />
|
||||
<Grid gridTemplateColumns="repeat(2, max-content)" alignItems="center" gap={6} py={4}>
|
||||
<Text as="b">Username</Text>
|
||||
<Text as="b">{t("username")}</Text>
|
||||
<Flex gap={2}>
|
||||
{session.user.name ?? "(No username)"}
|
||||
{session.user.name ?? t("no_username")}
|
||||
<Link href="/account/edit">
|
||||
<Icon boxSize={5} as={Pencil} size="1em" />
|
||||
</Link>
|
||||
</Flex>
|
||||
<Text as="b">Email</Text>
|
||||
<Text>{session.user.email ?? "(No Email)"}</Text>
|
||||
<Text>{session.user.email ?? t("no_email")}</Text>
|
||||
</Grid>
|
||||
</SurveyCard>
|
||||
<SurveyCard>
|
||||
|
||||
Reference in New Issue
Block a user