Commit Graph

44 Commits

Author SHA1 Message Date
Claude Paroz fd58d6c258 Merge walk and find_files in makemessages command 2012-08-21 14:43:37 +02:00
Aymeric Augustin 16ab519f62 [py3] Removed gratuitous use of map/lambda
that causes a test failure on Python 3 because map returns an iterator.
2012-08-18 11:55:36 +02:00
Claude Paroz 0dac73ebd7 Removed binary flag to open files for writing text content 2012-08-13 18:23:26 +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 8184aff2b0 Fixed #18547 -- Improved error message when gettext is missing 2012-07-17 22:04:47 +02:00
Claude Paroz 865cd35c9b Made more extensive usage of context managers with open. 2012-05-05 14:06:36 +02:00
Adrian Holovaty 21f11e5280 Updated compilemessages and makemessages management commands to change SVN->Git references 2012-04-27 22:37:59 -05:00
Carl Meyer 89b57a7c77 Added missing newline to makemessages output. Thanks Florian Apolloner for report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17631 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-02 20:34:46 +00:00
Ramiro Morales 9b762d170a Made a couple of idiomatic changes in makemessages.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17449 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-04 22:12:58 +00:00
Ramiro Morales 2894ec71c9 Removed hard-coded root tree path in makemessages.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17448 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-04 21:44:31 +00:00
Ramiro Morales a4f68c1b40 Fixed undefined variable name in makemessages command code.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17446 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-04 20:02:46 +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
Ramiro Morales 7c6e265a9f Refactored the internals of makemessages management command for better readability.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17261 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-23 11:24:35 +00:00
Jannis Leidel a9a0f0b03f Fixed #17042 -- Extended startproject and startapp management commands to better handle custom app and project templates. Many thanks to Preston Holmes for his initial patch and Alex Gaynor, Carl Meyer, Donald Stufft, Jacob Kaplan-Moss and Julien Phalip for code reviewing.
* Added ability to pass the project or app directory path as the second argument
* Added ``--template`` option for specifying custom project and app templates
* Cleaned up admin_scripts tests a little while I was there

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17246 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-22 22:38:02 +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
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 8f750bf6e5 Fixed #16897 -- Fixed some docstrings and help texts for the `makemessages` management command. Thanks, Simon Meers.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16864 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-21 17:25:13 +00:00
Jannis Leidel 63f9b67129 Added '.txt' to list of file extensions that the makemessages management command automatically scans. Refs #12202.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16437 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-19 11:24:25 +00:00
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
Jannis Leidel 204e83e331 Fixed #8536 -- Made sure the makemessages management command cleans up after throwing an error. Thanks to Ramiro for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15506 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-12 19:12:21 +00:00
Ramiro Morales 7c888a7aa9 Fixed #14419 -- Enhanced the help text of the makemessages management command. Thanks lsaffre for the report and suggestions and gruszczy for the patch.
Also, removed the sterile make-messages.py, compile-messages.py scripts and dead compatibility code in makemessages.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15302 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-25 01:39:39 +00:00
Ramiro Morales eacecbe9e3 Converted makemessages management command to a NoArgsCommand.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15279 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-21 21:00:39 +00:00
Jannis Leidel cf179e195d Added contrib apps to ignore list when running makemessages in the Djagno source tree and added a --no-obsolete option in preparation of moving app translations out of core.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15258 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-21 17:30:35 +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
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 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 56eb340528 Fixed #13374 -- Corrected some more minor issues causing problems for PyPy. Thanks to Alex Gaynor for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12998 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-19 11:52:56 +00:00
Jannis Leidel 89df0432f2 Fixed #6505 - Copy plural forms from Django translation files for newly created translation files. Thanks to Ramiro Morales for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12445 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-16 12:15:41 +00:00
Jannis Leidel eb26c9686b Fixed #7050 - Allow the makemessages command to optionally ignore paths when examining source code and templates for translation strings.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12444 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-16 12:15:04 +00:00
Jannis Leidel fef575a7f9 Fixed #6380 - Follow symlinks when examining source code and templates for translation strings.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12443 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-16 12:14:27 +00:00
Jannis Leidel e50eefceb6 Fixed #4695 - Worked around a problem of xgettext ignoring some translation strings in JavaScript files. Thanks, Ramiro Morales.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12441 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-16 12:13:23 +00:00
Jannis Leidel 9b630a0857 Fixed #11284 - Stop forcing the use of the djangojs domain when the ".js" file extension is passed to makemessages management command. Thanks, Ramiro Morales.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12439 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-16 12:12:13 +00:00
Jannis Leidel cdeb90e345 Fixed #11869 - Prevent deadlocks when calling gettext utilities on Windows. Also fixes #12783. Thanks Ramiro Morales and soulburner.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12383 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-05 00:44:56 +00:00
Jannis Leidel df82175c17 Fixed #12673 - Require a version of GNU gettext of 0.1.5 and above.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12296 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-26 15:01:58 +00:00
Jacob Kaplan-Moss 077a94c550 Fixed #10867: make the makemessages command ignore files and only process directories. Thanks, diegobz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10833 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-20 20:05:14 +00:00
Malcolm Tredinnick 794f2d121e Fixed #10234 -- Improved error message when internationalizing templates.
Patch from peterbe and Andrew Badr.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10538 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-12 02:50:41 +00:00
Karen Tracey 5d3b222a59 Fixed #9212: Added code to check the xgettext version, and if it is lower than 0.15, undo an incorrect encoding to utf-8 done by xgettext. This bug was fixed in xgettext 0.15, but the most-easily-installed Windows gettext binaries are older (0.13.1), so we work around it.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9155 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-06 01:36:35 +00:00
Malcolm Tredinnick 2f188334d3 Fixed #9283 -- Deliberately silence one deprecation warning raised by python 2.6.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9148 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-05 11:39:58 +00:00
Russell Keith-Magee 8d98e70e42 Promoted --verbosity to be a top level option for all management commands. Also added -v as a consistent short form of --verbosity. This is mostly to save Malcolm's poor arthritic fingers.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9110 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-02 12:57:13 +00:00
Malcolm Tredinnick fcf059d539 Fixed #7084 -- Fixed the "makemessages" command to handle line endings
correctly on Windows (previous behaviour was to explode when encountering a
multi-line messages). Patch and testing from Ramiro Morales.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8576 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 07:43:59 +00:00
Malcolm Tredinnick 3735f27660 Fixed #5463 -- Allow alternate file extensions on files that are translated.
Patch from Jannis Leidel.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8234 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-08 16:41:55 +00:00
Malcolm Tredinnick 25f2cfb7cb Fixed #7643 -- Fixed an oversight from [7844].
Now makemessages works in projects again. Based on a patch from Horst Gutmann.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7848 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-06 12:55:24 +00:00
Malcolm Tredinnick 3cfa3cbd07 Fixed #5522 -- Moved make-messages, compile-messages and daily-cleanup into django-admin.py.
They are now called  "makemessages", "compilemessages" and "cleanup". This is
backwards incompatible for make-messages.py and compile-messages.py, although
the old executables still exist for now and print an error pointing the caller
to the right command to call.

This reduces the number of binaries and man pages Django needs to install.

Patch from Janis Leidel.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7844 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-06 06:39:44 +00:00