Merge lp:~henninge/launchpad/bug-408899 into lp:launchpad
Proposed by
Henning Eggers
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~henninge/launchpad/bug-408899 |
Merge into: | lp:launchpad |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~henninge/launchpad/bug-408899 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Paul Hummer (community) | Approve | ||
Review via email: mp+9775@code.launchpad.net |
To post a comment you must log in.
= Probelem and fix =
The TranslationBran chApprover creates potemplate names from file names. These names must be a "valid_name" as defined by the database constraint of that name. Unfortunately the conversion method only took underscores into account, converting them to dashes.
This fix makes sure that the names produced conform to the valid_name constraint, most notably making all letters lower case. It also uses sanitize_name to remove all other invalid characters from the name.
= Test =
bin/test -vv -ttemplate_name
= Demo and QA =
Configure a product series to import translation templates from a branch. Push a pot file with capital letters and other invalid characters in it to that branch. Wait for that file to be uploaded to the translation import queue and you can see that it creates a potemplate entry with a valid name. In fact, without this fix it would not have been uploaded at all.
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: translations/ model/translati onbranchapprove r.py translations/ tests/test_ translationbran chapprover. py
lib/lp/
lib/lp/