Skip to content

Commit 2a0b95f

Browse files
author
Miguel Camba
committed
Translate paragraphs
1 parent 35052c8 commit 2a0b95f

File tree

5 files changed

+16
-5
lines changed

5 files changed

+16
-5
lines changed

locales/en.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@
6969
"icu-crash-course.table-cells.time": "Your doctor's appointment is today at {appointment, time, short}",
7070
"icu-crash-course.subsection.number": "Numbers",
7171
"icu-crash-course.paragraph.number": "Formats a number according to the rules of the current locale.",
72+
"icu-crash-course.paragraph.number-2": "There's also an advanced feature called <strong id='crash-course-number-skeletons' class='font-semibold text-primary'>Number Skeletons</strong> that allow you to customize to great lengths how you want your numbers formatted.",
73+
"icu-crash-course.paragraph.number-3": "The possibilities of number skeletons are limitless.",
7274
"icu-crash-course.table-cells.number": "Your account balance is {num, number}",
7375
"icu-crash-course.table-cells.skeletonCurrency": "Your account balance is {num, number, ::currency/EUR}",
7476
"icu-crash-course.table-cells.skeletonCurrencySigned": "Your account balance is {num, number, ::currency/EUR sign-always}",
@@ -141,6 +143,8 @@
141143
"configuration.paragraph.custom-formats-1": "This library can format numbers, dates and times. It does it without adding significant weight to your app by leveraging the Intl API already present in all modern browsers and in Node.js.<br/>By default you app can use these formats, but you can add your own.",
142144
"configuration.paragraph.custom-formats-2": "If you want to define your own formats pass them on initialization using the",
143145
"configuration.paragraph.custom-formats-3": "option, which will be deep merged with the default formats listed above. The formats must be valid options to forward to",
146+
"configuration.paragraph.custom-formats-4": "For numbers specifically you can register your own formats like that or you can use Number Skeletons as a more flexible way of customizing every single aspect of how numbers are rendered. Check the crash course",
147+
"configuration.paragraph.custom-formats-5": "here",
144148

145149
"usage.title": "Usage",
146150
"usage.paragraph.preface-1": "The runtime API of this library is mostly taken from the great",

locales/es.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@
6969
"icu-crash-course.table-cells.time": "Your doctor's appointment is today at {appointment, time, short}",
7070
"icu-crash-course.subsection.number": "Números",
7171
"icu-crash-course.paragraph.number": "Formatea un número de acuerdo a las reglas del idioma seleccionado.",
72+
"icu-crash-course.paragraph.number-2": "También hay una funcionalidad avanzada llamada <strong id='crash-course-number-skeletons' class='font-semibold text-primary'>Number Skeletons</strong> que te permite personalizar hasta el extremo cómo quieres que los números se formateen.",
73+
"icu-crash-course.paragraph.number-3": "Las posibilidades de los number skeleton son ilimitadas.",
7274
"icu-crash-course.table-cells.number": "Your account balance is {num, number}",
7375
"icu-crash-course.table-cells.skeletonCurrency": "Your account balance is {num, number, ::currency/EUR}",
7476
"icu-crash-course.table-cells.skeletonCurrencySigned": "Your account balance is {num, number, ::currency/EUR sign-always}",

locales/gl.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@
6767
"icu-crash-course.table-cells.time": "Your doctor's appointment is today at {appointment, time, short}",
6868
"icu-crash-course.subsection.number": "Números",
6969
"icu-crash-course.paragraph.number": "Formatea un número de acordo as regras do idioma seleccionado.",
70+
"icu-crash-course.paragraph.number-2": "Tamén hay unha funcionalidade avanzada chamada <strong id='crash-course-number-skeletons' class='font-semibold text-primary'>Number Skeletons</strong> que permite personalizar ata o extremo cómo queres que os números sexan formateados.",
71+
"icu-crash-course.paragraph.number-3": "As posibilidades dos number skeleton son ilimitadas.",
7072
"icu-crash-course.table-cells.number": "Your account balance is {num, number}",
7173
"icu-crash-course.table-cells.skeletonCurrency": "Your account balance is {num, number, ::currency/EUR}",
7274
"icu-crash-course.table-cells.skeletonCurrencySigned": "Your account balance is {num, number, ::currency/EUR sign-always}",

src/routes/[...lang]/docs/configuration.svelte

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
export const prerender = true;
33
</script>
44
<script lang="ts">
5-
import { t } from 'svelte-intl-precompile';
5+
import { t, locale } from 'svelte-intl-precompile';
66
import scrollToHash from '$lib/scroll-to-hash';;
77
import CodeInline from '$lib/CodeInline.svelte';
88
import Codeblock from '$lib/Codeblock.svelte';
@@ -194,4 +194,6 @@ addMessages('es', es);
194194
'just-hour': { hour: 'numeric' }
195195
}
196196
}
197-
});`}</Codeblock>
197+
});`}</Codeblock>
198+
199+
<p>{$t('configuration.paragraph.custom-formats-4')} <a href="/{$locale}/docs/icu-crash-course#crash-course-number-skeletons" class="text-primary underline">{$t('configuration.paragraph.custom-formats-5')}</a></p>

src/routes/[...lang]/docs/icu-crash-course.svelte

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@
261261
</tbody>
262262
</table>
263263

264-
<h2 class="text-2xl font-semibold">{$t('icu-crash-course.subsection.number')}</h2>
264+
<h2 class="text-2xl font-semibold" id="crash-course-numbers">{$t('icu-crash-course.subsection.number')}</h2>
265265

266266
<p>{$t('icu-crash-course.paragraph.number')}</p>
267267

@@ -286,7 +286,7 @@
286286
</tbody>
287287
</table>
288288

289-
<p>There's also an advanced feature called number skeletons that allow you to customize to great lengths how you want your numbers formatted</p>
289+
<p>{@html $t('icu-crash-course.paragraph.number-2')}</p>
290290

291291
<table class="table-auto w-full text-left">
292292
<thead>
@@ -381,4 +381,5 @@
381381
</tbody>
382382
</table>
383383

384-
<p>The possibilities of number skeletons are limitless.</p>
384+
<p>The possibilities of number skeletons are limitless.</p>
385+
<p>{$t('icu-crash-course.paragraph.number-3')}</p>

0 commit comments

Comments
 (0)