Skip to content

Commit 86e7230

Browse files
committed
Fix admin I18n key missing issue.
1 parent cd42ace commit 86e7230

File tree

5 files changed

+53
-47
lines changed

5 files changed

+53
-47
lines changed

app/controllers/admin/plugins_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def show
1212
def create
1313
if Homeland::Plugin.install(params[:file])
1414
Homeland.reboot
15-
redirect_to admin_plugins_path, notice: t("view.admin.plugin_was_install_success")
15+
redirect_to admin_plugins_path, notice: t("views.admin.plugin_was_install_success")
1616
else
1717
redirect_to admin_plugins_path, alert: t("views.admin.plugin_was_install_error")
1818
end

app/views/admin/site_configs/index.html.erb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<% content_for :sitemap do %>
22
<span class="current"><%= t("admin.site_configs.settings") %></span>
33
<% end %>
4-
<div class="btn-group mb-3">
4+
<div class="mb-3 btn-group">
55
<% @setting_groups.each_key do |name| %>
66
<a href="<%= admin_site_configs_path(scope: name) %>" class="btn btn-secondary<% " active" if params[:scope] == name.to_s %>"><%= t("setting.scope.#{name}") %></a>
77
<% end %>
@@ -16,15 +16,16 @@
1616
<% next if !Setting.use_recaptcha? && key.in?(%w[recaptcha_key recaptcha_secret]) %>
1717
<% if !Setting::SYSTEM_KEYS.include?(key) %>
1818
<li class="list-group-item">
19-
<div class="mb-1">
20-
<%= icon_tag("cog") %><a href="<%= edit_admin_site_config_path(key) %>" class="ml-1"><%= key %></a>
19+
<div class="flex items-center mb-1 space-x-2 dark:text-gray-50">
20+
<%= icon_tag("cog") %>
21+
<a href="<%= edit_admin_site_config_path(key) %>" class="ml-1 font-bold uppercase"><%= key %></a>
2122
<% if key == "timezone" %>
22-
<div class="badge">
23+
<div class="badge dark:text-gray-500">
2324
Current Timezone: <%= Time.zone %>
2425
</div>
2526
<% end %>
2627
</div>
27-
<div class="text-gray"><%= raw t("setting.#{key}") %></div>
28+
<div class="text-gray dark:text-gray-500"><%= raw t("setting.#{key}") %></div>
2829
</li>
2930
<% end %>
3031
<% end %>

config/database.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ test:
1717

1818
production:
1919
<<: *default
20+
database: homeland-dev

config/locales/admin.en.yml

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -47,27 +47,29 @@ en:
4747
A reboot command has been initiated, and the Homeland is restarting in the
4848
background. You can refresh the page and determine whether the restart is
4949
complete by boot time.
50-
views.admin.node_was_successfully_created: Node was successfully created.
51-
views.admin.location_was_update_successfully: Location was update successfully.
52-
view.admin.plugin_was_install_success: Plugin was install successfully, if page not refresh, please refresh it.
53-
views.admin.plugin_was_install_error: Plugin was install error, please check the zip to determine that is correct.
54-
views.admin.plugn_was_uninstall_successfully: Plugn was uninstall successfully.
55-
views.admin.plugn_was_uninstall_error: Plugn was uninstall error.
56-
views.admin.update_successfully: Update successfully.
57-
views.admin.topic_created_successfully: Topic created successfully.
58-
views.admin.topic_updated_successfully: Topic updated successfully.
59-
views.admin.user_updated_successfully: User updated successfully.
60-
views.admin.recent_10_replies_has_been_deleted_successfully: >-
61-
Recent 10 replies has been deleted successfully, now %{name} still %{count}
62-
replies
63-
views.admin.node_update_successfully: Node was successfully updated.
64-
views.admin.recent_10_topics_has_been_deleted_successfully: >-
65-
Recent 10 topics has been deleted successfully, now %{name} still have
66-
%{count} topics.
67-
views.admin.recent_10_photos_has_been_deleted_successfully: >-
68-
Recent 10 photos has been deleted successfully, now %{name} still have
69-
%{count} photos.
70-
views.admin.recent_10_notes_has_been_deleted_successfully: >-
71-
Recent 10 notes has been deleted successfully, now %{user} still have
72-
%{count} notes.
73-
views.admin.oauth_applications: OAuth Applications
50+
views:
51+
admin:
52+
node_was_successfully_created: Node was successfully created.
53+
location_was_update_successfully: Location was update successfully.
54+
plugin_was_install_success: Plugin was install successfully, if page not refresh, please refresh it.
55+
plugin_was_install_error: Plugin was install error, please check the zip to determine that is correct.
56+
plugn_was_uninstall_successfully: Plugn was uninstall successfully.
57+
plugn_was_uninstall_error: Plugn was uninstall error.
58+
update_successfully: Update successfully.
59+
topic_created_successfully: Topic created successfully.
60+
topic_updated_successfully: Topic updated successfully.
61+
user_updated_successfully: User updated successfully.
62+
recent_10_replies_has_been_deleted_successfully: >-
63+
Recent 10 replies has been deleted successfully, now %{name} still %{count}
64+
replies
65+
node_update_successfully: Node was successfully updated.
66+
recent_10_topics_has_been_deleted_successfully: >-
67+
Recent 10 topics has been deleted successfully, now %{name} still have
68+
%{count} topics.
69+
recent_10_photos_has_been_deleted_successfully: >-
70+
Recent 10 photos has been deleted successfully, now %{name} still have
71+
%{count} photos.
72+
recent_10_notes_has_been_deleted_successfully: >-
73+
Recent 10 notes has been deleted successfully, now %{user} still have
74+
%{count} notes.
75+
oauth_applications: OAuth Applications

