-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
233 auto translation flag #302
Conversation
Visit the preview URL for this PR (updated for commit ed7314f): https://cioos-metadata-form--pr302-233-auto-translation-iiy18mm1.web.app (expires Thu, 28 Mar 2024 00:36:12 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 57eda2a7622dc877ccadb675a0532261c52b09fd |
…anslationComplete
might need to bulk change historical data records for auto translate |
There's translate buttons in the resource tab, which translate names and descriptions of resources. Do we want the names and descriptions of resources to have auto translate flags? Those are stored in the distribution field of a record. So, would it be applicable/useful? currently |
what happens when someone edits an existing record? do they have to modify each of the translated fields to get the new key to show up? I think they likely do at the moment. |
a12549b
to
059803b
Compare
@fostermh users no longer need to modify each of the translated fields to get the new key to show up. However, they still need to visit a tab that contains translations. The BilingualTextInput instances need to mount to update the record with translations fields. |
Description
The primary objective of these changes is to flag unverified translations and provide an auto-translation method message, thereby improving the accuracy of translations across different sections of the application.
When the user clicks the
TRANSLATE
button, a new field is added to the record object that stores an auto-translation method message for the metadata entry field being translated. A checkbox has been added beside the translate button to indicate whether the user has verified the translation. If the checkbox is checked, the auto-translation method message for the field being translated is not passed on to the yaml file. If the checkbox is not checked, an auto-translation method message for the field is passed on to the yaml file.This PR solves the problem outlined in #233
The key features and fixes introduced are summarized as follows:
added a new
translationVerified
checkbox to theBilingualTextInput
component. This inclusion allows users to explicitly mark translations as verified in various sections of the metadata entry form, including title, abstract, limitations, and platform description.defined the handler function
handleTranslationComplete
to dynamically generate field names that the identify translation method of various metadata fields.defined the
verify_translation
python function inrecord_json_to_yaml.py
which only returns the auto-translation method message if the translation has not been verified by the user.in the
record_json_to_yaml
python function, added the translation method fields for title, abstract, limitations, and platform description, because those are the metadata fields we currently have automatic translation available for. These fields call the aboveverify_translation
function for their value.