OiWorld / MindTheWord

An extension for Google Chrome that helps people learn new languages while they browse the web.
43 stars 47 forks source link

fix duplicate pattern input in createPattern function #70

Closed ankit-m closed 8 years ago

ankit-m commented 8 years ago

When a user creates the same pattern again, this fix raises a warning and does not allow duplicate creation.

This is good. Avoiding creating repeated translation patterns is good. Remember to warn the user that a new pattern has not been created because it already exists.

I have put the warning.

This is not good. It is ok to have two patterns with the same languages and different probabilities. For instance, if I am learning Russian, I could be interested in having two translation patterns from English to Russian: one with low probability, for everyday use; and one with high probability, when I really want to study Russian harder.

I have made the changes suggested. Now same languages with different probabilities can be created.

This change was initially in pull request #65.

ceilican commented 8 years ago

Thanks!