Author: ramiro
Date: 2011-01-24 19:39:39 -0600 (Mon, 24 Jan 2011)
New Revision: 15302

Removed:
   django/trunk/django/bin/compile-messages.py
   django/trunk/django/bin/make-messages.py
Modified:
   django/trunk/django/core/management/commands/makemessages.py
Log:
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.

Deleted: django/trunk/django/bin/compile-messages.py
===================================================================
--- django/trunk/django/bin/compile-messages.py 2011-01-25 00:42:54 UTC (rev 
15301)
+++ django/trunk/django/bin/compile-messages.py 2011-01-25 01:39:39 UTC (rev 
15302)
@@ -1,11 +0,0 @@
-#!/usr/bin/env python
-
-if __name__ == "__main__":
-    import sys
-    name = sys.argv[0]
-    args = ' '.join(sys.argv[1:])
-    print >> sys.stderr, "%s has been moved into django-admin.py" % name
-    print >> sys.stderr, 'Please run "django-admin.py compilemessages %s" 
instead.'% args
-    print >> sys.stderr
-    sys.exit(1)
-

Deleted: django/trunk/django/bin/make-messages.py
===================================================================
--- django/trunk/django/bin/make-messages.py    2011-01-25 00:42:54 UTC (rev 
15301)
+++ django/trunk/django/bin/make-messages.py    2011-01-25 01:39:39 UTC (rev 
15302)
@@ -1,11 +0,0 @@
-#!/usr/bin/env python
-
-if __name__ == "__main__":
-    import sys
-    name = sys.argv[0]
-    args = ' '.join(sys.argv[1:])
-    print >> sys.stderr, "%s has been moved into django-admin.py" % name
-    print >> sys.stderr, 'Please run "django-admin.py makemessages %s" 
instead.'% args
-    print >> sys.stderr
-    sys.exit(1)
-

Modified: django/trunk/django/core/management/commands/makemessages.py
===================================================================
--- django/trunk/django/core/management/commands/makemessages.py        
2011-01-25 00:42:54 UTC (rev 15301)
+++ django/trunk/django/core/management/commands/makemessages.py        
2011-01-25 01:39:39 UTC (rev 15302)
@@ -145,11 +145,7 @@
         raise CommandError("currently makemessages only supports domains 
'django' and 'djangojs'")
 
     if (locale is None and not all) or domain is None:
-        # backwards compatible error message
-        if not sys.argv[0].endswith("make-messages.py"):
-            message = "Type '%s help %s' for usage.\n" % 
(os.path.basename(sys.argv[0]), sys.argv[1])
-        else:
-            message = "usage: make-messages.py -l <language>\n   or: 
make-messages.py -a\n"
+        message = "Type '%s help %s' for usage information." % 
(os.path.basename(sys.argv[0]), sys.argv[1])
         raise CommandError(message)
 
     # We require gettext version 0.15 or newer.
@@ -301,11 +297,11 @@
 class Command(NoArgsCommand):
     option_list = NoArgsCommand.option_list + (
         make_option('--locale', '-l', default=None, dest='locale',
-            help='Creates or updates the message files only for the given 
locale (e.g. pt_BR).'),
+            help='Creates or updates the message files for the given locale 
(e.g. pt_BR).'),
         make_option('--domain', '-d', default='django', dest='domain',
             help='The domain of the message files (default: "django").'),
         make_option('--all', '-a', action='store_true', dest='all',
-            default=False, help='Reexamines all source code and templates for 
new translation strings and updates all message files for all available 
languages.'),
+            default=False, help='Updates the message files for all existing 
locales.'),
         make_option('--extension', '-e', dest='extensions',
             help='The file extension(s) to examine (default: ".html", separate 
multiple extensions with commas, or use -e multiple times)',
             action='append'),
@@ -320,7 +316,11 @@
         make_option('--no-obsolete', action='store_true', dest='no_obsolete',
             default=False, help="Remove obsolete message strings"),
     )
-    help = "Runs over the entire source tree of the current directory and 
pulls out all strings marked for translation. It creates (or updates) a message 
file in the conf/locale (in the django tree) or locale (for project and 
application) directory."
+    help = ( "Runs over the entire source tree of the current directory and "
+"pulls out all strings marked for translation. It creates (or updates) a 
message "
+"file in the conf/locale (in the django tree) or locale (for projects and "
+"applications) directory.\n\nYou must run this command with one of either the "
+"--locale or --all options.")
 
     requires_model_validation = False
     can_import_settings = False

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to