feature: added making text longer (#2532)

* feature: added making text longer

* fix: corrected I10n
This commit is contained in:
Daniyar Nurmukhamet 2023-05-15 15:01:37 +06:00 committed by GitHub
parent a993a2a181
commit dd5bc7808c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 3 deletions

View File

@ -363,7 +363,8 @@
"smartEditFixSpelling": "Fix spelling",
"warning": "⚠️ AI responses can be inaccurate or misleading.",
"smartEditSummarize": "Summarize",
"smartEditImproveWriting": "Improve Writing",
"smartEditImproveWriting": "Improve writing",
"smartEditMakeLonger": "Make longer",
"smartEditCouldNotFetchResult": "Could not fetch result from OpenAI",
"smartEditCouldNotFetchKey": "Could not fetch OpenAI key",
"smartEditDisabled": "Connect OpenAI in Settings",

View File

@ -6,7 +6,8 @@ import 'package:easy_localization/easy_localization.dart';
enum SmartEditAction {
summarize,
fixSpelling,
improveWriting;
improveWriting,
makeItLonger;
String get toInstruction {
switch (this) {
@ -16,6 +17,8 @@ enum SmartEditAction {
return 'Correct this to standard English:';
case SmartEditAction.improveWriting:
return 'Rewrite this in your own words:';
case SmartEditAction.makeItLonger:
return 'Make this text longer:';
}
}
@ -27,6 +30,8 @@ enum SmartEditAction {
return 'Correct this to standard English:\n\n$input';
case SmartEditAction.improveWriting:
return 'Rewrite this:\n\n$input';
case SmartEditAction.makeItLonger:
return 'Make this text longer:\n\n$input';
}
}
@ -38,6 +43,8 @@ enum SmartEditAction {
return SmartEditAction.fixSpelling;
case 2:
return SmartEditAction.improveWriting;
case 3:
return SmartEditAction.makeItLonger;
}
return SmartEditAction.fixSpelling;
}
@ -50,6 +57,8 @@ enum SmartEditAction {
return LocaleKeys.document_plugins_smartEditFixSpelling.tr();
case SmartEditAction.improveWriting:
return LocaleKeys.document_plugins_smartEditImproveWriting.tr();
case SmartEditAction.makeItLonger:
return LocaleKeys.document_plugins_smartEditMakeLonger.tr();
}
}
}