Skip to content

Commit

Permalink
[locale] ru: added a comma to the calendar displays time (#4492)
Browse files Browse the repository at this point in the history
  • Loading branch information
baribadamshin authored and marwahaha committed Apr 2, 2018
1 parent db71a65 commit 80c566c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 30 deletions.
26 changes: 13 additions & 13 deletions src/locale/ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,50 +72,50 @@ export default moment.defineLocale('ru', {
LLLL : 'dddd, D MMMM YYYY г., H:mm'
},
calendar : {
sameDay: '[Сегодня в] LT',
nextDay: '[Завтра в] LT',
lastDay: '[Вчера в] LT',
sameDay: '[Сегодня, в] LT',
nextDay: '[Завтра, в] LT',
lastDay: '[Вчера, в] LT',
nextWeek: function (now) {
if (now.week() !== this.week()) {
switch (this.day()) {
case 0:
return '[В следующее] dddd [в] LT';
return '[В следующее] dddd, [в] LT';
case 1:
case 2:
case 4:
return '[В следующий] dddd [в] LT';
return '[В следующий] dddd, [в] LT';
case 3:
case 5:
case 6:
return '[В следующую] dddd [в] LT';
return '[В следующую] dddd, [в] LT';
}
} else {
if (this.day() === 2) {
return '[Во] dddd [в] LT';
return '[Во] dddd, [в] LT';
} else {
return '[В] dddd [в] LT';
return '[В] dddd, [в] LT';
}
}
},
lastWeek: function (now) {
if (now.week() !== this.week()) {
switch (this.day()) {
case 0:
return '[В прошлое] dddd [в] LT';
return '[В прошлое] dddd, [в] LT';
case 1:
case 2:
case 4:
return '[В прошлый] dddd [в] LT';
return '[В прошлый] dddd, [в] LT';
case 3:
case 5:
case 6:
return '[В прошлую] dddd [в] LT';
return '[В прошлую] dddd, [в] LT';
}
} else {
if (this.day() === 2) {
return '[Во] dddd [в] LT';
return '[Во] dddd, [в] LT';
} else {
return '[В] dddd [в] LT';
return '[В] dddd, [в] LT';
}
}
},
Expand Down
34 changes: 17 additions & 17 deletions src/test/locale/ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,13 @@ test('fromNow', function (assert) {
test('calendar day', function (assert) {
var a = moment().hours(12).minutes(0).seconds(0);

assert.equal(moment(a).calendar(), 'Сегодня в 12:00', 'today at the same time');
assert.equal(moment(a).add({m: 25}).calendar(), 'Сегодня в 12:25', 'Now plus 25 min');
assert.equal(moment(a).add({h: 1}).calendar(), 'Сегодня в 13:00', 'Now plus 1 hour');
assert.equal(moment(a).add({d: 1}).calendar(), 'Завтра в 12:00', 'tomorrow at the same time');
assert.equal(moment(a).subtract({h: 1}).calendar(), 'Сегодня в 11:00', 'Now minus 1 hour');
assert.equal(moment(a).subtract({h: 4}).calendar(), 'Сегодня в 8:00', 'Now minus 4 hours');
assert.equal(moment(a).subtract({d: 1}).calendar(), 'Вчера в 12:00', 'yesterday at the same time');
assert.equal(moment(a).calendar(), 'Сегодня, в 12:00', 'today at the same time');
assert.equal(moment(a).add({m: 25}).calendar(), 'Сегодня, в 12:25', 'Now plus 25 min');
assert.equal(moment(a).add({h: 1}).calendar(), 'Сегодня, в 13:00', 'Now plus 1 hour');
assert.equal(moment(a).add({d: 1}).calendar(), 'Завтра, в 12:00', 'tomorrow at the same time');
assert.equal(moment(a).subtract({h: 1}).calendar(), 'Сегодня, в 11:00', 'Now minus 1 hour');
assert.equal(moment(a).subtract({h: 4}).calendar(), 'Сегодня, в 8:00', 'Now minus 4 hours');
assert.equal(moment(a).subtract({d: 1}).calendar(), 'Вчера, в 12:00', 'yesterday at the same time');
});

test('calendar next week', function (assert) {
Expand All @@ -243,24 +243,24 @@ test('calendar next week', function (assert) {
function makeFormatNext(d) {
switch (d.day()) {
case 0:
return '[В следующее] dddd [в] LT';
return '[В следующее] dddd, [в] LT';
case 1:
case 2:
case 4:
return '[В следующий] dddd [в] LT';
return '[В следующий] dddd, [в] LT';
case 3:
case 5:
case 6:
return '[В следующую] dddd [в] LT';
return '[В следующую] dddd, [в] LT';
}
}

function makeFormatThis(d) {
if (d.day() === 2) {
return '[Во] dddd [в] LT';
return '[Во] dddd, [в] LT';
}
else {
return '[В] dddd [в] LT';
return '[В] dddd, [в] LT';
}
}

Expand Down Expand Up @@ -291,24 +291,24 @@ test('calendar last week', function (assert) {
function makeFormatLast(d) {
switch (d.day()) {
case 0:
return '[В прошлое] dddd [в] LT';
return '[В прошлое] dddd, [в] LT';
case 1:
case 2:
case 4:
return '[В прошлый] dddd [в] LT';
return '[В прошлый] dddd, [в] LT';
case 3:
case 5:
case 6:
return '[В прошлую] dddd [в] LT';
return '[В прошлую] dddd, [в] LT';
}
}

function makeFormatThis(d) {
if (d.day() === 2) {
return '[Во] dddd [в] LT';
return '[Во] dddd, [в] LT';
}
else {
return '[В] dddd [в] LT';
return '[В] dddd, [в] LT';
}
}

Expand Down

0 comments on commit 80c566c

Please sign in to comment.