Skip to content

Commit

Permalink
Merge pull request #655 from nextcloud/bugfix/noid/translationtool
Browse files Browse the repository at this point in the history
Regenerate translationtool
  • Loading branch information
nickvergessen authored Aug 26, 2024
2 parents 93319dd + 7b58b61 commit 2f966d3
Show file tree
Hide file tree
Showing 10 changed files with 352 additions and 92 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/lint-php-cs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT

name: Lint php-cs

on: pull_request

permissions:
contents: read

concurrency:
group: lint-php-cs-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest

name: php-cs

steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Set up php8.3
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
with:
php-version: 8.3
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
coverage: none
ini-file: development
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install dependencies
working-directory: translations/translationtool/
run: composer i

- name: Lint
working-directory: translations/translationtool/
run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )
2 changes: 1 addition & 1 deletion translations/handleAppsTranslations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ do
fi
fi

# prepate git commit
# prepare git commit
git add l10n/*.js l10n/*.json || true

cd ..
Expand Down
1 change: 1 addition & 0 deletions translations/translationtool/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
vendor
composer.phar
.vscode
.php-cs-fixer.cache
22 changes: 22 additions & 0 deletions translations/translationtool/.php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

require_once './vendor-bin/csfixer/vendor/autoload.php';

use Nextcloud\CodingStandard\Config;
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;

$config = new Config();
$config
->setParallelConfig(ParallelConfigFactory::detect())
->getFinder()
->ignoreVCSIgnored(true)
->notPath('vendor')
->notPath('vendor-bin')
->in(__DIR__ . '/src');
return $config;
20 changes: 19 additions & 1 deletion translations/translationtool/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,29 @@
"description": "Needed for the translation tool",
"license": "MIT",
"config": {
"allow-plugins": {
"bamarni/composer-bin-plugin": true
},
"vendor-dir": "vendor",
"optimize-autoloader": true,
"classmap-authoritative": true
"classmap-authoritative": true,
"platform": {
"php": "8.1"
},
"sort-packages": true
},
"require": {
"bamarni/composer-bin-plugin": "^1.8.2",
"clue/phar-composer": "^1.3"
},
"scripts": {
"cs:check": "php-cs-fixer fix --dry-run --diff",
"cs:fix": "php-cs-fixer fix",
"post-install-cmd": [
"@composer bin all install --ansi"
],
"post-update-cmd": [
"@composer bin all update --ansi"
]
}
}
64 changes: 62 additions & 2 deletions translations/translationtool/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2f966d3

Please sign in to comment.