Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate browse and page_or_link fields #42

Merged
merged 1 commit into from
Jun 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/resources/lang/en/crud.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,13 @@
'reorder_error_title' => 'Error',
'reorder_error_message' => 'Your order has not been saved.',

// Fields
'browse_uploads' => 'Browse uploads',
'clear' => 'Clear',
'page_link' => 'Page link',
'page_link_placeholder' => 'http://example.com/your-desired-page',
'internal_link' => 'Internal link',
'internal_link_placeholder' => 'Internal slug. Ex: \'admin/page\' (no quotes) for \':url\'',
'external_link' => 'External link',

];
9 changes: 9 additions & 0 deletions src/resources/lang/it/crud.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,13 @@
'reorder_error_title' => 'Errore',
'reorder_error_message' => 'Il tuo ordinamento non è stato salvato.',

// Fields
'browse_uploads' => 'Sfoglia file caricati',
'clear' => 'Pulisci',
'page_link' => 'Link Pagina',
'page_link_placeholder' => 'http://esempio.com/pagina-desiderata',
'internal_link' => 'Link Interno',
'internal_link_placeholder' => 'Slug interno. Es: \'admin/page\' (no quotes) for \':url\'',
'external_link' => 'Link Esterno',

];
4 changes: 2 additions & 2 deletions src/resources/views/fields/browse.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ class="form-control"

<div class="btn-group" role="group" aria-label="..." style="margin-top: 3px;">
<button type="button" data-inputid="{{ $field['name'] }}-filemanager" class="btn btn-default popup_selector">
<i class="fa fa-cloud-upload"></i> Browse uploads</button>
<i class="fa fa-cloud-upload"></i> {{ trans('backpack::crud.browse_uploads') }}</button>
<button type="button" data-inputid="{{ $field['name'] }}-filemanager" class="btn btn-default clear_elfinder_picker">
<i class="fa fa-eraser"></i> Clear</button>
<i class="fa fa-eraser"></i> {{ trans('backpack::crud.clear') }}</button>
</div>

@if (isset($field['hint']))
Expand Down
6 changes: 3 additions & 3 deletions src/resources/views/fields/page_or_link.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- Used in Dick\MenuItemManager -->

<?php
$field['options'] = ['page_link' => 'Page link', 'internal_link' => 'Internal link', 'external_link' => 'External link'];
$field['options'] = ['page_link' => trans('backpack::crud.page_link'), 'internal_link' => trans('backpack::crud.internal_link'), 'external_link' => trans('backpack::crud.external_link')];
$field['allows_null'] = false;
$page_model = $field['page_model'];
$active_pages = $page_model::all();
Expand Down Expand Up @@ -47,7 +47,7 @@ class="form-control"
type="url"
class="form-control"
name="link"
placeholder="http://example.com/your-desired-page"
placeholder="{{ trans('backpack::crud.page_link_placeholder') }}"

@if (!isset($entry) || $entry->type!='external_link')
disabled="disabled"
Expand All @@ -64,7 +64,7 @@ class="form-control"
type="text"
class="form-control"
name="link"
placeholder="Internal slug. Ex: 'admin/page' (no quotes) for '{{ url('admin/page') }}'"
placeholder="{{ trans('backpack::crud.internal_link_placeholder', ['url', url('admin/page')]) }}"

@if (!isset($entry) || $entry->type!='internal_link')
disabled="disabled"
Expand Down