This is my branch to fix some simple issues with Launchpad Answers. lp:~sinzui/launchpad/edit-question-bug-210312 Diff size: 334 Launchpad bug: https://bugs.launchpad.net/bugs/210312 https://bugs.launchpad.net/bugs/275475 https://bugs.launchpad.net/bugs/386158 Test command: ./bin/test -vv \ -t answers.*views.txt -t question-subscriptions -t this-is-a-faq Pre-implementation: no one Target release: 3.1.12 = Fix some simple issues with Launchpad Answers = Bug 210312 [cannot edit the language of the question] The question +edit page only shows the user's preferred languages. It must show all languages so that the user can fix the language. Bug 275475 [launchpad displays the hint for subscribing when i click on unsubscribe] The paragraph talks about subscribing, but the action is unsubscribing. Bug 386158 [confusingly redundant fields in create faq page] There are two textareas, each of which seems to want the answer to the faq. == Rules == Bug 210312 [cannot edit the language of the question] * Remove the QuestionSupportLanguageMixin and use the interface's language Bug 275475 [launchpad displays the hint for subscribing when i click on unsubscribe] * Add a condition to the template to select the right paragraph to show. Bug 386158 [confusingly redundant fields in create faq page] * Revise the field labels and hints to distinguish between the FAQ and the question the user is answering. == QA == Bug 210312 [cannot edit the language of the question] * Edit a question on edge. * Verify the language choice contains every language registered in Launchpad. Bug 275475 [launchpad displays the hint for subscribing when i click on unsubscribe] * Choose the subscribe link on a a question. * Verify the link to your subscriptions page actually goes to your subscription page. * Choose the Subscribe button * Choose the Unsubscribe link * Verify that the paragraph talks about the consequence of unsubscribing. Bug 386158 [confusingly redundant fields in create faq page] * Choose create a new FAQ link from any question. * Verify the FAQ field speak of "this FAQ". * Verify the last field labeled "Additional comment for question #..." == Lint == Linting changed files: lib/lp/answers/browser/question.py lib/lp/answers/browser/tests/views.txt lib/lp/answers/interfaces/faq.py lib/lp/answers/interfaces/question.py lib/lp/answers/stories/question-subscriptions.txt lib/lp/answers/stories/this-is-a-faq.txt lib/lp/answers/templates/question-subscription.pt == Test == * lib/lp/answers/browser/tests/views.txt * Modernised part of the test--they predated LaunchpadFormView * Added label and page_title tests to verify that sane fragments for subscribe/unsubscribe were created for the automated rules. * Verified that the QuestionEdit form uses the LanguageVocabulary. * lib/lp/answers/stories/question-subscriptions.txt * Removed some cruft from the story. * Revised the story to verify the links in the subscribe page and the paragraph for the unsubscribe page. * lib/lp/answers/stories/this-is-a-faq.txt * Added a test to verify that the question message field has a very clear label (created by the view). == Implementation == * lib/lp/answers/browser/question.py * Removed the redundant question number form the page_title and breadcrumbs. The automatic rules showed Question #12: Question #12 * Fixed some spacing/wrapping issues reported by lint. * Added the IQuestion.language field, remove the QuestionSupportLanguageMixin language field. * Revised the rules to add the IQuestionLinkFAQForm['message'] field to the create FAQ form. It now creates a copy of the field and changes the title to 'Additional comment for question #12' to make if field's purpose clear when next to FAQ fields. * lib/lp/answers/interfaces/faq.py * Updated the descriptions of FAQ fields so that their context is clear when question fields are appended to them by views. * lib/lp/answers/interfaces/question.py * Updated the question message field description to clarify that the message is a question comment. * lib/lp/answers/templates/question-subscription.pt * Removed unused 1.0 heading. * Made the subscribe/unsubscribe paragraphs conditional. * Updated the link to person subscriptions to go to the actual subscriptions page.