Generate locale strings during Crowdin step.
This commit is contained in:
parent
391655a751
commit
f250e9de63
|
@ -1,14 +1,10 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
# Install Composer dependencies
|
||||
composer install --no-interaction
|
||||
|
||||
# Import locales on backend
|
||||
php bin/console locale:import
|
||||
|
||||
# Install NPM dependencies
|
||||
cd frontend
|
||||
npm ci
|
||||
|
||||
# Import locales on frontend
|
||||
npm run import-locales
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
FROM azuracast/azuracast_testing:latest
|
||||
|
||||
USER root
|
||||
|
||||
COPY ./entrypoint.sh /entrypoint.sh
|
||||
|
||||
RUN chmod a+x /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["/bin/true"]
|
|
@ -0,0 +1,5 @@
|
|||
name: AzuraCast Generate Locales
|
||||
description: Generate new translatable strings from the application frontend and backend.
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
# Install Composer dependencies
|
||||
composer install --no-interaction
|
||||
|
||||
# Import locales on backend
|
||||
php bin/console locale:generate
|
||||
|
||||
# Install NPM dependencies
|
||||
cd frontend
|
||||
npm ci
|
||||
|
||||
# Import locales on frontend
|
||||
npm run generate-locales
|
||||
|
||||
eval "$@"
|
|
@ -5,7 +5,11 @@ on:
|
|||
- master
|
||||
push:
|
||||
paths-ignore:
|
||||
- '.github'
|
||||
- '.github/*.yml'
|
||||
- '.github/ISSUE_TEMPLATE/*.md'
|
||||
- 'install.sh' # Ansible-only scripts and folders
|
||||
- 'update.sh'
|
||||
- 'util/ansible/**'
|
||||
branches:
|
||||
- ci-testing
|
||||
- master
|
||||
|
@ -39,10 +43,13 @@ jobs:
|
|||
mkdir -p resources/locale/compiled
|
||||
chmod a+x bin/console
|
||||
|
||||
- name: Generate new translations from existing code.
|
||||
uses: ./.github/actions/generate-locales
|
||||
|
||||
- name: Pull latest translations.
|
||||
uses: crowdin/github-action@1.0.6
|
||||
with:
|
||||
upload_translations: false
|
||||
upload_translations: true
|
||||
download_translations: true
|
||||
export_only_approved: false
|
||||
push_translations: false
|
||||
|
|
33
.travis.yml
33
.travis.yml
|
@ -1,33 +0,0 @@
|
|||
branches:
|
||||
except:
|
||||
- l10n_master
|
||||
git:
|
||||
depth: 1
|
||||
env:
|
||||
DOCKER_COMPOSE_VERSION: 1.19.0
|
||||
sudo: required
|
||||
dist: trusty
|
||||
services:
|
||||
- docker
|
||||
before_install:
|
||||
- sudo apt-get update
|
||||
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
|
||||
- sudo rm /usr/local/bin/docker-compose
|
||||
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
|
||||
- chmod +x docker-compose
|
||||
- sudo mv docker-compose /usr/local/bin
|
||||
- shopt -s expand_aliases
|
||||
- alias dc-testing='docker-compose -f docker-compose.sample.yml -f docker-compose.testing.yml'
|
||||
install:
|
||||
- echo $TRAVIS_BUILD_DIR
|
||||
- chmod 777 $TRAVIS_BUILD_DIR/tests/_output/
|
||||
- cp azuracast.sample.env azuracast.env
|
||||
- dc-testing build web
|
||||
- dc-testing run --user="azuracast" --rm web azuracast_install
|
||||
script:
|
||||
- dc-testing run --user="azuracast" --rm web composer test
|
||||
after_failure:
|
||||
- cat tests/_output/*.html
|
||||
notifications:
|
||||
slack:
|
||||
secure: dmyA8fXGH7wO8oYO14Eg45kWqsGRI94Da+r2GRkm/l9wZG4YDdTc4jc1CPFeK40Acnz5wjtDUoHZ9Q1AYFaMNBype4/mfW59UM7+7p2ho06OQHJiIERJXHVHOz/OCoOaKHs4xzUga/LbvAgaMpv/ZaRfIzpv573PerlKYwHzgYIyyVRef1DrRKi3mz6CAyUxu8Nx++3gmZjdsL6eWY6trHqdyGzEjU4f1cgGQqjlYIqWG31THMKKzNUwdR9TIW1ecCqz+HVa2WqvSc0YSOF+9OfrgjNiAcJPiURIPfnocdXQEqT05h7tyKxtaL5OaZUv4pPpxRi/bIJyNdeM6tKNWFYqv9l5kFS1TwSVjxmDWYMSk4A9SpWvXCagxFT1QPh78cQDtH3gTa7Soic0CwCxROcM0s7N+B3TAA4aLHJN16QA0rBzJCLbX/CRdCMRBEcnqIacbs8WPJO4msBHf/YXKr2R4OUn7vbvPeK0K452OQJFrOGqFENo0dKQ+RvERr2AY07Xhqg91Zzgq7ZjYr1jUk2yO67cAO7IdVy1e4OhASPHzhd6laJPfmBWA1dflnOBjeqfBygXyfgOwVS6yTuXiQ4Gp3IXF6SLy0bhu9qEEsxJoczH17c+jziZ4zZREvQx9IpM8Rb5TGNEWfzICRXuHEb/usW41N58bYzsxHD3YZA=
|
Loading…
Reference in New Issue