mirror of
https://github.com/ToxicCrack/PrintABrick.git
synced 2025-05-17 12:50:08 -07:00
Add translation messages
This commit is contained in:
parent
df78630542
commit
ce94e0cdee
@ -44,4 +44,15 @@
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@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 %}
|
||||
{% if instructions|length != 0 %}
|
||||
<p>
|
||||
{{ 'set.instructions.text' | trans }}
|
||||
</p>
|
||||
<p><cite>{{ 'set.instructions.text' | trans | raw | nl2br }}</cite></p>
|
||||
<p class="ui text right">Text and data obtained from <a href="https://brickset.com/" title="Brickset">Brickset</a></p>
|
||||
|
||||
<table class="ui celled padded table">
|
||||
<thead>
|
||||
|
@ -12,13 +12,17 @@
|
||||
<div class="header">
|
||||
<h2>{{ review.title }}</h2>
|
||||
</div>
|
||||
<span class="author">{{ review.author }}</span> {{ review.hTML }}
|
||||
<span class="author">{{ review.author }}</span>
|
||||
<div class="metadata">
|
||||
<span class="date">{{ review.datePosted|date("Y.m.d H:m:i")}}</span>
|
||||
|
||||
</div>
|
||||
<div class="text">
|
||||
{{ review.review|raw }}
|
||||
{% if review.hTML %}
|
||||
{{ review.review|raw }}
|
||||
{% else %}
|
||||
<p>{{ review.review }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<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) %}
|
||||
<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>
|
||||
{% endmacro %}
|
||||
|
||||
@ -10,13 +10,13 @@
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro model(model, quantity) %}
|
||||
{% macro model(model, quantity = null) %}
|
||||
<div class="column">
|
||||
<div class="ui bordered fluid image">
|
||||
<a href="{{ url('model_detail', {'number': model.number})}}">
|
||||
{% import _self as blocks %}
|
||||
{{ 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>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -23,17 +23,12 @@
|
||||
</form>
|
||||
</div>
|
||||
<div class="column twelve wide">
|
||||
<div class="ui eight column doubling grid">
|
||||
{% for model in models %}
|
||||
<div class="column">
|
||||
<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 %}
|
||||
<div class="ui spacing 20">
|
||||
<div class="ui eight column doubling grid">
|
||||
{% for model in models %}
|
||||
{{ blocks.model(model) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ knp_pagination_render(models) }}
|
||||
|
@ -1,15 +1,19 @@
|
||||
{% extends 'ajax.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<p>{{ 'set.models.text' | trans | nl2br }}</p>
|
||||
|
||||
{% if models|length > 0 %}
|
||||
<h4 class="ui horizontal divider header">
|
||||
Regular parts
|
||||
</h4>
|
||||
<div class="ui segment vertical">
|
||||
<div class="ui ten column grid">
|
||||
{% for model in models %}
|
||||
{{ blocks.model(model['model'],model['quantity']) }}
|
||||
{% endfor %}
|
||||
<div class="ui grid">
|
||||
<div class="doubling ten column row">
|
||||
{% for model in models %}
|
||||
{{ blocks.model(model['model'],model['quantity']) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
@ -8,8 +8,8 @@ imports:
|
||||
parameters:
|
||||
locale: en
|
||||
# rebrickable csv files root URL (http://rebrickable.com/media/downloads/ or local dir containing csv files)
|
||||
rebrickable_downloads_url: 'http://rebrickable.com/media/downloads/'
|
||||
media_root: "%kernel.root_dir%/../var/media/"
|
||||
app.rebrickable_downloads_url: 'http://rebrickable.com/media/downloads/'
|
||||
app.media_root: "%kernel.root_dir%/../var/media/"
|
||||
|
||||
framework:
|
||||
#esi: ~
|
||||
@ -104,20 +104,20 @@ knp_paginator:
|
||||
sort_direction_name: direction # sort direction query parameter name
|
||||
distinct: true # ensure distinct results, useful when ORM queries are using GROUP BY statements
|
||||
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
|
||||
|
||||
liip_imagine:
|
||||
loaders:
|
||||
media:
|
||||
flysystem:
|
||||
filesystem_service: oneup_flysystem.media_filesystem
|
||||
flysystem:
|
||||
filesystem_service: oneup_flysystem.media_filesystem
|
||||
rebrickable:
|
||||
stream:
|
||||
wrapper: 'http://rebrickable.com/media/'
|
||||
stream:
|
||||
wrapper: 'http://rebrickable.com/media/'
|
||||
brickset:
|
||||
stream:
|
||||
wrapper: 'https://images.brickset.com/'
|
||||
stream:
|
||||
wrapper: 'https://images.brickset.com/'
|
||||
|
||||
|
||||
resolvers:
|
||||
@ -131,7 +131,6 @@ liip_imagine:
|
||||
data_loader: media
|
||||
cache: ~
|
||||
quality: 80
|
||||
default_image: '/resources/images/unknown_image.png'
|
||||
filters:
|
||||
thumbnail: { size: [200, 200], mode: inset }
|
||||
background: { size: [250, 250], position: center, color: '#FFFFFF' }
|
||||
@ -174,7 +173,7 @@ oneup_flysystem:
|
||||
adapters:
|
||||
media:
|
||||
local:
|
||||
directory: "%media_root%"
|
||||
directory: "%app.media_root%"
|
||||
filesystems:
|
||||
media:
|
||||
adapter: media
|
@ -7,7 +7,7 @@ services:
|
||||
|
||||
service.loader.rebrickable:
|
||||
class: AppBundle\Service\Loader\RebrickableLoader
|
||||
arguments: ['%rebrickable_downloads_url%']
|
||||
arguments: ['%app.rebrickable_downloads_url%']
|
||||
parent: service.loader.base
|
||||
|
||||
service.loader.model:
|
||||
@ -22,5 +22,5 @@ services:
|
||||
|
||||
service.loader.image:
|
||||
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
|
@ -59,8 +59,6 @@ class SetController extends Controller
|
||||
|
||||
try {
|
||||
$bricksetSet = $this->get('api.manager.brickset')->getSetByNumber($set->getNumber());
|
||||
} catch (EmptyResponseException $e) {
|
||||
$this->addFlash('warning', 'Set not found in Brickset database');
|
||||
} catch (ApiException $e) {
|
||||
$this->addFlash('error', $e->getService());
|
||||
} catch (\Exception $e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user