# HG changeset patch # User Nicolas Chauvat # Date 1301584347 -7200 # Node ID 4bab50b029272ffc05af0d3600bc33c16d37c9dc # Parent 04d0624a1832c7d2839befcde4a470fb8cda8759 [cwctl] refactor ui messages aiming for consistency and simplicity diff -r 04d0624a1832 -r 4bab50b02927 cwctl.py --- a/cwctl.py Thu Mar 31 15:18:21 2011 +0200 +++ b/cwctl.py Thu Mar 31 17:12:27 2011 +0200 @@ -389,10 +389,9 @@ # write down configuration config.save() self._handle_win32(config, appid) - print '-> generated %s' % config.main_config_file() + print '-> generated config %s' % config.main_config_file() # handle i18n files structure # in the first cube given - print '-> preparing i18n catalogs' from cubicweb import i18n langs = [lang for lang, _ in i18n.available_catalogs(join(templdirs[0], 'i18n'))] errors = config.i18ncompile(langs) @@ -412,7 +411,7 @@ # this directory should be owned by the uid of the server process print 'set %s as owner of the data directory' % config['uid'] chown(config.appdatahome, config['uid']) - print '\n-> creation done for %r.\n' % config.apphome + print '\n-> creation done for %s\n' % repr(config.apphome)[1:-1] helper.postcreate(self.config.automatic) def _handle_win32(self, config, appid): diff -r 04d0624a1832 -r 4bab50b02927 i18n.py --- a/i18n.py Thu Mar 31 15:18:21 2011 +0200 +++ b/i18n.py Thu Mar 31 17:12:27 2011 +0200 @@ -80,7 +80,7 @@ """generate .mo files for a set of languages into the `destdir` i18n directory """ from logilab.common.fileutils import ensure_fs_mode - print '-> compiling %s catalogs...' % destdir + print '-> compiling message catalogs to %s' % destdir errors = [] for lang in langs: langdir = join(destdir, lang, 'LC_MESSAGES') diff -r 04d0624a1832 -r 4bab50b02927 server/serverctl.py --- a/server/serverctl.py Thu Mar 31 15:18:21 2011 +0200 +++ b/server/serverctl.py Thu Mar 31 17:12:27 2011 +0200 @@ -180,7 +180,7 @@ if automatic: # XXX modify a copy password = generate_password() - print 'Administration account is admin / %s' % password + print '-> set administrator account to admin / %s' % password USER_OPTIONS[1][1]['default'] = password sconfig = Configuration(options=USER_OPTIONS) else: diff -r 04d0624a1832 -r 4bab50b02927 toolsutils.py --- a/toolsutils.py Thu Mar 31 15:18:21 2011 +0200 +++ b/toolsutils.py Thu Mar 31 17:12:27 2011 +0200 @@ -58,12 +58,12 @@ """create a directory if it doesn't exist yet""" try: makedirs(directory) - print '-> created directory %s.' % directory + print '-> created directory %s' % directory except OSError, ex: import errno if ex.errno != errno.EEXIST: raise - print '-> directory %s already exists, no need to create it.' % directory + print '-> no need to create existing directory %s' % directory def create_symlink(source, target): """create a symbolic link""" @@ -154,9 +154,9 @@ def restrict_perms_to_user(filepath, log=None): """set -rw------- permission on the given file""" if log: - log('set %s permissions to 0600', filepath) + log('set permissions to 0600 for %s', filepath) else: - print '-> set %s permissions to 0600' % filepath + print '-> set permissions to 0600 for %s' % filepath chmod(filepath, 0600) def read_config(config_file):