Skip to content
This repository was archived by the owner on Nov 21, 2019. It is now read-only.

Commit b5a273c

Browse files
Add item tags (#35)
* Add item tags * Fixes * Correct target locale * Leave unchanged * Fix order * Fix constraint * Not meant * Extract * Remove dynamic keys * Remove default, make configurable and skip if unknown instead * More tests * Another test * Fix test * Add dependency * Not needed * Make default locale configurable * Be explicit about what's accepted * Not needed * Fix tests
1 parent 2f79a66 commit b5a273c

28 files changed

+1324
-19
lines changed

.docker/api/data/scholarly-articles/article1/1.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@
2323

2424
</jats:title-group>
2525

26+
<jats:kwd-group kwd-group-type="author-keywords">
27+
<jats:kwd>XML</jats:kwd>
28+
<jats:kwd>Housestyle</jats:kwd>
29+
<jats:kwd>eLife</jats:kwd>
30+
<jats:kwd><jats:italic>formatting</jats:italic></jats:kwd>
31+
</jats:kwd-group>
32+
33+
<jats:kwd-group kwd-group-type="research-organism">
34+
<jats:title>Research organism</jats:title>
35+
<jats:kwd>Human</jats:kwd>
36+
<jats:kwd>Machine</jats:kwd>
37+
</jats:kwd-group>
38+
2639
</jats:article-meta>
2740

2841
</jats:front>

.env.dist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
DEFAULT_LOCALE=en
2+
13
###> symfony/framework-bundle ###
24
APP_ENV=dev
35
APP_SECRET=e75df3fdef08c83b39a0d703ebc95e28

Dockerfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,16 @@ ENV APP_ENV=prod
2929
RUN mkdir data var && \
3030
chown www-data:www-data var
3131

32-
RUN docker-php-ext-install \
33-
opcache
32+
RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS && \
33+
apk add --no-cache \
34+
icu-dev \
35+
&& \
36+
docker-php-ext-install \
37+
intl \
38+
opcache \
39+
&& \
40+
apk del .build-deps && \
41+
rm -rf /var/cache/apk/
3442

3543
COPY LICENSE .
3644
COPY .docker/php.ini ${PHP_INI_DIR}/conf.d/00-app.ini

composer.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"require": {
2121
"php": "^7.2",
2222
"ext-ctype": "*",
23+
"ext-intl": "*",
2324
"ext-mbstring": "*",
2425
"csa/guzzle-bundle": "^3.1",
2526
"libero/content-page-bundle": "^1.0@dev",
@@ -37,6 +38,7 @@
3738
"symfony/http-kernel": "^4.1",
3839
"symfony/monolog-bundle": "^3.3",
3940
"symfony/routing": "^4.1",
41+
"symfony/translation": "^4.2",
4042
"symfony/twig-bundle": "^4.1",
4143
"symfony/yaml": "^4.1",
4244
"twig/twig": "^2.5"

composer.lock

Lines changed: 145 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/packages/translation.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
framework:
2+
default_locale: '%env(DEFAULT_LOCALE)%'
3+
translator:
4+
default_path: '%kernel.project_dir%/translations'
5+
fallbacks:
6+
- '%env(DEFAULT_LOCALE)%'

config/services.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
parameters:
2+
env(DEFAULT_LOCALE): 'en'
3+
14
services:
25
_defaults:
36
autowire: true

docker-compose.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ services:
1414
environment:
1515
API_URI: http://web:8080
1616
APP_SECRET:
17+
DEFAULT_LOCALE: ${DEFAULT_LOCALE:-en}
1718
image: libero/browser:${IMAGE_TAG:-master}
1819
volumes:
1920
- public-app:/app/public/

symfony.lock

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,9 @@
227227
"ref": "e3868d2f4a5104f19f844fe551099a00c6562527"
228228
}
229229
},
230+
"symfony/contracts": {
231+
"version": "v1.0.2"
232+
},
230233
"symfony/css-selector": {
231234
"version": "v4.2.1"
232235
},
@@ -296,6 +299,15 @@
296299
"symfony/stopwatch": {
297300
"version": "v4.1.7"
298301
},
302+
"symfony/translation": {
303+
"version": "3.3",
304+
"recipe": {
305+
"repo": "github.com/symfony/recipes",
306+
"branch": "master",
307+
"version": "3.3",
308+
"ref": "1fb02a6e1c8f3d4232cce485c9afa868d63b115a"
309+
}
310+
},
299311
"symfony/twig-bridge": {
300312
"version": "v4.1.7"
301313
},

vendor-extra/JatsContentBundle/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"libero/content-page-bundle": "^1.0@dev",
1616
"libero/views-bundle": "^1.0@dev",
1717
"symfony/config": "^4.1",
18+
"symfony/contracts": "^1.0",
1819
"symfony/dependency-injection": "^4.1",
1920
"symfony/event-dispatcher": "^4.1",
2021
"symfony/http-kernel": "^4.1"

0 commit comments

Comments
 (0)