From 9c5f8aceb6ef620e881f50fe65cb4a2c6b1e8527 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Tue, 20 Jan 2026 10:00:39 +0100 Subject: [PATCH] home-manager: improve a few i18n strings --- home-manager/home-manager | 4 +- home-manager/po/home-manager.pot | 60 ++++++++++++++--------------- modules/lib-bash/activation-init.sh | 6 +-- modules/po/hm-modules.pot | 36 +++++++++-------- 4 files changed, 55 insertions(+), 51 deletions(-) diff --git a/home-manager/home-manager b/home-manager/home-manager index c6763cc6..569a5642 100644 --- a/home-manager/home-manager +++ b/home-manager/home-manager @@ -284,7 +284,7 @@ function doInspectOption() { NIXOS_OPTION_NIX=$(nix-store -q --references "${NIXOS_OPTION_REAL}" | grep 'nixos-option\.nix$') if [[ ! -f "$NIXOS_OPTION_NIX" ]]; then - _iError "nixos-option.nix not found." + errorEcho "home-manager option: could not find nixos-option.nix" >&2 exit 1 fi @@ -819,7 +819,7 @@ function doSwitch() { if [[ -v specialisation ]]; then activateScript="$generation/specialisation/$specialisation/activate" if [[ ! -x $activateScript ]]; then - _iError 'The configuration did not contain the specialisation "%s"' "$specialisation" + _iError 'The configuration does not contain the specialisation "%s"' "$specialisation" exit 1 fi fi diff --git a/home-manager/po/home-manager.pot b/home-manager/po/home-manager.pot index 662ea0e8..7c19711d 100644 --- a/home-manager/po/home-manager.pot +++ b/home-manager/po/home-manager.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2025-07-22 10:59+0200\n" +"POT-Creation-Date: 2026-01-20 13:03+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -91,29 +91,29 @@ msgstr "" msgid "Can't inspect options of a flake configuration" msgstr "" -#: home-manager/home-manager:305 home-manager/home-manager:328 -#: home-manager/home-manager:734 home-manager/home-manager:1237 +#: home-manager/home-manager:340 home-manager/home-manager:363 +#: home-manager/home-manager:769 home-manager/home-manager:1289 msgid "%s: unknown option '%s'" msgstr "" -#: home-manager/home-manager:310 home-manager/home-manager:1238 +#: home-manager/home-manager:345 home-manager/home-manager:1290 msgid "Run '%s --help' for usage help" msgstr "" -#: home-manager/home-manager:336 home-manager/home-manager:441 +#: home-manager/home-manager:371 home-manager/home-manager:476 msgid "The file %s already exists, leaving it unchanged..." msgstr "" -#: home-manager/home-manager:338 home-manager/home-manager:443 +#: home-manager/home-manager:373 home-manager/home-manager:478 msgid "Creating %s..." msgstr "" -#: home-manager/home-manager:487 +#: home-manager/home-manager:522 msgid "Creating initial Home Manager generation..." msgstr "" #. translators: The "%s" specifier will be replaced by a file path. -#: home-manager/home-manager:492 +#: home-manager/home-manager:527 msgid "" "All done! The home-manager tool should now be installed and you can edit\n" "\n" @@ -124,7 +124,7 @@ msgid "" msgstr "" #. translators: The "%s" specifier will be replaced by a URL. -#: home-manager/home-manager:497 +#: home-manager/home-manager:532 msgid "" "Uh oh, the installation failed! Please create an issue at\n" "\n" @@ -134,11 +134,11 @@ msgid "" msgstr "" #. translators: Here "flake" is a noun that refers to the Nix Flakes feature. -#: home-manager/home-manager:508 +#: home-manager/home-manager:543 msgid "Can't instantiate a flake configuration" msgstr "" -#: home-manager/home-manager:584 +#: home-manager/home-manager:619 msgid "" "There is %d unread and relevant news item.\n" "Read it by running the command \"%s news\"." @@ -148,76 +148,76 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: home-manager/home-manager:598 +#: home-manager/home-manager:633 msgid "Unknown \"news.display\" setting \"%s\"." msgstr "" -#: home-manager/home-manager:606 +#: home-manager/home-manager:641 #, sh-format msgid "Please set the $EDITOR or $VISUAL environment variable" msgstr "" -#: home-manager/home-manager:624 +#: home-manager/home-manager:659 msgid "Cannot run build in read-only directory" msgstr "" -#: home-manager/home-manager:787 -msgid "The configuration did not contain the specialisation \"%s\"" +#: home-manager/home-manager:822 +msgid "The configuration does not contain the specialisation \"%s\"" msgstr "" -#: home-manager/home-manager:841 +#: home-manager/home-manager:876 msgid "No generation with ID %s" msgstr "" -#: home-manager/home-manager:843 +#: home-manager/home-manager:878 msgid "Cannot remove the current generation %s" msgstr "" -#: home-manager/home-manager:845 +#: home-manager/home-manager:880 msgid "Removing generation %s" msgstr "" -#: home-manager/home-manager:866 +#: home-manager/home-manager:901 msgid "No generations to expire" msgstr "" -#: home-manager/home-manager:877 +#: home-manager/home-manager:912 msgid "No home-manager packages seem to be installed." msgstr "" -#: home-manager/home-manager:962 +#: home-manager/home-manager:997 msgid "Unknown argument %s" msgstr "" -#: home-manager/home-manager:987 +#: home-manager/home-manager:1022 msgid "This will remove Home Manager from your system." msgstr "" -#: home-manager/home-manager:990 +#: home-manager/home-manager:1025 msgid "This is a dry run, nothing will actually be uninstalled." msgstr "" -#: home-manager/home-manager:994 +#: home-manager/home-manager:1029 msgid "Really uninstall Home Manager?" msgstr "" -#: home-manager/home-manager:1000 +#: home-manager/home-manager:1035 msgid "Switching to empty Home Manager configuration..." msgstr "" -#: home-manager/home-manager:1015 +#: home-manager/home-manager:1050 msgid "Yay!" msgstr "" -#: home-manager/home-manager:1020 +#: home-manager/home-manager:1055 msgid "Home Manager is uninstalled but your home.nix is left untouched." msgstr "" -#: home-manager/home-manager:1285 +#: home-manager/home-manager:1334 msgid "expire-generations expects one argument, got %d." msgstr "" -#: home-manager/home-manager:1310 +#: home-manager/home-manager:1359 msgid "Unknown command: %s" msgstr "" diff --git a/modules/lib-bash/activation-init.sh b/modules/lib-bash/activation-init.sh index f8fe1103..20223c01 100755 --- a/modules/lib-bash/activation-init.sh +++ b/modules/lib-bash/activation-init.sh @@ -103,7 +103,7 @@ function checkUsername() { local expectedUser="$1" if [[ "$USER" != "$expectedUser" ]]; then - _iError 'Error: USER is set to "%s" but we expect "%s"' "$USER" "$expectedUser" + _iError 'Environment variable USER is set to "%s" but we expect "%s"' "$USER" "$expectedUser" exit 1 fi } @@ -112,7 +112,7 @@ function checkHomeDirectory() { local expectedHome="$1" if ! [[ $HOME -ef $expectedHome ]]; then - _iError 'Error: HOME is set to "%s" but we expect "%s"' "$HOME" "$expectedHome" + _iError 'Environment variable HOME is set to "%s" but we expect "%s"' "$HOME" "$expectedHome" exit 1 fi } @@ -123,7 +123,7 @@ function checkUid() { actualUid="$(id -u)" if [[ "$actualUid" != "$expectedUid" ]]; then - _iError 'Error: UID is "%s" but we expect "%s"' "$actualUid" "$expectedUid" + _iError 'Environment variable UID is "%s" but we expect "%s"' "$actualUid" "$expectedUid" exit 1 fi } diff --git a/modules/po/hm-modules.pot b/modules/po/hm-modules.pot index 6d5bbe5b..85e4a06d 100644 --- a/modules/po/hm-modules.pot +++ b/modules/po/hm-modules.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Home Manager Modules\n" "Report-Msgid-Bugs-To: https://github.com/nix-community/home-manager/issues\n" -"POT-Creation-Date: 2025-07-22 10:59+0200\n" +"POT-Creation-Date: 2026-01-20 13:03+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,23 +17,23 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: modules/files.nix:206 +#: modules/files.nix:214 msgid "Creating home file links in %s" msgstr "" -#: modules/files.nix:219 +#: modules/files.nix:227 msgid "Cleaning up orphan links from %s" msgstr "" -#: modules/home-environment.nix:647 +#: modules/home-environment.nix:680 msgid "Creating new profile generation" msgstr "" -#: modules/home-environment.nix:650 +#: modules/home-environment.nix:683 msgid "No change so reusing latest profile generation" msgstr "" -#: modules/home-environment.nix:699 +#: modules/home-environment.nix:732 msgid "" "Oops, Nix failed to install your new Home Manager profile!\n" "\n" @@ -49,11 +49,11 @@ msgid "" "Then try activating your Home Manager configuration again." msgstr "" -#: modules/home-environment.nix:735 +#: modules/home-environment.nix:768 msgid "Activating %s" msgstr "" -#: modules/home-environment.nix:807 +#: modules/home-environment.nix:840 msgid "%s: unknown option '%s'" msgstr "" @@ -66,33 +66,37 @@ msgid "Could not find suitable profile directory, tried %s and %s" msgstr "" #: modules/lib-bash/activation-init.sh:106 -msgid "Error: USER is set to \"%s\" but we expect \"%s\"" +msgid "Environment variable USER is set to \"%s\" but we expect \"%s\"" msgstr "" #: modules/lib-bash/activation-init.sh:115 -msgid "Error: HOME is set to \"%s\" but we expect \"%s\"" +msgid "Environment variable HOME is set to \"%s\" but we expect \"%s\"" msgstr "" -#: modules/lib-bash/activation-init.sh:132 +#: modules/lib-bash/activation-init.sh:126 +msgid "Environment variable UID is \"%s\" but we expect \"%s\"" +msgstr "" + +#: modules/lib-bash/activation-init.sh:143 msgid "Starting Home Manager activation" msgstr "" -#: modules/lib-bash/activation-init.sh:136 +#: modules/lib-bash/activation-init.sh:147 msgid "Sanity checking Nix" msgstr "" -#: modules/lib-bash/activation-init.sh:149 +#: modules/lib-bash/activation-init.sh:160 msgid "This is a dry run" msgstr "" -#: modules/lib-bash/activation-init.sh:153 +#: modules/lib-bash/activation-init.sh:164 msgid "This is a live run" msgstr "" -#: modules/lib-bash/activation-init.sh:159 +#: modules/lib-bash/activation-init.sh:170 msgid "Using Nix version: %s" msgstr "" -#: modules/lib-bash/activation-init.sh:162 +#: modules/lib-bash/activation-init.sh:173 msgid "Activation variables:" msgstr ""