Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

Merge remote-tracking branch 'origin/main' into enzoftware/main

Lucas.Xu228a41d7ea3b
diff --cc frontend/app_flowy/packages/appflowy_editor/lib/src/extensions/text_node_extensions.dart
index 4d8c44b9fa,d4d7857286..bcc8722dfa
--- a/frontend/app_flowy/packages/appflowy_editor/lib/src/extensions/text_node_extensions.dart
+++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/extensions/text_node_extensions.dart
@@@ -19,8 -19,8 +19,9 @@@ extension TextNodeExtension on TextNod
}
final length = op.length;
if (start < endOffset && start + length > startOffset) {
-- if (op.attributes?.containsKey(styleKey) == true) {
-- return op.attributes![styleKey];
++ final attributes = op.attributes;
++ if (attributes != null && attributes[styleKey] is T?) {
++ return attributes[styleKey];
}
}
start += length;
diff --cc frontend/app_flowy/packages/appflowy_editor/lib/src/l10n/intl/messages_all.dart
index 02e3d46041,02e3d46041..b25b964b13
--- a/frontend/app_flowy/packages/appflowy_editor/lib/src/l10n/intl/messages_all.dart
+++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/l10n/intl/messages_all.dart
@@@ -26,6 -26,6 +26,7 @@@ import 'messages_hu-HU.dart' as message
import 'messages_id-ID.dart' as messages_id_id;
import 'messages_it-IT.dart' as messages_it_it;
import 'messages_ja-JP.dart' as messages_ja_jp;
++import 'messages_ml_IN.dart' as messages_ml_in;
import 'messages_nl-NL.dart' as messages_nl_nl;
import 'messages_pl-PL.dart' as messages_pl_pl;
import 'messages_pt-BR.dart' as messages_pt_br;
@@@ -48,6 -48,6 +49,7 @@@ Map<String, LibraryLoader> _deferredLib
'id_ID': () => new Future.value(null),
'it_IT': () => new Future.value(null),
'ja_JP': () => new Future.value(null),
++ 'ml_IN': () => new Future.value(null),
'nl_NL': () => new Future.value(null),
'pl_PL': () => new Future.value(null),
'pt_BR': () => new Future.value(null),
@@@ -82,6 -82,6 +84,8 @@@ MessageLookupByLibrary? _findExact(Stri
return messages_it_it.messages;
case 'ja_JP':
return messages_ja_jp.messages;
++ case 'ml_IN':
++ return messages_ml_in.messages;
case 'nl_NL':
return messages_nl_nl.messages;
case 'pl_PL':
diff --cc frontend/app_flowy/packages/appflowy_editor/lib/src/l10n/intl/messages_ml_IN.dart
index 0000000000,0000000000..e7378a907e
new file mode 100644
--- /dev/null
+++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/l10n/intl/messages_ml_IN.dart
@@@ -1,0 -1,0 +1,45 @@@
++// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
++// This is a library that provides messages for a ml_IN locale. All the
++// messages from the main program should be duplicated here with the same
++// function name.
++
++// Ignore issues from commonly used lints in this file.
++// ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new
++// ignore_for_file:prefer_single_quotes,comment_references, directives_ordering
++// ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases
++// ignore_for_file:unused_import, file_names, avoid_escaping_inner_quotes
++// ignore_for_file:unnecessary_string_interpolations, unnecessary_string_escapes
++
++import 'package:intl/intl.dart';
++import 'package:intl/message_lookup_by_library.dart';
++
++final messages = new MessageLookup();
++
++typedef String MessageIfAbsent(String messageStr, List<dynamic> args);
++
++class MessageLookup extends MessageLookupByLibrary {
++ String get localeName => 'ml_IN';
++
++ final messages = _notInlinedMessages(_notInlinedMessages);
++ static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
++ "bold": MessageLookupByLibrary.simpleMessage("ബോൾഡ്"),
++ "bulletedList":
++ MessageLookupByLibrary.simpleMessage("ബുള്ളറ്റഡ് പട്ടിക"),
++ "checkbox": MessageLookupByLibrary.simpleMessage("ചെക്ക്ബോക്സ്"),
++ "embedCode": MessageLookupByLibrary.simpleMessage("എംബെഡഡ് കോഡ്"),
++ "heading1": MessageLookupByLibrary.simpleMessage("തലക്കെട്ട് 1"),
++ "heading2": MessageLookupByLibrary.simpleMessage("തലക്കെട്ട് 2"),
++ "heading3": MessageLookupByLibrary.simpleMessage("തലക്കെട്ട് 3"),
++ "highlight":
++ MessageLookupByLibrary.simpleMessage("പ്രമുഖമാക്കിക്കാട്ടുക"),
++ "image": MessageLookupByLibrary.simpleMessage("ചിത്രം"),
++ "italic": MessageLookupByLibrary.simpleMessage("ഇറ്റാലിക്"),
++ "link": MessageLookupByLibrary.simpleMessage("ലിങ്ക്"),
++ "numberedList":
++ MessageLookupByLibrary.simpleMessage("അക്കമിട്ട പട്ടിക"),
++ "quote": MessageLookupByLibrary.simpleMessage("ഉദ്ധരണി"),
++ "strikethrough": MessageLookupByLibrary.simpleMessage("സ്ട്രൈക്ക്ത്രൂ"),
++ "text": MessageLookupByLibrary.simpleMessage("വചനം"),
++ "underline": MessageLookupByLibrary.simpleMessage("അടിവരയിടുക")
++ };
++}
diff --cc frontend/app_flowy/packages/appflowy_editor/lib/src/l10n/l10n.dart
index 9ef7ddf4c9,9ef7ddf4c9..38590a144c
--- a/frontend/app_flowy/packages/appflowy_editor/lib/src/l10n/l10n.dart
+++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/l10n/l10n.dart
@@@ -229,6 -229,6 +229,7 @@@ class AppLocalizationDelegat
Locale.fromSubtags(languageCode: 'id', countryCode: 'ID'),
Locale.fromSubtags(languageCode: 'it', countryCode: 'IT'),
Locale.fromSubtags(languageCode: 'ja', countryCode: 'JP'),
++ Locale.fromSubtags(languageCode: 'ml', countryCode: 'IN'),
Locale.fromSubtags(languageCode: 'nl', countryCode: 'NL'),
Locale.fromSubtags(languageCode: 'pl', countryCode: 'PL'),
Locale.fromSubtags(languageCode: 'pt', countryCode: 'BR'),
diff --cc frontend/app_flowy/packages/appflowy_editor/test/extensions/text_node_extensions_test.dart
index bec92362f4,0000000000..0d7f1ba125
mode 100644,000000..100644
--- a/frontend/app_flowy/packages/appflowy_editor/test/extensions/text_node_extensions_test.dart
+++ b/frontend/app_flowy/packages/appflowy_editor/test/extensions/text_node_extensions_test.dart
@@@ -1,10 -1,0 +1,7 @@@
- import 'package:appflowy_editor/appflowy_editor.dart';
+import 'package:flutter_test/flutter_test.dart';
+
+void main() {
+ group('TextNodeExtension::', () {
- test('description', () {
- final selecion = Selection.single(path: [0, 1, 2], startOffset: 0);
- });
++ test('description', () {});
+ });
+}