Remove string casing
This commit is contained in:
@@ -1,83 +1,82 @@
|
||||
{
|
||||
"general": {
|
||||
"appTitle": "Hiddify Next",
|
||||
"reset": "reset",
|
||||
"reset": "Reset",
|
||||
"toggle": {
|
||||
"enabled": "enabled",
|
||||
"disabled": "disabled"
|
||||
"enabled": "Enabled",
|
||||
"disabled": "Disabled"
|
||||
},
|
||||
"sort": "sort",
|
||||
"sortBy": "sort by"
|
||||
"sort": "Sort",
|
||||
"sortBy": "Sort by"
|
||||
},
|
||||
"home": {
|
||||
"pageTitle": "home",
|
||||
"emptyProfilesMsg": "start by adding subscription profile",
|
||||
"noActiveProfileMsg": "select a profile",
|
||||
"pageTitle": "Home",
|
||||
"emptyProfilesMsg": "Start by adding subscription profile",
|
||||
"noActiveProfileMsg": "Select a profile",
|
||||
"connection": {
|
||||
"tapToConnect": "tap to connect",
|
||||
"connecting": "connecting",
|
||||
"disconnecting": "disconnecting",
|
||||
"connected": "connected"
|
||||
"tapToConnect": "Tap to Connect",
|
||||
"connecting": "Connecting",
|
||||
"disconnecting": "Disconnecting",
|
||||
"connected": "Connected"
|
||||
},
|
||||
"stats": {
|
||||
"traffic": "traffic",
|
||||
"trafficTotal": "traffic total",
|
||||
"uplink": "uplink",
|
||||
"downlink": "downlink"
|
||||
"traffic": "Traffic",
|
||||
"trafficTotal": "Traffic total",
|
||||
"uplink": "Uplink",
|
||||
"downlink": "Downlink"
|
||||
}
|
||||
},
|
||||
"profile": {
|
||||
"overviewPageTitle": "profiles",
|
||||
"detailsPageTitle": "profile",
|
||||
"overviewPageTitle": "Profiles",
|
||||
"detailsPageTitle": "Profile",
|
||||
"subscription": {
|
||||
"traffic": "traffic",
|
||||
"updatedTimeAgo": "updated ${timeago}",
|
||||
"traffic": "Traffic",
|
||||
"updatedTimeAgo": "Updated ${timeago}",
|
||||
"remainingDuration": "${duration} days remaining",
|
||||
"expired": "expired",
|
||||
"noTraffic": "no traffic",
|
||||
"gigaByte": "GB"
|
||||
"expired": "Expired",
|
||||
"noTraffic": "No traffic"
|
||||
},
|
||||
"sortBy": {
|
||||
"lastUpdate": "Recently updated",
|
||||
"name": "by Name"
|
||||
},
|
||||
"add": {
|
||||
"buttonText": "add new profile",
|
||||
"shortBtnTxt": "add new",
|
||||
"fromClipboard": "add from clipboard",
|
||||
"buttonText": "Add New Profile",
|
||||
"shortBtnTxt": "Add New",
|
||||
"fromClipboard": "Add From Clipboard",
|
||||
"scanQr": "Scan QR code",
|
||||
"manually": "add manually",
|
||||
"addingProfileMsg": "adding profile",
|
||||
"invalidUrlMsg": "unexpected url"
|
||||
"manually": "Add Manually",
|
||||
"addingProfileMsg": "Adding Profile",
|
||||
"invalidUrlMsg": "Unexpected URL"
|
||||
},
|
||||
"update": {
|
||||
"buttonTxt": "update",
|
||||
"buttonTxt": "Update",
|
||||
"tooltip": "update profile",
|
||||
"failureMsg": "failed to update profile: ${reason}",
|
||||
"successMsg": "successfully updated profile"
|
||||
"failureMsg": "Failed to update profile: ${reason}",
|
||||
"successMsg": "Successfully updated profile"
|
||||
},
|
||||
"edit": {
|
||||
"buttonTxt": "edit"
|
||||
"buttonTxt": "Edit"
|
||||
},
|
||||
"delete": {
|
||||
"buttonTxt": "delete",
|
||||
"confirmationMsg": "delete profile for ever? this can not be undone",
|
||||
"successMsg": "successfully deleted profile"
|
||||
"buttonTxt": "Delete",
|
||||
"confirmationMsg": "Delete profile for ever? This can not be undone",
|
||||
"successMsg": "Successfully deleted profile"
|
||||
},
|
||||
"save": {
|
||||
"buttonText": "save",
|
||||
"successMsg": "successfully saved profile"
|
||||
"buttonText": "Save",
|
||||
"successMsg": "Successfully saved profile"
|
||||
},
|
||||
"detailsForm": {
|
||||
"nameHint": "name",
|
||||
"urlHint": "url",
|
||||
"emptyNameMsg": "name can't be empty",
|
||||
"invalidUrlMsg": "invalid URL"
|
||||
"nameHint": "Name",
|
||||
"urlHint": "URL",
|
||||
"emptyNameMsg": "Name can't be empty",
|
||||
"invalidUrlMsg": "Invalid URL"
|
||||
}
|
||||
},
|
||||
"proxies": {
|
||||
"pageTitle": "proxies",
|
||||
"emptyProxiesMsg": "no proxies",
|
||||
"pageTitle": "Proxies",
|
||||
"emptyProxiesMsg": "No Proxies",
|
||||
"delayTestTooltip": "delay test",
|
||||
"sortTooltip": "sort proxies",
|
||||
"sortOptions": {
|
||||
@@ -87,12 +86,12 @@
|
||||
}
|
||||
},
|
||||
"logs": {
|
||||
"pageTitle": "logs",
|
||||
"clearLogsButtonText": "clear",
|
||||
"filterHint": "filter",
|
||||
"allLevelsFilter": "all",
|
||||
"shareCoreLogs": "share core logs",
|
||||
"shareAppLogs": "share app logs"
|
||||
"pageTitle": "Logs",
|
||||
"clearLogsButtonText": "Clear",
|
||||
"filterHint": "Filter",
|
||||
"allLevelsFilter": "All",
|
||||
"shareCoreLogs": "Share core logs",
|
||||
"shareAppLogs": "Share app logs"
|
||||
},
|
||||
"settings": {
|
||||
"pageTitle": "Settings",
|
||||
@@ -150,12 +149,11 @@
|
||||
}
|
||||
},
|
||||
"about": {
|
||||
"pageTitle": "about",
|
||||
"version": "version",
|
||||
"whatsNew": "what's new",
|
||||
"sourceCode": "source code",
|
||||
"telegramChannel": "telegram channel",
|
||||
"checkForUpdate": "check for update"
|
||||
"pageTitle": "About",
|
||||
"version": "Version",
|
||||
"sourceCode": "Source Code",
|
||||
"telegramChannel": "Telegram Channel",
|
||||
"checkForUpdate": "Check for update"
|
||||
},
|
||||
"appUpdate": {
|
||||
"dialogTitle": "Update Available",
|
||||
|
||||
@@ -34,8 +34,7 @@
|
||||
"updatedTimeAgo": "بروزرسانی شده در ${timeago}",
|
||||
"remainingDuration": "${duration} روز باقی مانده",
|
||||
"expired": "منقضی شده",
|
||||
"noTraffic": "پایان ترافیک",
|
||||
"gigaByte": "گیگ"
|
||||
"noTraffic": "پایان ترافیک"
|
||||
},
|
||||
"sortBy": {
|
||||
"lastUpdate": "اخیرا بروز شده",
|
||||
@@ -152,7 +151,6 @@
|
||||
"about": {
|
||||
"pageTitle": "درباره",
|
||||
"version": "ورژن",
|
||||
"whatsNew": "تغییرات",
|
||||
"sourceCode": "سورس کد",
|
||||
"telegramChannel": "کانال تلگرام",
|
||||
"checkForUpdate": "بررسی آپدیت جدید"
|
||||
|
||||
@@ -9,7 +9,6 @@ import 'package:hiddify/gen/assets.gen.dart';
|
||||
import 'package:hiddify/services/service_providers.dart';
|
||||
import 'package:hiddify/utils/utils.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:recase/recase.dart';
|
||||
|
||||
class AboutPage extends HookConsumerWidget {
|
||||
const AboutPage({super.key});
|
||||
@@ -52,7 +51,7 @@ class AboutPage extends HookConsumerWidget {
|
||||
body: CustomScrollView(
|
||||
slivers: [
|
||||
SliverAppBar(
|
||||
title: Text(t.about.pageTitle.titleCase),
|
||||
title: Text(t.about.pageTitle),
|
||||
),
|
||||
...switch (appVersion) {
|
||||
AsyncData(:final value) => [
|
||||
@@ -68,7 +67,7 @@ class AboutPage extends HookConsumerWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
t.general.appTitle.titleCase,
|
||||
t.general.appTitle,
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
),
|
||||
const Gap(4),
|
||||
@@ -85,7 +84,7 @@ class AboutPage extends HookConsumerWidget {
|
||||
delegate: SliverChildListDelegate(
|
||||
[
|
||||
ListTile(
|
||||
title: Text(t.about.sourceCode.sentenceCase),
|
||||
title: Text(t.about.sourceCode),
|
||||
trailing: const Icon(Icons.open_in_new),
|
||||
onTap: () async {
|
||||
await UriUtils.tryLaunch(
|
||||
@@ -94,7 +93,7 @@ class AboutPage extends HookConsumerWidget {
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: Text(t.about.telegramChannel.sentenceCase),
|
||||
title: Text(t.about.telegramChannel),
|
||||
trailing: const Icon(Icons.open_in_new),
|
||||
onTap: () async {
|
||||
await UriUtils.tryLaunch(
|
||||
@@ -103,7 +102,7 @@ class AboutPage extends HookConsumerWidget {
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: Text(t.about.checkForUpdate.sentenceCase),
|
||||
title: Text(t.about.checkForUpdate),
|
||||
trailing: isCheckingForUpdate
|
||||
? const SizedBox(
|
||||
width: 24,
|
||||
|
||||
@@ -6,7 +6,6 @@ import 'package:hiddify/domain/app/app.dart';
|
||||
import 'package:hiddify/domain/constants.dart';
|
||||
import 'package:hiddify/utils/utils.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:recase/recase.dart';
|
||||
|
||||
// TODO add release notes
|
||||
class NewVersionDialog extends HookConsumerWidget {
|
||||
@@ -34,7 +33,7 @@ class NewVersionDialog extends HookConsumerWidget {
|
||||
final theme = Theme.of(context);
|
||||
|
||||
return AlertDialog(
|
||||
title: Text(t.appUpdate.dialogTitle.titleCase),
|
||||
title: Text(t.appUpdate.dialogTitle),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -78,11 +77,11 @@ class NewVersionDialog extends HookConsumerWidget {
|
||||
// TODO add prefs for ignoring version
|
||||
context.pop();
|
||||
},
|
||||
child: Text(t.appUpdate.ignoreBtnTxt.titleCase),
|
||||
child: Text(t.appUpdate.ignoreBtnTxt),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: context.pop,
|
||||
child: Text(t.appUpdate.laterBtnTxt.titleCase),
|
||||
child: Text(t.appUpdate.laterBtnTxt),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
@@ -90,7 +89,7 @@ class NewVersionDialog extends HookConsumerWidget {
|
||||
Uri.parse(Constants.githubLatestReleaseUrl),
|
||||
);
|
||||
},
|
||||
child: Text(t.appUpdate.updateNowBtnTxt.titleCase),
|
||||
child: Text(t.appUpdate.updateNowBtnTxt),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
@@ -10,7 +10,6 @@ import 'package:hiddify/features/profiles/notifier/notifier.dart';
|
||||
import 'package:hiddify/utils/utils.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:percent_indicator/percent_indicator.dart';
|
||||
import 'package:recase/recase.dart';
|
||||
|
||||
class ProfileTile extends HookConsumerWidget {
|
||||
const ProfileTile({
|
||||
@@ -232,7 +231,7 @@ class ProfileActionsMenu extends HookConsumerWidget {
|
||||
menuChildren: [
|
||||
MenuItemButton(
|
||||
leadingIcon: const Icon(Icons.update),
|
||||
child: Text(t.profile.update.buttonTxt.titleCase),
|
||||
child: Text(t.profile.update.buttonTxt),
|
||||
onPressed: () {
|
||||
if (updateProfileMutation.state.isInProgress) {
|
||||
return;
|
||||
@@ -246,22 +245,22 @@ class ProfileActionsMenu extends HookConsumerWidget {
|
||||
),
|
||||
MenuItemButton(
|
||||
leadingIcon: const Icon(Icons.edit),
|
||||
child: Text(t.profile.edit.buttonTxt.titleCase),
|
||||
child: Text(t.profile.edit.buttonTxt),
|
||||
onPressed: () async {
|
||||
await ProfileDetailsRoute(profile.id).push(context);
|
||||
},
|
||||
),
|
||||
MenuItemButton(
|
||||
leadingIcon: const Icon(Icons.delete),
|
||||
child: Text(t.profile.delete.buttonTxt.titleCase),
|
||||
child: Text(t.profile.delete.buttonTxt),
|
||||
onPressed: () async {
|
||||
if (deleteProfileMutation.state.isInProgress) {
|
||||
return;
|
||||
}
|
||||
final deleteConfirmed = await showConfirmationDialog(
|
||||
context,
|
||||
title: t.profile.delete.buttonTxt.titleCase,
|
||||
message: t.profile.delete.confirmationMsg.sentenceCase,
|
||||
title: t.profile.delete.buttonTxt,
|
||||
message: t.profile.delete.confirmationMsg,
|
||||
);
|
||||
if (deleteConfirmed) {
|
||||
deleteProfileMutation.setFuture(
|
||||
|
||||
@@ -5,7 +5,6 @@ import 'package:hiddify/domain/singbox/singbox.dart';
|
||||
import 'package:hiddify/features/common/stats/stats_notifier.dart';
|
||||
import 'package:hiddify/utils/utils.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:recase/recase.dart';
|
||||
|
||||
class StatsOverview extends HookConsumerWidget {
|
||||
const StatsOverview({super.key});
|
||||
@@ -23,25 +22,25 @@ class StatsOverview extends HookConsumerWidget {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
_StatCard(
|
||||
title: t.home.stats.traffic.titleCase,
|
||||
title: t.home.stats.traffic,
|
||||
firstStat: (
|
||||
label: t.home.stats.uplink.titleCase,
|
||||
label: t.home.stats.uplink,
|
||||
data: stats.uplink.speed(),
|
||||
),
|
||||
secondStat: (
|
||||
label: t.home.stats.downlink.titleCase,
|
||||
label: t.home.stats.downlink,
|
||||
data: stats.downlink.speed(),
|
||||
),
|
||||
),
|
||||
const Gap(8),
|
||||
_StatCard(
|
||||
title: t.home.stats.trafficTotal.titleCase,
|
||||
title: t.home.stats.trafficTotal,
|
||||
firstStat: (
|
||||
label: t.home.stats.uplink.titleCase,
|
||||
label: t.home.stats.uplink,
|
||||
data: stats.uplinkTotal.size(),
|
||||
),
|
||||
secondStat: (
|
||||
label: t.home.stats.downlink.titleCase,
|
||||
label: t.home.stats.downlink,
|
||||
data: stats.downlinkTotal.size(),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -9,7 +9,7 @@ import 'package:hiddify/features/common/common.dart';
|
||||
import 'package:hiddify/features/home/widgets/widgets.dart';
|
||||
import 'package:hiddify/utils/utils.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:recase/recase.dart';
|
||||
|
||||
import 'package:sliver_tools/sliver_tools.dart';
|
||||
|
||||
class HomePage extends HookConsumerWidget {
|
||||
@@ -30,7 +30,7 @@ class HomePage extends HookConsumerWidget {
|
||||
NestedTabAppBar(
|
||||
title: Row(
|
||||
children: [
|
||||
Text(t.general.appTitle.titleCase),
|
||||
Text(t.general.appTitle),
|
||||
const Gap(4),
|
||||
const AppVersionLabel(),
|
||||
],
|
||||
|
||||
@@ -9,7 +9,6 @@ import 'package:hiddify/features/common/connectivity/connectivity_controller.dar
|
||||
import 'package:hiddify/gen/assets.gen.dart';
|
||||
import 'package:hiddify/utils/alerts.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:recase/recase.dart';
|
||||
|
||||
// TODO: rewrite
|
||||
class ConnectionButton extends HookConsumerWidget {
|
||||
@@ -128,7 +127,7 @@ class _ConnectionButton extends StatelessWidget {
|
||||
),
|
||||
const Gap(16),
|
||||
Text(
|
||||
label.sentenceCase,
|
||||
label,
|
||||
style: Theme.of(context).textTheme.bodyLarge,
|
||||
),
|
||||
],
|
||||
|
||||
@@ -3,7 +3,6 @@ import 'package:gap/gap.dart';
|
||||
import 'package:hiddify/core/core_providers.dart';
|
||||
import 'package:hiddify/core/router/router.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:recase/recase.dart';
|
||||
|
||||
class EmptyProfilesHomeBody extends HookConsumerWidget {
|
||||
const EmptyProfilesHomeBody({super.key});
|
||||
@@ -17,12 +16,12 @@ class EmptyProfilesHomeBody extends HookConsumerWidget {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(t.home.emptyProfilesMsg.sentenceCase),
|
||||
Text(t.home.emptyProfilesMsg),
|
||||
const Gap(16),
|
||||
OutlinedButton.icon(
|
||||
onPressed: () => const AddProfileRoute().push(context),
|
||||
icon: const Icon(Icons.add),
|
||||
label: Text(t.profile.add.buttonText.titleCase),
|
||||
label: Text(t.profile.add.buttonText),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -42,11 +41,11 @@ class EmptyActiveProfileHomeBody extends HookConsumerWidget {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(t.home.noActiveProfileMsg.sentenceCase),
|
||||
Text(t.home.noActiveProfileMsg),
|
||||
const Gap(16),
|
||||
OutlinedButton(
|
||||
onPressed: () => const ProfilesRoute().push(context),
|
||||
child: Text(t.profile.overviewPageTitle.titleCase),
|
||||
child: Text(t.profile.overviewPageTitle),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -11,7 +11,7 @@ import 'package:hiddify/features/logs/notifier/notifier.dart';
|
||||
import 'package:hiddify/services/service_providers.dart';
|
||||
import 'package:hiddify/utils/utils.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:recase/recase.dart';
|
||||
|
||||
import 'package:tint/tint.dart';
|
||||
|
||||
class LogsPage extends HookConsumerWidget with PresLogger {
|
||||
@@ -29,7 +29,7 @@ class LogsPage extends HookConsumerWidget with PresLogger {
|
||||
final List<PopupMenuEntry> popupButtons = debug || PlatformUtils.isDesktop
|
||||
? [
|
||||
PopupMenuItem(
|
||||
child: Text(t.logs.shareCoreLogs.sentenceCase),
|
||||
child: Text(t.logs.shareCoreLogs),
|
||||
onTap: () async {
|
||||
await UriUtils.tryShareOrLaunchFile(
|
||||
Uri.parse(filesEditor.coreLogsPath),
|
||||
@@ -38,7 +38,7 @@ class LogsPage extends HookConsumerWidget with PresLogger {
|
||||
},
|
||||
),
|
||||
PopupMenuItem(
|
||||
child: Text(t.logs.shareAppLogs.sentenceCase),
|
||||
child: Text(t.logs.shareAppLogs),
|
||||
onTap: () async {
|
||||
await UriUtils.tryShareOrLaunchFile(
|
||||
Uri.parse(filesEditor.appLogsPath),
|
||||
@@ -55,7 +55,7 @@ class LogsPage extends HookConsumerWidget with PresLogger {
|
||||
appBar: AppBar(
|
||||
// TODO: fix height
|
||||
toolbarHeight: 90,
|
||||
title: Text(t.logs.pageTitle.titleCase),
|
||||
title: Text(t.logs.pageTitle),
|
||||
actions: [
|
||||
if (popupButtons.isNotEmpty)
|
||||
PopupMenuButton(
|
||||
@@ -76,7 +76,7 @@ class LogsPage extends HookConsumerWidget with PresLogger {
|
||||
onChanged: notifier.filterMessage,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
hintText: t.logs.filterHint.sentenceCase,
|
||||
hintText: t.logs.filterHint,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -92,12 +92,12 @@ class LogsPage extends HookConsumerWidget with PresLogger {
|
||||
items: [
|
||||
DropdownMenuItem(
|
||||
value: none(),
|
||||
child: Text(t.logs.allLevelsFilter.sentenceCase),
|
||||
child: Text(t.logs.allLevelsFilter),
|
||||
),
|
||||
...LogLevel.values.takeFirst(3).map(
|
||||
(e) => DropdownMenuItem(
|
||||
value: some(e),
|
||||
child: Text(e.name.sentenceCase),
|
||||
child: Text(e.name),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -136,7 +136,7 @@ class LogsPage extends HookConsumerWidget with PresLogger {
|
||||
body: CustomScrollView(
|
||||
slivers: [
|
||||
NestedTabAppBar(
|
||||
title: Text(t.logs.pageTitle.titleCase),
|
||||
title: Text(t.logs.pageTitle),
|
||||
),
|
||||
SliverErrorBodyPlaceholder(t.printError(error)),
|
||||
],
|
||||
@@ -148,7 +148,7 @@ class LogsPage extends HookConsumerWidget with PresLogger {
|
||||
body: CustomScrollView(
|
||||
slivers: [
|
||||
NestedTabAppBar(
|
||||
title: Text(t.logs.pageTitle.titleCase),
|
||||
title: Text(t.logs.pageTitle),
|
||||
),
|
||||
const SliverLoadingBodyPlaceholder(),
|
||||
],
|
||||
|
||||
@@ -7,7 +7,6 @@ import 'package:hiddify/features/common/confirmation_dialogs.dart';
|
||||
import 'package:hiddify/features/profile_detail/notifier/notifier.dart';
|
||||
import 'package:hiddify/utils/utils.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:recase/recase.dart';
|
||||
|
||||
// TODO: test and improve
|
||||
// TODO: prevent popping screen when busy
|
||||
@@ -41,8 +40,7 @@ class ProfileDetailPage extends HookConsumerWidget with PresLogger {
|
||||
case MutationFailure(:final failure):
|
||||
CustomToast.error(t.printError(failure)).show(context);
|
||||
case MutationSuccess():
|
||||
CustomToast.success(t.profile.save.successMsg.sentenceCase)
|
||||
.show(context);
|
||||
CustomToast.success(t.profile.save.successMsg).show(context);
|
||||
WidgetsBinding.instance.addPostFrameCallback(
|
||||
(_) {
|
||||
if (context.mounted) context.pop();
|
||||
@@ -61,8 +59,7 @@ class ProfileDetailPage extends HookConsumerWidget with PresLogger {
|
||||
case MutationFailure(:final failure):
|
||||
CustomToast.error(t.printError(failure)).show(context);
|
||||
case MutationSuccess():
|
||||
CustomToast.success(t.profile.delete.successMsg.sentenceCase)
|
||||
.show(context);
|
||||
CustomToast.success(t.profile.delete.successMsg).show(context);
|
||||
WidgetsBinding.instance.addPostFrameCallback(
|
||||
(_) {
|
||||
if (context.mounted) context.pop();
|
||||
@@ -82,7 +79,7 @@ class ProfileDetailPage extends HookConsumerWidget with PresLogger {
|
||||
slivers: [
|
||||
SliverAppBar(
|
||||
pinned: true,
|
||||
title: Text(t.profile.detailsPageTitle.titleCase),
|
||||
title: Text(t.profile.detailsPageTitle),
|
||||
),
|
||||
const SliverGap(8),
|
||||
SliverPadding(
|
||||
@@ -102,7 +99,7 @@ class ProfileDetailPage extends HookConsumerWidget with PresLogger {
|
||||
validator: (value) => (value?.isEmpty ?? true)
|
||||
? t.profile.detailsForm.emptyNameMsg
|
||||
: null,
|
||||
label: t.profile.detailsForm.nameHint.titleCase,
|
||||
label: t.profile.detailsForm.nameHint,
|
||||
),
|
||||
const Gap(16),
|
||||
CustomTextFormField(
|
||||
@@ -142,10 +139,8 @@ class ProfileDetailPage extends HookConsumerWidget with PresLogger {
|
||||
final deleteConfirmed =
|
||||
await showConfirmationDialog(
|
||||
context,
|
||||
title:
|
||||
t.profile.delete.buttonTxt.titleCase,
|
||||
message: t.profile.delete.confirmationMsg
|
||||
.sentenceCase,
|
||||
title: t.profile.delete.buttonTxt,
|
||||
message: t.profile.delete.confirmationMsg,
|
||||
);
|
||||
if (deleteConfirmed) {
|
||||
await notifier.delete();
|
||||
@@ -157,7 +152,7 @@ class ProfileDetailPage extends HookConsumerWidget with PresLogger {
|
||||
),
|
||||
),
|
||||
child: Text(
|
||||
t.profile.delete.buttonTxt.titleCase,
|
||||
t.profile.delete.buttonTxt,
|
||||
style: TextStyle(
|
||||
color: themeData
|
||||
.colorScheme.onErrorContainer,
|
||||
@@ -166,8 +161,7 @@ class ProfileDetailPage extends HookConsumerWidget with PresLogger {
|
||||
),
|
||||
OutlinedButton(
|
||||
onPressed: notifier.save,
|
||||
child:
|
||||
Text(t.profile.save.buttonText.titleCase),
|
||||
child: Text(t.profile.save.buttonText),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -10,7 +10,6 @@ import 'package:hiddify/features/common/qr_code_scanner_screen.dart';
|
||||
import 'package:hiddify/features/profiles/notifier/notifier.dart';
|
||||
import 'package:hiddify/utils/utils.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:recase/recase.dart';
|
||||
|
||||
class AddProfileModal extends HookConsumerWidget {
|
||||
const AddProfileModal({
|
||||
@@ -34,8 +33,7 @@ class AddProfileModal extends HookConsumerWidget {
|
||||
CustomAlertDialog.fromErr(t.presentError(err)).show(context);
|
||||
},
|
||||
initialOnSuccess: () {
|
||||
CustomToast.success(t.profile.save.successMsg.sentenceCase)
|
||||
.show(context);
|
||||
CustomToast.success(t.profile.save.successMsg).show(context);
|
||||
WidgetsBinding.instance.addPostFrameCallback(
|
||||
(_) {
|
||||
if (context.mounted) context.pop();
|
||||
@@ -79,7 +77,7 @@ class AddProfileModal extends HookConsumerWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
t.profile.add.addingProfileMsg.sentenceCase,
|
||||
t.profile.add.addingProfileMsg,
|
||||
style: theme.textTheme.bodySmall,
|
||||
),
|
||||
const Gap(8),
|
||||
@@ -98,7 +96,7 @@ class AddProfileModal extends HookConsumerWidget {
|
||||
child: Row(
|
||||
children: [
|
||||
_Button(
|
||||
label: t.profile.add.fromClipboard.sentenceCase,
|
||||
label: t.profile.add.fromClipboard,
|
||||
icon: Icons.content_paste,
|
||||
size: buttonWidth,
|
||||
onTap: () async {
|
||||
@@ -117,7 +115,7 @@ class AddProfileModal extends HookConsumerWidget {
|
||||
} else {
|
||||
if (context.mounted) {
|
||||
CustomToast.error(
|
||||
t.profile.add.invalidUrlMsg.sentenceCase,
|
||||
t.profile.add.invalidUrlMsg,
|
||||
).show(context);
|
||||
}
|
||||
}
|
||||
@@ -148,7 +146,7 @@ class AddProfileModal extends HookConsumerWidget {
|
||||
} else {
|
||||
if (context.mounted) {
|
||||
CustomToast.error(
|
||||
t.profile.add.invalidUrlMsg.sentenceCase,
|
||||
t.profile.add.invalidUrlMsg,
|
||||
).show(context);
|
||||
}
|
||||
}
|
||||
@@ -156,7 +154,7 @@ class AddProfileModal extends HookConsumerWidget {
|
||||
)
|
||||
else
|
||||
_Button(
|
||||
label: t.profile.add.manually.sentenceCase,
|
||||
label: t.profile.add.manually,
|
||||
icon: Icons.add,
|
||||
size: buttonWidth,
|
||||
onTap: () async {
|
||||
@@ -198,7 +196,7 @@ class AddProfileModal extends HookConsumerWidget {
|
||||
),
|
||||
const Gap(8),
|
||||
Text(
|
||||
t.profile.add.manually.sentenceCase,
|
||||
t.profile.add.manually,
|
||||
style: theme.textTheme.labelLarge?.copyWith(
|
||||
color: theme.colorScheme.primary,
|
||||
),
|
||||
|
||||
@@ -9,7 +9,6 @@ import 'package:hiddify/features/common/common.dart';
|
||||
import 'package:hiddify/features/profiles/notifier/notifier.dart';
|
||||
import 'package:hiddify/utils/utils.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:recase/recase.dart';
|
||||
|
||||
class ProfilesModal extends HookConsumerWidget {
|
||||
const ProfilesModal({
|
||||
@@ -57,7 +56,7 @@ class ProfilesModal extends HookConsumerWidget {
|
||||
const AddProfileRoute().push(context);
|
||||
},
|
||||
icon: const Icon(Icons.add),
|
||||
label: Text(t.profile.add.shortBtnTxt.titleCase),
|
||||
label: Text(t.profile.add.shortBtnTxt),
|
||||
),
|
||||
FilledButton.icon(
|
||||
onPressed: () {
|
||||
@@ -69,7 +68,7 @@ class ProfilesModal extends HookConsumerWidget {
|
||||
);
|
||||
},
|
||||
icon: const Icon(Icons.sort),
|
||||
label: Text(t.general.sort.titleCase),
|
||||
label: Text(t.general.sort),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -88,7 +87,7 @@ class ProfilesSortModal extends HookConsumerWidget {
|
||||
final t = ref.watch(translationsProvider);
|
||||
|
||||
return AlertDialog(
|
||||
title: Text(t.general.sortBy.titleCase),
|
||||
title: Text(t.general.sortBy),
|
||||
content: Consumer(
|
||||
builder: (context, ref, child) {
|
||||
final sort = ref.watch(profilesSortNotifierProvider);
|
||||
|
||||
@@ -6,7 +6,6 @@ import 'package:hiddify/features/proxies/notifier/notifier.dart';
|
||||
import 'package:hiddify/features/proxies/widgets/widgets.dart';
|
||||
import 'package:hiddify/utils/utils.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:recase/recase.dart';
|
||||
|
||||
class ProxiesPage extends HookConsumerWidget with PresLogger {
|
||||
const ProxiesPage({super.key});
|
||||
@@ -31,13 +30,13 @@ class ProxiesPage extends HookConsumerWidget with PresLogger {
|
||||
body: CustomScrollView(
|
||||
slivers: [
|
||||
NestedTabAppBar(
|
||||
title: Text(t.proxies.pageTitle.titleCase),
|
||||
title: Text(t.proxies.pageTitle),
|
||||
),
|
||||
SliverFillRemaining(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(t.proxies.emptyProxiesMsg.titleCase),
|
||||
Text(t.proxies.emptyProxiesMsg),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -52,7 +51,7 @@ class ProxiesPage extends HookConsumerWidget with PresLogger {
|
||||
body: CustomScrollView(
|
||||
slivers: [
|
||||
NestedTabAppBar(
|
||||
title: Text(t.proxies.pageTitle.titleCase),
|
||||
title: Text(t.proxies.pageTitle),
|
||||
actions: [
|
||||
PopupMenuButton<ProxiesSort>(
|
||||
initialValue: sortBy,
|
||||
@@ -131,7 +130,7 @@ class ProxiesPage extends HookConsumerWidget with PresLogger {
|
||||
),
|
||||
floatingActionButton: FloatingActionButton(
|
||||
onPressed: () async => notifier.urlTest(group.tag),
|
||||
tooltip: t.proxies.delayTestTooltip.titleCase,
|
||||
tooltip: t.proxies.delayTestTooltip,
|
||||
child: const Icon(Icons.bolt),
|
||||
),
|
||||
);
|
||||
@@ -141,7 +140,7 @@ class ProxiesPage extends HookConsumerWidget with PresLogger {
|
||||
body: CustomScrollView(
|
||||
slivers: [
|
||||
NestedTabAppBar(
|
||||
title: Text(t.proxies.pageTitle.titleCase),
|
||||
title: Text(t.proxies.pageTitle),
|
||||
),
|
||||
SliverErrorBodyPlaceholder(
|
||||
t.printError(error),
|
||||
@@ -156,7 +155,7 @@ class ProxiesPage extends HookConsumerWidget with PresLogger {
|
||||
body: CustomScrollView(
|
||||
slivers: [
|
||||
NestedTabAppBar(
|
||||
title: Text(t.proxies.pageTitle.titleCase),
|
||||
title: Text(t.proxies.pageTitle),
|
||||
),
|
||||
const SliverLoadingBodyPlaceholder(),
|
||||
],
|
||||
|
||||
@@ -3,7 +3,6 @@ import 'package:hiddify/core/core_providers.dart';
|
||||
import 'package:hiddify/core/router/router.dart';
|
||||
import 'package:hiddify/features/common/stats/stats_overview.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:recase/recase.dart';
|
||||
|
||||
class DesktopWrapper extends HookConsumerWidget {
|
||||
const DesktopWrapper(this.navigator, {super.key});
|
||||
@@ -19,23 +18,23 @@ class DesktopWrapper extends HookConsumerWidget {
|
||||
final destinations = [
|
||||
NavigationRailDestination(
|
||||
icon: const Icon(Icons.power_settings_new),
|
||||
label: Text(t.home.pageTitle.titleCase),
|
||||
label: Text(t.home.pageTitle),
|
||||
),
|
||||
NavigationRailDestination(
|
||||
icon: const Icon(Icons.filter_list),
|
||||
label: Text(t.proxies.pageTitle.titleCase),
|
||||
label: Text(t.proxies.pageTitle),
|
||||
),
|
||||
NavigationRailDestination(
|
||||
icon: const Icon(Icons.article),
|
||||
label: Text(t.logs.pageTitle.titleCase),
|
||||
label: Text(t.logs.pageTitle),
|
||||
),
|
||||
NavigationRailDestination(
|
||||
icon: const Icon(Icons.settings),
|
||||
label: Text(t.settings.pageTitle.titleCase),
|
||||
label: Text(t.settings.pageTitle),
|
||||
),
|
||||
NavigationRailDestination(
|
||||
icon: const Icon(Icons.info),
|
||||
label: Text(t.about.pageTitle.titleCase),
|
||||
label: Text(t.about.pageTitle),
|
||||
),
|
||||
];
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ import 'package:hiddify/core/core_providers.dart';
|
||||
import 'package:hiddify/core/router/router.dart';
|
||||
import 'package:hiddify/features/common/common.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:recase/recase.dart';
|
||||
|
||||
class MobileWrapper extends HookConsumerWidget {
|
||||
const MobileWrapper(this.navigator, {super.key});
|
||||
@@ -30,19 +29,19 @@ class MobileWrapper extends HookConsumerWidget {
|
||||
children: [
|
||||
const Gap(16),
|
||||
DrawerTile(
|
||||
label: t.settings.pageTitle.titleCase,
|
||||
label: t.settings.pageTitle,
|
||||
icon: Icons.settings,
|
||||
selected: location == SettingsRoute.path,
|
||||
onSelect: () => const SettingsRoute().push(context),
|
||||
),
|
||||
DrawerTile(
|
||||
label: t.logs.pageTitle.titleCase,
|
||||
label: t.logs.pageTitle,
|
||||
icon: Icons.article,
|
||||
selected: location == LogsRoute.path,
|
||||
onSelect: () => const LogsRoute().push(context),
|
||||
),
|
||||
DrawerTile(
|
||||
label: t.about.pageTitle.titleCase,
|
||||
label: t.about.pageTitle,
|
||||
icon: Icons.info,
|
||||
selected: location == AboutRoute.path,
|
||||
onSelect: () => const AboutRoute().push(context),
|
||||
@@ -56,11 +55,11 @@ class MobileWrapper extends HookConsumerWidget {
|
||||
destinations: [
|
||||
NavigationDestination(
|
||||
icon: const Icon(Icons.power_settings_new),
|
||||
label: t.home.pageTitle.titleCase,
|
||||
label: t.home.pageTitle,
|
||||
),
|
||||
NavigationDestination(
|
||||
icon: const Icon(Icons.filter_list),
|
||||
label: t.proxies.pageTitle.titleCase,
|
||||
label: t.proxies.pageTitle,
|
||||
),
|
||||
],
|
||||
selectedIndex: currentIndex > 1 ? 0 : currentIndex,
|
||||
|
||||
@@ -966,7 +966,7 @@ packages:
|
||||
source: hosted
|
||||
version: "2.2.2"
|
||||
recase:
|
||||
dependency: "direct main"
|
||||
dependency: transitive
|
||||
description:
|
||||
name: recase
|
||||
sha256: e4eb4ec2dcdee52dcf99cb4ceabaffc631d7424ee55e56f280bc039737f89213
|
||||
|
||||
@@ -17,7 +17,6 @@ dependencies:
|
||||
intl: ^0.18.1
|
||||
slang: ^3.23.0
|
||||
slang_flutter: ^3.23.0
|
||||
recase: ^4.1.0
|
||||
timeago: ^3.5.0
|
||||
flutter_localized_locales: ^2.0.4
|
||||
|
||||
|
||||
Reference in New Issue
Block a user