From 62b48da971c0692349c291b9b63981a1218bde89 Mon Sep 17 00:00:00 2001 From: Nafies Luthfi Date: Sun, 27 Aug 2017 10:09:26 +0800 Subject: [PATCH] Added trans helper on user action views --- resources/lang/en/app.php | 4 +++ resources/lang/en/user.php | 1 + resources/lang/id/app.php | 4 +++ resources/lang/id/user.php | 1 + resources/views/users/partials/childs.blade.php | 12 ++++----- .../views/users/partials/parent-spouse.blade.php | 30 +++++++++++----------- resources/views/users/partials/profile.blade.php | 18 ++++++------- resources/views/users/partials/siblings.blade.php | 2 +- resources/views/users/show.blade.php | 2 +- 9 files changed, 42 insertions(+), 32 deletions(-) diff --git a/resources/lang/en/app.php b/resources/lang/en/app.php index 89a83ef..c4924e5 100644 --- a/resources/lang/en/app.php +++ b/resources/lang/en/app.php @@ -15,4 +15,8 @@ return [ 'show_profile' => 'Show Profile', 'show_family_chart' => 'Show Family Chart', 'show_family_tree' => 'Show Family Tree', + 'enter_new_name' => 'Enter new Name...', + 'select_from_existing_males' => 'Select from Existing Males', + 'select_from_existing_females' => 'Select from Existing Females', + 'select_from_existing_couples' => 'Select from Existing Couples', ]; \ No newline at end of file diff --git a/resources/lang/en/user.php b/resources/lang/en/user.php index 20d2772..d9772d1 100644 --- a/resources/lang/en/user.php +++ b/resources/lang/en/user.php @@ -25,6 +25,7 @@ return [ 'add_wife' => 'Add Wife', 'add_husband' => 'Add Husband', 'add_child' => 'Add Child', + 'add_child_from_existing_couples' => 'Parent (select spouse of :name)', // Attributes 'name' => 'Name', diff --git a/resources/lang/id/app.php b/resources/lang/id/app.php index 1d0fd61..8cd661a 100644 --- a/resources/lang/id/app.php +++ b/resources/lang/id/app.php @@ -15,4 +15,8 @@ return [ 'show_profile' => 'Lihat Profil', 'show_family_chart' => 'Lihat Bagan Keluarga', 'show_family_tree' => 'Lihat Pohon Keluarga', + 'enter_new_name' => 'Input Nama Baru...', + 'select_from_existing_males' => 'Pilih dari Pria terdaftar', + 'select_from_existing_females' => 'Pilih dari Wanita terdaftar', + 'select_from_existing_couples' => 'Pilih Pasangan Pernikahan', ]; \ No newline at end of file diff --git a/resources/lang/id/user.php b/resources/lang/id/user.php index 5f81129..2a5acaf 100644 --- a/resources/lang/id/user.php +++ b/resources/lang/id/user.php @@ -25,6 +25,7 @@ return [ 'add_wife' => 'Tambah Isteri', 'add_husband' => 'Tambah Suami', 'add_child' => 'Tambah Anak', + 'add_child_from_existing_couples' => 'Dari Pernikahan (pilih pasangan :name)', // Attributes 'name' => 'Nama', diff --git a/resources/views/users/partials/childs.blade.php b/resources/views/users/partials/childs.blade.php index 1d080be..6bae26e 100644 --- a/resources/views/users/partials/childs.blade.php +++ b/resources/views/users/partials/childs.blade.php @@ -2,10 +2,10 @@
@can ('edit', $currentUser)
- {{ link_to_route('users.show', 'Tambah Anak', [$user->id, 'action' => 'add_child'], ['class' => 'btn btn-success btn-xs']) }} + {{ link_to_route('users.show', trans('user.add_child'), [$user->id, 'action' => 'add_child'], ['class' => 'btn btn-success btn-xs']) }}
@endcan -

Anak-Anak ({{ $user->childs->count() }})

+

{{ trans('user.childs') }} ({{ $user->childs->count() }})