Skip to content
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

Fix t9n edit #1676

Merged
merged 24 commits into from Jan 27, 2023
Merged

Fix t9n edit #1676

merged 24 commits into from Jan 27, 2023

Conversation

Clemog
Copy link
Contributor

@Clemog Clemog commented Jan 18, 2023

incubateur-ademe/nosgestesclimat-site#775

This PR fixes hand translations overwrite :

  • new attribute auto, corresponding to deepl translation (I had to run all traductions sorry for you credit card @laem ahah, because we need to know if the translation online (attr with no suffix) is the same as auto translation in order to store hand written translation in case of rewriting)
  • following previous point, new attribute previous_review which appears if the lock changed and if the translation is different from auto generated translation. Then a warning informs the user if a rule translation have been improved before changes.
  • Review
  • Validate and do the same in nosgestesclimat-site

Test : locally, change a title anywhere or add a title attribute to a rule (actions for instance with a title different from "actions"), modify the attribute title in translated-rules-en-us, you should have a warning when executing yarn check:rules and then, execute yarn translate:rules, a new line will appears with previous_review attribute.

@github-actions
Copy link

github-actions bot commented Jan 18, 2023

Report for the pull request #1676

🚀 Test the model from the website: https://nosgestesclimat.fr?PR=1676


🔧 Model compilation status

Task Status Message
Rules evaluation ✔️ Ø
Rules compilation to JSON for fr ✔️ Ø
Rules compilation to JSON for en-us ✔️ Ø
Personas compilation to JSON for fr ✔️ Ø
Personas compilation to JSON for en-us ✔️ Ø
Documentation compilation to JSON ✔️ Ø

🌐 Translation status

Rules

Language Nb. missing translations Status
en-us Ø ✔️

Personas

Language Nb. missing translations Status
en-us Ø ✔️

You will find more information about the translation in the dedicated file.

@Clemog Clemog self-assigned this Jan 19, 2023
@Clemog
Copy link
Contributor Author

Clemog commented Jan 27, 2023

I merge this PR. Shouldn't be breaking.

Next steps :

@Clemog Clemog merged commit 824aad9 into master Jan 27, 2023
@Clemog Clemog deleted the fix-t9n-edit branch January 27, 2023 19:43
hasTheSameRefValue =
targetRef &&
areEqual(targetRef.suggestions, refVal.suggestions)
hasTheSameRefValue = targetRef && areEqual(targetRef, refVal)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EmileRolley c'était ici le petit bug, je sais pas si c'est lié à d'autres soucis car tu utiliserais cette fonction ailleurs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant