refactor: deprecate i18n.t (#13039)
* refactor: deprecate i18n.t
* revert: deprecate i18n.t
This reverts commit 7dbf873a2f
.
* chore: reimpl
This commit is contained in:

committed by
GitHub

parent
a637b4e282
commit
7881f06be0
@@ -123,7 +123,7 @@ export const DetailNow = {
|
||||
export const RelativeOneHourAgo = {
|
||||
...Empty,
|
||||
async play({ canvasElement }) {
|
||||
await expect(canvasElement).toHaveTextContent(i18n.t('_ago.hoursAgo', { n: 1 }));
|
||||
await expect(canvasElement).toHaveTextContent(i18n.tsx._ago.hoursAgo({ n: 1 }));
|
||||
},
|
||||
args: {
|
||||
...Empty.args,
|
||||
@@ -162,7 +162,7 @@ export const DetailOneHourAgo = {
|
||||
export const RelativeOneDayAgo = {
|
||||
...Empty,
|
||||
async play({ canvasElement }) {
|
||||
await expect(canvasElement).toHaveTextContent(i18n.t('_ago.daysAgo', { n: 1 }));
|
||||
await expect(canvasElement).toHaveTextContent(i18n.tsx._ago.daysAgo({ n: 1 }));
|
||||
},
|
||||
args: {
|
||||
...Empty.args,
|
||||
@@ -201,7 +201,7 @@ export const DetailOneDayAgo = {
|
||||
export const RelativeOneWeekAgo = {
|
||||
...Empty,
|
||||
async play({ canvasElement }) {
|
||||
await expect(canvasElement).toHaveTextContent(i18n.t('_ago.weeksAgo', { n: 1 }));
|
||||
await expect(canvasElement).toHaveTextContent(i18n.tsx._ago.weeksAgo({ n: 1 }));
|
||||
},
|
||||
args: {
|
||||
...Empty.args,
|
||||
@@ -240,7 +240,7 @@ export const DetailOneWeekAgo = {
|
||||
export const RelativeOneMonthAgo = {
|
||||
...Empty,
|
||||
async play({ canvasElement }) {
|
||||
await expect(canvasElement).toHaveTextContent(i18n.t('_ago.monthsAgo', { n: 1 }));
|
||||
await expect(canvasElement).toHaveTextContent(i18n.tsx._ago.monthsAgo({ n: 1 }));
|
||||
},
|
||||
args: {
|
||||
...Empty.args,
|
||||
@@ -279,7 +279,7 @@ export const DetailOneMonthAgo = {
|
||||
export const RelativeOneYearAgo = {
|
||||
...Empty,
|
||||
async play({ canvasElement }) {
|
||||
await expect(canvasElement).toHaveTextContent(i18n.t('_ago.yearsAgo', { n: 1 }));
|
||||
await expect(canvasElement).toHaveTextContent(i18n.tsx._ago.yearsAgo({ n: 1 }));
|
||||
},
|
||||
args: {
|
||||
...Empty.args,
|
||||
|
Reference in New Issue
Block a user