learningequality/ka-lite — pull request #1711 by anuragkanungo (2014-03-11 12:03:27+00:00)
Title:  Issue 1422 Button to delete language packs

It provides a delete button with every language pack as shown in screen shot.

![second](https://f.cloud.github.com/assets/4207886/2384844/960b0102-a913-11e3-921a-18f5f6e14409.png)

I have made almost all the changes suggested in previous pull request i.e.
https://github.com/learningequality/ka-lite/pull/1696/files

Some of them was not possible like

1. We can't merge both $(function() because both is dynamically generated so on click event we have to keep it inside the display_languages function.

2. Language are stored in Locale directory and to get that path we don't need any function from i18n/__init__.py , instead could just use settings.LOCALE_PATHS[0] ( same is used in i18n/__init__.py ) .

3. In api_views.py the function defined delete_language_pack name is self explanatory , i don't think we need a doc string.

4. Instead of calling ajax request we could directly call the get_installed_languages() function defined in update_languages.js . So we dont need any refresh function in views as well.

5. I think , missed removing a console.log ( i added it just for testing). Will generate a new PR , but first i would like to get the suggested changes . So, i can include that in new PR as well.