diff --git a/docs/commands.md b/docs/commands.md index 08c2f71..ab2b7b1 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -561,9 +561,9 @@ Usage: discloud user info [arguments] Set your locale Usage: discloud user locale [arguments] --h, --help Print this usage information. --l, --locale= --s, --system Use current system language (en_US) +-h, --help Print this usage information. +-l, --locale= (mandatory) +-s, --system Use current system language (en_US) ``` ### zip diff --git a/lib/commands/user/locale.dart b/lib/commands/user/locale.dart index 3d16688..a5735f7 100644 --- a/lib/commands/user/locale.dart +++ b/lib/commands/user/locale.dart @@ -6,7 +6,7 @@ import "package:discloud/utils/messages.dart"; final class UserLocaleCommand extends Command { UserLocaleCommand() { argParser - ..addOption("locale", abbr: "l", valueHelp: localeName) + ..addOption("locale", abbr: "l", mandatory: true, valueHelp: localeName) ..addFlag( "system", abbr: "s", diff --git a/lib/extensions/duration.dart b/lib/extensions/duration.dart index a4c9f6f..0e2cd81 100644 --- a/lib/extensions/duration.dart +++ b/lib/extensions/duration.dart @@ -8,7 +8,7 @@ extension DurationExtension on Duration { static final DurationLocale _durationLocale = .fromLanguageCode(Platform.localeName) ?? .fromLanguageCode(Intl.shortLocale(Platform.localeName)) ?? - const EnglishDurationLocale(); + englishLocale; String pretty({ bool abbreviated = true,