Mixed new line markers causing OOPS while submitting translations

Bug #742662 reported by Diogo Matsubara
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Benji York

Bug Description

10 MixedNewlineMarkersError: Original text (u'\\rPAUSE command ignored (no hw support)\\n') mixes different newline markers.
POST: 10 Robots: 0 Local: 10
9 https://translations.edge.launchpad.net/ubuntu/natty/+source/alsa-utils/+pots/alsa-utils/es/+translate (POFile:+translate)
OOPS-1909EA1131, OOPS-1909EB1011, OOPS-1909EB1023, OOPS-1909EC1037, OOPS-1909EC1038, OOPS-1909ED1083, OOPS-1909ED1084, OOPS-1909EE1073, OOPS-1909EE1077
1 https://translations.launchpad.net/ubuntu/natty/+source/alsa-utils/+pots/alsa-utils/bs/+translate (POFile:+translate)
OOPS-1909H2071

Related branches

Revision history for this message
Robert Collins (lifeless) wrote :

So we should do one of:
 - reject this during import
 - handle it [preserve the newline styles in the translation]
 - show a clear error on the page

Revision history for this message
Robert Collins (lifeless) wrote :

The newlines are being used to do progress bar style updates AFAICT (or they are a mistake)

Aaron Bentley (abentley)
summary: - Mixed new line markers causing OOPS
+ Mixed new line markers causing OOPS while importing translations
tags: added: rosetta-imports
Benji York (benji)
Changed in launchpad:
status: Triaged → In Progress
assignee: nobody → Benji York (benji)
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
Revision history for this message
Henning Eggers (henninge) wrote : Re: Mixed new line markers causing OOPS while importing translations

Unfortunately the proposed fix is not an improvement as it introduces an uncaught exception to the import code. This will disprupt imports unnecessarily. Instead, the error should be stored in the importer and reported, like other import errors.

The revision 13889 will not be deployed, sorry.

tags: added: bad-commit-13889 qa-bad
removed: qa-needstesting
Revision history for this message
Benji York (benji) wrote :

Thanks for following up Henning. Do you have some more information about the uncaught exception so that I can address it? A copy of the traceback and/or reproduction instructions would be great.

William Grant (wgrant)
Changed in launchpad:
status: Fix Committed → In Progress
Revision history for this message
Henning Eggers (henninge) wrote :

The newline style is derived from the English original. That is when the OOPS gets raised.

So the fix is the following:
 - When sanitizing translations from the web ui, the MixedNewlineMarkersError needs to be caught and cause newlines not to be normalized because we don't know what the English original uses.
 - When sanitizing translations on imports, the exception should be treated as before.
 - For bonus points it would be great to not abort the import of the file completely but just report an error for this one string, like is done with other errors. But that is really outside the scope of this bug.

summary: - Mixed new line markers causing OOPS while importing translations
+ Mixed new line markers causing OOPS while submitting translations
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
removed: qa-bad
Changed in launchpad:
status: In Progress → Fix Committed
Benji York (benji)
tags: added: qa-ok
removed: qa-needstesting
William Grant (wgrant)
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.