Localization of actions (#9934)

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
Félix Malfait
2025-01-30 17:00:35 +01:00
committed by GitHub
parent 385bf591cf
commit 9ec524213c
49 changed files with 3391 additions and 1311 deletions

View File

@ -1,16 +1,17 @@
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
import { t } from '@lingui/core/macro';
export const getEmptyStateSubTitle = (
objectNameSingular: string,
objectLabel: string,
) => {
if (objectNameSingular === CoreObjectNameSingular.WorkflowVersion) {
return 'Create a workflow and return here to view its versions';
return t`Create a workflow and return here to view its versions`;
}
if (objectNameSingular === CoreObjectNameSingular.WorkflowRun) {
return 'Run a workflow and return here to view its executions';
return t`Run a workflow and return here to view its executions`;
}
return `Use our API or add your first ${objectLabel} manually`;
return t`Use our API or add your first ${objectLabel} manually`;
};

View File

@ -1,16 +1,17 @@
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
import { t } from '@lingui/core/macro';
export const getEmptyStateTitle = (
objectNameSingular: string,
objectLabel: string,
) => {
if (objectNameSingular === CoreObjectNameSingular.WorkflowVersion) {
return 'No workflow versions yet';
return t`No workflow versions yet`;
}
if (objectNameSingular === CoreObjectNameSingular.WorkflowRun) {
return 'No workflow runs yet';
return t`No workflow runs yet`;
}
return `Add your first ${objectLabel}`;
return t`Add your first ${objectLabel}`;
};