diff --git a/cmd/kargs.go b/cmd/kargs.go index fa10f0b7..ccbd2cca 100644 --- a/cmd/kargs.go +++ b/cmd/kargs.go @@ -15,6 +15,7 @@ package cmd import ( "errors" + "github.com/spf13/cobra" "github.com/vanilla-os/abroot/core" diff --git a/cmd/status.go b/cmd/status.go index c6d9f2fd..39b1626d 100644 --- a/cmd/status.go +++ b/cmd/status.go @@ -85,13 +85,7 @@ func status(cmd *cobra.Command, args []string) error { return nil } - cmdr.Info.Printf(`ABRoot Partitions: - - Present: %s - - Future: %s - `, - present.Label, - future.Label, - ) + cmdr.Info.Printf(abroot.Trans("status.infoMsg"), present.Label, future.Label) return nil } diff --git a/locales/en.yml b/locales/en.yml index 226ace85..56e80013 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -6,22 +6,6 @@ abroot: \ between 2 root partitions (A<->B)" verboseFlag: "show more detailed output" -update: - use: "_update-boot" - long: "Update the boot partition for maintenance purposes (for advanced users only)" - short: "Update the boot partition" - forceUpdateFlag: "force update the boot partition without asking for confirmation" - confirm: "Are you sure you want to proceed?\nThe boot partition should be updated\ - \ only if a transaction succeeded. This\ncommand should be used by advanced users\ - \ for maintenance purposes." - rootRequired: "You must be root to run this command." - -get: - use: "get" - long: "Outputs the present or future root partition state (A or B)" - short: "Outputs the present or future root partition state (A or B)" - rootRequired: "You must be root to run this command." - kargs: use: "kargs" long: "Manage kernel parameters." @@ -32,7 +16,6 @@ kargs: stateRequired: "Please specify a state (present or future)" params: "Current partition's parameters:\n%s\n" futureParams: "Future partition's parameters:\n%s\n" - unknownState: "Unknown state: %s\n" unknownParam: "Unknown parameter: %s\n" notChanged: "No changes were made to kernel parameters." transactionsLocked: "Another transaction has already been executed, you must reboot\ @@ -44,54 +27,6 @@ edit: short: "edit kernel parameters." rootRequired: "You must be root to run this command." -exec: - use: "exec" - long: "Execute a command in a transactional shell in the future root and switch\ - \ to it on next boot" - short: "Execute a command in a transactional shell in the future root and switch\ - \ to it on next boot" - rootRequired: "You must be root to run this command." - skipDiffFlag: "Skip the diff check at the end of the transaction" - forceRunFlag: "Force run the command without asking for confirmation" - confirm: "\n===============================================================================\n\ - PLEASE READ CAREFULLY BEFORE PROCEEDING\n===============================================================================\n\ - Changes made in the shell will be applied to the future root on next boot on\n\ - successful.\nRunning a command in a transactional shell is meant to be used by\ - \ advanced users\nfor maintenance purposes.\n\nIf you ended up here trying to\ - \ install an application, consider using\nFlatpak/Appimage or Apx (apx install\ - \ package) instead.\n\nRead more about ABRoot at [https://documentation.vanillaos.org/docs/ABRoot/].\n\ - \nAre you sure you want to proceed?" - start: "New transaction started. This may take a while...\nDo not reboot or cancel\ - \ the transaction until it is finished." - success: "Transaction completed successfully. Reboot to apply changes." - failed: "Failed to start transactional shell:" - -shell: - use: "shell" - long: "Enter a transactional shell in the future root partition and switch root\ - \ on the next boot" - short: "Enter a transactional shell" - rootRequired: "You must be root to run this command." - forceOpenFlag: "Force open the shell without asking for confirmation" - confirm: "\n===============================================================================\n\ - PLEASE READ CAREFULLY BEFORE PROCEEDING\n===============================================================================\n\ - Changes made in the shell will be applied to the future root on next boot on\n\ - successful.\nRunning a command in a transactional shell is meant to be used by\ - \ advanced users\nfor maintenance purposes.\n\nIf you ended up here trying to\ - \ install an application, consider using\nFlatpak/Appimage or Apx (apx install\ - \ package) instead.\n\nRead more about ABRoot at [https://documentation.vanillaos.org/docs/ABRoot/].\n\ - \nAre you sure you want to proceed?" - start: "New transaction started. This may take a while...\nDo not reboot or cancel\ - \ the transaction until it is finished." - success: "Transaction completed successfully. Reboot to apply changes." - failed: "Failed to start transactional shell:" - -diff: - use: "diff" - long: "List modifications made to the filesystem in the latest transaction" - short: "Show modifications from latest transaction." - rootRequired: "You must be root to run this command." - rollback: use: "rollback" long: "Executes a system rollback, discarding changes made to the present root." @@ -104,3 +39,19 @@ pkg: addedMsg: "Package(s) %s added.\n" removedMsg: "Package(s) %s removed.\n" listMsg: "Added packages:\n%s\nRemoved packages:\n%s\n" + +status: + long: "" + short: "" + jsonFlag: "show output in JSON format" + rootRequired: "You must be root to run this command." + infoMsg: "ABRoot Partitions:\n\t- Present: %s\n\t- Future: %s\n" + +upgrade: + long: "Update the boot partition for maintenance purposes (for advanced users only)" + short: "Update the boot partition" + forceFlag: "force update the boot partition without asking for confirmation" + rootRequired: "You must be root to run this command." + updateAvailable: "There is an update for your system." + noUpdateAvailable: "No update is available for your system." + checkOnlyFlag: "check for updates but do not apply them"