Logo word gap; translate welcome, cfdisk, and partitioning progress strings

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QKxGW1raAWaqeU8WdHsMsp
This commit is contained in:
2026-08-25 01:43:21 -04:00
co-authored by Claude Fable 5
parent 84514840f5
commit 1245b749af
2 changed files with 130 additions and 32 deletions
+122 -24
View File
@@ -38,10 +38,10 @@ index 16904f8..780ff6a 100644
export OMARCHY_MIRROR="$(cat /root/omarchy_mirror)" export OMARCHY_MIRROR="$(cat /root/omarchy_mirror)"
if [[ -f /root/omarchy_iso_ref ]]; then if [[ -f /root/omarchy_iso_ref ]]; then
diff --git a/configs/airootfs/root/configurator b/configs/airootfs/root/configurator diff --git a/configs/airootfs/root/configurator b/configs/airootfs/root/configurator
index 4cd3db3..92f7421 100644 index 4cd3db3..24a1bf8 100644
--- a/configs/airootfs/root/configurator --- a/configs/airootfs/root/configurator
+++ b/configs/airootfs/root/configurator +++ b/configs/airootfs/root/configurator
@@ -9,6 +9,133 @@ OMARCHY_SETTINGS_PACKAGE="${OMARCHY_SETTINGS_PACKAGE:-omarchy-settings}" @@ -9,6 +9,165 @@ OMARCHY_SETTINGS_PACKAGE="${OMARCHY_SETTINGS_PACKAGE:-omarchy-settings}"
LOGO_PATH="$OMARCHY_PATH/logo.txt" LOGO_PATH="$OMARCHY_PATH/logo.txt"
@@ -108,6 +108,22 @@ index 4cd3db3..92f7421 100644
+ L_WIPE_CONFIRM='确认覆写 %s' + L_WIPE_CONFIRM='确认覆写 %s'
+ L_TAGLINE_W=38 + L_TAGLINE_W=38
+ L_HINT_W=14 + L_HINT_W=14
+ L_WELCOME='开始设置你的机器……'
+ L_OWNER_HINT='按 Ctrl+C 可改为「为他人准备这台机器」。'
+ L_CFDISK_CONFIRM='打开 %s 的分区工具?'
+ L_OPEN_CFDISK='打开 cfdisk'
+ L_DS_GPT='初始化 %s 的 GPT'
+ L_DS_ESPFLAG='标记分区 %s 为 ESP'
+ L_DS_WIPE='清除 %s 的残留签名'
+ L_DS_MKBTRFS='在 %s 创建 Btrfs 文件系统'
+ L_DS_MOUNT='挂载 %s'
+ L_DS_SUBVOL='创建子卷 %s'
+ L_DS_MOUNTROOT='挂载目标根分区'
+ L_DS_MOUNTHOME='挂载 /home'
+ L_DS_MOUNTLOG='挂载 /var/log'
+ L_DS_MOUNTCACHE='挂载软件包缓存'
+ L_DS_MKESP='在 %s 创建 ESP 文件系统'
+ L_DS_MOUNTESP='挂载 ESP'
+else +else
+ L_TAGLINE='Beautiful, Modern & Opinionated Linux by DHH' + L_TAGLINE='Beautiful, Modern & Opinionated Linux by DHH'
+ L_HINT='Press Return to Start Install' + L_HINT='Press Return to Start Install'
@@ -170,12 +186,28 @@ index 4cd3db3..92f7421 100644
+ L_WIPE_CONFIRM='Confirm overwriting %s' + L_WIPE_CONFIRM='Confirm overwriting %s'
+ L_TAGLINE_W=44 + L_TAGLINE_W=44
+ L_HINT_W=29 + L_HINT_W=29
+ L_WELCOME="Let's setup your machine..."
+ L_OWNER_HINT='Press Ctrl+C to prepare this machine for another owner.'
+ L_CFDISK_CONFIRM='Open partition tool for %s?'
+ L_OPEN_CFDISK='Open cfdisk'
+ L_DS_GPT='initializing GPT on %s'
+ L_DS_ESPFLAG='flagging partition %s as ESP'
+ L_DS_WIPE='clearing stale signatures on %s'
+ L_DS_MKBTRFS='creating the Btrfs filesystem on %s'
+ L_DS_MOUNT='mounting %s'
+ L_DS_SUBVOL='creating subvolume %s'
+ L_DS_MOUNTROOT='mounting the target root'
+ L_DS_MOUNTHOME='mounting /home'
+ L_DS_MOUNTLOG='mounting /var/log'
+ L_DS_MOUNTCACHE='mounting the package cache'
+ L_DS_MKESP='creating the ESP filesystem on %s'
+ L_DS_MOUNTESP='mounting the ESP'
+fi +fi
+ +
# The setup form — keyboard, account, hostname, and timezone questions, plus the # The setup form — keyboard, account, hostname, and timezone questions, plus the
# rules their answers are checked against — shared verbatim with the first-boot # rules their answers are checked against — shared verbatim with the first-boot
# owner setup that finishes a deferred install. build-iso.sh vendors it out of # owner setup that finishes a deferred install. build-iso.sh vendors it out of
@@ -122,12 +249,12 @@ greeter() { @@ -122,12 +281,12 @@ greeter() {
printf '\033[%d;1H' "$logo_row" printf '\033[%d;1H' "$logo_row"
gum style --foreground 2 --padding "0 0 0 $PADDING_LEFT" "$(<"$LOGO_PATH")" gum style --foreground 2 --padding "0 0 0 $PADDING_LEFT" "$(<"$LOGO_PATH")"
@@ -192,7 +224,7 @@ index 4cd3db3..92f7421 100644
printf '\033[%d;%dH\033[2m%s\033[0m' "$hint_row" "$((hpad + 1))" "$hint" printf '\033[%d;%dH\033[2m%s\033[0m' "$hint_row" "$((hpad + 1))" "$hint"
# ColorShift the logo: a green base (indexed color 2) with a cyan accent (6) # ColorShift the logo: a green base (indexed color 2) with a cyan accent (6)
@@ -176,9 +303,9 @@ greeter() { @@ -176,9 +335,9 @@ greeter() {
} }
abort() { abort() {
@@ -204,7 +236,18 @@ index 4cd3db3..92f7421 100644
exit 1 exit 1
} }
@@ -245,11 +372,11 @@ keyboard_form() { @@ -212,8 +371,8 @@ keyboard_form() {
while true; do
clear_logo
echo
- say "Let's setup your machine..."
- say --foreground 8 "Press Ctrl+C to prepare this machine for another owner."
+ say "$L_WELCOME"
+ say --foreground 8 "$L_OWNER_HINT"
echo
omarchy_prompt_keyboard && status=0 || status=$?
@@ -245,11 +404,11 @@ keyboard_form() {
confirm_prepare_for_another_owner() { confirm_prepare_for_another_owner() {
clear_logo clear_logo
echo echo
@@ -220,7 +263,7 @@ index 4cd3db3..92f7421 100644
} }
# The user step. Deferred-provisioning installs skip it entirely — the machine's first owner # The user step. Deferred-provisioning installs skip it entirely — the machine's first owner
@@ -257,7 +384,7 @@ confirm_prepare_for_another_owner() { @@ -257,7 +416,7 @@ confirm_prepare_for_another_owner() {
# operator sets nothing user-specific. # operator sets nothing user-specific.
user_form() { user_form() {
@@ -229,7 +272,7 @@ index 4cd3db3..92f7421 100644
# Each prompt reports 0 (set), OMARCHY_FORM_BACK (Esc), or OMARCHY_FORM_SIGNAL # Each prompt reports 0 (set), OMARCHY_FORM_BACK (Esc), or OMARCHY_FORM_SIGNAL
# (Ctrl+C). Both non-zero cases unwind to user_step, which decides what they # (Ctrl+C). Both non-zero cases unwind to user_step, which decides what they
@@ -291,18 +418,18 @@ user_step() { @@ -291,18 +450,18 @@ user_step() {
fi fi
# Add manual padding since gum table -p doesn't respect padding # Add manual padding since gum table -p doesn't respect padding
@@ -257,7 +300,7 @@ index 4cd3db3..92f7421 100644
break break
else else
keyboard_form keyboard_form
@@ -504,11 +631,11 @@ print_dry_run_files() { @@ -504,11 +663,11 @@ print_dry_run_files() {
# action so users have a way to actually fix the situation. # action so users have a way to actually fix the situation.
not_enough_space() { not_enough_space() {
local available="${1:-0}" local available="${1:-0}"
@@ -273,7 +316,7 @@ index 4cd3db3..92f7421 100644
open_partition_tool open_partition_tool
fi fi
return 1 return 1
@@ -518,14 +645,14 @@ not_enough_space() { @@ -518,14 +677,14 @@ not_enough_space() {
# encryption confirm. Sets the globals run_partition_execute needs. Returns 1 # encryption confirm. Sets the globals run_partition_execute needs. Returns 1
# to fall back to the install-mode picker. # to fall back to the install-mode picker.
run_partition_decide() { run_partition_decide() {
@@ -293,7 +336,7 @@ index 4cd3db3..92f7421 100644
fi fi
# Omarchy always creates its own dedicated ESP in free space and never # Omarchy always creates its own dedicated ESP in free space and never
@@ -534,17 +661,17 @@ run_partition_decide() { @@ -534,17 +693,17 @@ run_partition_decide() {
# Windows ESP is far too small for our Unified Kernel Images, and a shared # Windows ESP is far too small for our Unified Kernel Images, and a shared
# ESP forces the install unencrypted. A separate Linux ESP keeps Windows # ESP forces the install unencrypted. A separate Linux ESP keeps Windows
# and Omarchy fully isolated and keeps LUKS on the table. # and Omarchy fully isolated and keeps LUKS on the table.
@@ -316,7 +359,7 @@ index 4cd3db3..92f7421 100644
partprobe "$disk" 2>/dev/null || true partprobe "$disk" 2>/dev/null || true
sleep 1 sleep 1
@@ -619,21 +746,21 @@ run_partition_decide() { @@ -619,21 +778,21 @@ run_partition_decide() {
while true; do while true; do
clear_logo clear_logo
echo echo
@@ -344,17 +387,35 @@ index 4cd3db3..92f7421 100644
confirm_status=$? confirm_status=$?
case $confirm_status in case $confirm_status in
@@ -691,7 +818,7 @@ run_partition_execute() { @@ -691,9 +850,9 @@ run_partition_execute() {
say "[dry] partition numbers are assigned by parted at creation, then read back" say "[dry] partition numbers are assigned by parted at creation, then read back"
say "[dry] encrypted=$encrypt_installation kernel=$kernel_choice" say "[dry] encrypted=$encrypt_installation kernel=$kernel_choice"
else else
- step "Creating partitions on $disk" - step "Creating partitions on $disk"
+ step "$(printf "$L_MKPART_STEP" "$disk")" + step "$(printf "$L_MKPART_STEP" "$disk")"
if $needs_mklabel; then if $needs_mklabel; then
disk_step "initializing GPT on $disk" parted --script "$disk" mklabel gpt - disk_step "initializing GPT on $disk" parted --script "$disk" mklabel gpt
+ disk_step "$(printf "$L_DS_GPT" "$disk")" parted --script "$disk" mklabel gpt
partprobe "$disk" 2>/dev/null || true partprobe "$disk" 2>/dev/null || true
@@ -729,7 +856,7 @@ run_partition_execute() { sleep 1
disk_step "clearing stale signatures on $root_partition_device" wipefs -af "$root_partition_device" fi
@@ -709,7 +868,7 @@ run_partition_execute() {
disk_abort_hook "Could not create the root partition on $disk"
root_part_num="$created_partition_number"
- disk_step "flagging partition $efi_part_num as ESP" \
+ disk_step "$(printf "$L_DS_ESPFLAG" "$efi_part_num")" \
parted --script "$disk" set "$efi_part_num" esp on
efi_dev=$(partition_path "$disk" "$efi_part_num")
@@ -725,11 +884,11 @@ run_partition_execute() {
# Both partitions are ours and brand new, but the space they occupy may
# carry signatures from whatever was deleted to free it.
- disk_step "clearing stale signatures on $efi_dev" wipefs -af "$efi_dev"
- disk_step "clearing stale signatures on $root_partition_device" wipefs -af "$root_partition_device"
+ disk_step "$(printf "$L_DS_WIPE" "$efi_dev")" wipefs -af "$efi_dev"
+ disk_step "$(printf "$L_DS_WIPE" "$root_partition_device")" wipefs -af "$root_partition_device"
if [[ "$encrypt_installation" == "true" ]]; then if [[ "$encrypt_installation" == "true" ]]; then
- step "Setting up LUKS2 on $root_partition_device" - step "Setting up LUKS2 on $root_partition_device"
@@ -362,16 +423,49 @@ index 4cd3db3..92f7421 100644
# Kept as pipes rather than routed through disk_step: the passphrase must # Kept as pipes rather than routed through disk_step: the passphrase must
# not become an argv the process table can show. Folding stderr into # not become an argv the process table can show. Folding stderr into
# stdout still lands any error in the install log. # stdout still lands any error in the install log.
@@ -746,7 +873,7 @@ run_partition_execute() { @@ -746,31 +905,31 @@ run_partition_execute() {
root_mapper="$root_partition_device" root_mapper="$root_partition_device"
fi fi
- step "Creating Btrfs filesystem and subvolumes" - step "Creating Btrfs filesystem and subvolumes"
- disk_step "creating the Btrfs filesystem on $root_mapper" \
+ step "$L_BTRFS_STEP" + step "$L_BTRFS_STEP"
disk_step "creating the Btrfs filesystem on $root_mapper" \ + disk_step "$(printf "$L_DS_MKBTRFS" "$root_mapper")" \
mkfs.btrfs -f -L OMARCHY "$root_mapper" mkfs.btrfs -f -L OMARCHY "$root_mapper"
wait_for_device "$root_mapper" || disk_abort_hook "Root device $root_mapper never appeared" wait_for_device "$root_mapper" || disk_abort_hook "Root device $root_mapper never appeared"
@@ -862,7 +989,7 @@ _EOF_
mkdir -p /mnt/btrfs-root
- disk_step "mounting $root_mapper" mount "$root_mapper" /mnt/btrfs-root
+ disk_step "$(printf "$L_DS_MOUNT" "$root_mapper")" mount "$root_mapper" /mnt/btrfs-root
for subvol in @ @home @log @pkg; do
- disk_step "creating subvolume $subvol" btrfs subvolume create "/mnt/btrfs-root/$subvol"
+ disk_step "$(printf "$L_DS_SUBVOL" "$subvol")" btrfs subvolume create "/mnt/btrfs-root/$subvol"
done
umount /mnt/btrfs-root
rmdir /mnt/btrfs-root
- disk_step "mounting the target root" \
+ disk_step "$L_DS_MOUNTROOT" \
mount -o noatime,compress=zstd,subvol=@ "$root_mapper" /mnt
mkdir -p /mnt/home /mnt/var/log /mnt/var/cache/pacman/pkg /mnt"$esp_mount_in_target"
- disk_step "mounting /home" \
+ disk_step "$L_DS_MOUNTHOME" \
mount -o noatime,compress=zstd,subvol=@home "$root_mapper" /mnt/home
- disk_step "mounting /var/log" \
+ disk_step "$L_DS_MOUNTLOG" \
mount -o noatime,compress=zstd,subvol=@log "$root_mapper" /mnt/var/log
- disk_step "mounting the package cache" \
+ disk_step "$L_DS_MOUNTCACHE" \
mount -o noatime,compress=zstd,subvol=@pkg "$root_mapper" /mnt/var/cache/pacman/pkg
- disk_step "creating the ESP filesystem on $efi_dev" mkfs.fat -F32 -n OMARCHY_EFI "$efi_dev"
- disk_step "mounting the ESP" mount "$efi_dev" /mnt"$esp_mount_in_target"
+ disk_step "$(printf "$L_DS_MKESP" "$efi_dev")" mkfs.fat -F32 -n OMARCHY_EFI "$efi_dev"
+ disk_step "$L_DS_MOUNTESP" mount "$efi_dev" /mnt"$esp_mount_in_target"
# The orchestrator's first act is to verify this handoff. Check it here so
# a failure names the step that broke rather than surfacing later as
@@ -862,7 +1021,7 @@ _EOF_
} }
disk_form() { disk_form() {
@@ -380,7 +474,7 @@ index 4cd3db3..92f7421 100644
# Don't offer the install media as an option (Arch ISO mounts it here) # Don't offer the install media as an option (Arch ISO mounts it here)
local boot_source local boot_source
@@ -888,16 +1015,16 @@ disk_form() { @@ -888,19 +1047,19 @@ disk_form() {
fi fi
done <<<"$available_disks" done <<<"$available_disks"
@@ -400,8 +494,12 @@ index 4cd3db3..92f7421 100644
+ gum style --foreground 8 "$L_PT_2" + gum style --foreground 8 "$L_PT_2"
gum style --foreground 8 "Tip: free-space install needs at least 32GB unallocated, plus 2GB more if no ESP already exists." gum style --foreground 8 "Tip: free-space install needs at least 32GB unallocated, plus 2GB more if no ESP already exists."
echo echo
gum confirm --affirmative "Open cfdisk" --negative "Back" "Open partition tool for $disk?" || return 0 - gum confirm --affirmative "Open cfdisk" --negative "Back" "Open partition tool for $disk?" || return 0
@@ -933,17 +1060,17 @@ requires_full_disk_install() { + gum confirm --affirmative "$L_OPEN_CFDISK" --negative "$L_BACK" "$(printf "$L_CFDISK_CONFIRM" "$disk")" || return 0
clear
cfdisk "$disk" || true
@@ -933,17 +1092,17 @@ requires_full_disk_install() {
} }
install_mode_form() { install_mode_form() {
@@ -424,7 +522,7 @@ index 4cd3db3..92f7421 100644
} }
confirm_disk_overwrite() { confirm_disk_overwrite() {
@@ -953,17 +1080,17 @@ confirm_disk_overwrite() { @@ -953,17 +1112,17 @@ confirm_disk_overwrite() {
while true; do while true; do
clear_logo clear_logo
echo echo
@@ -447,7 +545,7 @@ index 4cd3db3..92f7421 100644
confirm_status=$? confirm_status=$?
case $confirm_status in case $confirm_status in
@@ -1002,13 +1129,13 @@ select_installation() { @@ -1002,13 +1161,13 @@ select_installation() {
# With no free-space option to offer, a full-disk install is the only # With no free-space option to offer, a full-disk install is the only
# mode, so skip the picker and go straight to the overwrite confirm. # mode, so skip the picker and go straight to the overwrite confirm.
if $full_disk_only; then if $full_disk_only; then
@@ -463,7 +561,7 @@ index 4cd3db3..92f7421 100644
if confirm_disk_overwrite; then if confirm_disk_overwrite; then
install_target="full_disk" install_target="full_disk"
return 0 return 0
@@ -1017,13 +1144,13 @@ select_installation() { @@ -1017,13 +1176,13 @@ select_installation() {
# wants a different disk. # wants a different disk.
$full_disk_only && disk_form $full_disk_only && disk_form
;; ;;