Skip to content

Commit

Permalink
(no-ticket) Changed formatting in clocks.js
Browse files Browse the repository at this point in the history
Change-Id: I53e679a8f965055306b7b279bc57a29ae5594043
  • Loading branch information
OIOIOI authored and Gerrit Code Review committed Feb 26, 2017
1 parent 5456af0 commit 300f7bc
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions oioioi/clock/static/common/clocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,12 @@ $(function() {
var countdown_destination;
var countdown_dest_short;
if (round_duration_in_s) {
countdown_destination = ngettext("end of the %(round_name)s",
"end of the %(round_name)s", round_name)
countdown_destination = gettext("end of the %(round_name)s")
.fmt({round_name: round_name});
countdown_dest_short = gettext("to the end");
visible_bar = BarEnum.progressbar;
} else {
countdown_destination = ngettext("start of the %(round_name)s",
"start of the %(round_name)s", round_name)
countdown_destination = gettext("start of the %(round_name)s")
.fmt({round_name: round_name});
countdown_dest_short = gettext("to the start");
visible_bar = BarEnum.text_only;
Expand Down Expand Up @@ -97,31 +95,25 @@ $(function() {
countdown_short = hours_short + minutes_short + seconds_short +
countdown_dest_short;
countdown_text = ngettext(
"%(countdown_hours)sleft to the " +
"%(countdown_destination)s.",
"%(countdown_hours)sleft to the " +
"%(countdown_destination)s.",
"%(countdown_hours)sleft to the %(countdown_destination)s.",
"%(countdown_hours)sleft to the %(countdown_destination)s.",
hours).fmt({countdown_hours: countdown_hours,
countdown_destination: countdown_destination});
} else if (minutes > 0) {
var countdown_minutes = minutes_str + seconds_str;
countdown_short = minutes_short + seconds_short +
countdown_dest_short;
countdown_text = ngettext(
"%(countdown_minutes)sleft to the " +
"%(countdown_destination)s.",
"%(countdown_minutes)sleft to the " +
"%(countdown_destination)s.",
"%(countdown_minutes)sleft to the %(countdown_destination)s.",
"%(countdown_minutes)sleft to the %(countdown_destination)s.",
minutes).fmt({countdown_minutes: countdown_minutes,
countdown_destination: countdown_destination});
} else if (seconds >= 0) {
var countdown_seconds = seconds_str;
countdown_short = seconds_short + countdown_dest_short;
countdown_text = ngettext(
"%(countdown_seconds)sleft to the " +
"%(countdown_destination)s.",
"%(countdown_seconds)sleft to the " +
"%(countdown_destination)s.",
"%(countdown_seconds)sleft to the %(countdown_destination)s.",
"%(countdown_seconds)sleft to the %(countdown_destination)s.",
seconds).fmt({countdown_seconds: countdown_seconds,
countdown_destination: countdown_destination});
} else {
Expand Down

0 comments on commit 300f7bc

Please sign in to comment.