Commit Graph

84 Commits

Author SHA1 Message Date
Claude Paroz 7bdb682215
Fixed BasicExtractorTests.test_makemessages_find_files() test. 2022-07-26 07:23:45 +02:00
Ronnie van den Crommenacker c32858a8ce Fixed #33565 -- Improved locale format validation for the makemessages command. 2022-06-08 16:17:12 +02:00
Mariusz Felisiak 7119f40c98 Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
django-bot 9c19aff7c7 Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
Ad Timmering 4bfe8c0eec Fixed #6106 -- Prevented makemessages from changing .po files when up to date.
Co-authored-by: Daniyal Abbasi <abbasi.daniyal98@gmail.com>
2021-11-11 09:12:05 +01:00
Carlton Gibson 4af162d4de Refs #32144 -- Made makemessages remove temporary files on preprocessing error.
Co-authored-by: Anders Hovmöller <anders.hovmoller@dryft.se>
2021-07-01 10:11:10 +02:00
Carlton Gibson dfa7781033 Fixed #32144 -- Made makemessages remove temporary files when locale path doesn't exist. 2021-07-01 10:11:10 +02:00
Jacob Walls 501a371411 Fixed typo in makemessages error message. 2021-06-21 21:23:59 +02:00
Nick Pope 2161db0792
Fixed capitalization of "ECMAScript" and "JavaScript". 2021-04-29 20:29:08 +02:00
Josh Santos 9c6ba87692 Fixed #32145 -- Improved makemessages error message when app's locale directory doesn't exist. 2021-02-09 20:00:20 +01:00
manav014 f63f3cdf09 Fixed #29712 -- Made makemessages warn if locales have hyphens and skip them. 2020-11-13 09:25:42 +01:00
François Freitag c86201b6ed Disabled management commands output with verbosity 0 in various tests.
Instead of capturing the command output and discard it immediately,
tell the command not to log.
2020-04-20 09:09:26 +02:00
Cristobal Mackenzie 984531f96e Fixed #31314 -- Raised CommandError when locale is not specified in makemessages.
Regression in 0707b824fe.
2020-02-28 10:11:19 +01:00
Mike Hansen 35d36d9462 Refs #30585 -- Updated project templates and tests to use (block)translate tags. 2019-12-18 13:15:38 +01:00
Mike Hansen d291c72bf2 Fixed #30585 -- Added {% translate %} and {% blocktranslate %} template tags. 2019-12-18 13:15:38 +01:00
Jon Dufresne 77aa74cb70 Refs #29983 -- Added support for using pathlib.Path in all settings. 2019-11-07 10:26:22 +01:00
Jon Dufresne 4d425abc84 Removed redundant os.chdir() in RunInTmpDirMixin child classes.
setUp() already calls os.chdir(self.test_dir).
2019-02-05 11:00:04 -05:00
Jon Dufresne 1e280f031e Removed unused branch from SymlinkExtractorTests.test_symlink().
Unused since bb7bb379e8.
SymlinkExtractorTests.test_dir, which contains
SymlinkExtractorTests.symlinked_dir, is deleted after every test.
2019-02-05 08:14:23 -05:00
Jon Dufresne 7e3bf2662b Removed default mode='r' argument from calls to open(). 2019-01-27 17:41:43 -05:00
Bartosz Grabski 2bc014750a Fixed #29452 -- Fixed makemessages setting charset of .pot files. 2018-06-11 21:34:13 -04:00
Claude Paroz d65b0f72de Fixed #17379 -- Removed management commands deactivation of the locale. 2018-05-13 10:21:53 +02:00
Mariusz Felisiak 362813d628
Fixed hanging indentation in various code. 2018-03-16 10:54:34 +01:00
Tim Graham 0b00a8988b Fixed crash in i18n tests skip condition if gettext isn't installed. 2017-06-29 13:09:16 -04:00
Jon Dufresne 2c69824e5a Refs #23968 -- Removed unnecessary lists, generators, and tuple calls. 2017-06-01 19:08:59 -04:00
Tim Graham cde31daf88 Sorted imports per isort 4.2.9. 2017-06-01 13:23:48 -04:00
Ling-Xiao Yang 04ab96ec4f Fixed #28015 -- Added makemessages --add-location option.
Thanks François Freitag for review.
2017-05-22 09:03:53 -04:00
Claude Paroz 30c984b3f9 Fixed #27868 -- Filtered locale path subdirectories
Thanks Tim Graham for the review.
2017-02-23 09:12:20 +01:00
Tim Graham 1c466994d9 Refs #23919 -- Removed misc Python 2/3 references. 2017-01-25 13:59:25 -05:00
chillaranand d6eaf7c018 Refs #23919 -- Replaced super(ClassName, self) with super(). 2017-01-25 12:23:46 -05:00
Claude Paroz 2366100872 Removed unneeded force_text calls in the test suite 2017-01-24 18:45:54 +01:00
Tim Graham 7aba69145d Refs #23919 -- Removed django.test.mock Python 2 compatibility shim. 2017-01-20 08:17:20 -05:00
Aymeric Augustin a556396339 Refs #23919 -- Replaced io.open() with open().
io.open() is an alias for open() on Python 3.
2017-01-18 21:45:12 -05:00
Claude Paroz 2b281cc35e Refs #23919 -- Removed most of remaining six usage
Thanks Tim Graham for the review.
2017-01-18 21:33:28 +01:00
Claude Paroz 7b2f2e74ad Refs #23919 -- Removed six.<various>_types usage
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18 20:18:46 +01:00
Claude Paroz d7b9aaa366 Refs #23919 -- Removed encoding preambles and future imports 2017-01-18 09:55:19 +01:00
Tim Graham b5f0b3478d Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase. 2016-12-07 17:42:31 -05:00
za 321e94fa41 Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
Marti Raudsepp b9eb267c46 Skipped makemessages -l tests when xgettext isn't installed. 2016-11-08 17:43:48 -05:00
Claude Paroz fa2f55cfd5 Refs #26940 -- Re-allowed makemessages without settings
Thanks Tim Graham for the review.
2016-10-01 14:57:16 +02:00
Tim Graham 8119b679eb Refs #27025 -- Fixed "invalid escape sequence" warnings in Python 3.6.
http://bugs.python.org/issue27364
2016-09-17 15:44:06 -04:00
Tim Graham 5a41ca79dc Replaced 'raise SkipTest' with self.skipTest() in a few tests. 2016-08-16 16:42:27 -04:00
Claude Paroz 5fb22b4d4c Fixed #27034 -- Made makemessages independent of USE_I18N
Thanks Tim Graham for the review.
2016-08-11 21:16:19 +02:00
Claude Paroz 3e71f6544f Fixed #26897 -- Fixed makemessages crash on Python 2 with non-ASCII file names
Thanks Tim Graham for the review.
2016-07-14 20:37:56 +02:00
Ramiro Morales bb7bb379e8 Refs #26677 -- Simplified i18n test cleanups.
The fact that we aren't dealing with the Django source tree anymore
allows us to drop several tearDown()/addCleanup() calls that were
concerned with removing apiece files/dirs/symlinks created by test
cases, as we are covered by the removal of the parent temporary tree
anyways.

