Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Grammarly is not changing the dialect #399

Open
tapyu opened this issue Nov 11, 2023 · 17 comments
Open

Grammarly is not changing the dialect #399

tapyu opened this issue Nov 11, 2023 · 17 comments

Comments

@tapyu
Copy link

tapyu commented Nov 11, 2023

I've configured Grammrly to British dialect
image

However, I didn't take effect even after reloading Vscode
image

The output log:

Ready!
Initializing...
Initialized!
open file:///home/tapyu/tst/test.txt
create text checking session for "file:///home/tapyu/tst/test.txt" with {
  "documentDialect": "british",
  "documentDomain": "general",
  "suggestionCategories": {
    "conjugationAtStartOfSentence": "off",
    "fluency": "on",
    "informalPronounsAcademic": "off",
    "missingSpaces": "on",
    "nounStrings": "on",
    "numbersBeginningSentences": "on",
    "numbersZeroThroughTen": "on",
    "oxfordComma": "off",
    "passiveVoice": "off",
    "personFirstLanguage": "on",
    "possiblyBiasedLanguageAgeRelated": "on",
    "possiblyBiasedLanguageDisabilityRelated": "on",
    "possiblyBiasedLanguageFamilyRelated": "on",
    "possiblyBiasedLanguageGenderRelated": "on",
    "possiblyBiasedLanguageHumanRights": "on",
    "possiblyBiasedLanguageHumanRightsRelated": "on",
    "possiblyBiasedLanguageLGBTQIARelated": "on",
    "possiblyBiasedLanguageRaceEthnicityRelated": "on",
    "possiblyPoliticallyIncorrectLanguage": "on",
    "prepositionAtTheEndOfSentence": "off",
    "punctuationWithQuotation": "on",
    "readabilityFillerWords": "on",
    "readabilityTransforms": "on",
    "sentenceVariety": "on",
    "spacesSurroundingSlash": "on",
    "splitInfinitive": "on",
    "stylisticFragments": "off",
    "unnecessaryEllipses": "off",
    "variety": "on",
    "vocabulary": "on"
  }
} 
text checking session for "file:///home/tapyu/tst/test.txt" is ready
ready file:///home/tapyu/tst/test.txt
connecting file:///home/tapyu/tst/test.txt
checking file:///home/tapyu/tst/test.txt
idle file:///home/tapyu/tst/test.txt
connecting file:///home/tapyu/tst/test.txt
checking file:///home/tapyu/tst/test.txt

@tapyu
Copy link
Author

tapyu commented Nov 11, 2023

I doesn't change from American even when I set it to Australian, Canadian, ...

@tapyu
Copy link
Author

tapyu commented Nov 11, 2023

I just downgraded from 0.24.0 to 0.22.1 and this issue disappeared. There is a bug in the 0.24.0 version

@alvin-agidi
Copy link

Hope this gets fixed soon.

@yrangana
Copy link

Same here. I Downgraded to v.0.23.10, and it's all good now. Hope this will fixed in the next release

@tomatau
Copy link

tomatau commented Dec 29, 2023

Still happens here too

@tomatau
Copy link

tomatau commented Jan 3, 2024

After downgrading, the extension started to report "failed to connect to language server" and stopped working. I've had to re-install latest version and the dialect changes are being ignored again

@dsmaynard
Copy link

Is there any fix to this?

@tapyu
Copy link
Author

tapyu commented Jan 7, 2024

I am pretty stupid when it comes to JavaScript, let alone VSCode extensions. So I am not able to fix it 😕

@RobbieBuxton
Copy link

Also coming across this, would love it for be fixed!

@DylanCope
Copy link

Worryingly, I switched to the pre-release version v0.25.0 and the issue is still present. Hopefully, this can be fixed before the proper release of the next version.

@gobriango19
Copy link

I am encountering this issue, too, and I would love to see it fixed. Thank you!

@marvin-kolja
Copy link

While looking into this, I realized that Grammarly has shut down their developer SDK as explained on the website: "Grammarly for Developers and the Text Editor SDK were discontinued on January 10, 2024" (https://developer.grammarly.com/).

So, this extension may work correctly and Grammarly may not. In any case, this is a real bummer...

@znck, Do you have more information or ideas for the future or this extension?

@viktaur
Copy link

viktaur commented Mar 23, 2024

Maybe it has to do with this?

@marvin-kolja
Copy link

marvin-kolja commented Mar 23, 2024

Maybe it has to do with this?

This seems to be the default. If 'result?.config' contains the dialect it will "overwrite" the default. If, for some reason, the dialect is not in the 'result?.config' it will of course always use the American dialect. Just note my previous comment. It might not be the code at fault.

@viktaur
Copy link

viktaur commented Mar 23, 2024

Interesting. But how come the American spelling is the only one still supported though, whilst ignoring the documentDialect property?

@marvin-kolja
Copy link

marvin-kolja commented Mar 23, 2024

That, I don't know. The Grammarly account is probably owned by @znck. So he may have insights about it.

EDIT:
It's honestly surprising that it still works...

@viktaur
Copy link

viktaur commented Apr 4, 2024

After git diffing versions 0.24.0 and 0.22.1, it looks like the main changes that could potentially be related to this issue are on the ConfigurationService.ts file and the Grammarly SDK version in packages/grammarly-languageclient/package.json

In ConfigurationService.ts, it seems to me that all the properties from config except documentDialect are being included in DocumentConfig, which might be the reason why the chosen dialect is being ignored. However I'm not very experienced in TS syntax so I'm not sure if this is case.

const options: DocumentConfig = {
  documentDialect: 'american',
  ...result?.config,
}

This might fix it.

const options: DocumentConfig = {
  ...result?.config,
}

// Use the user's settings if it contains documentDialect and otherwise default to "american".
options.documentDialect = options.documentDialect ?? 'american';

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

No branches or pull requests

10 participants