config/locales/admin.zh-CN.yml

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,22 @@ zh-CN:
4444
topic_list: 话题列表
4545
check_photo: 瀏覽圖片
4646
reboot_successfully: 已经发起了重启命令,Homeland 在后台异步重启,你可以刷新页面,通过服务启动时间变化来确定重启是否完成。
47-
views.admin.comment_was_successfully_updated: Comment was successfully updated.
48-
views.admin.location_was_update_successfully: 城市创建成功。
49-
views.admin.node_was_successfully_created: 节点创建成功。
50-
view.admin.plugin_was_install_success: 插件安装成功,如果页面没有刷新,请手动刷新。
51-
views.admin.plugin_was_install_error: 插件安装失败,请检查 zip 包是否为正确的 Homeland 插件格式。
52-
views.admin.plugn_was_uninstall_successfully: 插件卸载成功。
53-
views.admin.plugn_was_uninstall_error: 插件卸载失败。
54-
views.admin.update_successfully: 更新成功。
55-
views.admin.topic_created_successfully: 话题创建成功。
56-
views.admin.topic_updated_successfully: 话题更新成功。
57-
views.admin.user_updated_successfully: 用户更新成功。
58-
views.admin.recent_10_replies_has_been_deleted_successfully: 成功删除最近 10 条回复,目前 %{name} 还有 %{count} 条。
59-
views.admin.node_update_successfully: 节点更新成功。
60-
views.admin.recent_10_topics_has_been_deleted_successfully: 成功删除最近 10 条话题,目前 %{name} 还有 %{count} 条。
61-
views.admin.recent_10_photos_has_been_deleted_successfully: 成功删除最近 10 条图片,目前 %{name} 还有 %{count} 条。
62-
views.admin.recent_10_notes_has_been_deleted_successfully: 成功删除最近 10 条笔记,目前 %{name} 还有 %{count} 条。
63-
views.admin.oauth_applications: OAuth 应用
47+
views:
48+
admin:
49+
comment_was_successfully_updated: Comment was successfully updated.
50+
location_was_update_successfully: 城市创建成功。
51+
node_was_successfully_created: 节点创建成功。
52+
plugin_was_install_success: 插件安装成功,如果页面没有刷新,请手动刷新。
53+
plugin_was_install_error: 插件安装失败,请检查 zip 包是否为正确的 Homeland 插件格式。
54+
plugn_was_uninstall_successfully: 插件卸载成功。
55+
plugn_was_uninstall_error: 插件卸载失败。
56+
update_successfully: 更新成功。
57+
topic_created_successfully: 话题创建成功。
58+
topic_updated_successfully: 话题更新成功。
59+
user_updated_successfully: 用户更新成功。
60+
recent_10_replies_has_been_deleted_successfully: 成功删除最近 10 条回复,目前 %{name} 还有 %{count} 条。
61+
node_update_successfully: 节点更新成功。
62+
recent_10_topics_has_been_deleted_successfully: 成功删除最近 10 条话题,目前 %{name} 还有 %{count} 条。
63+
recent_10_photos_has_been_deleted_successfully: 成功删除最近 10 条图片,目前 %{name} 还有 %{count} 条。
64+
recent_10_notes_has_been_deleted_successfully: 成功删除最近 10 条笔记,目前 %{name} 还有 %{count} 条。
65+
oauth_applications: OAuth 应用

0 commit comments

Comments
 (0)