#13686: Web+: Use BDurationFormat to format time remaining in Downloads.
----------------------------------------+----------------------------
Reporter: akshay | Owner: pulkomandy
Type: enhancement | Status: new
Priority: normal | Milestone: Unscheduled
Component: Applications/WebPositive | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking:
Has a Patch: 1 | Platform: All
----------------------------------------+----------------------------
Comment (by pulkomandy):
This should be avoided:
{{{
BString buffer1(B_TRANSLATE("Time Left"));
buffer1 << ": ";
}}}
For example, in French, typography rules require a (non-breakable) space
before the ":" character. Hence, the character should be part of the
translated string:
{{{
BString buffer1(B_TRANSLATE("Time Left: "));
}}}
In fact, even better, so the translators can see what they are dealing
with, would be something like this:
{{{
BString remainingTime(B_TRANSLATE("(Time Left: %timeLeft%)"));
remainingTime.ReplaceAll("%timeleft%", buffer2);
}}}
This gives the translator full control on how the text should look. Maybe
some languages doesn't use the same character for parentheses?
I would rename the variables, as buffer1 and buffer2 aren't very
descriptive names (I know, it was already this way, but while we are
changing that code, it's a good idea to update this).
I preferred the previous format of exact end date + approximate duration.
For example, it sometimes happens that I download something at an airport
or train station over the provided wi-fi. There, I need the exact end date
so I know wether the download will finish before I have to board my
train/plane. In other cases, something like "more than 2 hours left" would
be great, but I don't know if we can get ICU to word it this way.
--
Ticket URL: <https://dev.haiku-os.org/ticket/13686#comment:2>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.