Jannis Leidel
64e19ffb4e
Fixed #7704 , #14045 and #15495 -- Introduce a lexer for Javascript to fix multiple problems of the translation of Javascript files with xgettext. Many thanks to Ned Batchelder for his contribution of the JsLex library.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16333 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-07 16:11:25 +00:00
Ramiro Morales
c3db0b058c
Modified a couple of i18n regression tests to make them run under Windows.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16281 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-26 21:03:56 +00:00
Jannis Leidel
0322f2b653
Fixed #15263 -- Added support for format localization to the now template tag. Thanks to danielr and dmclain.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16172 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-07 16:58:45 +00:00
Jannis Leidel
b0d274dbd5
Added missing future imports missed in r16167.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16169 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-06 19:49:06 +00:00
Jannis Leidel
7dd72360a2
Make use of new translation and settings context manager in the tests.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16167 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-06 13:29:44 +00:00
Jannis Leidel
71ec87fed8
Added django.utils.translation.override context manager to easily activate and deactivate a language for a code block.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16166 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-06 13:29:32 +00:00
Jannis Leidel
01d0bf011e
Fixed #13810 -- Truncate numbers correctly when given number of decimal positions is zero. Thanks, milosu and Łukasz Rekucki.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16074 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-22 12:03:10 +00:00
Ramiro Morales
487cd1fa23
Added new tests I forgot to include in [16038].
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16039 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-18 21:02:57 +00:00
Ramiro Morales
0defa7dc9d
Fixed #15848 -- Fixed regression introduced in [15882] in makemessages management command when processing multi-line comments that contain non-ASCCI characters in templates. Thanks for the report Denis Drescher.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16038 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-18 20:00:10 +00:00
Russell Keith-Magee
4c468800ee
Updates to the test suite to allow for newly deprecated and removed features
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15990 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-02 08:44:47 +00:00
Adrian Holovaty
0fdabe885b
Made a bunch of simplifications now that we don't support Python 2.4
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15933 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-28 02:27:43 +00:00
Ramiro Morales
775a6e694f
Fixed #15632 -- Ignore unrelated content in template multi-line comment blocks when looking for tokens that identify comments for translators. Thanks andrew AT ie-grad DOT ru for the report and Claude Paroz for spotting the problem and helping to fix it.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15882 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-19 12:56:38 +00:00
Russell Keith-Magee
afd040d4d3
Updated test assertions that have been deprecated by the move to unittest2. In summary, this means:
...
assert_ -> assertTrue
assertEquals -> assertEqual
failUnless -> assertTrue
For full details, see http://www.voidspace.org.uk/python/articles/unittest2.shtml#deprecations
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03 15:04:39 +00:00
Ramiro Morales
8c3416f468
Changed strategy used to force evaluation of django.utils.translation in tests added in r15508 and r15513 to not use reload(). Thanks Alex for reporting it caused problems.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15554 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-16 22:30:44 +00:00
Ramiro Morales
eaf17475b2
Added a test for the PendingDeprecationWarning introduced in r15441. Refs #14924 , #15286 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15513 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-12 20:42:39 +00:00
Jannis Leidel
179fefcf7c
Fixed #15286 -- Don't show deprecation warning if project locale dir is included in LOCALE_PATHS. Thanks to Claude and Ramiro.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15508 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-12 19:12:36 +00:00
Ramiro Morales
f6e38f3800
Fixed #5494 , #10765 , #14924 -- Modified the order in which translations are read when composing the final translation to offer at runtime.
...
This is slightly backward-incompatible (could result in changed final translations for literals appearing multiple times in different .po files but with different translations).
Translations are now read in the following order (from lower to higher priority):
For the 'django' gettext domain:
* Django translations
* INSTALLED_APPS apps translations (with the ones listed first having higher priority)
* settings/project path translations (deprecated, see below)
* LOCALE_PATHS translations (with the ones listed first having higher priority)
For the 'djangojs' gettext domain:
* Python modules whose names are passed to the javascript_catalog view
* LOCALE_PATHS translations (with the ones listed first having higher priority, previously they weren't included)
Also, automatic loading of translations from the 'locale' subdir of the settings/project path is now deprecated.
Thanks to vanschelven, vbmendes and an anonymous user for reporting issues, to vanschelven, Claude Paroz and an anonymous contributor for their initial work on fixes and to Jannis Leidel and Claude for review and discussion.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15441 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-07 18:48:40 +00:00
Ramiro Morales
1a2f9ff9f9
Modified a few tests methods to make sure no leaks of activated locale or USE_I10N setting value happen between tests.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15411 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-04 15:45:52 +00:00
Ramiro Morales
987fd51176
Fixed stability of data input/output L10N format modules priority order. Thanks tonnzor for the report and fix.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15402 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-03 15:43:50 +00:00
Ramiro Morales
193f14d862
Fixed #15157 -- Modified evaluation of literals surrounded by _(' and ')' in templates to be evaluated at render time instead of at compile time by using ugettext_lazy. Thanks Jonathan S for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15327 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-26 15:12:18 +00:00
Jannis Leidel
5f4bc1ff23
Fixed a few translation related tests:
...
* Extended the admin i18n view to also take the admin translation catalogues into account.
* Use a translation string from the core translations to test LOCALE_PATHS.
* Fixed Russian translation of singular forms.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15273 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-21 19:36:26 +00:00
Alex Gaynor
fcbf881d82
Refactor all uses of thread locals to be more consistant and sane.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15232 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-17 09:52:47 +00:00
Ramiro Morales
8b4dffd8df
Modified a try block construct in a test case to be compatible with Python 2.4.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15209 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-15 00:18:15 +00:00
Ramiro Morales
fd12e3b218
Fixed #15024 -- Ensure that choice of L10N format module used is stable given a stable setup of format modules in ll/ and ll_CC/ dirs. Thanks David Reynolds for the report and suggestions leading to the solution.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15183 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-13 03:02:32 +00:00
Jannis Leidel
f0cd656ee0
Fixed #14933 -- Added ability to SelectDateWidget to cope with new alternative month names added in [14900]. Thanks, alek and Claude Peroz.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15017 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-22 00:44:54 +00:00
Jannis Leidel
9ab85e05e2
Fixed #4030 -- Added ability to translate language names. Thanks to Antti Kaihola and Ramiro Morales for the initial patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14894 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-12 23:02:45 +00:00
Ramiro Morales
23f69af454
Fixed #12201 -- Added a lineno attibute to template Token so e.g. we can report line numbers in errors during i18n literals extraction. Thanks madewulf for the report and Claude Paroz for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14813 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-04 17:42:54 +00:00
Russell Keith-Magee
ac91d5ef08
Fixed #14807 -- Ensure that boolean values aren't localized as T.rue and Fa.lse because of the thousand separator. Thanks to vanschelven for the report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14804 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-04 07:44:00 +00:00
Alex Gaynor
5bc0ec4ec4
Removed all usages of deprecated TestCase methods (self.fail*). This removed most of the Warnings emitted (with -Wall) during the test suite.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-04 07:28:12 +00:00
Jannis Leidel
17b329ae08
Fixed #10004 and #12320 -- Enabled the makemessages management command to collect comments for translators that start with the "Translators" keyword. Thanks for the report and patches, martinb and Claude Paroz.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14595 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-17 15:37:33 +00:00
Jannis Leidel
127506aeac
Fixed #11966 -- Made it possible to use a percent sign in a translation message id. Thanks for the patch, Claude Paroz.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14459 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-04 14:06:24 +00:00
Jannis Leidel
efc5384a32
Fixed #6476 -- Added option to makemessages management command to disable wrapping of long lines. Thanks to pytechd for the initial patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14454 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-04 12:08:37 +00:00
Jannis Leidel
83aeb3c768
Fixed #9988 -- Added support for translation contexts. Thanks, Claude Paroz.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14450 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-04 10:48:27 +00:00
Russell Keith-Magee
ccc49029b8
Fixed #14181 -- Added a template tag and filters to allow localization to be disabled in a template. Thanks to Benjamin Wohlwend for the work on the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14395 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-29 16:48:58 +00:00
Ramiro Morales
b79daef867
Consolidated i18n commands test with the rest of the i18n tests.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14133 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-10 22:19:01 +00:00
Jannis Leidel
d80d2e8103
Fixed #14053 -- Also localize long integers. Thanks, David Danier.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13920 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-27 16:21:16 +00:00
Jannis Leidel
534792d055
Fixed #14290 -- Made format localization faster by caching the format modules. Thanks, Teemu Kurppa and Anssi Kääriäinen for the report and initial patches.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13898 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-27 15:25:08 +00:00
Russell Keith-Magee
521be8cd9c
Migrated i18n and field_defaults doctests. Thanks to Alex Gaynor.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13779 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-12 20:03:39 +00:00
Jannis Leidel
7bb6abed12
Fixed #13702 -- Made sure to actually fall back to the l10n format strings provided in the settings, when disabled.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13770 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-12 19:40:44 +00:00
Jannis Leidel
b057a8b247
Fixed #13560 -- Fixed localization of widgets.
...
Particularly this fixes the SplitDateTimeField and the AdminDateWidget by localizating the widget's value in its render method instead of the form field. Thanks to David Danier for the report and Russell for help with the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13296 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-21 14:07:54 +00:00
Russell Keith-Magee
ebfe9383bf
Fixed #13370 -- Corrected the handling of pickling for lazy() proxy objects. Thanks to Alex Gaynor for the report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13000 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-19 12:40:46 +00:00
Jannis Leidel
ca4c6f65ea
Fixed #13032 - Added localize parameter to form fields to be able to selectively enable localization.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12867 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-27 16:43:27 +00:00
Russell Keith-Magee
ad5afd6ed2
Fixed #12769 , #12924 -- Corrected the pickling of curried and lazy objects, which was preventing queries with translated or related fields from being pickled. And lo, Alex Gaynor didst slayeth the dragon.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12866 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-27 15:54:31 +00:00
Jannis Leidel
10d4094b86
Fixed #13054 - Only apply grouping to integer part of numbers if explicitly wanted. Thanks, Ramiro Morales.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12816 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-20 15:26:41 +00:00
Jannis Leidel
0d2a24fd42
Fixed #12779 - Sanitize numeric form field input according to decimal and thousand separator settings.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12625 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-01 10:19:24 +00:00
Jannis Leidel
12d40a9fd6
Fixed #11384 - Make sure translations in the project directory really override translations in apps as specified in the docs.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12447 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-16 12:17:17 +00:00
Jannis Leidel
71da5f62da
Fixed #7720 - Fallback to the base language if the sub language given in the language cookie doesn't exist. Thanks, djoume and Ramiro Morales.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12442 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-16 12:13:48 +00:00
Jannis Leidel
a28bd76bb6
Fixed #12777 - Localize decimal fields correctly. Thanks, Florian Apolloner
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12382 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-05 00:44:35 +00:00
Karen Tracey
e0c3cd4d29
Changed an i18n test to use a number that converts consistely from string to float on Pythons up to 2.7.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12144 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-09 20:57:32 +00:00
Jannis Leidel
ac371ccac8
Fixed #12435 - Handle Unicode characters in format strings correctly.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12057 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-01 21:38:58 +00:00