Ver código fonte

feat: add translation

Naughtz 2 anos atrás
pai
commit
22f544a910

+ 4 - 0
frontend/app_flowy/assets/translations/ca-ES.json

@@ -141,5 +141,9 @@
       "lightLabel": "Mode Clar",
       "lightLabel": "Mode Clar",
       "darkLabel": "Mode Fosc"
       "darkLabel": "Mode Fosc"
     }
     }
+  },
+  "sideBar": {
+    "openSidebar": "Open sidebar",
+    "closeSidebar": "Close sidebar"
   }
   }
 }
 }

+ 4 - 0
frontend/app_flowy/assets/translations/de-DE.json

@@ -141,6 +141,10 @@
         "lightLabel": "Heller Modus",
         "lightLabel": "Heller Modus",
         "darkLabel": "Dunkler Modus"
         "darkLabel": "Dunkler Modus"
       }
       }
+    },
+    "sideBar": {
+      "openSidebar": "Open sidebar",
+      "closeSidebar": "Close sidebar"
     }
     }
   }
   }
   
   

+ 4 - 0
frontend/app_flowy/assets/translations/en.json

@@ -214,5 +214,9 @@
       "timeHintTextInTwelveHour": "12:00 AM",
       "timeHintTextInTwelveHour": "12:00 AM",
       "timeHintTextInTwentyFourHour": "12:00"
       "timeHintTextInTwentyFourHour": "12:00"
     }
     }
+  },
+  "sideBar": {
+    "openSidebar": "Open sidebar",
+    "closeSidebar": "Close sidebar"
   }
   }
 }
 }

+ 4 - 0
frontend/app_flowy/assets/translations/es-VE.json

@@ -213,5 +213,9 @@
       "timeHintTextInTwelveHour": "12:00 AM",
       "timeHintTextInTwelveHour": "12:00 AM",
       "timeHintTextInTwentyFourHour": "12:00"
       "timeHintTextInTwentyFourHour": "12:00"
     }
     }
+  },
+  "sideBar": {
+    "openSidebar": "Open sidebar",
+    "closeSidebar": "Close sidebar"
   }
   }
 }
 }

+ 4 - 0
frontend/app_flowy/assets/translations/fr-CA.json

@@ -141,5 +141,9 @@
       "lightLabel": "Mode clair",
       "lightLabel": "Mode clair",
       "darkLabel": "Mode sombre"
       "darkLabel": "Mode sombre"
     }
     }
+  },
+  "sideBar": {
+    "openSidebar": "Open sidebar",
+    "closeSidebar": "Close sidebar"
   }
   }
 }
 }

+ 4 - 0
frontend/app_flowy/assets/translations/fr-FR.json

@@ -141,5 +141,9 @@
       "lightLabel": "Mode clair",
       "lightLabel": "Mode clair",
       "darkLabel": "Mode sombre"
       "darkLabel": "Mode sombre"
     }
     }
+  },
+  "sideBar": {
+    "openSidebar": "Open sidebar",
+    "closeSidebar": "Close sidebar"
   }
   }
 }
 }

+ 4 - 0
frontend/app_flowy/assets/translations/hu-HU.json

@@ -141,5 +141,9 @@
       "lightLabel": "Világos mód",
       "lightLabel": "Világos mód",
       "darkLabel": "Éjjeli mód"
       "darkLabel": "Éjjeli mód"
     }
     }
+  },
+  "sideBar": {
+    "openSidebar": "Open sidebar",
+    "closeSidebar": "Close sidebar"
   }
   }
 }
 }

+ 4 - 0
frontend/app_flowy/assets/translations/id-ID.json

@@ -214,5 +214,9 @@
       "timeHintTextInTwelveHour": "12:00 AM",
       "timeHintTextInTwelveHour": "12:00 AM",
       "timeHintTextInTwentyFourHour": "12:00"
       "timeHintTextInTwentyFourHour": "12:00"
     }
     }
