Skip to content

Commit

Permalink
Merge pull request #172 from VerioPL/master
Browse files Browse the repository at this point in the history
Translation EN/PL of poll views
  • Loading branch information
HDVinnie authored Feb 1, 2018
2 parents 2b66b34 + 8039b2d commit df2b950
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 13 deletions.
10 changes: 9 additions & 1 deletion resources/lang/en/poll.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,13 @@
'multiple-choice' => 'This is a multiple choice poll. Select as many answers as you like.',
'ip-checking' => 'This poll has duplicate vote checking. You can only vote once.',
'vote' => 'Vote',
'votes' => 'Votes'
'votes' => 'Votes',
'title' => 'Title',
'option' => 'Option',
'add-option' => 'Add option',
'delete-option' => 'Delete option',
'ip-checking' => 'Enable duplicate IP checking',
'ip-checking-warrning' => 'Only needed if site in public mode',
'multiple-choice' => 'Allow multiple answers',
'create-poll' => 'Create poll'
];
10 changes: 9 additions & 1 deletion resources/lang/pl/poll.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,13 @@
'multiple-choice' => 'To jest ankieta wielokrotnego wyboru. Wybierz tyle odpowiedzi ile chcesz.',
'ip-checking' => 'Ta ankieta nie dopuszcza podwójnych głosów.',
'vote' => 'Zagłosuj',
'votes' => 'Głosy'
'votes' => 'Głosy',
'title' => 'Tytuł',
'option' => 'Opcja',
'add-option' => 'Dodaj opcję',
'delete-option' => 'Usuń opcję',
'ip-checking' => 'Włącz sprawdzanie duplikowania adresów IP',
'ip-checking-warrning' => 'Wymagane jedynie gdy rejestracja jest otwarta',
'multiple-choice' => 'Test wielokrotnego wyboru',
'create-poll' => 'Stwórz ankietę'
];
18 changes: 9 additions & 9 deletions resources/views/poll/forms/make.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,43 +12,43 @@
{{ csrf_field() }}

<div class="form-group">
<label for="stitle">Title:</label>
<label for="stitle">{{ trans('poll.title') }}:</label>
<input type="text" name="title" class="form-control" value="" required>
</div>

<div class="form-group">
<label for="option1">Option 1:</label>
<label for="option1">{{ trans('poll.option') }} 1:</label>
<input type="text" name="options[]" class="form-control" value="">
</div>

<div class="form-group">
<label for="option2">Option 2:</label>
<label for="option2">{{ trans('poll.option') }} 2:</label>
<input type="text" name="options[]" class="form-control" value="">
</div>

<div class="more-options"></div>

<div class="form-group">
<button id="add" class="btn btn-primary">Add Option</button>
<button id="del" class="btn btn-primary">Delete Option</button>
<button id="add" class="btn btn-primary">{{ trans('poll.add-option') }}</button>
<button id="del" class="btn btn-primary">{{ trans('poll.delete-option') }}</button>
</div>

<hr>

<div class="checkbox">
<label>
<input type="checkbox" name="ip_checking" value="1">Enable duplicate IP checking <span class="text-red">(ONLY NEEDED IF SITE IN PUBLIC MODE)</span>
<input type="checkbox" name="ip_checking" value="1">{{ trans('poll.ip-checking') }} <span class="text-red">({{ strtoupper(trans('poll.ip-checking-warrning')) }})</span>
</label>
</div>

<div class="checkbox">
<label>
<input type="checkbox" name="multiple_choice" value="1">Allow multiple answers
<input type="checkbox" name="multiple_choice" value="1">{{ trans('poll.multiple-choice') }}
</label>
</div>

<div class="form-group">
<button type="submit" class="btn btn-primary">Create Poll</button>
<button type="submit" class="btn btn-primary">{{ trans('poll.create-poll') }}</button>
</div>
</form>

Expand All @@ -60,7 +60,7 @@
$('#add').on('click', function(e){
e.preventDefault();
options = options + 1;
var optionHTML = '<div class="form-group extra-option"><label for="option' + options +'">Option ' + options + ':</label><input type="text" name="options[]" class="form-control" value="" required></div>';
var optionHTML = '<div class="form-group extra-option"><label for="option' + options +'">{{ trans('poll.option') }} ' + options + ':</label><input type="text" name="options[]" class="form-control" value="" required></div>';
$('.more-options').append(optionHTML);
});
Expand Down
4 changes: 2 additions & 2 deletions resources/views/poll/forms/vote.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@

<div class="form-group">
<div class="col-md-12">
<button type="submit" class="btn btn-primary">Vote</button>
<button type="submit" class="btn btn-primary">{{ trans('poll.vote') }}</button>
</form>
<a class="btn btn-success" href="{{ route('poll_results', array('slug' => $poll->slug)) }}" role="button"><i class="fa fa-bar-chart" aria-hidden="true"> View Results</i></a>
<a class="btn btn-success" href="{{ route('poll_results', array('slug' => $poll->slug)) }}" role="button"><i class="fa fa-bar-chart" aria-hidden="true"> {{ trans('poll.results') }}</i></a>
</div>
</div>

0 comments on commit df2b950

Please sign in to comment.