Skip to content

Commit

Permalink
Adds a reference to the missing configuration file in the 'New Config
Browse files Browse the repository at this point in the history
File' page. As it was before, you knew the file was not found, but you
did not its path.

git-svn-id: svn://cherokee-project.com/cherokee/trunk@6627 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information
alobbs committed May 16, 2011
1 parent ce0bca7 commit 055b72b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions admin/PageNewConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@

HELPS = [('index', N_("Index"))]

NOTE_LOADING = N_("Loading new configuration file..")
WARNING_NOT_FOUND = N_("<b>The configuration is not found</b>.<br />You can create a new configuration file and proceed to customize the web server.")
NOTE_LOADING = N_("Loading new configuration file..")
WARNING_NOT_FOUND_1 = N_("The configuration file %(conf_file)s was not found.")
WARNING_NOT_FOUND_2 = N_("You can create a new configuration file and proceed to customize the web server.")

DEFAULT_PID_LOCATIONS = [
'/var/run/cherokee.pid',
Expand Down Expand Up @@ -180,9 +181,14 @@ def __call__ (self):
label = _('No standard port, No log files, No PID file, etc.')
container += Form (key, name, label)

conf_file = CTK.cfg.file
notice = CTK.Notice ('warning')
notice += CTK.RawHTML ("<b>%s</b><br/>"%(_(WARNING_NOT_FOUND_1)%(locals())))
notice += CTK.RawHTML (WARNING_NOT_FOUND_2)

page = Page.Base(_('New Configuration File'), body_id='new-config', helps=HELPS)
page += CTK.RawHTML("<h1>%s</h1>" %(_('Configuration File Not Found')))
page += CTK.Notice ('warning', CTK.RawHTML(_(WARNING_NOT_FOUND)))
page += notice
page += CTK.Indenter (container)
return page.Render()

Expand Down

0 comments on commit 055b72b

Please sign in to comment.