Skip to content

Commit f466baf

Browse files
fix(locales): add translations for some comment strings (#1764)
Co-authored-by: Nick the Sick <[email protected]>
1 parent 95a72b7 commit f466baf

File tree

25 files changed

+83
-12
lines changed

25 files changed

+83
-12
lines changed

packages/ariakit/src/comments/Comment.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import { Group as AriakitGroup } from "@ariakit/react";
22

33
import { assertEmpty } from "@blocknote/core";
4-
import { ComponentProps, useFocusWithin } from "@blocknote/react";
4+
import {
5+
ComponentProps,
6+
useDictionary,
7+
useFocusWithin,
8+
} from "@blocknote/react";
59
import { forwardRef, useState } from "react";
610

711
const AuthorInfo = forwardRef<
@@ -12,6 +16,7 @@ const AuthorInfo = forwardRef<
1216
>
1317
>((props, _ref) => {
1418
const { authorInfo, timeString, edited, ...rest } = props;
19+
const dict = useDictionary();
1520

1621
assertEmpty(rest, false);
1722

@@ -34,7 +39,7 @@ const AuthorInfo = forwardRef<
3439
<div className={"bn-ak-username"}>
3540
{authorInfo.username}
3641
<span>
37-
{timeString} {edited && "(edited)"}
42+
{timeString} {edited && `(${dict.comments.edited})`}
3843
</span>
3944
</div>
4045
</AriakitGroup>

packages/core/src/i18n/locales/ar.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,9 @@ export const ar: Dictionary = {
320320
},
321321
},
322322
comments: {
323+
edited: "تم التحرير",
324+
save_button_text: "حفظ",
325+
cancel_button_text: "إلغاء",
323326
actions: {
324327
add_reaction: "أضف تفاعلًا",
325328
resolve: "حل",

packages/core/src/i18n/locales/de.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,9 @@ export const de: Dictionary = {
334334
},
335335
},
336336
comments: {
337+
edited: "bearbeitet",
338+
save_button_text: "Speichern",
339+
cancel_button_text: "Abbrechen",
337340
actions: {
338341
add_reaction: "Reaktion hinzufügen",
339342
resolve: "Lösen",

packages/core/src/i18n/locales/en.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,9 @@ export const en = {
335335
},
336336
},
337337
comments: {
338+
edited: "edited",
339+
save_button_text: "Save",
340+
cancel_button_text: "Cancel",
338341
actions: {
339342
add_reaction: "Add reaction",
340343
resolve: "Resolve",

packages/core/src/i18n/locales/es.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,9 @@ export const es: Dictionary = {
333333
},
334334
},
335335
comments: {
336+
edited: "editado",
337+
save_button_text: "Guardar",
338+
cancel_button_text: "Cancelar",
336339
actions: {
337340
add_reaction: "Agregar reacción",
338341
resolve: "Resolver",

packages/core/src/i18n/locales/fr.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,9 @@ export const fr: Dictionary = {
359359
},
360360
},
361361
comments: {
362+
edited: "modifié",
363+
save_button_text: "Enregistrer",
364+
cancel_button_text: "Annuler",
362365
actions: {
363366
add_reaction: "Ajouter une réaction",
364367
resolve: "Résoudre",

packages/core/src/i18n/locales/hr.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,9 @@ export const hr: Dictionary = {
348348
},
349349
},
350350
comments: {
351+
edited: "uredio",
352+
save_button_text: "Spremi",
353+
cancel_button_text: "Odustani",
351354
actions: {
352355
add_reaction: "Dodaj reakciju",
353356
resolve: "Riješi",

packages/core/src/i18n/locales/is.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,9 @@ export const is: Dictionary = {
327327
},
328328
},
329329
comments: {
330+
edited: "breytt",
331+
save_button_text: "Vista",
332+
cancel_button_text: "Hætta",
330333
actions: {
331334
add_reaction: "Bæta við viðbrögðum",
332335
resolve: "Leysa",

packages/core/src/i18n/locales/it.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,9 @@ export const it: Dictionary = {
336336
},
337337
},
338338
comments: {
339+
edited: "modificato",
340+
save_button_text: "Salva",
341+
cancel_button_text: "Annulla",
339342
actions: {
340343
add_reaction: "Aggiungi reazione",
341344
resolve: "Risolvi",

packages/core/src/i18n/locales/ja.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,9 @@ export const ja: Dictionary = {
355355
},
356356
},
357357
comments: {
358+
edited: "編集済み",
359+
save_button_text: "保存",
360+
cancel_button_text: "キャンセル",
358361
actions: {
359362
add_reaction: "リアクションを追加",
360363
resolve: "解決",

0 commit comments

Comments
 (0)