feat: Add US/GB english discrimination, fix incorrect localizations

This commit is contained in:
Anton Stubenbord
2023-10-09 00:24:13 +02:00
parent d4951e1c82
commit 23b7560dda
24 changed files with 204 additions and 85 deletions

View File

@@ -177,13 +177,9 @@ class _DocumentsPageState extends State<DocumentsPage> {
child: _showExtendedFab
? Row(
children: [
const Icon(
Icons.filter_alt_outlined,
),
const Icon(Icons.filter_alt_outlined),
const SizedBox(width: 8),
Text(
S.of(context)!.filterDocuments,
),
Text(S.of(context)!.filterDocuments),
],
)
: const Icon(Icons.filter_alt_outlined),
@@ -270,7 +266,6 @@ class _DocumentsPageState extends State<DocumentsPage> {
builder: (context, state) {
if (state.selection.isEmpty) {
return SliverSearchBar(
floating: true,
titleText: S.of(context)!.documents,
);
} else {

View File

@@ -89,7 +89,8 @@ class DocumentDetailedItem extends DocumentItem {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
DateFormat.yMMMMd().format(document.created),
DateFormat.yMMMMd(Localizations.localeOf(context).toString())
.format(document.created),
style: Theme.of(context)
.textTheme
.bodySmall

View File

@@ -121,7 +121,9 @@ class DocumentGridItem extends DocumentItem {
),
const Spacer(),
Text(
DateFormat.yMMMd().format(document.created),
DateFormat.yMMMMd(
Localizations.localeOf(context).toString())
.format(document.created),
style: Theme.of(context).textTheme.bodySmall,
),
],

View File

@@ -81,7 +81,8 @@ class DocumentListItem extends DocumentItem {
maxLines: 1,
overflow: TextOverflow.ellipsis,
text: TextSpan(
text: DateFormat.yMMMd().format(document.created),
text: DateFormat.yMMMMd(Localizations.localeOf(context).toString())
.format(document.created),
style: Theme.of(context)
.textTheme
.labelSmall