feat: add user defined translations (#1756)

* feat: add user defined translations

* add refetch key for translation (#1757)

---------

Co-authored-by: Alex Christoffer Rasmussen <ac@omnivox.dk>
This commit is contained in:
Carlos Valente
2025-09-03 16:06:03 +02:00
committed by GitHub
parent ae15f3cdc5
commit 8d2d8ef979
26 changed files with 431 additions and 129 deletions
@@ -6,4 +6,5 @@ export enum RefetchKey {
Rundown = 'rundown',
UrlPresets = 'url-presets',
ViewSettings = 'view-settings',
Translation = 'translation',
}
+4 -5
View File
@@ -16,11 +16,7 @@ export {
type TimeField,
SupportedEntry as SupportedEntry,
} from './definitions/core/OntimeEntry.js';
export type {
RundownEntries,
Rundown,
ProjectRundowns,
} from './definitions/core/Rundown.type.js';
export type { RundownEntries, Rundown, ProjectRundowns } from './definitions/core/Rundown.type.js';
export { TimeStrategy } from './definitions/TimeStrategy.type.js';
export { TimerType } from './definitions/TimerType.type.js';
@@ -131,3 +127,6 @@ export type { MaybeNumber, MaybeString } from './utils/utils.type.js';
// Colour
export type { RGBColour } from './definitions/Colour.type.js';
// Translations
export { langEn, type TranslationObject } from './translations/index.js';
+30
View File
@@ -0,0 +1,30 @@
export const langEn = {
'common.expected_finish': 'Expected Finish',
'common.minutes': 'min',
'common.now': 'Now',
'common.next': 'Next',
'common.scheduled_start': 'Scheduled start',
'common.scheduled_end': 'Scheduled end',
'common.expected_start': 'Expected start',
'common.expected_end': 'Expected end',
'common.stage_timer': 'Stage Timer',
'common.started_at': 'Started At',
'common.time_now': 'Time now',
'common.no_data': 'No data',
'countdown.ended': 'Event ended at',
'countdown.running': 'Event running',
'countdown.select_event': 'Select an event to follow',
'countdown.to_start': 'Time to start',
'countdown.waiting': 'Waiting for event start',
'countdown.overtime': 'in overtime',
'timeline.live': 'live',
'timeline.done': 'done',
'timeline.due': 'due',
'timeline.followedby': 'Followed by',
'project.title': 'Title',
'project.description': 'Description',
'project.info': 'Project Info',
'project.url': 'Project URL',
};
export type TranslationObject = Record<keyof typeof langEn, string>;