Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add localizations #391

Merged
merged 11 commits into from
Aug 10, 2024
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.g.dart linguist-generated
2 changes: 2 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ignore:
- '**.g.dart'
2 changes: 2 additions & 0 deletions packages/fleather/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ doc/api/
build/

example/feather

untranslated.txt
4 changes: 4 additions & 0 deletions packages/fleather/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
include: package:flutter_lints/flutter.yaml

analyzer:
exclude:
- '**.g.dart'

linter:
rules:
always_declare_return_types: true
Expand Down
4 changes: 2 additions & 2 deletions packages/fleather/example/macos/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ EXTERNAL SOURCES:
:path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos

SPEC CHECKSUMS:
file_selector_macos: 468fb6b81fac7c0e88d71317f3eec34c3b008ff9
file_selector_macos: 54fdab7caa3ac3fc43c9fac4d7d8d231277f8cf2
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
url_launcher_macos: d2691c7dd33ed713bf3544850a623080ec693d95
url_launcher_macos: 5f437abeda8c85500ceb03f5c1938a8c5a705399

PODFILE CHECKSUM: 353c8bcc5d5b0994e508d035b5431cfe18c1dea7

Expand Down
12 changes: 12 additions & 0 deletions packages/fleather/l10n.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
format: true
use-escaping: true
synthetic-package: false

arb-dir: l10n
template-arb-file: app_en.arb

output-dir: lib/l10n
output-class: FleatherLocalizations
output-localization-file: fleather_localizations.g.dart

untranslated-messages-file: untranslated.txt
59 changes: 59 additions & 0 deletions packages/fleather/l10n/app_en.arb
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"@@locale": "en",
"foregroundColorAutomatic": "Automatic",
"@foregroundColorAutomatic": {
"description": "Automatically assign a foreground color to the text"
},
"backgroundColorNoColor": "No color",
"@backgroundColorNoColor": {
"description": "Assign no background color to the text"
},
"headingNormal": "Normal",
"@headingNormal": {
"description": "A normal heading text style"
},
"headingLevel1": "Heading 1",
"@headingLevel1": {
"description": "A level 1 heading text style"
},
"headingLevel2": "Heading 2",
"@headingLevel2": {
"description": "A level 2 heading text style"
},
"headingLevel3": "Heading 3",
"@headingLevel3": {
"description": "A level 3 heading text style"
},
"headingLevel4": "Heading 4",
"@headingLevel4": {
"description": "A level 4 heading text style"
},
"headingLevel5": "Heading 5",
"@headingLevel5": {
"description": "A level 5 heading text style"
},
"headingLevel6": "Heading 6",
"@headingLevel6": {
"description": "A level 6 heading text style"
},
"addLinkDialogPasteLink": "Paste a link",
"@addLinkDialogPasteLink": {
"description": "Label for the input decoration of the link text field in the add link dialog"
},
"addLinkDialogApply": "Apply",
"@addLinkDialogApply": {
"description": "Label for the confirmation button in the link dialog"
},
"linkDialogOpen": "Open",
"@linkDialogOpen": {
"description": "Open the link"
},
"linkDialogCopy": "Copy",
"@linkDialogCopy": {
"description": "Copy the link"
},
"linkDialogRemove": "Remove",
"@linkDialogRemove": {
"description": "Remove the link"
}
}
17 changes: 17 additions & 0 deletions packages/fleather/l10n/app_fr.arb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"@@locale": "fr",
"foregroundColorAutomatic": "Automatique",
"backgroundColorNoColor": "Aucune couleur",
"headingNormal": "Normal",
"headingLevel1": "Titre 1",
"headingLevel2": "Titre 2",
"headingLevel3": "Titre 3",
"headingLevel4": "Titre 4",
"headingLevel5": "Titre 5",
"headingLevel6": "Titre 6",
"addLinkDialogPasteLink": "Coller un lien",
"addLinkDialogApply": "Appliquer",
"linkDialogOpen": "Ouvrir",
"linkDialogCopy": "Copier",
"linkDialogRemove": "Retirer"
}
5 changes: 3 additions & 2 deletions packages/fleather/lib/fleather.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ library fleather;

export 'package:parchment/parchment.dart';

export 'l10n/l10n.dart' hide BuildContextLocalizationsExtension;
export 'src/rendering/editor.dart';
export 'src/services/clipboard_manager.dart';
export 'src/widgets/autoformats.dart';
export 'src/widgets/controller.dart';
export 'src/widgets/cursor.dart';
export 'src/widgets/editor.dart';
Expand All @@ -14,5 +17,3 @@ export 'src/widgets/field.dart';
export 'src/widgets/link.dart' show LinkActionPickerDelegate, LinkMenuAction;
export 'src/widgets/text_line.dart';
export 'src/widgets/theme.dart';
export 'src/widgets/autoformats.dart';
export 'src/services/clipboard_manager.dart';
217 changes: 217 additions & 0 deletions packages/fleather/lib/l10n/fleather_localizations.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading