fix: .tr() missing in side bar tooltip text

This commit is contained in:
chiragkr04 2022-08-29 12:23:06 +05:30
parent 32bce890f5
commit 0eac23be6a
3 changed files with 9 additions and 3 deletions

View File

@ -99,6 +99,10 @@
"addNewRow": "Add a new row",
"openMenu": "Click to open menu"
},
"sideBar": {
"closeSidebar": "Close side bar",
"openSidebar": "Open side bar"
},
"notifications": {
"export": {
"markdown": "Exported Note To Markdown",

View File

@ -26,6 +26,7 @@ import 'package:app_flowy/core/frameless_window.dart';
// import 'package:app_flowy/workspace/presentation/home/home_sizes.dart';
import 'package:flowy_infra/image.dart';
import 'package:flowy_infra_ui/style_widget/icon_button.dart';
import 'package:easy_localization/easy_localization.dart';
import 'app/menu_app.dart';
import 'app/create_button.dart';
@ -220,8 +221,8 @@ class MenuTopBar extends StatelessWidget {
const Spacer(),
Tooltip(
richMessage: TextSpan(children: [
const TextSpan(
text: LocaleKeys.sideBar_closeSidebar + "\n"),
TextSpan(
text: LocaleKeys.sideBar_closeSidebar.tr() + "\n"),
TextSpan(
text: Platform.isMacOS ? "⌘+\\" : "Ctrl+\\",
style: const TextStyle(color: Colors.white60),

View File

@ -11,6 +11,7 @@ import 'package:flowy_infra_ui/style_widget/text.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:styled_widget/styled_widget.dart';
import 'package:easy_localization/easy_localization.dart';
typedef NaviAction = void Function();
@ -100,7 +101,7 @@ class FlowyNavigation extends StatelessWidget {
turns: const AlwaysStoppedAnimation(180 / 360),
child: Tooltip(
richMessage: TextSpan(children: [
const TextSpan(text: LocaleKeys.sideBar_openSidebar + "\n"),
TextSpan(text: LocaleKeys.sideBar_openSidebar.tr() + "\n"),
TextSpan(
text: Platform.isMacOS ? "⌘+\\" : "Ctrl+\\",
style: const TextStyle(color: Colors.white60),