Skip to content

Commit 57dc53c

Browse files
committed
Extracted text from book & chapter views
1 parent 694a945 commit 57dc53c

26 files changed

Lines changed: 191 additions & 98 deletions

phpunit.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<php>
2323
<env name="APP_ENV" value="testing"/>
2424
<env name="APP_DEBUG" value="false"/>
25+
<env name="APP_LANG" value="en"/>
2526
<env name="CACHE_DRIVER" value="array"/>
2627
<env name="SESSION_DRIVER" value="array"/>
2728
<env name="QUEUE_DRIVER" value="sync"/>

resources/lang/en/common.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
return [
3+
4+
/**
5+
* Buttons
6+
*/
7+
'cancel' => 'Cancel',
8+
'confirm' => 'Confirm',
9+
10+
11+
/**
12+
* Form Labels
13+
*/
14+
'name' => 'Name',
15+
'description' => 'Description',
16+
];

resources/lang/en/entities.php

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<?php
2+
return [
3+
4+
/**
5+
* Shared
6+
*/
7+
'recently_created' => 'Recently Created',
8+
'recently_update' => 'Recently Updated',
9+
'recently_viewed' => 'Recently Viewed',
10+
'recent_activity' => 'Recent Activity',
11+
'create_now' => 'Create one now',
12+
'edit' => 'Edit',
13+
'sort' => 'Sort',
14+
'move' => 'Move',
15+
'permissions' => 'Permissions',
16+
'delete' => 'Delete',
17+
'meta_created' => 'Created :timeLength',
18+
'meta_created_name' => 'Created :timeLength by :user',
19+
'meta_updated' => 'Updated :timeLength',
20+
'meta_updated_name' => 'Updated :timeLength by :user',
21+
'x_pages' => ':count Pages',
22+
23+
/**
24+
* Search
25+
*/
26+
'search_results' => 'Search Results',
27+
'search_clear' => 'Clear Search',
28+
29+
/**
30+
* Books
31+
*/
32+
'books' => 'Books',
33+
'books_empty' => 'No books have been created',
34+
'books_popular' => 'Popular Books',
35+
'books_popular_empty' => 'The most popular books will appear here.',
36+
'books_create' => 'Create New Book',
37+
'books_delete' => 'Delete Book',
38+
'books_delete_explain' => 'This will delete the book with the name \':bookName\', All pages and chapters will be removed.',
39+
'books_delete_confirmation' => 'Are you sure you want to delete this book?',
40+
'books_edit' => 'Edit Book',
41+
'books_form_book_name' => 'Book Name',
42+
'books_save' => 'Save Book',
43+
'books_permissions' => 'Book Permissions',
44+
'books_empty_contents' => 'No pages or chapters have been created for this book.',
45+
'books_empty_create_page' => 'Create a new page',
46+
'books_empty_or' => 'or',
47+
'books_empty_sort_current_book' => 'Sort the current book',
48+
'books_empty_add_chapter' => 'Add a chapter',
49+
'books_permissions_active' => 'Book Permissions Active',
50+
'books_search_this' => 'Search this book',
51+
'books_navigation' => 'Book Navigation',
52+
53+
/**
54+
* Chapters
55+
*/
56+
'chapters_new' => 'New Chapter',
57+
'chapters_create' => 'Create New Chapter',
58+
'chapters_delete' => 'Delete Chapter',
59+
'chapters_delete_explain' => 'This will delete the chapter with the name \':chapterName\', All pages will be removed
60+
and added directly to the parent book.',
61+
'chapters_delete_confirm' => 'Are you sure you want to delete this chapter?',
62+
'chapters_edit' => 'Edit Chapter',
63+
'chapters_save' => 'Save Chapter',
64+
'chapters_move' => 'Move Chapter',
65+
'chapters_permissions' => 'Chapter Permissions',
66+
'chapters_empty' => 'No pages are currently in this chapter.',
67+
'chapters_permissions_active' => 'Chapter Permissions Active',
68+
69+
/**
70+
* Pages
71+
*/
72+
'pages_new' => 'New Page',
73+
'pages_attachments' => 'Attachments',
74+
'pages_navigation' => 'Page Navigation',
75+
];

resources/views/auth/passwords/reset.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1@extends('public')
1+
@extends('public')
22

33
@section('header-buttons')
44
<a href="{{ baseUrl("/login") }}"><i class="zmdi zmdi-sign-in"></i>{{ trans('auth.log_in') }}</a>

resources/views/books/create.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@section('content')
44

55
<div class="container small" ng-non-bindable>
6-
<h1>Create New Book</h1>
6+
<h1>{{ trans('entities.books_create') }}</h1>
77
<form action="{{ baseUrl("/books") }}" method="POST">
88
@include('books/form')
99
</form>

resources/views/books/delete.blade.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
@section('content')
44

