From: Zooko O'Whielacronx Date: Tue, 7 Apr 2009 18:54:59 +0000 (-0700) Subject: wui: edit some of the human-readable parts of the wui such as button labels X-Git-Tag: allmydata-tahoe-1.4.0~20 X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20/file/URI:LIT:krugkidfnzsc4/%3C?a=commitdiff_plain;h=37c6e77764872b8df6156691386e70f0b1e69c31;p=tahoe-lafs%2Ftahoe-lafs.git 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.) --- diff --git a/docs/frontends/webapi.txt b/docs/frontends/webapi.txt index 55d79e65..658524fb 100644 --- a/docs/frontends/webapi.txt +++ b/docs/frontends/webapi.txt @@ -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 diff --git a/src/allmydata/test/test_checker.py b/src/allmydata/test/test_checker.py index a1827cd1..8dc24489 100644 --- a/src/allmydata/test/test_checker.py +++ b/src/allmydata/test/test_checker.py @@ -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('Return to parent directory', + self.failUnlessIn('Return to file.', 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('Return to parent directory', + self.failUnlessIn('Return to file/directory.', html) d = self.render_json(w) diff --git a/src/allmydata/test/test_web.py b/src/allmydata/test/test_web.py index d4d6cdbe..9bca7521 100644 --- a/src/allmydata/test/test_web.py +++ b/src/allmydata/test/test_web.py @@ -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('
', re.I) + MKDIR_BUTTON_RE=re.compile('', 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('Return to parent directory' + self.failUnless('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('Return to parent directory' + self.failUnless('Return to file' in res, res) d.addCallback(_got_html_small_return_to) d.addCallback(self.CHECK, "small", "t=check&output=json") diff --git a/src/allmydata/web/check_results.py b/src/allmydata/web/check_results.py index 14c4b1a1..cdf5dec5 100644 --- a/src/allmydata/web/check_results.py +++ b/src/allmydata/web/check_results.py @@ -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): diff --git a/src/allmydata/web/root.py b/src/allmydata/web/root.py index 79441c25..196506e4 100644 --- a/src/allmydata/web/root.py +++ b/src/allmydata/web/root.py @@ -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]