Rosetta overrules number of spaces

Bug #30358 reported by Benno Schulenberg
50
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

When a translated string should start with a certain number of spaces (so it will be aligned with previous strings), Rosetta mistakenly forces the number of spaces that the original string starts with.

For example, message number 10 on
https://launchpad.net/distros/ubuntu/dapper/+source/psmisc/+pots/psmisc/nl/+translate
should be aligned with message number 9: in the translated string the "killall" should be preceded by ten spaces. When I fill that in and click 'Save&Continue' and then go back to check, Rosetta has made it into seven spaces (but only for the first line, not the second). When I try to fool it and make the line start with \r, Rosetta will precede this \r with seven spaces and leave the ten spaces after it intact. (This will work, I guess, but is ugly.)

Also when a po file is imported, Rosetta breaks the correct alignment by changing the number of spaces.

Revision history for this message
Carlos Perelló Marín (carlos) wrote :

We implemented it that way while fixing bug #1036

Seems like we did a mistake assuming that "fix" of the spaces.

Changed in rosetta:
assignee: nobody → carlos
status: Unconfirmed → Confirmed
Revision history for this message
Tino Meinen (a-t-meinen) wrote :

So, it's not only whitespace at the beginning but also at the end of strings that are overruled.
for example in the coreutils package:

The correct translation of this msgid with three spaces at the end (here represented by '+'characters for clarity) that is uploaded to Rosetta
#: src/df.c:152
msgid "Filesystem++++++++"
msgstr "Bestandssysteem+++"

Gets changed to:

#: src/df.c:152
msgid "Filesystem++++++++"
msgstr "Bestandssysteem++++++++"

This bug causes the output of the command ' df -h ' to be badly misaligned in Dutch.

Tino Meinen

Revision history for this message
Daniel Nylander (yeager) wrote :

Same thing in Swedish, missing 2 spaces

$ df
Filsystem 1K-block Använt Tillgängl Anv% Monterat på
/dev/sda1 75434976 4804068 66799008 7% /
varrun 257700 112 257588 1% /var/run

Should be

$ df
Filsystem 1K-block Använt Tillgängl Anv% Monterat på
/dev/sda1 75434976 4804068 66799008 7% /
varrun 257700 112 257588 1% /var/run

Revision history for this message
Benno Schulenberg (bennoschulenberg) wrote :

Any ETA on when this bug will get fixed? I've just spent two hours on working around these forced spaces, as for as possible, for the messages in util-linux-ng. This really should not be necessary. Can't bug #1036 be fixed?

Revision history for this message
Данило Шеган (danilo) wrote :

I guess we should include some way to 'force' keeping spaces as they are submitted. It's too easy to have unnecessary spaces when using the web form, so maybe we should only normalize spaces when getting updates from the web?

Changed in rosetta:
assignee: carlos → nobody
importance: Medium → High
Revision history for this message
Данило Шеган (danilo) wrote :

So, looking at bugs this was designed to solve, we decided that we can:
 - remove whitespace handling altogether
 - fix newlines only for submissions through the web UI
 - allow detecting and fixing whitespace problems with separate functionality: https://blueprints.edge.launchpad.net/rosetta/+spec/detect-whitespace-discrepancies

Revision history for this message
Alexey Balmashnov (a.balmashnov) wrote :

What is the state of the affairs here? My respects to the High importance status. As I can tell neither solution implemented (because I bumped myself into discrepancy mentioned in comments #2-#3).

Adding the "missed" spaces is sort of cool, but it should be a bit more clever. Just go string by string and count total number of symbols, and only if the length of the original and translated string do not match, only then start your adding-missing-spaces-magic, please. In this way we at least may figure out how to fix certain issues with bloody "clever" automation on our way.

Cheers.

Revision history for this message
Данило Шеган (danilo) wrote :

Alexey: the state of the affairs is indicated in the bug status: it's been triaged and of high priority (along with another 100 of high priority bugs). Unfortunately, we lack the time to fix them all.

The solution you propose would break in a big number of other cases where this is useful, so I don't see any merit in going forward with it.

If you are willing to go with the solution as proposed in comment #6 (remove whitespace handling and keep newlines handling for submissions through web UI), do remember that Launchpad is open source and you can help yourself. Start at https://dev.launchpad.net/, and do feel welcome to ask any questions you want and I'd be more than happy to point people in the right direction (Note that this offer holds for everyone else as well :)

Revision history for this message
Данило Шеган (danilo) wrote :

When fixing this we should also fix bug 1190 along the way.

Curtis Hovey (sinzui)
Changed in launchpad:
importance: High → Low
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

Related questions

Remote bug watches

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