File tree Expand file tree Collapse file tree 25 files changed +83
-12
lines changed Expand file tree Collapse file tree 25 files changed +83
-12
lines changed Original file line number Diff line number Diff line change 1
1
import { Group as AriakitGroup } from "@ariakit/react" ;
2
2
3
3
import { assertEmpty } from "@blocknote/core" ;
4
- import { ComponentProps , useFocusWithin } from "@blocknote/react" ;
4
+ import {
5
+ ComponentProps ,
6
+ useDictionary ,
7
+ useFocusWithin ,
8
+ } from "@blocknote/react" ;
5
9
import { forwardRef , useState } from "react" ;
6
10
7
11
const AuthorInfo = forwardRef <
@@ -12,6 +16,7 @@ const AuthorInfo = forwardRef<
12
16
>
13
17
> ( ( props , _ref ) => {
14
18
const { authorInfo, timeString, edited, ...rest } = props ;
19
+ const dict = useDictionary ( ) ;
15
20
16
21
assertEmpty ( rest , false ) ;
17
22
@@ -34,7 +39,7 @@ const AuthorInfo = forwardRef<
34
39
< div className = { "bn-ak-username" } >
35
40
{ authorInfo . username }
36
41
< span >
37
- { timeString } { edited && "( edited)" }
42
+ { timeString } { edited && `( ${ dict . comments . edited } )` }
38
43
</ span >
39
44
</ div >
40
45
</ AriakitGroup >
Original file line number Diff line number Diff line change @@ -320,6 +320,9 @@ export const ar: Dictionary = {
320
320
} ,
321
321
} ,
322
322
comments : {
323
+ edited : "تم التحرير" ,
324
+ save_button_text : "حفظ" ,
325
+ cancel_button_text : "إلغاء" ,
323
326
actions : {
324
327
add_reaction : "أضف تفاعلًا" ,
325
328
resolve : "حل" ,
Original file line number Diff line number Diff line change @@ -334,6 +334,9 @@ export const de: Dictionary = {
334
334
} ,
335
335
} ,
336
336
comments : {
337
+ edited : "bearbeitet" ,
338
+ save_button_text : "Speichern" ,
339
+ cancel_button_text : "Abbrechen" ,
337
340
actions : {
338
341
add_reaction : "Reaktion hinzufügen" ,
339
342
resolve : "Lösen" ,
Original file line number Diff line number Diff line change @@ -335,6 +335,9 @@ export const en = {
335
335
} ,
336
336
} ,
337
337
comments : {
338
+ edited : "edited" ,
339
+ save_button_text : "Save" ,
340
+ cancel_button_text : "Cancel" ,
338
341
actions : {
339
342
add_reaction : "Add reaction" ,
340
343
resolve : "Resolve" ,
Original file line number Diff line number Diff line change @@ -333,6 +333,9 @@ export const es: Dictionary = {
333
333
} ,
334
334
} ,
335
335
comments : {
336
+ edited : "editado" ,
337
+ save_button_text : "Guardar" ,
338
+ cancel_button_text : "Cancelar" ,
336
339
actions : {
337
340
add_reaction : "Agregar reacción" ,
338
341
resolve : "Resolver" ,
Original file line number Diff line number Diff line change @@ -359,6 +359,9 @@ export const fr: Dictionary = {
359
359
} ,
360
360
} ,
361
361
comments : {
362
+ edited : "modifié" ,
363
+ save_button_text : "Enregistrer" ,
364
+ cancel_button_text : "Annuler" ,
362
365
actions : {
363
366
add_reaction : "Ajouter une réaction" ,
364
367
resolve : "Résoudre" ,
Original file line number Diff line number Diff line change @@ -348,6 +348,9 @@ export const hr: Dictionary = {
348
348
} ,
349
349
} ,
350
350
comments : {
351
+ edited : "uredio" ,
352
+ save_button_text : "Spremi" ,
353
+ cancel_button_text : "Odustani" ,
351
354
actions : {
352
355
add_reaction : "Dodaj reakciju" ,
353
356
resolve : "Riješi" ,
Original file line number Diff line number Diff line change @@ -327,6 +327,9 @@ export const is: Dictionary = {
327
327
} ,
328
328
} ,
329
329
comments : {
330
+ edited : "breytt" ,
331
+ save_button_text : "Vista" ,
332
+ cancel_button_text : "Hætta" ,
330
333
actions : {
331
334
add_reaction : "Bæta við viðbrögðum" ,
332
335
resolve : "Leysa" ,
Original file line number Diff line number Diff line change @@ -336,6 +336,9 @@ export const it: Dictionary = {
336
336
} ,
337
337
} ,
338
338
comments : {
339
+ edited : "modificato" ,
340
+ save_button_text : "Salva" ,
341
+ cancel_button_text : "Annulla" ,
339
342
actions : {
340
343
add_reaction : "Aggiungi reazione" ,
341
344
resolve : "Risolvi" ,
Original file line number Diff line number Diff line change @@ -355,6 +355,9 @@ export const ja: Dictionary = {
355
355
} ,
356
356
} ,
357
357
comments : {
358
+ edited : "編集済み" ,
359
+ save_button_text : "保存" ,
360
+ cancel_button_text : "キャンセル" ,
358
361
actions : {
359
362
add_reaction : "リアクションを追加" ,
360
363
resolve : "解決" ,
Original file line number Diff line number Diff line change @@ -348,6 +348,9 @@ export const ko: Dictionary = {
348
348
} ,
349
349
} ,
350
350
comments : {
351
+ edited : "수정됨" ,
352
+ save_button_text : "저장" ,
353
+ cancel_button_text : "취소" ,
351
354
actions : {
352
355
add_reaction : "반응 추가" ,
353
356
resolve : "해결" ,
Original file line number Diff line number Diff line change @@ -334,6 +334,9 @@ export const nl: Dictionary = {
334
334
} ,
335
335
} ,
336
336
comments : {
337
+ edited : "bewerkt" ,
338
+ save_button_text : "Opslaan" ,
339
+ cancel_button_text : "Annuleren" ,
337
340
actions : {
338
341
add_reaction : "Reactie toevoegen" ,
339
342
resolve : "Oplossen" ,
Original file line number Diff line number Diff line change @@ -334,6 +334,9 @@ export const no: Dictionary = {
334
334
} ,
335
335
} ,
336
336
comments : {
337
+ edited : "redigert" ,
338
+ save_button_text : "Lagre" ,
339
+ cancel_button_text : "Avbryt" ,
337
340
actions : {
338
341
add_reaction : "Legg til reaksjon" ,
339
342
resolve : "Løs" ,
Original file line number Diff line number Diff line change @@ -319,6 +319,9 @@ export const pl: Dictionary = {
319
319
} ,
320
320
} ,
321
321
comments : {
322
+ edited : "edytowany" ,
323
+ save_button_text : "Zapisz" ,
324
+ cancel_button_text : "Anuluj" ,
322
325
actions : {
323
326
add_reaction : "Dodaj reakcję" ,
324
327
resolve : "Rozwiąż" ,
Original file line number Diff line number Diff line change @@ -327,6 +327,9 @@ export const pt: Dictionary = {
327
327
} ,
328
328
} ,
329
329
comments : {
330
+ edited : "editado" ,
331
+ save_button_text : "Salvar" ,
332
+ cancel_button_text : "Cancelar" ,
330
333
actions : {
331
334
add_reaction : "Adicionar reação" ,
332
335
resolve : "Resolver" ,
Original file line number Diff line number Diff line change @@ -362,6 +362,9 @@ export const ru: Dictionary = {
362
362
} ,
363
363
} ,
364
364
comments : {
365
+ edited : "изменен" ,
366
+ save_button_text : "Сохранить" ,
367
+ cancel_button_text : "Отменить" ,
365
368
actions : {
366
369
add_reaction : "Добавить реакцию" ,
367
370
resolve : "Решить" ,
Original file line number Diff line number Diff line change @@ -333,6 +333,9 @@ export const sk = {
333
333
} ,
334
334
} ,
335
335
comments : {
336
+ edited : "upravený" ,
337
+ save_button_text : "Uložiť" ,
338
+ cancel_button_text : "Zrušiť" ,
336
339
actions : {
337
340
add_reaction : "Pridať reakciu" ,
338
341
resolve : "Vyriešiť" ,
Original file line number Diff line number Diff line change @@ -359,6 +359,9 @@ export const uk: Dictionary = {
359
359
} ,
360
360
} ,
361
361
comments : {
362
+ edited : "відредаговано" ,
363
+ save_button_text : "Зберегти" ,
364
+ cancel_button_text : "Скасувати" ,
362
365
actions : {
363
366
add_reaction : "Додати реакцію" ,
364
367
resolve : "Вирішити" ,
Original file line number Diff line number Diff line change @@ -334,6 +334,9 @@ export const vi: Dictionary = {
334
334
} ,
335
335
} ,
336
336
comments : {
337
+ edited : "đã chỉnh sửa" ,
338
+ save_button_text : "Lưu" ,
339
+ cancel_button_text : "Hủy" ,
337
340
actions : {
338
341
add_reaction : "Thêm phản ứng" ,
339
342
resolve : "Giải quyết" ,
Original file line number Diff line number Diff line change @@ -368,6 +368,9 @@ export const zhTW: Dictionary = {
368
368
} ,
369
369
} ,
370
370
comments : {
371
+ edited : "已編輯" ,
372
+ save_button_text : "儲存" ,
373
+ cancel_button_text : "取消" ,
371
374
actions : {
372
375
add_reaction : "新增回應" ,
373
376
resolve : "解決" ,
Original file line number Diff line number Diff line change @@ -368,6 +368,9 @@ export const zh: Dictionary = {
368
368
} ,
369
369
} ,
370
370
comments : {
371
+ edited : "已编辑" ,
372
+ save_button_text : "保存" ,
373
+ cancel_button_text : "取消" ,
371
374
actions : {
372
375
add_reaction : "添加反应" ,
373
376
resolve : "解决" ,
Original file line number Diff line number Diff line change 1
1
import { assertEmpty } from "@blocknote/core" ;
2
- import { ComponentProps , mergeRefs } from "@blocknote/react" ;
2
+ import { ComponentProps , mergeRefs , useDictionary } from "@blocknote/react" ;
3
3
import { Avatar , Group , Skeleton , Text } from "@mantine/core" ;
4
4
import { useFocusWithin , useHover } from "@mantine/hooks" ;
5
5
import { forwardRef } from "react" ;
@@ -12,6 +12,7 @@ const AuthorInfo = forwardRef<
12
12
>
13
13
> ( ( props , _ref ) => {
14
14
const { authorInfo, timeString, edited, ...rest } = props ;
15
+ const dict = useDictionary ( ) ;
15
16
16
17
assertEmpty ( rest , false ) ;
17
18
@@ -40,7 +41,7 @@ const AuthorInfo = forwardRef<
40
41
< Text fz = "sm" fw = { "bold" } >
41
42
{ authorInfo . username }
42
43
< Text fz = "xs" c = "dimmed" span ml = { "xs" } >
43
- { timeString } { edited && "( edited)" }
44
+ { timeString } { edited && `( ${ dict . comments . edited } )` }
44
45
</ Text >
45
46
</ Text >
46
47
</ Group >
Original file line number Diff line number Diff line change @@ -297,20 +297,20 @@ export const Comment = ({
297
297
) }
298
298
>
299
299
< Components . Generic . Toolbar . Button
300
- mainTooltip = "Save"
300
+ mainTooltip = { dict . comments . save_button_text }
301
301
variant = "compact"
302
302
onClick = { onEditSubmit }
303
303
isDisabled = { isEmpty }
304
304
>
305
- Save
305
+ { dict . comments . save_button_text }
306
306
</ Components . Generic . Toolbar . Button >
307
307
< Components . Generic . Toolbar . Button
308
308
className = { "bn-button" }
309
- mainTooltip = "Cancel"
309
+ mainTooltip = { dict . comments . cancel_button_text }
310
310
variant = "compact"
311
311
onClick = { onEditCancel }
312
312
>
313
- Cancel
313
+ { dict . comments . cancel_button_text }
314
314
</ Components . Generic . Toolbar . Button >
315
315
</ Components . Generic . Toolbar . Root >
316
316
) }
Original file line number Diff line number Diff line change @@ -134,12 +134,12 @@ export const Thread = ({
134
134
) }
135
135
>
136
136
< Components . Generic . Toolbar . Button
137
- mainTooltip = "Save"
137
+ mainTooltip = { dict . comments . save_button_text }
138
138
variant = "compact"
139
139
isDisabled = { isEmpty }
140
140
onClick = { onNewCommentSave }
141
141
>
142
- Save
142
+ { dict . comments . save_button_text }
143
143
</ Components . Generic . Toolbar . Button >
144
144
</ Components . Generic . Toolbar . Root >
145
145
) ;
Original file line number Diff line number Diff line change 1
1
import { assertEmpty } from "@blocknote/core" ;
2
- import { ComponentProps , useFocusWithin } from "@blocknote/react" ;
2
+ import {
3
+ ComponentProps ,
4
+ useDictionary ,
5
+ useFocusWithin ,
6
+ } from "@blocknote/react" ;
3
7
import { forwardRef , useState } from "react" ;
4
8
5
9
import { cn } from "../lib/utils.js" ;
@@ -13,6 +17,7 @@ const AuthorInfo = forwardRef<
13
17
>
14
18
> ( ( props , _ref ) => {
15
19
const { authorInfo, timeString, edited, ...rest } = props ;
20
+ const dict = useDictionary ( ) ;
16
21
17
22
assertEmpty ( rest , false ) ;
18
23
@@ -61,7 +66,7 @@ const AuthorInfo = forwardRef<
61
66
>
62
67
< span className = { "bn-text-sm bn-font-bold" } > { authorInfo . username } </ span >
63
68
< span className = { "bn-text-xs" } >
64
- { timeString } { edited && "( edited)" }
69
+ { timeString } { edited && `( ${ dict . comments . edited } )` }
65
70
</ span >
66
71
</ div >
67
72
</ div >
You can’t perform that action at this time.
0 commit comments