Skip to content

Commit

Permalink
[locale] pt-br: Simplify pt-br past relativeTime (#4195)
Browse files Browse the repository at this point in the history
  • Loading branch information
eduPHP authored and marwahaha committed Mar 2, 2018
1 parent 6adc6ee commit bb142fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/locale/pt-br.js
Expand Up @@ -33,7 +33,7 @@ export default moment.defineLocale('pt-br', {
},
relativeTime : {
future : 'em %s',
past : '%s atrás',
past : 'há %s',
s : 'poucos segundos',
ss : '%d segundos',
m : 'um minuto',
Expand Down
6 changes: 3 additions & 3 deletions src/test/locale/pt-br.js
Expand Up @@ -140,7 +140,7 @@ test('from', function (assert) {

test('suffix', function (assert) {
assert.equal(moment(30000).from(0), 'em poucos segundos', 'prefix');
assert.equal(moment(0).from(30000), 'poucos segundos atrás', 'suffix');
assert.equal(moment(0).from(30000), 'poucos segundos', 'prefix');
});

test('fromNow', function (assert) {
Expand Down Expand Up @@ -212,9 +212,9 @@ test('relative time threshold', function (assert) {
moment.relativeTimeThreshold('ss', 3);

rts.subtract(3, 'seconds');
assert.equal(rts.fromNow(), 'poucos segundos atrás', 'Below custom a few seconds to seconds threshold');
assert.equal(rts.fromNow(), 'poucos segundos', 'Below custom a few seconds to seconds threshold');
rts.subtract(1, 'seconds');
assert.equal(rts.fromNow(), '4 segundos atrás', 'Above custom a few seconds to seconds threshold');
assert.equal(rts.fromNow(), '4 segundos', 'Above custom a few seconds to seconds threshold');

moment.relativeTimeThreshold('ss', rtsDefault);
});
Expand Down

0 comments on commit bb142fc

Please sign in to comment.