mirror of
https://github.com/ToxicCrack/PrintABrick.git
synced 2025-05-17 21:00:09 -07:00
Add translation messages
This commit is contained in:
parent
df78630542
commit
ce94e0cdee
@ -45,3 +45,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@each $i in 5 10 15 20 25 30 40 50 60 {
|
||||||
|
.ui.spacing.#{$i} {
|
||||||
|
margin-bottom: #{$i}px;
|
||||||
|
margin-top: #{$i}px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui.text.right {
|
||||||
|
text-align: right;
|
||||||
|
}
|
0
app/Resources/translations/menu.en.yml
Normal file
0
app/Resources/translations/menu.en.yml
Normal file
21
app/Resources/translations/messages.en.yml
Normal file
21
app/Resources/translations/messages.en.yml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
set:
|
||||||
|
number: Set number
|
||||||
|
name: Name
|
||||||
|
year: Year released
|
||||||
|
theme: Theme
|
||||||
|
parts: Count of parts
|
||||||
|
minifigs: Minifig count
|
||||||
|
rating: Rating
|
||||||
|
download: Download
|
||||||
|
models:
|
||||||
|
text: |
|
||||||
|
This set inventory has been obtained from Rebrickable.
|
||||||
|
According to the Brickset, this set has %brickset% parts. The inventory from Rebrickable contains %rebrickable% parts.
|
||||||
|
instructions:
|
||||||
|
description: Description
|
||||||
|
filesize: Filesize
|
||||||
|
filename: Filename
|
||||||
|
text: |
|
||||||
|
The table below lists all instructions for this set that have been available at <a href="http://service.lego.com/en-gb/buildinginstructions" title="LEGO Customer Service" rel="nofollow">LEGO Customer Services</a>. Those that are no longer listed there may still be available to download.
|
||||||
|
|
||||||
|
'NA' or 'V39' indicates the US/Canadian version. 'IN' or 'V29' indicates the international version.
|
@ -2,9 +2,8 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if instructions|length != 0 %}
|
{% if instructions|length != 0 %}
|
||||||
<p>
|
<p><cite>{{ 'set.instructions.text' | trans | raw | nl2br }}</cite></p>
|
||||||
{{ 'set.instructions.text' | trans }}
|
<p class="ui text right">Text and data obtained from <a href="https://brickset.com/" title="Brickset">Brickset</a></p>
|
||||||
</p>
|
|
||||||
|
|
||||||
<table class="ui celled padded table">
|
<table class="ui celled padded table">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -12,13 +12,17 @@
|
|||||||
<div class="header">
|
<div class="header">
|
||||||
<h2>{{ review.title }}</h2>
|
<h2>{{ review.title }}</h2>
|
||||||
</div>
|
</div>
|
||||||
<span class="author">{{ review.author }}</span> {{ review.hTML }}
|
<span class="author">{{ review.author }}</span>
|
||||||
<div class="metadata">
|
<div class="metadata">
|
||||||
<span class="date">{{ review.datePosted|date("Y.m.d H:m:i")}}</span>
|
<span class="date">{{ review.datePosted|date("Y.m.d H:m:i")}}</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="text">
|
<div class="text">
|
||||||
|
{% if review.hTML %}
|
||||||
{{ review.review|raw }}
|
{{ review.review|raw }}
|
||||||
|
{% else %}
|
||||||
|
<p>{{ review.review }}</p>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
Overall rating <div class="ui star rating" data-rating="{{ review.overallRating }}" data-max-rating="5"></div>
|
Overall rating <div class="ui star rating" data-rating="{{ review.overallRating }}" data-max-rating="5"></div>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{% macro modelImageMin(model, color) %}
|
{% macro modelImageMin(model, color) %}
|
||||||
<div class="image load">
|
<div class="image load">
|
||||||
<img src="{{ asset('resources/images/unknown_image.png') }}" data-src="{{ asset('/images/'~color~'/'~model.number~'.png') | imagine_filter('media_min') }}" class="transition visible">
|
<img src="{{ asset('/images/'~color~'/'~model.number~'.png') | imagine_filter('media_min') }}">
|
||||||
</div>
|
</div>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
@ -10,13 +10,13 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro model(model, quantity) %}
|
{% macro model(model, quantity = null) %}
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<div class="ui bordered fluid image">
|
<div class="ui bordered fluid image">
|
||||||
<a href="{{ url('model_detail', {'number': model.number})}}">
|
<a href="{{ url('model_detail', {'number': model.number})}}">
|
||||||
{% import _self as blocks %}
|
{% import _self as blocks %}
|
||||||
{{ blocks.modelImageMin(model, -1) }}
|
{{ blocks.modelImageMin(model, -1) }}
|
||||||
<div class="ui bottom attached label">{{ quantity }}x {{ model.number }}</div>
|
<div class="ui bottom attached label">{% if quantity %}{{ quantity }}x{% endif %} {{ model.number }}</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -23,18 +23,13 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="column twelve wide">
|
<div class="column twelve wide">
|
||||||
|
<div class="ui spacing 20">
|
||||||
<div class="ui eight column doubling grid">
|
<div class="ui eight column doubling grid">
|
||||||
{% for model in models %}
|
{% for model in models %}
|
||||||
<div class="column">
|
{{ blocks.model(model) }}
|
||||||
<div class="ui bordered fluid image">
|
|
||||||
<a href="{{ url('model_detail', {'number': model.number})}}">
|
|
||||||
{{ blocks.modelImageMin(model,-1) }}
|
|
||||||
<div class="ui bottom attached label {% if model.parts|length == 0 %}black{% endif %}">{{ model.number }}</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{{ knp_pagination_render(models) }}
|
{{ knp_pagination_render(models) }}
|
||||||
<p>{{ models.getTotalItemCount }}</p>
|
<p>{{ models.getTotalItemCount }}</p>
|
||||||
|
@ -1,17 +1,21 @@
|
|||||||
{% extends 'ajax.html.twig' %}
|
{% extends 'ajax.html.twig' %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<p>{{ 'set.models.text' | trans | nl2br }}</p>
|
||||||
|
|
||||||
{% if models|length > 0 %}
|
{% if models|length > 0 %}
|
||||||
<h4 class="ui horizontal divider header">
|
<h4 class="ui horizontal divider header">
|
||||||
Regular parts
|
Regular parts
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui segment vertical">
|
<div class="ui segment vertical">
|
||||||
<div class="ui ten column grid">
|
<div class="ui grid">
|
||||||
|
<div class="doubling ten column row">
|
||||||
{% for model in models %}
|
{% for model in models %}
|
||||||
{{ blocks.model(model['model'],model['quantity']) }}
|
{{ blocks.model(model['model'],model['quantity']) }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if missing|length > 0 %}
|
{% if missing|length > 0 %}
|
||||||
|
@ -8,8 +8,8 @@ imports:
|
|||||||
parameters:
|
parameters:
|
||||||
locale: en
|
locale: en
|
||||||
# rebrickable csv files root URL (http://rebrickable.com/media/downloads/ or local dir containing csv files)
|
# rebrickable csv files root URL (http://rebrickable.com/media/downloads/ or local dir containing csv files)
|
||||||
rebrickable_downloads_url: 'http://rebrickable.com/media/downloads/'
|
app.rebrickable_downloads_url: 'http://rebrickable.com/media/downloads/'
|
||||||
media_root: "%kernel.root_dir%/../var/media/"
|
app.media_root: "%kernel.root_dir%/../var/media/"
|
||||||
|
|
||||||
framework:
|
framework:
|
||||||
#esi: ~
|
#esi: ~
|
||||||
@ -104,7 +104,7 @@ knp_paginator:
|
|||||||
sort_direction_name: direction # sort direction query parameter name
|
sort_direction_name: direction # sort direction query parameter name
|
||||||
distinct: true # ensure distinct results, useful when ORM queries are using GROUP BY statements
|
distinct: true # ensure distinct results, useful when ORM queries are using GROUP BY statements
|
||||||
template:
|
template:
|
||||||
pagination: KnpPaginatorBundle:Pagination:semantic_ui_pagination.html.twig # sliding pagination controls template
|
pagination: :pagination:knp_pagination.html.twig
|
||||||
sortable: KnpPaginatorBundle:Pagination:sortable_link.html.twig # sort link template
|
sortable: KnpPaginatorBundle:Pagination:sortable_link.html.twig # sort link template
|
||||||
|
|
||||||
liip_imagine:
|
liip_imagine:
|
||||||
@ -131,7 +131,6 @@ liip_imagine:
|
|||||||
data_loader: media
|
data_loader: media
|
||||||
cache: ~
|
cache: ~
|
||||||
quality: 80
|
quality: 80
|
||||||
default_image: '/resources/images/unknown_image.png'
|
|
||||||
filters:
|
filters:
|
||||||
thumbnail: { size: [200, 200], mode: inset }
|
thumbnail: { size: [200, 200], mode: inset }
|
||||||
background: { size: [250, 250], position: center, color: '#FFFFFF' }
|
background: { size: [250, 250], position: center, color: '#FFFFFF' }
|
||||||
@ -174,7 +173,7 @@ oneup_flysystem:
|
|||||||
adapters:
|
adapters:
|
||||||
media:
|
media:
|
||||||
local:
|
local:
|
||||||
directory: "%media_root%"
|
directory: "%app.media_root%"
|
||||||
filesystems:
|
filesystems:
|
||||||
media:
|
media:
|
||||||
adapter: media
|
adapter: media
|
@ -7,7 +7,7 @@ services:
|
|||||||
|
|
||||||
service.loader.rebrickable:
|
service.loader.rebrickable:
|
||||||
class: AppBundle\Service\Loader\RebrickableLoader
|
class: AppBundle\Service\Loader\RebrickableLoader
|
||||||
arguments: ['%rebrickable_downloads_url%']
|
arguments: ['%app.rebrickable_downloads_url%']
|
||||||
parent: service.loader.base
|
parent: service.loader.base
|
||||||
|
|
||||||
service.loader.model:
|
service.loader.model:
|
||||||
@ -22,5 +22,5 @@ services:
|
|||||||
|
|
||||||
service.loader.image:
|
service.loader.image:
|
||||||
class: AppBundle\Service\Loader\ImageLoader
|
class: AppBundle\Service\Loader\ImageLoader
|
||||||
arguments: ['@oneup_flysystem.media_filesystem', '%rebrickable_downloads_url%','@service.renderer.stl']
|
arguments: ['@oneup_flysystem.media_filesystem', '%app.rebrickable_downloads_url%','@service.renderer.stl']
|
||||||
parent: service.loader.base
|
parent: service.loader.base
|
@ -59,8 +59,6 @@ class SetController extends Controller
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$bricksetSet = $this->get('api.manager.brickset')->getSetByNumber($set->getNumber());
|
$bricksetSet = $this->get('api.manager.brickset')->getSetByNumber($set->getNumber());
|
||||||
} catch (EmptyResponseException $e) {
|
|
||||||
$this->addFlash('warning', 'Set not found in Brickset database');
|
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
$this->addFlash('error', $e->getService());
|
$this->addFlash('error', $e->getService());
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user