Code review comment for lp:~adiroiban/launchpad/bug-193750

Revision history for this message
Adi Roiban (adiroiban) wrote :

= Bug 193750 =

== Proposed fix ==

The fix should replace "ticket" to "question" and update the required answer links for addticket to addquestions.

Also instead on translations.lp.dev/rosetta/addticket the url was replaces to answers.lp.dev/rosetta/addquestion to have a clean namespace

== Implementation details ==

There were no test for checking the cases when those links should appear so I have added the required pagetests.

The translate.txt pagetest was also structured... but a bit.

== Tests ==

./bin/test -ct language

== Demo and Q/A ==

Abkhazian is a language that has no information about plural forms and is not registered as being spoken in any country.

We will see a note about missing plural forms and a link to Rosetta
add question page for informing Rosetta admin about the right plural form.

    >>> browser.open('http://translations.launchpad.dev/+languages/ab')
    >>> print extract_text(find_portlet(browser.contents, 'Plural forms'
    ... ).renderContents())
    Plural forms
    Unfortunately, Launchpad doesn't know the plural
    form information for this language...

    >>> print browser.getLink(id='plural_question').url
    http://answers.launchpad.dev/rosetta/+addquestion

We will see a note that this language is not registred as being spoken in any
country and a link to add question page for informating Rosetta admin about the
countries where this page is officially spoken.

    >>> countries_portlet = find_portlet(browser.contents, 'Countries')
    >>> print countries_portlet
    <...
    Abkhazian is not registered as being spoken in any
    country...

    >>> print browser.getLink(id='country_question').url
    http://answers.launchpad.dev/rosetta/+addquestion

== lint ==

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/lp/translations/browser/language.py
  lib/lp/translations/stories/standalone/xx-language.txt
  lib/lp/translations/templates/language-index.pt

« Back to merge proposal