@schematichq/schematic-components 2.30.0 → 2.31.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -219,8 +219,8 @@ to change that:
219
219
  <EmbedProvider
220
220
  accessToken={accessToken}
221
221
  i18n={i18next}
222
- translations={{ it: schematicIt }}
223
- locale="it-IT"
222
+ translations={{ de: schematicDe }}
223
+ locale="de-DE"
224
224
  >
225
225
  ```
226
226
 
@@ -242,10 +242,10 @@ key and a `count`:
242
242
  ```ts
243
243
  import type { SchematicTranslations } from '@schematichq/schematic-components';
244
244
 
245
- export const schematicIt: SchematicTranslations = {
246
- 'Cancel subscription': 'Annulla abbonamento',
247
- 'Discount for months_one': '{{discount}} per il prossimo mese',
248
- 'Discount for months_other': '{{discount}} per i prossimi {{count, number}} mesi',
245
+ export const schematicDe: SchematicTranslations = {
246
+ 'Cancel subscription': 'Abonnement kündigen',
247
+ 'Discount for months_one': '{{discount}} für den nächsten Monat',
248
+ 'Discount for months_other': '{{discount}} für die nächsten {{count, number}} Monate',
249
249
  };
250
250
  ```
251
251
 
@@ -253,7 +253,7 @@ With an `i18n` instance, register the same bundle under the `schematic`
253
253
  namespace:
254
254
 
255
255
  ```ts
256
- i18next.addResourceBundle('it', 'schematic', schematicIt);
256
+ i18next.addResourceBundle('de', 'schematic', schematicDe);
257
257
  ```
258
258
 
259
259
  Passing both `i18n` and `translations` is unusual. If you do, the instance
@@ -270,6 +270,34 @@ bundle, so set them there in the language you need. In a language other than
270
270
  English, a name with no plural form set is shown as entered for every count,
271
271
  rather than with an English plural ending added.
272
272
 
273
+ ### Italian
274
+
275
+ The package includes an Italian bundle, `schematicTranslationsIt`:
276
+
277
+ ```tsx
278
+ import {
279
+ EmbedProvider,
280
+ schematicTranslationsIt,
281
+ } from '@schematichq/schematic-components';
282
+
283
+ <EmbedProvider
284
+ accessToken={accessToken}
285
+ translations={{ it: schematicTranslationsIt }}
286
+ locale="it-IT"
287
+ >
288
+ ```
289
+
290
+ It uses the informal "tu" and leaves "Add-on" and "Billing" in English. To
291
+ change a string, spread the bundle and override its key:
292
+
293
+ ```ts
294
+ const it = { ...schematicTranslationsIt, 'Cancel subscription': 'Disdici' };
295
+ ```
296
+
297
+ A string added to the components after the bundle was translated shows in
298
+ English until the bundle catches up. An app that never imports the bundle
299
+ doesn't carry it: bundlers drop it from the build.
300
+
273
301
  ## License
274
302
 
275
303
  MIT