Commit Graph

156 Commits

Author SHA1 Message Date
Tim Graham 93be2f7dea Refs #25677 -- Skipped an i18n test on older gettext versions. 2015-12-04 17:53:15 -05:00
Josh Soref 93452a70e8 Fixed many spelling mistakes in code, comments, and docs. 2015-12-03 12:48:24 -05:00
Gagaro 34d88944f4 Fixed #25812 -- Restored the ability to use custom formats with the date template filter. 2015-11-28 08:38:45 -05:00
Florian Apolloner 316bc3fc94 Fixed a settings leak possibility in the date template filter.
This is a security fix.
2015-11-24 11:20:29 -05:00
Tim Graham db8763fb23 Refs #25677 -- Fixed Python 2 i18n test failure on non-ASCII path. 2015-11-19 15:55:00 -05:00
Claude Paroz fa08d27fb7 Fixed #25677 -- Prevented decoding errors in/after Popen calls
Thanks Gavin Wahl for the report and Tim Graham for the review.
2015-11-19 15:17:47 +01:00
Marti Raudsepp d3e3703a15 Fixed #25720 -- Made gettext() return bytestring on Python 2 if input is bytestring.
This is consistent with the behavior of Django 1.7.x and earlier.
2015-11-11 08:56:10 -05:00
Ville Skyttä 3ee18400ae Fixed #25668 -- Misc spelling errors 2015-11-03 11:58:13 +02:00
Tim Graham 37ea3cb03e Fixed "URLconf" spelling in code comments. 2015-10-22 14:46:42 -04:00
Claude Paroz 8b5acda821 Fixed #25571 -- Fixed boolean evaluation of ungettext_lazy 2015-10-22 15:17:45 +02:00
Tim Graham a25d3ce007 Refs #22218 -- Removed conf.urls.patterns() per deprecation timeline. 2015-09-23 19:31:09 -04:00
Dražen Odobašić b1e33ceced Fixed #23395 -- Limited line lengths to 119 characters. 2015-09-12 11:40:50 -04:00
Aymeric Augustin b799a50c8e Serialized some tests that interact with the filesystem.
Considering the APIs exercised by these test cases, it's hard to make
them independent.
2015-09-09 23:01:17 +02:00
Alexandre Pocquet e7b7f94678 Fixed #25297 -- Allowed makemessages to work with {% trans %} tags that use template filters. 2015-09-04 15:09:09 -04:00
Sergey Kolosov e75882332c Fixed #17375 -- Changed makemessages to use xgettext with --files-from
Changed the way makemessages invokes xgettext from one call per
translatable file to one call per locale directory (using --files-from).
This allows to avoid https://savannah.gnu.org/bugs/index.php?35027 and,
as a positive side effect, speeds up localization build.
2015-08-28 15:41:58 -04:00
Claude Paroz 9324935c3e Fixed #25295 -- Restored 'no active translation' after language override
Thanks David Nelson Adamec for the report and Tim Graham for the review.
2015-08-25 10:32:10 +02:00
Doug Beck b7508896fb Fixed #24257 -- Corrected i18n handling of percent signs.
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 "%%".
2015-08-12 10:23:34 -04:00
Tim Graham aaacaeb096 Renamed RemovedInDjangoXYWarnings for new roadmap.
Forwardport of ae1d663b79
from stable/1.8.x plus more.
2015-06-24 16:08:20 -04:00
Tim Graham 47fcbe506c Fixed flake8 warnings on Python 3. 2015-06-15 11:27:09 -04:00
Marten Kenbeek 1e82094f1b Fixed #21927 -- Made application and instance namespaces more distinct.
Made URL application namespaces be set in the included URLconf and
instance namespaces in the call to include(). Deprecated other ways
to set application and instance namespaces.
2015-06-08 15:12:20 -04:00
Matthew Somerville 40f0a84cb1 Fixed #24159 -- Made compilemessages run across all apps.
Updated the command to match the documentation, which states it
runs over all .po files.
2015-06-04 21:02:02 -04:00
Simon Charette be67400b47 Refs #24652 -- Used SimpleTestCase where appropriate. 2015-05-20 13:46:13 -04:00
Preston Timmons d17a035132 Moved engine-related exceptions to django.template.exceptions.
With the introduction of multiple template engines these exceptions are no
longer DTL-specific. It makes more sense for them to be moved out of
DTL-related modules.
2015-05-06 17:33:47 -05:00
Alasdair Nicol eaeea6f947 Fixed #24714 -- Used more specific assertions than assertEqual in tests. 2015-04-28 09:31:04 -04:00
Michal Čihař 76d26d8922 Fixed #24063 -- Allowed locale variants supported by gettext.
The locale code can contain a variant after @, so allowed that.
2015-04-24 20:31:16 -04:00
Claude Paroz 7a0d9b5cda Fixed #24569 -- Made some translation functions accept None value
get_language() can return None when translations are deactivated.
Thanks Nicola Peduzzi for the reporti and Tim Graham for the review.
2015-04-04 10:54:16 +02:00
Bas Peschier 9128762f16 Fixed #19910 -- Added slash to i18n redirect if APPEND_SLASH is set.
This introduces a force_append_slash argument for request.get_full_path()
which is used by RedirectFallbackMiddleware and CommonMiddleware when
handling redirects for settings.APPEND_SLASH.
2015-03-26 09:26:55 -04:00
Claude Paroz 9e83f30cd3 Fixed #24515 -- Fixed DjangoTranslation plural handling 2015-03-21 10:27:30 +01:00
Claude Paroz a0c2eb46dd Fixed #23960 -- Removed http.fix_location_header
Thanks Carl Meyer for the report and Tim Graham for the review.
2015-03-18 18:22:50 +01:00
Bas Peschier 0339844b70 Fixed #24476 -- Added context manager/decorator for overriding script prefix.
Tests were using an undocumented keyword argument for easily overriding
script prefix while reversing. This is now changed into a test utility
which can be used as decorator or context manager.
2015-03-18 13:03:25 -04:00
Claude Paroz aa5ab114e3 Fixed #24122 -- Redirected to translated url after setting language
Thanks gbdlin for the initial patch and Tim Graham for the review.
2015-03-13 16:46:40 +01:00
Preston Timmons 358850781f Fixed #24372 - Replaced TokenParser usage with traditional parsing. 2015-03-02 18:25:28 -05:00
Claude Paroz 3cf1c02695 Fixed #24413 -- Prevented translation fallback for English
Thanks Tomasz Kontusz for the report, Baptiste Mispelon for
analysis and Tim Graham for the review.
2015-02-28 10:07:12 +01:00
Tim Graham 0ed7d15563 Sorted imports with isort; refs #23860. 2015-02-06 08:16:28 -05:00
darkryder 9ec8aa5e5d Fixed #24149 -- Normalized tuple settings to lists. 2015-02-03 14:59:45 -05:00
Loic Bistuer 728b6fd9ca Fixed #24219 -- Moved SelectDateWidget together with the other widgets
and deprecated django.forms.extras.

