diff --git a/.editorconfig b/.editorconfig index 9f658db9d..f393da993 100644 --- a/.editorconfig +++ b/.editorconfig @@ -15,3 +15,6 @@ trim_trailing_whitespace = true [**/package.json] indent_size = 2 + +[frontend/src/i18n/*/translation.json] +indent_size = 2 diff --git a/frontend/src/global/i18n.ts b/frontend/src/global/i18n.ts index 7ba9ce777..2ddedaf7f 100644 --- a/frontend/src/global/i18n.ts +++ b/frontend/src/global/i18n.ts @@ -2,7 +2,8 @@ import { Deferred } from 'jquery'; import * as i18next from 'i18next'; import * as languageDetector from 'i18next-browser-languagedetector'; -import * as french from '../i18n/fr.json'; +import * as english from '../i18n/en/translation.json'; +import * as french from '../i18n/fr/translation.json'; const deferred = Deferred(); const i18nPromise = deferred.promise(); @@ -12,6 +13,9 @@ i18next.use( ).init({ fallbackLng: ['en', 'dev'], resources: { + en: { + translation: english, + }, fr: { translation: french, }, diff --git a/frontend/src/i18n/en/translation.json b/frontend/src/i18n/en/translation.json new file mode 100644 index 000000000..43cdd4dfd --- /dev/null +++ b/frontend/src/i18n/en/translation.json @@ -0,0 +1,152 @@ +{ + "heading": { + "annotations": "Annotations" + }, + "feedback_submitted": "Feedback submitted", + "thanks_feedback": "Thank you very much for your feedback, it is highly appreciated!", + "close": "close", + "feedback": "Feedback", + "subject": "Subject", + "about_readit": "About READ-IT", + "feedback_placeholder": "e.g. I love READ-IT!", + "feedback_failed": "Feedback submission failed. Please try again and if this error keeps occuring, contact the\n site administrator.", + "submit": "Submit", + "developed_by": "Developed by", + "add": "Add", + "define_category": "This is a", + "remove": "Remove", + "filterHierarchy": { + "mine": "by me", + "others": "by others", + "verified": "verified", + "unverified": "unverified", + "semantic": "human", + "nlp": "automated" + }, + "permitted_types_before_list": "This property permits", + "current_type": "Current type:", + "typeHints": { + "integer": "", + "base64Binary": "", + "gYear": "", + "string": "" + }, + "all_types_permitted": "This property permits any simple type.", + "no_type_matched": "This value does not match the permitted type(s).", + "name": "Name", + "value": "Value", + "item_metadata": "Item metadata", + "interpunction": { + "colon": ":", + "paragraph_ellipsis": "(...)" + }, + "sources": "Sources", + "sources_tally": "You uploaded {{userSources}} of {{totalSources}} sources.", + "view_sources": "View your sources", + "explore_sources": "Explore sources", + "items": "Items", + "items_tally": "You created {{userItems}} of {{totalItems}} items.", + "view_items": "View your items", + "explore_items": "Explore items", + "username": "Username", + "password": "Password", + "login_failed": "That didn't work. Please try again.", + "login": "Login", + "cancel": "Cancel", + "no_account": "Don't have an account?", + "sign_up": "Sign up!", + "main_navigation": "main navigation", + "menu": "menu", + "about_tooltip": "Find out more about the READ-IT project", + "about": "About", + "search_tooltip": "Search reading experiences and annotations", + "search": "Search", + "explore_tooltip": "Get a random selection of reading experiences and annotations", + "explore": "Explore", + "upload_tooltip": "Upload reading testimonies for annotation", + "upload": "Upload", + "contribute_tooltip": "Find out how to contribute to READ-IT", + "contribute": "Contribute", + "greeting": "Hello, {{username}}!", + "landing-page": "Personal landing page", + "my_sources": "My sources", + "my_items": "My items", + "feedback-tooltip": "Give us feedback on the interface", + "log_out": "Log out", + "not_found_alt": "404 Not Found", + "not_found_text": "}\n Oops, this page doesn't seem to exist.\n You can go back,\n visit Landing or Search,\n or report a problem to the maintainers.\n{", + "pagination": "pagination", + "to_first_page": "Go to page 1", + "to_last_page": "Go to last page", + "annotations_title": "Annotations", + "filter": "Filter", + "export_annotations": "Export annotations", + "edit_annotation": "Edit Annotation", + "annotation_info": "}(Find more info on what and how to annotate in\n the\n Annotation Guide{", + "title_category": "Category", + "category_choice": "Choose a category before saving.", + "needs_verification": "Needs verification", + "label_choice": "Which one?", + "new_item_create": "Create new", + "edit_properties": "Edit properties", + "xsd_available_types_before_link": "See", + "xsd_available_types_link": "the XML Schema recommendation", + "xsd_available_types_after_link": "for an overview of the available types and their lexical representations.", + "preferred_label_choice": "Choose a preferred label before saving.", + "save": "Save", + "delete": "Delete", + "annotation": "Annotation", + "identified_as": "identified as", + "item": "item", + "annotation_verification": "This annotation needs to be verified.", + "item_properties": "Item properties", + "related_items_title": "Related items", + "open_related": "Open related items", + "other_annotations_title": "Other annotations", + "open_annotations": "Open annotations", + "external_resources_title": "External resources", + "open_external": "Open external resources", + "edit": "Edit", + "new": "New", + "annotation_metadata": "Annotation metadata", + "edit_external_resources": "Edit external resources", + "for_item": "For item", + "edit_related_items": "Edit related items", + "no_details": "No further details", + "search_results": "Search Results", + "source_title_many": "Sources", + "no_search_results": "No search results.", + "source_metadata_title": "Source metadata", + "properties_title": "Properties", + "delete_source": "Delete source", + "source_delete_confirm": "\nAre you sure you want to delete this source?\nIf you delete this source, all its annotation will be deleted as well, including any annotations that other users may have made.\nThis cannot be undone.\n", + "confirmation_complete": "Confirmation complete", + "sign_up_thanks_before_link": "Thank you for signing up. You can now", + "sign_up_thanks_link": "login", + "sign_up_thanks_after_link": ".", + "confirmation_failed": "Confirmation failed", + "token_expiration": "This is probably due to token expiration.", + "try_confirm_again": "Please try again and if this error keeps occuring, contact the site administrator.", + "registration_finished": "Registration finished succesfully!", + "activate_account": "Please activate your account via the link in the mail we just sent you.", + "find_email": "Make sure to check your 'Spam' folder if you can't find the email in your inbox.", + "close_window": "You can now close this window.", + "register": "Register", + "email": "Email", + "repeat_password": "Repeat password", + "registration_failed": "Registration failed. Please try again and if this error keeps occuring, contact the site administrator.", + "view_operator_docs": "View documentation of search operators", + "search_database": "Search our database", + "semsearch-subtitle": "Find linked data items based on semantic features", + "optional_label_placeholder": "optional label for reference", + "semsearch-submit": "Search", + "show_hide_metadata": "Show / hide the source metadata", + "show_hide_annotations": "Show / hide annotations", + "upload_source": "Upload source", + "title": "Title", + "author": "Author", + "editor": "Editor (optional)", + "file": "File", + "search-tab-text": "Textual search", + "search-tab-semantic": "Semantic search" +} diff --git a/frontend/src/i18n/fr.json b/frontend/src/i18n/fr.json deleted file mode 100644 index fad86e924..000000000 --- a/frontend/src/i18n/fr.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "greeting": "Bonjour {{name}}!", - "farewell": "Au revoir {{name}}!" -} diff --git a/frontend/src/i18n/fr/translation.json b/frontend/src/i18n/fr/translation.json new file mode 100644 index 000000000..7ef943bd7 --- /dev/null +++ b/frontend/src/i18n/fr/translation.json @@ -0,0 +1,152 @@ +{ + "heading": { + "annotations": "Annotations" + }, + "feedback_submitted": "Feedback submitted", + "thanks_feedback": "Thank you very much for your feedback, it is highly appreciated!", + "close": "close", + "feedback": "Feedback", + "subject": "Subject", + "about_readit": "About READ-IT", + "feedback_placeholder": "e.g. I love READ-IT!", + "feedback_failed": "Feedback submission failed. Please try again and if this error keeps occuring, contact the\n site administrator.", + "submit": "Submit", + "developed_by": "Developed by", + "add": "Add", + "define_category": "This is a", + "remove": "Remove", + "filterHierarchy": { + "mine": "by me", + "others": "by others", + "verified": "verified", + "unverified": "unverified", + "semantic": "human", + "nlp": "automated" + }, + "permitted_types_before_list": "This property permits", + "current_type": "Current type:", + "typeHints": { + "integer": "", + "base64Binary": "", + "gYear": "", + "string": "" + }, + "all_types_permitted": "This property permits any simple type.", + "no_type_matched": "This value does not match the permitted type(s).", + "name": "Name", + "value": "Value", + "item_metadata": "Item metadata", + "interpunction": { + "colon": ":", + "paragraph_ellipsis": "(...)" + }, + "sources": "Sources", + "sources_tally": "You uploaded {{userSources}} of {{totalSources}} sources.", + "view_sources": "View your sources", + "explore_sources": "Explore sources", + "items": "Items", + "items_tally": "You created {{userItems}} of {{totalItems}} items.", + "view_items": "View your items", + "explore_items": "Explore items", + "username": "Username", + "password": "Password", + "login_failed": "That didn't work. Please try again.", + "login": "Login", + "cancel": "Cancel", + "no_account": "Don't have an account?", + "sign_up": "Sign up!", + "main_navigation": "main navigation", + "menu": "menu", + "about_tooltip": "Find out more about the READ-IT project", + "about": "About", + "search_tooltip": "Search reading experiences and annotations", + "search": "Search", + "explore_tooltip": "Get a random selection of reading experiences and annotations", + "explore": "Explore", + "upload_tooltip": "Upload reading testimonies for annotation", + "upload": "Upload", + "contribute_tooltip": "Find out how to contribute to READ-IT", + "contribute": "Contribute", + "greeting": "Bonjour {{name}}!", + "landing-page": "Personal landing page", + "my_sources": "My sources", + "my_items": "My items", + "feedback-tooltip": "Give us feedback on the interface", + "log_out": "Log out", + "not_found_alt": "404 Not Found", + "not_found_text": "}\n Oops, this page doesn't seem to exist.\n You can go back,\n visit Landing or Search,\n or report a problem to the maintainers.\n{", + "pagination": "pagination", + "to_first_page": "Go to page 1", + "to_last_page": "Go to last page", + "annotations_title": "Annotations", + "filter": "Filter", + "export_annotations": "Export annotations", + "edit_annotation": "Edit Annotation", + "annotation_info": "}(Find more info on what and how to annotate in\n the\n Annotation Guide{", + "title_category": "Category", + "category_choice": "Choose a category before saving.", + "needs_verification": "Needs verification", + "label_choice": "Which one?", + "new_item_create": "Create new", + "edit_properties": "Edit properties", + "xsd_available_types_before_link": "See", + "xsd_available_types_link": "the XML Schema recommendation", + "xsd_available_types_after_link": "for an overview of the available types and their lexical representations.", + "preferred_label_choice": "Choose a preferred label before saving.", + "save": "Save", + "delete": "Delete", + "annotation": "Annotation", + "identified_as": "identified as", + "item": "item", + "annotation_verification": "This annotation needs to be verified.", + "item_properties": "Item properties", + "related_items_title": "Related items", + "open_related": "Open related items", + "other_annotations_title": "Other annotations", + "open_annotations": "Open annotations", + "external_resources_title": "External resources", + "open_external": "Open external resources", + "edit": "Edit", + "new": "New", + "annotation_metadata": "Annotation metadata", + "edit_external_resources": "Edit external resources", + "for_item": "For item", + "edit_related_items": "Edit related items", + "no_details": "No further details", + "search_results": "Search Results", + "source_title_many": "Sources", + "no_search_results": "No search results.", + "source_metadata_title": "Source metadata", + "properties_title": "Properties", + "delete_source": "Delete source", + "source_delete_confirm": "\nAre you sure you want to delete this source?\nIf you delete this source, all its annotation will be deleted as well, including any annotations that other users may have made.\nThis cannot be undone.\n", + "confirmation_complete": "Confirmation complete", + "sign_up_thanks_before_link": "Thank you for signing up. You can now", + "sign_up_thanks_link": "login", + "sign_up_thanks_after_link": ".", + "confirmation_failed": "Confirmation failed", + "token_expiration": "This is probably due to token expiration.", + "try_confirm_again": "Please try again and if this error keeps occuring, contact the site administrator.", + "registration_finished": "Registration finished succesfully!", + "activate_account": "Please activate your account via the link in the mail we just sent you.", + "find_email": "Make sure to check your 'Spam' folder if you can't find the email in your inbox.", + "close_window": "You can now close this window.", + "register": "Register", + "email": "Email", + "repeat_password": "Repeat password", + "registration_failed": "Registration failed. Please try again and if this error keeps occuring, contact the site administrator.", + "view_operator_docs": "View documentation of search operators", + "search_database": "Search our database", + "semsearch-subtitle": "Find linked data items based on semantic features", + "optional_label_placeholder": "optional label for reference", + "semsearch-submit": "Search", + "show_hide_metadata": "Show / hide the source metadata", + "show_hide_annotations": "Show / hide annotations", + "upload_source": "Upload source", + "title": "Title", + "author": "Author", + "editor": "Editor (optional)", + "file": "File", + "search-tab-text": "Textual search", + "search-tab-semantic": "Semantic search" +}