Offer to log out after a region switch, in the new region's language
This commit is contained in:
1 parent
a77c246d38
commit
f9c36b2f3b
3 files changed
+29
-3
No files matched your search
+13
-1
@@ -47,4 +47,16 @@ else
|
||||
omarchy-setup-claude-api --remove
|
||||
fi
|
||||
|
||||
echo "Region set to ${1^}. Log out and back in to switch the language and developer mirrors."
|
||||
# The language and the developer mirrors reach only a new session, so offer one in the new language.
|
||||
if [[ $1 == "china" ]]; then
|
||||
prompt="立即注销,切换到中文界面和国内镜像?" log_out="立即注销" later="稍后"
|
||||
reminder="区域已设为中国。重新登录后切换到中文界面和国内镜像。"
|
||||
else
|
||||
prompt="Log out now to switch to English and the global mirrors?" log_out="Log out now" later="Later"
|
||||
reminder="Region set to Global. Log back in to switch to English and the global mirrors."
|
||||
fi
|
||||
if [[ -t 0 && -t 1 ]] && gum confirm --affirmative "$log_out" --negative "$later" "$prompt"; then
|
||||
omarchy-system-logout
|
||||
else
|
||||
echo "$reminder"
|
||||
fi
|
||||
Reference in new issue
Block a user