Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/django/utils/translation
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #25571 -- Fixed boolean evaluation of ungettext_lazyClaude Paroz2015-10-221-0/+6
|
* Fixed #25297 -- Allowed makemessages to work with {% ↵Alexandre Pocquet2015-09-041-1/+8
| | | | trans %} tags that use template filters.
* Fixed #25295 -- Restored 'no active translation' after ↵Claude Paroz2015-08-251-1/+3
| | | | | | language override Thanks David Nelson Adamec for the report and Tim Graham for the review.
* Fixed #24257 -- Corrected i18n handling of percent signs.Doug Beck2015-08-121-3/+2
| | | | | | | | | | | | | | | Refactored tests to use a sample project. Updated extraction: * Removed special handling of single percent signs. * When extracting messages from template text, doubled all percent signs so they are not interpreted by gettext as string format flags. All strings extracted by gettext, if containing a percent sign, will now be labeled "#, python-format". Updated translation: * Used "%%" for "%" in template text before calling gettext. * Updated {% trans %} rendering to restore "%" from "%%".
* Sorted imports in __init__.py files.Tim Graham2015-06-271-2/+3
|
* Fixed #24230 -- Added translated language name for i18n ↵Tomáš Ehrlich2015-06-021-3/+8
| | | | template tag/filter.
* Fixed #24063 -- Allowed locale variants supported by ↵Michal Čihař2015-04-251-2/+5
| | | | | | gettext. The locale code can contain a variant after @, so allowed that.
* Fixed #24569 -- Made some translation functions accept ↵Claude Paroz2015-04-041-3/+7
| | | | | | | None value get_language() can return None when translations are deactivated. Thanks Nicola Peduzzi for the reporti and Tim Graham for the review.
* Fixed #24515 -- Fixed DjangoTranslation plural handlingClaude Paroz2015-03-211-1/+2
|
* Cleaned up the template debug implementation.Preston Timmons2015-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This patch does three major things: * Merges the django.template.debug implementation into django.template.base. * Simplifies the debug implementation. The old implementation copied debug information to every token and node. The django_template_source attribute was set in multiple places, some quite hacky, like django.template.defaulttags.ForNode. Debug information is now annotated in two high-level places: * Template.compile_nodelist for errors during parsing * Node.render_annotated for errors during rendering These were chosen because they have access to the template and context as well as to all exceptions that happen during either the parse or render phase. * Moves the contextual line traceback information creation from django.views.debug into django.template.base.Template. The debug views now only deal with the presentation of the debug information.
* Fixed #24413 -- Prevented translation fallback for EnglishClaude Paroz2015-02-281-5/+3
| | | | | Thanks Tomasz Kontusz for the report, Baptiste Mispelon for analysis and Tim Graham for the review.
* Sorted imports with isort; refs #23860.Tim Graham2015-02-061-7/+9
|
* Removed deprecated Chinese language codes; refs #18149.Tim Graham2015-01-171-12/+0
|
* Fixed #24073 -- Returned None for get_language when ↵Claude Paroz2015-01-081-0/+3
| | | | | | | translations are deactivated This fixes a regression caused by f7c287fca9. Thanks Markus Holtermann for identifying the regression.
* Cleaned up the django.template namespace.Aymeric Augustin2014-12-281-2/+2
| | | | | | | | | Since this package is going to hold both the implementation of the Django Template Language and the infrastructure for Multiple Template Engines, it should be untied from the DTL as much as possible within our backwards-compatibility policy. Only public APIs (i.e. APIs mentioned in the documentation) were left.
* Fixed #24045 -- Removed useless mark_safe() call in ↵Tim Graham2014-12-261-3/+0
| | | | trans_null.py
* Fixed #20349 -- Moved setting_changed signal to ↵Collin Anderson2014-12-241-1/+1
| | | | | | django.core.signals. This removes the need to load django.test when not testing.
* Simplified caching of supported languages.Aymeric Augustin2014-11-191-16/+15
|
* Fixed #23196 -- Short-circuited empty string translationYuri Kriachko2014-09-211-6/+11
| | | | | | | Translating an empty string used to return the gettext catalog metadata instead of the empty string. Thanks Ned Batchelder for the suggestion, Tim Graham for the review and Anton Berezin and Claude Paroz for contributions to the patch.
* Limited lines to 119 characters in django/Tim Graham2014-09-051-1/+4
| | | | refs #23395.
* Fixed #22820 -- Treated int and long types alike in ↵Claude Paroz2014-08-301-1/+1
| | | | | | lazy_number Thanks kwist for the report and the initial patch.
* Fixed #23381 -- Context manager restored state should be ↵Thomas Chaumeny2014-08-291-1/+1
| | | | determined in __enter__
* Fixed #23323 -- Made django.utils.translation.override ↵Thomas Chaumeny2014-08-281-1/+2
| | | | usable as a decorator.
* Fixed #23005 -- Allowed specifying special fallback ↵Claude Paroz2014-07-142-11/+15
| | | | | | | | | | languages This fixes the Chinese language issues described in #23005 but also provides for other fallback exceptions by updating the LANG_INFO structure. Thanks caxekis at gmail.com for the report and Tim Graham for the review.
* Fixed #8033 -- Explained app registry error during ↵Claude Paroz2014-06-231-1/+9
| | | | | | translation setup Thanks Tim Graham and Aymeric Augustin for the review.
* Fixed #21498: Don't use a fallback language if you're en-us.Andrew Godwin2014-06-171-1/+5
|
* Fixed #22773 -- Forced templatize() to return unicodeClaude Paroz2014-06-061-1/+1
|
* Removed code deprecated from Django 1.2Claude Paroz2014-05-251-14/+2
|
* Applied unicode_literals to makemessages commandClaude Paroz2014-05-241-2/+2
| | | | This also fixes #22686 as some sort of side-effect.
* Fixed #22586 -- Added LANGUAGE_SESSION_KEY to __all__.Tim Graham2014-05-071-0/+1
| | | | Thanks david.fischer.ch at gmail.com for the report.
* Fixed #22565 -- Prevented pgettext_lazy crash with ↵Claude Paroz2014-05-021-1/+2
| | | | | | bytestring input Thanks ygbo for the report.
* flake8 fixes.Tim Graham2014-05-011-1/+1
|
* Refactored DjangoTranslation classDoug Beck2014-04-301-94/+81
| | | | Also fixes #18192 and #21055.
* Refactor. Stop using memory for list copies.Tomasz Wysocki2014-04-021-1/+1
|
* Increased memoization cache size for language codes.Aymeric Augustin2014-03-291-1/+5
| | | | | | | There may be more than 100 (default maxsize) commonly seen xx-yy values on some sites. The additional memory consumption isn't significant. Also added a comment explaining why this cache must have a maxsize.
* Removed reading of old 'django_language' session ↵Tim Graham2014-03-211-2/+1
| | | | | | variable per deprecation timeline. refs #5789.
* Fixed #22283 -- Updated documentation referring to ↵Matthew Somerville2014-03-181-4/+3
| | | | non-existent tuples.
* Fixed #21188 -- Introduced subclasses for ↵Claude Paroz2014-03-081-1/+2
| | | | | | | to-be-removed-in-django-XX warnings Thanks Anssi Kääriäinen for the idea and Simon Charette for the review.
* Fixed #21389 -- Accept most valid language codesBouke Haarsma2014-02-263-50/+39
| | | | | | | | | | | | By removing the 'supported' keyword from the detection methods and only relying on a cached settings.LANGUAGES, the speed of said methods has been improved; around 4x raw performance. This allows us to stop checking Python's incomplete list of locales, and rely on a less restrictive regular expression for accepting certain locales. HTTP Accept-Language is defined as being case-insensitive, based on this fact extra performance improvements have been made; it wouldn't make sense to check for case differences.
* Extra new line to make flake8 happyAlex Gaynor2014-02-221-0/+1
|
* Fixed #22120 -- Documented persistent activation of ↵Erik Romijn2014-02-222-2/+3
| | | | languages and cleaned up language session key use
* Renamed AppCache to Apps.Aymeric Augustin2013-12-241-2/+2
| | | | | | Also renamed app_cache to apps and "app cache" to "app registry". Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
* Moved apps back in the toplevel django namespace.Aymeric Augustin2013-12-221-1/+1
| | | | Reverted 4a56a93cc458e9ab4dcab95d9f5067d4975dd1a2.
* Stopped iterating on INSTALLED_APPS.Aymeric Augustin2013-12-221-5/+3
| | | | Used the app cache's get_app_configs() method instead.
* Fixed 21406 -- Made blocktrans 'trimmed' option preserve ↵Bouke Haarsma2013-12-041-13/+18
| | | | | | line numbers. Thanks Bouke Haarsma for report, fix and initial patch.
* Fixed #21458 -- Made check_for_language more resistant ↵Baptiste Mispelon2013-11-201-2/+6
| | | | | | to malformed input. Thanks to Sergey Sorokin for the report and to Bouke Haarsma for the review.
* Fixed #21351 -- Replaced memoize with Python's lru_cache.Bouke Haarsma2013-11-111-4/+2
| | | | | | | | | | Replaced the custom, untested memoize with a similar decorator from Python's 3.2 stdlib. Although some minor performance degradation (see ticket), it is expected that in the long run lru_cache will outperform memoize once it is implemented in C. Thanks to EvilDMP for the report and Baptiste Mispelon for the idea of replacing memoize with lru_cache.
* Fixed #5849 -- Strip whitespace from blocktransBouke Haarsma2013-11-072-6/+24
| | | | | | | | | | | Add the trimmed option to the blocktrans tag to trim any newlines and whitespace from its content. This allows the developer to indent the blocktrans tag without adding new lines and whitespace to the msgid in the PO file. Thanks to mpessas for the initial patch and Dmitri Fedortchenko for the report.
* flake8 fixesAlex Gaynor2013-11-071-1/+1
|
* Distinguish between browser-deprecated locales and ↵Baptiste Mispelon2013-11-061-6/+8
| | | | | | | | internally deprecated ones. Thanks to bouke for pointing this out.