<commit_before>Firefox Flicks
==============
Firefox Flicks is a [playdoh][gh-playdoh]-based site that allows users to submit
vidoes and view other entries in the Firefox Flicks contest.

[gh-playdoh]: https://github.com/mozilla/playdoh


Setup
-----
These instructions assume you have [git][], [python][], and `pip` installed. If
you don't have `pip` installed, you can install it with `easy_install pip`.

1. Start by getting the source:

   ```sh
   $ git clone --recursive git://github.com/mozilla/firefox-flicks.git
   $ cd firefox-flicks
   ```

2. Create a virtualenv for Flicks. Skip the first step if you already have
   `virtualenv` installed.

   ```sh
   $ pip install virtualenv
   $ virtualenv venv
   $ source venv/bin/activate
   $ pip install -r requirements/compiled.txt
   ```

3. Set up a local MySQL database. The [MySQL Installation Documentation][mysql]
   explains how to do this.

4. Configure your local settings by copying `flicks/settings/local.py-dist` to
   `flicks/settings/local.py` and customizing the settings in it:

   ```sh
   $ cp settings/local.py-dist settings/local.py
   ```

   The file is commented to explain what each setting does and how to customize
   them.

5. Initialize your database structure:

   ```sh
   $ python manage.py syncdb
   $ python manage.py migrate
   ```

6. Install translations from SVN into the `firefox-flicks/locale` directory:

   ```sh
   $ git svn clone https://svn.mozilla.org/projects/l10n-misc/trunk/firefoxflicks/locale/ locale
   # or
   $ svn checkout https://svn.mozilla.org/projects/l10n-misc/trunk/firefoxflicks/locale/ locale
   ```

7. Compile the translations:

   ```sh
   $ python manage.py compilemessages
   ```

[git]: http://git-scm.com/
[python]: http://www.python.org/
[mysql]: http://dev.mysql.com/doc/refman/5.6/en/installing.html


Running the Development Server
------------------------------
You can launch the development server like so:

```sh
$ python manage.py runserver
```
<commit_msg>Add gettext installation to README.<commit_after>Firefox Flicks
==============
Firefox Flicks is a [playdoh][gh-playdoh]-based site that allows users to submit
vidoes and view other entries in the Firefox Flicks contest.

[gh-playdoh]: https://github.com/mozilla/playdoh


Setup
-----
These instructions assume you have [git][], [python][], and `pip` installed. If
you don't have `pip` installed, you can install it with `easy_install pip`.

1. Start by getting the source:

   ```sh
   $ git clone --recursive git://github.com/mozilla/firefox-flicks.git
   $ cd firefox-flicks
   ```

2. Create a virtualenv for Flicks. Skip the first step if you already have
   `virtualenv` installed.

   ```sh
   $ pip install virtualenv
   $ virtualenv venv
   $ source venv/bin/activate
   $ pip install -r requirements/compiled.txt
   ```

3. Set up a local MySQL database. The [MySQL Installation Documentation][mysql]
   explains how to do this.

4. Configure your local settings by copying `flicks/settings/local.py-dist` to
   `flicks/settings/local.py` and customizing the settings in it:

   ```sh
   $ cp settings/local.py-dist settings/local.py
   ```

   The file is commented to explain what each setting does and how to customize
   them.

5. Initialize your database structure:

   ```sh
   $ python manage.py syncdb
   $ python manage.py migrate
   ```

6. Install translations from SVN into the `firefox-flicks/locale` directory:

   ```sh
   $ git svn clone https://svn.mozilla.org/projects/l10n-misc/trunk/firefoxflicks/locale/ locale
   # or
   $ svn checkout https://svn.mozilla.org/projects/l10n-misc/trunk/firefoxflicks/locale/ locale
   ```

7. Install the GNU version of `gettext`. If you are on OSX, you can do this
   using [Homebrew][]:

   ```sh
   $ brew install gettext
   $ brew link gettext
   ```

8. Compile the translations:

   ```sh
   $ python manage.py compilemessages
   ```

[git]: http://git-scm.com/
[python]: http://www.python.org/
[mysql]: http://dev.mysql.com/doc/refman/5.6/en/installing.html
[Homebrew]: http://mxcl.github.com/homebrew/


Running the Development Server
------------------------------
You can launch the development server like so:

```sh
$ python manage.py runserver
```

{'fraction_non_alphanumeric': 0.13303296182119992, 'fraction_numerical': 0.006402655916528338, 'mean_word_length': 3.1970149253731344, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3153334', 'n_tokens_mistral': 1379, 'n_tokens_neox': 1308, 'n_words': 437}