Using Django's i18n infra for activation of translation
means that it looks for .mo files to decide whether to
activate it. This means that only those languages that
ship with Django will activate. Since we have our own
i18n system anyway we can copy their mechnics with a
much more simple system.
* newsletter.lang is no longer loaded as a default langfile for all templates (because only 8 locales do the newsletters and default files are assigned to all locales)
* all newsletter templates and newsletter python files except the hacks blog get their strings extracted to mozorg/newsletters.lang
* newsletter/views.py was loading strings from the contribute page, now they are also loaded from mozorg/newsletters.lang
* mozorg/forms.py now also loads strings from mozorg/newsletter.lang
* One string was corrected in a template (2 spaces instead of 1)
* tests and documentation updated
The mozorg/newsletters.lang file already has all the string copied from newsletter.lang and the file is on production on svn for the 8 locales that translate newsletters.
Strings in newsletter.lang that were used outside of newsletters were moved to main.lang
We will remove the old newsletter.lang from svn only once bedrock will run the new code and will no longer include newsletter.lang by default for all pages.
* Remove pytest-xdist from standard run. It's slower than normal if testing the local server.
* Add recommendation to use it if testing a remote instance to README.
* Remove pytest.ini in favor of using setup.cfg.
* Fix tests after redirects modification.
* Add py to redirects requirements.
* Upgrade south migrations to new Django native ones.
* Update deployment to use `migrate` in place of `syncdb`.
* Upgrade waffle and django-extensions for 1.7 compat.
Well... actually it mostly just moves most of funfactory
from an external lib to bedrock.base. But at least this way
we can remove the bits we don't need and be ready to make
the changes we need to upgrade to Django 1.8.
I can't come close to writing as perfect a commit message
for this as @willkg did for fjord, so I'll just leave this here.
https://github.com/mozilla/fjord/commit/9d7c97b
Tags (including "active") should be from all .lang files associated with
a template. So l10n_has_tag() as well as the active state of a page
should include information from all included .lang files from
add_lang_file and set_lang_files calls.
This also moves the check for DEV==True to the helpers, so checking
settings.DEV in templates is no longer necessary.
Use bug_list and bug_search_url fields in template
Add jingo_markdown
Upgrade RNA (4ae910da)
Add firefox.system_requirements view using RNA
Use latest RNA as submodule instead of pip install
Adjust views, settings, templates to use latest RNA
Restore lib/l10n_utils/helpers.py and tests from rebase mistake
Move django-extensions to submodule
Cleanup old rna egg-info
Move django-rest-framework to submodule
Move requests to submodule
Move Python-Markdown to submodule
Move jingo-markdown to submodule
Move six to submodule
Test RNA views + flake8 fixes
Fix flake8
Try to fix Jenkins test breakage
Clean up templates
Cleanup template some more
Reword test docstring and add comments
Update requiremnts/prod.txt to match submodules
Use settings.LANGUAGE_CODE for default locale
Try to make Jenkins happy
* Add sqlite config to base settings.
* Update tests to use Django's database aware TestCase.
* Install south.
* Install django-waffle.
* Update jenkins to use the database for CI.
Django admin will be enabled in a separate PR.
If a template uses the "set_lang_files" template tag
we should check the first lang file in that list if
the lang file for the specific template name isn't
active.
- Specified locales get FxOS messaging.
- Old messaging retained for legacy/other use.
- Update l10n_utils render function to handle list of
templates.
* gettext.py/pot_to_langfiles() updated to extract comments from pot file to templates/*.lang files
* gettext.py/_append_to_lang_file() now outputs comments if they exist
* dotlang.py/parse() has a new optional parameter: extract_comments=False
* l10n_merge uses extract_comments=True
* updated test_merge_lang_file()
* added test_parse_with_comments()
* all tests pass
The base templates had specified "main" in a "set_lang_files"
tag. This was causing child templates to look in "main.lang"
before the lang file for the template. This removes those
errant calls, as well as prevents such accidental additions
from breaking things in future.
The blocks can be any of these 3 style:
{% l10n whatsnew_feature locales=ru,bn-IN 20120712 %}
{% l10n whatsnew_feature 20120712 %}
{% l10n whatsnew_feature, 20120712 %}
For the First example we will have templates in the given two
languages.
2nd and 3rd example, we will have the templates for all locales.
- Ensures that if a locale is used with the old tabzilla URL it will
keep that locale through the redirect.
- Fixes a test that assumed the en-US locale was activated (and broke
as a result of the tabzilla test activating a different one).
* Fix gettext lazy to be able to find additional lang files specified in
python modules.
* Mark all translated strings a safe so that html entities aren't
escaped.
* Add `lang_files` kwarg to _() and _lazy() for searching alternate
lang files for only that string. This will _NOT_ alter extraction.
fix bug 756093
- Move logic to email_contribute.py
- Refactored data structures to conform a bit more to DRY
- Remove newsletter options on non 'en' locales (fix bug 770606)
- Tests ! (fix bug 780911)
- Email backend in DEV environments writes to the console to avoid
unnecessary email sending
- PEP8 cleanups
- Fixes a dotlang test that depended on en-US
- Allow l10n_check command to parse txt files.
- Moved mozorg/templates/emails to mozorg/templates/mozorg/emails so
parser can find the files.
- Cleanup documentation in mozorg/views.py