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

Add translation tag in the about dialog to update the app. #6775

Merged
merged 3 commits into from
Jul 15, 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
29 changes: 20 additions & 9 deletions newIDE/app/src/MainFrame/UpdaterTools.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const getElectronUpdateNotificationTitle = (
updateStatus: ElectronUpdateStatus
) => {
if (updateStatus.status === 'update-available')
return 'A new update is available!';
return <Trans>A new update is available!</Trans>;

return '';
};
Expand All @@ -29,27 +29,38 @@ export const getElectronUpdateNotificationBody = (
updateStatus: ElectronUpdateStatus
) => {
if (updateStatus.status === 'update-available')
return 'It will be downloaded and installed automatically (unless you deactivated this in preferences)';
return (
<Trans>
It will be downloaded and installed automatically (unless you
deactivated this in preferences)
</Trans>
);

return '';
};

export const getElectronUpdateStatusLabel = (status: string) => {
if (status === 'checking-for-update') return 'Checking for update...';
if (status === 'update-available') return 'A new update is available!';
if (status === 'checking-for-update')
return <Trans>Checking for update...</Trans>;
if (status === 'update-available')
return <Trans>A new update is available!</Trans>;
if (status === 'update-not-available')
return "No update available. You're using the latest version!";
if (status === 'error') return 'Error while checking update';
return <Trans>No update available. You're using the latest version!</Trans>;
if (status === 'error') return <Trans>Error while checking update</Trans>;
if (status === 'download-progress')
return 'A new update is being downloaded...';
return <Trans>A new update is being downloaded...</Trans>;
if (status === 'update-downloaded')
return 'A new update will be installed after you quit and relaunch GDevelop';
return (
<Trans>
A new update will be installed after you quit and relaunch GDevelop
</Trans>
);
return '';
};

export const getElectronUpdateButtonLabel = (status: string) => {
if (status === 'update-available') return 'Update GDevelop to latest version';
return 'Check again for new updates';
return <Trans>Check again for new updates</Trans>;
};

export const canDownloadElectronUpdate = (status: string) => {
Expand Down
Loading