Просмотр исходного кода

:hammer: 统一方法命名风格,及语言包

jqh 4 лет назад
Родитель
Сommit
0ed4647eca

+ 1 - 0
resources/lang/en/admin.php

@@ -214,6 +214,7 @@ return [
     'install_from_local'        => 'Install From Local',
     'install_succeeded'         => 'Install succeeded !',
     'invalid_extension_package' => 'Invalid extension package !',
+    'copied'                    => 'Copied',
     'validation'               => [
         'match'     => 'The :attribute and :other must match.',
         'minlength' => 'The :attribute must be at least :min characters.',

+ 1 - 0
resources/lang/zh-CN/admin.php

@@ -215,6 +215,7 @@ return [
     'install_from_local'        => '本地安装',
     'install_succeeded'         => '安装成功',
     'invalid_extension_package' => '安装包异常',
+    'copied'                    => '已复制',
     'validation'               => [
         'match'     => '与 :attribute 不匹配。',
         'minlength' => ':attribute 字符长度不能少于 :min。',

+ 23 - 21
resources/lang/zh-TW/admin.php

@@ -193,30 +193,32 @@ return [
         'F_DUPLICATE'            => '檔案重複',
         'confirm_delete_file'    => '您確定要刪除該檔案嗎?',
     ],
-    'import_extension_confirm' => '確認導入擴展?',
-    'quick_create'             => '快速新增',
-    'grid_items_selected'      => '已選擇 {n} 項',
-    'nothing_updated'          => '沒有任何資料被更改',
-    'welcome_back'             => '歡迎回來,請登入帳號',
-    'documentation'            => '文檔',
-    'demo'                     => '範例',
-    'extensions'               => '擴展',
+    'import_extension_confirm'  => '確認導入擴展?',
+    'quick_create'              => '快速新增',
+    'grid_items_selected'       => '已選擇 {n} 項',
+    'nothing_updated'           => '沒有任何資料被更改',
+    'welcome_back'              => '歡迎回來,請登入帳號',
+    'documentation'             => '文檔',
+    'demo'                      => '範例',
+    'extensions'                => '擴展',
+    'version'                   => '版本',
+    'current_version'           => '当前版本',
+    'latest_version'            => '當前版本',
+    'upgrade_to_version'        => '更新至版本 :version',
+    'enable'                    => '啟用',
+    'disable'                   => '禁用',
+    'uninstall'                 => '卸載',
+    'confirm_uninstall'         => '您確定要卸載當前擴展嗎?此操作將會移除擴展數據!',
+    'marketplace'               => '應用市場',
+    'theme'                     => '主題',
+    'application'               => '應用',
+    'install_from_local'        => '本地安装',
+    'install_succeeded'         => '本地安裝',
+    'invalid_extension_package' => '安裝包異常',
+    'copied'                    => '已複製',
     'validation'               => [
         'match'     => '與 :attribute 不匹配。',
         'minlength' => ':attribute 長度不能少於 :min。',
         'maxlength' => ':attribute 長度不能超過 :max。',
     ],
-    'menu_titles' => [
-        'index'         => '首頁',
-        'admin'         => '系統',
-        'users'         => '管理員',
-        'roles'         => '角色',
-        'permission'    => '權限',
-        'menu'          => '菜單',
-        'operation_log' => '操作日誌',
-        'helpers'       => '開發工具',
-        'extensions'    => '擴展',
-        'scaffold'      => '代碼生成器',
-        'icons'         => '圖示',
-    ],
 ];

+ 17 - 0
resources/lang/zh-TW/menu.php

@@ -0,0 +1,17 @@
+<?php
+
+return [
+    'menu_titles' => [
+        'index'         => '首頁',
+        'admin'         => '系統',
+        'users'         => '管理員',
+        'roles'         => '角色',
+        'permission'    => '權限',
+        'menu'          => '菜單',
+        'operation_log' => '操作日誌',
+        'helpers'       => '開發工具',
+        'extensions'    => '擴展',
+        'scaffold'      => '代碼生成器',
+        'icons'         => '圖示',
+    ],
+];

+ 1 - 1
src/Grid/Filter/AbstractFilter.php

@@ -213,7 +213,7 @@ abstract class AbstractFilter
     /**
      * @return Filter
      */
-    public function getParent()
+    public function parent()
     {
         return $this->parent;
     }

+ 2 - 2
src/Tree/Actions.php

@@ -76,7 +76,7 @@ class Actions implements Renderable
 
     public function getKey()
     {
-        return $this->row->{$this->getParent()->getKeyName()};
+        return $this->row->{$this->parent()->getKeyName()};
     }
 
     public function disableQuickEdit(bool $value = true)
@@ -135,7 +135,7 @@ class Actions implements Renderable
         }
     }
 
-    public function getParent()
+    public function parent()
     {
         return $this->parent;
     }