launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #05698
[Merge] lp:~wgrant/launchpad/globalise-help-folder into lp:launchpad
William Grant has proposed merging lp:~wgrant/launchpad/globalise-help-folder into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~wgrant/launchpad/globalise-help-folder/+merge/83543
This branch makes all inline help content available on all webapp domains. Previous Bugs help was only available at bugs.launchpad.net/+help, Registry at launchpad.net/+help, etc. I've moved them to /+help, /+help-bugs, etc.
Nicer paths like /+help/bugs would have involved symlink madness or introducing new structural objects, and given that these URLs aren't really visible I decided that I didn't care. lib/lp/registry/help/soyuz, an old symlink hack to work around the domain restriction, has been removed.
This paves the way to moving all content onto one domain.
--
https://code.launchpad.net/~wgrant/launchpad/globalise-help-folder/+merge/83543
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/globalise-help-folder into lp:launchpad.
=== modified file 'lib/canonical/launchpad/templates/logintoken-validatesignonlygpg.pt'
--- lib/canonical/launchpad/templates/logintoken-validatesignonlygpg.pt 2010-03-12 19:56:06 +0000
+++ lib/canonical/launchpad/templates/logintoken-validatesignonlygpg.pt 2011-11-28 03:04:27 +0000
@@ -22,7 +22,9 @@
<div metal:fill-slot="extra_top">
<p>
- Please paste a clear-signed copy of the following paragraph into the box beneath it. (<a href="/+help/pgp-key-clearsign.html" target="help">How do I do that?</a>)
+ Please paste a clear-signed copy of the following paragraph
+ into the box beneath it.
+ (<a href="/+help-registry/pgp-key-clearsign.html" target="help">How do I do that?</a>)
</p>
<pre tal:content="context/validation_phrase">
=== modified file 'lib/lp/answers/configure.zcml'
--- lib/lp/answers/configure.zcml 2011-09-23 14:51:58 +0000
+++ lib/lp/answers/configure.zcml 2011-11-28 03:04:27 +0000
@@ -255,8 +255,7 @@
</class>
- <lp:help-folder
- folder="help" type="lp.answers.publisher.AnswersLayer" />
+ <lp:help-folder folder="help" name="+help-answers"/>
<adapter
name="answers"
provides="canonical.launchpad.webapp.interfaces.IBreadcrumb"
=== modified file 'lib/lp/app/tests/test_help.py'
--- lib/lp/app/tests/test_help.py 2010-08-20 20:31:18 +0000
+++ lib/lp/app/tests/test_help.py 2011-11-28 03:04:27 +0000
@@ -8,16 +8,10 @@
from zope.component import getUtility
-from canonical.launchpad.layers import LaunchpadLayer
from canonical.launchpad.testing.systemdocs import create_view
from canonical.launchpad.webapp.interfaces import ILaunchpadApplication
from canonical.lazr.folder import ExportedFolder
from canonical.testing.layers import FunctionalLayer
-from lp.answers.publisher import AnswersLayer
-from lp.blueprints.publisher import BlueprintsLayer
-from lp.bugs.publisher import BugsLayer
-from lp.code.publisher import CodeLayer
-from lp.translations.publisher import TranslationsLayer
# The root of the tree
ROOT = os.path.realpath(
@@ -27,18 +21,15 @@
class TestHelpSystemSetup(unittest.TestCase):
- """Test that all help folders are registered on +help."""
+ """Test that all help folders are registered."""
layer = FunctionalLayer
- def assertHasHelpFolderView(self, layer, expected_folder_path):
- """Assert that layer has +help help folder registered.
- It will make sure that the path is the expected one.
- """
- root = getUtility(ILaunchpadApplication)
- view = create_view(root, '+help', layer=layer)
+ def assertHasHelpFolderView(self, name, expected_folder_path):
+ """Assert that the named help folder has the right path."""
+ view = create_view(getUtility(ILaunchpadApplication), name)
self.failUnless(
isinstance(view, ExportedFolder),
- '+help view should be an instance of ExportedFolder: %s' % view)
+ 'View should be an instance of ExportedFolder: %s' % view)
self.failUnless(
os.path.samefile(view.folder, expected_folder_path),
"Expected help folder %s, got %s" % (
@@ -46,28 +37,29 @@
def test_answers_help_folder(self):
self.assertHasHelpFolderView(
- AnswersLayer, os.path.join(ROOT, 'lib/lp/answers/help'))
+ '+help-answers', os.path.join(ROOT, 'lib/lp/answers/help'))
def test_blueprints_help_folder(self):
self.assertHasHelpFolderView(
- BlueprintsLayer,
- os.path.join(ROOT, 'lib/lp/blueprints/help'))
+ '+help-blueprints', os.path.join(ROOT, 'lib/lp/blueprints/help'))
def test_bugs_help_folder(self):
self.assertHasHelpFolderView(
- BugsLayer,
- os.path.join(ROOT, 'lib/lp/bugs/help'))
+ '+help-bugs', os.path.join(ROOT, 'lib/lp/bugs/help'))
def test_code_help_folder(self):
self.assertHasHelpFolderView(
- CodeLayer, os.path.join(ROOT, 'lib/lp/code/help'))
+ '+help-code', os.path.join(ROOT, 'lib/lp/code/help'))
def test_registry_help_folder(self):
self.assertHasHelpFolderView(
- LaunchpadLayer,
- os.path.join(ROOT, 'lib/lp/registry/help'))
+ '+help-registry', os.path.join(ROOT, 'lib/lp/registry/help'))
+
+ def test_soyuz_help_folder(self):
+ self.assertHasHelpFolderView(
+ '+help-soyuz', os.path.join(ROOT, 'lib/lp/soyuz/help'))
def test_translations_help_folder(self):
self.assertHasHelpFolderView(
- TranslationsLayer,
+ '+help-translations',
os.path.join(ROOT, 'lib/lp/translations/help'))
=== modified file 'lib/lp/blueprints/configure.zcml'
--- lib/lp/blueprints/configure.zcml 2011-09-27 20:07:25 +0000
+++ lib/lp/blueprints/configure.zcml 2011-11-28 03:04:27 +0000
@@ -23,8 +23,7 @@
name="blueprints" />
- <lp:help-folder
- folder="help" type="lp.blueprints.publisher.BlueprintsLayer" />
+ <lp:help-folder folder="help" name="+help-blueprints" />
<!-- Sprint -->
=== modified file 'lib/lp/bugs/browser/bugtask.py'
--- lib/lp/bugs/browser/bugtask.py 2011-11-27 18:51:01 +0000
+++ lib/lp/bugs/browser/bugtask.py 2011-11-28 03:04:27 +0000
@@ -1116,8 +1116,8 @@
max_bug_heat = 5000
heat_ratio = calculate_heat_display(bugtask.bug.heat, max_bug_heat)
html = (
- '<span><a href="/+help/bug-heat.html" target="help" class="icon"><img'
- ' src="/@@/bug-heat-%(ratio)i.png" '
+ '<span><a href="/+help-bugs/bug-heat.html" target="help" '
+ 'class="icon"><img src="/@@/bug-heat-%(ratio)i.png" '
'alt="%(ratio)i out of 4 heat flames" title="Heat: %(heat)i" /></a>'
'</span>'
% {'ratio': heat_ratio, 'heat': bugtask.bug.heat})
=== modified file 'lib/lp/bugs/configure.zcml'
--- lib/lp/bugs/configure.zcml 2011-11-27 01:37:05 +0000
+++ lib/lp/bugs/configure.zcml 2011-11-28 03:04:27 +0000
@@ -23,8 +23,7 @@
provides="zope.publisher.interfaces.browser.IDefaultBrowserLayer"
name="bugs" />
- <lp:help-folder
- folder="help" type="lp.bugs.publisher.BugsLayer" />
+ <lp:help-folder folder="help" name="+help-bugs" />
<class
class="lp.bugs.model.bugactivity.BugActivity">
=== modified file 'lib/lp/bugs/templates/bug-portlet-subscription.pt'
--- lib/lp/bugs/templates/bug-portlet-subscription.pt 2011-08-31 11:12:15 +0000
+++ lib/lp/bugs/templates/bug-portlet-subscription.pt 2011-11-28 03:04:27 +0000
@@ -43,7 +43,7 @@
id="mute-link-container">
<span tal:replace="structure context_menu/mute_subscription/render"
/> <a target="help" class="sprite maybe mute-help"
- href="/+help/subscription-mute.html"
+ href="/+help-bugs/subscription-mute.html"
> <span class="invisible-link">Mute help</span></a>
</div>
</li>
=== modified file 'lib/lp/bugs/templates/bugtask-choose-affected-product.pt'
--- lib/lp/bugs/templates/bugtask-choose-affected-product.pt 2010-11-01 15:09:57 +0000
+++ lib/lp/bugs/templates/bugtask-choose-affected-product.pt 2011-11-28 03:04:27 +0000
@@ -19,7 +19,7 @@
<p>
A bug may need fixing in more than one project. You may add another
project for this bug here.
- <a href="/+help/also-affects-project-help.html" target="help"
+ <a href="/+help-bugs/also-affects-project-help.html" target="help"
class="sprite maybe"> <span class="invisible-link">(?)</span>
</a>
</p>
=== modified file 'lib/lp/bugs/templates/bugtask-index.pt'
--- lib/lp/bugs/templates/bugtask-index.pt 2011-11-24 05:14:44 +0000
+++ lib/lp/bugs/templates/bugtask-index.pt 2011-11-28 03:04:27 +0000
@@ -188,7 +188,7 @@
id="edit-tags-cancel"
type="button">Cancel</button>
</form>
- <a href="/+help/tag-help.html" target="help" class="sprite maybe">
+ <a href="/+help-bugs/tag-help.html" target="help" class="sprite maybe">
<span class="invisible-link">Tag help</span></a>
</div>
<div id="add-bug-tags"
@@ -197,7 +197,7 @@
<a href="+edit" title="Add tags" id="add-tags-trigger" class="sprite add">
Add tags
</a>
- <a href="/+help/tag-help.html" target="help" class="sprite maybe">
+ <a href="/+help-bugs/tag-help.html" target="help" class="sprite maybe">
<span class="invisible-link">Tag help</span></a>
</div>
=== modified file 'lib/lp/bugs/templates/bugtask-macros-tableview.pt'
--- lib/lp/bugs/templates/bugtask-macros-tableview.pt 2011-11-25 17:05:49 +0000
+++ lib/lp/bugs/templates/bugtask-macros-tableview.pt 2011-11-28 03:04:27 +0000
@@ -234,8 +234,7 @@
</metal:header>
-<metal:advanced_search_form define-macro="advanced_search_form"
- tal:define="bugs_rooturl modules/canonical.launchpad.webapp.vhosts/allvhosts/configs/bugs/rooturl">
+<metal:advanced_search_form define-macro="advanced_search_form">
<form class="long" name="search" method="get" action="">
<span tal:condition="view/current_package|nothing">
@@ -528,8 +527,8 @@
tal:content="structure view/widgets/tag/label">
Tag
</label>: <input tal:replace="structure view/widgets/tag" />
- <a tal:attributes="href string:${bugs_rooturl}/+help/tag-search.html"
- target="help">Tag search help</a>
+ <a href="/+help-bugs/tag-search.html"
+ target="help">Tag search help</a>
<div
tal:condition="error"
class="message"
=== modified file 'lib/lp/bugs/templates/bugtasks-and-nominations-portal.pt'
--- lib/lp/bugs/templates/bugtasks-and-nominations-portal.pt 2011-10-31 08:09:56 +0000
+++ lib/lp/bugs/templates/bugtasks-and-nominations-portal.pt 2011-11-28 03:04:27 +0000
@@ -73,7 +73,7 @@
define="link context_menu/addupstream"
condition="link/enabled"
replace="structure link/render" />
- <a href="/+help/also-affects-project-help.html"
+ <a href="/+help-bugs/also-affects-project-help.html"
target="help"
class="sprite maybe">
<span class="invisible-link">(?)</span>
=== modified file 'lib/lp/bugs/tests/bug.py'
--- lib/lp/bugs/tests/bug.py 2011-08-15 21:17:25 +0000
+++ lib/lp/bugs/tests/bug.py 2011-11-28 03:04:27 +0000
@@ -334,5 +334,5 @@
"""The the bug tags in the iterable of anchors."""
for anchor in anchors:
href = anchor['href']
- if href != '+edit' and '/+help/tag-help.html' not in href:
+ if href != '+edit' and '/+help-bugs/tag-help.html' not in href:
print anchor['class'], anchor.contents[0]
=== modified file 'lib/lp/code/browser/sourcepackagerecipe.py'
--- lib/lp/code/browser/sourcepackagerecipe.py 2011-11-21 22:05:50 +0000
+++ lib/lp/code/browser/sourcepackagerecipe.py 2011-11-28 03:04:27 +0000
@@ -573,7 +573,7 @@
Text(
title=u'Recipe text', required=True,
description=u"""The text of the recipe.
- <a href="/+help/recipe-syntax.html" target="help"
+ <a href="/+help-code/recipe-syntax.html" target="help"
>Syntax help
<span class="sprite maybe">
<span class="invisible-link">Help</span>
=== modified file 'lib/lp/code/configure.zcml'
--- lib/lp/code/configure.zcml 2011-11-27 01:37:05 +0000
+++ lib/lp/code/configure.zcml 2011-11-28 03:04:27 +0000
@@ -866,8 +866,7 @@
<adapter factory="lp.code.model.linkedbranch.PackageLinkedBranch" />
<adapter factory="lp.code.model.linkedbranch.DistributionPackageLinkedBranch" />
- <lp:help-folder
- folder="help" type="lp.code.publisher.CodeLayer" />
+ <lp:help-folder folder="help" name="+help-code" />
<!-- Diffs -->
<class class="lp.code.model.diff.Diff">
=== modified file 'lib/lp/code/templates/branch-form-macros.pt'
--- lib/lp/code/templates/branch-form-macros.pt 2011-11-14 04:07:15 +0000
+++ lib/lp/code/templates/branch-form-macros.pt 2011-11-28 03:04:27 +0000
@@ -7,7 +7,7 @@
<div id="branch-unique-name-div" class="hidden">
The resulting location of the branch will be:
- <strong><span id="branch-unique-name"></span></strong> (<a href="/+help/register-branch.html" target="help">Do you need to register?</a>)
+ <strong><span id="branch-unique-name"></span></strong> (<a href="/+help-code/register-branch.html" target="help">Do you need to register?</a>)
</div>
<div metal:use-macro="context/@@launchpad_form/form">
=== modified file 'lib/lp/code/templates/branch-recipes.pt'
--- lib/lp/code/templates/branch-recipes.pt 2011-06-29 16:49:05 +0000
+++ lib/lp/code/templates/branch-recipes.pt 2011-11-28 03:04:27 +0000
@@ -20,7 +20,7 @@
</tal:recipes>
using this branch.
- <a href="/+help/related-recipes.html" target="help" class="sprite maybe">
+ <a href="/+help-code/related-recipes.html" target="help" class="sprite maybe">
<span class="invisible-link">Tag help</span>
</a>
</div>
=== modified file 'lib/lp/code/templates/sourcepackagerecipe-index.pt'
--- lib/lp/code/templates/sourcepackagerecipe-index.pt 2011-11-21 22:05:50 +0000
+++ lib/lp/code/templates/sourcepackagerecipe-index.pt 2011-11-28 03:04:27 +0000
@@ -83,7 +83,7 @@
<div class="two-column-list">
<dl id="build_daily">
<dt>Build schedule:
- <a href="/+help/recipe-build-frequency.html" target="help" class="sprite maybe">
+ <a href="/+help-code/recipe-build-frequency.html" target="help" class="sprite maybe">
<span class="invisible-link">Tag help</span>
</a>
</dt>
=== modified file 'lib/lp/code/templates/sourcepackagerecipe-new.pt'
--- lib/lp/code/templates/sourcepackagerecipe-new.pt 2011-03-18 07:36:56 +0000
+++ lib/lp/code/templates/sourcepackagerecipe-new.pt 2011-11-28 03:04:27 +0000
@@ -54,7 +54,7 @@
<metal:block use-macro="context/@@launchpad_form/widget_row" />
</tal:widget>
<tal:widget define="widget nocall:view/widgets/build_daily;
- widget_help_link string:/+help/recipe-build-frequency.html">
+ widget_help_link string:/+help-code/recipe-build-frequency.html">
<metal:block use-macro="context/@@launchpad_form/widget_row" />
</tal:widget>
=== modified file 'lib/lp/registry/browser/distroseries.py'
--- lib/lp/registry/browser/distroseries.py 2011-11-10 22:35:56 +0000
+++ lib/lp/registry/browser/distroseries.py 2011-11-28 03:04:27 +0000
@@ -687,7 +687,7 @@
]
help_links = {
- "name": u"/+help/distribution-add-series.html#codename",
+ "name": u"/+help-registry/distribution-add-series.html#codename",
}
label = 'Add a series'
@@ -1239,7 +1239,7 @@
"and %s, but are different somehow. "
"Changes could be in either or both series so check the "
"versions (and the diff if necessary) before syncing the parent "
- 'version (<a href="/+help/soyuz/derived-series-syncing.html" '
+ 'version (<a href="/+help-soyuz/derived-series-syncing.html" '
'target="help">Read more about syncing from a parent series'
'</a>).',
self.context.displayname,
=== modified file 'lib/lp/registry/browser/tests/milestone-views.txt'
--- lib/lp/registry/browser/tests/milestone-views.txt 2011-08-03 11:00:11 +0000
+++ lib/lp/registry/browser/tests/milestone-views.txt 2011-11-28 03:04:27 +0000
@@ -252,7 +252,7 @@
... milestone, '+productrelease-data', principal=person)
>>> content = find_tag_by_id(view.render(), 'release-data')
>>> print find_tag_by_id(content, 'how-to-verify').a['href']
- /+help/verify-downloads.html
+ /+help-registry/verify-downloads.html
>>> print extract_text(find_tag_by_id(content, 'downloads'))
File Description Downloads Delete
=== modified file 'lib/lp/registry/browser/tests/test_distroseries.py'
--- lib/lp/registry/browser/tests/test_distroseries.py 2011-11-22 22:15:11 +0000
+++ lib/lp/registry/browser/tests/test_distroseries.py 2011-11-28 03:04:27 +0000
@@ -1319,7 +1319,7 @@
soup = BeautifulSoup(view())
help_links = soup.findAll(
- 'a', href='/+help/soyuz/derived-series-syncing.html')
+ 'a', href='/+help-soyuz/derived-series-syncing.html')
self.assertEqual(1, len(help_links))
def test_diff_row_includes_last_comment_only(self):
=== modified file 'lib/lp/registry/configure.zcml'
--- lib/lp/registry/configure.zcml 2011-11-27 01:37:05 +0000
+++ lib/lp/registry/configure.zcml 2011-11-28 03:04:27 +0000
@@ -1744,8 +1744,7 @@
interface="lp.registry.interfaces.suitesourcepackage.ISuiteSourcePackage"/>
</class>
- <lp:help-folder
- folder="help" type="canonical.launchpad.layers.LaunchpadLayer" />
+ <lp:help-folder folder="help" name="+help-registry" />
<!-- DistributionMirror -->
<class class="lp.registry.model.distributionmirror.DistributionMirror">
=== modified file 'lib/lp/registry/help/import-pgp-key.html'
--- lib/lp/registry/help/import-pgp-key.html 2010-10-28 13:45:04 +0000
+++ lib/lp/registry/help/import-pgp-key.html 2011-11-28 03:04:27 +0000
@@ -13,7 +13,7 @@
<p>To import your OpenPGP key into Launchpad, you first need the key's fingerprint.</p>
- <p><strong>Note:</strong> You must ensure your <a href="/+help/openpgp-keys.html#publish">key is in the Ubuntu keyserver</a> before you try to add it to Launchpad.</p>
+ <p><strong>Note:</strong> You must ensure your <a href="/+help-registry/openpgp-keys.html#publish">key is in the Ubuntu keyserver</a> before you try to add it to Launchpad.</p>
<h2>Retrieving the key in Ubuntu</h2>
=== modified file 'lib/lp/registry/help/openpgp-keys.html'
--- lib/lp/registry/help/openpgp-keys.html 2011-02-04 17:59:58 +0000
+++ lib/lp/registry/help/openpgp-keys.html 2011-11-28 03:04:27 +0000
@@ -76,7 +76,7 @@
<p>
It can take up to thirty minutes before your key is available to
Launchpad. After that time, you're ready to
- <a href="/+help/import-pgp-key.html">import your new key into
+ <a href="/+help-registry/import-pgp-key.html">import your new key into
Launchpad</a>!
</p>
=== removed symlink 'lib/lp/registry/help/soyuz'
=== target was u'../../soyuz/help/'
=== modified file 'lib/lp/registry/javascript/distroseries/initseries.js'
--- lib/lp/registry/javascript/distroseries/initseries.js 2011-10-17 16:18:31 +0000
+++ lib/lp/registry/javascript/distroseries/initseries.js 2011-11-28 03:04:27 +0000
@@ -273,7 +273,7 @@
new widgets.PackagesetPickerWidget()
.set("name", "field.packagesets")
.set("size", 5)
- .set("help", {link: '/+help/init-series-packageset-help.html',
+ .set("help", {link: '/+help-registry/init-series-packageset-help.html',
text: 'Packagesets help'})
.set("multiple", true)
.set("label", "Package sets to copy from parent:")
=== modified file 'lib/lp/registry/javascript/structural-subscription.js'
--- lib/lp/registry/javascript/structural-subscription.js 2011-08-09 14:18:02 +0000
+++ lib/lp/registry/javascript/structural-subscription.js 2011-11-28 03:04:27 +0000
@@ -575,7 +575,7 @@
.set('size', '50'))
.append(Y.Node.create('<a/>')
.set('target', 'help')
- .set('href', '/+help/structural-subscription-tags.html')
+ .set('href', '/+help-registry/structural-subscription-tags.html')
.addClass('sprite')
.addClass('maybe')
.append(Y.Node.create('<span/>')
@@ -779,7 +779,7 @@
' <dd>' +
' <input type="text" name="name">' +
' <a target="help" class="sprite maybe"' +
- ' href="/+help/structural-subscription-name.html"> ' +
+ ' href="/+help-registry/structural-subscription-name.html"> ' +
' <span class="invisible-link">Structural subscription' +
' description help</span></a> ' +
' </dd>' +
@@ -1352,7 +1352,7 @@
.addClass('js-action')
.addClass('mute-subscription'));
var help = control.appendChild(Y.Node.create('<a/>')
- .set('href', '/+help/structural-subscription-mute.html')
+ .set('href', '/+help-registry/structural-subscription-mute.html')
.set('target', 'help')
.addClass('sprite')
.addClass('maybe')
=== modified file 'lib/lp/registry/stories/person/xx-person-home.txt'
--- lib/lp/registry/stories/person/xx-person-home.txt 2011-05-25 15:16:22 +0000
+++ lib/lp/registry/stories/person/xx-person-home.txt 2011-11-28 03:04:27 +0000
@@ -68,7 +68,7 @@
The URL is followed by a helpful link.
>>> print user_browser.getLink('OpenID help').url
- http://launchpad.dev/+help/openid.html
+ http://launchpad.dev/+help-registry/openid.html
However, when the user visits someone else's page, they see no such URL.
=== modified file 'lib/lp/registry/stories/productrelease/xx-productrelease-view.txt'
--- lib/lp/registry/stories/productrelease/xx-productrelease-view.txt 2010-09-28 00:07:37 +0000
+++ lib/lp/registry/stories/productrelease/xx-productrelease-view.txt 2011-11-28 03:04:27 +0000
@@ -32,7 +32,7 @@
There is an link about how to verify downloaded files.
>>> anon_browser.getLink('How do I verify a download?')
- <Link ... url='http://launchpad.dev/+help/verify-downloads.html'>
+ <Link ... url='http://launchpad.dev/+help-registry/verify-downloads.html'>
If the file had been downloaded, we'd see the number of times it was
downloaded and the date of the last download on that table as well.
=== modified file 'lib/lp/registry/templates/distroseries-add.pt'
--- lib/lp/registry/templates/distroseries-add.pt 2011-04-04 12:57:14 +0000
+++ lib/lp/registry/templates/distroseries-add.pt 2011-11-28 03:04:27 +0000
@@ -10,7 +10,7 @@
<div metal:use-macro="context/@@launchpad_form/form">
<p metal:fill-slot="extra_info">
This page allows you to add a new distribution series.
- <a href="/+help/distribution-add-series.html"
+ <a href="/+help-registry/distribution-add-series.html"
target="help" class="sprite maybe">
<span class="invisible-link">(?)</span>
</a>
=== modified file 'lib/lp/registry/templates/distroseries-initialize.pt'
--- lib/lp/registry/templates/distroseries-initialize.pt 2011-10-03 09:26:21 +0000
+++ lib/lp/registry/templates/distroseries-initialize.pt 2011-11-28 03:04:27 +0000
@@ -16,7 +16,7 @@
<tal:enabled condition="view/show_derivation_form">
<div class="top-portlet">
This page allows you to initialize a distribution series.
- <a href="/+help/init-series-title-help.html"
+ <a href="/+help-registry/init-series-title-help.html"
target="help" class="sprite maybe">
<span class="invisible-link">Initialization help</span></a>
</div>
=== modified file 'lib/lp/registry/templates/person-editpgpkeys.pt'
--- lib/lp/registry/templates/person-editpgpkeys.pt 2011-09-13 04:41:45 +0000
+++ lib/lp/registry/templates/person-editpgpkeys.pt 2011-11-28 03:04:27 +0000
@@ -39,13 +39,13 @@
<strong>Launchpad could not import your OpenPGP key</strong>
<ul>
<li>Did you enter your complete fingerprint correctly?
- (<a href="/+help/import-pgp-key.html"
+ (<a href="/+help-registry/import-pgp-key.html"
target="help">Help with fingerprints</a>)</li>
<li>Is your key in the Ubuntu keyserver yet?
You may have to wait between ten minutes (if you pushed
directly to the Ubuntu key server) and one hour (if you pushed
- your key to another server). (<a href="/+help/openpgp-keys.html" target="help">Help with publishing keys</a>)</li>
+ your key to another server). (<a href="/+help-registry/openpgp-keys.html" target="help">Help with publishing keys</a>)</li>
</ul>
</div>
@@ -89,7 +89,7 @@
<a href="/codeofconduct">code of conduct</a>.</p>
<p>In both cases, you need to use your OpenPGP key. Here you can tell Launchpad which keys you want to use.
- (<a href="/+help/openpgp-keys.html" target="help">Learn more about OpenPGP keys</a>)</p>
+ (<a href="/+help-registry/openpgp-keys.html" target="help">Learn more about OpenPGP keys</a>)</p>
<form tal:condition="context/gpg_keys/count"
name="gpg_actions" action="" method="POST">
@@ -159,7 +159,7 @@
<p>To start using an OpenPGP key with your Launchpad account, simply
paste its fingerprint below. The key must be registered with the
Ubuntu key server.
- (<a href="/+help/import-pgp-key.html" target="help">How to get the
+ (<a href="/+help-registry/import-pgp-key.html" target="help">How to get the
fingerprint</a>)
</p>
=== modified file 'lib/lp/registry/templates/person-karma.pt'
--- lib/lp/registry/templates/person-karma.pt 2011-05-19 13:17:54 +0000
+++ lib/lp/registry/templates/person-karma.pt 2011-11-28 03:04:27 +0000
@@ -13,7 +13,7 @@
<p class="application-summary">
This is a summary of the Launchpad karma earned by
<span tal:replace="context/displayname" />, organized by activity
- type. (<a href="/+help/karma.html" target="help">What is karma?</a>)
+ type. (<a href="/+help-registry/karma.html" target="help">What is karma?</a>)
</p>
<p id="no-karma" tal:condition="not: view/has_karma">
=== modified file 'lib/lp/registry/templates/person-macros.pt'
--- lib/lp/registry/templates/person-macros.pt 2011-09-23 07:49:54 +0000
+++ lib/lp/registry/templates/person-macros.pt 2011-11-28 03:04:27 +0000
@@ -64,7 +64,7 @@
<dd
tal:attributes="title context/subscriptionpolicy/description">
<span tal:replace="context/subscriptionpolicy/title" />
- <a class="sprite maybe" href="/+help/team-subscription-policy.html"
+ <a class="sprite maybe" href="/+help-registry/team-subscription-policy.html"
target="help"> </a>
</dd>
</dl>
=== modified file 'lib/lp/registry/templates/person-portlet-contact-details.pt'
--- lib/lp/registry/templates/person-portlet-contact-details.pt 2011-08-29 07:44:17 +0000
+++ lib/lp/registry/templates/person-portlet-contact-details.pt 2011-11-28 03:04:27 +0000
@@ -72,7 +72,7 @@
<dd>
<img src="/@@/private" alt="" />
<tal:openid-login content="view/openid_identity_url" />
- <a target="help" href="/+help/openid.html" class="sprite maybe">
+ <a target="help" href="/+help-registry/openid.html" class="sprite maybe">
<span class="invisible-link">OpenID help</span></a>
</dd>
</dl>
@@ -183,7 +183,7 @@
<dd><a id="karma-total"
tal:attributes="href overview_menu/karma/url"
tal:content="context/karma">342</a>
- <a target="help" href="/+help/karma.html" class="sprite maybe">
+ <a target="help" href="/+help-registry/karma.html" class="sprite maybe">
<span class="invisible-link">Karma help</span></a>
</dd>
</dl>
=== modified file 'lib/lp/registry/templates/product-files.pt'
--- lib/lp/registry/templates/product-files.pt 2011-07-07 16:14:25 +0000
+++ lib/lp/registry/templates/product-files.pt 2011-11-28 03:04:27 +0000
@@ -16,7 +16,7 @@
<p tal:condition="view/has_download_files">
<a
- href="/+help/verify-downloads.html" target="help">How do I verify a
+ href="/+help-registry/verify-downloads.html" target="help">How do I verify a
download?</a>
</p>
<br />
=== modified file 'lib/lp/registry/templates/product-index.pt'
--- lib/lp/registry/templates/product-index.pt 2011-11-20 13:16:14 +0000
+++ lib/lp/registry/templates/product-index.pt 2011-11-28 03:04:27 +0000
@@ -125,7 +125,7 @@
<a tal:replace="structure overview_menu/reassign/fmt:icon" />
</tal:driver_unset>
- <a target="help" href="/+help/driver.html"
+ <a target="help" href="/+help-registry/driver.html"
class="sprite maybe"> <span class="invisible-link">Driver help</span></a>
</dd>
</dl>
=== modified file 'lib/lp/registry/templates/productrelease-portlet-data.pt'
--- lib/lp/registry/templates/productrelease-portlet-data.pt 2011-07-07 16:18:34 +0000
+++ lib/lp/registry/templates/productrelease-portlet-data.pt 2011-11-28 03:04:27 +0000
@@ -12,7 +12,7 @@
<p id="how-to-verify" tal:condition="view/download_files">
After you've downloaded a file, you can verify its authenticity
using its MD5 sum or signature.
- (<a href="/+help/verify-downloads.html" target="help">How do I
+ (<a href="/+help-registry/verify-downloads.html" target="help">How do I
verify a download?</a>)
</p>
=== modified file 'lib/lp/services/inlinehelp/README.txt'
--- lib/lp/services/inlinehelp/README.txt 2010-10-18 22:24:59 +0000
+++ lib/lp/services/inlinehelp/README.txt 2011-11-28 03:04:27 +0000
@@ -30,7 +30,7 @@
>>> zcmlcontext = xmlconfig.string("""
... <configure xmlns:lp="http://namespaces.canonical.com/lp">
... <include package="lp.services.inlinehelp" file="meta.zcml" />
- ... <lp:help-folder folder="%s"/>
+ ... <lp:help-folder folder="%s" name="+help"/>
... </configure>
... """ % help_folder)
@@ -53,26 +53,6 @@
>>> isinstance(help, HelpFolder)
True
-The help folder can also be registered for a specific request type using the
-"type" attribute.
-
- >>> from zope.publisher.interfaces.http import IHTTPRequest
- >>> directlyProvides(request, IHTTPRequest)
-
- >>> print queryMultiAdapter((rootObject, request), name="+help")
- None
- >>> zcmlcontext = xmlconfig.string("""
- ... <configure
- ... xmlns:lp="http://namespaces.canonical.com/lp">
- ... <include package="lp.services.inlinehelp" file="meta.zcml" />
- ... <lp:help-folder folder="%s"
- ... type="zope.publisher.interfaces.http.IHTTPRequest"/>
- ... </configure>
- ... """ % help_folder)
-
- >>> queryMultiAdapter((rootObject, request), name="+help")
- <lp.services...>
-
Cleanup
-------
=== modified file 'lib/lp/services/inlinehelp/zcml.py'
--- lib/lp/services/inlinehelp/zcml.py 2010-08-20 20:31:18 +0000
+++ lib/lp/services/inlinehelp/zcml.py 2011-11-28 03:04:27 +0000
@@ -7,15 +7,13 @@
__all__ = []
from zope.component.zcml import handler
-from zope.configuration.fields import (
- GlobalInterface,
- Path,
- )
+from zope.configuration.fields import Path
from zope.interface import Interface
from zope.publisher.interfaces.browser import (
IBrowserPublisher,
IBrowserRequest,
)
+from zope.schema import TextLine
from zope.security.checker import (
defineChecker,
NamesChecker,
@@ -30,28 +28,26 @@
folder = Path(
title=u'The path to the help folder.',
required=True)
- type = GlobalInterface(
- title=u'The request type on which the help folder is registered',
- required=False,
- default=IBrowserRequest)
-
-
-def register_help_folder(context, folder, type=IBrowserRequest):
+ name = TextLine(
+ title=u'The name to register the help folder under.',
+ required=True)
+
+
+def register_help_folder(context, folder, name):
"""Create a help folder subclass and register it with the ZCA."""
- # ZCML pass the type parameter via keyword parameters, so it can't be
- # renamed and shadows the builtin. So access that type() builtin directly.
- help_folder = __builtins__['type'](
- str('+help for %s' % folder), (HelpFolder, ), {'folder': folder})
+ help_folder = type(
+ str('%s for %s' % (name, folder)), (HelpFolder, ), {'folder': folder})
defineChecker(
help_folder,
NamesChecker(list(IBrowserPublisher.names(True)) + ['__call__']))
context.action(
- discriminator = ('view', (ILaunchpadApplication, type), '+help'),
- callable = handler,
- args = ('registerAdapter',
- help_folder, (ILaunchpadApplication, type), Interface,
- '+help', context.info),
+ discriminator=(
+ 'view', (ILaunchpadApplication, IBrowserRequest), name),
+ callable=handler,
+ args=('registerAdapter',
+ help_folder, (ILaunchpadApplication, IBrowserRequest),
+ Interface, name, context.info),
)
=== modified file 'lib/lp/soyuz/configure.zcml'
--- lib/lp/soyuz/configure.zcml 2011-11-27 01:37:05 +0000
+++ lib/lp/soyuz/configure.zcml 2011-11-28 03:04:27 +0000
@@ -6,6 +6,7 @@
xmlns="http://namespaces.zope.org/zope"
xmlns:browser="http://namespaces.zope.org/browser"
xmlns:i18n="http://namespaces.zope.org/i18n"
+ xmlns:lp="http://namespaces.canonical.com/lp"
xmlns:webservice="http://namespaces.canonical.com/webservice"
xmlns:xmlrpc="http://namespaces.zope.org/xmlrpc"
i18n_domain="launchpad">
@@ -13,6 +14,8 @@
package=".browser"/>
<authorizations module=".security" />
+ <lp:help-folder folder="help" name="+help-soyuz" />
+
<!-- PackageCloner -->
<securedutility
=== modified file 'lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt'
--- lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt 2011-02-09 14:49:13 +0000
+++ lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt 2011-11-28 03:04:27 +0000
@@ -292,7 +292,7 @@
procedure.
>>> print anon_browser.getLink('Read about installing').url
- http://launchpad.dev/+help/soyuz/ppa-sources-list.html
+ http://launchpad.dev/+help-soyuz/ppa-sources-list.html
The PPA owner reference is a link to its profile page.
@@ -601,12 +601,12 @@
its key to Ubuntu.
>>> print anon_browser.getLink('Read about installing').url
- http://launchpad.dev/+help/soyuz/ppa-sources-list.html
+ http://launchpad.dev/+help-soyuz/ppa-sources-list.html
And further down, next to the key id, we link to that same pop-up help:
>>> print anon_browser.getLink('What is this?').url
- http://launchpad.dev/+help/soyuz/ppa-sources-list.html
+ http://launchpad.dev/+help-soyuz/ppa-sources-list.html
== Single-publication PPAs ==
=== modified file 'lib/lp/soyuz/templates/archive-index.pt'
--- lib/lp/soyuz/templates/archive-index.pt 2011-07-18 09:23:10 +0000
+++ lib/lp/soyuz/templates/archive-index.pt 2011-11-28 03:04:27 +0000
@@ -91,7 +91,7 @@
this untrusted PPA by adding <strong
tal:content="context/fmt:reference">ppa:cprov/ppa</strong>
to your system's Software Sources.
- (<a href="/+help/soyuz/ppa-sources-list.html"
+ (<a href="/+help-soyuz/ppa-sources-list.html"
target="help">Read about installing</a>)
</p>
@@ -113,7 +113,7 @@
<code tal:content="signing_key/displayname"
>1024R/23456789</code>
</a>
- (<a href="/+help/soyuz/ppa-sources-list.html"
+ (<a href="/+help-soyuz/ppa-sources-list.html"
target="help">What is this?</a>)
</dd>
<dt>Fingerprint:</dt>
=== modified file 'lib/lp/soyuz/templates/person-archive-subscription.pt'
--- lib/lp/soyuz/templates/person-archive-subscription.pt 2010-02-12 12:39:24 +0000
+++ lib/lp/soyuz/templates/person-archive-subscription.pt 2011-11-28 03:04:27 +0000
@@ -32,7 +32,7 @@
</tal:archive_name>
you need to copy the lines below and add them to your system's
software sources.
- (<a href="/+help/soyuz/ppa-sources-list.html" target="help">Read
+ (<a href="/+help-soyuz/ppa-sources-list.html" target="help">Read
about installing</a>)
</p>
<tal:entries replace="structure view/sources_list_entries" />
=== modified file 'lib/lp/translations/browser/pofile.py'
--- lib/lp/translations/browser/pofile.py 2011-09-26 07:33:00 +0000
+++ lib/lp/translations/browser/pofile.py 2011-11-28 03:04:27 +0000
@@ -206,8 +206,8 @@
return """
New to translating in Launchpad?
- <a href="/+help/new-to-translating.html" target="help">
- Read our guide</a>.
+ <a href="/+help-translations/new-to-translating.html"
+ target="help">Read our guide</a>.
"""
@property
=== modified file 'lib/lp/translations/configure.zcml'
--- lib/lp/translations/configure.zcml 2011-11-27 01:37:05 +0000
+++ lib/lp/translations/configure.zcml 2011-11-28 03:04:27 +0000
@@ -21,8 +21,7 @@
provides="zope.publisher.interfaces.browser.IDefaultBrowserLayer"
name="translations" />
- <lp:help-folder
- folder="help" type="lp.translations.publisher.TranslationsLayer" />
+ <lp:help-folder folder="help" name="+help-translations" />
<class
class="lp.translations.model.vpotexport.VPOTExport">
=== modified file 'lib/lp/translations/help/getting-started-for-your-project.html'
--- lib/lp/translations/help/getting-started-for-your-project.html 2010-01-12 16:16:27 +0000
+++ lib/lp/translations/help/getting-started-for-your-project.html 2011-11-28 03:04:27 +0000
@@ -23,12 +23,12 @@
<ul>
<li>
join a translations group, who will help you review your project's
- translations — <a href="/+help/translation-groups.html">Read
+ translations — <a href="/+help-translations/translation-groups.html">Read
about translation groups ></a>
</li>
<li>
select a translation permissions policy — <a
- href="/+help/permissions-policies.html">Read about permissions
+ href="/+help-translations/permissions-policies.html">Read about permissions
policies ></a>
</li>
<li>
=== modified file 'lib/lp/translations/help/new-to-translating.html'
--- lib/lp/translations/help/new-to-translating.html 2010-01-14 16:43:58 +0000
+++ lib/lp/translations/help/new-to-translating.html 2011-11-28 03:04:27 +0000
@@ -29,7 +29,7 @@
<li>
Each project/distribution decides how to balance openness with the
need for review of translations by selecting a <a
- href="/+help/permissions-policies.html">permissions policy</a>. For
+ href="/+help-translations/permissions-policies.html">permissions policy</a>. For
most projects, you'll be able to suggest translations that will then
be reviewed by someone else.
</li>
=== modified file 'lib/lp/translations/help/successful-imports.html'
--- lib/lp/translations/help/successful-imports.html 2010-01-12 13:48:24 +0000
+++ lib/lp/translations/help/successful-imports.html 2011-11-28 03:04:27 +0000
@@ -23,7 +23,7 @@
<li>Contain at least one <code>.pot</code> file with English strings,
rather than message IDs or another language. You cannot upload a
<code>.po</code> file on its own.</li>
- <li>Give each template its own directory (<a href="/+help/directory-example.html"
+ <li>Give each template its own directory (<a href="/+help-translations/directory-example.html"
>see an example directory layout</a>).</li>
</ul>
=== modified file 'lib/lp/translations/help/working-modes.html'
--- lib/lp/translations/help/working-modes.html 2010-04-28 02:04:57 +0000
+++ lib/lp/translations/help/working-modes.html 2011-11-28 03:04:27 +0000
@@ -13,10 +13,11 @@
<p>
If you're making translations for a project that uses a <em>Structured
- </em> or <em>Restricted</em> <a href=/+help/permissions-policies.html">
- permissions policy</a> <strong>and</strong> you're a member of the
- appropriate <a href=/+help/translation-groups.html">translation team</a>
- you can work in one of two modes:
+ </em> or <em>Restricted</em>
+ <a href="/+help-translations/permissions-policies.html">permissions
+ policy</a> <strong>and</strong> you're a member of the appropriate
+ <a href="/+help-translations/translation-groups.html">translation
+ team</a> you can work in one of two modes:
</p>
<ul>
=== modified file 'lib/lp/translations/templates/configure-translations.pt'
--- lib/lp/translations/templates/configure-translations.pt 2010-12-29 12:46:04 +0000
+++ lib/lp/translations/templates/configure-translations.pt 2011-11-28 03:04:27 +0000
@@ -14,8 +14,8 @@
<tal:product replace="context/title">Launchpad</tal:product>. In
most cases you should choose the <em>Launchpad Translators</em>
group. You can also set the translation permissions policy here.
- (<a href="/+help/translation-groups.html" target="help">Tips on
- choosing a group</a>) (<a href="/+help/permissions-policies.html"
+ (<a href="/+help-translations/translation-groups.html" target="help">Tips on
+ choosing a group</a>) (<a href="/+help-translations/permissions-policies.html"
target="help">Help on choosing a policy</a>)
</p>
</div>
=== modified file 'lib/lp/translations/templates/hastranslationgroup-portlet-translation-groups-and-permission.pt'
--- lib/lp/translations/templates/hastranslationgroup-portlet-translation-groups-and-permission.pt 2010-12-29 12:36:28 +0000
+++ lib/lp/translations/templates/hastranslationgroup-portlet-translation-groups-and-permission.pt 2011-11-28 03:04:27 +0000
@@ -8,7 +8,7 @@
<a tal:replace="structure context/translationgroup/fmt:link"
>translators</a>
</tal:hasgroup>
- with <a target="help" href="/+help/permissions-policies.html"
+ with <a target="help" href="/+help-translations/permissions-policies.html"
tal:content="context/translationpermission/title">certain</a>
permissions.
</p>
=== modified file 'lib/lp/translations/templates/person-translations.pt'
--- lib/lp/translations/templates/person-translations.pt 2011-08-04 14:15:13 +0000
+++ lib/lp/translations/templates/person-translations.pt 2011-11-28 03:04:27 +0000
@@ -52,7 +52,7 @@
<div id="translations-to-review-section" class="portlet">
<h2>Translations you need to review</h2>
<p>
- By reviewing the following translations, you can help ensure other translators' work is published to software users. (<a href="/+help/reviewing.html" target="help">More about reviewing</a>)
+ By reviewing the following translations, you can help ensure other translators' work is published to software users. (<a href="/+help-translations/reviewing.html" target="help">More about reviewing</a>)
</p>
<metal:translations-to-review
tal:replace="structure view/translations_to_review_table" />
=== modified file 'lib/lp/translations/templates/pofile-upload.pt'
--- lib/lp/translations/templates/pofile-upload.pt 2010-12-02 16:13:51 +0000
+++ lib/lp/translations/templates/pofile-upload.pt 2011-11-28 03:04:27 +0000
@@ -17,7 +17,7 @@
<div class="discreet">This should be a <code>.po</code> file that
was previously exported from Launchpad and contains updated
translations.<br />
- (<a href="/+help/pofile-upload.html" target="help">More about uploading updated translations</a>)
+ (<a href="/+help-translations/pofile-upload.html" target="help">More about uploading updated translations</a>)
</div>
</div>
=== modified file 'lib/lp/translations/templates/productseries-translations-settings.pt'
--- lib/lp/translations/templates/productseries-translations-settings.pt 2010-10-10 21:54:16 +0000
+++ lib/lp/translations/templates/productseries-translations-settings.pt 2011-11-28 03:04:27 +0000
@@ -59,7 +59,7 @@
</li>
<li>
give each template its own directory (<a
- href="/+help/directory-example.html" target="help">see
+ href="/+help-translations/directory-example.html" target="help">see
an example directory layout</a>).
</li>
</ul>
=== modified file 'lib/lp/translations/templates/productseries-translations-upload.pt'
--- lib/lp/translations/templates/productseries-translations-upload.pt 2010-09-27 21:46:10 +0000
+++ lib/lp/translations/templates/productseries-translations-upload.pt 2011-11-28 03:04:27 +0000
@@ -30,7 +30,7 @@
<p>
<strong>Note:</strong> it's quicker and easier to <a tal:attributes="
href context/fmt:url:translations/+translations-settings">import from a
- Bazaar branch</a> instead (<a href="/+help/importing-from-bzr.html"
+ Bazaar branch</a> instead (<a href="/+help-translations/importing-from-bzr.html"
target="help">More about importing from Bazaar</a>)
</p>
@@ -43,7 +43,7 @@
<ul class="bulleted">
<li>contain at least one <code>.pot</code> file with English strings,
rather than message IDs or another language</li>
- <li>give each template its own directory (<a href="/+help/directory-example.html"
+ <li>give each template its own directory (<a href="/+help-translations/directory-example.html"
target="help">see an example directory layout</a>).</li>
</ul>
=== modified file 'lib/lp/translations/templates/translationimportqueue-index.pt'
--- lib/lp/translations/templates/translationimportqueue-index.pt 2010-10-24 21:00:11 +0000
+++ lib/lp/translations/templates/translationimportqueue-index.pt 2011-11-28 03:04:27 +0000
@@ -27,7 +27,7 @@
If your import is taking longer than you'd expect, <a href="
https://answers.launchpad.net/rosetta/+addquestion"
>contact us</a>.
- (<a href="/+help/successful-imports.html" target="help">Learn
+ (<a href="/+help-translations/successful-imports.html" target="help">Learn
more about getting a successful import</a>)
<tal:login condition="not:request/lp:person">
<a href="+login">Log in</a> to change items in this list.
=== modified file 'lib/lp/translations/templates/translations-macros.pt'
--- lib/lp/translations/templates/translations-macros.pt 2011-07-01 15:24:41 +0000
+++ lib/lp/translations/templates/translations-macros.pt 2011-11-28 03:04:27 +0000
@@ -137,7 +137,7 @@
<a id="translation-switch-working-mode"
class="sprite edit js-action widget-hd">
Reviewer mode</a> <!--
- -->(<a href="/+help/working-modes.html" target="help"><!--
+ -->(<a href="/+help-translations/working-modes.html" target="help"><!--
-->What's this?</a>)
</span>
</li>
=== modified file 'lib/lp/translations/templates/translations-portlet-configuration.pt'
--- lib/lp/translations/templates/translations-portlet-configuration.pt 2010-10-06 15:03:44 +0000
+++ lib/lp/translations/templates/translations-portlet-configuration.pt 2011-11-28 03:04:27 +0000
@@ -13,7 +13,7 @@
</li>
<li>
<a class="info sprite"
- href="/+help/getting-started-for-your-project.html"
+ href="/+help-translations/getting-started-for-your-project.html"
target="help">
Getting started with translating your project in Launchpad
</a>