Alex Gaynor
a92b81b0e8
Fixed tests that I broke a few commits ago.
2012-09-07 14:01:46 -04:00
Alex Gaynor
292322f977
[py3k] Silence many warnings while running the tests.
2012-09-07 13:17:34 -04:00
Alexey Boriskin
10d32072af
Fixed #18798 -- Renamed conflicting test methods in i18n tests
2012-08-23 11:27:56 +02:00
Aymeric Augustin
547b181046
[py3] Ported django.utils.safestring.
...
Backwards compatibility aliases were created under Python 2.
2012-08-18 16:04:06 +02:00
Aymeric Augustin
85e7a5e140
[py3] Stopped attempting to translate bytes.
...
That goes actively against the goal of cleaning string handling.
2012-08-18 11:36:09 +02:00
Claude Paroz
96a6912ec5
[py3] Fixed compilemessages tests
2012-08-08 23:40:20 +02:00
Aymeric Augustin
396357741b
[py3] Used compatible imports of StringIO.
2012-08-08 14:50:01 +02:00
Aymeric Augustin
bdca5ea345
[py3] Replaced unicode/str by six.text_type/bytes.
2012-07-22 09:29:54 +02:00
Aymeric Augustin
3cb2457f46
[py3] Replaced basestring by six.string_types.
2012-07-22 09:29:54 +02:00
Aymeric Augustin
56dbe924a6
[py3] Removed longs.
2012-07-22 09:29:53 +02:00
Claude Paroz
c54905b359
Fixed #18479 -- Stopped makemessages raising error on gettext warnings
...
Thanks Niels Busch for the initial patch.
2012-07-18 20:43:35 +02:00
Claude Paroz
4a103086d5
Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.
...
Thanks Vinay Sajip for the support of his django3 branch and
Jannis Leidel for the review.
2012-06-07 18:08:47 +02:00
Julien Phalip
432339a72c
Fixed #18393 -- Prevented blocktrans to crash when a variable name is badly formatted.
2012-05-28 11:03:34 -07:00
Claude Paroz
c3b56c7cdd
Used call_command in i18n compilation tests.
...
Now that call_command does not raise SystemExit any more, we can
use call_command again for testing compilemessages.
2012-05-27 23:11:27 +02:00
Claude Paroz
38408f8007
Marked bytestrings with b prefix. Refs #18269
...
This is a preparation for unicode literals general usage in
Django (Python 3 compatibility).
2012-05-19 17:43:34 +02:00
Claude Paroz
d7dfab59ea
Replaced cStringIO.StringIO by io.BytesIO.
...
Also replaced StringIO.StringIO by BytesIO in some other appropriate
places. StringIO is not available in Python 3.
2012-05-05 21:41:44 +02:00
Claude Paroz
10cf3c6427
Used catch_warnings instead of save/restore methods. Refs #17049 .
2012-05-03 18:30:07 +02:00
Ramiro Morales
ea28bc2688
Removed unused file from i18n regression tests.
2012-05-03 12:00:36 -03:00
Claude Paroz
eb351ac9cb
Fixed #18037 -- Changed behaviour of url and ssi template tags to the new syntax, as per official deprecation timeline. Thanks Ramiro Morales and Jannis Leidel for the review.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17934 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-24 19:55:52 +00:00
Ramiro Morales
b41ebcf1b9
Fixed #18040 -- Removed so-called project-level locale trees from the list of paths the translation loading process takes in account.
...
Deprecated in Django 1.3. Removed completely for Django 1.5.
Thanks Claude for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17861 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-31 22:24:24 +00:00
Aymeric Augustin
eb163f37cb
Use the class decorator syntax available in Python >= 2.6. Refs #17965 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17829 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-30 09:08:29 +00:00
Claude Paroz
9383a2761c
Removed with_statement imports, useless in Python >= 2.6. Refs #17965 . Thanks jonash for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-30 08:02:08 +00:00
Jannis Leidel
126d9e1b49
Fixed #17817 -- Modified LocalMiddleware to use full URLs when redirecting to i18n URLs. Thanks to Paul for keeping an eye on the standards.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17633 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-02 22:35:26 +00:00
Jannis Leidel
746987f916
Fixed #17734 -- Made sure to only redirect translated URLs if they can actually be resolved to prevent unwanted redirects. Many thanks to Orne Brocaar and Anssi Kääriäinen for input.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17621 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-02 11:07:36 +00:00
Jannis Leidel
7dd0ceba2e
Fixed #17720 -- Stopped the LocaleMiddleware from overeagerly using the request path for language activation if it's actually not wanted. Thanks to Anssi Kääriäinen for the initial patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17547 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-18 13:37:30 +00:00
Jannis Leidel
c1acda6d8f
Updated a few localization formats to stop the changes done in r17473 from breaking the tests.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17486 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-10 01:13:29 +00:00
Jannis Leidel
ef4d84d11a
Fixed #17555 -- Added support for a missing trailing slash when redirecting based on the browser language. Thanks, neaf.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17443 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-04 18:43:20 +00:00
Jannis Leidel
c6065545ef
Fixed #17628 -- Extended makemessages command to also ignore directories when walking, not only when looking for files. Thanks, Claude Paroz.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17441 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-04 18:27:24 +00:00
Carl Meyer
844a24bbb9
Fixed #16921 -- Added assertHTMLEqual and assertHTMLNotEqual assertions, and converted Django tests to use them where appropriate. Thanks Greg Müllegger.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17414 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-31 20:36:11 +00:00
Aymeric Augustin
91f5970bb4
Added a lower level test for numberformat when grouping is 0 and force_grouping is True. Thanks Claude Paroz. Refs #17414 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17268 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-24 11:15:26 +00:00
Julien Phalip
45e3dff5ac
Ensured that `makemessages` doesn't leave any temporary file over if the parsing of a template file fails. Refs #8536 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17240 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-21 15:35:58 +00:00
Ramiro Morales
d317f2ab98
Added another `from__future__ import with_statement` missed in r17190.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17193 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-11 01:00:41 +00:00
Ramiro Morales
f2e99ecfda
Made makemessages leave `'%%'` sequences untouched when extracting translatable literals from blocktrans template tags.
...
This makes it consistent with behavior introduced when fixing #11240 in
processing of literal passed to the trans tag to avoid double escaping
(i.e. `'%%%%'` sequences in resulting PO files.)
Also, cleaned up tests changes from r17190 (removed commented out code and
implemented compatibility with Python 2.5.)
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17192 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-11 00:48:26 +00:00
Ramiro Morales
12a20b6c22
Added files missing from commit [17190]
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17191 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-11 00:09:30 +00:00
Ramiro Morales
ff7556c4ec
Fixed #11240 -- Made makemessages i18n command escape % symbols in literals passed to the trans tag.
...
This avoids problems with unintended automatic detection, marking and
validation of Python string formatting specifiers performed by
xgettext(1)/msgfmt(1) that stem from the fact that under the hood makemessages
converts templates to Python code before passing them to xgettext.
This also makes it consistent with its behavior on literals passed to the
blocktrans tag.
Thanks Jannis and claude for reviewing and feedback.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17190 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-11 00:07:06 +00:00
Ramiro Morales
5e2f5d1466
Fixed a couple of typos.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17166 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-03 17:34:52 +00:00
Julien Phalip
c3df840c20
Fixed #16903 -- Added `--no-location` option to the `makemessages` command to not write '#: filename:line' comment lines in language files. Thanks to alpar for the suggestion and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17081 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-11 13:07:14 +00:00
Julien Phalip
1452cecd15
Fixed 16938 -- Ensured that the active locale's formats take precedence over the default settings even if they would be interpreted as False in a conditional test (e.g. 0 or empty string). Thanks to pikerr for the report and initial patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17017 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-20 12:14:06 +00:00
Julien Phalip
26698bc851
Fixed #14806 -- Added support for contextual translations to the `trans` and `blocktrans` template tags. Thanks to jtiai for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17015 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-19 04:59:47 +00:00
Aymeric Augustin
2bc77be12e
Fixed #17054 -- Ensured the test suite runs when gettext isn't available, after r16981.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17013 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-18 20:35:42 +00:00
Alex Gaynor
8c0eefd066
Convert the remainder of the relative imports in the tests to be absolute imports.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16981 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 21:34:56 +00:00
Jannis Leidel
66dc22c2d9
Fixed #16909 -- Pass language to get_format_modules when calling it from get_format to make sure the correct module is returned.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16884 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-22 15:04:27 +00:00
Carl Meyer
f9dad46d36
Fixed #16803 -- Use model verbose_name directly as ContentType unicode representation so it can be translated. Thanks to bronger for the report and Ivan Sagalaev for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16839 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-16 11:57:03 +00:00
Ramiro Morales
26b8122087
Fixed #14675 -- Completed removal of `from django.conf.urls.default import *` usage.
...
This applies to both our own [test] code and documentation examples. Also:
* Moved the functions and handlers from `django.conf.urls.defaults` up to
`django.conf.urls` deprecating the former module.
* Added documentation for `handler403`.
* Tweaked the URLs topic document a bit.
Thanks to pupeno and cdestigter for their great work contributing patches.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16818 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-11 22:36:16 +00:00
Jannis Leidel
387e192f25
Fixed #16721 -- Made sure that blocktrans correctly handles percents (%), even in the plural block. Thanks for the initial patch, Claude Paroz.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16730 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-08 13:25:41 +00:00
Jannis Leidel
16bb9c594c
Fixed #16516 -- Relaxed the blocktrans rendering a little by falling back to the default language if resolving one of the arguments fails, raising a KeyError. Thanks, Claude Paroz and Aymeric Augustin.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16723 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-08 13:24:41 +00:00
Jannis Leidel
24f4764a48
Fixed #16225 -- Removed unused imports. Many thanks to Aymeric Augustin for the work on the patch and Alex for reviewing.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-13 09:35:51 +00:00
Ramiro Morales
68d18b8492
FIlter warnings about deprecated syntax of the `url` template tag in recently added tests.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16524 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-08 00:39:59 +00:00
Jannis Leidel
286a1cad88
Fixed #16332 -- Added language template tag that switches the activate language for the enclosed template section, e.g. to allow translation of URLs as added in r16405. Many thanks to Florian Apolloner and Orne Brocaar.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16501 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-04 09:52:06 +00:00
Jannis Leidel
352b7ffaf0
Fixed #16322 -- Fixed Accept-Language parsing to allow spaces around semicolons. Thanks, Max Arnold.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16457 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-26 16:51:54 +00:00