|
| 1 | +// Jest Snapshot v1, https://goo.gl/fbAQLP |
| 2 | + |
| 3 | +exports[`complex interpolation case snapshot 1`] = ` |
| 4 | +"/* eslint-disable */ |
| 5 | +/* tslint:disable */ |
| 6 | +export function LocaleKeys<R extends string>(t: (...args: unknown[]) => R) { |
| 7 | + return { |
| 8 | + order: { |
| 9 | + shippingLabel: { |
| 10 | + customerDetailsCard: { |
| 11 | + address: (data: Record<'firstName' | 'lastName' | 'addressLine1' | 'addressLine2' | 'city' | 'state' | 'zipCode' | 'country', unknown>) => t('order.shippingLabel.customerDetailsCard.address', data), /* {{firstName}} {{lastName}}, {{addressLine1, suffix ', '}}{{addressLine2, suffix ', '}}{{city, concat ', '}}{{state, suffix ' '}}{{zipCode, suffix ', '}}{{country}} */ |
| 12 | + }, |
| 13 | + labelDetailsCard: { |
| 14 | + shipFrom: { |
| 15 | + addressFormat: (data: Record<'addressLine1' | 'addressLine2' | 'city' | 'state' | 'zipCode' | 'country', unknown>) => t('order.shippingLabel.labelDetailsCard.shipFrom.addressFormat', data), /* {{addressLine1, suffix ', '}}{{addressLine2, suffix ', '}}{{city, suffix ', '}}{{state}} {{zipCode, suffix ', '}}{{country}} */ |
| 16 | + }, |
| 17 | + }, |
| 18 | + }, |
| 19 | + }, |
| 20 | + }; |
| 21 | +} |
| 22 | +
|
| 23 | +export type ILocaleKeys = ReturnType<typeof LocaleKeys>; |
| 24 | +" |
| 25 | +`; |
| 26 | +
|
| 27 | +exports[`data interpolation icu snapshot 1`] = ` |
| 28 | +"/* eslint-disable */ |
| 29 | +/* tslint:disable */ |
| 30 | +export function LocaleKeys<R extends string>(t: (...args: unknown[]) => R) { |
| 31 | + return { |
| 32 | + common: { |
| 33 | + people: { |
| 34 | + message: (data: Record<'numPersons', unknown>) => t('common.people.message', data), /* Hey, {numPersons, plural, =0 {no one} =1 {one person} other {# persons}} */ |
| 35 | + messageComplex: (data: Record<'name' | 'numPersons' | 'productsAmount', unknown>) => t('common.people.messageComplex', data), /* Hey {name}, There are {numPersons, plural, =0 {no one} =1 {one person} other {# persons}} that want to change the {productsAmount, plural, =1 {price of 1 product} other {prices of # products}} */ |
| 36 | + pluralMessage: (data: Record<'numPeople', unknown>) => t('common.people.pluralMessage', data), /* {numPeople, plural, =0 {No one is} =1 {One person is} other {# people are}} interested */ |
| 37 | + ordinalMessage: (data: Record<'position', unknown>) => t('common.people.ordinalMessage', data), /* {position, selectordinal, one {You're 1st} two {You're 2nd} few {You're 3rd} other {You're #th}} */ |
| 38 | + dateMessage: (data: Record<'currentDate', unknown>) => t('common.people.dateMessage', data), /* Today is {currentDate, date, long} */ |
| 39 | + timeMessage: (data: Record<'currentTime', unknown>) => t('common.people.timeMessage', data), /* The current time is {currentTime, time, short} */ |
| 40 | + selectMessage: (data: Record<'gender', unknown>) => t('common.people.selectMessage', data), /* {gender, select, male {He is} female {She is} other {They are} } interested */ |
| 41 | + numberMessage: (data: Record<'numApples', unknown>) => t('common.people.numberMessage', data), /* You have {numApples, number} apples */ |
| 42 | + }, |
| 43 | + }, |
| 44 | + }; |
| 45 | +} |
| 46 | +
|
| 47 | +export type ILocaleKeys = ReturnType<typeof LocaleKeys>; |
| 48 | +" |
| 49 | +`; |
| 50 | +
|
| 51 | +exports[`data interpolation icu with nested params snapshot 1`] = ` |
| 52 | +"/* eslint-disable */ |
| 53 | +/* tslint:disable */ |
| 54 | +export function LocaleKeys<R extends string>(t: (...args: unknown[]) => R) { |
| 55 | + return { |
| 56 | + common: { |
| 57 | + people: { |
| 58 | + message: (data: Record<'numPersons', unknown>) => t('common.people.message', data), /* Hey, {numPersons, plural, =0 {no one} =1 {one person} other {# persons}} */ |
| 59 | + messageNestedParams: (data: Record<'name' | 'numPersons', unknown>) => t('common.people.messageNestedParams', data), /* Hey, {numPersons, plural, =0 {No one here.} one {{name}. You are the only person here.} other {{name} and # other persons are here.}} */ |
| 60 | + }, |
| 61 | + }, |
| 62 | + }; |
| 63 | +} |
| 64 | +
|
| 65 | +export type ILocaleKeys = ReturnType<typeof LocaleKeys>; |
| 66 | +" |
| 67 | +`; |
| 68 | +
|
| 69 | +exports[`data interpolation single quote snapshot 1`] = ` |
| 70 | +"/* eslint-disable */ |
| 71 | +/* tslint:disable */ |
| 72 | +export function LocaleKeys<R extends string>(t: (...args: unknown[]) => R) { |
| 73 | + return { |
| 74 | + common: { |
| 75 | + loggedIn: { |
| 76 | + message: (data: Record<'username', unknown>) => t('common.loggedIn.message', data), /* Hey, {username}, you have successfully logged in! */ |
| 77 | + }, |
| 78 | + }, |
| 79 | + readingWarning: (data: Record<'reader' | 'writer', unknown>) => t('readingWarning', data), /* {reader} reads message from {writer} */ |
| 80 | + }; |
| 81 | +} |
| 82 | +
|
| 83 | +export type ILocaleKeys = ReturnType<typeof LocaleKeys>; |
| 84 | +" |
| 85 | +`; |
| 86 | +
|
| 87 | +exports[`flat data snapshot 1`] = ` |
| 88 | +"/* eslint-disable */ |
| 89 | +/* tslint:disable */ |
| 90 | +export function LocaleKeys<R extends string>(t: (...args: unknown[]) => R) { |
| 91 | + return { |
| 92 | + common: { |
| 93 | + cancel: () => t('common.cancel'), /* Cancel */ |
| 94 | + }, |
| 95 | + model: { |
| 96 | + player: { |
| 97 | + name: () => t('model.player.name'), /* Name */ |
| 98 | + }, |
| 99 | + }, |
| 100 | + }; |
| 101 | +} |
| 102 | +
|
| 103 | +export type ILocaleKeys = ReturnType<typeof LocaleKeys>; |
| 104 | +" |
| 105 | +`; |
| 106 | +
|
| 107 | +exports[`nested data snapshot 1`] = ` |
| 108 | +"/* eslint-disable */ |
| 109 | +/* tslint:disable */ |
| 110 | +export function LocaleKeys<R extends string>(t: (...args: unknown[]) => R) { |
| 111 | + return { |
| 112 | + common: { |
| 113 | + create: () => t('common.create'), /* Create */ |
| 114 | + }, |
| 115 | + model: { |
| 116 | + user: { |
| 117 | + id: () => t('model.user.id'), /* ID */ |
| 118 | + }, |
| 119 | + }, |
| 120 | + }; |
| 121 | +} |
| 122 | +
|
| 123 | +export type ILocaleKeys = ReturnType<typeof LocaleKeys>; |
| 124 | +" |
| 125 | +`; |
0 commit comments