diff --git a/mia_core/locale/zh_Hant/LC_MESSAGES/django.po b/mia_core/locale/zh_Hant/LC_MESSAGES/django.po index fafb9df..96c5cb1 100644 --- a/mia_core/locale/zh_Hant/LC_MESSAGES/django.po +++ b/mia_core/locale/zh_Hant/LC_MESSAGES/django.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: mia 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-09 22:51+0800\n" -"PO-Revision-Date: 2020-08-09 22:52+0800\n" +"POT-Creation-Date: 2020-08-09 23:28+0800\n" +"PO-Revision-Date: 2020-08-09 23:29+0800\n" "Last-Translator: imacat \n" "Language-Team: Traditional Chinese \n" "Language: Traditional Chinese\n" @@ -78,13 +78,13 @@ msgstr "全部" #: mia_core/period.py:583 mia_core/period.py:616 #: mia_core/templates/mia_core/include/period-chooser.html:60 -#: mia_core/templatetags/mia_core.py:183 +#: mia_core/templatetags/mia_core.py:170 msgid "This Month" msgstr "這個月" #: mia_core/period.py:624 #: mia_core/templates/mia_core/include/period-chooser.html:63 -#: mia_core/templatetags/mia_core.py:190 +#: mia_core/templatetags/mia_core.py:177 msgid "Last Month" msgstr "上個月" @@ -100,13 +100,13 @@ msgstr "去年" #: mia_core/period.py:656 #: mia_core/templates/mia_core/include/period-chooser.html:95 -#: mia_core/templatetags/mia_core.py:163 +#: mia_core/templatetags/mia_core.py:150 msgid "Today" msgstr "今天" #: mia_core/period.py:658 #: mia_core/templates/mia_core/include/period-chooser.html:98 -#: mia_core/templatetags/mia_core.py:165 +#: mia_core/templatetags/mia_core.py:152 msgid "Yesterday" msgstr "昨天" @@ -156,6 +156,115 @@ msgstr "從:" msgid "To:" msgstr "到:" +#: mia_core/templates/mia_core/my-account_detail.html:36 +#: mia_core/templates/mia_core/user_detail.html:73 +msgid "Settings" +msgstr "設定" + +#: mia_core/templates/mia_core/my-account_detail.html:41 +#: mia_core/templates/mia_core/user_detail.html:99 +msgid "Log in ID.:" +msgstr "登入帳號:" + +#: mia_core/templates/mia_core/my-account_detail.html:46 +#: mia_core/templates/mia_core/my-account_form.html:71 +#: mia_core/templates/mia_core/user_detail.html:104 +#: mia_core/templates/mia_core/user_form.html:74 +msgid "Name:" +msgstr "姓名:" + +#: mia_core/templates/mia_core/my-account_detail.html:52 +#: mia_core/templates/mia_core/user_detail.html:110 +#: mia_core/templates/mia_core/user_form.html:88 +msgid "This account is disabled." +msgstr "帳號停用。" + +#: mia_core/templates/mia_core/my-account_detail.html:58 +#: mia_core/templates/mia_core/user_detail.html:116 +msgid "This account is deleted." +msgstr "帳號已刪。" + +#: mia_core/templates/mia_core/my-account_detail.html:64 +#: mia_core/templates/mia_core/user_detail.html:122 +msgid "This user has not logged in yet." +msgstr "使用者還沒登入過。" + +#: mia_core/templates/mia_core/my-account_detail.html:68 +#: mia_core/templates/mia_core/user_detail.html:126 +msgid "# of visits:" +msgstr "登入次數:" + +#: mia_core/templates/mia_core/my-account_detail.html:73 +#: mia_core/templates/mia_core/user_detail.html:131 +msgid "Last visit at:" +msgstr "上次登入時間:" + +#: mia_core/templates/mia_core/my-account_detail.html:78 +#: mia_core/templates/mia_core/user_detail.html:136 +msgid "IP:" +msgstr "IP:" + +#: mia_core/templates/mia_core/my-account_detail.html:83 +#: mia_core/templates/mia_core/user_detail.html:141 +msgid "Host:" +msgstr "主機名稱:" + +#: mia_core/templates/mia_core/my-account_detail.html:88 +#: mia_core/templates/mia_core/user_detail.html:146 +msgid "Country:" +msgstr "國家:" + +#: mia_core/templates/mia_core/my-account_detail.html:89 +#: mia_core/templates/mia_core/user_detail.html:147 +msgid "(Not Available)" +msgstr "(不可考)" + +#: mia_core/templates/mia_core/my-account_detail.html:94 +#: mia_core/templates/mia_core/user_detail.html:152 +msgid "Created at:" +msgstr "建檔時間:" + +#: mia_core/templates/mia_core/my-account_detail.html:99 +#: mia_core/templates/mia_core/user_detail.html:157 +msgid "Created by:" +msgstr "建檔人:" + +#: mia_core/templates/mia_core/my-account_detail.html:104 +#: mia_core/templates/mia_core/user_detail.html:162 +msgid "Updated at:" +msgstr "更新時間:" + +#: mia_core/templates/mia_core/my-account_detail.html:109 +#: mia_core/templates/mia_core/user_detail.html:167 +msgid "Updated by:" +msgstr "更新人:" + +#: mia_core/templates/mia_core/my-account_form.html:38 +#: mia_core/templates/mia_core/user_detail.html:69 +#: mia_core/templates/mia_core/user_form.html:41 +msgid "Back" +msgstr "回上頁" + +#: mia_core/templates/mia_core/my-account_form.html:47 +#: mia_core/templates/mia_core/user_form.html:50 +msgid "Log in ID:" +msgstr "登入帳號:" + +#: mia_core/templates/mia_core/my-account_form.html:55 +#: mia_core/templates/mia_core/user_form.html:58 +msgid "Password:" +msgstr "密碼:" + +#: mia_core/templates/mia_core/my-account_form.html:63 +#: mia_core/templates/mia_core/user_form.html:66 +msgid "Confirm password:" +msgstr "確認密碼:" + +#: mia_core/templates/mia_core/my-account_form.html:81 +#: mia_core/templates/mia_core/user_form.html:97 +msgid "Submit" +msgstr "傳送" + #: mia_core/templates/mia_core/user_detail.html:35 msgid "The account is not in use." msgstr "帳號未使用。" @@ -172,15 +281,6 @@ msgstr "您真的要刪掉這個帳號嗎?" msgid "Cancel" msgstr "取消" -#: mia_core/templates/mia_core/user_detail.html:69 -#: mia_core/templates/mia_core/user_form.html:41 -msgid "Back" -msgstr "回上頁" - -#: mia_core/templates/mia_core/user_detail.html:73 -msgid "Settings" -msgstr "設定" - #: mia_core/templates/mia_core/user_detail.html:76 mia_core/views.py:163 msgid "You cannot delete your own account." msgstr "不能刪除自己的帳號。" @@ -200,88 +300,10 @@ msgstr "帳號使用中,不可刪除。" msgid "This account is already deleted." msgstr "帳號已刪除。" -#: mia_core/templates/mia_core/user_detail.html:99 -msgid "Log in ID.:" -msgstr "登入帳號:" - -#: mia_core/templates/mia_core/user_detail.html:104 -#: mia_core/templates/mia_core/user_form.html:74 -msgid "Name:" -msgstr "姓名:" - -#: mia_core/templates/mia_core/user_detail.html:110 -#: mia_core/templates/mia_core/user_form.html:88 -msgid "This account is disabled." -msgstr "帳號停用。" - -#: mia_core/templates/mia_core/user_detail.html:116 -msgid "This account is deleted." -msgstr "帳號已刪。" - -#: mia_core/templates/mia_core/user_detail.html:122 -msgid "This user has not logged in yet." -msgstr "使用者還沒登入過。" - -#: mia_core/templates/mia_core/user_detail.html:126 -msgid "# of visits:" -msgstr "登入次數:" - -#: mia_core/templates/mia_core/user_detail.html:131 -msgid "Last visit at:" -msgstr "上次登入時間:" - -#: mia_core/templates/mia_core/user_detail.html:136 -msgid "IP:" -msgstr "IP:" - -#: mia_core/templates/mia_core/user_detail.html:141 -msgid "Host:" -msgstr "主機名稱:" - -#: mia_core/templates/mia_core/user_detail.html:146 -msgid "Country:" -msgstr "國家:" - -#: mia_core/templates/mia_core/user_detail.html:147 -msgid "(Not Available)" -msgstr "(不可考)" - -#: mia_core/templates/mia_core/user_detail.html:152 -msgid "Created at:" -msgstr "建檔時間:" - -#: mia_core/templates/mia_core/user_detail.html:157 -msgid "Created by:" -msgstr "建檔人:" - -#: mia_core/templates/mia_core/user_detail.html:162 -msgid "Updated at:" -msgstr "更新時間:" - -#: mia_core/templates/mia_core/user_detail.html:167 -msgid "Updated by:" -msgstr "更新人:" - #: mia_core/templates/mia_core/user_form.html:31 msgid "Add a New Account" msgstr "建立帳號" -#: mia_core/templates/mia_core/user_form.html:50 -msgid "Log in ID:" -msgstr "登入帳號:" - -#: mia_core/templates/mia_core/user_form.html:58 -msgid "Password:" -msgstr "密碼:" - -#: mia_core/templates/mia_core/user_form.html:66 -msgid "Confirm password:" -msgstr "確認密碼:" - -#: mia_core/templates/mia_core/user_form.html:97 -msgid "Submit" -msgstr "傳送" - #: mia_core/templates/mia_core/user_list.html:27 msgid "Account Management" msgstr "帳號管理" @@ -345,3 +367,11 @@ msgstr "帳號已儲存。" #: mia_core/views.py:173 msgid "This user account was deleted successfully." msgstr "帳號已刪除。" + +#: mia_core/views.py:229 +msgid "Your user account was not changed." +msgstr "你的帳號未異動。" + +#: mia_core/views.py:232 +msgid "Your user account was saved successfully." +msgstr "你的帳號已儲存。" diff --git a/mia_core/templates/mia_core/user_detail.html b/mia_core/templates/mia_core/user_detail.html index cb9e644..409e5f3 100644 --- a/mia_core/templates/mia_core/user_detail.html +++ b/mia_core/templates/mia_core/user_detail.html @@ -22,6 +22,9 @@ First written: 2020/8/9 {% endcomment %} {% load i18n %} {% load mia_core %} +{% if request|is_in_section:"mia_core:my-account" %} + {% setvar "user" request.user %} +{% endif %} {% block settings %} {% setvar "title" user.name %} @@ -29,71 +32,80 @@ First written: 2020/8/9 {% block content %} -{% if not user.is_in_use %} -
- - {{ _("The account is not in use.")|force_escape }} +{% if request|is_in_section:"mia_core:my-account" %} + -{% endif %} +{% else %} + {% if not user.is_in_use %} +
+ + {{ _("The account is not in use.")|force_escape }} +
+ {% endif %} - -
- {% csrf_token %} - -