Skip to content

Commit

Permalink
feat: link menu add translations
Browse files Browse the repository at this point in the history
  • Loading branch information
vincenzoursano committed May 22, 2023
1 parent acfb6ec commit ffba9da
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions lib/src/render/link_menu/link_menu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import 'package:appflowy_editor/src/render/style/editor_style.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

import '../../l10n/l10n.dart';

class LinkMenu extends StatefulWidget {
const LinkMenu({
Key? key,
Expand Down Expand Up @@ -81,19 +83,19 @@ class _LinkMenuState extends State<LinkMenu> {
_buildIconButton(
iconName: 'link',
color: style?.popupMenuFGColor,
text: 'Open link',
text: AppFlowyEditorLocalizations.current.linkMenuOpen,
onPressed: widget.onOpenLink,
),
_buildIconButton(
iconName: 'copy',
color: style?.popupMenuFGColor,
text: 'Copy link',
text: AppFlowyEditorLocalizations.current.linkMenuCopy,
onPressed: widget.onCopyLink,
),
_buildIconButton(
iconName: 'delete',
color: style?.popupMenuFGColor,
text: 'Remove link',
text: AppFlowyEditorLocalizations.current.linkMenuRemove,
onPressed: widget.onRemoveLink,
),
]
Expand All @@ -106,7 +108,7 @@ class _LinkMenuState extends State<LinkMenu> {

Widget _buildHeader() {
return Text(
'Add your link',
AppFlowyEditorLocalizations.current.linkMenuTitle,
style: TextStyle(
fontSize: style?.textStyle?.fontSize,
),
Expand All @@ -133,7 +135,8 @@ class _LinkMenuState extends State<LinkMenu> {
controller: _textEditingController,
onSubmitted: widget.onSubmitted,
decoration: InputDecoration(
hintText: 'URL',
hintText:
AppFlowyEditorLocalizations.current.linkMenuHint.toUpperCase(),
hintStyle: TextStyle(
fontSize: style?.textStyle?.fontSize,
),
Expand Down

0 comments on commit ffba9da

Please sign in to comment.