Opened 13 years ago

Closed 12 years ago

#7294 closed bug (invalid)

Installer – Missing space/not wide enough in installation status

Reported by: deejam Owned by: korli
Priority: normal Milestone: R1
Component: Applications/Installer Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Either a space is missing or it is not wide enough. See attached image.

GCC2 Hybrid. hrev40692.

Attachments (2)

Installer_small_space.png (39.8 KB ) - added by deejam 13 years ago.
Installation status showing small space
installer.diff (643 bytes ) - added by jonas.kirilla 13 years ago.

Download all attachments as: .zip

Change History (14)

by deejam, 13 years ago

Attachment: Installer_small_space.png added

Installation status showing small space

comment:1 by deejam, 13 years ago

The space is ok when installing using English. The problem is that the translation string contains two spaces which is not visible to the translators in HTA.

InstallerWindow.cpp, line 215:

B_TRANSLATE("Install progress:  "));

comment:2 by deejam, 13 years ago

Type: enhancementbug

Changing this to a bug because it is intended to be the same space when localized as it is in English.

comment:3 by jonas.kirilla, 13 years ago

If we were to take the spaces out of the string ("Install progress:" instead of "Install progress: ") and instead append those two spaces after the B_TRANSLATE() lookup this could possibly violate the rules of some other language.

(Compare, for example, how French demands a space -before- the colon, which makes it unwise to break out a trailing colon from B_TRANSLATE()-strings.)

Ideally HTA would highlight leading and trailing spaces. (In the source string, I guess. And perhaps also warn if they are missing in the translated string.)

in reply to:  3 ; comment:4 by deejam, 13 years ago

Replying to jonas.kirilla:

If we were to take the spaces out of the string ("Install progress:" instead of "Install progress: ") and instead append those two spaces after the B_TRANSLATE() lookup this could possibly violate the rules of some other language.

There are lots of strings in Haiku with "Text:" that translates just fine. If some others are having issues with it, they can file a bug report.

(Compare, for example, how French demands a space -before- the colon, which makes it unwise to break out a trailing colon from B_TRANSLATE()-strings.)

Nobody said that the colon should go, so the problem you describe do not exist.

Ideally HTA would highlight leading and trailing spaces. (In the source string, I guess. And perhaps also warn if they are missing in the translated string.)

As long as we have HTA with it's missing features, we have to try to make the best of the situation. Ignoring a bug because some languages could have problem with it instead of fixing it for all the others is just wrong.

in reply to:  4 ; comment:5 by zooey, 13 years ago

Replying to deejam:

Ideally HTA would highlight leading and trailing spaces. (In the source string, I guess. And perhaps also warn if they are missing in the translated string.)

As long as we have HTA with it's missing features, we have to try to make the best of the situation. Ignoring a bug because some languages could have problem with it instead of fixing it for all the others is just wrong.

No, a problem in HTA shouldn't be worked around by adjusting the code everywhere. Is there any reason not to fix this in HTA?

comment:6 by jonas.kirilla, 13 years ago

@deejam The colon is just an example of a similar case where one could be tempted to remove the end-part of a string, and have the application add it at runtime.

In this specific case, the ideal solution IMO would be one that does not force a whitespace on all languages (by hardcoding it in the application), whether they need it or not, but I guess a superfluos whitespace in that location is likely not much of an issue in any language. (But what do I know. :)

@zooey HTA development is frozen (sort of). We're supposedly migrating to something based on Pootle, but it's uncertain when that will happen, or if it is ultimately decided. (FWIW, Pootle is said to have better support for strings with leading and trailing whitespace.)

comment:7 by korli, 13 years ago

Why don't we use B_TRANSLATE("Install progress: %1") and then replace %1 with the progress string? Maybe I'm missing something though.

by jonas.kirilla, 13 years ago

Attachment: installer.diff added

comment:8 by jonas.kirilla, 13 years ago

patch: 01

in reply to:  5 comment:9 by deejam, 13 years ago

Replying to zooey:

Is there any reason not to fix this in HTA?

This is the first time I've seen "Text: " (with those two trailing spaces) being used. Since HTA don't support starting/trailing hidden characters, it caused this bug. The normal way is to do it like the patch Jonas attached, or use \t. So far, those two solutions has worked. No need to work on HTA if it can be solved another way, since HTA is to be replaced.

Why don't we use B_TRANSLATE("Install progress: %1") and then replace %1 with the progress string? Maybe I'm missing something though.

Translators will probably translate that with one space between : and %1, because it is very difficult to see that there are two spaces. If HTA did display the strings in a monospaced font, it would be easier to spot.

So, apply the patch and close this ticket.

comment:10 by jonas.kirilla, 13 years ago

There are at least 96 occurences of a source string (in the catalogs) ending in a space character (and likely not by accident). This is not a bug in the sources but more of a missing feature on the translation website. As cumbersome as that may be.

comment:11 by humdinger, 12 years ago

patch: 10

comment:12 by humdinger, 12 years ago

Resolution: invalid
Status: newclosed

I tend to agree with Jonas. This is something that should be fixed at HTA or we may lose spaces in all kinds of places. Please reopen if you diagree.

Note: See TracTickets for help on using tickets.