Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.3.0] - 2025-11-23
## [0.2.2] - 2025-11-24

### Changed
- Updated the values parameter type of TranslationEntries to be more specific as a `Record<string, unkown>` rather than a `object`

## [0.2.1] - 2025-11-23

### Added
- Added error logging and catching
Expand Down
7 changes: 3 additions & 4 deletions examples/translations/translations.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// AUTO-GENERATED. DO NOT EDIT.
/* eslint-disable @stylistic/quote-props */
/* eslint-disable no-useless-escape */
/* eslint-disable @typescript-eslint/no-unused-vars */
import type { Translation } from '@helpwave/internationalization'
import { TranslationGen } from '@helpwave/internationalization'

import type { Translation } from 'src/index'
import { TranslationGen } from 'src/index'

export const exampleTranslationLocales = ['de-DE', 'en-US', 'fr-FR'] as const

Expand Down Expand Up @@ -214,4 +214,3 @@ export const exampleTranslation: Translation<ExampleTranslationLocales, Partial<
'yes': `Oui`
}
}

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"url": "git+https://github.com/helpwave/internationlization.git"
},
"license": "MPL-2.0",
"version": "0.2.1",
"version": "0.2.2",
"type": "module",
"files": [
"dist"
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export type TranslationEntry = string | ((values: object) => string)
export type TranslationEntry = string | ((values: Record<string, unknown>) => string)

export type TranslationEntries = Record<string, TranslationEntry>

Expand Down