feat(SW-706): add Lokalise tooling and codemod
This commit is contained in:
16
apps/scandic-web/types/intl.d.ts
vendored
Normal file
16
apps/scandic-web/types/intl.d.ts
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
// import type { MessageDescriptor } from "@formatjs/intl"
|
||||
|
||||
// Module augmentation
|
||||
declare module "@formatjs/intl" {
|
||||
// We are unable to override description field on MessageDescriptor from formatjs.
|
||||
// Module augmentation does not allow for that. But we leave it here for reference.
|
||||
// Instead we export our own LokaliseMessageDescriptor and use that where we control the code.
|
||||
// For example in our custom formatter in i18n/formatter.ts
|
||||
// interface MessageDescriptor {
|
||||
// description?: {
|
||||
// context?: string
|
||||
// limit?: number
|
||||
// tags?: string[]
|
||||
// }
|
||||
// }
|
||||
}
|
||||
10
apps/scandic-web/types/intl.ts
Normal file
10
apps/scandic-web/types/intl.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import type { MessageDescriptor } from "@formatjs/intl"
|
||||
|
||||
export interface LokaliseMessageDescriptor
|
||||
extends Omit<MessageDescriptor, "description"> {
|
||||
description: {
|
||||
context?: string
|
||||
limit?: number
|
||||
tags?: string
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user