diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 2705cef84..65100fbe3 100755 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -40,12 +40,18 @@ spring: content-type: text/html expose-request-attributes: false expose-session-attributes: false - expose-spring-macro-helpers: false + expose-spring-macro-helpers: true suffix: .ftl + settings: + auto_import: /spring.ftl as spring servlet: multipart: max-file-size: 10MB max-request-size: 10MB + + # 多语言资源文件路径 + messages: + basename: i18n/messages logging: file: ./logs/log.log diff --git a/src/main/resources/i18n/messages.properties b/src/main/resources/i18n/messages.properties new file mode 100644 index 000000000..2145e2697 --- /dev/null +++ b/src/main/resources/i18n/messages.properties @@ -0,0 +1,18 @@ +# 安装页面 +install.page.title = 安装向导 +install.form.blogTitle = 博客标题 +install.form.blogUrl = 博客地址 +install.form.userEmail = 电子邮箱 +install.form.userName = 用户名 +install.form.userDisplayName = 显示昵称 +install.form.userPwd = 登录密码 +install.form.userRePwd = 确认密码 +install.btn.submit = 安装Halo +install.success.title = 安装成功! +install.success.message = 你可以选择进入前台,或者登陆后台! +install.success.btn.front = 前台 +install.success.btn.dashboard = 登录后台 +install.error.title = 安装失败! +install.error.message = 请返回安装页面尝试重新安装! +install.error.btn.return = 返回 +install.installed.message = 已经安装过了,不能重复安装的酱紫! \ No newline at end of file diff --git a/src/main/resources/i18n/messages_en_US.properties b/src/main/resources/i18n/messages_en_US.properties new file mode 100644 index 000000000..297259d4b --- /dev/null +++ b/src/main/resources/i18n/messages_en_US.properties @@ -0,0 +1,18 @@ +# install page +install.page.title = Installation Guide +install.form.blogTitle = Blog title +install.form.blogUrl = Blog address +install.form.userEmail = Email +install.form.userName = Username +install.form.userDisplayName = Display nickname +install.form.userPwd = Password +install.form.userRePwd = Confirm password +install.btn.submit = Install +install.success.title = Installation successful! +install.success.message = You can choose to go to the homepage or log in to the dashboard! +install.success.btn.front = Homepage +install.success.btn.dashboard = Dashboard +install.error.title = Installation failed +install.error.message = Please return to the installation page and try to reinstall! +install.error.btn.return = Return +install.installed.message = Already installed, can not be installed repeatedly! \ No newline at end of file diff --git a/src/main/resources/i18n/messages_zh_CN.properties b/src/main/resources/i18n/messages_zh_CN.properties new file mode 100644 index 000000000..2145e2697 --- /dev/null +++ b/src/main/resources/i18n/messages_zh_CN.properties @@ -0,0 +1,18 @@ +# 安装页面 +install.page.title = 安装向导 +install.form.blogTitle = 博客标题 +install.form.blogUrl = 博客地址 +install.form.userEmail = 电子邮箱 +install.form.userName = 用户名 +install.form.userDisplayName = 显示昵称 +install.form.userPwd = 登录密码 +install.form.userRePwd = 确认密码 +install.btn.submit = 安装Halo +install.success.title = 安装成功! +install.success.message = 你可以选择进入前台,或者登陆后台! +install.success.btn.front = 前台 +install.success.btn.dashboard = 登录后台 +install.error.title = 安装失败! +install.error.message = 请返回安装页面尝试重新安装! +install.error.btn.return = 返回 +install.installed.message = 已经安装过了,不能重复安装的酱紫! \ No newline at end of file diff --git a/src/main/resources/templates/common/install.ftl b/src/main/resources/templates/common/install.ftl index 55a601b62..ee16194dd 100644 --- a/src/main/resources/templates/common/install.ftl +++ b/src/main/resources/templates/common/install.ftl @@ -5,7 +5,7 @@ - Halo安装向导 + Halo-<@spring.message code='install.page.title'/> @@ -32,94 +32,82 @@
<#if isInstall==false>
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
<#else >
-

已经安装过了,不能重复安装的酱紫!

+

<@spring.message code='install.installed.message'/>

                                     .'+:
                                   `+@#'##