wui: edit some of the human-readable parts of the wui such as button labels

(The word "parent" suggests that you can go up a directory hierarchy -- perhaps that word is vestigial.)
This commit is contained in:
Zooko O'Whielacronx 2009-04-07 11:54:59 -07:00
parent 8b1cd154da
commit 37c6e77764
5 changed files with 16 additions and 16 deletions

View File

@ -589,7 +589,7 @@ POST /uri?t=mkdir
you'll be able to get back to the directory again in the future. This is the
recommended way to start working with a Tahoe server: create a new unlinked
directory (using redirect_to_result=true), then bookmark the resulting
/uri/$DIRCAP page. There is a "Create Directory" button on the Welcome page
/uri/$DIRCAP page. There is a "create directory" button on the Welcome page
to invoke this action.
If "redirect_to_result=true" is not provided (or is given a value of

View File

@ -41,7 +41,7 @@ class WebResultsRendering(unittest.TestCase, WebRenderingMixin):
def _check_return_to(html):
s = self.remove_tags(html)
self.failUnlessIn("Literal files are always healthy", s)
self.failUnlessIn('<a href="FOOURL">Return to parent directory</a>',
self.failUnlessIn('<a href="FOOURL">Return to file.</a>',
html)
d.addCallback(_check_return_to)
d.addCallback(lambda ignored: self.render_json(lcr))
@ -111,7 +111,7 @@ class WebResultsRendering(unittest.TestCase, WebRenderingMixin):
self.failUnlessIn("Not Recoverable! : rather dead", s)
html = self.render2(w, args={"return_to": ["FOOURL"]})
self.failUnlessIn('<a href="FOOURL">Return to parent directory</a>',
self.failUnlessIn('<a href="FOOURL">Return to file/directory.</a>',
html)
d = self.render_json(w)

View File

@ -1620,7 +1620,7 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, unittest.TestCase):
self.POST(bar_url, t="check", return_to=redir_url))
def _check3(res):
self.failUnless("Healthy :" in res)
self.failUnless("Return to parent directory" in res)
self.failUnless("Return to file" in res)
self.failUnless(redir_url in res)
d.addCallback(_check3)
@ -1654,7 +1654,7 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, unittest.TestCase):
self.POST(bar_url, t="check", return_to=redir_url))
def _check3(res):
self.failUnless("Healthy :" in res)
self.failUnless("Return to parent directory" in res)
self.failUnless("Return to file" in res)
self.failUnless(redir_url in res)
d.addCallback(_check3)
return d
@ -1679,7 +1679,7 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, unittest.TestCase):
self.POST(foo_url, t="check", return_to=redir_url))
def _check3(res):
self.failUnless("Healthy :" in res, res)
self.failUnless("Return to parent directory" in res)
self.failUnless("Return to file/directory" in res)
self.failUnless(redir_url in res)
d.addCallback(_check3)
@ -1713,7 +1713,7 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, unittest.TestCase):
self.POST(foo_url, t="check", return_to=redir_url))
def _check3(res):
self.failUnless("Healthy :" in res)
self.failUnless("Return to parent directory" in res)
self.failUnless("Return to file/directory" in res)
self.failUnless(redir_url in res)
d.addCallback(_check3)
return d
@ -1884,7 +1884,7 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, unittest.TestCase):
# Fetch the welcome page.
d = self.GET("/")
def _after_get_welcome_page(res):
MKDIR_BUTTON_RE=re.compile('<form action="([^"]*)" method="post".*<input type="hidden" name="t" value="([^"]*)" /><input type="hidden" name="([^"]*)" value="([^"]*)" /><input type="submit" value="Create Directory!" />', re.I)
MKDIR_BUTTON_RE=re.compile('<form action="([^"]*)" method="post".*<input type="hidden" name="t" value="([^"]*)" /><input type="hidden" name="([^"]*)" value="([^"]*)" /><input type="submit" value="create directory" />', re.I)
mo = MKDIR_BUTTON_RE.search(res)
formaction = mo.group(1)
formt = mo.group(2)
@ -2567,7 +2567,7 @@ class Grid(GridTestMixin, WebErrorMixin, unittest.TestCase, ShouldFailMixin):
def _got_html_good_return_to(res):
self.failUnless("Healthy" in res, res)
self.failIf("Not Healthy" in res, res)
self.failUnless('<a href="somewhere">Return to parent directory'
self.failUnless('<a href="somewhere">Return to file'
in res, res)
d.addCallback(_got_html_good_return_to)
d.addCallback(self.CHECK, "good", "t=check&output=json")
@ -2588,7 +2588,7 @@ class Grid(GridTestMixin, WebErrorMixin, unittest.TestCase, ShouldFailMixin):
def _got_html_small_return_to(res):
self.failUnless("Literal files are always healthy" in res, res)
self.failIf("Not Healthy" in res, res)
self.failUnless('<a href="somewhere">Return to parent directory'
self.failUnless('<a href="somewhere">Return to file'
in res, res)
d.addCallback(_got_html_small_return_to)
d.addCallback(self.CHECK, "small", "t=check&output=json")

View File

@ -198,7 +198,7 @@ class LiteralCheckResults(rend.Page, ResultsBase):
req = inevow.IRequest(ctx)
return_to = get_arg(req, "return_to", None)
if return_to:
return T.div[T.a(href=return_to)["Return to parent directory"]]
return T.div[T.a(href=return_to)["Return to file."]]
return ""
class CheckerBase:
@ -215,7 +215,7 @@ class CheckerBase:
req = inevow.IRequest(ctx)
return_to = get_arg(req, "return_to", None)
if return_to:
return T.div[T.a(href=return_to)["Return to parent directory"]]
return T.div[T.a(href=return_to)["Return to file/directory."]]
return ""
class CheckResults(CheckerBase, rend.Page, ResultsBase):
@ -435,7 +435,7 @@ class DeepCheckResults(rend.Page, ResultsBase, ReloadMixin):
req = inevow.IRequest(ctx)
return_to = get_arg(req, "return_to", None)
if return_to:
return T.div[T.a(href=return_to)["Return to parent directory"]]
return T.div[T.a(href=return_to)["Return to file/directory."]]
return ""
def data_all_objects(self, ctx, data):
@ -615,7 +615,7 @@ class DeepCheckAndRepairResults(rend.Page, ResultsBase, ReloadMixin):
req = inevow.IRequest(ctx)
return_to = get_arg(req, "return_to", None)
if return_to:
return T.div[T.a(href=return_to)["Return to parent directory"]]
return T.div[T.a(href=return_to)["Return to file/directory."]]
return ""
def data_all_objects(self, ctx, data):

View File

@ -329,10 +329,10 @@ class Root(rend.Page):
form = T.form(action="uri", method="post",
enctype="multipart/form-data")[
T.fieldset[
T.legend(class_="freeform-form-label")["Create a directory"],
T.legend(class_="freeform-form-label")["Create a directory."],
T.input(type="hidden", name="t", value="mkdir"),
T.input(type="hidden", name="redirect_to_result", value="true"),
T.input(type="submit", value="Create Directory!"),
T.input(type="submit", value="create directory"),
]]
return T.div[form]