Skip to content
This repository has been 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
merged 10 commits into from
Dec 20, 2016

Conversation

haslam22
Copy link
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
Copy link
Contributor

zaggino commented Dec 14, 2016

@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

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

@haslam22
Copy link
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
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
Copy link
Contributor Author

haslam22 commented Dec 17, 2016

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

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

@zaggino
Copy link
Contributor

zaggino commented Dec 20, 2016

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

@haslam22
Copy link
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
Copy link
Contributor

zaggino commented Dec 20, 2016

reviewed & merged, thanks @haslam22 !

@petetnt
Copy link
Collaborator

petetnt commented Dec 22, 2016

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