Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Fix for #12970: Non-default languages and user preferences bug - #12979

Merged
zaggino merged 10 commits into
adobe:masterfrom
haslam22:prefs-fix
Dec 20, 2016
Merged

zaggino merged 10 commits into
adobe:masterfrom
haslam22:prefs-fix

Conversation

@haslam22

Copy link
Copy Markdown
Contributor

This fixes #12970 by removing invalid mappings from the preference state, occurring when a language has not been loaded yet. When the language is eventually loaded, an _updateFromPrefs call restores the preferences.

@zaggino

zaggino commented Dec 14, 2016

Copy link
Copy Markdown
Contributor

@Athorcis can you review and verify this fixes #12970 ?
I've tried this but it doesn't seem to resolve the steps described in your issue.

@Athorcis

Copy link
Copy Markdown

@zaggino i'll try and i'll let you know

@haslam22

Copy link
Copy Markdown
Contributor Author

@zaggino Just tested it again on Windows & Ubuntu with the latest master and it works fine with the steps described in the issue. I may have missed something so I'll take another look later

Better way of dealing with this bug is just to remove invalid mappings
from the prefs state, and force an _updateToPrefs call when defining a
non-default language
@haslam22

Copy link
Copy Markdown
Contributor Author

Reset the branch, I think I messed up my fork somehow. Should work fine now.

Check if a language isn't in the file extension map when it should be
@haslam22

haslam22 commented Dec 17, 2016 •

Copy link
Copy Markdown
Contributor Author

I was able to produce a fix for the steps in the issue but I didn't try using .twig files (issue describes step 2 as any file type that's not supported). I can now see that overriding .twig is a specific scenario that doesn't work, but all other extensions are fine.

So I've added a fix for this as well. You can now override .twig files and make it work with the Twig language.

Apologies for any spam.

@Athorcis

Copy link
Copy Markdown

Thx for your work, i don't have the bug anymore

@zaggino

zaggino commented Dec 20, 2016

Copy link
Copy Markdown
Contributor

@haslam22 let me know when you think it's ready, I see you're still adding some commits.

@haslam22

Copy link
Copy Markdown
Contributor Author

@zaggino All finished now, thanks for taking the time to review.

@zaggino
zaggino merged commit bc4f6a7 into adobe:master Dec 20, 2016
@zaggino

zaggino commented Dec 20, 2016

Copy link
Copy Markdown
Contributor

reviewed & merged, thanks @haslam22 !

@petetnt

petetnt commented Dec 22, 2016

Copy link
Copy Markdown
Collaborator

Nice job @haslam22 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Brackets reset default language to plain/text

4 participants