Translate spare words (#41)

* fr: add 02-01-svelte-components doc (#9)

* fr: add 02-01-svelte-components doc

* fr: fix store link

* fr: add writable glossary entry

* fr: add 02-02-basic-markup doc

* fr: fix links

* fr: add 02-03-logic-blocks doc

* fix: links

---------

Co-authored-by: Romain Crestey <romain.crestey@radiofrance.com>

* Translate spare words

* Update sites/svelte.dev/src/routes/(authed)/repl/embed/+page.svelte

* Update sites/svelte.dev/src/routes/examples/[slug]/+page.svelte

* Update sites/svelte.dev/src/routes/tutorial/[slug]/+page.svelte

* fix: keep slogan in vo

---------

Co-authored-by: Romain l'Ourson <rcrestey@gmail.com>
Co-authored-by: Romain Crestey <romain.crestey@radiofrance.com>
pull/9156/head
Maxime Dupont 3 years ago committed by Romain Crestey
parent 1c1c648d48
commit d01b609aa8

@ -86,9 +86,6 @@ Un élément ou un composant peut avoir plusieurs attributs décomposés, parsem
<Widget {...things} />
```
`$$props` references all props that are passed to a component, including ones that are not declared with `export`. Using `$$props` will not perform as well as references to a specific prop because changes to any prop will cause Svelte to recheck all usages of `$$props`. But it can be useful in some cases for example, when you don't know at compile time what props might be passed to a component.
La variable `$$props` référence toutes les props qui sont fournies à un composant, y compris celles qui ne sont pas déclarées avec `export`. Utiliser `$$props` ne sera pas aussi performant qu'utiliser une <span class="vo">[prop](/docs/sveltejs#props)</span> spécifique directement car les changements de n'importe quelle prop vont déclencher une nouvelle vérification de toutes les occurences de `$$props`. Toutefois `$$props` peut être utile dans certains cas — par exemple, lorsque vous ne savez pas à la compilation quelles props peuvent être passées au composant.
```svelte

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en" class="theme-default typo-default">
<html lang="fr" class="theme-default typo-default">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />

@ -12,15 +12,15 @@ const o = {
export const ago = (nd, s) => {
var r = Math.round,
dir = ' ago',
dir = 'il y a ',
pl = function (v, n) {
return s === undefined ? n + ' ' + v + (n > 1 ? 's' : '') + dir : n + v.substring(0, 1);
return s === undefined ? dir + n + ' ' + v + (n > 1 ? 's' : '') : n + v.substring(0, 1);
},
ts = Date.now() - new Date(nd).getTime(),
ii;
if (ts < 0) {
ts *= -1;
dir = ' from now';
dir = 'dans ';
}
for (var i in o) {
if (r(ts) < o[i]) return pl(ii || 'm', r(ts / (o[ii] || 1)));

@ -14,9 +14,9 @@
async function destroy_selected() {
const confirmed = confirm(
`Are you sure you want to delete ${selected.length} ${
selected.length === 1 ? 'app' : 'apps'
}?`
`Êtes vous sûr.e de vouloir supprimer ${selected.length} ${
selected.length === 1 ? 'application' : 'applications'
} ?`
);
if (!confirmed) return;
@ -40,7 +40,7 @@
// TODO raise an issue
// location.reload();
} else {
alert('Deletion failed');
alert('La suppression a échoué');
}
destroying = false;
@ -51,13 +51,13 @@
</script>
<svelte:head>
<title>Your apps • Svelte</title>
<title>Vos applications • Svelte</title>
</svelte:head>
<div class="apps">
{#if data.user}
<header>
<h1>Your apps</h1>
<h1>Vos applications</h1>
<div class="user">
<img
class="avatar"
@ -66,7 +66,7 @@
/>
<span>
{data.user.github_name || data.user.github_login}
(<a on:click|preventDefault={logout} href="/auth/logout">log out</a>)
(<a on:click|preventDefault={logout} href="/auth/logout">Se déconnecter</a>)
</span>
</div>
</header>
@ -75,11 +75,11 @@
{#if selected.length > 0}
<button class="delete" on:click={() => destroy_selected()} disabled={destroying}>
<Icon name="delete" />
Delete {selected.length}
{selected.length === 1 ? 'app' : 'apps'}
Supprimer {selected.length}
{selected.length === 1 ? 'application' : 'applications'}
</button>
<button on:click={() => (selected = [])}>Clear selection</button>
<button on:click={() => (selected = [])}>Désélectionner les applications</button>
{:else}
<form
on:submit|preventDefault={(e) => {
@ -89,8 +89,8 @@
>
<input
type="search"
placeholder="Search"
aria-label="Search"
placeholder="Chercher"
aria-label="Chercher"
name="search"
value={data.search}
/>
@ -104,12 +104,12 @@
<li class:selected={selected.includes(gist.id)}>
<a href={selecting ? undefined : `/repl/${gist.id}`}>
<h2>{gist.name}</h2>
<span>updated {format(gist.updated_at || gist.created_at)}</span>
<span>Mis à jour {format(gist.updated_at || gist.created_at)}</span>
</a>
<label>
<input
aria-label="Select for delection"
aria-label="Sélectionner pour suppression"
type="checkbox"
bind:group={selected}
value={gist.id}
@ -125,16 +125,17 @@
<a
href="/apps?offset={data.next}{data.search
? `&search=${encodeURIComponent(data.search)}`
: ''}">Next page...</a
: ''}">Page suivante...</a
>
{/if}
</div>
{:else}
<p>No apps here. <a href="/repl">Go make one!</a></p>
<p>Vous n'avez pas d'application. <a href="/repl">En créer une !</a></p>
{/if}
{:else}
<p>
Please <a on:click|preventDefault={login} href="/auth/login">log in</a> to see your saved apps.
Merci de <a on:click|preventDefault={login} href="/auth/login">vous connecter</a> pour voir vos
applications sauvegardées.
</p>
{/if}
</div>

@ -69,8 +69,8 @@
<title>{name} • REPL • Svelte</title>
<meta name="twitter:title" content="{data.gist.name} • REPL • Svelte" />
<meta name="twitter:description" content="Cybernetically enhanced web apps" />
<meta name="Description" content="Interactive Svelte playground" />
<meta name="twitter:description" content="Applications web cybernétiquement améliorées" />
<meta name="Description" content="Bac à sable Svelte interactif" />
</svelte:head>
<div class="repl-outer {zen_mode ? 'zen-mode' : ''}">

@ -82,7 +82,7 @@
if (navigator.onLine) {
alert(err.message);
} else {
alert(`It looks like you're offline! Find the internet and try again`);
alert(`Vous semblez être hors ligne ! Connectez-vous et réessayez`);
}
}
@ -91,7 +91,7 @@
async function save() {
if (!user) {
alert('Please log in before saving your app');
alert('Merci de vous connecter pour sauvegarder votre application');
return;
}
if (saving) return;
@ -137,7 +137,7 @@
if (navigator.onLine) {
alert(err.message);
} else {
alert(`It looks like you're offline! Find the internet and try again`);
alert('Merci de vous connecter pour sauvegarder votre application');
}
}
@ -192,7 +192,7 @@ export default app;`
<input bind:value={name} on:focus={(e) => e.target.select()} use:enter={(e) => e.target.blur()} />
<div class="buttons">
<button class="icon" on:click={() => (zen_mode = !zen_mode)} title="fullscreen editor">
<button class="icon fullscreen" on:click={() => (zen_mode = !zen_mode)} title="Plein écran">
{#if zen_mode}
<Icon name="close" />
{:else}
@ -200,7 +200,12 @@ export default app;`
{/if}
</button>
<button class="icon" disabled={downloading} on:click={download} title="download zip file">
<button
class="icon"
disabled={downloading}
on:click={download}
title="Télécharger le fichier zip"
>
<Icon name="download" />
</button>
@ -212,7 +217,7 @@ export default app;`
{/if}
</button>
<button class="icon" disabled={saving || !user} on:click={save} title="save">
<button class="icon" disabled={saving || !user} on:click={save} title="Sauvegarder">
{#if justSaved}
<Icon name="check" />
{:else}
@ -228,7 +233,7 @@ export default app;`
{:else}
<button class="icon" on:click|preventDefault={login}>
<Icon name="log-in" />
<span>&nbsp;Log in to save</span>
<span>&nbsp;Se connecter pour sauvegarder</span>
</button>
{/if}
</div>
@ -279,7 +284,7 @@ export default app;`
opacity: 0.3;
}
.icon[title^='fullscreen'] {
.icon.fullscreen {
display: none;
}
@ -324,7 +329,7 @@ export default app;`
}
@media (min-width: 600px) {
.icon[title^='fullscreen'] {
.icon.fullscreen {
display: inline;
}

@ -30,8 +30,8 @@
{#if showMenu}
<div class="menu">
<a href="/apps">Your saved apps</a>
<button on:click={logout}>Log out</button>
<a href="/apps">Vos applications sauvegardées</a>
<button on:click={logout}>Se déconnecter</button>
</div>
{/if}
</div>

@ -8,9 +8,9 @@
<svelte:head>
<title>REPL • Svelte</title>
<meta name="twitter:title" content="Svelte REPL" />
<meta name="twitter:title" content="REPL • Svelte" />
<meta name="twitter:description" content="Cybernetically enhanced web apps" />
<meta name="Description" content="Interactive Svelte playground" />
<meta name="Description" content="Bac à sable Svelte interactif" />
</svelte:head>
<div class="repl-outer">

@ -17,8 +17,8 @@
<title>{data.page?.title} • Docs • Svelte</title>
<meta name="twitter:title" content="{data.page.title} • Docs • Svelte" />
<meta name="twitter:description" content="{data.page.title}Svelte documentation" />
<meta name="Description" content="{data.page.title}Svelte documentation" />
<meta name="twitter:description" content="{data.page.title}Documentation Svelte " />
<meta name="Description" content="{data.page.title}Documentation Svelte" />
</svelte:head>
<div class="text" id="docs-content">

@ -32,12 +32,12 @@
<svelte:head>
<title>{data.example?.title} {data.example?.title ? '•' : ''} Svelte Examples</title>
<meta name="twitter:title" content="Svelte examples" />
<meta name="twitter:title" content="Exemples Svelte" />
<meta name="twitter:description" content="Cybernetically enhanced web apps" />
<meta name="Description" content="Interactive example Svelte apps" />
<meta name="Description" content="Exemples Svelte interactifs" />
</svelte:head>
<h1 class="visually-hidden">Examples</h1>
<h1 class="visually-hidden">Exemples</h1>
<div class="examples-container" bind:clientWidth={width}>
<div class="viewport offset-{offset}">
<TableOfContents

@ -46,13 +46,13 @@ async function get_nav_list() {
return [
{
title: 'Docs',
title: 'Documentation',
prefix: 'docs',
pathname: '/docs/introduction',
sections: processed_docs_list
},
{
title: 'Examples',
title: 'Exemples',
prefix: 'examples',
pathname: '/examples',
sections: processed_examples_list

@ -5,13 +5,13 @@
</script>
<svelte:head>
<title>Search • Svelte</title>
<title>Rechercher • Svelte</title>
</svelte:head>
<main>
<h1>Search</h1>
<h1>Rechercher</h1>
<form>
<input name="q" value={data.query} placeholder="Search" spellcheck="false" />
<input name="q" value={data.query} placeholder="Rechercher" spellcheck="false" />
</form>
<SearchResults results={data.results} query={data.query} />

@ -100,7 +100,7 @@
<svelte:head>
<title>{selected.section.title} / {selected.chapter.title} • Svelte Tutorial</title>
<meta name="twitter:title" content="Svelte tutorial" />
<meta name="twitter:title" content="Tutoriel Svelte" />
<meta name="twitter:description" content="{selected.section.title} / {selected.chapter.title}" />
<meta name="Description" content="{selected.section.title} / {selected.chapter.title}" />
</svelte:head>
@ -122,17 +122,17 @@
<!-- TODO disable this button when the contents of the REPL
matches the expected end result -->
<button class="show" on:click={() => (completed ? reset() : complete())}>
{completed ? 'Reset' : 'Show me'}
{completed ? 'Réinitialiser' : 'Montrez-moi'}
</button>
{/if}
{#if selected.next}
<a class="next" href="/tutorial/{selected.next.slug}">Next</a>
<a class="next" href="/tutorial/{selected.next.slug}">Suivant</a>
{/if}
</div>
<div class="improve-chapter">
<a class="no-underline" href={improve_link}>Edit this chapter</a>
<a class="no-underline" href={improve_link}>Éditer ce chapitre</a>
</div>
</div>
</div>

Loading…
Cancel
Save