Repository: 4ian/GDevelop
File: newIDE/app/src/GameDashboard/GameDashboardCard.js (JavaScript)

Code before:
          // Delete actions.
          // Don't allow removing project if opened, as it would not result in any change in the list.
          // (because an opened project is always displayed)
          if (isCurrentProjectOpened || projectsList.length > 1) {
            // No delete action possible.
          } else {
            if (actions.length > 0) {
              actions.push({
                type: 'separator',
              });
            }

            actions.push({
              label: i18n._(t`Delete`),
              click: async () => {
                // Extract word translation to ensure it is not wrongly translated in the sentence.
                const translatedConfirmText = i18n._(t`delete`);

                const hasPlayerMessage = countOfSessionsLastWeek
                  ? t`${countOfSessionsLastWeek} views on the last 7 days`
                  : t`No players`;
                const hasBeenPublished = isPublishedOnGdGames
                  ? t`Is published on gd.games`
                  : t`Not published`;

                const message = t`You're deleting a game that has:${'\n\n'}
                    - ${i18n._(hasPlayerMessage)}
                    ${'\n'}
                    - ${i18n._(hasBeenPublished)}
                    ${'\n\n'}
                    If you continue the game and this project will be deleted.${'\n\n'}
                    This action is irreversible. Do you want to continue?`;

                const answer = await showDeleteConfirmation({
                  title: t`Delete game`,
                  header: (
                    <GameThumbnail
                      gameName={gameName || 'unknown game'}
                      gameId={game ? game.id : undefined}
                      thumbnailUrl={gameThumbnailUrl}
                      background="light"
                      width={getThumbnailWidth({ isMobile })}
                    />
                  ),
                  message: message,

                  confirmButtonLabel: t`Delete game`,
                  fieldMessage: t`To confirm, type "${translatedConfirmText}"`,
                  confirmText: translatedConfirmText,
                });
                if (!answer) return;

Review comment (suggestion):
I would change the text because here you can have a case: 

`You're deleting a game that has: ... - is published`

I would suggest:

`You're deleting a game which: - has x views... - is published...`



Code after:
          // (because an opened project is always displayed)
          if (isCurrentProjectOpened || projectsList.length > 1) {
            // No delete action possible.
          } else {
            if (actions.length > 0) {
              actions.push({
                type: 'separator',
              });
            }

            actions.push({
              label: i18n._(t`Delete`),
              click: async () => {
                // Extract word translation to ensure it is not wrongly translated in the sentence.
                const translatedConfirmText = i18n._(t`delete`);

                const hasBeenPublished = isPublishedOnGdGames
                  ? t`Is published on gd.games`
                  : t`Is not published on gd.games`;
                const hasPlayerMessage = countOfSessionsLastWeek
                  ? t`Had ${countOfSessionsLastWeek} players in the last week`
                  : t`Had no players in the last week`;

                const message = t`You're deleting a game which:${'\n\n'}
                  - ${i18n._(hasBeenPublished)}
                    ${'\n'}
                  - ${i18n._(hasPlayerMessage)}
                    ${'\n\n'}
                    If you continue, the game and this project will be deleted.${'\n\n'}
                    This action is irreversible. Do you want to continue?`;

                const answer = await showDeleteConfirmation({
                  title: t`Delete ${gameName}`,
                  header: renderThumbnail(),
                  message: message,

                  confirmButtonLabel: t`Delete game`,
                  fieldMessage: t`To confirm, type "${translatedConfirmText}"`,
                  confirmText: translatedConfirmText,
                });
                if (!answer) return;

                // If the game is registered, unregister it.
                // If it fails, this will throw, to prevent deleting a game with leaderboards or not owned.
                if (game) {
                  try {
                    await onUnregisterGame();
                  } catch (error) {
                    console.error('Unable to unregister the game.', error);
                    // Alert is handled by onUnregisterGame. Just ensure we don't continue.
                    return;