Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generator: Use the Label type for translations #434

Merged
merged 1 commit into from
Apr 9, 2024
Merged
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
13 changes: 5 additions & 8 deletions packages/evolution-generator/src/types/inputTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@ export type Labels = {
}[];
type Choice = {
value: string | number | boolean;
label: {
fr: string;
en: string;
};
label: Label;
iconPath?: string;
conditional?: Conditional;
};
Expand All @@ -59,7 +56,7 @@ export type NameFunction = (groupedObject, sequence, interview) => string;
export type HelpPopup = {
containsHtml?: ContainsHtml;
title: Title;
content: { fr: string; en: string };
content: Label;
};
type DefaultCenter = {
lat: number;
Expand Down Expand Up @@ -242,10 +239,10 @@ export type InputButton = InputButtonBase & {
label: Label;
confirmPopup?: {
shortname: string;
content: { fr: (interview, path) => string; en: (interview, path) => string };
content: Label;
showConfirmButton?: boolean;
cancelButtonColor?: 'blue' | 'green';
cancelButtonLabel?: { fr: string; en: string };
cancelButtonLabel?: Label;
conditional?: Conditional;
};
size?: Size;
Expand Down Expand Up @@ -274,7 +271,7 @@ export type Group = {
path: Path;
groupShortname: string;
shortname: string;
groupName: { fr: string; en: string };
groupName: Label;
name: { fr: NameFunction; en: NameFunction };
filter?: (interview, groupedObjects) => any;
conditional?: Conditional;
Expand Down
Loading