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

Adds translation of form #237

Merged
merged 56 commits into from
Jan 19, 2023
Merged

Adds translation of form #237

merged 56 commits into from
Jan 19, 2023

Conversation

Khadija21102
Copy link
Contributor

Add internationalization by adding the possibility to enter the form in 3 languages and having the frontend displayed on the 3 languages

@Khadija21102 Khadija21102 requested a review from a team as a code owner December 19, 2022 09:22
@Khadija21102 Khadija21102 marked this pull request as draft December 19, 2022 09:23
@coveralls
Copy link

coveralls commented Dec 23, 2022

Pull Request Test Coverage Report for Build 3952471509

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 57.386%

Totals Coverage Status
Change from base Build 3951882166: 0.0%
Covered Lines: 3271
Relevant Lines: 5700

💛 - Coveralls

@Khadija21102 Khadija21102 requested a review from nkcr January 14, 2023 10:08
Copy link
Contributor

@nkcr nkcr left a comment

Choose a reason for hiding this comment

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

  • there are some formatting issues
  • there is still some mess with the dependencies: make sure to remove the package-lock.json, and leave the others untouched.

const { t } = useTranslation();

const handleChecks = (e: React.ChangeEvent<HTMLInputElement>, choiceIndex: number) => {
const newAnswers = answersFrom(answers);
let selectAnswers = newAnswers.SelectAnswers.get(select.ID);

if (select.MaxN === 1) {
selectAnswers = new Array<boolean>(select.Choices.length).fill(false);
selectAnswers = new Array<boolean>(select.ChoicesMap.get('en').length).fill(false);
Copy link
Contributor

Choose a reason for hiding this comment

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

still got the same remark

const { t } = useTranslation();
const [charCounts, setCharCounts] = useState(new Array<number>(text.Choices.length).fill(0));
const [charCounts, setCharCounts] = useState(
new Array<number>(text.ChoicesMap.get('en').length).fill(0)
Copy link
Contributor

Choose a reason for hiding this comment

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

But if there is indeed the french available, how can it get displayed ?

@@ -124,7 +126,54 @@ const AddQuestionModal: FC<AddQuestionModalProps> = ({
return;
}
};

/*type renderQuestionModalProps = {
Copy link
Contributor

Choose a reason for hiding this comment

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

so it can be removed

@Khadija21102 Khadija21102 requested a review from nkcr January 16, 2023 12:59
@nkcr nkcr changed the title Tagemoua patch1 Adds translation of form Jan 16, 2023
nkcr
nkcr previously approved these changes Jan 16, 2023
Copy link
Contributor

@nkcr nkcr left a comment

Choose a reason for hiding this comment

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

Great, LGTM 🚀

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 14 Code Smells

0.0% 0.0% Coverage
8.3% 8.3% Duplication

@Khadija21102 Khadija21102 requested a review from nkcr January 19, 2023 08:39
Copy link
Contributor

@nkcr nkcr left a comment

Choose a reason for hiding this comment

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

Ready to go 🚀

@Khadija21102 Khadija21102 merged commit 836cce5 into main Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants