summaryrefslogtreecommitdiff
path: root/tests/i18n/test_compilation.py
AgeCommit message (Collapse)Author
2025-07-23Refs #36500 -- Rewrapped long docstrings and block comments via a script.django-bot
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
2025-06-11Fixed #36421 -- Made test_msgfmt_error_including_non_ascii compatible with ↵Jericho Serrano
msgfmt 0.25.
2025-01-23Fixed #36010 -- Avoided touching mo files while checking writability.Claude Paroz
2024-08-30Dropped safeguards against very old versions of gettext.Claude Paroz
gettext 0.19 was released in 2014.
2023-11-13Fixed #34952 -- Copied dir list when processing locale folders to avoid ↵Andrew Cordery
missing entries during os.walk traversal. Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2023-02-01Refs #33476 -- Applied Black's 2023 stable style.David Smith
Black 23.1.0 is released which, as the first release of the year, introduces the 2023 stable style. This incorporates most of last year's preview style. https://github.com/psf/black/releases/tag/23.1.0
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-05-26Fixed #32762 -- Fixed locale reset in compilemessages test.Nilo César Teixeira
Reset the `LC_ALL` override value in the test environment to ensure that locale values the calling environment are not used.
2020-06-22Fixed #31692 -- Prevented unneeded .po file compilation.Claude Paroz
Thanks Nick Pope and Simon Charette for the reviews.
2020-06-22Refs #31692 -- Updated compilemessages and tests to use pathlib.Claude Paroz
2020-04-20Disabled management commands output with verbosity 0 in various tests.François Freitag
Instead of capturing the command output and discard it immediately, tell the command not to log.
2019-11-07Refs #29983 -- Added support for using pathlib.Path in all settings.Jon Dufresne
2019-08-23Replaced subprocess commands by run() wherever possible.Claude Paroz
2019-01-28Fixed #29973 -- Added compilemessages --ignore option.rsiemens
2018-06-13Fixed #24384 -- Allowed compilemessages to continue running after nonfatal ↵Claude Paroz
errors. Thanks Aymeric Augustin for the report and Carlton Gibson and Tim Graham for the reviews.
2017-06-01Sorted imports per isort 4.2.9.Tim Graham
2017-02-07Converted usage of ugettext* functions to their gettext* aliasesClaude Paroz
Thanks Tim Graham for the review.
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-24Removed unneeded force_text calls in the test suiteClaude Paroz
2017-01-20Refs #23919 -- Removed django.test.mock Python 2 compatibility shim.Tim Graham
2017-01-20Refs #23919 -- Removed unneeded str() callsClaude Paroz
2017-01-18Refs #23919 -- Removed most of remaining six usageClaude Paroz
Thanks Tim Graham for the review.
2017-01-18Refs #23919 -- Removed six.PY2/PY3 usageClaude Paroz
Thanks Tim Graham for the review.
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2016-08-16Replaced 'raise SkipTest' with self.skipTest() in a few tests.Tim Graham
2016-06-11Refs #26677 -- Simplified i18n test cleanups.Ramiro Morales
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-09Fixed #26677 -- Converted some i18n tests to use disposable FS tree.Ramiro Morales
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-01Fixed #26692 -- Relaxed an i18n compilemessages test.Ramiro Morales
The actual non-ASCII character differs on Windows.
2016-05-28Fixed #26673 -- Fixed a I18N test case error on Windows+Python 2.7.Ramiro Morales
`subprocess.Popen` doesn't accept enviroment vars with Unicode var name or value.
2016-04-08Fixed E128 flake8 warnings in tests/.Tim Graham
2016-02-23Fixed #26232 -- Fixed Popen mocking environment in i18n testsClaude Paroz
Refs #25925. Thanks Jeroen Pulles for the report.
2015-12-13Fixed #25925 -- Forced LANG=C for test_msgfmt_error_including_non_ascii.Sergey Fedoseev
2015-12-04Refs #25677 -- Skipped an i18n test on older gettext versions.Tim Graham
2015-11-19Refs #25677 -- Fixed Python 2 i18n test failure on non-ASCII path.Tim Graham
2015-11-19Fixed #25677 -- Prevented decoding errors in/after Popen callsClaude Paroz
Thanks Gavin Wahl for the report and Tim Graham for the review.
2015-08-12Fixed #24257 -- Corrected i18n handling of percent signs.Doug Beck
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-06-04Fixed #24159 -- Made compilemessages run across all apps.Matthew Somerville
Updated the command to match the documentation, which states it runs over all .po files.
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-02-03Fixed #24149 -- Normalized tuple settings to lists.darkryder
2014-11-29Fixed #23930 -- Added copies of captured_std* managers from CPython's ↵wrwrwr
test.support. StringIO import was adapted for compatibility with Python 2.
2014-11-18Fixed #18714 -- Added 'fuzzy' compilemessages optionAnton Baklanov
2014-05-02Fixed clash caused by the newly introduced -e shorthand for makemessages ↵Loic Bistuer
--exclude. This fixes a regression caused by 0707b82. Refs #22328.
2014-04-26Fixed #22328 -- Added --exclude option to compilemessages and makemessages.Ana Krivokapic
2014-02-18Fixed #21732 -- Made compilemessages complain about non-writable locationClaude Paroz
Instead of crashing with a CommandError, now a non-writable location of mo files will only make compilemessages complain and continue. Thanks Ramiro Morales for the review.
2013-12-23Imported override_settings from its new location.Aymeric Augustin
2013-11-23Fixed #21488 -- Multiple locales treatment in i18n commands.Ramiro Morales
Removed multiple locales separated by commas variation (that wasn't working as documented) in favor of simply allowing use of the ``--locale``/``-l`` options more than once for ``makemessages`` and ``compilemessages``. Thanks Romain Beylerian for the report and Claude, Simon for their help. 8750296918072c97a51f6809d19828ce3f1b8d40 from stable/1.6.x.
2013-10-28Rearranged some i18n testsClaude Paroz
Compilation/extraction tests are now properly skipped when gettext commands are unavailable.