@pyreon/i18n 0.11.5 → 0.11.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import "@happy-dom/global-registrator"
1
+ import '@happy-dom/global-registrator'
package/src/trans.tsx CHANGED
@@ -1,5 +1,5 @@
1
- import type { Props, VNode } from "@pyreon/core"
2
- import type { InterpolationValues } from "./types"
1
+ import type { Props, VNode } from '@pyreon/core'
2
+ import type { InterpolationValues } from './types'
3
3
 
4
4
  const TAG_RE = /<(\w+)>([^<]*)<\/\1>/g
5
5
 
@@ -96,10 +96,10 @@ export function Trans(props: TransProps): VNode | string {
96
96
  const parts = parseRichText(translated)
97
97
 
98
98
  // If the result is a single plain string, return it directly
99
- if (parts.length === 1 && typeof parts[0] === "string") return parts[0]
99
+ if (parts.length === 1 && typeof parts[0] === 'string') return parts[0]
100
100
 
101
101
  const children = parts.map((part) => {
102
- if (typeof part === "string") return part
102
+ if (typeof part === 'string') return part
103
103
  const component = props.components![part.tag]
104
104
  // Unmatched tags: render children as plain text (no raw HTML markup)
105
105
  if (!component) return part.children
package/src/types.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Computed, Signal } from "@pyreon/reactivity"
1
+ import type { Computed, Signal } from '@pyreon/reactivity'
2
2
 
3
3
  /** A nested dictionary of translation strings. */
4
4
  export type TranslationDictionary = {