From 2d6feb607ce0707e74c1e59449f48736441b54fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Pumar?= Date: Tue, 23 Jan 2024 12:57:46 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20Improve=20refactor=20json=20to?= =?UTF-8?q?=20js=20(#4521)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/nuxt.config.ts | 2 +- frontend/translation/en.js | 128 ++++++++++++++++++++++++++++++++++ frontend/translation/en.json | 124 -------------------------------- frontend/translation/index.ts | 5 -- 4 files changed, 129 insertions(+), 130 deletions(-) create mode 100644 frontend/translation/en.js delete mode 100644 frontend/translation/en.json delete mode 100644 frontend/translation/index.ts diff --git a/frontend/nuxt.config.ts b/frontend/nuxt.config.ts index 30af439b10..64db6922a6 100644 --- a/frontend/nuxt.config.ts +++ b/frontend/nuxt.config.ts @@ -119,7 +119,7 @@ const config: NuxtConfig = { locales: [ { code: "en", - file: "en.json", + file: "en.js", }, ], lazy: true, diff --git a/frontend/translation/en.js b/frontend/translation/en.js new file mode 100644 index 0000000000..5ae1931cd6 --- /dev/null +++ b/frontend/translation/en.js @@ -0,0 +1,128 @@ +export default { + multi_label_selection: "Multi-label", + ranking: "Ranking", + label_selection: "Label", + text: "Text", + rating: "Rating", + minimize: "Minimize", + select: "Select", + search: "Search", + expand: "Expand", + copied: "Copied", + title: "Title", + annotation: "Annotation", + description: "Description", + useMarkdown: "Use Markdown", + visibleForAnnotators: "Visible for annotators", + allowExtraMetadata: "Allow extra metadata", + extraMetadata: "Extra metadata", + dimension: "Dimension", + visibleOptions: "Visible options", + annotationGuidelines: "Annotation guidelines", + noAnnotationGuidelines: "This dataset has no annotation guidelines", + breadcrumbs: { + home: "Home", + datasetSettings: "settings", + userSettings: "my settings", + }, + userSettings: { + title: "My settings", + }, + settings: { + title: "Dataset settings", + seeYourDataset: "See your dataset", + editFields: "Edit fields", + editQuestions: "Edit questions", + editMetadata: "Edit metadata properties", + editVectors: "Edit vectors", + deleteDataset: "Delete dataset", + deleteWarning: "Be careful, this action is not reversible", + deleteConfirmation: "Delete confirmation", + deleteConfirmationMessage: + "You are about to delete: {datasetName} from workspace {workspaceName}. This action cannot be undone", + yesDelete: "Yes, delete", + }, + button: { + ignore_and_continue: "Ignore and continue", + }, + to_submit_complete_required: "To submit complete \nrequired responses", + some_records_failed_to_annotate: "Some records failed to annotate", + changes_no_submit: "You didn't submit your changes", + bulkAnnotation: { + recordsSelected: "1 record selected | {count} records selected", + recordsViewSettings: "Record size", + fixedHeight: "Collapse records", + defaultHeight: "Expand records", + to_annotate_record_bulk_required: "No record selected", + select_to_annotate: "Select all", + pageSize: "Page size", + }, + shortcuts: { + label: "Shortcuts", + pagination: { + go_to_previous_record: "Previous (←)", + go_to_next_record: "Next (→)", + }, + }, + questions_form: { + discard: "Discard", + submit: "Submit", + draft: "Save as draft", + }, + sorting: { + addOtherField: "+ Add another field", + suggestion: { + score: "Suggestion score", + value: "Suggestion value", + }, + response: "Response value", + record: "general", + metadata: "metadata", + }, + suggestion: { + filter: { + value: "Suggestion values", + score: "Score", + agent: "Agent", + }, + plural: "Suggestions", + "suggested-rank": "✨ Suggested rank", + name: "✨ Suggestion", + }, + similarity: { + "record-number": "Record number", + findSimilar: "Find similar", + similarTo: "Similar to", + similarityScore: "Similarity Score", + similarUsing: "similar using", + expand: "Expand", + collapse: "Collapse", + }, + status: "Status", + filters: "Filters", + filterBy: "Filter by...", + fields: "Fields", + questions: "Questions", + metadata: "Metadata", + vectors: "Vectors", + dangerZone: "Danger zone", + responses: "Responses", + "reset-all": "Reset all", + reset: "Reset", + with: "with", + find: "Find", + cancel: "Cancel", + focus_mode: "Focus view", + bulk_mode: "Bulk view", + update: "Update", + youAreOnlineAgain: "You are online again", + youAreOffline: "You are offline", + argilla: { + api: { + "errors::UnauthorizedError": "Could not validate credentials", + }, + }, + cloud: { + title: "Cloud", + }, +}; diff --git a/frontend/translation/en.json b/frontend/translation/en.json deleted file mode 100644 index 455dc3fdca..0000000000 --- a/frontend/translation/en.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "multi_label_selection": "Multi-label", - "ranking": "Ranking", - "label_selection": "Label", - "text": "Text", - "rating": "Rating", - "minimize": "Minimize", - "select": "Select", - "search": "Search", - "expand": "Expand", - "copied": "Copied", - "title": "Title", - "annotation": "Annotation", - "description": "Description", - "useMarkdown": "Use Markdown", - "visibleForAnnotators": "Visible for annotators", - "allowExtraMetadata": "Allow extra metadata", - "extraMetadata": "Extra metadata", - "dimension": "Dimension", - "visibleOptions": "Visible options", - "annotationGuidelines": "Annotation guidelines", - "noAnnotationGuidelines": "This dataset has no annotation guidelines", - "breadcrumbs": { - "home": "Home", - "datasetSettings": "settings", - "userSettings": "my settings" - }, - "userSettings": { - "title": "My settings" - }, - "settings": { - "title": "Dataset settings", - "seeYourDataset": "See your dataset", - "editFields": "Edit fields", - "editQuestions": "Edit questions", - "editMetadata": "Edit metadata properties", - "editVectors": "Edit vectors", - "deleteDataset": "Delete dataset", - "deleteWarning": "Be careful, this action is not reversible", - "deleteConfirmation": "Delete confirmation", - "deleteConfirmationMessage": "You are about to delete: {datasetName} from workspace {workspaceName}. This action cannot be undone", - "yesDelete": "Yes, delete" - }, - "button": { - "ignore_and_continue": "Ignore and continue" - }, - "to_submit_complete_required": "To submit complete \nrequired responses", - "some_records_failed_to_annotate": "Some records failed to annotate", - "changes_no_submit": "You didn't submit your changes", - "bulkAnnotation": { - "recordsSelected": "1 record selected | {count} records selected", - "recordsViewSettings": "Record size", - "fixedHeight": "Collapse records", - "defaultHeight": "Expand records", - "to_annotate_record_bulk_required": "No record selected", - "select_to_annotate": "Select all", - "pageSize": "Page size" - }, - "shortcuts": { - "label": "Shortcuts", - "pagination": { - "go_to_previous_record": "Previous (←)", - "go_to_next_record": "Next (→)" - } - }, - "questions_form": { - "discard": "Discard", - "submit": "Submit", - "draft": "Save as draft" - }, - "sorting": { - "addOtherField": "+ Add another field", - "suggestion": { - "score": "Suggestion score", - "value": "Suggestion value" - }, - "response": "Response value", - "record": "general", - "metadata": "metadata" - }, - "suggestion": { - "filter": { - "value": "Suggestion values", - "score": "Score", - "agent": "Agent" - }, - "plural": "Suggestions", - "suggested-rank": "✨ Suggested rank", - "name": "✨ Suggestion" - }, - "similarity": { - "record-number": "Record number", - "findSimilar": "Find similar", - "similarTo": "Similar to", - "similarityScore": "Similarity Score", - "similarUsing": "similar using", - "expand": "Expand", - "collapse": "Collapse" - }, - "status": "Status", - "filters": "Filters", - "filterBy": "Filter by...", - "fields": "Fields", - "questions": "Questions", - "metadata": "Metadata", - "vectors": "Vectors", - "dangerZone": "Danger zone", - "responses": "Responses", - "reset-all": "Reset all", - "reset": "Reset", - "with": "with", - "find": "Find", - "cancel": "Cancel", - "focus_mode": "Focus view", - "bulk_mode": "Bulk view", - "update": "Update", - "youAreOnlineAgain": "You are online again", - "youAreOffline": "You are offline", - "argilla": { - "api": { - "errors::UnauthorizedError": "Could not validate credentials" - } - } -} diff --git a/frontend/translation/index.ts b/frontend/translation/index.ts deleted file mode 100644 index f40fc9ae95..0000000000 --- a/frontend/translation/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import en from "./en.json"; - -export const translations = { - en, -};