Thanks Tim Graham for advice and review.
2016-06-11 13:05:56 -03:00
Ramiro Morales faeeb84edf Fixed #26677 -- Converted some i18n tests to use disposable FS tree.
This allows makemessages/compilemessages tests in `test_extraction.py`
and `test_compilation.py` to actually run isolated from each other
(unaffected by stray FS objects left by cleanup actions failures, debug
sessions, etc.) and to take advantage of the parallel tests execution
feature like most of the Django test suite.

`test_percents.py` gets slightly refactored to not inherit from the new
machinery which sets up every test case to copy and run under a
temporary tree.
2016-06-09 22:03:07 -03:00
Ramiro Morales e3877c53ed Fixed #26687 -- Made an i18n test not use a hardcoded path separator.
Fixed a failure on Windows.
2016-05-31 12:00:36 -04:00
Ramiro Morales 1b00ed0880 Fixed #26674 -- Corrected a i18n makemessages test.
Made it consistently read the PO file, decode its contents and then
check for the non-breaking space Unicode code point.

Previously we were erroneously skipping the interpretation of what we
read as UTF-8 text.

This was causing the test to fail on Windows with Python 3.5.
2016-05-29 10:31:10 -03:00
Claude Paroz b16b124996 Fixed #26341 -- Fixed makemessages breaking location comments for HTML files
Thanks Sylvain Garancher for the report and Veranika Sabiashchanskaya for the
initial patch.
2016-04-30 12:08:20 +02:00
Claude Paroz 185f90c45f Adapted _assertPoLocComment for multi-file source lines in po files
Refs #17375.
2016-04-30 12:07:40 +02:00
Tim Graham 92053acbb9 Fixed E128 flake8 warnings in tests/. 2016-04-08 10:12:33 -04:00