+  },
+  "sideBar": {
+    "openSidebar": "Open sidebar",
+    "closeSidebar": "Close sidebar"
   }
   }
 }
 }

+ 4 - 0
frontend/app_flowy/assets/translations/it-IT.json

@@ -147,5 +147,9 @@
   },
   },
   "document":{
   "document":{
     "menuName":"Documento"
     "menuName":"Documento"
+  },
+  "sideBar": {
+    "openSidebar": "Open sidebar",
+    "closeSidebar": "Close sidebar"
   }
   }
 }
 }

+ 4 - 0
frontend/app_flowy/assets/translations/ja-JP.json

@@ -195,5 +195,9 @@
       "pannelTitle": "選択候補を検索 または 作成する",
       "pannelTitle": "選択候補を検索 または 作成する",
       "searchOption": "選択候補を検索"
       "searchOption": "選択候補を検索"
     }
     }
+  },
+  "sideBar": {
+    "openSidebar": "Open sidebar",
+    "closeSidebar": "Close sidebar"
   }
   }
 }
 }

+ 4 - 0
frontend/app_flowy/assets/translations/pl-PL.json

@@ -141,5 +141,9 @@
       "lightLabel": "Tryb Jasny",
       "lightLabel": "Tryb Jasny",
       "darkLabel": "Tryb Ciemny"
       "darkLabel": "Tryb Ciemny"
     }
     }
+  },
+  "sideBar": {
+    "openSidebar": "Open sidebar",
+    "closeSidebar": "Close sidebar"
   }
   }
 }
 }

+ 4 - 0
frontend/app_flowy/assets/translations/pt-BR.json

@@ -141,6 +141,10 @@
         "lightLabel": "Modo Claro",
         "lightLabel": "Modo Claro",
         "darkLabel": "Modo Escuro"
         "darkLabel": "Modo Escuro"
       }
       }
+    },
+    "sideBar": {
+      "openSidebar": "Open sidebar",
+      "closeSidebar": "Close sidebar"
     }
     }
   }
   }
  
  

+ 4 - 0
frontend/app_flowy/assets/translations/pt-PT.json

@@ -141,6 +141,10 @@
         "lightLabel": "Modo Claro",
         "lightLabel": "Modo Claro",
         "darkLabel": "Modo Escuro"
         "darkLabel": "Modo Escuro"
       }
       }
+    },
+    "sideBar": {
+      "openSidebar": "Open sidebar",
+      "closeSidebar": "Close sidebar"
     }
     }
   }
   }
 
 

+ 4 - 0
frontend/app_flowy/assets/translations/ru-RU.json

@@ -203,6 +203,10 @@
         "timeHintTextInTwelveHour": "12:00 AM",
         "timeHintTextInTwelveHour": "12:00 AM",
         "timeHintTextInTwentyFourHour": "12:00"
         "timeHintTextInTwentyFourHour": "12:00"
       }
       }
+    },
+    "sideBar": {
+      "openSidebar": "Open sidebar",
+      "closeSidebar": "Close sidebar"
     }
     }
   }
   }
   
   

+ 4 - 0
frontend/app_flowy/assets/translations/tr-TR.json

@@ -141,5 +141,9 @@
       "lightLabel": "Aydınlık Mod",
       "lightLabel": "Aydınlık Mod",
       "darkLabel": "Karanlık Mod"
       "darkLabel": "Karanlık Mod"
     }
     }
+  },
+  "sideBar": {
+    "openSidebar": "Open sidebar",
+    "closeSidebar": "Close sidebar"
   }
   }
 }
 }

+ 4 - 0
frontend/app_flowy/assets/translations/zh-CN.json

@@ -141,5 +141,9 @@
       "lightLabel": "日间模式",
       "lightLabel": "日间模式",
       "darkLabel": "夜间模式"
       "darkLabel": "夜间模式"
     }
     }
