Skip to content

Commit

Permalink
Fix: locale inconsistencies
Browse files Browse the repository at this point in the history
  • Loading branch information
matbme committed Aug 12, 2023
1 parent 2e96385 commit 4c7ccbb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 72 deletions.
1 change: 1 addition & 0 deletions cmd/kargs.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ package cmd

import (
"errors"

"github.com/spf13/cobra"

"github.com/vanilla-os/abroot/core"
Expand Down
8 changes: 1 addition & 7 deletions cmd/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
81 changes: 16 additions & 65 deletions locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand All @@ -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\
Expand All @@ -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."
Expand All @@ -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"

0 comments on commit 4c7ccbb

Please sign in to comment.