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

Locales use "fr-FR" format, just "fr" doesn't work #9273

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
10 changes: 5 additions & 5 deletions docs/defining-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ For example,

```typescript-ignore
//% block="square $x"
//% block.loc.fr="$x au carré"
//% block.loc.fr-FR="$x au carré"
export function square(x: number): number {}
```

Expand All @@ -137,9 +137,9 @@ PARAM.loc.LOCALE = parameter jsdoc
@param x the number to square
**/
//% block="square $x"
//% block.loc.fr="$x au carré"
//% jsdoc.loc.fr="Calcule le carré de x"
//% x.loc.fr="le nombre"
//% block.loc.fr-FR="$x au carré"
//% jsdoc.loc.fr-FR="Calcule le carré de x"
//% x.loc.fr-FR="le nombre"
export function square(x: number): number {}
```

Expand Down Expand Up @@ -896,4 +896,4 @@ A few tips gathered while designing various APIs for the Block Editor.
* **Anything that snaps together will be tried by the user**: your runtime should deal with invalid input with graceful degradation rather than abrupt crashes.
Some users will try to snap anything together - get ready for it.
* **OO is cumbersome** in blocks: we recommend using a C-like APIs -- just function -- rather than OO classes. It maps better to blocks.
* **Keep the number of blocks small**: there's only so much space in the toolbox. Be specific about each API you want to see in blocks.
* **Keep the number of blocks small**: there's only so much space in the toolbox. Be specific about each API you want to see in blocks.