Thanks Berker Peksag and Tim Graham for the reviews.
2015-01-27 22:40:02 +07:00
Adam Taylor 039465a6a7 Fixed typos in code comments. 2015-01-20 12:18:03 -05:00
Tim Graham f0a1df0b01 Removed deprecated Chinese language codes; refs #18149. 2015-01-17 11:23:43 -05:00
Claude Paroz b4ac232907 Fixed #24099 -- Removed contenttype.name deprecated field
This finsishes the work started on #16803.
Thanks Simon Charette, Tim Graham and Collin Anderson for the
reviews.
2015-01-16 20:21:34 +01:00
Claude Paroz 543df07720 Fixed #24073 -- Returned None for get_language when translations are deactivated
This fixes a regression caused by f7c287fca9. Thanks Markus Holtermann
for identifying the regression.
2015-01-08 17:43:07 +01:00
Claude Paroz 51890ce889 Applied ignore_warnings to Django tests 2014-12-30 18:16:25 +01:00
Ramiro Morales 6fb9dee470 Fixed #23271 -- Don't corrupt PO files on Windows when updating them.
Make sure PO catalog text fetched from gettext programs via standard
output isn't corrupted by mismatch between assumed (UTF-8) and real
(CP1252) encodings. This can cause mojibake to be written when creating
or updating PO files.

Also fixes #23311.

Thanks to contributor with Trac nick 'danielmenzel' for the report,
excellent research and fix.
2014-12-29 12:24:50 -03:00
Aymeric Augustin d3205e3e2e Deprecated TEMPLATE_DIRS. 2014-12-28 17:02:30 +01:00
Claude Paroz 9bcd4d812c Fixed #23788 (2) -- Improved gettext version checker
Thanks Tim Graham for the report and initial patch.
2014-12-18 16:06:33 +01:00
wrwrwr 6dbe979b4d Fixed #23930 -- Added copies of captured_std* managers from CPython's test.support.
StringIO import was adapted for compatibility with Python 2.
2014-11-29 11:21:58 -05:00
Tim Graham 3131e9cef5 Fixed #23923 -- Promoted Django's deprecation warnings to errors in runtests.py 2014-11-29 10:27:04 -05:00
Anton Baklanov d63703f1cd Fixed #18714 -- Added 'fuzzy' compilemessages option 2014-11-18 22:44:16 +01:00
Aymeric Augustin a37f452513 Removed superfluous newline. 2014-11-17 22:27:00 +01:00
Ilja Maas bb4a92d784 Fixed #23840 -- Fixed makemessages find_files method
Changed the handling of extensions to be used for gettext. Now
obeying the --extension argument. find_files now only find the
given or default extensions and puts only these in the
TranslatableFiles. As a result there are no more confusing messages
for filetypes (extension) not handled by makemessages.
2014-11-17 09:21:24 +01:00
Claude Paroz 5ec367ccdd Fixed #23788 -- Used new JavaScript support in recent gettext
JavaScript string extraction support has been added in gettext
0.18.3.
Thanks Aymeric Augustin for the review.
2014-11-11 22:52:30 +01:00