Skip to content

Commit

Permalink
Add translation of modified_at time, using php-intl
Browse files Browse the repository at this point in the history
  • Loading branch information
onigoetz committed Sep 21, 2018
1 parent 3982139 commit d93ad8c
Show file tree
Hide file tree
Showing 9 changed files with 331 additions and 121 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
vendor
node_modules
15 changes: 7 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
FROM composer:1.7.2 AS composer

FROM php:7-alpine

RUN apk info && apk add --no-cache unzip
RUN apk info && apk add --no-cache unzip icu-dev
RUN docker-php-ext-configure intl \
&& docker-php-ext-install intl

RUN mkdir /daux && mkdir /build

WORKDIR /daux

COPY --from=composer /usr/bin/composer /usr/bin/composer

# Copy files
COPY bin/ /daux/bin/
Expand All @@ -18,13 +23,7 @@ COPY composer.json /daux/composer.json
COPY composer.lock /daux/composer.lock
COPY index.php /daux/index.php

# Composer install
RUN cd /daux && php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
&& php composer-setup.php \
&& rm composer-setup.php \
&& php composer.phar install --prefer-dist --no-ansi --no-dev --no-interaction --no-progress --no-scripts --optimize-autoloader \
&& rm composer.phar
RUN composer install --prefer-dist --no-ansi --no-dev --no-interaction --no-progress --no-scripts --optimize-autoloader

RUN ln -s /daux/bin/daux /usr/local/bin/daux

Expand Down
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@
"symfony/http-foundation": "^4.0",
"symfony/process": "^4.0",
"webuni/commonmark-table-extension": "0.6.*",
"webuni/front-matter": "^1.0.0"
"webuni/front-matter": "^1.0.0",
"symfony/polyfill-intl-icu": "^1.9"
},
"suggest":{
"ext-intl": "Allows to translate the modified at date"
},
"autoload": {
"psr-4": {
Expand Down
Loading

0 comments on commit d93ad8c

Please sign in to comment.