55
<div class="container small" ng-non-bindable>
6-
<h1>Delete Book</h1>
7-
<p>This will delete the book with the name '{{$book->name}}', All pages and chapters will be removed.</p>
8-
<p class="text-neg">Are you sure you want to delete this book?</p>
6+
<h1>{{ trans('entities.books_delete') }}</h1>
7+
<p>{{ trans('entities.books_delete_explain', ['bookName' => $book->name]) }}</p>
8+
<p class="text-neg">{{ trans('entities.books_delete_confirmation') }}</p>
99

1010
<form action="{{$book->getUrl()}}" method="POST">
1111
{!! csrf_field() !!}
1212
<input type="hidden" name="_method" value="DELETE">
13-
<a href="{{$book->getUrl()}}" class="button">Cancel</a>
14-
<button type="submit" class="button neg">Confirm</button>
13+
<a href="{{$book->getUrl()}}" class="button">{{ trans('common.cancel') }}</a>
14+
<button type="submit" class="button neg">{{ trans('common.confirm') }}</button>
1515
</form>
1616
</div>
1717

resources/views/books/edit.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@section('content')
44

55
<div class="container small" ng-non-bindable>
6-
<h1>Edit Book</h1>
6+
<h1>{{ trans('entities.books_edit') }}</h1>
77
<form action="{{ $book->getUrl() }}" method="POST">
88
<input type="hidden" name="_method" value="PUT">
99
@include('books/form', ['model' => $book])
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11

22
{{ csrf_field() }}
33
<div class="form-group title-input">
4-
<label for="name">Book Name</label>
4+
<label for="name">{{ trans('common.name') }}</label>
55
@include('form/text', ['name' => 'name'])
66
</div>
77

88
<div class="form-group description-input">
9-
<label for="description">Description</label>
9+
<label for="description">{{ trans('common.description') }}</label>
1010
@include('form/textarea', ['name' => 'description'])
1111
</div>
1212

1313
<div class="form-group">
14-
<a href="{{ back()->getTargetUrl() }}" class="button muted">Cancel</a>
15-
<button type="submit" class="button pos">Save Book</button>
14+
<a href="{{ back()->getTargetUrl() }}" class="button muted">{{ trans('common.cancel') }}</a>
15+
<button type="submit" class="button pos">{{ trans('entities.books_save') }}</button>
1616
</div>

resources/views/books/index.blade.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<div class="col-xs-11 faded">
1010
<div class="action-buttons">
1111
@if($currentUser->can('book-create-all'))
12-
<a href="{{ baseUrl("/books/create") }}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i>Add new book</a>
12+
<a href="{{ baseUrl("/books/create") }}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i>{{ trans('entities.books_create') }}</a>
1313
@endif
1414
</div>
1515
</div>
@@ -21,35 +21,35 @@
2121
<div class="container" ng-non-bindable>
2222
<div class="row">
2323
<div class="col-sm-7">
24-
<h1>Books</h1>
24+
<h1>{{ trans('entities.books') }}</h1>
2525
@if(count($books) > 0)
2626
@foreach($books as $book)
2727
@include('books/list-item', ['book' => $book])
2828
<hr>
2929
@endforeach
3030
{!! $books->render() !!}
3131
@else
32-
<p class="text-muted">No books have been created.</p>
32+
<p class="text-muted">{{ trans('entities.books_empty') }}</p>
3333
@if(userCan('books-create-all'))
34-
<a href="{{ baseUrl("/books/create") }}" class="text-pos"><i class="zmdi zmdi-edit"></i>Create one now</a>
34+
<a href="{{ baseUrl("/books/create") }}" class="text-pos"><i class="zmdi zmdi-edit"></i>{{ trans('entities.create_one_now') }}</a>
3535
@endif
3636
@endif
3737
</div>
3838
<div class="col-sm-4 col-sm-offset-1">
3939
<div id="recents">
4040
@if($recents)
41-
<div class="margin-top large">&nbsp;</div>
42-
<h3>Recently Viewed</h3>
41+
<div class="margin-top">&nbsp;</div>
42+
<h3>{{ trans('entities.recently_viewed') }}</h3>
4343
@include('partials/entity-list', ['entities' => $recents])
4444
@endif
4545
</div>
4646
<div class="margin-top large">&nbsp;</div>
4747
<div id="popular">
48-
<h3>Popular Books</h3>
48+
<h3>{{ trans('entities.books_popular') }}</h3>
4949
@if(count($popular) > 0)
5050
@include('partials/entity-list', ['entities' => $popular])
5151
@else
52-
<p class="text-muted">The most popular books will appear here.</p>
52+
<p class="text-muted">{{ trans('entities.books_popular_empty') }}</p>
5353
@endif
5454
</div>
5555
</div>

resources/views/books/restrictions.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717

1818
<div class="container" ng-non-bindable>
19-
<h1>Book Permissions</h1>
19+
<h1>{{ trans('entities.books_permissions') }}</h1>
2020
@include('form/restriction-form', ['model' => $book])
2121
</div>
2222

0 commit comments

Comments
 (0)