🌐 Localize new stuff
This commit is contained in:
@@ -944,5 +944,21 @@
|
|||||||
"unpinPostHint": "Are you sure you want to unpin this post?",
|
"unpinPostHint": "Are you sure you want to unpin this post?",
|
||||||
"all": "All",
|
"all": "All",
|
||||||
"statusPresent": "Present",
|
"statusPresent": "Present",
|
||||||
"accountAutomated": "Automated"
|
"accountAutomated": "Automated",
|
||||||
}
|
"chatBreakClearButton": "Clear",
|
||||||
|
"chatBreak5m": "5m",
|
||||||
|
"chatBreak10m": "10m",
|
||||||
|
"chatBreak15m": "15m",
|
||||||
|
"chatBreak30m": "30m",
|
||||||
|
"chatBreakCustomMinutes": "Custom (minutes)",
|
||||||
|
"chatBreakEnterMinutes": "Enter minutes",
|
||||||
|
"errorGeneric": "Error: {}",
|
||||||
|
"searchMessages": "Search Messages",
|
||||||
|
"messagesCount": "{} messages",
|
||||||
|
"dotSeparator": "·",
|
||||||
|
"roleValidationHint": "Role must be between 0 and 100",
|
||||||
|
"searchMessagesHint": "Search messages...",
|
||||||
|
"searchLinks": "Links",
|
||||||
|
"searchAttachments": "Attachments",
|
||||||
|
"noMessagesFound": "No messages found"
|
||||||
|
}
|
@@ -140,7 +140,7 @@ class ChatDetailScreen extends HookConsumerWidget {
|
|||||||
const Text('chatBreakDescription').tr(),
|
const Text('chatBreakDescription').tr(),
|
||||||
const Gap(16),
|
const Gap(16),
|
||||||
ListTile(
|
ListTile(
|
||||||
title: const Text('Clear').tr(),
|
title: const Text('chatBreakClearButton').tr(),
|
||||||
subtitle: const Text('chatBreakClear').tr(),
|
subtitle: const Text('chatBreakClear').tr(),
|
||||||
leading: const Icon(Icons.notifications_active),
|
leading: const Icon(Icons.notifications_active),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@@ -152,8 +152,8 @@ class ChatDetailScreen extends HookConsumerWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
title: const Text('5m'),
|
title: const Text('chatBreak5m').tr(),
|
||||||
subtitle: const Text('chatBreakHour').tr(args: ['5m']),
|
subtitle: const Text('chatBreakHour').tr(args: ['chatBreak5m'.tr()]),
|
||||||
leading: const Icon(Symbols.circle),
|
leading: const Icon(Symbols.circle),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
setChatBreak(now.add(const Duration(minutes: 5)));
|
setChatBreak(now.add(const Duration(minutes: 5)));
|
||||||
@@ -164,8 +164,8 @@ class ChatDetailScreen extends HookConsumerWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
title: const Text('10m'),
|
title: const Text('chatBreak10m').tr(),
|
||||||
subtitle: const Text('chatBreakHour').tr(args: ['10m']),
|
subtitle: const Text('chatBreakHour').tr(args: ['chatBreak10m'.tr()]),
|
||||||
leading: const Icon(Symbols.circle),
|
leading: const Icon(Symbols.circle),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
setChatBreak(now.add(const Duration(minutes: 10)));
|
setChatBreak(now.add(const Duration(minutes: 10)));
|
||||||
@@ -176,8 +176,8 @@ class ChatDetailScreen extends HookConsumerWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
title: const Text('15m'),
|
title: const Text('chatBreak15m').tr(),
|
||||||
subtitle: const Text('chatBreakHour').tr(args: ['15m']),
|
subtitle: const Text('chatBreakHour').tr(args: ['chatBreak15m'.tr()]),
|
||||||
leading: const Icon(Symbols.timer_3),
|
leading: const Icon(Symbols.timer_3),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
setChatBreak(now.add(const Duration(minutes: 15)));
|
setChatBreak(now.add(const Duration(minutes: 15)));
|
||||||
@@ -188,8 +188,8 @@ class ChatDetailScreen extends HookConsumerWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
title: const Text('30m'),
|
title: const Text('chatBreak30m').tr(),
|
||||||
subtitle: const Text('chatBreakHour').tr(args: ['30m']),
|
subtitle: const Text('chatBreakHour').tr(args: ['chatBreak30m'.tr()]),
|
||||||
leading: const Icon(Symbols.timer),
|
leading: const Icon(Symbols.timer),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
setChatBreak(now.add(const Duration(minutes: 30)));
|
setChatBreak(now.add(const Duration(minutes: 30)));
|
||||||
@@ -203,8 +203,8 @@ class ChatDetailScreen extends HookConsumerWidget {
|
|||||||
TextField(
|
TextField(
|
||||||
controller: durationController,
|
controller: durationController,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
labelText: 'Custom (minutes)'.tr(),
|
labelText: 'chatBreakCustomMinutes'.tr(),
|
||||||
hintText: 'Enter minutes'.tr(),
|
hintText: 'chatBreakEnterMinutes'.tr(),
|
||||||
border: const OutlineInputBorder(),
|
border: const OutlineInputBorder(),
|
||||||
suffixIcon: IconButton(
|
suffixIcon: IconButton(
|
||||||
icon: const Icon(Icons.check),
|
icon: const Icon(Icons.check),
|
||||||
@@ -247,7 +247,7 @@ class ChatDetailScreen extends HookConsumerWidget {
|
|||||||
return AppScaffold(
|
return AppScaffold(
|
||||||
body: roomState.when(
|
body: roomState.when(
|
||||||
loading: () => const Center(child: CircularProgressIndicator()),
|
loading: () => const Center(child: CircularProgressIndicator()),
|
||||||
error: (error, _) => Center(child: Text('Error: $error')),
|
error: (error, _) => Center(child: Text('errorGeneric'.tr(args: [error.toString()]))),
|
||||||
data:
|
data:
|
||||||
(currentRoom) => CustomScrollView(
|
(currentRoom) => CustomScrollView(
|
||||||
slivers: [
|
slivers: [
|
||||||
@@ -373,11 +373,11 @@ class ChatDetailScreen extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
leading: const Icon(Icons.search),
|
leading: const Icon(Icons.search),
|
||||||
trailing: const Icon(Symbols.chevron_right),
|
trailing: const Icon(Symbols.chevron_right),
|
||||||
title: const Text('Search Messages').tr(),
|
title: const Text('searchMessages').tr(),
|
||||||
subtitle: totalMessages.when(
|
subtitle: totalMessages.when(
|
||||||
data: (count) => Text('$count messages').tr(),
|
data: (count) => Text('messagesCount'.tr(args: [count.toString()])),
|
||||||
loading: () => const CircularProgressIndicator(),
|
loading: () => const CircularProgressIndicator(),
|
||||||
error: (err, stack) => Text('Error: $err'),
|
error: (err, stack) => Text('errorGeneric'.tr(args: [err.toString()])),
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
context.pushNamed('searchMessages', pathParameters: {'id': id});
|
context.pushNamed('searchMessages', pathParameters: {'id': id});
|
||||||
@@ -716,7 +716,7 @@ class _ChatMemberListSheet extends HookConsumerWidget {
|
|||||||
? 'permissionModerator'
|
? 'permissionModerator'
|
||||||
: 'permissionMember',
|
: 'permissionMember',
|
||||||
).tr(),
|
).tr(),
|
||||||
Text('·').bold().padding(horizontal: 6),
|
Text('dotSeparator').bold().padding(horizontal: 6),
|
||||||
Expanded(child: Text("@${member.account.name}")),
|
Expanded(child: Text("@${member.account.name}")),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -876,7 +876,7 @@ class _ChatMemberRoleSheet extends HookConsumerWidget {
|
|||||||
try {
|
try {
|
||||||
final newRole = int.parse(roleController.text);
|
final newRole = int.parse(roleController.text);
|
||||||
if (newRole < 0 || newRole > 100) {
|
if (newRole < 0 || newRole > 100) {
|
||||||
throw 'Role must be between 0 and 100';
|
throw 'roleValidationHint'.tr();
|
||||||
}
|
}
|
||||||
|
|
||||||
final apiClient = ref.read(apiClientProvider);
|
final apiClient = ref.read(apiClientProvider);
|
||||||
|
@@ -32,7 +32,7 @@ class SearchMessagesScreen extends HookConsumerWidget {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return AppScaffold(
|
return AppScaffold(
|
||||||
appBar: AppBar(title: const Text('Search Messages')),
|
appBar: AppBar(title: const Text('searchMessages').tr()),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
Column(
|
Column(
|
||||||
@@ -40,7 +40,7 @@ class SearchMessagesScreen extends HookConsumerWidget {
|
|||||||
TextField(
|
TextField(
|
||||||
controller: searchController,
|
controller: searchController,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: 'Search messages...',
|
hintText: 'searchMessagesHint'.tr(),
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
isDense: true,
|
isDense: true,
|
||||||
contentPadding: EdgeInsets.only(
|
contentPadding: EdgeInsets.only(
|
||||||
@@ -72,7 +72,7 @@ class SearchMessagesScreen extends HookConsumerWidget {
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: CheckboxListTile(
|
child: CheckboxListTile(
|
||||||
secondary: const Icon(Symbols.link),
|
secondary: const Icon(Symbols.link),
|
||||||
title: const Text('Links'),
|
title: const Text('searchLinks').tr(),
|
||||||
value: withLinks.value,
|
value: withLinks.value,
|
||||||
onChanged: (bool? value) {
|
onChanged: (bool? value) {
|
||||||
withLinks.value = value!;
|
withLinks.value = value!;
|
||||||
@@ -87,7 +87,7 @@ class SearchMessagesScreen extends HookConsumerWidget {
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: CheckboxListTile(
|
child: CheckboxListTile(
|
||||||
secondary: const Icon(Symbols.file_copy),
|
secondary: const Icon(Symbols.file_copy),
|
||||||
title: const Text('Attachments'),
|
title: const Text('searchAttachments').tr(),
|
||||||
value: withAttachments.value,
|
value: withAttachments.value,
|
||||||
onChanged: (bool? value) {
|
onChanged: (bool? value) {
|
||||||
withAttachments.value = value!;
|
withAttachments.value = value!;
|
||||||
@@ -109,7 +109,7 @@ class SearchMessagesScreen extends HookConsumerWidget {
|
|||||||
data:
|
data:
|
||||||
(messageList) =>
|
(messageList) =>
|
||||||
messageList.isEmpty
|
messageList.isEmpty
|
||||||
? Center(child: Text('No messages found'.tr()))
|
? Center(child: Text('noMessagesFound'.tr()))
|
||||||
: SuperListView.builder(
|
: SuperListView.builder(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||||
reverse: true, // Show newest messages at the bottom
|
reverse: true, // Show newest messages at the bottom
|
||||||
@@ -129,7 +129,7 @@ class SearchMessagesScreen extends HookConsumerWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
loading: () => const Center(child: CircularProgressIndicator()),
|
loading: () => const Center(child: CircularProgressIndicator()),
|
||||||
error: (error, _) => Center(child: Text('Error: $error')),
|
error: (error, _) => Center(child: Text('errorGeneric'.tr(args: [error.toString()]))),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
Reference in New Issue
Block a user