-
Notifications
You must be signed in to change notification settings - Fork 14
Missing acute in french in self harm2084 #2182
Conversation
This pull request introduces 2 alerts when merging 15de80a into 679cdf0 - view on LGTM.com new alerts:
|
@@ -14,7 +14,7 @@ | |||
"analystReport.reportLanguage": "Langue du rapport", | |||
"analystReport.reportNumber": "Signaler le numéro", | |||
"analystReport.reportVersion": "Version du rapport", | |||
"analystReport.selfHarmString": "mots d'automutilation détectés", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where did this translation come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coming from Harm Word in title already defined and used, and PR raiser wish this the same as title
@@ -47,24 +45,36 @@ const selfHarmWordsScan = (data) => { | |||
//Scan String for key words. Tokenize and stem to identify root words. | |||
const scanString = (str) => { | |||
try { | |||
let modifiedStr = unidecode(str.toLowerCase()) | |||
let modifiedStr = str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why declare a variable that has the same value as the param?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep the original copy of data, since modifiedStr will be heavily changed or regrouped in the following code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can consolidate these 2 variables, any others?
From description: Note: In the fix, For example: Déprimé is defined in the env Is this desired outcome? The goal of this code change is to maintain the user's input not correct it. Also, there seems to be a problem with the report. Though self harm keywords are flagged they are not displayed in the report and there seems to be an encoding issue (not sure if this is related to this change or not), see attached. I submitted a report with the word deprime in the What Happened section. |
Sorry, I think I misunderstood part of the description. However, there are several failed unit test related to self harm word scan. |
Nice catch on this screen (word missing from warning yellow part) from this single harmful word, there was a bug associated with handling such single word, I will fix that. |
What's the status of this PR? Is this code change still required? |
There is an error in the code which needs to be fixed, the pointed PR is still valid, not closed |
This pull request was created on Aug. 11. Since we are migrating to Azure at the end of the week it might be a good idea to resolve this issue. |
Close this PR for now, reopen when migration to Azure is ready |
Fixes #2084
This is the fix to PR2084 Missing acute accent in self harm word section
Description
There are 2 issues in this PR
Note: In the fix,
The accute accented sign will be preserved in report, also if user miss any accute accented sign in french word. it will also be captured.
For example: Déprimé is defined in the env
If user type in Déprimé ===> déprimé in report
If user type in déprimé ===> déprimé in report
If user type in deprimé ===> déprimé in report
If user type in deprime ===> déprimé in report
Any new packages installed?
No
Required followup work
Checklist: