Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
a4d9205
itk_translation_extractor
rimi-itk Dec 9, 2025
f458c21
itk_translation_extractor
rimi-itk Dec 9, 2025
7024d0d
itk_translation_extractor
rimi-itk Dec 9, 2025
66dafdb
itk_translation_extractor
rimi-itk Dec 9, 2025
147b466
itk_translation_extractor
rimi-itk Dec 10, 2025
31e6665
itk_translation_extractor
rimi-itk Dec 10, 2025
ea379bd
itk_translation_extractor
rimi-itk Dec 10, 2025
6584705
itk_translation_extractor
rimi-itk Dec 10, 2025
2f2f930
itk_translation_extractor
rimi-itk Dec 11, 2025
17cb121
itk_translation_extractor
rimi-itk Dec 11, 2025
bc7aaf8
itk_translation_extractor
rimi-itk Dec 11, 2025
5a97d35
itk_translation_extractor
rimi-itk Dec 11, 2025
14731d3
itk_translation_extractor
rimi-itk Dec 11, 2025
50a8b99
itk_translation_extractor
rimi-itk Dec 11, 2025
94b9fa6
itk_translation_extractor
rimi-itk Dec 12, 2025
0fd6a7c
itk_translation_extractor
rimi-itk Dec 12, 2025
9ed9671
itk_translation_extractor
rimi-itk Dec 12, 2025
ee7d627
drupal_translation_extractor
rimi-itk Dec 12, 2025
77ecf2a
drupal_translation_extractor
rimi-itk Dec 12, 2025
a362d5c
drupal_translation_extractor
rimi-itk Dec 12, 2025
e2ecf93
Code analysis
rimi-itk Dec 12, 2025
c05ed70
Merge branch 'feature/code-analysis' into itk_translation_extractor
rimi-itk Dec 12, 2025
247715a
Cleaned up code analysis
rimi-itk Dec 13, 2025
8ca7618
Used dependency injection
rimi-itk Dec 14, 2025
7fdbeb2
Made empty translations fuzzy
rimi-itk Dec 16, 2025
d7eb905
Cleaned up and improved
rimi-itk Dec 16, 2025
083ee73
Updated fuzzy check
rimi-itk Dec 18, 2025
12845e8
Sorted domains
rimi-itk Dec 18, 2025
0f9b89e
Added command test
rimi-itk Dec 17, 2025
56e57e4
Hmm …
rimi-itk Dec 18, 2025
c031105
Hmm …
rimi-itk Dec 18, 2025
3f578a5
Code analysis
rimi-itk Dec 18, 2025
73dd00e
Merge branch 'feature/test-command' into itk_translation_extractor
rimi-itk Dec 18, 2025
6a1353e
Updated changelog
rimi-itk Dec 18, 2025
3426e8f
Refactored
rimi-itk Dec 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This file is copied from config/symfony/.editorconfig in https://github.com/itk-dev/devops_itkdev-docker.
# Feel free to edit the file, but consider making a pull request if you find a general issue with the file.

# EditorConfig is awesome: https://editorconfig.org

# top-most EditorConfig file
root = true

[*]
charset = utf-8
end_of_line = LF
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.{js,css,scss}]
indent_size = 2

[*.{yml,yaml}]
indent_size = 2

[config/**/*.{yml,yaml}]
indent_size = 4
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
COMPOSE_PROJECT_NAME=drupal_translation_extractor
ITKDEV_TEMPLATE=drupal-module
29 changes: 29 additions & 0 deletions .github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Do not edit this file! Make a pull request on changing
# github/workflows/changelog.yaml in
# https://github.com/itk-dev/devops_itkdev-docker if need be.

### ### Changelog
###
### Checks that changelog has been updated

name: Changelog

on:
pull_request:

jobs:
changelog:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 2

- name: Git fetch
run: git fetch

- name: Check that changelog has been updated.
run: git diff --exit-code origin/${{ github.base_ref }} -- CHANGELOG.md && exit 1 || exit 0
80 changes: 80 additions & 0 deletions .github/workflows/composer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Do not edit this file! Make a pull request on changing
# github/workflows/composer.yaml in
# https://github.com/itk-dev/devops_itkdev-docker if need be.

### ### Composer
###
### Validates composer.json and checks that it's normalized.
###
### #### Assumptions
###
### 1. A docker compose service named `phpfpm` can be run and `composer` can be
### run inside the `phpfpm` service.
### 2. [ergebnis/composer-normalize](https://github.com/ergebnis/composer-normalize)
### is a dev requirement in `composer.json`:
###
### ``` shell
### docker compose run --rm phpfpm composer require --dev ergebnis/composer-normalize
### ```
###
### Normalize `composer.json` by running
###
### ``` shell
### docker compose run --rm phpfpm composer normalize
### ```

name: Composer

env:
COMPOSE_USER: root

on:
pull_request:
push:
branches:
- main
- develop

jobs:
composer-validate:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v5

- name: Create docker network
run: |
docker network create frontend

- run: |
docker compose run --rm phpfpm composer validate --strict

composer-normalized:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v5

- name: Create docker network
run: |
docker network create frontend

- run: |
docker compose run --rm phpfpm composer install
docker compose run --rm phpfpm composer normalize --dry-run

composer-audit:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v5

- name: Create docker network
run: |
docker network create frontend

- run: |
docker compose run --rm phpfpm composer audit
44 changes: 44 additions & 0 deletions .github/workflows/markdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Do not edit this file! Make a pull request on changing
# github/workflows/markdown.yaml in
# https://github.com/itk-dev/devops_itkdev-docker if need be.

### ### Markdown
###
### Lints Markdown files (`**/*.md`) in the project.
###
### [markdownlint-cli configuration
### files](https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#configuration),
### `.markdownlint.jsonc` and `.markdownlintignore`, control what is actually
### linted and how.
###
### #### Assumptions
###
### 1. A docker compose service named `markdownlint` for running `markdownlint`
### (from
### [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli))
### exists.

name: Markdown

on:
pull_request:
push:
branches:
- main
- develop

jobs:
markdown-lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Create docker network
run: |
docker network create frontend

- run: |
docker compose run --rm markdownlint markdownlint '**/*.md'
60 changes: 60 additions & 0 deletions .github/workflows/php.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Do not edit this file! Make a pull request on changing
# github/workflows/symfony/php.yaml in
# https://github.com/itk-dev/devops_itkdev-docker if need be.

### ### Symfony PHP
###
### Checks that PHP code adheres to the [Symfony coding
### standards](https://symfony.com/doc/current/contributing/code/standards.html).
###
### #### Assumptions
###
### 1. A docker compose service named `phpfpm` can be run and `composer` can be
### run inside the `phpfpm` service. 2.
### [friendsofphp/php-cs-fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer)
### is a dev requirement in `composer.json`:
###
### ``` shell
### docker compose run --rm phpfpm composer require --dev friendsofphp/php-cs-fixer
### ```
###
### Clean up and check code by running
###
### ``` shell
### docker compose run --rm phpfpm vendor/bin/php-cs-fixer fix
### docker compose run --rm phpfpm vendor/bin/php-cs-fixer fix --dry-run --diff
### ```
###
### > [!NOTE] The template adds `.php-cs-fixer.dist.php` as [a configuration
### > file for PHP CS
### > Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/doc/config.rst)
### > and this makes it possible to override the actual configuration used in a
### > project by adding a more important configuration file, `.php-cs-fixer.php`.

name: Symfony PHP

env:
COMPOSE_USER: root

on:
pull_request:
push:
branches:
- main
- develop

jobs:
coding-standards:
name: PHP - Check Coding Standards
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Create docker network
run: |
docker network create frontend

- run: |
docker compose run --rm phpfpm composer install
# https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/doc/usage.rst#the-check-command
docker compose run --rm phpfpm vendor/bin/php-cs-fixer fix --dry-run --diff
38 changes: 38 additions & 0 deletions .github/workflows/project.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Project

env:
COMPOSE_USER: root

on:
pull_request:
push:
branches:
- main
- develop

jobs:
code-analysis:
name: Code analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: go-task/setup-task@v1

- run: |
task composer -- install

- run: |
task code-analysis

test:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: go-task/setup-task@v1

- run: |
task composer -- install

- run: |
task test
51 changes: 51 additions & 0 deletions .github/workflows/twig.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Do not edit this file! Make a pull request on changing
# github/workflows/twig.yaml in
# https://github.com/itk-dev/devops_itkdev-docker if need be.

### ### Twig
###
### Validates Twig files
###
### #### Assumptions
###
### 1. A docker compose service named `phpfpm` can be run and `composer` can be
### run inside the `phpfpm` service.
### 2. [vincentlanglet/twig-cs-fixer](https://github.com/VincentLanglet/Twig-CS-Fixer)
### is a dev requirement in `composer.json`:
###
### ``` shell
### docker compose run --rm phpfpm composer require --dev vincentlanglet/twig-cs-fixer
### ```
###
### 3. A [Configuration
### file](https://github.com/VincentLanglet/Twig-CS-Fixer/blob/main/docs/configuration.md#configuration-file)
### in the root of the project defines which files to check and rules to use.

name: Twig

env:
COMPOSE_USER: root

on:
pull_request:
push:
branches:
- main
- develop

jobs:
twig-lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Create docker network
run: |
docker network create frontend

- run: |
docker compose run --rm phpfpm composer install
docker compose run --rm phpfpm vendor/bin/twig-cs-fixer lint
41 changes: 41 additions & 0 deletions .github/workflows/yaml.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Do not edit this file! Make a pull request on changing
# github/workflows/yaml.yaml in
# https://github.com/itk-dev/devops_itkdev-docker if need be.

### ### YAML
###
### Validates YAML files.
###
### #### Assumptions
###
### 1. A docker compose service named `prettier` for running
### [Prettier](https://prettier.io/) exists.
###
### #### Symfony YAML
###
### Symfony's YAML config files use 4 spaces for indentation and single quotes.
### Therefore we use a [Prettier configuration
### file](https://prettier.io/docs/configuration), `.prettierrc.yaml`, to make
### Prettier format YAML files in the `config/` folder like Symfony expects.

name: YAML

on:
pull_request:
push:
branches:
- main
- develop

jobs:
yaml-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- name: Create docker network
run: |
docker network create frontend

- run: |
docker compose run --rm prettier '**/*.{yml,yaml}' --check
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
composer.lock
vendor
*.cache
.idea
Loading