microsoft / pxt-arcade

Arcade game editor based on Microsoft MakeCode
https://arcade.makecode.com
MIT License
484 stars 209 forks source link

The hint for step 11 of tutorial "Time Flies" is incorrect in Chinese #3675

Open Sheila111 opened 3 years ago

Sheila111 commented 3 years ago

Describe the bug The hint for step 11 of tutorial "Time Flies" is incorrect in Chinese

Steps to reproduce the behavior 1.Navigate to https://arcade.makecode.com/beta# 2.Change language to Chinese 3.教程----->Time Flies 4.Click step 11

Expect behavior It should be like this: image

Actual behavior The hint for step 11 of tutorial "Time Flies" is incorrect in Chinese. This step need us to drag game over . But the hint is game over. image

Additional context 1.OS: Windows(rs6) 2.arcade version: 1.5.27 3.Microsoft MakeCode version: 7.1.4

abchatra commented 3 years ago

I can reproduce this

abchatra commented 3 years ago

English is fine.

ganicke commented 3 years ago

@jwunderl - When I plug both English and Chinese block strings in for these with Playground I can make them work OK. Not sure why the Chinese game.over() block isn't displaying the toggle button with the Crowdin string.

image

//% color="#AA278D" weight=100
namespace hello {
    /**
     * Finish the game and display the score
     */
    //% group="Gameplay"
    //% blockId=gameOverA block="game over %win=toggleWinLose || with %effect effect"
    //% weight=80 help=game/over
    export function overA(win: boolean = false, effect?: effects.BackgroundEffect) {
    }

    /**
     * Finish the game and display the score
     */
    //% group="Gameplay"
    //% blockId=gameOverB block="游戏结束 %win=toggleWinLose || 附上 %effect 效果"
    //% weight=79 help=game/over
    export function overB(win: boolean = false, effect?: effects.BackgroundEffect) {
    }
}

The downloaded translation is this: "game.over|block":"游戏结束 %win=toggleWinLose || 附上 %effect 效果". This matches the Chinese block string I used in Playground, but...

The game.over() block in the game namespace category:

image

ganicke commented 3 years ago

Unassigning as this appears to not be a translation bug. This is failing somewhere in the render since the block string is correct - "game.over|block":"游戏结束 %win=toggleWinLose || 附上 %effect 效果".

Of note, (when expanded to force the toggle button to show) is that the zh-cn string for "LOSE" will overflow the area of the toggle button.

image

The block is behaving as if there are || before the %win=toggleWinLose and not as the received block string.