mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Migrated (hopefully) all translations to PO/Gettext (references #161)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
@extends('layout.default')
|
||||
|
||||
@section('title', $L('Recipes'))
|
||||
@section('title', $__t('Recipes'))
|
||||
@section('activeNav', 'recipes')
|
||||
@section('viewJsName', 'recipes')
|
||||
|
||||
@@ -11,19 +11,19 @@
|
||||
<h1>
|
||||
@yield('title')
|
||||
<a class="btn btn-outline-dark" href="{{ $U('/recipe/new') }}">
|
||||
<i class="fas fa-plus"></i> {{ $L('Add') }}
|
||||
<i class="fas fa-plus"></i> {{ $__t('Add') }}
|
||||
</a>
|
||||
</h1>
|
||||
|
||||
<label for="search">{{ $L('Search') }}</label> <i class="fas fa-search"></i>
|
||||
<label for="search">{{ $__t('Search') }}</label> <i class="fas fa-search"></i>
|
||||
<input type="text" class="form-control" id="search">
|
||||
|
||||
<ul class="nav nav-tabs mt-3">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" id="list-tab" data-toggle="tab" href="#list">{{ $L('List') }}</a>
|
||||
<a class="nav-link active" id="list-tab" data-toggle="tab" href="#list">{{ $__t('List') }}</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="gallery-tab" data-toggle="tab" href="#gallery">{{ $L('Gallery') }}</a>
|
||||
<a class="nav-link" id="gallery-tab" data-toggle="tab" href="#gallery">{{ $__t('Gallery') }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -33,9 +33,9 @@
|
||||
<table id="recipes-table" class="table table-striped dt-responsive">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ $L('Name') }}</th>
|
||||
<th>{{ $L('Servings') }}</th>
|
||||
<th>{{ $L('Requirements fulfilled') }}</th>
|
||||
<th>{{ $__t('Name') }}</th>
|
||||
<th>{{ $__t('Servings') }}</th>
|
||||
<th>{{ $__t('Requirements fulfilled') }}</th>
|
||||
<th class="d-none">Hidden status for sorting of "Requirements fulfilled" column</th>
|
||||
|
||||
@include('components.userfields_thead', array(
|
||||
@@ -55,7 +55,7 @@
|
||||
</td>
|
||||
<td>
|
||||
@if(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled == 1)<i class="fas fa-check text-success"></i>@elseif(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled_with_shopping_list == 1)<i class="fas fa-exclamation text-warning"></i>@else<i class="fas fa-times text-danger"></i>@endif
|
||||
<span class="timeago-contextual">@if(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled == 1){{ $L('Enough in stock') }}@elseif(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled_with_shopping_list == 1){{ $L('Not enough in stock, #1 ingredients missing but already on the shopping list', FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->missing_products_count) }}@else{{ $L('Not enough in stock, #1 ingredients missing', FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->missing_products_count) }}@endif</span>
|
||||
<span class="timeago-contextual">@if(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled == 1){{ $__t('Enough in stock') }}@elseif(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled_with_shopping_list == 1){{ $__t('Not enough in stock, %s ingredients missing but already on the shopping list', FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->missing_products_count) }}@else{{ $__t('Not enough in stock, %s ingredients missing', FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->missing_products_count) }}@endif</span>
|
||||
</td>
|
||||
<td class="d-none">
|
||||
{{ FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->missing_products_count }}
|
||||
@@ -85,7 +85,7 @@
|
||||
<h5 class="card-title mb-1">{{ $recipe->name }}</h5>
|
||||
<p class="card-text">
|
||||
@if(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled == 1)<i class="fas fa-check text-success"></i>@elseif(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled_with_shopping_list == 1)<i class="fas fa-exclamation text-warning"></i>@else<i class="fas fa-times text-danger"></i>@endif
|
||||
<span class="timeago-contextual">@if(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled == 1){{ $L('Enough in stock') }}@elseif(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled_with_shopping_list == 1){{ $L('Not enough in stock, #1 ingredients missing but already on the shopping list', FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->missing_products_count) }}@else{{ $L('Not enough in stock, #1 ingredients missing', FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->missing_products_count) }}@endif</span>
|
||||
<span class="timeago-contextual">@if(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled == 1){{ $__t('Enough in stock') }}@elseif(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled_with_shopping_list == 1){{ $__t('Not enough in stock, %s ingredients missing but already on the shopping list', FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->missing_products_count) }}@else{{ $__t('Not enough in stock, %s ingredients missing', FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->missing_products_count) }}@endif</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -103,10 +103,10 @@
|
||||
<div id="selectedRecipeCard" class="card">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-cocktail"></i> {{ $selectedRecipe->name }}
|
||||
<a id="selectedRecipeConsumeButton" class="btn btn-sm btn-outline-success py-0" href="#" data-toggle="tooltip" title="{{ $L('Consume all ingredients needed by this recipe') }}" data-recipe-id="{{ $selectedRecipe->id }}" data-recipe-name="{{ $selectedRecipe->name }}">
|
||||
<a id="selectedRecipeConsumeButton" class="btn btn-sm btn-outline-success py-0" href="#" data-toggle="tooltip" title="{{ $__t('Consume all ingredients needed by this recipe') }}" data-recipe-id="{{ $selectedRecipe->id }}" data-recipe-name="{{ $selectedRecipe->name }}">
|
||||
<i class="fas fa-utensils"></i>
|
||||
</a>
|
||||
<a class="btn btn-sm btn-outline-primary py-0 recipe-order-missing-button @if(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $selectedRecipe->id)->need_fulfilled_with_shopping_list == 1){{ disabled }}@endif" href="#" data-toggle="tooltip" title="{{ $L('Put missing products on shopping list') }}" data-recipe-id="{{ $selectedRecipe->id }}" data-recipe-name="{{ $selectedRecipe->name }}">
|
||||
<a class="btn btn-sm btn-outline-primary py-0 recipe-order-missing-button @if(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $selectedRecipe->id)->need_fulfilled_with_shopping_list == 1){{ disabled }}@endif" href="#" data-toggle="tooltip" title="{{ $__t('Put missing products on shopping list') }}" data-recipe-id="{{ $selectedRecipe->id }}" data-recipe-name="{{ $selectedRecipe->name }}">
|
||||
<i class="fas fa-cart-plus"></i>
|
||||
</a>
|
||||
<a id="selectedRecipeEditButton" class="btn btn-sm btn-outline-info py-0" href="{{ $U('/recipe/') }}{{ $selectedRecipe->id }}">
|
||||
@@ -115,7 +115,7 @@
|
||||
<a id="selectedRecipeDeleteButton" class="btn btn-sm btn-outline-danger py-0" href="#" data-recipe-id="{{ $selectedRecipe->id }}" data-recipe-name="{{ $selectedRecipe->name }}">
|
||||
<i class="fas fa-trash"></i>
|
||||
</a>
|
||||
<a id="selectedRecipeToggleFullscreenButton" class="btn btn-sm btn-outline-secondary py-0 float-right" href="#" data-toggle="tooltip" title="{{ $L('Expand to fullscreen') }}">
|
||||
<a id="selectedRecipeToggleFullscreenButton" class="btn btn-sm btn-outline-secondary py-0 float-right" href="#" data-toggle="tooltip" title="{{ $__t('Expand to fullscreen') }}">
|
||||
<i class="fas fa-expand-arrows-alt"></i>
|
||||
</a>
|
||||
</div>
|
||||
@@ -128,13 +128,13 @@
|
||||
'label' => 'Servings',
|
||||
'min' => 1,
|
||||
'value' => $selectedRecipe->desired_servings,
|
||||
'invalidFeedback' => $L('This cannot be lower than #1', '1'),
|
||||
'invalidFeedback' => $__t('This cannot be lower than %s', '1'),
|
||||
'additionalAttributes' => 'data-recipe-id="' . $selectedRecipe->id . '"'
|
||||
))
|
||||
</div>
|
||||
<div class="col-7">
|
||||
<label>{{ $L('Costs') }}
|
||||
<span class="small text-muted">{{ $L('Based on the prices of the last purchase per product') }}</span>
|
||||
<label>{{ $__t('Costs') }}
|
||||
<span class="small text-muted">{{ $__t('Based on the prices of the last purchase per product') }}</span>
|
||||
</label>
|
||||
<p class="font-weight-bold font-italic">
|
||||
<span class="locale-number-format" data-format="currency">{{ $selectedRecipeTotalCosts }}</span>
|
||||
@@ -156,7 +156,7 @@
|
||||
@php $selectedRecipeSubRecipePositionsFiltered = FindAllObjectsInArrayByPropertyValue($selectedRecipeSubRecipesPositions, 'child_recipe_id', $selectedRecipeSubRecipe->id); @endphp
|
||||
@if(count($selectedRecipeSubRecipePositionsFiltered) > 0)
|
||||
<div class="card-body">
|
||||
<h5 class="mb-0">{{ $L('Ingredients') }}</h5>
|
||||
<h5 class="mb-0">{{ $__t('Ingredients') }}</h5>
|
||||
</div>
|
||||
<ul class="list-group list-group-flush">
|
||||
@php $lastGroup = 'undefined'; @endphp
|
||||
@@ -167,7 +167,7 @@
|
||||
<li class="list-group-item">
|
||||
@if($selectedRecipePosition->recipe_amount == round($selectedRecipePosition->recipe_amount, 2)){{ round($selectedRecipePosition->recipe_amount, 2) }}@else{{ $selectedRecipePosition->recipe_amount }}@endif {{ Pluralize($selectedRecipePosition->recipe_amount, FindObjectInArrayByPropertyValue($quantityunits, 'id', $selectedRecipePosition->qu_id)->name, FindObjectInArrayByPropertyValue($quantityunits, 'id', $selectedRecipePosition->qu_id)->name_plural) }} {{ FindObjectInArrayByPropertyValue($products, 'id', $selectedRecipePosition->product_id)->name }}
|
||||
@if($selectedRecipePosition->need_fulfilled == 1)<i class="fas fa-check text-success"></i>@elseif($selectedRecipePosition->need_fulfilled_with_shopping_list == 1)<i class="fas fa-exclamation text-warning"></i>@else<i class="fas fa-times text-danger"></i>@endif
|
||||
<span class="timeago-contextual">@if(FindObjectInArrayByPropertyValue($selectedRecipeSubRecipesPositions, 'recipe_pos_id', $selectedRecipePosition->id)->need_fulfilled == 1) {{ $L('Enough in stock') }} @else {{ $L('Not enough in stock, #1 missing, #2 already on shopping list', round(FindObjectInArrayByPropertyValue($selectedRecipeSubRecipesPositions, 'recipe_pos_id', $selectedRecipePosition->id)->missing_amount, 2), round(FindObjectInArrayByPropertyValue($selectedRecipeSubRecipesPositions, 'recipe_pos_id', $selectedRecipePosition->id)->amount_on_shopping_list, 2)) }} @endif</span>
|
||||
<span class="timeago-contextual">@if(FindObjectInArrayByPropertyValue($selectedRecipeSubRecipesPositions, 'recipe_pos_id', $selectedRecipePosition->id)->need_fulfilled == 1) {{ $__t('Enough in stock') }} @else {{ $__t('Not enough in stock, %s missing, %s already on shopping list', round(FindObjectInArrayByPropertyValue($selectedRecipeSubRecipesPositions, 'recipe_pos_id', $selectedRecipePosition->id)->missing_amount, 2), round(FindObjectInArrayByPropertyValue($selectedRecipeSubRecipesPositions, 'recipe_pos_id', $selectedRecipePosition->id)->amount_on_shopping_list, 2)) }} @endif</span>
|
||||
|
||||
@if(!empty($selectedRecipePosition->note))
|
||||
<div class="text-muted">{!! nl2br($selectedRecipePosition->note) !!}</div>
|
||||
@@ -179,7 +179,7 @@
|
||||
@endif
|
||||
@if(!empty($selectedRecipeSubRecipe->description))
|
||||
<div class="card-body">
|
||||
<h5>{{ $L('Preparation') }}</h5>
|
||||
<h5>{{ $__t('Preparation') }}</h5>
|
||||
{!! $selectedRecipeSubRecipe->description !!}
|
||||
</div>
|
||||
@endif
|
||||
@@ -192,7 +192,7 @@
|
||||
|
||||
@if($selectedRecipePositionsResolved->count() > 0)
|
||||
<div class="card-body">
|
||||
<h5 class="mb-0">{{ $L('Ingredients') }}</h5>
|
||||
<h5 class="mb-0">{{ $__t('Ingredients') }}</h5>
|
||||
</div>
|
||||
<ul class="list-group list-group-flush">
|
||||
@php $lastGroup = 'undefined'; @endphp
|
||||
@@ -203,7 +203,7 @@
|
||||
<li class="list-group-item">
|
||||
@if($selectedRecipePosition->recipe_amount == round($selectedRecipePosition->recipe_amount, 2)){{ round($selectedRecipePosition->recipe_amount, 2) }}@else{{ $selectedRecipePosition->recipe_amount }}@endif {{ Pluralize($selectedRecipePosition->recipe_amount, FindObjectInArrayByPropertyValue($quantityunits, 'id', $selectedRecipePosition->qu_id)->name, FindObjectInArrayByPropertyValue($quantityunits, 'id', $selectedRecipePosition->qu_id)->name_plural) }} {{ FindObjectInArrayByPropertyValue($products, 'id', $selectedRecipePosition->product_id)->name }}
|
||||
@if($selectedRecipePosition->need_fulfilled == 1)<i class="fas fa-check text-success"></i>@elseif($selectedRecipePosition->need_fulfilled_with_shopping_list == 1)<i class="fas fa-exclamation text-warning"></i>@else<i class="fas fa-times text-danger"></i>@endif
|
||||
<span class="timeago-contextual">@if(FindObjectInArrayByPropertyValue($recipePositionsResolved, 'recipe_pos_id', $selectedRecipePosition->id)->need_fulfilled == 1) {{ $L('Enough in stock') }} @else {{ $L('Not enough in stock, #1 missing, #2 already on shopping list', round(FindObjectInArrayByPropertyValue($recipePositionsResolved, 'recipe_pos_id', $selectedRecipePosition->id)->missing_amount, 2), round(FindObjectInArrayByPropertyValue($recipePositionsResolved, 'recipe_pos_id', $selectedRecipePosition->id)->amount_on_shopping_list, 2)) }} @endif</span>
|
||||
<span class="timeago-contextual">@if(FindObjectInArrayByPropertyValue($recipePositionsResolved, 'recipe_pos_id', $selectedRecipePosition->id)->need_fulfilled == 1) {{ $__t('Enough in stock') }} @else {{ $__t('Not enough in stock, %s missing, %s already on shopping list', round(FindObjectInArrayByPropertyValue($recipePositionsResolved, 'recipe_pos_id', $selectedRecipePosition->id)->missing_amount, 2), round(FindObjectInArrayByPropertyValue($recipePositionsResolved, 'recipe_pos_id', $selectedRecipePosition->id)->amount_on_shopping_list, 2)) }} @endif</span>
|
||||
|
||||
@if(!empty($selectedRecipePosition->note))
|
||||
<div class="text-muted">{!! nl2br($selectedRecipePosition->note) !!}</div>
|
||||
@@ -215,7 +215,7 @@
|
||||
@endif
|
||||
@if(!empty($selectedRecipe->description))
|
||||
<div class="card-body">
|
||||
<h5>{{ $L('Preparation') }}</h5>
|
||||
<h5>{{ $__t('Preparation') }}</h5>
|
||||
{!! $selectedRecipe->description !!}
|
||||
</div>
|
||||
@endif
|
||||
|
Reference in New Issue
Block a user