+  },
+  "sideBar": {
+    "openSidebar": "打开侧边栏",
+    "closeSidebar": "关闭侧边栏"
   }
   }
 }
 }

+ 4 - 0
frontend/app_flowy/assets/translations/zh-TW.json

@@ -214,5 +214,9 @@
       "timeHintTextInTwelveHour": "12:00 AM",
       "timeHintTextInTwelveHour": "12:00 AM",
       "timeHintTextInTwentyFourHour": "12:00"
       "timeHintTextInTwentyFourHour": "12:00"
     }
     }
+  },
+  "sideBar": {
+    "openSidebar": "Open sidebar",
+    "closeSidebar": "Close sidebar"
   }
   }
 }
 }

+ 3 - 1
frontend/app_flowy/lib/workspace/presentation/home/menu/menu.dart

@@ -2,6 +2,7 @@ export './app/header/header.dart';
 export './app/menu_app.dart';
 export './app/menu_app.dart';
 
 
 import 'dart:io' show Platform;
 import 'dart:io' show Platform;
+import 'package:app_flowy/generated/locale_keys.g.dart';
 import 'package:app_flowy/workspace/presentation/home/home_sizes.dart';
 import 'package:app_flowy/workspace/presentation/home/home_sizes.dart';
 import 'package:app_flowy/workspace/presentation/home/home_stack.dart';
 import 'package:app_flowy/workspace/presentation/home/home_stack.dart';
 import 'package:app_flowy/workspace/presentation/plugins/trash/menu.dart';
 import 'package:app_flowy/workspace/presentation/plugins/trash/menu.dart';
@@ -219,7 +220,8 @@ class MenuTopBar extends StatelessWidget {
               const Spacer(),
               const Spacer(),
               Tooltip(
               Tooltip(
                   richMessage: TextSpan(children: [
                   richMessage: TextSpan(children: [
-                    const TextSpan(text: "Close sidebar\n"),
+                    const TextSpan(
+                        text: LocaleKeys.sideBar_closeSidebar + "\n"),
                     TextSpan(
                     TextSpan(
                       text: Platform.isMacOS ? "⌘+\\" : "Ctrl+\\",
                       text: Platform.isMacOS ? "⌘+\\" : "Ctrl+\\",
                       style: const TextStyle(color: Colors.white60),
                       style: const TextStyle(color: Colors.white60),

+ 2 - 1
frontend/app_flowy/lib/workspace/presentation/home/navigation.dart

@@ -1,5 +1,6 @@
 import 'dart:io';
 import 'dart:io';
 
 
+import 'package:app_flowy/generated/locale_keys.g.dart';
 import 'package:app_flowy/workspace/application/home/home_bloc.dart';
 import 'package:app_flowy/workspace/application/home/home_bloc.dart';
 import 'package:app_flowy/workspace/presentation/home/home_stack.dart';
 import 'package:app_flowy/workspace/presentation/home/home_stack.dart';
 import 'package:flowy_infra/image.dart';
 import 'package:flowy_infra/image.dart';
@@ -99,7 +100,7 @@ class FlowyNavigation extends StatelessWidget {
               turns: const AlwaysStoppedAnimation(180 / 360),
               turns: const AlwaysStoppedAnimation(180 / 360),
               child: Tooltip(
               child: Tooltip(
                   richMessage: TextSpan(children: [
                   richMessage: TextSpan(children: [
-                    const TextSpan(text: "Open sidebar\n"),
+                    const TextSpan(text: LocaleKeys.sideBar_openSidebar + "\n"),
                     TextSpan(
                     TextSpan(
                       text: Platform.isMacOS ? "⌘+\\" : "Ctrl+\\",
                       text: Platform.isMacOS ? "⌘+\\" : "Ctrl+\\",
                       style: const TextStyle(color: Colors.white60),
                       style: const TextStyle(color: Colors.white60),