Skip to content

Commit

Permalink
Fix typescript errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette committed Feb 2, 2025
1 parent 3fd8e7f commit 931141d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/sprinkle-core/app/assets/stores/useTranslator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ export const useTranslator = defineStore(
return DateTime.fromISO(date).setLocale(config.value.dates)
}

function getMessageFromKey(key: string, placeholders: string | number | object): string {
function getMessageFromKey(
key: string,
placeholders: string | number | Record<string, any>
): string {
// Return direct match
if (dictionary.value[key] !== undefined) {
return dictionary.value[key]
Expand Down Expand Up @@ -138,7 +141,7 @@ export const useTranslator = defineStore(

function replacePlaceholders(
message: string,
placeholders: string | number | object
placeholders: string | number | Record<string, any>
): string {
// If placeholders is not an object at this point, we make it an object, using `plural` as the key
if (typeof placeholders !== 'object') {
Expand Down Expand Up @@ -188,7 +191,7 @@ export const useTranslator = defineStore(
}

function getPluralForm(pluralValue: number): string {
// TODO
return '' // TODO
}

/**
Expand Down

0 comments on commit 931141d

Please sign in to comment.