Skip to content

Commit

Permalink
Mind capitalization.
Browse files Browse the repository at this point in the history
  • Loading branch information
julen committed Nov 28, 2012
1 parent 6473f59 commit a34c9d4
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 21 deletions.
16 changes: 8 additions & 8 deletions pootle/apps/pootle_app/management/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ class PootleCommand(NoArgsCommand):
"""Base class for handling recursive pootle store management commands."""
shared_option_list = (
make_option('--directory', dest='directory',
help='directory to refresh relative to po directory'),
help='Directory to refresh relative to po directory'),
make_option('--project', action='append', dest='projects',
help='project to refresh'),
help='Project to refresh'),
make_option('--language', action='append', dest='languages',
help='language to refresh'),
help='Language to refresh'),
make_option('--path-prefix', action='store', dest='path',
help='path prefix relative to translation project of '
help='Path prefix relative to translation project of '
'files to refresh'),
)
option_list = NoArgsCommand.option_list + shared_option_list
Expand All @@ -56,7 +56,7 @@ def do_translation_project(self, tp, pootle_path, **options):
return

if not pootle_path and hasattr(self, "handle_all_stores"):
logging.info(u"running %s over %s's files", self.name, tp)
logging.info(u"Running %s over %s's files", self.name, tp)
try:
self.handle_all_stores(tp, **options)
except Exception, e:
Expand Down Expand Up @@ -119,7 +119,7 @@ def handle_noargs(self, **options):
if languages:
lang_query = lang_query.filter(code__in=languages)
for lang in lang_query.iterator():
logging.info(u"running %s over %s", self.name, lang)
logging.info(u"Running %s over %s", self.name, lang)
try:
self.handle_language(lang, **options)
except Exception, e:
Expand All @@ -132,7 +132,7 @@ def handle_noargs(self, **options):

for project in project_query.iterator():
if hasattr(self, "handle_project"):
logging.info(u"running %s over %s", self.name, project)
logging.info(u"Running %s over %s", self.name, project)
try:
self.handle_project(project, **options)
except Exception, e:
Expand Down Expand Up @@ -173,7 +173,7 @@ class ModifiedSinceMixin(object):
option_modified_since = (
make_option('--modified-since', action='store', dest='modified_since',
default=0, type=int,
help="only process translations newer than CHANGE_ID "
help="Only process translations newer than CHANGE_ID "
"(as given by latest_change_id)"),
)

Expand Down
6 changes: 3 additions & 3 deletions pootle/apps/pootle_app/management/commands/commit_to_vcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Command(PootleCommand):
help = "Allow VCS-managed data to be committed manually."
option_list = PootleCommand.option_list + (
make_option('--user', default='admin',
help="username to list in the commit message"),
help="Username to list in the commit message"),
)

def handle_noargs(self, **options):
Expand All @@ -50,9 +50,9 @@ def handle_translation_project(self, tp, **options):
"""
store_query = tp.stores.all()
for store in store_query.iterator():
logging.info(u"running %s over %s", self.name, store.pootle_path)
logging.info(u"Running %s over %s", self.name, store.pootle_path)
try:
tp.commit_file(self.user, store)
except Exception, e:
logging.error(u"failed to run %s over %s:\n%s", self.name,
logging.error(u"Failed to run %s over %s:\n%s", self.name,
store.pootle_path, e)
7 changes: 4 additions & 3 deletions pootle/apps/pootle_app/management/commands/sync_stores.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@
class Command(PootleCommand, ModifiedSinceMixin):
option_list = PootleCommand.option_list + \
ModifiedSinceMixin.option_modified_since + (
make_option('--overwrite', action='store_true', dest='overwrite', default=False,
help="don't just save translations, but overwrite files to reflect state in database"),
make_option('--overwrite', action='store_true', dest='overwrite',
default=False, help="Don't just save translations, but "
"overwrite files to reflect state in database"),
make_option('--skip-missing', action='store_true', dest='skip_missing', default=False,
help="ignore missing files on disk"),
help="Ignore missing files on disk"),
)
help = "Save new translations to disk manually."

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from pootle_app.management.commands import PootleCommand

class Command(PootleCommand):
help = "mass update from templates."
help = "Mass update from templates."

def handle_translation_project(self, translation_project, **options):
translation_project.update_from_templates()
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def handle_translation_project(self, tp, **options):
"""
store_query = tp.stores.all()
for store in store_query.iterator():
logging.info(u"running %s over %s", self.name, store.pootle_path)
logging.info(u"Running %s over %s", self.name, store.pootle_path)
try:
tp.update_file_from_version_control(store)
except Exception, e:
Expand Down
6 changes: 4 additions & 2 deletions pootle/apps/pootle_app/management/commands/update_stores.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@
class Command(PootleCommand):
option_list = PootleCommand.option_list + (
make_option('--keep', action='store_true', dest='keep', default=False,
help="keep existing translations, just update untranslated units and add new units."),
help="Keep existing translations, just update "
"untranslated units and add new units."),
make_option('--force', action='store_true', dest='force', default=False,
help="unconditionally process all files (even if they appear unchanged)."),
help="Unconditionally process all files (even if they "
"appear unchanged)."),
)
help = "Update database stores from files."

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ def does_not_exists(path):

class Command(PootleCommand):
option_list = PootleCommand.option_list + (
make_option('--cleanup', action='store_true', dest='clean', default=False,
help="delete projects and translation projects that ceased to exist (handle with care)."),
make_option('--cleanup', action='store_true', dest='clean',
default=False, help="Delete projects and translation "
"projects that ceased to exist (handle with care)."),
)
help = "Detects new translation projects in the file system and adds them to database."
help = "Detects new translation projects in the file system and "
"adds them to database."

def handle_project(self, project, **options):
clean = options.get('clean', False)
Expand Down

0 comments on commit a34c9d4

Please sign in to comment.