Go to https://addons.mozilla.org/en-US/firefox/language-tools/
Check the Dictionary listed for Hindi Language, right now its Hiligaynon spell checker which is wrong
Correct Dictionary for Hindi Language should be listed.

I think this is a bug in the display of languages so I'm going to move it to the frontend. Looks like the code is outputting something in the wrong place, despite the target locale of the spell checker not matching the locale for that row in the table.
The issue is related to the regex used to match languages variants that is too permissive. Here is a quick fix for this issue:
diff --git a/src/amo/pages/LanguageTools/index.js b/src/amo/pages/LanguageTools/index.js
index 50cb73ebf..dd499d083 100644
--- a/src/amo/pages/LanguageTools/index.js
+++ b/src/amo/pages/LanguageTools/index.js
@@ -200,7 +200,7 @@ export class LanguageToolsBase extends React.Component<Props> {
return addon.target_locale === language.locale;
}
- const re = new RegExp(`${language.locale}(-\\w+)?`);
+ const re = new RegExp(`^${language.locale}(-\\w+)?$`);
return addon.target_locale && re.test(addon.target_locale);
});
I am working on this. will submit a PR soon.
Mentor: @willdurand
Can I take up this bug?
@Shubhamchinda yep
Hi @Shubhamchinda
Please go on, Getting Started this will help you in setting up the project, if you have any issues, feel free to ask :)
Hi, if anybody has not taken up this issue. Can i work on it. I read that @willdurand asked to create a test case for this issue. Can anybody tell me how to create one.
@willdurand Okay, Thanks I'll write the test case and let you know when it's done.
Thanks @suhailsinghbains .
Hi @sashaktpathak Shubhamchinda is working on this, so, it cannot be transfered to you without consent. Please feel free to go issues
@willdurand Can you please take a look at it?
@willdurand Can you please take a look at it?
I am not sure I understand the test case you wrote. Could you explain it to me? The test case should fail in any case, given that the issue should be fixed. Thanks!
@willdurand I worked on it again, I hope I did it correct this time. Let me know if its' still not correct.
@willdurand Right now -dev and -stage have a Hindi(India) dictionary available.

I believe this needs a check after it lands on prod.
I believe this needs a check after it lands on prod.
@ioanarusiczki that looks good. I suppose we could upload the Hiligaynon spell checker in -dev/stage and make sure it does not appear here.
@willdurand It's one Hindi now on prod which takes users to Hindi Spell Checker

Most helpful comment
I am working on this. will submit a PR soon.