diff --git a/.gitattributes b/.gitattributes index 08f809af71e..1d3d767fd32 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,5 @@ # Autodetect text files -* text=auto +* text=auto eol=lf # ...Unless the name matches the following overriding patterns diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f69cc79f804..b2cc61a4f5b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,95 +4,108 @@ on: [push, pull_request] env: DEFAULT_COMPOSER_FLAGS: "--prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi" - PHPUNIT_EXCLUDE_GROUP: mssql,oci,wincache,xcache,zenddata,cubrid + PHPUNIT_EXCLUDE_GROUP: db,wincache,xcache,zenddata XDEBUG_MODE: coverage, develop +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: phpunit: name: PHP ${{ matrix.php }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} - services: - mysql: - image: mysql:5.7 - env: - MYSQL_ROOT_PASSWORD: root - MYSQL_DATABASE: yiitest - ports: - - 3306:3306 - options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 - postgres: - image: postgres:9.6 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_DB: yiitest - ports: - - 5432:5432 - options: --name=postgres --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3 + strategy: fail-fast: false matrix: - os: [ubuntu-latest] - php: [5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1] + include: + - php: 5.4 + coverage: none + extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached + os: ubuntu-latest + - php: 5.5 + coverage: none + extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached + os: ubuntu-latest + - php: 5.6 + coverage: none + extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached + os: ubuntu-latest + - php: 7.0 + coverage: none + extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached + os: ubuntu-latest + - php: 7.1 + coverage: none + extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached + os: ubuntu-latest + - php: 7.2 + coverage: none + extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached + os: ubuntu-latest + - php: 7.3 + coverage: none + extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached + os: ubuntu-latest + - php: 7.4 + coverage: xdebug + extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached + os: ubuntu-latest + - php: 8.0 + coverage: none + extensions: apcu, curl, dom, imagick, intl, mbstring, mcrypt, memcached + os: ubuntu-latest + - php: 8.1 + coverage: none + extensions: apcu, curl, dom, imagick, intl, mbstring, mcrypt, memcached + os: ubuntu-latest + - php: 8.2 + extensions: apcu, curl, dom, imagick, intl, mbstring, mcrypt, memcached + coverage: none + os: ubuntu-latest + - php: 8.3 + extensions: apcu, curl, dom, imagick, intl, mbstring, mcrypt, memcached + coverage: none + os: ubuntu-latest steps: - - name: Generate french locale + - name: Generate french locale. run: sudo locale-gen fr_FR.UTF-8 - - name: Checkout - uses: actions/checkout@v3 - - name: Install PHP + + - name: Checkout. + uses: actions/checkout@v4 + + - name: Install PHP. uses: shivammathur/setup-php@v2 with: + coverage: ${{ matrix.coverage }} + extensions: ${{ matrix.extensions }} + ini-values: apc.enabled=1,apc.shm_size=32M,apc.enable_cli=1, date.timezone='UTC', session.save_path="${{ runner.temp }}" php-version: ${{ matrix.php }} tools: pecl - extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached, mysql, pdo, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, sqlite - ini-values: date.timezone='UTC', session.save_path="${{ runner.temp }}" - - name: Install Memcached + + - name: Install Memcached. uses: niden/actions-memcached@v7 - - name: Get composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - name: Cache composer dependencies - uses: actions/cache@v3 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - name: Install dependencies + + - name: Install dependencies. run: composer update $DEFAULT_COMPOSER_FLAGS - - name: PHP Unit tests + + - name: Run tests with PHPUnit. + if: matrix.php < '7.4' || matrix.php >= '8.1' run: vendor/bin/phpunit --verbose --exclude-group $PHPUNIT_EXCLUDE_GROUP --colors=always - npm: - name: NPM 6 on ubuntu-latest - runs-on: ubuntu-latest + - name: Run tests with PHPUnit. + if: matrix.php == '8.0' + run: vendor/bin/phpunit --verbose --exclude-group $PHPUNIT_EXCLUDE_GROUP --colors=always - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Install PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 7.2 - ini-values: session.save_path=${{ runner.temp }} - - name: Get composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - name: Cache composer dependencies - uses: actions/cache@v3 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - name: Install dependencies - run: composer update $DEFAULT_COMPOSER_FLAGS - - name: Install node.js - uses: actions/setup-node@v1 + - name: Run tests with PHPUnit and generate coverage. + if: matrix.php == '7.4' + run: vendor/bin/phpunit --verbose --exclude-group $PHPUNIT_EXCLUDE_GROUP --coverage-clover=coverage.xml --colors=always + + - name: Upload coverage to Codecov. + if: matrix.php == '7.4' + uses: codecov/codecov-action@v3 with: - node-version: 6 - - name: Tests - run: | - npm install - npm test -# env: -# CI: true + file: ./coverage.xml diff --git a/.github/workflows/ci-mssql.yml b/.github/workflows/ci-mssql.yml index f8ad3eff475..e80550119d0 100644 --- a/.github/workflows/ci-mssql.yml +++ b/.github/workflows/ci-mssql.yml @@ -4,42 +4,33 @@ on: name: ci-mssql +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: tests: name: PHP ${{ matrix.php }}-mssql-${{ matrix.mssql }} env: - key: cache + EXTENSIONS: pdo, pdo_sqlsrv + XDEBUG_MODE: coverage, develop runs-on: ubuntu-latest strategy: matrix: include: - - php: 7.0 - extensions: pdo, pdo_sqlsrv-5.8.1 - mssql: server:2017-latest - - php: 7.1 - extensions: pdo, pdo_sqlsrv-5.8.1 - mssql: server:2017-latest - - php: 7.2 - extensions: pdo, pdo_sqlsrv-5.8.1 - mssql: server:2017-latest - - php: 7.3 - extensions: pdo, pdo_sqlsrv-5.8.1 - mssql: server:2017-latest - php: 7.4 - extensions: pdo, pdo_sqlsrv - mssql: server:2017-latest - - php: 7.4 - extensions: pdo, pdo_sqlsrv - mssql: server:2019-latest - - php: 8.0 - extensions: pdo, pdo_sqlsrv mssql: server:2017-latest - php: 8.0 - extensions: pdo, pdo_sqlsrv mssql: server:2019-latest + - php: 8.1 + mssql: server:2019-latest + - php: 8.2 + mssql: server:2022-latest + - php: 8.3 + mssql: server:2022-latest services: mssql: @@ -54,7 +45,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Create MS SQL Database run: docker exec -i mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'CREATE DATABASE yiitest' @@ -62,42 +53,28 @@ jobs: - name: Install PHP with extensions uses: shivammathur/setup-php@v2 with: - php-version: ${{ matrix.php }} - extensions: ${{ matrix.extensions }} + coverage: xdebug + extensions: ${{ env.EXTENSIONS }} ini-values: date.timezone='UTC' + php-version: ${{ matrix.php }} tools: composer:v2, pecl - - name: Determine composer cache directory on Linux - run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV - - - name: Cache dependencies installed with composer - uses: actions/cache@v3 - with: - path: ${{ env.COMPOSER_CACHE_DIR }} - key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: | - php${{ matrix.php }}-composer- - - name: Update composer run: composer self-update - name: Install dependencies with composer run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi - - name: Install dependencies with composer php 8.0 - if: matrix.php == '8.0' - run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi + - name: Run MSSQL tests with PHPUnit and generate coverage. + if: matrix.php == '7.4' + run: vendor/bin/phpunit --group mssql --coverage-clover=coverage.xml --colors=always - - name: PHP Unit tests for PHP 7.1 - run: vendor/bin/phpunit --coverage-clover=coverage.clover --group mssql --colors=always - if: matrix.php == '7.1' - - - name: Run tests with phpunit without coverage + - name: Run MSSQL tests with PHPUnit. + if: matrix.php > '7.4' run: vendor/bin/phpunit --group mssql --colors=always - - name: Code coverage - run: | - wget https://scrutinizer-ci.com/ocular.phar - php ocular.phar code-coverage:upload --format=php-clover coverage.clover - if: matrix.php == '7.1' - continue-on-error: true # if is fork + - name: Upload coverage to Codecov. + if: matrix.php == '7.4' + uses: codecov/codecov-action@v3 + with: + file: ./coverage.xml diff --git a/.github/workflows/ci-mysql.yml b/.github/workflows/ci-mysql.yml index 639609b0e84..4e0f651aae9 100644 --- a/.github/workflows/ci-mysql.yml +++ b/.github/workflows/ci-mysql.yml @@ -4,12 +4,16 @@ on: name: ci-mysql +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: tests: - name: PHP ${{ matrix.php-version }}-mysql-${{ matrix.mysql-version }} + name: PHP ${{ matrix.php }}-mysql-${{ matrix.mysql }} env: extensions: curl, intl, pdo, pdo_mysql - key: cache-v1 + XDEBUG_MODE: coverage, develop runs-on: ${{ matrix.os }} @@ -18,15 +22,20 @@ jobs: os: - ubuntu-latest - php-version: + php: - 7.4 + - 8.0 + - 8.1 + - 8.2 + - 8.3 - mysql-version: + mysql: + - 5.7 - latest services: mysql: - image: mysql:${{ matrix.mysql-version }} + image: mysql:${{ matrix.mysql }} env: MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: yiitest @@ -35,46 +44,31 @@ jobs: options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup cache environment - id: cache-env - uses: shivammathur/cache-extensions@v1 - with: - php-version: ${{ matrix.php-version }} - extensions: ${{ env.extensions }} - key: ${{ env.key }} + - name: Checkout. + uses: actions/checkout@v4 - - name: Cache extensions - uses: actions/cache@v3 - with: - path: ${{ steps.cache-env.outputs.dir }} - key: ${{ steps.cache-env.outputs.key }} - restore-keys: ${{ steps.cache-env.outputs.key }} - - - name: Install PHP with extensions + - name: Install PHP with extensions. uses: shivammathur/setup-php@v2 with: - php-version: ${{ matrix.php-version }} - extensions: ${{ env.extensions }} + coverage: xdebug + extensions: ${{ env.EXTENSIONS }} ini-values: date.timezone='UTC' - coverage: pcov - - - name: Determine composer cache directory - if: matrix.os == 'ubuntu-latest' - run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV + php-version: ${{ matrix.php }} + tools: composer:v2, pecl - - name: Cache dependencies installed with composer - uses: actions/cache@v1 - with: - path: ${{ env.COMPOSER_CACHE_DIR }} - key: php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }} - restore-keys: | - php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}- - - - name: Install dependencies with composer + - name: Install dependencies with composer. run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi - - name: Run mysql tests with phpunit + - name: Run MySQL tests with PHPUnit and generate coverage. + if: matrix.php == '7.4' + run: vendor/bin/phpunit --group mysql --coverage-clover=coverage.xml --colors=always + + - name: Run MySQL tests with PHPUnit. + if: matrix.php > '7.4' run: vendor/bin/phpunit --group mysql --colors=always + + - name: Upload coverage to Codecov. + if: matrix.php == '7.4' + uses: codecov/codecov-action@v3 + with: + file: ./coverage.xml diff --git a/.github/workflows/ci-node.yml b/.github/workflows/ci-node.yml new file mode 100644 index 00000000000..3f49942b84a --- /dev/null +++ b/.github/workflows/ci-node.yml @@ -0,0 +1,36 @@ +name: build-node + +on: [push, pull_request] + +env: + DEFAULT_COMPOSER_FLAGS: "--prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + name: NPM 6 on ubuntu-latest + + runs-on: ubuntu-latest + + steps: + - name: Checkout. + uses: actions/checkout@v4 + + - name: Install dependencies. + run: composer update $DEFAULT_COMPOSER_FLAGS + + - name: Install JQuery `3.6.*@stable` for tests. + run: composer require "bower-asset/jquery:3.6.*@stable" + + - name: Install node.js. + uses: actions/setup-node@v1 + with: + node-version: 6 + + - name: Tests. + run: | + npm install + npm test diff --git a/.github/workflows/ci-oracle.yml b/.github/workflows/ci-oracle.yml index d6c9db0f428..be139ff540c 100644 --- a/.github/workflows/ci-oracle.yml +++ b/.github/workflows/ci-oracle.yml @@ -4,13 +4,17 @@ on: name: ci-oracle +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: tests: name: PHP ${{ matrix.php }}-${{ matrix.os }} env: extensions: oci8, pdo, pdo_oci - key: cache-v1 + XDEBUG_MODE: coverage, develop runs-on: ${{ matrix.os }} @@ -30,52 +34,28 @@ jobs: options: --name=oci steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup cache environment - id: cache-env - uses: shivammathur/cache-extensions@v1 - with: - php-version: ${{ matrix.php }} - extensions: ${{ env.extensions }} - key: ${{ env.key }} - - - name: Cache extensions - uses: actions/cache@v1 - with: - path: ${{ steps.cache-env.outputs.dir }} - key: ${{ steps.cache-env.outputs.key }} - restore-keys: ${{ steps.cache-env.outputs.key }} + - name: Checkout. + uses: actions/checkout@v4 - - name: Install PHP with extensions + - name: Install PHP with extensions. uses: shivammathur/setup-php@v2 with: - php-version: ${{ matrix.php }} - extensions: ${{ env.extensions }} + coverage: xdebug + extensions: ${{ env.EXTENSIONS }} ini-values: date.timezone='UTC' - coverage: pcov + php-version: ${{ matrix.php }} tools: composer:v2, pecl - - name: Determine composer cache directory - run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV + - name: Update composer. + run: composer self-update - - name: Cache dependencies installed with composer - uses: actions/cache@v3 - with: - path: ${{ env.COMPOSER_CACHE_DIR }} - key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: | - php${{ matrix.php }}-composer- - - - name: Install dependencies with composer + - name: Install dependencies with composer. run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi - - name: PHP Unit tests - run: vendor/bin/phpunit --coverage-clover=coverage.clover --group oci --colors=always + - name: Run Oracle tests with PHPUnit and generate coverage. + run: vendor/bin/phpunit --group oci --coverage-clover=coverage.xml --colors=always - - name: Code coverage - run: | - wget https://scrutinizer-ci.com/ocular.phar - php ocular.phar code-coverage:upload --format=php-clover coverage.clover - continue-on-error: true # if is fork + - name: Upload coverage to Codecov. + uses: codecov/codecov-action@v3 + with: + file: ./coverage.xml diff --git a/.github/workflows/ci-pgsql.yml b/.github/workflows/ci-pgsql.yml index 7bfa4d44659..ba0217e2212 100644 --- a/.github/workflows/ci-pgsql.yml +++ b/.github/workflows/ci-pgsql.yml @@ -4,12 +4,16 @@ on: name: ci-pgsql +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: tests: - name: PHP ${{ matrix.php-version }}-pgsql-${{ matrix.pgsql-version }} + name: PHP ${{ matrix.php }}-pgsql-${{ matrix.pgsql }} env: extensions: curl, intl, pdo, pdo_pgsql - key: cache-v1 + XDEBUG_MODE: coverage, develop runs-on: ${{ matrix.os }} @@ -18,19 +22,24 @@ jobs: os: - ubuntu-latest - php-version: + php: - 7.4 + - 8.0 + - 8.1 + - 8.2 + - 8.3 - pgsql-version: + pgsql: - 10 - 11 - 12 - 13 - 14 + - 15 services: postgres: - image: postgres:${{ matrix.pgsql-version }} + image: postgres:${{ matrix.pgsql }} env: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres @@ -40,46 +49,34 @@ jobs: options: --name=postgres --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3 steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup cache environment - id: cache-env - uses: shivammathur/cache-extensions@v1 - with: - php-version: ${{ matrix.php-version }} - extensions: ${{ env.extensions }} - key: ${{ env.key }} - - - name: Cache extensions - uses: actions/cache@v1 - with: - path: ${{ steps.cache-env.outputs.dir }} - key: ${{ steps.cache-env.outputs.key }} - restore-keys: ${{ steps.cache-env.outputs.key }} + - name: Checkout. + uses: actions/checkout@v4 - name: Install PHP with extensions uses: shivammathur/setup-php@v2 with: - php-version: ${{ matrix.php-version }} - extensions: ${{ env.extensions }} + coverage: xdebug + extensions: ${{ env.EXTENSIONS }} ini-values: date.timezone='UTC' - coverage: pcov + php-version: ${{ matrix.php }} + tools: composer:v2, pecl - - name: Determine composer cache directory - if: matrix.os == 'ubuntu-latest' - run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV + - name: Update composer. + run: composer self-update - - name: Cache dependencies installed with composer - uses: actions/cache@v3 - with: - path: ${{ env.COMPOSER_CACHE_DIR }} - key: php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }} - restore-keys: | - php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}- - - - name: Install dependencies with composer + - name: Install dependencies with composer. run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi - - name: Run pgsql tests with phpunit + - name: Run Pgsql tests with PHPUnit and generate coverage. + if: matrix.php == '7.4' + run: vendor/bin/phpunit --group pgsql --coverage-clover=coverage.xml --colors=always + + - name: Run Pgsql tests with PHPUnit. + if: matrix.php > '7.4' run: vendor/bin/phpunit --group pgsql --colors=always + + - name: Upload coverage to Codecov. + if: matrix.php == '7.4' + uses: codecov/codecov-action@v3 + with: + file: ./coverage.xml diff --git a/.github/workflows/ci-sqlite.yml b/.github/workflows/ci-sqlite.yml new file mode 100644 index 00000000000..707ecb1b9aa --- /dev/null +++ b/.github/workflows/ci-sqlite.yml @@ -0,0 +1,64 @@ +on: + - pull_request + - push + +name: ci-sqlite + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + tests: + name: PHP ${{ matrix.php }}-sqlite + + env: + EXTENSIONS: pdo, pdo_sqlite, sqlite3 + XDEBUG_MODE: coverage, develop + + runs-on: ubuntu-latest + + strategy: + matrix: + os: + - ubuntu-latest + + php: + - 7.4 + - 8.0 + - 8.1 + - 8.2 + - 8.3 + + steps: + - name: Checkout. + uses: actions/checkout@v4 + + - name: Install PHP with extensions. + uses: shivammathur/setup-php@v2 + with: + coverage: xdebug + extensions: ${{ env.EXTENSIONS }} + ini-values: date.timezone='UTC' + php-version: ${{ matrix.php }} + tools: composer:v2, pecl + + - name: Update composer. + run: composer self-update + + - name: Install dependencies with composer. + run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi + + - name: Run SQLite tests with PHPUnit and generate coverage. + if: matrix.php == '7.4' + run: vendor/bin/phpunit --group sqlite --coverage-clover=coverage.xml --colors=always + + - name: Run SQLite tests with PHPUnit. + if: matrix.php > '7.4' + run: vendor/bin/phpunit --group sqlite --colors=always + + - name: Upload coverage to Codecov. + if: matrix.php == '7.4' + uses: codecov/codecov-action@v3 + with: + file: ./coverage.xml diff --git a/Dockerfile b/Dockerfile index 86f3a3a85c7..4e779bdeba4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,10 +4,7 @@ FROM ${DOCKER_YII2_PHP_IMAGE} # Project source-code WORKDIR /project ADD composer.* /project/ -# Apply testing patches -ADD tests/phpunit_mock_objects.patch /project/tests/phpunit_mock_objects.patch -ADD tests/phpunit_getopt.patch /project/tests/phpunit_getopt.patch -# Install packgaes +# Install packages RUN /usr/local/bin/composer install --prefer-dist ADD ./ /project ENV PATH /project/vendor/bin:${PATH} diff --git a/build/controllers/MimeTypeController.php b/build/controllers/MimeTypeController.php index 67c0758ee63..7986dd56cc8 100644 --- a/build/controllers/MimeTypeController.php +++ b/build/controllers/MimeTypeController.php @@ -49,14 +49,19 @@ class MimeTypeController extends Controller * @var array MIME types to add to the ones parsed from Apache files */ private $additionalMimeTypes = [ + 'apng' => 'image/apng', + 'avif' => 'image/avif', + 'jfif' => 'image/jpeg', 'mjs' => 'text/javascript', + 'pjp' => 'image/jpeg', + 'pjpeg' => 'image/jpeg', ]; /** * @param string $outFile the mime file to update. Defaults to @yii/helpers/mimeTypes.php * @param string $aliasesOutFile the aliases file to update. Defaults to @yii/helpers/mimeAliases.php */ - public function actionIndex($outFile = null, $aliasesOutFile = null) + public function actionIndex($outFile = null, $aliasesOutFile = null, $extensionsOutFile = null) { if ($outFile === null) { $outFile = Yii::getAlias('@yii/helpers/mimeTypes.php'); @@ -66,11 +71,16 @@ public function actionIndex($outFile = null, $aliasesOutFile = null) $aliasesOutFile = Yii::getAlias('@yii/helpers/mimeAliases.php'); } + if ($extensionsOutFile === null) { + $extensionsOutFile = Yii::getAlias('@yii/helpers/mimeExtensions.php'); + } + $this->stdout('Downloading mime-type file from apache httpd repository...'); if ($apacheMimeTypesFileContent = file_get_contents('https://svn.apache.org/viewvc/httpd/httpd/trunk/docs/conf/mime.types?view=co')) { $this->stdout("Done.\n", Console::FG_GREEN); $this->generateMimeTypesFile($outFile, $apacheMimeTypesFileContent); $this->generateMimeAliasesFile($aliasesOutFile); + $this->generateMimeExtensionsFile($extensionsOutFile, $apacheMimeTypesFileContent); } else { $this->stderr("Failed to download mime.types file from apache SVN.\n"); } @@ -97,14 +107,10 @@ private function generateMimeTypesFile($outFile, $content) } } } - $mimeMap = array_merge($mimeMap, $this->additionalMimeTypes); - ksort($mimeMap); + $mimeMap = array_replace($mimeMap, $this->additionalMimeTypes); + ksort($mimeMap, SORT_STRING); $array = VarDumper::export($mimeMap); - if (PHP_VERSION_ID >= 80100) { - $array = array_replace($array, array('xz' => 'application/octet-stream')); - } - $content = <<= 80100 && PHP_VERSION_ID < 80122) || (PHP_VERSION_ID >= 80200 && PHP_VERSION_ID < 80209)) { + \$mimeTypes = array_replace(\$mimeTypes, array('xz' => 'application/octet-stream')); +} + +return \$mimeTypes; EOD; file_put_contents($outFile, $content); @@ -136,6 +152,73 @@ private function generateMimeAliasesFile($outFile) * MIME aliases. * * This file contains aliases for MIME types. + * + * All extra changes made to this file must be comitted to /build/controllers/MimeTypeController.php + * otherwise they will be lost on next build. + */ +return $array; + +EOD; + file_put_contents($outFile, $content); + $this->stdout("done.\n", Console::FG_GREEN); + } + + /** + * @param string $outFile + * @param string $content + */ + private function generateMimeExtensionsFile($outFile, $content) + { + $this->stdout("Generating file $outFile..."); + + $extensionMap = []; + foreach (explode("\n", $content) as $line) { + $line = trim($line); + if (empty($line) || strpos($line, '#') === 0) { // skip comments and empty lines + continue; + } + $parts = preg_split('/\s+/', $line); + $mime = array_shift($parts); + if (!empty($parts)) { + $extensionMap[$mime] = []; + foreach ($parts as $ext) { + if (!empty($ext)) { + $extensionMap[$mime][] = $ext; + } + } + } + } + + foreach ($this->additionalMimeTypes as $ext => $mime) { + if (!array_key_exists($mime, $extensionMap)) { + $extensionMap[$mime] = []; + } + $extensionMap[$mime][] = $ext; + } + + foreach ($extensionMap as $mime => $extensions) { + if (count($extensions) === 1) { + $extensionMap[$mime] = $extensions[0]; + } + } + + ksort($extensionMap, SORT_STRING); + $array = VarDumper::export($extensionMap); + + $content = <<stdout("- no accidentally added CHANGELOG lines for other versions than this one?\n\n git diff $gitVersion.. ${gitDir}CHANGELOG.md\n\n"); + $this->stdout("- no accidentally added CHANGELOG lines for other versions than this one?\n\n git diff $gitVersion.. {$gitDir}CHANGELOG.md\n\n"); $this->stdout("- are all new `@since` tags for this release version?\n"); } - $this->stdout("- other issues with code changes?\n\n git diff -w $gitVersion.. ${gitDir}\n\n"); + $this->stdout("- other issues with code changes?\n\n git diff -w $gitVersion.. {$gitDir}\n\n"); $travisUrl = reset($what) === 'framework' ? '' : '-' . reset($what); $this->stdout("- are unit tests passing on travis? https://travis-ci.com/yiisoft/yii2$travisUrl/builds\n"); $this->stdout("- also make sure the milestone on github is complete and no issues or PRs are left open.\n\n"); diff --git a/composer.json b/composer.json index 78ffddbb17c..ef5d068f59d 100644 --- a/composer.json +++ b/composer.json @@ -73,11 +73,11 @@ "ext-ctype": "*", "lib-pcre": "*", "yiisoft/yii2-composer": "~2.0.4", - "ezyang/htmlpurifier": "~4.6", + "ezyang/htmlpurifier": "^4.6", "cebe/markdown": "~1.0.0 | ~1.1.0 | ~1.2.0", - "bower-asset/jquery": "3.6.*@stable | 3.5.*@stable | 3.4.*@stable | 3.3.*@stable | 3.2.*@stable | 3.1.*@stable | 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable", - "bower-asset/inputmask": "~3.2.2 | ~3.3.5", - "bower-asset/punycode": "1.3.*", + "bower-asset/jquery": "3.7.*@stable | 3.6.*@stable | 3.5.*@stable | 3.4.*@stable | 3.3.*@stable | 3.2.*@stable | 3.1.*@stable | 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable", + "bower-asset/inputmask": "^5.0.8 ", + "bower-asset/punycode": "^2.2", "bower-asset/yii2-pjax": "~2.0.1", "paragonie/random_compat": ">=1" }, @@ -85,7 +85,7 @@ "cweagans/composer-patches": "^1.7", "phpunit/phpunit": "4.8.34", "cebe/indent": "~1.0.2", - "friendsofphp/php-cs-fixer": "~2.2.3", + "friendsofphp/php-cs-fixer": "~2.2.3 | ^3.0", "johnkary/phpunit-speedtrap": "^1.0" }, "repositories": [ @@ -110,7 +110,6 @@ } }, "config": { - "platform": {"php": "5.4"}, "allow-plugins": { "cweagans/composer-patches": true, "yiisoft/yii2-composer": true diff --git a/composer.lock b/composer.lock index 9837fbe353e..e3b8a15c6c7 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a9d10c9948017f8926d64be83e5e2397", + "content-hash": "9ee35a67e578251573a9017059b62b76", "packages": [ { "name": "bower-asset/inputmask", - "version": "3.3.11", + "version": "5.0.8", "source": { "type": "git", "url": "git@github.com:RobinHerbots/Inputmask.git", - "reference": "5e670ad62f50c738388d4dcec78d2888505ad77b" + "reference": "e0f39e0c93569c6b494c3a57edef2c59313a6b64" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/RobinHerbots/Inputmask/zipball/5e670ad62f50c738388d4dcec78d2888505ad77b", - "reference": "5e670ad62f50c738388d4dcec78d2888505ad77b" + "url": "https://api.github.com/repos/RobinHerbots/Inputmask/zipball/e0f39e0c93569c6b494c3a57edef2c59313a6b64", + "reference": "e0f39e0c93569c6b494c3a57edef2c59313a6b64" }, "require": { "bower-asset/jquery": ">=1.7" @@ -29,16 +29,16 @@ }, { "name": "bower-asset/jquery", - "version": "3.6.0", + "version": "3.6.4", "source": { "type": "git", - "url": "https://github.com/jquery/jquery-dist.git", - "reference": "e786e3d9707ffd9b0dd330ca135b66344dcef85a" + "url": "git@github.com:jquery/jquery-dist.git", + "reference": "91ef2d8836342875f2519b5815197ea0f23613cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jquery/jquery-dist/zipball/e786e3d9707ffd9b0dd330ca135b66344dcef85a", - "reference": "e786e3d9707ffd9b0dd330ca135b66344dcef85a" + "url": "https://api.github.com/repos/jquery/jquery-dist/zipball/91ef2d8836342875f2519b5815197ea0f23613cf", + "reference": "91ef2d8836342875f2519b5815197ea0f23613cf" }, "type": "bower-asset", "license": [ @@ -47,31 +47,31 @@ }, { "name": "bower-asset/punycode", - "version": "v1.3.2", + "version": "v2.2.3", "source": { "type": "git", "url": "https://github.com/mathiasbynens/punycode.js.git", - "reference": "38c8d3131a82567bfef18da09f7f4db68c84f8a3" + "reference": "46d412120e2feb868876769a9847790ba278c882" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mathiasbynens/punycode.js/zipball/38c8d3131a82567bfef18da09f7f4db68c84f8a3", - "reference": "38c8d3131a82567bfef18da09f7f4db68c84f8a3" + "url": "https://api.github.com/repos/mathiasbynens/punycode.js/zipball/46d412120e2feb868876769a9847790ba278c882", + "reference": "46d412120e2feb868876769a9847790ba278c882" }, "type": "bower-asset" }, { "name": "bower-asset/yii2-pjax", - "version": "2.0.7.1", + "version": "2.0.8", "source": { "type": "git", - "url": "https://github.com/yiisoft/jquery-pjax.git", - "reference": "aef7b953107264f00234902a3880eb50dafc48be" + "url": "git@github.com:yiisoft/jquery-pjax.git", + "reference": "a9298d57da63d14a950f1b94366a864bc62264fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/jquery-pjax/zipball/aef7b953107264f00234902a3880eb50dafc48be", - "reference": "aef7b953107264f00234902a3880eb50dafc48be" + "url": "https://api.github.com/repos/yiisoft/jquery-pjax/zipball/a9298d57da63d14a950f1b94366a864bc62264fb", + "reference": "a9298d57da63d14a950f1b94366a864bc62264fb" }, "require": { "bower-asset/jquery": ">=1.8" @@ -147,20 +147,30 @@ }, { "name": "ezyang/htmlpurifier", - "version": "v4.14.0", + "version": "v4.17.0", "source": { "type": "git", "url": "https://github.com/ezyang/htmlpurifier.git", - "reference": "12ab42bd6e742c70c0a52f7b82477fcd44e64b75" + "reference": "bbc513d79acf6691fa9cf10f192c90dd2957f18c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/12ab42bd6e742c70c0a52f7b82477fcd44e64b75", - "reference": "12ab42bd6e742c70c0a52f7b82477fcd44e64b75", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/bbc513d79acf6691fa9cf10f192c90dd2957f18c", + "reference": "bbc513d79acf6691fa9cf10f192c90dd2957f18c", "shasum": "" }, "require": { - "php": ">=5.2" + "php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" + }, + "require-dev": { + "cerdic/css-tidy": "^1.7 || ^2.0", + "simpletest/simpletest": "dev-master" + }, + "suggest": { + "cerdic/css-tidy": "If you want to use the filter 'Filter.ExtractStyleBlocks'.", + "ext-bcmath": "Used for unit conversion and imagecrash protection", + "ext-iconv": "Converts text to and from non-UTF-8 encodings", + "ext-tidy": "Used for pretty-printing HTML" }, "type": "library", "autoload": { @@ -192,39 +202,35 @@ ], "support": { "issues": "https://github.com/ezyang/htmlpurifier/issues", - "source": "https://github.com/ezyang/htmlpurifier/tree/v4.14.0" + "source": "https://github.com/ezyang/htmlpurifier/tree/v4.17.0" }, - "time": "2021-12-25T01:21:49+00:00" + "time": "2023-11-17T15:01:25+00:00" }, { "name": "paragonie/random_compat", - "version": "v2.0.21", + "version": "v9.99.100", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "96c132c7f2f7bc3230723b66e89f8f150b29d5ae" + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/96c132c7f2f7bc3230723b66e89f8f150b29d5ae", - "reference": "96c132c7f2f7bc3230723b66e89f8f150b29d5ae", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", "shasum": "" }, "require": { - "php": ">=5.2.0" + "php": ">= 7" }, "require-dev": { - "phpunit/phpunit": "*" + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" }, "suggest": { "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." }, "type": "library", - "autoload": { - "files": [ - "lib/random.php" - ] - }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" @@ -248,7 +254,7 @@ "issues": "https://github.com/paragonie/random_compat/issues", "source": "https://github.com/paragonie/random_compat" }, - "time": "2022-02-16T17:07:03+00:00" + "time": "2020-10-15T08:29:30+00:00" }, { "name": "yiisoft/yii2-composer", @@ -365,30 +371,102 @@ }, "time": "2014-05-23T14:40:08+00:00" }, + { + "name": "composer/pcre", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/00104306927c7a0919b4ced2aaa6782c1e61a3c9", + "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.3", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.1.1" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2023-10-11T07:11:09+00:00" + }, { "name": "composer/semver", - "version": "1.7.2", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "647490bbcaf7fc4891c58f47b825eb99d19c377a" + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/647490bbcaf7fc4891c58f47b825eb99d19c377a", - "reference": "647490bbcaf7fc4891c58f47b825eb99d19c377a", + "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", "shasum": "" }, "require": { "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^4.5 || ^5.0.5" + "phpstan/phpstan": "^1.4", + "symfony/phpunit-bridge": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-main": "3.x-dev" } }, "autoload": { @@ -425,9 +503,9 @@ "versioning" ], "support": { - "irc": "irc://irc.freenode.org/composer", + "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/1.7.2" + "source": "https://github.com/composer/semver/tree/3.4.0" }, "funding": [ { @@ -443,29 +521,31 @@ "type": "tidelift" } ], - "time": "2020-12-03T15:47:16+00:00" + "time": "2023-08-31T09:50:34+00:00" }, { "name": "composer/xdebug-handler", - "version": "1.4.6", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "f27e06cd9675801df441b3656569b328e04aa37c" + "reference": "ced299686f41dce890debac69273b47ffe98a40c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/f27e06cd9675801df441b3656569b328e04aa37c", - "reference": "f27e06cd9675801df441b3656569b328e04aa37c", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", + "reference": "ced299686f41dce890debac69273b47ffe98a40c", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0 || ^8.0", - "psr/log": "^1.0" + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", + "psr/log": "^1 || ^2 || ^3" }, "require-dev": { - "phpstan/phpstan": "^0.12.55", - "symfony/phpunit-bridge": "^4.2 || ^5" + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^6.0" }, "type": "library", "autoload": { @@ -491,7 +571,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/1.4.6" + "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" }, "funding": [ { @@ -507,20 +587,20 @@ "type": "tidelift" } ], - "time": "2021-03-25T17:01:18+00:00" + "time": "2022-02-25T21:32:43+00:00" }, { "name": "cweagans/composer-patches", - "version": "1.7.2", + "version": "1.7.3", "source": { "type": "git", "url": "https://github.com/cweagans/composer-patches.git", - "reference": "e9969cfc0796e6dea9b4e52f77f18e1065212871" + "reference": "e190d4466fe2b103a55467dfa83fc2fecfcaf2db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cweagans/composer-patches/zipball/e9969cfc0796e6dea9b4e52f77f18e1065212871", - "reference": "e9969cfc0796e6dea9b4e52f77f18e1065212871", + "url": "https://api.github.com/repos/cweagans/composer-patches/zipball/e190d4466fe2b103a55467dfa83fc2fecfcaf2db", + "reference": "e190d4466fe2b103a55467dfa83fc2fecfcaf2db", "shasum": "" }, "require": { @@ -553,41 +633,45 @@ "description": "Provides a way to patch Composer packages.", "support": { "issues": "https://github.com/cweagans/composer-patches/issues", - "source": "https://github.com/cweagans/composer-patches/tree/1.7.2" + "source": "https://github.com/cweagans/composer-patches/tree/1.7.3" }, - "time": "2022-01-25T19:21:20+00:00" + "time": "2022-12-20T22:53:13+00:00" }, { "name": "doctrine/annotations", - "version": "v1.2.7", + "version": "1.14.3", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535" + "reference": "fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/f25c8aab83e0c3e976fd7d19875f198ccf2f7535", - "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af", + "reference": "fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af", "shasum": "" }, "require": { - "doctrine/lexer": "1.*", - "php": ">=5.3.2" + "doctrine/lexer": "^1 || ^2", + "ext-tokenizer": "*", + "php": "^7.1 || ^8.0", + "psr/cache": "^1 || ^2 || ^3" }, "require-dev": { - "doctrine/cache": "1.*", - "phpunit/phpunit": "4.*" + "doctrine/cache": "^1.11 || ^2.0", + "doctrine/coding-standard": "^9 || ^10", + "phpstan/phpstan": "~1.4.10 || ^1.8.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "symfony/cache": "^4.4 || ^5.4 || ^6", + "vimeo/psalm": "^4.10" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } + "suggest": { + "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" }, + "type": "library", "autoload": { - "psr-0": { - "Doctrine\\Common\\Annotations\\": "lib/" + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" } }, "notification-url": "https://packagist.org/downloads/", @@ -595,6 +679,10 @@ "MIT" ], "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -603,10 +691,6 @@ "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, { "name": "Jonathan Wage", "email": "jonwage@gmail.com" @@ -617,47 +701,93 @@ } ], "description": "Docblock Annotations Parser", - "homepage": "http://www.doctrine-project.org", + "homepage": "https://www.doctrine-project.org/projects/annotations.html", "keywords": [ "annotations", "docblock", "parser" ], "support": { - "source": "https://github.com/doctrine/annotations/tree/master" + "issues": "https://github.com/doctrine/annotations/issues", + "source": "https://github.com/doctrine/annotations/tree/1.14.3" + }, + "time": "2023-02-01T09:20:38+00:00" + }, + { + "name": "doctrine/deprecations", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/4f2d4f2836e7ec4e7a8625e75c6aa916004db931", + "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9", + "phpstan/phpstan": "1.4.10 || 1.10.15", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "0.18.4", + "psr/log": "^1 || ^2 || ^3", + "vimeo/psalm": "4.30.0 || 5.12.0" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/1.1.2" }, - "time": "2015-08-31T12:32:49+00:00" + "time": "2023-09-27T20:04:15+00:00" }, { "name": "doctrine/instantiator", - "version": "1.0.5", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", "shasum": "" }, "require": { - "php": ">=5.3,<8.0-DEV" + "php": "^7.1 || ^8.0" }, "require-dev": { - "athletic/athletic": "~0.1.8", + "doctrine/coding-standard": "^9 || ^11", "ext-pdo": "*", "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.30 || ^5.4" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" @@ -671,50 +801,64 @@ { "name": "Marco Pivetta", "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" + "homepage": "https://ocramius.github.io/" } ], "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", "keywords": [ "constructor", "instantiate" ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/master" + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" }, - "time": "2015-06-14T21:17:01+00:00" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-12-30T00:15:36+00:00" }, { "name": "doctrine/lexer", - "version": "1.0.2", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "1febd6c3ef84253d7c815bed85fc622ad207a9f8" + "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/1febd6c3ef84253d7c815bed85fc622ad207a9f8", - "reference": "1febd6c3ef84253d7c815bed85fc622ad207a9f8", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", + "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", "shasum": "" }, "require": { - "php": ">=5.3.2" + "doctrine/deprecations": "^1.0", + "php": "^7.1 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^4.5" + "doctrine/coding-standard": "^9 || ^10", + "phpstan/phpstan": "^1.3", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^4.11 || ^5.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, "autoload": { "psr-4": { - "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + "Doctrine\\Common\\Lexer\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -722,14 +866,14 @@ "MIT" ], "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, { "name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com" }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, { "name": "Johannes Schmitt", "email": "schmittjoh@gmail.com" @@ -746,61 +890,76 @@ ], "support": { "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/1.0.2" + "source": "https://github.com/doctrine/lexer/tree/2.1.0" }, - "time": "2019-06-08T11:03:04+00:00" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2022-12-14T08:49:07+00:00" }, { "name": "friendsofphp/php-cs-fixer", - "version": "v2.2.20", + "version": "v3.9.5", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "f1631f0747ad2a9dd3de8d7873b71f6573f8d0c2" + "reference": "4465d70ba776806857a1ac2a6f877e582445ff36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/f1631f0747ad2a9dd3de8d7873b71f6573f8d0c2", - "reference": "f1631f0747ad2a9dd3de8d7873b71f6573f8d0c2", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/4465d70ba776806857a1ac2a6f877e582445ff36", + "reference": "4465d70ba776806857a1ac2a6f877e582445ff36", "shasum": "" }, "require": { - "composer/semver": "^1.4", - "composer/xdebug-handler": "^1.0", - "doctrine/annotations": "^1.2", + "composer/semver": "^3.2", + "composer/xdebug-handler": "^3.0.3", + "doctrine/annotations": "^1.13", "ext-json": "*", "ext-tokenizer": "*", - "php": "^5.3.6 || >=7.0 <7.3", - "sebastian/diff": "^1.4", - "symfony/console": "^2.4 || ^3.0 || ^4.0", - "symfony/event-dispatcher": "^2.1 || ^3.0 || ^4.0", - "symfony/filesystem": "^2.4 || ^3.0 || ^4.0", - "symfony/finder": "^2.2 || ^3.0 || ^4.0", - "symfony/options-resolver": "^2.6 || ^3.0 || ^4.0", - "symfony/polyfill-php54": "^1.0", - "symfony/polyfill-php55": "^1.3", - "symfony/polyfill-php70": "^1.0", - "symfony/polyfill-php72": "^1.4", - "symfony/process": "^2.3 || ^3.0 || ^4.0", - "symfony/stopwatch": "^2.5 || ^3.0 || ^4.0" - }, - "conflict": { - "hhvm": "<3.18" + "php": "^7.4 || ^8.0", + "php-cs-fixer/diff": "^2.0", + "symfony/console": "^5.4 || ^6.0", + "symfony/event-dispatcher": "^5.4 || ^6.0", + "symfony/filesystem": "^5.4 || ^6.0", + "symfony/finder": "^5.4 || ^6.0", + "symfony/options-resolver": "^5.4 || ^6.0", + "symfony/polyfill-mbstring": "^1.23", + "symfony/polyfill-php80": "^1.25", + "symfony/polyfill-php81": "^1.25", + "symfony/process": "^5.4 || ^6.0", + "symfony/stopwatch": "^5.4 || ^6.0" }, "require-dev": { - "johnkary/phpunit-speedtrap": "^1.0.1 || ^2.0 || ^3.0", - "justinrainbow/json-schema": "^5.0", - "keradus/cli-executor": "^1.1", - "mikey179/vfsstream": "^1.6", - "php-coveralls/php-coveralls": "^1.0.2", - "phpunit/phpunit": "^4.8.35 || ^5.4.3", - "symfony/phpunit-bridge": "^3.2.2 || ^4.0" + "justinrainbow/json-schema": "^5.2", + "keradus/cli-executor": "^1.5", + "mikey179/vfsstream": "^1.6.10", + "php-coveralls/php-coveralls": "^2.5.2", + "php-cs-fixer/accessible-object": "^1.1", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", + "phpspec/prophecy": "^1.15", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.5", + "phpunitgoodpractices/polyfill": "^1.5", + "phpunitgoodpractices/traits": "^1.9.1", + "symfony/phpunit-bridge": "^6.0", + "symfony/yaml": "^5.4 || ^6.0" }, "suggest": { - "ext-mbstring": "For handling non-UTF8 characters in cache signature.", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", - "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." + "ext-dom": "For handling output formats in XML", + "ext-mbstring": "For handling non-UTF8 characters." }, "bin": [ "php-cs-fixer" @@ -809,61 +968,63 @@ "autoload": { "psr-4": { "PhpCsFixer\\": "src/" - }, - "classmap": [ - "tests/Test/AbstractFixerTestCase.php", - "tests/Test/AbstractIntegrationCaseFactory.php", - "tests/Test/AbstractIntegrationTestCase.php", - "tests/Test/IntegrationCase.php", - "tests/Test/IntegrationCaseFactory.php", - "tests/Test/IntegrationCaseFactoryInterface.php", - "tests/Test/InternalIntegrationCaseFactory.php", - "tests/TestCase.php" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ - { - "name": "Dariusz Rumiński", - "email": "dariusz.ruminski@gmail.com" - }, { "name": "Fabien Potencier", "email": "fabien@symfony.com" + }, + { + "name": "Dariusz Rumiński", + "email": "dariusz.ruminski@gmail.com" } ], "description": "A tool to automatically fix PHP code style", "support": { "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", - "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/2.2" + "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v3.9.5" }, - "time": "2018-06-02T17:26:04+00:00" + "funding": [ + { + "url": "https://github.com/keradus", + "type": "github" + } + ], + "time": "2022-07-22T08:43:51+00:00" }, { - "name": "ircmaxell/password-compat", - "version": "v1.0.4", + "name": "johnkary/phpunit-speedtrap", + "version": "v1.1.0", "source": { "type": "git", - "url": "https://github.com/ircmaxell/password_compat.git", - "reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c" + "url": "https://github.com/johnkary/phpunit-speedtrap.git", + "reference": "f7cfe17c5a7076ed0ccca5450fe3bb981ec56361" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ircmaxell/password_compat/zipball/5c5cde8822a69545767f7c7f3058cb15ff84614c", - "reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c", + "url": "https://api.github.com/repos/johnkary/phpunit-speedtrap/zipball/f7cfe17c5a7076ed0ccca5450fe3bb981ec56361", + "reference": "f7cfe17c5a7076ed0ccca5450fe3bb981ec56361", "shasum": "" }, - "require-dev": { - "phpunit/phpunit": "4.*" + "require": { + "php": ">=5.6", + "phpunit/phpunit": ">=4.7,<6.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, "autoload": { - "files": [ - "lib/password.php" - ] + "psr-0": { + "JohnKary": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -871,76 +1032,75 @@ ], "authors": [ { - "name": "Anthony Ferrara", - "email": "ircmaxell@php.net", - "homepage": "http://blog.ircmaxell.com" + "name": "John Kary", + "email": "john@johnkary.net" } ], - "description": "A compatibility library for the proposed simplified password hashing algorithm: https://wiki.php.net/rfc/password_hash", - "homepage": "https://github.com/ircmaxell/password_compat", + "description": "Find slow tests in your PHPUnit test suite", + "homepage": "https://github.com/johnkary/phpunit-speedtrap", "keywords": [ - "hashing", - "password" + "phpunit", + "profile", + "slow" ], "support": { - "issues": "https://github.com/ircmaxell/password_compat/issues", - "source": "https://github.com/ircmaxell/password_compat/tree/v1.0" + "issues": "https://github.com/johnkary/phpunit-speedtrap/issues", + "source": "https://github.com/johnkary/phpunit-speedtrap/tree/1.1" }, - "time": "2014-11-20T16:49:30+00:00" + "time": "2017-03-25T17:14:26+00:00" }, { - "name": "johnkary/phpunit-speedtrap", - "version": "v1.0.1", + "name": "php-cs-fixer/diff", + "version": "v2.0.2", "source": { "type": "git", - "url": "https://github.com/johnkary/phpunit-speedtrap.git", - "reference": "76a26f8a903a9434608cdad2b41c40cd134ea326" + "url": "https://github.com/PHP-CS-Fixer/diff.git", + "reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/johnkary/phpunit-speedtrap/zipball/76a26f8a903a9434608cdad2b41c40cd134ea326", - "reference": "76a26f8a903a9434608cdad2b41c40cd134ea326", + "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/29dc0d507e838c4580d018bd8b5cb412474f7ec3", + "reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "^5.6 || ^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "3.7.*|~4.0" + "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0", + "symfony/process": "^3.3" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, "autoload": { - "psr-0": { - "JohnKary": "src/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "John Kary", - "email": "john@johnkary.net" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], - "description": "Find slow tests in your PHPUnit test suite", - "homepage": "https://github.com/johnkary/phpunit-speedtrap", + "description": "sebastian/diff v3 backport support for PHP 5.6+", + "homepage": "https://github.com/PHP-CS-Fixer", "keywords": [ - "phpunit", - "profile", - "slow" + "diff" ], "support": { - "issues": "https://github.com/johnkary/phpunit-speedtrap/issues", - "source": "https://github.com/johnkary/phpunit-speedtrap/tree/master" + "issues": "https://github.com/PHP-CS-Fixer/diff/issues", + "source": "https://github.com/PHP-CS-Fixer/diff/tree/v2.0.2" }, - "time": "2015-09-13T19:01:00+00:00" + "abandoned": true, + "time": "2020-10-14T08:32:19+00:00" }, { "name": "phpdocumentor/reflection-docblock", @@ -997,38 +1157,35 @@ }, { "name": "phpspec/prophecy", - "version": "v1.10.3", + "version": "v1.5.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "451c3cd1418cf640de218914901e51b064abb093" + "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", - "reference": "451c3cd1418cf640de218914901e51b064abb093", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4745ded9307786b730d7a60df5cb5a6c43cf95f7", + "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", - "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" + "phpdocumentor/reflection-docblock": "~2.0", + "sebastian/comparator": "~1.1" }, "require-dev": { - "phpspec/phpspec": "^2.5 || ^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + "phpspec/phpspec": "~2.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.10.x-dev" + "dev-master": "1.4.x-dev" } }, "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" + "psr-0": { + "Prophecy\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1058,9 +1215,9 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.10.3" + "source": "https://github.com/phpspec/prophecy/tree/master" }, - "time": "2020-03-05T15:02:03+00:00" + "time": "2015-08-13T10:07:40+00:00" }, { "name": "phpunit/php-code-coverage", @@ -1228,30 +1385,25 @@ }, { "name": "phpunit/php-timer", - "version": "1.0.9", + "version": "1.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260", + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpunit/phpunit": "~4|~5" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, "autoload": { "classmap": [ "src/" @@ -1274,10 +1426,11 @@ "timer" ], "support": { + "irc": "irc://irc.freenode.net/phpunit", "issues": "https://github.com/sebastianbergmann/php-timer/issues", "source": "https://github.com/sebastianbergmann/php-timer/tree/master" }, - "time": "2017-02-26T11:10:40+00:00" + "time": "2016-05-12T18:03:57+00:00" }, { "name": "phpunit/php-token-stream", @@ -1472,31 +1625,31 @@ "time": "2015-10-02T06:51:40+00:00" }, { - "name": "psr/log", - "version": "1.1.4", + "name": "psr/cache", + "version": "3.0.0", "source": { "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "url": "https://github.com/php-fig/cache.git", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Cache\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1509,54 +1662,206 @@ "homepage": "https://www.php-fig.org/" } ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", + "description": "Common interface for caching libraries", "keywords": [ - "log", + "cache", "psr", - "psr-3" + "psr-6" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" + "source": "https://github.com/php-fig/cache/tree/3.0.0" }, - "time": "2021-05-03T11:20:27+00:00" + "time": "2021-02-03T23:26:27+00:00" }, { - "name": "sebastian/comparator", - "version": "1.2.4", + "name": "psr/container", + "version": "2.0.2", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2 || ~2.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" + "php": ">=7.4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Psr\\Container\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "psr/log", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/3.0.0" + }, + "time": "2021-07-14T16:46:02+00:00" + }, + { + "name": "sebastian/comparator", + "version": "1.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2 || ~2.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" ], "authors": [ { @@ -1591,23 +1896,23 @@ }, { "name": "sebastian/diff", - "version": "1.4.3", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpunit/phpunit": "~4.8" }, "type": "library", "extra": { @@ -1641,29 +1946,29 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/1.4" + "source": "https://github.com/sebastianbergmann/diff/tree/master" }, - "time": "2017-05-22T07:24:03+00:00" + "time": "2015-12-08T07:14:41+00:00" }, { "name": "sebastian/environment", - "version": "1.3.8", + "version": "1.3.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" + "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/4e8f0da10ac5802913afc151413bc8c53b6c2716", + "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "^4.8 || ^5.0" + "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { @@ -1695,9 +2000,9 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/1.3" + "source": "https://github.com/sebastianbergmann/environment/tree/1.3.7" }, - "time": "2016-08-18T05:49:44+00:00" + "time": "2016-05-17T03:18:57+00:00" }, { "name": "sebastian/exporter", @@ -1923,39 +2228,45 @@ }, { "name": "symfony/console", - "version": "v2.8.52", + "version": "v6.3.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "cbcf4b5e233af15cd2bbd50dee1ccc9b7927dc12" + "reference": "0d14a9f6d04d4ac38a8cea1171f4554e325dae92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/cbcf4b5e233af15cd2bbd50dee1ccc9b7927dc12", - "reference": "cbcf4b5e233af15cd2bbd50dee1ccc9b7927dc12", + "url": "https://api.github.com/repos/symfony/console/zipball/0d14a9f6d04d4ac38a8cea1171f4554e325dae92", + "reference": "0d14a9f6d04d4ac38a8cea1171f4554e325dae92", "shasum": "" }, "require": { - "php": ">=5.3.9", - "symfony/debug": "^2.7.2|~3.0.0", - "symfony/polyfill-mbstring": "~1.0" + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^5.4|^6.0" }, - "require-dev": { - "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.1|~3.0.0", - "symfony/process": "~2.1|~3.0.0" + "conflict": { + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" }, - "suggest": { - "psr/log-implementation": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/process": "" + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/lock": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" }, + "type": "library", "autoload": { "psr-4": { "Symfony\\Component\\Console\\": "" @@ -1978,50 +2289,63 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Console Component", + "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command-line", + "console", + "terminal" + ], "support": { - "source": "https://github.com/symfony/console/tree/v2.8.52" + "source": "https://github.com/symfony/console/tree/v6.3.8" }, - "time": "2018-11-20T15:55:20+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-10-31T08:09:35+00:00" }, { - "name": "symfony/debug", - "version": "v2.8.52", + "name": "symfony/deprecation-contracts", + "version": "v3.4.0", "source": { "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "74251c8d50dd3be7c4ce0c7b862497cdc641a5d0" + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/74251c8d50dd3be7c4ce0c7b862497cdc641a5d0", - "reference": "74251c8d50dd3be7c4ce0c7b862497cdc641a5d0", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", "shasum": "" }, "require": { - "php": ">=5.3.9", - "psr/log": "~1.0" - }, - "conflict": { - "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" - }, - "require-dev": { - "symfony/class-loader": "~2.2|~3.0.0", - "symfony/http-kernel": "~2.3.24|~2.5.9|^2.6.2|~3.0.0" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { - "psr-4": { - "Symfony\\Component\\Debug\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "files": [ + "function.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2030,55 +2354,72 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Debug Component", + "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/debug/tree/v2.8.50" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0" }, - "time": "2018-11-11T11:18:13+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-23T14:45:45+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v2.8.52", + "version": "v6.3.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "a77e974a5fecb4398833b0709210e3d5e334ffb0" + "reference": "adb01fe097a4ee930db9258a3cc906b5beb5cf2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a77e974a5fecb4398833b0709210e3d5e334ffb0", - "reference": "a77e974a5fecb4398833b0709210e3d5e334ffb0", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/adb01fe097a4ee930db9258a3cc906b5beb5cf2e", + "reference": "adb01fe097a4ee930db9258a3cc906b5beb5cf2e", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=8.1", + "symfony/event-dispatcher-contracts": "^2.5|^3" }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "^2.0.5|~3.0.0", - "symfony/dependency-injection": "~2.6|~3.0.0", - "symfony/expression-language": "~2.6|~3.0.0", - "symfony/stopwatch": "~2.3|~3.0.0" + "conflict": { + "symfony/dependency-injection": "<5.4", + "symfony/service-contracts": "<2.5" }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0|3.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/error-handler": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/stopwatch": "^5.4|^6.0" }, + "type": "library", "autoload": { "psr-4": { "Symfony\\Component\\EventDispatcher\\": "" @@ -2101,37 +2442,123 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony EventDispatcher Component", + "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v2.8.50" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.3.2" }, - "time": "2018-11-21T14:20:20+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-07-06T06:56:43+00:00" }, { - "name": "symfony/filesystem", - "version": "v2.8.52", + "name": "symfony/event-dispatcher-contracts", + "version": "v3.4.0", "source": { "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "7ae46872dad09dffb7fe1e93a0937097339d0080" + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "a76aed96a42d2b521153fb382d418e30d18b59df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/7ae46872dad09dffb7fe1e93a0937097339d0080", - "reference": "7ae46872dad09dffb7fe1e93a0937097339d0080", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/a76aed96a42d2b521153fb382d418e30d18b59df", + "reference": "a76aed96a42d2b521153fb382d418e30d18b59df", "shasum": "" }, "require": { - "php": ">=5.3.9", - "symfony/polyfill-ctype": "~1.8" + "php": ">=8.1", + "psr/event-dispatcher": "^1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-23T14:45:45+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v6.3.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", + "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8" + }, + "type": "library", "autoload": { "psr-4": { "Symfony\\Component\\Filesystem\\": "" @@ -2146,44 +2573,56 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v6.3.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "description": "Symfony Filesystem Component", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/filesystem/tree/v2.8.52" - }, - "time": "2018-11-11T11:18:13+00:00" + "time": "2023-06-01T08:30:39+00:00" }, { "name": "symfony/finder", - "version": "v2.8.52", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "1444eac52273e345d9b95129bf914639305a9ba4" + "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/1444eac52273e345d9b95129bf914639305a9ba4", - "reference": "1444eac52273e345d9b95129bf914639305a9ba4", + "url": "https://api.github.com/repos/symfony/finder/zipball/a1b31d88c0e998168ca7792f222cbecee47428c4", + "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=8.1" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } + "require-dev": { + "symfony/filesystem": "^6.0" }, + "type": "library", "autoload": { "psr-4": { "Symfony\\Component\\Finder\\": "" @@ -2206,36 +2645,46 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Finder Component", + "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v2.8.50" + "source": "https://github.com/symfony/finder/tree/v6.3.5" }, - "time": "2018-11-11T11:18:13+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-09-26T12:56:25+00:00" }, { "name": "symfony/options-resolver", - "version": "v2.8.52", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "7aaab725bb58f0e18aa12c61bdadd4793ab4c32b" + "reference": "a10f19f5198d589d5c33333cffe98dc9820332dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/7aaab725bb58f0e18aa12c61bdadd4793ab4c32b", - "reference": "7aaab725bb58f0e18aa12c61bdadd4793ab4c32b", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/a10f19f5198d589d5c33333cffe98dc9820332dd", + "reference": "a10f19f5198d589d5c33333cffe98dc9820332dd", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\OptionsResolver\\": "" @@ -2258,7 +2707,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony OptionsResolver Component", + "description": "Provides an improved replacement for the array_replace PHP function", "homepage": "https://symfony.com", "keywords": [ "config", @@ -2266,26 +2715,43 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v2.8.50" + "source": "https://github.com/symfony/options-resolver/tree/v6.3.0" }, - "time": "2018-11-11T11:18:13+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-12T14:21:09+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.19.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "aed596913b70fae57be53d86faa2e9ef85a2297b" + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/aed596913b70fae57be53d86faa2e9ef85a2297b", - "reference": "aed596913b70fae57be53d86faa2e9ef85a2297b", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" }, "suggest": { "ext-ctype": "For best performance" @@ -2293,7 +2759,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.19-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2331,7 +2797,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.19.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" }, "funding": [ { @@ -2347,32 +2813,32 @@ "type": "tidelift" } ], - "time": "2020-10-23T09:01:57+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { - "name": "symfony/polyfill-mbstring", - "version": "v1.19.0", + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.28.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "b5f7b932ee6fa802fc792eabd77c4c88084517ce" + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "875e90aeea2777b6f135677f618529449334a612" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/b5f7b932ee6fa802fc792eabd77c4c88084517ce", - "reference": "b5f7b932ee6fa802fc792eabd77c4c88084517ce", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", + "reference": "875e90aeea2777b6f135677f618529449334a612", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { - "ext-mbstring": "For best performance" + "ext-intl": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.19-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2384,7 +2850,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -2401,17 +2867,18 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for the Mbstring extension", + "description": "Symfony polyfill for intl's grapheme_* functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", - "mbstring", + "grapheme", + "intl", "polyfill", "portable", "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.19.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0" }, "funding": [ { @@ -2427,29 +2894,32 @@ "type": "tidelift" } ], - "time": "2020-10-23T09:01:57+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { - "name": "symfony/polyfill-php54", - "version": "v1.19.0", + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.28.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php54.git", - "reference": "c248bab30dad46a5f3917e7d92907e148bdc50c6" + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php54/zipball/c248bab30dad46a5f3917e7d92907e148bdc50c6", - "reference": "c248bab30dad46a5f3917e7d92907e148bdc50c6", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.19-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2461,7 +2931,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php54\\": "" + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" }, "classmap": [ "Resources/stubs" @@ -2481,16 +2951,18 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 5.4+ features to lower PHP versions", + "description": "Symfony polyfill for intl's Normalizer class and related functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", + "intl", + "normalizer", "polyfill", "portable", "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php54/tree/v1.19.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" }, "funding": [ { @@ -2506,30 +2978,35 @@ "type": "tidelift" } ], - "time": "2020-10-23T09:01:57+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { - "name": "symfony/polyfill-php55", - "version": "v1.19.0", + "name": "symfony/polyfill-mbstring", + "version": "v1.28.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php55.git", - "reference": "248a5c9877b126493abb661e4fb47792e418035b" + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "42292d99c55abe617799667f454222c54c60e229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php55/zipball/248a5c9877b126493abb661e4fb47792e418035b", - "reference": "248a5c9877b126493abb661e4fb47792e418035b", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", + "reference": "42292d99c55abe617799667f454222c54c60e229", "shasum": "" }, "require": { - "ircmaxell/password-compat": "~1.0", - "php": ">=5.3.3" + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.19-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2541,7 +3018,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php55\\": "" + "Symfony\\Polyfill\\Mbstring\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -2558,16 +3035,17 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 5.5+ features to lower PHP versions", + "description": "Symfony polyfill for the Mbstring extension", "homepage": "https://symfony.com", "keywords": [ "compatibility", + "mbstring", "polyfill", "portable", "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php55/tree/v1.19.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" }, "funding": [ { @@ -2583,30 +3061,29 @@ "type": "tidelift" } ], - "time": "2020-10-23T09:01:57+00:00" + "time": "2023-07-28T09:04:16+00:00" }, { - "name": "symfony/polyfill-php70", - "version": "v1.19.0", + "name": "symfony/polyfill-php80", + "version": "v1.28.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "3fe414077251a81a1b15b1c709faf5c2fbae3d4e" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/3fe414077251a81a1b15b1c709faf5c2fbae3d4e", - "reference": "3fe414077251a81a1b15b1c709faf5c2fbae3d4e", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", "shasum": "" }, "require": { - "paragonie/random_compat": "~1.0|~2.0|~9.99", - "php": ">=5.3.3" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.19-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2618,7 +3095,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php70\\": "" + "Symfony\\Polyfill\\Php80\\": "" }, "classmap": [ "Resources/stubs" @@ -2629,6 +3106,10 @@ "MIT" ], "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, { "name": "Nicolas Grekas", "email": "p@tchwork.com" @@ -2638,7 +3119,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", @@ -2647,7 +3128,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php70/tree/v1.19.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" }, "funding": [ { @@ -2663,29 +3144,29 @@ "type": "tidelift" } ], - "time": "2020-10-23T09:01:57+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { - "name": "symfony/polyfill-php72", - "version": "v1.19.0", + "name": "symfony/polyfill-php81", + "version": "v1.28.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "beecef6b463b06954638f02378f52496cb84bacc" + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/beecef6b463b06954638f02378f52496cb84bacc", - "reference": "beecef6b463b06954638f02378f52496cb84bacc", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.19-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2697,8 +3178,11 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - } + "Symfony\\Polyfill\\Php81\\": "" + }, + "classmap": [ + "Resources/stubs" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2714,7 +3198,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", @@ -2723,7 +3207,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.19.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0" }, "funding": [ { @@ -2739,31 +3223,26 @@ "type": "tidelift" } ], - "time": "2020-10-23T09:01:57+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/process", - "version": "v2.8.52", + "version": "v6.3.4", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "c3591a09c78639822b0b290d44edb69bf9f05dc8" + "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/c3591a09c78639822b0b290d44edb69bf9f05dc8", - "reference": "c3591a09c78639822b0b290d44edb69bf9f05dc8", + "url": "https://api.github.com/repos/symfony/process/zipball/0b5c29118f2e980d455d2e34a5659f4579847c54", + "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=8.1" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Process\\": "" @@ -2786,36 +3265,128 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Process Component", + "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v2.8.50" + "source": "https://github.com/symfony/process/tree/v6.3.4" }, - "time": "2018-11-11T11:18:13+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-08-07T10:39:22+00:00" }, { - "name": "symfony/stopwatch", - "version": "v2.8.52", + "name": "symfony/service-contracts", + "version": "v3.4.0", "source": { "type": "git", - "url": "https://github.com/symfony/stopwatch.git", - "reference": "752586c80af8a85aeb74d1ae8202411c68836663" + "url": "https://github.com/symfony/service-contracts.git", + "reference": "b3313c2dbffaf71c8de2934e2ea56ed2291a3838" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/752586c80af8a85aeb74d1ae8202411c68836663", - "reference": "752586c80af8a85aeb74d1ae8202411c68836663", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/b3313c2dbffaf71c8de2934e2ea56ed2291a3838", + "reference": "b3313c2dbffaf71c8de2934e2ea56ed2291a3838", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=8.1", + "psr/container": "^2.0" + }, + "conflict": { + "ext-psr": "<1.1|>=2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v3.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } + ], + "time": "2023-07-30T20:28:31+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", + "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/service-contracts": "^2.5|^3" }, + "type": "library", "autoload": { "psr-4": { "Symfony\\Component\\Stopwatch\\": "" @@ -2838,37 +3409,141 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Stopwatch Component", + "description": "Provides a way to profile code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/stopwatch/tree/v6.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-16T10:14:28+00:00" + }, + { + "name": "symfony/string", + "version": "v6.3.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "13880a87790c76ef994c91e87efb96134522577a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/13880a87790c76ef994c91e87efb96134522577a", + "reference": "13880a87790c76ef994c91e87efb96134522577a", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.5" + }, + "require-dev": { + "symfony/error-handler": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/intl": "^6.2", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], "support": { - "source": "https://github.com/symfony/stopwatch/tree/v2.8.52" + "source": "https://github.com/symfony/string/tree/v6.3.8" }, - "time": "2018-11-11T11:18:13+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-11-09T08:28:21+00:00" }, { "name": "symfony/yaml", - "version": "v2.8.52", + "version": "v3.4.47", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "02c1859112aa779d9ab394ae4f3381911d84052b" + "reference": "88289caa3c166321883f67fe5130188ebbb47094" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/02c1859112aa779d9ab394ae4f3381911d84052b", - "reference": "02c1859112aa779d9ab394ae4f3381911d84052b", + "url": "https://api.github.com/repos/symfony/yaml/zipball/88289caa3c166321883f67fe5130188ebbb47094", + "reference": "88289caa3c166321883f67fe5130188ebbb47094", "shasum": "" }, "require": { - "php": ">=5.3.9", + "php": "^5.5.9|>=7.0.8", "symfony/polyfill-ctype": "~1.8" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } + "conflict": { + "symfony/console": "<3.4" + }, + "require-dev": { + "symfony/console": "~3.4|~4.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" }, + "type": "library", "autoload": { "psr-4": { "Symfony\\Component\\Yaml\\": "" @@ -2894,9 +3569,23 @@ "description": "Symfony Yaml Component", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v2.8.52" + "source": "https://github.com/symfony/yaml/tree/v3.4.47" }, - "time": "2018-11-11T11:18:13+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-10-24T10:57:07+00:00" } ], "aliases": [], @@ -2913,8 +3602,5 @@ "lib-pcre": "*" }, "platform-dev": [], - "platform-overrides": { - "php": "5.4" - }, - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.6.0" } diff --git a/docs/guide-es/README.md b/docs/guide-es/README.md index 80d5266fe87..c432298bb50 100644 --- a/docs/guide-es/README.md +++ b/docs/guide-es/README.md @@ -117,7 +117,7 @@ Seguridad * **TBD** [Autenticación](security-authentication.md) * **TBD** [Autorización](security-authorization.md) * **TBD** [Trabajar con contraseñas](security-passwords.md) -* **TBD** [Autenticar Clientes](security-auth-clients.md) +* [Autenticar Clientes](https://www.yiiframework.com/extension/yiisoft/yii2-authclient/doc/guide) * **TBD** [Buenas prácticas](security-best-practices.md) diff --git a/docs/guide-es/helper-array.md b/docs/guide-es/helper-array.md index 9e0e869f508..7ba27ac7124 100644 --- a/docs/guide-es/helper-array.md +++ b/docs/guide-es/helper-array.md @@ -373,7 +373,7 @@ A pesar de que PHP ofrece `in_array()`, este no soporta sub-grupos u objetos de Para ayudar en este tipo de pruebas, [[yii\helpers\ArrayHelper]] provee [[yii\helpers\ArrayHelper::isIn()|isIn()]] y [[yii\helpers\ArrayHelper::isSubset()|isSubset()]] con la misma firma del método -[in_array()](https://www.php.net/manual/en/function.in-array.php). +[in_array()](https://www.php.net/manual/es/function.in-array.php). ```php // true diff --git a/docs/guide-es/input-file-upload.md b/docs/guide-es/input-file-upload.md index ccfe76ab408..ac009a71280 100644 --- a/docs/guide-es/input-file-upload.md +++ b/docs/guide-es/input-file-upload.md @@ -123,7 +123,7 @@ También puedes subir varios archivos a la vez, con algunos ajustes en el códig Primero debes ajustar la clase del modelo, agregando la opción `maxFiles` en la regla de validación `file` para limitar el número máximo de archivos a subir. Definir `maxFiles` como `0` significa que no hay límite en el número de archivos a subir simultáneamente. El número máximo de archivos permitidos para subir simultáneamente está también limitado -por la directiva PHP [`max_file_uploads`](https://www.php.net/manual/en/ini.core.php#ini.max-file-uploads), +por la directiva PHP [`max_file_uploads`](https://www.php.net/manual/es/ini.core.php#ini.max-file-uploads), cuyo valor por defecto es 20. El método `upload()` debería también ser modificado para guardar los archivos uno a uno. ```php diff --git a/docs/guide-es/rest-quick-start.md b/docs/guide-es/rest-quick-start.md index 06ae63d2a32..89d940c1867 100644 --- a/docs/guide-es/rest-quick-start.md +++ b/docs/guide-es/rest-quick-start.md @@ -9,7 +9,7 @@ En particular, Yii soporta las siguientes características sobre APIs RESTful; * Formato de respuesta de negocio (soporta JSON y XML por defecto); * Personalización de objetos serializados con soporte para campos de salida seleccionables; * Formateo apropiado de colecciones de datos y validación de errores; -* Soporte para [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS); +* Soporte para [HATEOAS](https://es.wikipedia.org/wiki/HATEOAS); * Eficiente enrutamiento con una adecuada comprobación del verbo(verb) HTTP; * Incorporado soporte para las `OPTIONS` y `HEAD` verbos; * Autenticación y autorización; diff --git a/docs/guide-es/rest-resources.md b/docs/guide-es/rest-resources.md index 18b4066910e..81af3525da6 100644 --- a/docs/guide-es/rest-resources.md +++ b/docs/guide-es/rest-resources.md @@ -116,7 +116,7 @@ la petición `http://localhost/users?fields=id,email&expand=profile` puede devol ## Enlaces (Links) -[HATEOAS](https://en.wikipedia.org/wiki/HATEOAS), es una abreviación de Hipermedia es el Motor del Estado de la Aplicación (Hypermedia as the Engine of Application State), promueve que las APIs RESTfull devuelvan información que permita a los clientes descubrir las acciones que soportan los recursos devueltos. El sentido de HATEOAS es devolver un conjunto de hiperenlaces con relación a la información, cuando los datos de los recursos son servidos por las APIs. +[HATEOAS](https://es.wikipedia.org/wiki/HATEOAS), es una abreviación de Hipermedia es el Motor del Estado de la Aplicación (Hypermedia as the Engine of Application State), promueve que las APIs RESTfull devuelvan información que permita a los clientes descubrir las acciones que soportan los recursos devueltos. El sentido de HATEOAS es devolver un conjunto de hiperenlaces con relación a la información, cuando los datos de los recursos son servidos por las APIs. Las clases con recursos pueden soportar HATEOAS implementando el interfaz [[yii\web\Linkable]] . El interfaz contiene sólo un método [[yii\web\Linkable::getLinks()|getLinks()]] el cual debe de de devolver una lista de [[yii\web\Link|links]]. Típicamente, debes devolver al menos un enlace `self` representando la URL al mismo recurso objeto. Por ejemplo, diff --git a/docs/guide-es/rest-response-formatting.md b/docs/guide-es/rest-response-formatting.md index c1727d923fb..3ec0049f9f5 100644 --- a/docs/guide-es/rest-response-formatting.md +++ b/docs/guide-es/rest-response-formatting.md @@ -5,7 +5,7 @@ Cuando se maneja una petición al API RESTful, una aplicación realiza usualment con el formato de la respuesta: 1. Determinar varios factores que pueden afectar al formato de la respuesta, como son el tipo de medio, lenguaje, versión, etc. - Este proceso es también conocido como [negociación de contenido (content negotiation)](https://en.wikipedia.org/wiki/Content_negotiation). + Este proceso es también conocido como [negociación de contenido (content negotiation)](https://es.wikipedia.org/wiki/Negociaci%C3%B3n_de_contenido). 2. La conversión de objetos recurso en arrays, como está descrito en la sección [Recursos (Resources)](rest-resources.md). Esto es realizado por la clase [[yii\rest\Serializer]]. 3. La conversión de arrays en cadenas con el formato determinado por el paso de negociación de contenido. Esto es diff --git a/docs/guide-es/tutorial-core-validators.md b/docs/guide-es/tutorial-core-validators.md index 86030ff8f78..8ff684ef147 100644 --- a/docs/guide-es/tutorial-core-validators.md +++ b/docs/guide-es/tutorial-core-validators.md @@ -96,7 +96,7 @@ Opcionalmente, puede convertir el valor de entrada en una fecha/tiempo UNIX y al - `format`: el formato fecha/tiempo en el que debe estar el valor a ser validado. Esto tiene que ser un patrón fecha/tiempo descrito en [manual ICU](https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax). - Alternativamente tiene que ser una cadena con el prefijo `php:` representando un formato que ha de ser reconocido por la clase `Datetime` de PHP. Por favor, refiérase a sobre los formatos soportados. + Alternativamente tiene que ser una cadena con el prefijo `php:` representando un formato que ha de ser reconocido por la clase `Datetime` de PHP. Por favor, refiérase a sobre los formatos soportados. Si no tiene ningún valor, ha de coger el valor de `Yii::$app->formatter->dateFormat`. - `timestampAttribute`: el nombre del atributo al cual este validador puede asignar el fecha/hora UNIX convertida desde la entrada fecha/hora. diff --git a/docs/guide-fr/caching-data.md b/docs/guide-fr/caching-data.md index 09a5c3d50c9..01979d539b3 100644 --- a/docs/guide-fr/caching-data.md +++ b/docs/guide-fr/caching-data.md @@ -91,15 +91,15 @@ Comme tous les composants de mise en cache prennent en charge le même jeux d'AP Yii prend en charge un large panel de supports de stockage pour cache. Ce qui suit est un résumé : -* [[yii\caching\ApcCache]]: utilise l'extension PHP [APC](https://www.php.net/manual/en/book.apcu.php). Cette option peut être considérée comme la plus rapide lorsqu'on utilise un cache pour une grosse application centralisée (p. ex. un serveur, pas d'équilibrage de charge dédié, etc.). +* [[yii\caching\ApcCache]]: utilise l'extension PHP [APC](https://www.php.net/manual/fr/book.apcu.php). Cette option peut être considérée comme la plus rapide lorsqu'on utilise un cache pour une grosse application centralisée (p. ex. un serveur, pas d'équilibrage de charge dédié, etc.). * [[yii\caching\DbCache]]: utilise une table de base de données pour stocker les données en cache. Pour utiliser ce cache, vous devez créer une table comme spécifié dans [[yii\caching\DbCache::cacheTable]]. * [[yii\caching\DummyCache]]: tient lieu de cache à remplacer qui n'assure pas de mise en cache réelle. Le but de ce composant est de simplifier le code qui a besoin de vérifier la disponibilité du cache. Par exemple, lors du développement ou si le serveur ne dispose pas de la prise en charge d'un cache, vous pouvez configurer un composant de mise en cache pour qu'il utilise ce cache. Lorsque la prise en charge réelle de la mise en cache est activée, vous pouvez basculer sur le composant de mise en cache correspondant. Dans les deux cas, vous pouvez utiliser le même code `Yii::$app->cache->get($key)` pour essayer de retrouver les données du cache sans vous préoccuper du fait que `Yii::$app->cache` puisse être `null`. * [[yii\caching\FileCache]]: utilise des fichiers standards pour stocker les données en cache. Cela est particulièrement adapté à la mise en cache de gros blocs de données, comme le contenu d'une page. -* [[yii\caching\MemCache]]: utilise le [memcache](https://www.php.net/manual/en/book.memcache.php) PHP et l'extension [memcached](https://www.php.net/manual/en/book.memcached.php). Cette option peut être considérée comme la plus rapide lorsqu'on utilise un cache dans des applications distribuées (p. ex. avec plusieurs serveurs, l'équilibrage de charge, etc.). +* [[yii\caching\MemCache]]: utilise le [memcache](https://www.php.net/manual/fr/book.memcache.php) PHP et l'extension [memcached](https://www.php.net/manual/fr/book.memcached.php). Cette option peut être considérée comme la plus rapide lorsqu'on utilise un cache dans des applications distribuées (p. ex. avec plusieurs serveurs, l'équilibrage de charge, etc.). * [[yii\redis\Cache]]: met en œuvre un composant de mise en cache basé sur un stockage clé-valeur [Redis](https://redis.io/) (une version de redis égale ou supérieure à 2.6.12 est nécessaire). * [[yii\caching\WinCache]]: utilise le [WinCache](https://iis.net/downloads/microsoft/wincache-extension) PHP - ([voir aussi l'extension](https://www.php.net/manual/en/book.wincache.php)). + ([voir aussi l'extension](https://www.php.net/manual/fr/book.wincache.php)). * [[yii\caching\XCache]] _(deprecated)_: utilise l'extension PHP [XCache](https://en.wikipedia.org/wiki/List_of_PHP_accelerators#XCache). * [[yii\caching\ZendDataCache]] _(deprecated)_: utilise le [cache de données Zend](https://files.zend.com/help/Zend-Server-6/zend-server.htm#data_cache_component.htm) diff --git a/docs/guide-fr/caching-http.md b/docs/guide-fr/caching-http.md index 6fa116742f5..0d154c8883c 100644 --- a/docs/guide-fr/caching-http.md +++ b/docs/guide-fr/caching-http.md @@ -100,7 +100,7 @@ Cache-Control: public, max-age=3600 ## Propriété "Session Cache Limiter" -Lorsqu'une page utilise une session, PHP envoie automatiquement quelques entêtes HTTP relatifs à la mise en cache comme spécifié dans la propriété `session.cache_limiter` de PHP INI. Ces entêtes peuvent interférer ou désactiver la mise en cache que vous voulez obtenir de `HttpCache`. Pour éviter ce problème, par défaut, `HttpCache` désactive l'envoi de ces entêtes automatiquement. Si vous désirez modifier ce comportement, vous devez configurer la propriété [[yii\filters\HttpCache::sessionCacheLimiter]]. Cette propriété accepte une chaîne de caractères parmi `public`, `private`, `private_no_expire` et `nocache`. Reportez-vous au manuel de PHP à propos de [session_cache_limiter()](https://www.php.net/manual/en/function.session-cache-limiter.php) pour des explications sur ces valeurs. +Lorsqu'une page utilise une session, PHP envoie automatiquement quelques entêtes HTTP relatifs à la mise en cache comme spécifié dans la propriété `session.cache_limiter` de PHP INI. Ces entêtes peuvent interférer ou désactiver la mise en cache que vous voulez obtenir de `HttpCache`. Pour éviter ce problème, par défaut, `HttpCache` désactive l'envoi de ces entêtes automatiquement. Si vous désirez modifier ce comportement, vous devez configurer la propriété [[yii\filters\HttpCache::sessionCacheLimiter]]. Cette propriété accepte une chaîne de caractères parmi `public`, `private`, `private_no_expire` et `nocache`. Reportez-vous au manuel de PHP à propos de [session_cache_limiter()](https://www.php.net/manual/fr/function.session-cache-limiter.php) pour des explications sur ces valeurs. ## Implications SEO diff --git a/docs/guide-fr/helper-array.md b/docs/guide-fr/helper-array.md index a4029deee11..ca540fb0f2b 100644 --- a/docs/guide-fr/helper-array.md +++ b/docs/guide-fr/helper-array.md @@ -1,7 +1,7 @@ Classe assistante ArrayHelper ============================= -En plus du jeu riche de [fonctions de tableaux](https://www.php.net/manual/en/book.array.php) qu'offre PHP, la classe assistante traitant les tableaux dans Yii fournit des méthodes statiques supplémentaires qui vous permettent de traiter les tableaux avec plus d'efficacité. +En plus du jeu riche de [fonctions de tableaux](https://www.php.net/manual/fr/book.array.php) qu'offre PHP, la classe assistante traitant les tableaux dans Yii fournit des méthodes statiques supplémentaires qui vous permettent de traiter les tableaux avec plus d'efficacité. ## Obtention de valeurs @@ -61,7 +61,7 @@ Après exécution du code, `$array` contiendra `['options' => [1, 2]]` et `$type ## Tester l'existence des clés -`ArrayHelper::keyExists` fonctionne comme [array_key_exists](https://www.php.net/manual/en/function.array-key-exists.php) sauf qu'elle prend également en charge la comparaison de clés insensible à la casse. Par exemple, +`ArrayHelper::keyExists` fonctionne comme [array_key_exists](https://www.php.net/manual/fr/function.array-key-exists.php) sauf qu'elle prend également en charge la comparaison de clés insensible à la casse. Par exemple, ```php $data1 = [ @@ -252,7 +252,7 @@ ArrayHelper::multisort($data, function($item) { Le troisième argument précise la direction. Dans le cas d'un tri selon une clé unique, il s'agit soit de `SORT_ASC`, soit de `SORT_DESC`. Si le tri se fait selon des valeurs multiples, vous pouvez préciser des directions de tri différentes pour chacune des clés en présentant ces directions sous forme de tableau. -Le dernier argument est une option de tri de PHP qui peut prendre les mêmes valeurs que celles acceptées par la fonction [sort()](https://www.php.net/manual/en/function.sort.php) de PHP. +Le dernier argument est une option de tri de PHP qui peut prendre les mêmes valeurs que celles acceptées par la fonction [sort()](https://www.php.net/manual/fr/function.sort.php) de PHP. ## Détection des types de tableau @@ -284,7 +284,7 @@ Seules les valeurs sont encodées par défaut. En passant un deuxième argument ## Fusion de tableaux -La fonction [[yii\helpers\ArrayHelper::merge()|ArrayHelper::merge()]] vous permet de fusionner deux, ou plus, tableaux en un seul de manière récursive. Si chacun des tableaux possède un élément avec la même chaîne clé valeur, le dernier écrase le premier (ce qui est un fonctionnement différent de [array_merge_recursive()](https://www.php.net/manual/en/function.array-merge-recursive.php)). +La fonction [[yii\helpers\ArrayHelper::merge()|ArrayHelper::merge()]] vous permet de fusionner deux, ou plus, tableaux en un seul de manière récursive. Si chacun des tableaux possède un élément avec la même chaîne clé valeur, le dernier écrase le premier (ce qui est un fonctionnement différent de [array_merge_recursive()](https://www.php.net/manual/fr/function.array-merge-recursive.php)). La fusion récursive est entreprise si les deux tableaux possèdent un élément de type tableau avec la même clé. Pour des éléments dont la clé est un entier, les éléments du deuxième tableau sont ajoutés aux éléments du premier tableau. Vous pouvez utiliser l'objet [[yii\helpers\UnsetArrayValue]] pour supprimer la valeur du premier tableau ou [[yii\helpers\ReplaceArrayValue]] pour forcer le remplacement de la première valeur au lieu de la fusion récursive. Par exemple : @@ -391,7 +391,7 @@ Il est possible de fournir une manière par défaut de convertir un objet en tab Souvent, vous devez savoir si un élément se trouve dans un tableau ou si un jeu d'éléments est un sous-ensemble d'un autre. Bien que PHP offre la fonction `in_array()`, cette dernière ne prend pas en charge les sous-ensembles ou les objets `\Traversable`. Pour faciliter ce genre de tests, [[yii\helpers\ArrayHelper]] fournit les méthodes [[yii\helpers\ArrayHelper::isIn()|isIn()]] -et [[yii\helpers\ArrayHelper::isSubset()|isSubset()]] avec la même signature que [in_array()](https://www.php.net/manual/en/function.in-array.php). +et [[yii\helpers\ArrayHelper::isSubset()|isSubset()]] avec la même signature que [in_array()](https://www.php.net/manual/fr/function.in-array.php). ```php // true diff --git a/docs/guide-fr/helper-html.md b/docs/guide-fr/helper-html.md index 77e36699629..77413141a9d 100644 --- a/docs/guide-fr/helper-html.md +++ b/docs/guide-fr/helper-html.md @@ -1,7 +1,7 @@ Classe assistante Html ====================== -Toutes les applications Web génèrent un grand nombre de balises HTML. Si le code HTML est statique, il peut être créé efficacement sous forme de [mélange de code PHP et de code HTML dans un seul fichier](https://www.php.net/manual/en/language.basic-syntax.phpmode.php), mais lorsqu'il est généré dynamiquement, cela commence à être compliqué à gérer sans une aide supplémentaire. Yii fournit une telle aide sous la forme de la classe assistante Html, qui offre un jeu de méthodes statiques pour manipuler les balises Html les plus courantes, leurs options et leur contenu. +Toutes les applications Web génèrent un grand nombre de balises HTML. Si le code HTML est statique, il peut être créé efficacement sous forme de [mélange de code PHP et de code HTML dans un seul fichier](https://www.php.net/manual/fr/language.basic-syntax.phpmode.php), mais lorsqu'il est généré dynamiquement, cela commence à être compliqué à gérer sans une aide supplémentaire. Yii fournit une telle aide sous la forme de la classe assistante Html, qui offre un jeu de méthodes statiques pour manipuler les balises Html les plus courantes, leurs options et leur contenu. > Note: si votre code HTML est presque statique, il vaut mieux utiliser HTML directement. Il n'est pas nécessaire d'envelopper tout dans des appels aux méthodes de la classe assistante Html. @@ -134,8 +134,8 @@ accepte un tableau de propriétés à retirer. S'il s'agit d'une propriété uni ### Encodage et décodage du contenu -Pour que le contenu puisse être affiché en HTML de manière propre et en toute sécurité, les caractères spéciaux du contenu doivent être encodés. En PHP, cela s'obtient avec [htmlspecialchars](https://www.php.net/manual/en/function.htmlspecialchars.php) et -[htmlspecialchars_decode](https://www.php.net/manual/en/function.htmlspecialchars-decode.php). Le problème rencontré en utilisant ces méthodes directement est que vous devez spécifier l'encodage et des options supplémentaires tout le temps. Comme ces options restent toujours les mêmes et que l'encodage doit correspondre à celui de l'application pour éviter les problèmes de sécurité, Yii fournit deux méthodes compactes et faciles à utiliser : +Pour que le contenu puisse être affiché en HTML de manière propre et en toute sécurité, les caractères spéciaux du contenu doivent être encodés. En PHP, cela s'obtient avec [htmlspecialchars](https://www.php.net/manual/fr/function.htmlspecialchars.php) et +[htmlspecialchars_decode](https://www.php.net/manual/fr/function.htmlspecialchars-decode.php). Le problème rencontré en utilisant ces méthodes directement est que vous devez spécifier l'encodage et des options supplémentaires tout le temps. Comme ces options restent toujours les mêmes et que l'encodage doit correspondre à celui de l'application pour éviter les problèmes de sécurité, Yii fournit deux méthodes compactes et faciles à utiliser : ```php $userName = Html::encode($user->name); diff --git a/docs/guide-fr/input-file-upload.md b/docs/guide-fr/input-file-upload.md index 4b26bf727b7..2dab88b5d1a 100644 --- a/docs/guide-fr/input-file-upload.md +++ b/docs/guide-fr/input-file-upload.md @@ -107,7 +107,7 @@ Dans le code ci-dessus, lorsque le formulaire est soumis, la méthode [[yii\web\ Vous pouvez également charger sur le serveur plusieurs fichiers à la fois, avec quelques ajustements au code présenté dans les sous-sections précédentes. -Tout d'abord, vous devez ajuster la classe du modèle en ajoutant l'option `maxFiles` dans la règle de validation de `file` pour limiter le nombre maximum de fichiers à charger simultanément. Définir `maxFiles` à `0` signifie que ce nombre n'est pas limité. Le nombre maximal de fichiers que l'on peut charger simultanément est aussi limité par la directive PHP [`max_file_uploads`](https://www.php.net/manual/en/ini.core.php#ini.max-file-uploads), dont la valeur par défaut est 20. La méthode `upload()` doit aussi être modifiée pour permettre la sauvegarde des fichiers un à un. +Tout d'abord, vous devez ajuster la classe du modèle en ajoutant l'option `maxFiles` dans la règle de validation de `file` pour limiter le nombre maximum de fichiers à charger simultanément. Définir `maxFiles` à `0` signifie que ce nombre n'est pas limité. Le nombre maximal de fichiers que l'on peut charger simultanément est aussi limité par la directive PHP [`max_file_uploads`](https://www.php.net/manual/fr/ini.core.php#ini.max-file-uploads), dont la valeur par défaut est 20. La méthode `upload()` doit aussi être modifiée pour permettre la sauvegarde des fichiers un à un. ```php namespace app\models; diff --git a/docs/guide-fr/output-formatting.md b/docs/guide-fr/output-formatting.md index fc09ff156d8..2a3eb957ae4 100644 --- a/docs/guide-fr/output-formatting.md +++ b/docs/guide-fr/output-formatting.md @@ -35,7 +35,7 @@ echo Yii::$app->formatter->format('2014-01-01', 'date'); echo Yii::$app->formatter->format(0.125, ['percent', 2]); ``` -> Note: le composant de formatage est conçu pour formater des valeurs à présenter à l'utilisateur. Si vous voulez convertir des entrées utilisateur en un format lisible par la machine, ou simplement formater une date dans un format lisible par la machine, le formateur n'est pas l'outil adapté à cela. Pour convertir une entrée utilisateur pour une date et un temps, vous pouvez utiliser [[yii\validators\DateValidator]] et [[yii\validators\NumberValidator]] respectivement. Pour une simple conversion entre les formats lisibles par la machine de date et de temps, la fonction PHP [date()](https://www.php.net/manual/en/function.date.php) suffit. +> Note: le composant de formatage est conçu pour formater des valeurs à présenter à l'utilisateur. Si vous voulez convertir des entrées utilisateur en un format lisible par la machine, ou simplement formater une date dans un format lisible par la machine, le formateur n'est pas l'outil adapté à cela. Pour convertir une entrée utilisateur pour une date et un temps, vous pouvez utiliser [[yii\validators\DateValidator]] et [[yii\validators\NumberValidator]] respectivement. Pour une simple conversion entre les formats lisibles par la machine de date et de temps, la fonction PHP [date()](https://www.php.net/manual/fr/function.date.php) suffit. ## Configuration du formateur @@ -64,14 +64,14 @@ Le formateur prend en charge les formats de sortie suivants en relation avec les - [[yii\i18n\Formatter::asDate()|date]]: la valeur est formatée sous la forme d'une date, p. ex. `January 01, 2014`. - [[yii\i18n\Formatter::asTime()|time]]: la valeur est formatée sous la forme d'un temps, p. ex. `14:23`. - [[yii\i18n\Formatter::asDatetime()|datetime]]: la valeur est formatée sous la forme d'une date et d'un temps, p. ex. `January 01, 2014 14:23`. -- [[yii\i18n\Formatter::asTimestamp()|timestamp]]: la valeur est formatée sous la forme d'un [horodatage unix ](https://en.wikipedia.org/wiki/Unix_time), p. ex. `1412609982`. +- [[yii\i18n\Formatter::asTimestamp()|timestamp]]: la valeur est formatée sous la forme d'un [horodatage unix ](https://fr.wikipedia.org/wiki/Heure_Unix), p. ex. `1412609982`. - [[yii\i18n\Formatter::asRelativeTime()|relativeTime]]: la valeur est formatée sous la forme d'un intervalle de temps entre un temps et le temps actuel dans une forme lisible par l'homme, p.ex. `1 hour ago`. - [[yii\i18n\Formatter::asDuration()|duration]]: la valeur est formatée comme une durée dans un format lisible par l'homme, p. ex. `1 day, 2 minutes`. Les formats par défaut pour les dates et les temps utilisés pour les méthodes [[yii\i18n\Formatter::asDate()|date]], [[yii\i18n\Formatter::asTime()|time]], et [[yii\i18n\Formatter::asDatetime()|datetime]] peuvent être configurés globalement en configurant [[yii\i18n\Formatter::dateFormat|dateFormat]], [[yii\i18n\Formatter::timeFormat|timeFormat]], et [[yii\i18n\Formatter::datetimeFormat|datetimeFormat]]. -Vous pouvez spécifier les formats de date et de temps en utilisant la [syntaxe ICU](https://unicode-org.github.io/icu/userguide/format_parse/datetime/). Vous pouvez aussi utiliser la [syntaxe date() de PHP](https://www.php.net/manual/en/function.date.php) avec le préfixe `php:` pour la différentier de la syntaxe ICU. Par exemple : +Vous pouvez spécifier les formats de date et de temps en utilisant la [syntaxe ICU](https://unicode-org.github.io/icu/userguide/format_parse/datetime/). Vous pouvez aussi utiliser la [syntaxe date() de PHP](https://www.php.net/manual/fr/function.date.php) avec le préfixe `php:` pour la différentier de la syntaxe ICU. Par exemple : ```php // format ICU @@ -125,7 +125,7 @@ Pour les nombres, le formateur prend en charge les formats de sortie suivants : Le format pour un nombre peut être ajusté en utilisant [[yii\i18n\Formatter::decimalSeparator|decimalSeparator (séparateur de décimales)]] et [[yii\i18n\Formatter::thousandSeparator|thousandSeparator (séparateur de milliers) ]], qui prennent tous les deux les valeurs par défaut déterminées par la [[yii\i18n\Formatter::locale|locale]] courante. -Pour une configuration plus avancée, [[yii\i18n\Formatter::numberFormatterOptions]] et [[yii\i18n\Formatter::numberFormatterTextOptions]] peuvent être utilisés pour configurer la classe [NumberFormater (formateur de nombres)](https://www.php.net/manual/en/class.numberformatter.php) utilisée en interne pour implémenter le formateur. Par exemple, pour ajuster la valeur minimum et maximum des chiffres fractionnaires, vous pouvez configurer la propriété [[yii\i18n\Formatter::numberFormatterOptions]] comme ceci : +Pour une configuration plus avancée, [[yii\i18n\Formatter::numberFormatterOptions]] et [[yii\i18n\Formatter::numberFormatterTextOptions]] peuvent être utilisés pour configurer la classe [NumberFormater (formateur de nombres)](https://www.php.net/manual/fr/class.numberformatter.php) utilisée en interne pour implémenter le formateur. Par exemple, pour ajuster la valeur minimum et maximum des chiffres fractionnaires, vous pouvez configurer la propriété [[yii\i18n\Formatter::numberFormatterOptions]] comme ceci : ```php 'numberFormatterOptions' => [ @@ -172,7 +172,7 @@ echo Yii::$app->formatter->asDate('2014-01-01'); // affiche : 1 января 20 Par défaut, la [[yii\i18n\Formatter::locale|locale]] est déterminée par la valeur de [[yii\base\Application::language]]. Vous pouvez la redéfinir en définissant la propriété [[yii\i18n\Formatter::locale]] explicitement. -> Note: le formateur de Yii a besoin de l'[extension intl de PHP](https://www.php.net/manual/en/book.intl.php) pour prendre en charge la localisation des formats de données. Parce que différentes versions de la bibliothèque ICU compilées par PHP produisent des résultats de formatage différents, il est recommandé que vous utilisiez la même version de la bibliothèque ICU pour tous vos environnements. Pour plus de détails, reportez-vous au tutoriel [Configuration de votre environnement PHP pour l'internationalisation](tutorial-i18n.md#setup-environment). +> Note: le formateur de Yii a besoin de l'[extension intl de PHP](https://www.php.net/manual/fr/book.intl.php) pour prendre en charge la localisation des formats de données. Parce que différentes versions de la bibliothèque ICU compilées par PHP produisent des résultats de formatage différents, il est recommandé que vous utilisiez la même version de la bibliothèque ICU pour tous vos environnements. Pour plus de détails, reportez-vous au tutoriel [Configuration de votre environnement PHP pour l'internationalisation](tutorial-i18n.md#setup-environment). > > Si l'extension intl extension n'est pas installée, les données ne sont pas localisées. > diff --git a/docs/guide-fr/security-authorization.md b/docs/guide-fr/security-authorization.md index 9c124881217..74f1a9d8efc 100644 --- a/docs/guide-fr/security-authorization.md +++ b/docs/guide-fr/security-authorization.md @@ -125,7 +125,7 @@ class SiteController extends Controller ## Contrôle d'accès basé sur les rôles -Le contrôle d'accès basé sur les rôles (Role-Based Access Control – RBAC) fournit un contrôle d'accès centralisé simple mais puissant. Reportez-vous à [Wikipedia](https://en.wikipedia.org/wiki/Role-based_access_control) pour des détails comparatifs entre le contrôle d'accès basé sur les rôles et d'autres schéma de contrôle d'accès plus traditionnels. +Le contrôle d'accès basé sur les rôles (Role-Based Access Control – RBAC) fournit un contrôle d'accès centralisé simple mais puissant. Reportez-vous à [Wikipedia](https://fr.wikipedia.org/wiki/Contr%C3%B4le_d%27acc%C3%A8s_%C3%A0_base_de_r%C3%B4les) pour des détails comparatifs entre le contrôle d'accès basé sur les rôles et d'autres schéma de contrôle d'accès plus traditionnels. Yii met en œuvre un contrôle d'accès basé sur les rôles général hiérarchisé, qui suit le [modèle NIST RBAC](https://csrc.nist.gov/CSRC/media/Publications/conference-paper/1992/10/13/role-based-access-controls/documents/ferraiolo-kuhn-92.pdf). Il fournit la fonctionnalité de contrôle d'accès basé sur les rôles via le [composant d'application](structure-application-components.md)[[yii\RBAC\ManagerInterface|authManager]]. diff --git a/docs/guide-fr/security-passwords.md b/docs/guide-fr/security-passwords.md index 3cf9b3f20b1..f52cb52fc40 100644 --- a/docs/guide-fr/security-passwords.md +++ b/docs/guide-fr/security-passwords.md @@ -5,7 +5,7 @@ La plupart des développeurs savent que les mots de passe ne peuvent pas être s Pour apporter une sécurité améliorée pour les mots de passe des utilisateurs, même dans le pire des scénario (une brèche est ouverte dans votre application), vous devez utiliser des algorithmes de hachage qui résistent aux attaques en force brute. Le choix le meilleur couramment utilisé est `bcrypt`. -En PHP, vous pouvez créer une valeur de hachage `bcrypt` à l'aide de la [fonction crypt](https://www.php.net/manual/en/function.crypt.php). Yii fournit deux fonctions d'aide qui facilitent l'utilisation de `crypt` pour générer et vérifier des valeurs de hachage de manière sure. +En PHP, vous pouvez créer une valeur de hachage `bcrypt` à l'aide de la [fonction crypt](https://www.php.net/manual/fr/function.crypt.php). Yii fournit deux fonctions d'aide qui facilitent l'utilisation de `crypt` pour générer et vérifier des valeurs de hachage de manière sure. Quand un utilisateur fournit un mot de passe pour la première fois (p. ex. à l'enregistrement), le mot de passe doit être haché : diff --git a/docs/guide-fr/tutorial-i18n.md b/docs/guide-fr/tutorial-i18n.md index 55109edaf98..2267fe7769c 100644 --- a/docs/guide-fr/tutorial-i18n.md +++ b/docs/guide-fr/tutorial-i18n.md @@ -149,7 +149,7 @@ $price = 100; echo \Yii::t('app', 'Price: {0,number,currency}', $price); ``` -> Note: le formatage des valeurs de remplacement nécessite l'installation de [extension intl de PHP](https://www.php.net/manual/en/intro.intl.php). +> Note: le formatage des valeurs de remplacement nécessite l'installation de [extension intl de PHP](https://www.php.net/manual/fr/intro.intl.php). Vous pouvez utiliser, soit la forme raccourcie, soit la forme complète pour spécifier une valeur à remplacer avec un format : ``` @@ -637,9 +637,9 @@ Reportez-vous à la section [Formatage des données](output-formatting.md) pour ## Configuration de l'environnement PHP -Yii utilise l'[extension intl de PHP](https://www.php.net/manual/en/book.intl.php) pour fournir la plupart de ses fonctionnalités d'internationalisation, telles que le formatage des dates et des nombres de la classe [[yii\i18n\Formatter]] et le formatage des messages de la classe [[yii\i18n\MessageFormatter]]. +Yii utilise l'[extension intl de PHP](https://www.php.net/manual/fr/book.intl.php) pour fournir la plupart de ses fonctionnalités d'internationalisation, telles que le formatage des dates et des nombres de la classe [[yii\i18n\Formatter]] et le formatage des messages de la classe [[yii\i18n\MessageFormatter]]. Les deux classes fournissent un mécanisme de remplacement lorsque l'extension `intl` n'est pas installée. Néanmoins, l'implémentation du mécanisme de remplacement ne fonctionne bien que quand la langue cible est l'anglais. C'est pourquoi, il est fortement recommandé d'installer `intl` quand c'est nécessaire. -L'[extension intl de PHP](https://www.php.net/manual/en/book.intl.php) est basée sur la [bibliothèque ICU](https://icu.unicode.org/) qui fournit la base de connaissances et les règles de formatage pour les différentes locales. Des versions différentes d'ICU peuvent conduire à des formatages différents des dates et des nombres. Pour être sûr que votre site Web donne les même résultats dans tous les environnements, il est recommandé d'installer la même version de l'extension `intl` (et par conséquent la même version d'ICU) dans tous les environnements. +L'[extension intl de PHP](https://www.php.net/manual/fr/book.intl.php) est basée sur la [bibliothèque ICU](https://icu.unicode.org/) qui fournit la base de connaissances et les règles de formatage pour les différentes locales. Des versions différentes d'ICU peuvent conduire à des formatages différents des dates et des nombres. Pour être sûr que votre site Web donne les même résultats dans tous les environnements, il est recommandé d'installer la même version de l'extension `intl` (et par conséquent la même version d'ICU) dans tous les environnements. Pour savoir quelle version d'ICU est utilisée par PHP, vous pouvez exécuter le script suivant, qui vous restitue la version de PHP et d'ICU en cours d'utilisation. diff --git a/docs/guide-ja/README.md b/docs/guide-ja/README.md index b86e3aaad98..c2c7997c695 100644 --- a/docs/guide-ja/README.md +++ b/docs/guide-ja/README.md @@ -135,6 +135,7 @@ RESTful ウェブ・サービス * [クイック・スタート](rest-quick-start.md) * [リソース](rest-resources.md) +* [コレクションのフィルタリング](rest-filtering-collections.md) * [コントローラ](rest-controllers.md) * [ルーティング](rest-routing.md) * [レスポンス形式の設定](rest-response-formatting.md) diff --git a/docs/guide-ja/caching-data.md b/docs/guide-ja/caching-data.md index 513fdc59466..d2ae54e6fa6 100644 --- a/docs/guide-ja/caching-data.md +++ b/docs/guide-ja/caching-data.md @@ -57,7 +57,7 @@ $data = $cache->getOrSet($key, function () use ($user_id) { キャッシュ・コンポーネントは通常グローバルに設定しアクセスできるように [アプリケーション・コンポーネント](structure-application-components.md) として登録されます。 -以下のコードは、二台のキャッシュ・サーバを用いる [Memcached](https://memcached.org/) を使うように +以下のコードは、二台のキャッシュ・サーバを用いる [memcached](https://memcached.org/) を使うように `cache` アプリケーション・コンポーネントを構成する方法を示すものです。 ```php diff --git a/docs/guide-ja/caching-fragment.md b/docs/guide-ja/caching-fragment.md index 4648769f0aa..2e3bd038ab4 100644 --- a/docs/guide-ja/caching-fragment.md +++ b/docs/guide-ja/caching-fragment.md @@ -24,6 +24,11 @@ if ($this->beginCache($id)) { [データ・キャッシュ](caching-data.md) と同様に、キャッシュされるコンテントを識別するためにユニークな `$id` が必要になります。 +次のようにすると、フラグメント・キャッシュを削除することが出来ます。 +```php +Yii::$app->cache->delete(['yii\widgets\FragmentCache', $id]); +``` + ## キャッシュのオプション diff --git a/docs/guide-ja/concept-behaviors.md b/docs/guide-ja/concept-behaviors.md index a8583d92387..4389d7637ad 100644 --- a/docs/guide-ja/concept-behaviors.md +++ b/docs/guide-ja/concept-behaviors.md @@ -1,8 +1,8 @@ ビヘイビア ========== -ビヘイビアは [[yii\base\Behavior]] またその子クラスのインスタンスです。ビヘイビアは -[ミックスイン](https://ja.wikipedia.org/wiki/Mixin) としても知られ、既存の [[yii\base\Component|component]] クラスの +ビヘイビアは [[yii\base\Behavior]] またその子クラスのインスタンスです。 +ビヘイビアは [ミックスイン](https://ja.wikipedia.org/wiki/Mixin) としても知られ、既存の [[yii\base\Component|component]] クラスの 機能を、クラスの継承を変更せずに拡張することができます。コンポーネントにビヘイビアをアタッチすると、その コンポーネントにはビヘイビアのメソッドとプロパティが "注入" され、それらのメソッドとプロパティは、 コンポーネント・クラス自体に定義されているかのようにアクセスできるようになります。また、ビヘイビアは、 diff --git a/docs/guide-ja/concept-configurations.md b/docs/guide-ja/concept-configurations.md index b62113647ad..6c664ea97a7 100644 --- a/docs/guide-ja/concept-configurations.md +++ b/docs/guide-ja/concept-configurations.md @@ -103,7 +103,7 @@ $config = [ 'class' => 'yii\caching\FileCache', ], 'mailer' => [ - 'class' => 'yii\swiftmailer\Mailer', + 'class' => 'yii\symfonymailer\Mailer', ], 'log' => [ 'class' => 'yii\log\Dispatcher', @@ -207,7 +207,7 @@ return [ 'class' => 'yii\caching\FileCache', ], 'mailer' => [ - 'class' => 'yii\swiftmailer\Mailer', + 'class' => 'yii\symfonymailer\Mailer', ], 'log' => [ 'class' => 'yii\log\Dispatcher', diff --git a/docs/guide-ja/concept-di-container.md b/docs/guide-ja/concept-di-container.md index 9580d425118..c603b5cf615 100644 --- a/docs/guide-ja/concept-di-container.md +++ b/docs/guide-ja/concept-di-container.md @@ -541,7 +541,7 @@ $reader = $container->get('app\storage\DocumentsReader'); 依存注入と [サービス・ロケータ](concept-service-locator.md) はともに、疎結合でよりテストしやすい方法でのソフトウェア構築を可能にする、 定番のデザインパターンです。 -依存注入とサービス・ロケータへのより深い理解を得るために、 [Martin の記事](https://martinfowler.com/articles/injection.html) +依存注入とサービス・ロケータをより深く理解するために、 [Martin の記事](https://martinfowler.com/articles/injection.html) を読むことを強くお勧めします。 Yii はその [サービス・ロケータ](concept-service-locator.md) を、依存注入 (DI) コンテナの上に実装しています。 diff --git a/docs/guide-ja/concept-properties.md b/docs/guide-ja/concept-properties.md index 7692298683f..14464795ee7 100644 --- a/docs/guide-ja/concept-properties.md +++ b/docs/guide-ja/concept-properties.md @@ -80,7 +80,7 @@ getter と setter で定義されたプロパティには、いくつかの特 * 通常の `property_exists()` の呼び出しでは、マジック・プロパティが存在するかどうかを知ることは出来ません。 それぞれ、[[yii\base\BaseObject::canGetProperty()|canGetProperty()]] または [[yii\base\BaseObject::canSetProperty()|canSetProperty()]] を呼び出さなければなりません。 -このガイドの冒頭で説明した問題に戻ると、 `label` に値が代入されているあらゆる箇所で `trim()` を呼ぶのではなく、 -もう `setLabel()` という setter の内部だけで `trim()` を呼べば済むのです。 +このガイドの冒頭で説明した問題に戻ると、`label` に値が代入されているあらゆる箇所で `trim()` を呼ぶのではなく、 +`setLabel()` という setter の内部だけで `trim()` を呼べば済むようになります。 さらに、新しい要求でラベルの先頭を大文字にする必要が発生しても、他のいっさいのコードに触れることなく、 すぐに `setLabel()` メソッドを変更することができます。一箇所の変更は、すべての `label` への代入に普遍的に作用します。 diff --git a/docs/guide-ja/concept-service-locator.md b/docs/guide-ja/concept-service-locator.md index e3082432de0..7cf325dac34 100644 --- a/docs/guide-ja/concept-service-locator.md +++ b/docs/guide-ja/concept-service-locator.md @@ -129,4 +129,4 @@ return [ モジュールからサービスを引き出そうとする全てのリクエストは、そのモジュールが要求に応じられない場合は、すべてその親に渡されます。 モジュール内のコンポーネントの構成情報は、親モジュール内のコンポーネントの構成情報とは決してマージされないことに注意して下さい。 -サービス・ロケータ・パターンによって私たちは名前の付いたサービスを定義することが出来ますが、同じ名前のサービスが同じ構成パラメータを使用すると想定することは出来ません。 +サービス・ロケータのパターンによって私たちは名前の付いたサービスを定義することが出来ますが、同じ名前のサービスが同じ構成パラメータを使用すると想定することは出来ません。 diff --git a/docs/guide-ja/db-dao.md b/docs/guide-ja/db-dao.md index 26c3c6f3509..a9388ead827 100644 --- a/docs/guide-ja/db-dao.md +++ b/docs/guide-ja/db-dao.md @@ -682,5 +682,5 @@ $table = Yii::$app->db->getTableSchema('post'); ``` このメソッドは、テーブルのカラム、プライマリ・キー、外部キーなどの情報を含む [[yii\db\TableSchema]] オブジェクトを返します。 -これらの情報は、主として [クエリ・ビルダ](db-query-builder.md) や [アクティブ・レコード](db-active-record.md) によって利用されて、 +この情報は、主として [クエリ・ビルダ](db-query-builder.md) や [アクティブ・レコード](db-active-record.md) によって利用されて、 特定のデータベースに依存しないコードを書くことを助けてくれています。 diff --git a/docs/guide-ja/db-migrations.md b/docs/guide-ja/db-migrations.md index a0b489cb0cd..6fa39cfae34 100644 --- a/docs/guide-ja/db-migrations.md +++ b/docs/guide-ja/db-migrations.md @@ -685,7 +685,7 @@ class m150101_185401_create_news_table extends Migration `safeDown()` では、先に行を削除して、次にテーブルを削除しています。 > Note: 全ての DBMS がトランザクションをサポートしている訳ではありません。また、トランザクションに入れることが出来ない DB クエリもあります。 - いくつかの例を [暗黙のコミット](https://dev.mysql.com/doc/refman/5.7/en/implicit-commit.html) で見ることが出来ます。 + そのいくつかの例を [暗黙のコミット](https://dev.mysql.com/doc/refman/5.7/en/implicit-commit.html) で見ることが出来ます。 その場合には、代りに、`up()` と `down()` を実装しなければなりません。 diff --git a/docs/guide-ja/db-query-builder.md b/docs/guide-ja/db-query-builder.md index 996b2a542f9..170e1aa2c89 100644 --- a/docs/guide-ja/db-query-builder.md +++ b/docs/guide-ja/db-query-builder.md @@ -299,7 +299,7 @@ $query->where([$column => $value]); 値が自動的に一対のパーセント記号によって囲まれることに注意してください。 > Note: PostgreSQL を使っている場合は、`like` の代りに、大文字と小文字を区別しない比較のための - > [`ilike`](https://www.postgresql.org/docs/8.3/functions-matching.html#FUNCTIONS-LIKE) を使うことも出来ます。 + > [`ilike`](https://www.postgresql.org/docs/8.3/static/functions-matching.html#FUNCTIONS-LIKE) を使うことも出来ます。 - `or like`: オペランド 2 が配列である場合に `LIKE` 述語が `OR` によって結合される以外は、 `like` 演算子と同じです。 diff --git a/docs/guide-ja/helper-array.md b/docs/guide-ja/helper-array.md index 2df340a6ff5..1fb4eb8e84e 100644 --- a/docs/guide-ja/helper-array.md +++ b/docs/guide-ja/helper-array.md @@ -472,7 +472,7 @@ PHP は `in_array()` を提供していますが、これはサブセットや ` この種のチェックを助けるために、[[yii\helpers\ArrayHelper]] は [[yii\helpers\ArrayHelper::isIn()|isIn()]] および [[yii\helpers\ArrayHelper::isSubset()|isSubset()]] を -[in_array()](https://www.php.net/manual/en/function.in-array.php) と同じシグニチャで提供しています。 +[in_array()](https://www.php.net/manual/ja/function.in-array.php) と同じシグニチャで提供しています。 ```php // true diff --git a/docs/guide-ja/input-tabular-input.md b/docs/guide-ja/input-tabular-input.md index 252ca07a14b..48f2f7e986e 100644 --- a/docs/guide-ja/input-tabular-input.md +++ b/docs/guide-ja/input-tabular-input.md @@ -43,12 +43,14 @@ class SettingsController extends Controller { $settings = Setting::find()->indexBy('id')->all(); - if (Model::loadMultiple($settings, Yii::$app->request->post()) && Model::validateMultiple($settings)) { + if ($this->request->isPost) { + if (Setting::loadMultiple($settings, $this->request->post()) && Setting::validateMultiple($settings)) { foreach ($settings as $setting) { $setting->save(false); } return $this->redirect('index'); } + } return $this->render('update', ['settings' => $settings]); } @@ -71,10 +73,12 @@ use yii\widgets\ActiveForm; $form = ActiveForm::begin(); -foreach ($settings as $index => $setting) { - echo $form->field($setting, "[$index]value")->label($setting->name); +foreach ($settings as $id => $setting) { + echo $form->field($setting, "[$id]value")->label($setting->name); } +echo Html::submitButton('Save'); + ActiveForm::end(); ``` @@ -88,20 +92,29 @@ ActiveForm::end(); ```php public function actionCreate() { - $count = count(Yii::$app->request->post('Setting', [])); - $settings = [new Setting()]; - for($i = 1; $i < $count; $i++) { - $settings[] = new Setting(); + $settings = []; + if ($this->request->isPost) { + $count = count($this->request->post($setting->tableName())) - 1; + for ($i = 0; $i < $count; $i++) { + $settings[$i] = new Setting(); + } + if (Setting::loadMultiple($settings, $this->request->post()) && Setting::validateMultiple($settings)) { + foreach ($settings as $setting) { + $setting->save(false); + } + return $this->redirect('index'); } + } + $settings[] = new Setting(); - // ... + return $this->render('create', ['settings' => $settings]); } ``` ここでは、デフォルトで一個のモデルを含む `$settings` 配列を初期値として作成し、少なくとも一個のテキスト・フィールドが常にビューに表示されるようにしています。 そして、受信したインプットの行数に合せて、配列にモデルを追加しています。 -ビューでは javascript を使ってインプットの行を動的に追加することが出来ます。 +ビューでは JavaScript を使ってインプットの行を動的に追加することが出来ます。 ### 更新、作成、削除を一つのページに組み合わせる diff --git a/docs/guide-ja/input-validation.md b/docs/guide-ja/input-validation.md index 420317c0f35..b8826135377 100644 --- a/docs/guide-ja/input-validation.md +++ b/docs/guide-ja/input-validation.md @@ -748,7 +748,7 @@ JS; ### Deferred 検証 -非同期のクライアント・サイドの検証をサポートする必要がある場合は、[Defered オブジェクト](https://api.jquery.com/category/deferred-object/) を作成することが出来ます。 +非同期のクライアント・サイドの検証をサポートする必要がある場合は、[Deferred オブジェクト](https://api.jquery.com/category/deferred-object/) を作成することが出来ます。 例えば、AJAX によるカスタム検証を実行するために、次のコードを使うことが出来ます。 ```php diff --git a/docs/guide-ja/intro-upgrade-from-v1.md b/docs/guide-ja/intro-upgrade-from-v1.md index 53010f0da0e..b6dc75585d8 100644 --- a/docs/guide-ja/intro-upgrade-from-v1.md +++ b/docs/guide-ja/intro-upgrade-from-v1.md @@ -265,7 +265,7 @@ ActiveForm::end(); テーマは、ソースのビュー・ファイル・パスをテーマのビュー・ファイル・パスにマップするパス・マッピング機構に基づくものになりました。 例えば、あるテーマのパス・マップが `['/web/views' => '/web/themes/basic']` である場合、ビュー・ファイル `/web/views/site/index.php` のテーマ版は `/web/themes/basic/site/index.php` になります。 この理由により、テーマはどのようなビュー・ファイルに対してでも適用することが出来るようになりました。 -コントローラやウィジェットのコンテキストの外で表示されるビューに対してすら、適用できます。 +コントローラやウィジェットのコンテキストの外で表示されるビューであっても適用できます。 また、`CThemeManager` コンポーネントはもうありません。 その代りに、`theme` は `view` アプリケーション・コンポーネントの構成可能なプロパティになりました。 diff --git a/docs/guide-ja/output-client-scripts.md b/docs/guide-ja/output-client-scripts.md index 38ac328e2a4..2e307ab69ff 100644 --- a/docs/guide-ja/output-client-scripts.md +++ b/docs/guide-ja/output-client-scripts.md @@ -40,8 +40,8 @@ $this->registerJs( - [[yii\web\View::POS_LOAD|View::POS_LOAD]] - [ドキュメントの `load` イベント](https://learn.jquery.com/using-jquery-core/document-ready/) でコードを実行するための指定。 上記と同じく、これを指定すると、[[yii\web\JqueryAsset|jQuery]] が自動的に登録されます。 -最後の引数は、スクリプトのコード・ブロックを一意に特定するために使われるスクリプトのユニークな ID です。同じ ID のスクリプトが既にある場合は、新しいものを追加するのでなく、 -それを置き換えます。ID を指定しない場合は、JS コードそれ自身が ID として扱われます。この ID によって、同じコードが複数回登録されるのを防止します。 +最後の引数は、スクリプトのコード・ブロックを一意に特定するために使われるスクリプトのユニークな ID です。同じ ID のスクリプトが既にある場合は、新しいものを追加するのでなく、それを置き換えます。 +ID を指定しない場合は、JS コードそれ自身が ID として扱われます。この ID によって、同じコードが複数回登録されるのを防止します。 ### スクリプト・ファイルを登録する diff --git a/docs/guide-ja/output-data-providers.md b/docs/guide-ja/output-data-providers.md index d15d313f457..0344016325d 100644 --- a/docs/guide-ja/output-data-providers.md +++ b/docs/guide-ja/output-data-providers.md @@ -354,13 +354,13 @@ $filter = new ActiveDataFilter([ $filterCondition = null; -// どのようなソースからでもフィルタをロードすることが出来ます。 -// 例えば、リクエスト・ボディの JSON からロードしたい場合は、 +// どのようなソースからでもフィルタをロードすることが出来ます。例えば、 +// リクエスト・ボディの JSON からロードしたい場合は、 // 下記のように Yii::$app->request->getBodyParams() を使います。 if ($filter->load(\Yii::$app->request->get())) { $filterCondition = $filter->build(); if ($filterCondition === false) { - // シリアライザがエラーを抽出するだろう + // シリアライザがフィルタの抽出でエラーを出すかもしれない return $filter; } } diff --git a/docs/guide-ja/output-data-widgets.md b/docs/guide-ja/output-data-widgets.md index 28946fe3393..b4dd7d4a05c 100644 --- a/docs/guide-ja/output-data-widgets.md +++ b/docs/guide-ja/output-data-widgets.md @@ -777,4 +777,4 @@ yii gii/crud --controllerClass="backend\\controllers\PostController" \ さらに読むべき文書 ------------------ -- Arno Slatius による [Rendering Data in Yii 2 with GridView and ListView](https://www.sitepoint.com/rendering-data-in-yii-2-with-gridview-and-listview/)。 +- Arno Slatius による [Rendering Data in Yii 2 with GridView and ListView](https://www.sitepoint.com/rendering-data-in-yii-2-with-gridview-and-listview/) diff --git a/docs/guide-ja/output-formatting.md b/docs/guide-ja/output-formatting.md index 96d087b762f..4faf5c3c3ac 100644 --- a/docs/guide-ja/output-formatting.md +++ b/docs/guide-ja/output-formatting.md @@ -75,7 +75,7 @@ return [ - [[yii\i18n\Formatter::asDate()|date]] - 値は日付としてフォーマットされます。例えば `January 01, 2014`。 - [[yii\i18n\Formatter::asTime()|time]] - 値は時刻としてフォーマットされます。例えば `14:23`。 - [[yii\i18n\Formatter::asDatetime()|datetime]] - 値は日付および時刻としてフォーマットされます。例えば `January 01, 2014 14:23`。 -- [[yii\i18n\Formatter::asTimestamp()|timestamp]] - 値は [unix タイムスタンプ](https://en.wikipedia.org/wiki/Unix_time) としてフォーマットされます。例えば `1412609982`。 +- [[yii\i18n\Formatter::asTimestamp()|timestamp]] - 値は [unix タイムスタンプ](https://ja.wikipedia.org/wiki/UNIX%E6%99%82%E9%96%93) としてフォーマットされます。例えば `1412609982` - [[yii\i18n\Formatter::asRelativeTime()|relativeTime]] - 値は、その日時と現在との間隔として、人間に分かりやすい言葉でフォーマットされます。 例えば `1 hour ago`。 - [[yii\i18n\Formatter::asDuration()|duration]] - 値は継続時間として、人間に分かりやすい言葉でフォーマットされます。例えば `1 day, 2 minutes`。 diff --git a/docs/guide-ja/output-sorting.md b/docs/guide-ja/output-sorting.md index 945c331a0d2..ec18e82c952 100644 --- a/docs/guide-ja/output-sorting.md +++ b/docs/guide-ja/output-sorting.md @@ -65,7 +65,7 @@ $articles = Article::find() ラベルは HTML エンコードされないことに注意してください。 > Info: [[yii\data\Sort::$orders|orders]] の値をデータベースのクエリに直接に供給して、 - `ORDER BY` 句を構築することが出来ます。 データベースのクエリが認識できない合成的な属性が入っている場合があるため、 + `ORDER BY` 句を構築することが出来ます。データベースのクエリが認識できない合成的な属性が入っている場合があるため、 [[yii\data\Sort::$attributeOrders|attributeOrders]] を使ってはいけません。 [[yii\data\Sort::link()]] を呼んでハイパーリンクを生成すれば、それをクリックして、指定した属性によるデータの並べ替えをリクエストすることが出来るようになります。 diff --git a/docs/guide-ja/rest-authentication.md b/docs/guide-ja/rest-authentication.md index a811526f1a5..6a236cea835 100644 --- a/docs/guide-ja/rest-authentication.md +++ b/docs/guide-ja/rest-authentication.md @@ -12,7 +12,7 @@ * [HTTP Basic 認証](https://ja.wikipedia.org/wiki/Basic%E8%AA%8D%E8%A8%BC): アクセス・トークンはユーザ名として送信されます。 この方法は、アクセス・トークンを API コンシューマ側で安全に保存することが出来る場合、 - 例えば API コンシューマがサーバ上で走るプログラムである場合などにのみ使用されるべきです。 + 例えば API コンシューマがサーバ上で走るプログラムである場合などのみに使用されるべきです。 * クエリ・パラメータ: アクセス・トークンは API の URL、例えば、`https://example.com/users?access-token=xxxxxxxx` でクエリ・パラメータとして送信されます。 ほとんどのウェブ・サーバはクエリ・パラメータをサーバのログに記録するため、この手法は、 diff --git a/docs/guide-ja/rest-controllers.md b/docs/guide-ja/rest-controllers.md index 377f9189987..04c34bde298 100644 --- a/docs/guide-ja/rest-controllers.md +++ b/docs/guide-ja/rest-controllers.md @@ -80,7 +80,7 @@ public function behaviors() コントローラに [CORS (クロス・オリジン・リソース共有)](structure-filters.md#cors) フィルタを追加するのは、上記の他のフィルタを追加するのより、若干複雑になります。 と言うのは、CORS フィルタは認証メソッドより前に適用されなければならないため、他のフィルタとは少し異なるアプローチが必要だからです。 また、ブラウザが認証クレデンシャルを送信する必要なく、リクエストが出来るかどうかを前もって安全に判断できるように、 -[CORS プリフライト・リクエスト](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#preflighted_requests) +[CORS プリフライト・リクエスト](https://developer.mozilla.org/ja/docs/Web/HTTP/CORS#preflighted_requests) の認証を無効にする必要もあります。 下記のコードは、[[yii\rest\ActiveController]] を拡張した既存のコントローラに [[yii\filters\Cors]] フィルタを追加するのに必要なコードを示しています。 diff --git a/docs/guide-ja/rest-filtering-collections.md b/docs/guide-ja/rest-filtering-collections.md new file mode 100644 index 00000000000..7eb809679e5 --- /dev/null +++ b/docs/guide-ja/rest-filtering-collections.md @@ -0,0 +1,190 @@ +コレクションのフィルタリング +============================ + +バージョン 2.0.13 以降、リソースのコレクションは [[yii\data\DataFilter]] コンポーネントを使ってフィルタにかけることが出来ます。 +このコンポーネントは、リクエスト経由で渡されるフィルタ条件の構築を可能にし、そして、拡張バージョンの [[yii\data\ActiveDataFilter]] の助力によって、 +[[yii\db\QueryInterface::where()]] にとって適切な形式でフィルタ条件を使う事を可能にします。 + + +## データ・プロバイダをフィルタリングのために構成する + +[コレクション](rest-resources.md#collections) のセクションで言及されているように、 +[データ・プロバイダ](output-data-providers#data-providers) を使うと、並べ替えてページ付けしたリソースのリストを出力することが出来ます。 +また、データ・プロバイダを使って、そのリストをフィルタにかけることも出来ます。 + +```php +$filter = new ActiveDataFilter([ + 'searchModel' => 'app\models\PostSearch', +]); + +$filterCondition = null; +// どのようなソースからでもフィルタをロードすることが出来ます。例えば、 +// リクエスト・ボディの JSON からロードしたい場合は、 +// 下記のように Yii::$app->request->getBodyParams() を使います。 +if ($filter->load(Yii::$app->request->get())) { + $filterCondition = $filter->build(); + if ($filterCondition === false) { + // シリアライザがフィルタの抽出でエラーを出すかもしれない + return $filter; + } +} + +$query = Post::find(); +if ($filterCondition !== null) { + $query->andWhere($filterCondition); +} + +return new ActiveDataProvider([ + 'query' => $query, +]); +``` + +`PostSearch` モデルが、どのプロパティと値がフィルタリングのために許容されるかを定義する役目を担います。 + +```php +use yii\base\Model; + +class PostSearch extends Model +{ + public $id; + public $title; + + public function rules() + { + return [ + ['id', 'integer'], + ['title', 'string', 'min' => 2, 'max' => 200], + ]; + } +} +``` + +そこで特別なビジネス・ロジックが必要でない場合には、検索ルールのためのスタンドアロンなモデルを準備する代わりに、 +[[yii\base\DynamicModel]] を使うことが出来ます。 + +```php +$filter = new ActiveDataFilter([ + 'searchModel' => (new DynamicModel(['id', 'title'])) + ->addRule(['id'], 'integer') + ->addRule(['title'], 'string', ['min' => 2, 'max' => 200]), +]); +``` + +`searchModel` を定義することは、エンド・ユーザに許容するフィルタ条件を制御するために欠かすことが出来ません。 + + +## リクエストのフィルタリング + +通常、エンド・ユーザは許容された一つ以上のメソッド(これらはAPIドキュメントに明示的に記述されるべきものです)を使ってフィルタリング条件をリクエストで提供するものと期待されます。 +例えば、フィルタリングが JSON を使って POST メソッドで操作される場合は、 +下記と似たようなものになります。 + +```json +{ + "filter": { + "id": {"in": [2, 5, 9]}, + "title": {"like": "cheese"} + } +} +``` + +上記の条件は、次のように解釈されます : +- `id` は、2, 5, または 9 でなければならず、**かつD** +- `title` は `cheese` という語を含まなければならない。 + +同一の条件が GET クエリの一部として送信される場合は、次のようになります : + +``` +?filter[id][in][]=2&filter[id][in][]=5&filter[id][in][]=9&filter[title][like]=cheese +``` + +デフォルトの `filter` キー・ワードは、[[yii\data\DataFilter::$filterAttributeName]] を設定して変更することが出来ます。 + + +## フィルタ制御キーワード + +許容されているフィルタ制御キーワードは下記の通りです : + +| キーワード | 意味 | +|:--------------:|:-------------:| +| `and` | `AND` | +| `or` | `OR` | +| `not` | `NOT` | +| `lt` | `<` | +| `gt` | `>` | +| `lte` | `<=` | +| `gte` | `>=` | +| `eq` | `=` | +| `neq` | `!=` | +| `in` | `IN` | +| `nin` | `NOT IN` | +| `like` | `LIKE` | + +オプションの [[yii\data\DataFilter::$filterControls]] を拡張して、上記のリストを拡張することが出来ます。 +例えば、下記のように、同一のフィルタ構築キーにいくつかのキーワードを与えて、複数のエイリアスを作成することが出来ます : + +```php +[ + 'eq' => '=', + '=' => '=', + '==' => '=', + '===' => '=', + // ... +] +``` + +未定義のキーワードは、すべて、フィルタ制御とは認識されず、属性名として扱われることに注意して下さい。 +制御キーワードと属性名の衝突は避けなければなりません。 +(例えば、制御キーワードとしての 'like' と属性名としての 'like' が存在する場合、そのような属性に対して条件を指定することは不可能です。) + +> Note: フィルタ制御を指定する時に、あなたのAPIが使用する実際のデータ交換形式に留意しましょう。 + すべての指定された制御キーワードがその形式にとって妥当なものであることを確認して下さい。 + 例えば、XML ではタグ名は Letter クラスの文字でしか開始出来ませんから、`>`, `=`, `$gt` 等は XML スキーマに違反することになります。 + +> Note: 新しいフィルタ制御キーワードを追加する時は、演算子の結合規則および所期の動作に基づいて、期待されるクエリ結果を得るためには + [[yii\data\DataFilter::$conditionValidators]] および/または [[yii\data\DataFilter::$operatorTypes]] をも + 更新する必要があるかどうか、必ず確認して下さい。 + + +## Null 値の扱い + +JSON の式野中では `null` を使う事は容易ですが、文字通りの 'null' を文字列としての "null" と混乱させずに GET クエリを使ってを送信することは不可能です。 +バージョン 2.0.40 以降では、[[yii\data\DataFilter::$nullValue]] オプションを使って、文字通りの `null` に置換される単語(デフォルトでは、"NULL")を構成することが出来ます。 + + +## 属性のエイリアス + +属性を別の名前で呼びたい場合や、結合された DB テーブルでフィルタをかけたい場合に、 +[[yii\data\DataFilter::$attributeMap]] を使ってエイリアスのマップを設定することが出来ます。 + +```php +[ + 'carPart' => 'car_part', // car_part 属性でフィルタするために carPart が使われる + 'authorName' => '{{author}}.[[name]]', // 結合された author テーブルの name 属性でフィルタするために authorName が使われる +] +``` + +## `ActiveController` のためにフィルタを構成する + +[[yii\rest\ActiveController]] には一般的な一揃いの REST アクションが失踪されていますが、 +[[yii\rest\IndexAction::$dataFilter]] プロパティによってフィルタを使うことも簡単に出来ます。 +可能な方法のうちの一つは [[yii\rest\ActiveController::actions()]] を使ってそうすることです : + +```php +public function actions() +{ + $actions = parent::actions(); + + $actions['index']['dataFilter'] = [ + 'class' => \yii\data\ActiveDataFilter::class, + 'attributeMap' => [ + 'clockIn' => 'clock_in', + ], + 'searchModel' => (new DynamicModel(['id', 'clockIn']))->addRule(['id', 'clockIn'], 'integer', ['min' => 1]), + ]; + + return $actions; +} +``` + +これで(`index` アクションによってアクセス可能な)コレクションを `id` と `clockIn` プロパティによってフィルタすることが出来ます。 diff --git a/docs/guide-ja/rest-resources.md b/docs/guide-ja/rest-resources.md index 09020bca275..07f71703825 100644 --- a/docs/guide-ja/rest-resources.md +++ b/docs/guide-ja/rest-resources.md @@ -251,11 +251,3 @@ class PostController extends Controller REST API におけるコレクションはデータ・プロバイダであるため、データ・プロバイダの全ての機能、すなわち、ページネーションやソーティングを共有しています。 その一例を [クイック・スタート](rest-quick-start.md#trying-it-out) のセクションで見ることが出来ます。 - -### コレクションをフィルタリングする - -バージョン 2.0.13 以降、Yii はコレクションをフィルタリングする便利な機能を提供しています。 -その一例を [クイック・スタート](rest-quick-start.md#trying-it-out) のガイドに見ることが出来ます。 -エンド・ボイントをあなた自身が実装しようとしている場合、フィルタリングは -データ・プロバイダのガイドの [データ・フィルタを使ってデータ・プロバイダをフィルタリングする](output-data-providers.md#filtering-data-providers-using-data-filters - のセクションで述べられている方法で行うことが出来ます。 diff --git a/docs/guide-ja/rest-response-formatting.md b/docs/guide-ja/rest-response-formatting.md index f30433f0170..502d5707a08 100644 --- a/docs/guide-ja/rest-response-formatting.md +++ b/docs/guide-ja/rest-response-formatting.md @@ -3,7 +3,7 @@ RESTful API のリクエストを処理するとき、アプリケーションは、通常、レスポンス形式の設定に関して次のステップを踏みます。 -1. レスポンス形式に影響するさまざまな要因、例えば、メディア・タイプ、言語、バージョンなどを決定します。 +1. レスポンス形式に影響しうるさまざまな要因、例えば、メディア・タイプ、言語、バージョンなどを決定します。 このプロセスは [コンテント・ネゴシエーション](https://en.wikipedia.org/wiki/Content_negotiation) としても知られるものです。 2. リソース・オブジェクトを配列に変換します。 [リソース](rest-resources.md) のセクションで説明したように、この作業は [[yii\rest\Serializer]] によって実行されます。 diff --git a/docs/guide-ja/rest-versioning.md b/docs/guide-ja/rest-versioning.md index f9b73f9006c..6b89c8e07ae 100644 --- a/docs/guide-ja/rest-versioning.md +++ b/docs/guide-ja/rest-versioning.md @@ -5,7 +5,7 @@ クライアント・サイドとサーバ・サイドの両方のコードを完全に制御できるウェブ・アプリケーションとは違って、API はあなたの制御が及ばないクライアントによって使用されることを想定したものです。このため、API の後方互換性 (BC) は、可能な限り保たれなければなりません。 BC を損なうかも知れない変更が必要な場合は、それを API の新しいバージョンにおいて導入し、バージョン番号を上げるべきです。そうすれば、既存のクライアントは、API の古いけれども動作するバージョンを使い続けることが出来ますし、新しいまたはアップグレードされたクライアントは、新しい API バージョンで新しい機能を使うことが出来ます。 -> Tip: API のバージョン番号の設計に関する詳細情報は +> Tip: API のバージョン番号の設計についての詳細な情報は [Semantic Versioning](https://semver.org/) を参照してください。 API のバージョン管理を実装する方法としてよく使われるのは、バージョン番号を API の URL に埋め込む方法です。 diff --git a/docs/guide-ja/runtime-requests.md b/docs/guide-ja/runtime-requests.md index 94257ad13a6..fde78a39a99 100644 --- a/docs/guide-ja/runtime-requests.md +++ b/docs/guide-ja/runtime-requests.md @@ -152,8 +152,9 @@ Yii アプリケーションに渡されるからです。 信頼できるプロキシの情報を構成することが出来るようになっています。 [[yii\web\Request::trustedHosts|trustedHosts]]、 [[yii\web\Request::secureHeaders|secureHeaders]]、 -[[yii\web\Request::ipHeaders|ipHeaders]] および -[[yii\web\Request::secureProtocolHeaders|secureProtocolHeaders]] +[[yii\web\Request::ipHeaders|ipHeaders]] +[[yii\web\Request::secureProtocolHeaders|secureProtocolHeaders]] および +[[yii\web\Request::portHeaders|portHeaders]] (2.0.46 以降) 以下は、リバース・プロキシ・アレイの背後で動作するアプリケーションのための、request の構成例です (リバース・プロキシ・アレイは `10.0.2.0/24` のネットワークに設置されているとします)。 diff --git a/docs/guide-ja/runtime-sessions-cookies.md b/docs/guide-ja/runtime-sessions-cookies.md index 92eefef8b51..ae09ec64a5c 100644 --- a/docs/guide-ja/runtime-sessions-cookies.md +++ b/docs/guide-ja/runtime-sessions-cookies.md @@ -389,7 +389,8 @@ Yii 2.0.21 以降、[[yii\web\Cookie::sameSite]] 設定がサポートされて ブラウザが `sameSite` 設定をサポートしている場合、指定されたポリシー ('Lax' または 'Strict') に従うクッキーだけが送信されます。 詳細については [SameSite の wiki 記事](https://owasp.org/www-community/SameSite) を参照して下さい。 更なるセキュリティ強化のために、`sameSite` がサポートされていない PHP のバージョンで使われた場合には例外が投げられます。 -この機能を PHP のバージョンに関わりなく使用する場合は、最初にバージョンをチェックして下さい。例えば、 +この機能を PHP のバージョンに関わりなく使用する場合は、最初にバージョンをチェックして下さい。例えば + ```php [ 'sameSite' => PHP_VERSION_ID >= 70300 ? yii\web\Cookie::SAME_SITE_LAX : null, diff --git a/docs/guide-ja/security-authorization.md b/docs/guide-ja/security-authorization.md index 6375122461f..8b22f1591a8 100644 --- a/docs/guide-ja/security-authorization.md +++ b/docs/guide-ja/security-authorization.md @@ -157,7 +157,7 @@ class SiteController extends Controller ロール・ベース・アクセス制御 (RBAC) は、単純でありながら強力な集中型のアクセス制御を提供します。 RBAC と他のもっと伝統的なアクセス制御スキーマとの比較に関する詳細については、 -[Wiki 記事](https://ja.wikipedia.org/wiki/%E3%83%AD%E3%83%BC%E3%83%AB%E3%83%99%E3%83%BC%E3%82%B9%E3%82%A2%E3%82%AF%E3%82%BB%E3%82%B9%E5%88%B6%E5%BE%A1) を参照してください。 +[Wikipedia](https://ja.wikipedia.org/wiki/%E3%83%AD%E3%83%BC%E3%83%AB%E3%83%99%E3%83%BC%E3%82%B9%E3%82%A2%E3%82%AF%E3%82%BB%E3%82%B9%E5%88%B6%E5%BE%A1) を参照してください。 Yii は、[NIST RBAC モデル](https://csrc.nist.gov/CSRC/media/Publications/conference-paper/1992/10/13/role-based-access-controls/documents/ferraiolo-kuhn-92.pdf) に従って、一般的階層型 RBAC を実装しています。 RBAC の機能は、[[yii\rbac\ManagerInterface|authManager]] [アプリケーション・コンポーネント](structure-application-components.md) を通じて提供されます。 diff --git a/docs/guide-ja/security-best-practices.md b/docs/guide-ja/security-best-practices.md index 132a505456b..d38e18faab9 100644 --- a/docs/guide-ja/security-best-practices.md +++ b/docs/guide-ja/security-best-practices.md @@ -179,7 +179,7 @@ CSRF は、クロス・サイト・リクエスト・フォージェリ (cross-s CSRF を回避するためには、常に次のことを守らなければなりません。 1. HTTP の規格、すなわち、GET はアプリケーションの状態を変更すべきではない、という規則に従うこと。 - 詳細は [RFC2616](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html) を参照して下さい。 + 詳細は [RFC2616](https://www.rfc-editor.org/rfc/rfc9110.html#name-method-definitions) を参照して下さい。 2. Yii の CSRF 保護を有効にしておくこと。 場合によっては、コントローラやアクションの単位で CSRF 検証を無効化する必要があることがあるでしょう。これは、そのプロパティを設定することによって達成することが出来ます。 @@ -333,8 +333,8 @@ H5BP プロジェクトが提供する構成例を参考にすることも出来 - Apache 2: - Nginx: -サーバの構成にアクセスする権限がない場合は、このような攻撃に対して防御するために、[[yii\filters\HostControl]] -フィルタを設定することが出来ます。 +サーバの構成にアクセスする権限がない場合は、このような攻撃に対して防御するために、 +[[yii\filters\HostControl]] フィルタを設定することが出来ます。 ```php // ウェブ・アプリケーション構成ファイル diff --git a/docs/guide-ja/start-databases.md b/docs/guide-ja/start-databases.md index b1393aaf545..933696b1757 100644 --- a/docs/guide-ja/start-databases.md +++ b/docs/guide-ja/start-databases.md @@ -106,8 +106,8 @@ class Country extends ActiveRecord } ``` -`Country` クラスは [[yii\db\ActiveRecord]] を拡張しています。この中には一つもコードを書く必要はありません。 -単に上記のコードだけで、Yii は関連付けられたテーブル名をクラス名から推測します。 +`Country` クラスは [[yii\db\ActiveRecord]] を拡張しています。ここにコードを追加する必要は全くありません。 +上記のコードだけで、Yii は関連付けられたテーブル名をクラス名から推測します。 > Info: クラス名とテーブル名を直接に合致させることが出来ない場合は、[[yii\db\ActiveRecord::tableName()]] メソッドをオーバーライドして、関連づけられたテーブル名を明示的に指定することが出来ます。 diff --git a/docs/guide-ja/start-prerequisites.md b/docs/guide-ja/start-prerequisites.md index 8aeac1fb64a..bce70b98d0c 100644 --- a/docs/guide-ja/start-prerequisites.md +++ b/docs/guide-ja/start-prerequisites.md @@ -5,7 +5,7 @@ Yii の学習曲線は他の PHP フレームワークほど急峻ではあり ## PHP Yii は PHP フレームワークですから、必ず [言語リファレンスを読んで理解する](https://www.php.net/manual/ja/langref.php) ようにして下さい。 -Yii を使って開発するときはオブジェクト指向の流儀でコードを書くことになりますから、必ず、[クラスとオブジェクト](https://www.php.net/manual/ja/language.oop5.basic.php) および [名前空間](https://www.php.net/manual/ja/language.namespaces.php) には慣れ親しんでおいて下さい。 +Yii を使って開発するときはオブジェクト指向の流儀でコードを書くことになりますから、必ず、[クラスとオブジェクト](https://www.php.net/manual/ja/language.oop5.basic.php) および [名前空間](https://www.php.net/manual/ja/language.namespaces.php) に慣れ親しんでおいて下さい。 ## オブジェクト指向プログラミング diff --git a/docs/guide-ja/structure-application-components.md b/docs/guide-ja/structure-application-components.md index a75554af1af..7575f172ca1 100644 --- a/docs/guide-ja/structure-application-components.md +++ b/docs/guide-ja/structure-application-components.md @@ -58,7 +58,7 @@ けれども、場合によっては、明示的にアクセスされないときでも、リクエストごとにアプリケーション・コンポーネントのインスタンスを作成したいことがあります。 そうするために、アプリケーションの [[yii\base\Application::bootstrap|bootstrap]] プロパティのリストにそのコンポーネントの ID を挙げることが出来ます。 -また、カスタマイズしたコンポーネントをブートストラップするためにクロージャを用いることも出来ます。インスタンス化されたコンポーネントを返すことは要求されません。 +また、カスタマイズされたコンポーネントをブートストラップするためにクロージャを用いることも出来ます。インスタンス化されたコンポーネントを返すことは要求されません。 単に [[yii\base\Application]] のインスタンス化の後にコードを走らせるだけのためにクロージャを使うことも出来ます。 例えば、次のアプリケーション構成情報は、`log` コンポーネントが常にロードされることを保証するものです。 diff --git a/docs/guide-ja/structure-applications.md b/docs/guide-ja/structure-applications.md index 5ec671f5eb7..c3c44b8ba9f 100644 --- a/docs/guide-ja/structure-applications.md +++ b/docs/guide-ja/structure-applications.md @@ -276,7 +276,7 @@ if (YII_ENV_DEV) { このプロパティを使用して決定します。 言語を指定するのには、[IETF 言語タグ](https://ja.wikipedia.org/wiki/IETF%E8%A8%80%E8%AA%9E%E3%82%BF%E3%82%B0) に従うことが推奨されます。 -例えば、`en` は英語を意味し、`en-US` はアメリカ合衆国の英語を意味します。 +例えば、`en` は英語を意味しますが、`en-US` はアメリカ合衆国の英語を意味します。 このプロパティに関する詳細は [国際化](tutorial-i18n.md) のセクションで読むことが出来ます。 @@ -348,7 +348,7 @@ $width = \Yii::$app->params['thumbnail.size'][0]; [language](#language) プロパティと同様に、このプロパティは [IETF 言語タグ](https://ja.wikipedia.org/wiki/IETF%E8%A8%80%E8%AA%9E%E3%82%BF%E3%82%B0) に従って構成しなければなりません。 -例えば、`en` は英語を意味し、`en-US` はアメリカ合衆国の英語を意味します。 +例えば、`en` は英語を意味しますが、`en-US` はアメリカ合衆国の英語を意味します。 このプロパティに関する詳細は [国際化](tutorial-i18n.md) のセクションで読むことが出来ます。 diff --git a/docs/guide-ja/structure-assets.md b/docs/guide-ja/structure-assets.md index 4d42f5faf8e..d9ad0a52915 100644 --- a/docs/guide-ja/structure-assets.md +++ b/docs/guide-ja/structure-assets.md @@ -208,7 +208,7 @@ class FontAwesomeAsset extends AssetBundle ### Bower と NPM のアセットのインストール ほとんどの JavaScript/CSS パッケージは、[Bower](https://bower.io/) および/または [NPM](https://www.npmjs.com/) によって管理されています。 -PHP の世界には PHP の依存を管理する Composer がありますが、PHP のパッケージと全く同じように +PHP の世界には Composer があって、PHP の依存を管理していますが、PHP のパッケージと全く同じように `composer.json` を使って Bower のパッケージも NPM のパッケージもロードすることが可能です。 このことを達成するために Composer の構成を少し修正しなければなりません。二つの方法があります。 diff --git a/docs/guide-ja/structure-controllers.md b/docs/guide-ja/structure-controllers.md index a0cac8d8ed7..d67367d42bf 100644 --- a/docs/guide-ja/structure-controllers.md +++ b/docs/guide-ja/structure-controllers.md @@ -1,7 +1,7 @@ コントローラ ============ -コントローラは [MVC](https://ja.wikipedia.org/wiki/Model_View_Controller) アーキテクチャの一部を成すものです。 +コントローラは [MVC](https://ja.wikipedia.org/wiki/Model_View_Controller) アーキテクチャの一部を構成するものです。 それは [[yii\base\Controller]] を拡張したクラスのオブジェクトであり、リクエストの処理とレスポンスの生成について責任を負います。 具体的には、コントローラは、[アプリケーション](structure-applications.md) から制御を引き継いだ後、 入ってきたリクエストのデータを分析し、それを [モデル](structure-models.md) に引き渡して、 diff --git a/docs/guide-ja/structure-extensions.md b/docs/guide-ja/structure-extensions.md index 66f47e30090..f2122ec43e0 100644 --- a/docs/guide-ja/structure-extensions.md +++ b/docs/guide-ja/structure-extensions.md @@ -75,7 +75,7 @@ Image::thumbnail('@webroot/img/test-image.jpg', 120, 120) 2. もし有れば、エクステンションによって提供されているクラス・オートローダをインストールする。 3. 指示に従って、依存するエクステンションを全てダウンロードしインストールする。 -エクステンションがクラス・オートローダを持っていなくても、[PSR-4 標準](https://www.php-fig.org/psr/psr-4/) に従っている場合は、Yii によって提供されているクラス・オートローダを使ってエクステンションのクラスをオートロードすることが出来ます。 +エクステンションがクラス・オートローダを持っていなくても、[PSR-4 標準](https://www.php-fig.org/psr/psr-4/) に従っている場合は、Yii が提供しているクラス・オートローダを使ってエクステンションのクラスをオートロードすることが出来ます。 必要なことは、エクステンションのルート・ディレクトリのための [ルート・エイリアス](concept-aliases.md#defining-aliases) を宣言することだけです。 例えば、エクステンションを `vendor/mycompany/myext` というディレクトリにインストールしたと仮定します。 そして、エクステンションのクラスは `myext` 名前空間の下にあるとします。 @@ -184,7 +184,7 @@ Yii のアプリケーションは、このファイルによって、どんな それぞれの依存パッケージについて、適切なバージョン制約 (例えば `1.*` や `@stable`) を指定することも忘れてはなりません。 あなたのエクステンションを安定バージョンとしてリリースする場合は、安定した依存パッケージを使ってください。 -たいていの JavaScript/CSS パッケージは、Composer ではなく、[Bower](https://bower.io/) および/または [NPM](https://www.npmjs.com/) を使って管理されています。 +たいていの JavaScript/CSS パッケージは、Composer の代りに、[Bower](https://bower.io/) および/または [NPM](https://www.npmjs.com/) を使って管理されています。 Yii は [Composer アセット・プラグイン](https://github.com/fxpio/composer-asset-plugin) を使って、この種のパッケージを Composer によって管理することを可能にしています。 あなたのエクステンションが Bower パッケージに依存している場合でも、次のように、 `composer.json` に依存パッケージをリストアップすることが簡単に出来ます。 diff --git a/docs/guide-ja/structure-filters.md b/docs/guide-ja/structure-filters.md index dd7e097648f..701765ae8a8 100644 --- a/docs/guide-ja/structure-filters.md +++ b/docs/guide-ja/structure-filters.md @@ -142,7 +142,7 @@ public function behaviors() ### 認証メソッド・フィルタ 認証メソッド・フィルタは、[HTTP Basic 認証](https://ja.wikipedia.org/wiki/Basic%E8%AA%8D%E8%A8%BC)、 -[OAuth 2](https://oauth.net/2/) など、様々なメソッドを使ってユーザを認証するために使われるものです。 +[OAuth 2](https://oauth.net/2/) などの様々なメソッドを使ってユーザを認証するために使われるものです。 これらのフィルタ・クラスはすべて `yii\filters\auth` 名前空間の下にあります。 次の例は、[[yii\filters\auth\HttpBasicAuth]] の使い方を示すもので、HTTP Basic 認証に基づくアクセス・トークンを使ってユーザを認証しています。 diff --git a/docs/guide-ja/structure-models.md b/docs/guide-ja/structure-models.md index dcbc102ead9..80e65d07afa 100644 --- a/docs/guide-ja/structure-models.md +++ b/docs/guide-ja/structure-models.md @@ -293,6 +293,8 @@ public function rules() // "login" シナリオでは、username と password が必須 [['username', 'password'], 'required', 'on' => self::SCENARIO_LOGIN], + + [['username'], 'string'], // username は文字列でなければならない。この規則は全てのシナリオに適用される ]; } ``` diff --git a/docs/guide-ja/test-fixtures.md b/docs/guide-ja/test-fixtures.md index 953b7974787..9a8bc4ed6d8 100644 --- a/docs/guide-ja/test-fixtures.md +++ b/docs/guide-ja/test-fixtures.md @@ -107,8 +107,8 @@ DB と関係しないフィクスチャ (例えば、何らかのファイルや ## フィクスチャを使用する -[Codeception](https://codeception.com/) を使ってコードをテストしている場合は、フィクスチャのローディングとアクセスについては、 -内蔵されているサポートを使用することが出来ます。 +[Codeception](https://codeception.com/) を使ってコードをテストしている場合は、 +フィクスチャのローディングとアクセスについて、内蔵されているサポートを使用することが出来ます。 その他のテスト・フレームワークを使っている場合は、テスト・ケースで [[yii\test\FixtureTrait]] を使って同じ目的を達することが出来ます。 diff --git a/docs/guide-ja/test-functional.md b/docs/guide-ja/test-functional.md index 8a6274e9065..9a08f90653c 100644 --- a/docs/guide-ja/test-functional.md +++ b/docs/guide-ja/test-functional.md @@ -9,7 +9,7 @@ POST や GET のパラメータなどの環境変数を設定しておいてか 経験則から言うと、特別なウェブ・サーバ設定や JavaScript による複雑な UI を持たない場合は、 機能テストの方を選ぶべきです。 -機能テストは Codeception フレームワークの助けを借りて実装されています。これにつては、優れたドキュメントがあります。 +機能テストは Codeception フレームワークの助けを借りて実装されています。これについては、優れたドキュメントがあります。 - [Codeception for Yii framework](https://codeception.com/for/yii) - [Codeception Functional Tests](https://codeception.com/docs/04-FunctionalTests) diff --git a/docs/guide-ja/test-overview.md b/docs/guide-ja/test-overview.md index 41b75812154..89f82ce8c25 100644 --- a/docs/guide-ja/test-overview.md +++ b/docs/guide-ja/test-overview.md @@ -61,7 +61,7 @@ どんな形式の自動化テストもやりすぎになる、という場合もあるでしょう。 -- プロジェクトは単純で、この先も、複雑になる心配はない。 +- プロジェクトが単純で、この先も、複雑になる心配はない。 - これ以上かかわることはない一度限りのプロジェクトである。 ただ、このような場合であっても、時間に余裕があれば、テストを自動化することは良いことです。 diff --git a/docs/guide-ja/test-unit.md b/docs/guide-ja/test-unit.md index 77e596b8f84..2f6caca5cb1 100644 --- a/docs/guide-ja/test-unit.md +++ b/docs/guide-ja/test-unit.md @@ -9,7 +9,7 @@ Yii における単体テストは、PHPUnit と Codeception (こちらはオプ - [Codeception for Yii framework](https://codeception.com/for/yii) - [Codeception Unit Tests](https://codeception.com/docs/05-UnitTests) -- [PHPUnit のドキュメントの第2章以降](https://phpunit.readthedocs.io/en/9.5/writing-tests-for-phpunit.html). +- [第2章から始まる PHPUnit のドキュメント](https://phpunit.readthedocs.io/en/9.5/writing-tests-for-phpunit.html) ## ベーシック・テンプレート、アドバンスト・テンプレートのテストを実行する diff --git a/docs/guide-ja/tutorial-console.md b/docs/guide-ja/tutorial-console.md index 74c3401412f..1c39707307b 100644 --- a/docs/guide-ja/tutorial-console.md +++ b/docs/guide-ja/tutorial-console.md @@ -113,11 +113,11 @@ exit($exitCode); -------------------------- シェルで作業をしている場合、コマンド引数の自動補完は便利なものです。 -2.0.11 以降、`./yii` コマンドは、内蔵で Bash および ZSH のために補完をサポートしています。 +2.0.11 以降、`./yii` コマンドは、Bash および ZSH のための自動補完を内蔵でサポートしています。 ### Bash の補完 -bash completion がインストールされていることを確認して下さい。ほとんどの bash のインストレーションでは、デフォルトで利用可能になっています。 +bash completion がインストールされていることを確認して下さい。ほとんどのインストレーションでは、デフォルトで利用可能になっています。 補完スクリプトを `/etc/bash_completion.d/` に置いて下さい。 diff --git a/docs/guide-ja/tutorial-core-validators.md b/docs/guide-ja/tutorial-core-validators.md index 8379daf470b..b51a5a7827e 100644 --- a/docs/guide-ja/tutorial-core-validators.md +++ b/docs/guide-ja/tutorial-core-validators.md @@ -53,7 +53,7 @@ public function rules() このバリデータは、通常、[[yii\captcha\CaptchaAction]] および [[yii\captcha\Captcha]] と一緒に使われ、 入力値が [[yii\captcha\Captcha|CAPTCHA]] ウィジェットによって表示された検証コードと同じであることを確認します。 -- `caseSensitive`: 検証コードの比較で大文字と小文字を区別するかどうか。デフォルト値は `false`。 +- `caseSensitive`: 検証コードの比較で大文字と小文字を区別するか否か。デフォルト値は `false`。 - `captchaAction`: CAPTCHA 画像を表示する [[yii\captcha\CaptchaAction|CAPTCHA アクション]] に対応する [ルート](structure-controllers.md#routes)。デフォルト値は `'site/captcha'`。 - `skipOnEmpty`: 入力値が空のときに検証をスキップできるかどうか。デフォルト値は `false` で、 @@ -113,8 +113,8 @@ compare バリデータは、文字列や数値を比較するためにしか使 ['fromDate', 'compare', 'compareAttribute' => 'toDate', 'operator' => '<', 'enableClientValidation' => false], ``` -バリデータは指定された順序に従って実行されますので、まず最初に、`fromDate` と `toDate` に入力された値が有効な日付であることが確認されます。 -そして、有効な日付であった場合は、機械が読める形式に変換されます。 +バリデータは指定された順序に従って実行されますので、まず最初に、`fromDate` と `toDate` に入力された値が +有効な日付であることが確認され、有効な日付であった場合は、機械が読める形式に変換されます。 その後に、これらの二つの値が compare バリデータによって比較されます。 現在、date バリデータはクライアント・サイドのバリデーションを提供していませんので、これはサーバ・サイドでのみ動作します。 そのため、compare バリデータについても、[[yii\validators\CompareValidator::$enableClientValidation|$enableClientValidation]] は @@ -289,7 +289,7 @@ function foo($model, $attribute) { // 以下と同義 ['a1', 'exist', 'targetAttribute' => ['a2' => 'a2']], - // a1 と a2 の両方が存在する必要がある。両者はともにエラー・メッセージを受け取る + // a1 と a2 の両方が存在する必要がある。エラーの無い最初の属性がエラー・メッセージを受け取る // すなわち、a1 = 3, a2 = 4 は、"a1" カラムに 3, "a2" カラムに 4 が存在する場合に有効 [['a1', 'a2'], 'exist', 'targetAttribute' => ['a1', 'a2']], // 以下と同義 @@ -328,6 +328,8 @@ function foo($model, $attribute) { このバリデータは、一つまたは複数のカラムに対する検証に使用することが出来ます (複数のカラムに対する検証の場合は、それらの属性の組み合せが存在しなければならないことを意味します)。 +同時に複数のカラムをチェックして(例えば `['a1', 'a2']`)バリデーションが失敗したときに、`skipOnError` が `true` に設定されている場合は、 +先行するエラーが無い最初の属性だけが新しいエラー・メッセージを受け取ります。 - `targetClass`: 検証される入力値を探すために使用される [アクティブ・レコード](db-active-record.md) クラスの名前。 設定されていない場合は、現在検証されているモデルのクラスが使用されます。 @@ -418,8 +420,8 @@ function foo($model, $attribute) { - `filter`: フィルタを定義する PHP コールバック。これには、グローバル関数の名前、無名関数などを指定することが出来ます。 関数のシグニチャは ``function ($value) { return $newValue; }` でなければなりません。このプロパティは必須項目です。 - `skipOnArray`: 入力値が配列である場合にフィルタをスキップするか否か。デフォルト値は `false`。 - フィルタが配列の入力を処理できない場合は、このプロパティを `true` に設定しなければなりません。 - そうしないと、何らかの PHP エラーが生じ得ます。 + フィルタが配列の入力を処理できない場合は、このプロパティを `true` に設定しなければなりません。そうしないと、 + 何らかの PHP エラーが生じ得ます。 > Tip: 入力値をトリムしたい場合は、[trim](#trim) バリデータを直接使うことが出来ます。 @@ -679,7 +681,7 @@ IPv4 アドレス `192.168.10.128` も、制約の前にリストされている ['a1', 'unique', 'targetAttribute' => 'a1'], ['a1', 'unique', 'targetAttribute' => ['a1' => 'a1']], - // a1 の入力値が a2 のカラムにおいてユニークである必要がある + // a1 の入力値がユニークである必要がある。ただし a2 のカラムが a1 の入力値のユニークネスのチェックに用いられる // すなわち、a1 = 2 は、"a2" カラムに 2 の値が存在しない場合に有効 ['a1', 'unique', 'targetAttribute' => 'a2'], // 以下と同義 @@ -704,9 +706,10 @@ IPv4 アドレス `192.168.10.128` も、制約の前にリストされている ] ``` -このバリデータは、入力値がテーブルのカラムにおいてユニークであるかどうかをチェックします。 -[アクティブ・レコード](db-active-record.md) モデルの属性に対してのみ働きます。 +このバリデータは、入力値がテーブルのカラムにおいてユニークであるかどうかをチェックします。このバリデータは [アクティブ・レコード](db-active-record.md) モデルの属性に対してのみ働きます。 一つのカラムに対する検証か、複数のカラムに対する検証か、どちらかをサポートします。 +同時に複数のカラムをチェックするバリデーション(例えば上記の `['a1', 'a2']` )が失敗したときに、 +`skipOnError` が `true` に設定されている場合は、先行するエラーが無い最初の属性のみが新しいエラー・メッセージを受け取ります。 - `targetClass`: 検証される入力値を探すために使用される [アクティブ・レコード](db-active-record.md) クラスの名前。 設定されていない場合は、現在検証されているモデルのクラスが使用されます。 diff --git a/docs/guide-ja/tutorial-docker.md b/docs/guide-ja/tutorial-docker.md index 53864ab6144..d52d1a0793f 100644 --- a/docs/guide-ja/tutorial-docker.md +++ b/docs/guide-ja/tutorial-docker.md @@ -24,7 +24,7 @@ CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS これは Docker デーモンが起動して走っていることを意味します。 -これに加えて `docker-compose version` を実行すると、出力は次のようになるはずです。 +さらに、`docker-compose version` を実行すると、出力は次のようになるはずです。 ``` docker-compose version 1.20.0, build unknown diff --git a/docs/guide-ja/tutorial-i18n.md b/docs/guide-ja/tutorial-i18n.md index 43a43f14200..50ba4bf163a 100644 --- a/docs/guide-ja/tutorial-i18n.md +++ b/docs/guide-ja/tutorial-i18n.md @@ -156,8 +156,8 @@ return [ ##### 他のストレージ・タイプ -翻訳メッセージを格納するのには、PHP ファイル以外に、 -次のメッセージ・ソースを使うことも可能です。 +翻訳メッセージを格納するのには、PHP ファイル以外に、次のメッセージ・ソースを +使うことも可能です。 - [[yii\i18n\GettextMessageSource]] - 翻訳メッセージを保持するのに GNU Gettext の MO ファイルまたは PO ファイルを使用する - [[yii\i18n\DbMessageSource]] - 翻訳メッセージを保存するのにデータベース・テーブルを使用する @@ -743,7 +743,7 @@ class TranslationEventHandler 翻訳は [[yii\i18n\PhpMessageSource|php ファイル]]、[[yii\i18n\GettextMessageSource|.po ファイル]]、または [[yii\i18n\DbMessageSource|database]] に保存することが出来ます。追加のオプションについてはそれぞれのクラスを参照してください。 -まず最初に、構成情報ファイルを作成する必要があります。 +最初に、構成情報ファイルを作成する必要があります。 どこに保存したいかを決めて、次のコマンドを発行してください。 ```bash diff --git a/docs/guide-ja/tutorial-mailing.md b/docs/guide-ja/tutorial-mailing.md index 5c8e9dd8d4a..1f7ec10f362 100644 --- a/docs/guide-ja/tutorial-mailing.md +++ b/docs/guide-ja/tutorial-mailing.md @@ -8,7 +8,7 @@ Yii は電子メールの作成と送信をサポートしています。 実際のメール送信メカニズムはエクステンションによって提供されなければなりません。 と言うのは、メール送信はプロジェクトが異なるごとに異なる実装が必要とされるでしょうし、通常、外部のサービスやライブラリに依存するものだからです。 -ごく一般的な場合であれば、[yii2-swiftmailer](https://www.yiiframework.com/extension/yiisoft/yii2-swiftmailer) 公式エクステンションを使用することが出来ます。 +ごく一般的な場合であれば、yii2-symfonymailer](https://www.yiiframework.com/extension/yiisoft/yii2-symfonymailer) 公式エクステンションを使用することが出来ます。 構成 @@ -22,16 +22,11 @@ return [ //.... 'components' => [ 'mailer' => [ - 'class' => 'yii\swiftmailer\Mailer', + 'class' => 'yii\symfonymailer\Mailer', 'useFileTransport' => false, 'transport' => [ - 'class' => 'Swift_SmtpTransport', - 'encryption' => 'tls', - 'host' => 'your_mail_server_host', - 'port' => 'your_smtp_port', - 'username' => 'your_username', - 'password' => 'your_password', - ], + 'dsn' => 'smtp://user:pass@smtp.example.com:465', + ], ], ], ]; diff --git a/docs/guide-ja/tutorial-performance-tuning.md b/docs/guide-ja/tutorial-performance-tuning.md index b1c49308465..8b1195fb613 100644 --- a/docs/guide-ja/tutorial-performance-tuning.md +++ b/docs/guide-ja/tutorial-performance-tuning.md @@ -11,7 +11,7 @@ PHP 環境を正しく構成することは非常に重要です。最大のパフォーマンスを得るためには、 - 最新の安定した PHP バージョンを使うこと。使用する PHP のメジャー・リリースを上げると、顕著なパフォーマンスの改善がもたらされることがあります。 -- [Opcache](https://www.php.net/opcache) (PHP 5.5 以降) または [APC](https://www.php.net/manual/en/book.apcu.php) (PHP 5.4) を使って、 +- [Opcache](https://www.php.net/manual/ja/book.opcache.php) (PHP 5.5 以降) または [APC](https://www.php.net/manual/ja/book.apcu.php) (PHP 5.4) を使って、 バイト・コード・キャッシュを有効にすること。 バイト・コード・キャッシュによって、リクエストが入ってくるたびに PHP スクリプトを解析してインクルードする時間の浪費を避けることが出来ます。 - [`realpath()` キャッシュをチューニングする](https://github.com/samdark/realpath_cache_tuner). diff --git a/docs/guide-ja/tutorial-template-engines.md b/docs/guide-ja/tutorial-template-engines.md index 8791d5bff05..39518d13ad1 100644 --- a/docs/guide-ja/tutorial-template-engines.md +++ b/docs/guide-ja/tutorial-template-engines.md @@ -34,8 +34,8 @@ ] ``` -上記のコードにおいては、Smarty と Twig の両者がビュー・ファイルによって使用可能なものとして構成されています。 -しかし、これらのエクステンションをプロジェクトで使うためには、`composer.json` ファイルも修正して、これらのエクステンションを含める必要があります。 +上記のコードにおいては、Smarty と Twig の両者がビュー・ファイルによって使用可能なものとして構成されています。しかし、 +これらのエクステンションをプロジェクトで使うためには、`composer.json` ファイルも修正して、これらのエクステンションを含める必要があります。 ``` "yiisoft/yii2-smarty": "~2.0.0", diff --git a/docs/guide-pt-BR/caching-data.md b/docs/guide-pt-BR/caching-data.md index 9fe3fb57a8c..3801b355a1e 100644 --- a/docs/guide-pt-BR/caching-data.md +++ b/docs/guide-pt-BR/caching-data.md @@ -75,7 +75,7 @@ Por exemplo, você pode modificar a configuração acima para usar [[yii\caching Yii suporta uma ampla gama de sistemas de cache. A seguir um resumo: -* [[yii\caching\ApcCache]]: usa a extensão do PHP [APC](https://www.php.net/manual/en/book.apcu.php). Esta opção pode ser +* [[yii\caching\ApcCache]]: usa a extensão do PHP [APC](https://www.php.net/manual/pt_BR/book.apcu.php). Esta opção pode ser considerada a mais rápida ao se implementar o cache de uma aplicação densa e centralizada (por exemplo, um servidor, sem balanceadores de carga dedicados, etc.). * [[yii\caching\DbCache]]: usa uma tabela no banco de dados para armazenar os dados em cache. Para usar este cache @@ -89,13 +89,13 @@ Yii suporta uma ampla gama de sistemas de cache. A seguir um resumo: `Yii::$app->cache` possa ser `null`. * [[yii\caching\FileCache]]: usa arquivos para armazenar os dados em cache. Este é particularmente indicado para armazenar grandes quantidades de dados como o conteúdo da página. -* [[yii\caching\MemCache]]: usa o [memcache](https://www.php.net/manual/en/book.memcache.php) do PHP e as extensões - [memcached](https://www.php.net/manual/en/book.memcached.php). Esta opção pode ser considerada a mais rápida +* [[yii\caching\MemCache]]: usa o [memcache](https://www.php.net/manual/pt_BR/book.memcache.php) do PHP e as extensões + [memcached](https://www.php.net/manual/pt_BR/book.memcached.php). Esta opção pode ser considerada a mais rápida ao se implementar o cache em aplicações distribuídas (ex., vários servidores, balanceadores de carga, etc.) * [[yii\redis\Cache]]: implementa um componente de cache baseado em armazenamento chave-valor [Redis](https://redis.io/) (requer redis versão 2.6.12 ou mais recente). * [[yii\caching\WinCache]]: usa a extensão PHP [WinCache](https://iis.net/downloads/microsoft/wincache-extension) - ([veja também](https://www.php.net/manual/en/book.wincache.php)). + ([veja também](https://www.php.net/manual/pt_BR/book.wincache.php)). * [[yii\caching\XCache]] _(deprecated)_: usa a extensão PHP [XCache](https://en.wikipedia.org/wiki/List_of_PHP_accelerators#XCache). * [[yii\caching\ZendDataCache]] _(deprecated)_: usa [Cache de Dados Zend](https://files.zend.com/help/Zend-Server-6/zend-server.htm#data_cache_component.htm) diff --git a/docs/guide-pt-BR/caching-http.md b/docs/guide-pt-BR/caching-http.md index 0f7b6cd83b8..af7878ae2ec 100644 --- a/docs/guide-pt-BR/caching-http.md +++ b/docs/guide-pt-BR/caching-http.md @@ -124,7 +124,7 @@ como especificado na configuração `session.cache_limiter` do PHP.INI. Estes ca desabilitar o cache que você deseja do `HttpCache`. Para prevenir-se deste problema, por padrão, o `HttpCache` desabilitará o envio destes cabeçalhos automaticamente. Se você quiser modificar estes comportamentos, deve configurar a propriedade [[yii\filters\HttpCache::sessionCacheLimiter]]. A propriedade pode receber um valor string, como: `public`, `private`, `private_no_expire` e `nocache`. Por favor, consulte o manual do -PHP sobre [session_cache_limiter()](https://www.php.net/manual/en/function.session-cache-limiter.php) +PHP sobre [session_cache_limiter()](https://www.php.net/manual/pt_BR/function.session-cache-limiter.php) para mais explicações sobre estes valores. diff --git a/docs/guide-pt-BR/security-authorization.md b/docs/guide-pt-BR/security-authorization.md index bf691b62a03..41406bfe307 100644 --- a/docs/guide-pt-BR/security-authorization.md +++ b/docs/guide-pt-BR/security-authorization.md @@ -129,7 +129,7 @@ class SiteController extends Controller ## Controle de Acesso Baseado em Role (RBAC) -Controle de Acesso Baseado em Role (RBAC) fornece um simples porém poderoso controle de acesso centralizado. Por favor, consulte [Wikipedia](https://en.wikipedia.org/wiki/Role-based_access_control) para obter detalhes sobre comparação de RBAC com outros sistemas de controle de acesso mais tradicionais. +Controle de Acesso Baseado em Role (RBAC) fornece um simples porém poderoso controle de acesso centralizado. Por favor, consulte [Wikipedia](https://pt.wikipedia.org/wiki/Controle_de_acesso_baseado_em_fun%C3%A7%C3%B5es) para obter detalhes sobre comparação de RBAC com outros sistemas de controle de acesso mais tradicionais. Yii implementa um RBAC Hierárquico genérico, conforme [NIST RBAC model](https://csrc.nist.gov/CSRC/media/Publications/conference-paper/1992/10/13/role-based-access-controls/documents/ferraiolo-kuhn-92.pdf). Ele fornece as funcionalidades RBAC através do [componente de aplicação](structure-application-components.md) [[yii\rbac\ManagerInterface|authManager]]. diff --git a/docs/guide-pt-BR/start-installation.md b/docs/guide-pt-BR/start-installation.md index a5228fb9b6d..1fcc2d07c4b 100644 --- a/docs/guide-pt-BR/start-installation.md +++ b/docs/guide-pt-BR/start-installation.md @@ -49,7 +49,7 @@ Você pode atualizar o Composer executando o comando `composer self-update`. > A quantidade de solicitações depende do número de dependências que sua aplicação possui e pode extrapolar a > **taxa limite da API do Github**. Se você atingir esse limite, o Composer pode pedir a você suas credenciais de login para obter um > token de acesso à API Github. Em conexões rápidas você pode atingir esse limite antes que o Composer consiga lidar com a situação, então, recomendamos -> configurar um toke de acesso antes de instalar o Yii. +> configurar um token de acesso antes de instalar o Yii. > Por favor, consulte a [documentação do Composer sobre tokens da API Github](https://getcomposer.org/doc/articles/troubleshooting.md#api-rate-limit-and-oauth-tokens) > para instruções de como fazer isso. diff --git a/docs/guide-pt-BR/translators.json b/docs/guide-pt-BR/translators.json index cc52faec676..0a0ae20fddf 100644 --- a/docs/guide-pt-BR/translators.json +++ b/docs/guide-pt-BR/translators.json @@ -7,5 +7,6 @@ "Lucas Barros", "Raphael de Almeida", "Sidney da Silva Lins", - "Wanderson Bragança" + "Wanderson Bragança", + "Anthony Tesche" ] diff --git a/docs/guide-pt-BR/tutorial-core-validators.md b/docs/guide-pt-BR/tutorial-core-validators.md index 650afc8ae04..1fad7a6365b 100644 --- a/docs/guide-pt-BR/tutorial-core-validators.md +++ b/docs/guide-pt-BR/tutorial-core-validators.md @@ -92,7 +92,7 @@ Este validador compara o valor de entrada especificado com um outro e certifica Este validador verifica se o valor de entrada é uma data, hora ou data e hora em um formato adequado. Opcionalmente, pode converter o valor de entrada para um UNIX timestamp ou outro formato legível e armazená-lo em um atributo especificado via [[yii\validators\DateValidator::timestampAttribute|timestampAttribute]]. -- `format`: o formato date/time que o valor que está sendo validado deve ter. Este pode ser um padrão de data e hora conforme descrito no [ICU manual] (https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax). Alternativamente esta pode ser uma string com o prefixo `php:` representando um formato que pode ser reconhecido pela classe PHP `Datetime`. Por favor, consulte para formatos suportados. Se isso não for definido, ele terá o valor de `Yii::$app->formatter->dateFormat`. Consulte a [[yii\validators\DateValidator::$format|documentação da API]] para mais detalhes. +- `format`: o formato date/time que o valor que está sendo validado deve ter. Este pode ser um padrão de data e hora conforme descrito no [ICU manual] (https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax). Alternativamente esta pode ser uma string com o prefixo `php:` representando um formato que pode ser reconhecido pela classe PHP `Datetime`. Por favor, consulte para formatos suportados. Se isso não for definido, ele terá o valor de `Yii::$app->formatter->dateFormat`. Consulte a [[yii\validators\DateValidator::$format|documentação da API]] para mais detalhes. - `timestampAttribute`: o nome do atributo para que este validador possa atribuir o UNIX timestamp convertido a partir da entrada de data / hora. Este pode ser o mesmo atributo que está sendo validado. Se este for o caso, valor original será substituído pelo valor timestamp após a validação. Veja a seção ["Manipulando Datas com DatePicker"] (https://github.com/yiisoft/yii2-jui/blob/master/docs/guide/topics-date-picker.md) para exemplos de uso. @@ -238,7 +238,7 @@ Você pode usar este validador para validar uma ou várias colunas (ex., a combi Este validador verifica se o dados de entrada é um arquivo válido. - `extensions`: uma lista de extensões de arquivos que são permitidos para upload. Pode ser utilizado tanto um array quanto uma string constituída de extensões de arquivos separados por espaços ou por vírgulas (Ex. "gif, jpg"). Os nomes das extensões são case-insensitive. O padrão é `null`, significa que todas as extensões são permitidas. -- `mimeTypes`: uma lista de tipos de arquivos MIME que são permitidos no upload. Pode ser utilizado tanto um array quanto uma string constituída de tipos MIME separados por espaços ou por virgulas (ex. "image/jpeg, image/png"). Os nomes dos tipos MIME são case-insensitivo. O padrão é `null`, significa que todos os tipos MIME são permitidos. Para mais detalhes, consulte o artigo [common media types](https://en.wikipedia.org/wiki/Media_type). +- `mimeTypes`: uma lista de tipos de arquivos MIME que são permitidos no upload. Pode ser utilizado tanto um array quanto uma string constituída de tipos MIME separados por espaços ou por virgulas (ex. "image/jpeg, image/png"). Os nomes dos tipos MIME são case-insensitivo. O padrão é `null`, significa que todos os tipos MIME são permitidos. Para mais detalhes, consulte o artigo [common media types](https://pt.wikipedia.org/wiki/Tipo_de_m%C3%ADdia_da_Internet). - `minSize`: o número mínimo de bytes exigido para o arquivo carregado. O padrão é `null`, significa não ter limite mínimo. - `maxSize`: o número máximo de bytes exigido para o arquivo carregado. O padrão é `null`, significa não ter limite máximo. - `maxFiles`: o número máximo de arquivos que o atributo pode receber. O padrão é 1, ou seja, a entrada de dados deve ser composto de um único arquivo. Se o `maxFiles` for maior que 1, então a entrada de dados deve ser composto por um array constituído de no máximo `maxFiles` arquivos. @@ -270,8 +270,8 @@ Este validador não valida dados. Em vez disso, aplica um filtro no valor de ent > Dica: Se você quiser trimar valores de entrada, você deve utilizar o validador [trim](#trim). > Dica: Existem várias funções PHP que tem a assinatura esperada para o callback do `filter`. -> Por exemplo, para aplicar a conversão de tipos (usando por exemplo [intval](https://www.php.net/manual/en/function.intval.php), -> [boolval](https://www.php.net/manual/en/function.boolval.php), ...) para garantir um tipo específico para um atributo, +> Por exemplo, para aplicar a conversão de tipos (usando por exemplo [intval](https://www.php.net/manual/pt_BR/function.intval.php), +> [boolval](https://www.php.net/manual/pt_BR/function.boolval.php), ...) para garantir um tipo específico para um atributo, > você pode simplesmente especificar os nomes das funções do filtro sem a necessidade de envolvê-los em um closure: > > ```php diff --git a/docs/guide-pt-BR/tutorial-docker.md b/docs/guide-pt-BR/tutorial-docker.md new file mode 100644 index 00000000000..8d26b95bb65 --- /dev/null +++ b/docs/guide-pt-BR/tutorial-docker.md @@ -0,0 +1,103 @@ +Yii e Docker +============== + +Para o desenvolvimento e implantação de aplicativos Yii, eles podem ser executados como contêineres Docker. Um contêiner é como uma máquina virtual isolada e leve que mapeia seus serviços para as portas do host, ou seja, um servidor da web em um contêiner na porta 80 está disponível na porta 8888 do seu (local) host. + +Os contêineres podem resolver muitos problemas, como ter versões idênticas de software no computador do desenvolvedor e no servidor, implantações rápidas ou simulação de arquitetura multi-servidor durante o desenvolvimento. + +Você pode ler mais sobre contêineres Docker em [docker.com](https://www.docker.com/why-docker). + +## Requisitos + +- `docker` +- `docker-compose` + +Visite a [página de download](https://www.docker.com/products/container-runtime) para obter as ferramentas do Docker. + +## Instalação + +Após a instalação, você deve ser capaz de executar o comando docker ps e ver uma saída semelhante a esta: + +``` +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS +``` + +Isso significa que o seu daemon Docker está em execução. + +Além disso, execute o comando docker-compose version, a saída deve ser semelhante a esta: + +``` +docker-compose version 1.20.0, build unknown +docker-py version: 3.1.3 +CPython version: 3.6.4 +OpenSSL version: OpenSSL 1.1.0g 2 Nov 2017 +``` + +Com o Compose, você pode configurar e gerenciar todos os serviços necessários para a sua aplicação, como bancos de dados e cache. + +## Recursos + +- As imagens base do PHP para Yii podem ser encontradas em [yii2-docker](https://github.com/yiisoft/yii2-docker) +- Suporte do Docker para [yii2-app-basic](https://github.com/yiisoft/yii2-app-basic#install-with-docker) +- Suporte do Docker para [yii2-app-advanced](https://github.com/yiisoft/yii2-app-advanced/pull/347) está em desenvolvimento + +## Uso + +Os comandos básicos do Docker são + + docker-compose up -d + +para iniciar todos os serviços em sua pilha, em segundo plano + + docker-compose ps + +para listar os serviços em execução + + docker-compose logs -f + +para visualizar os logs de todos os serviços continuamente + + docker-compose stop + +para interromper todos os serviços em sua pilha de forma elegante + + docker-compose kill + +para interromper todos os serviços em sua pilha imediatamente + + docker-compose down -v + +para parar e remover todos os serviços, **atenção à perda de dados ao não usar volumes do host** + +Para executar comandos em um contêiner: + + docker-compose run --rm php composer install + +executa a instalação do Composer em um novo contêiner + + docker-compose exec php bash + +executa um shell bash em um serviço php que está em *execução*. + + +## Tópicos avançados + +### Testes do framework Yii + +Você pode executar os testes do framework Yii em um contêiner Docker, conforme descrito [aqui](https://github.com/yiisoft/yii2/blob/master/tests/README.md#dockerized-testing). + +### Database administration tools + +Ao executar o MySQL como (`mysql`), você pode adicionar um contêiner do phpMyAdmin à sua pilha, como mostrado abaixo: + +``` + phpmyadmin: + image: phpmyadmin/phpmyadmin + ports: + - '8888:80' + environment: + - PMA_ARBITRARY=1 + - PMA_HOST=mysql + depends_on: + - mysql +``` diff --git a/docs/guide-ru/caching-data.md b/docs/guide-ru/caching-data.md index 4ceee3fb3ab..7b1a3052e29 100644 --- a/docs/guide-ru/caching-data.md +++ b/docs/guide-ru/caching-data.md @@ -95,13 +95,13 @@ $data = $cache->getOrSet($key, function () use ($user_id) { Yii поддерживает множество хранилищ кэша: -* [[yii\caching\ApcCache]]: использует расширение PHP [APC](https://www.php.net/manual/en/book.apcu.php). Эта опция считается самой быстрой при работе с кэшем в «толстом» централизованном приложении (т.е. один сервер, без выделенного балансировщика нагрузки и т.д.); +* [[yii\caching\ApcCache]]: использует расширение PHP [APC](https://www.php.net/manual/ru/book.apcu.php). Эта опция считается самой быстрой при работе с кэшем в «толстом» централизованном приложении (т.е. один сервер, без выделенного балансировщика нагрузки и т.д.); * [[yii\caching\DbCache]]: использует таблицу базы данных для хранения кэшированных данных. Чтобы использовать этот кэш, вы должны создать таблицу так, как это описано в [[yii\caching\DbCache::cacheTable]]; * [[yii\caching\DummyCache]]: является кэшем-пустышкой, не реализующим реального кэширования. Смысл этого компонента в упрощении кода, проверяющего наличие кэша. Вы можете использовать данный тип кэша и переключиться на реальное кэширование позже. Примеры: использование при разработке; если сервер не поддерживает кэш. Для извлечения данных в этом случае используется один и тот же код `Yii::$app->cache->get($key)`. При этом можно не беспокоиться, что `Yii::$app->cache` может быть `null`; * [[yii\caching\FileCache]]: использует обычные файлы для хранения кэшированных данных. Замечательно подходит для кэширования больших кусков данных, таких как содержимое страницы; -* [[yii\caching\MemCache]]: использует расширения PHP [memcache](https://www.php.net/manual/en/book.memcache.php) и [memcached](https://www.php.net/manual/en/book.memcached.php). Этот вариант может рассматриваться как самый быстрый при работе в распределенных приложениях (например, с несколькими серверами, балансировкой нагрузки и так далее); +* [[yii\caching\MemCache]]: использует расширения PHP [memcache](https://www.php.net/manual/ru/book.memcache.php) и [memcached](https://www.php.net/manual/ru/book.memcached.php). Этот вариант может рассматриваться как самый быстрый при работе в распределенных приложениях (например, с несколькими серверами, балансировкой нагрузки и так далее); * [[yii\redis\Cache]]: реализует компонент кэша на основе [Redis](https://redis.io/), хранилища ключ-значение (требуется Redis версии 2.6.12 или выше); -* [[yii\caching\WinCache]]: использует расширение PHP [WinCache](https://iis.net/downloads/microsoft/wincache-extension) ([смотрите также](https://www.php.net/manual/en/book.wincache.php)); +* [[yii\caching\WinCache]]: использует расширение PHP [WinCache](https://iis.net/downloads/microsoft/wincache-extension) ([смотрите также](https://www.php.net/manual/ru/book.wincache.php)); * [[yii\caching\XCache]] _(deprecated)_: использует расширение PHP [XCache](https://en.wikipedia.org/wiki/List_of_PHP_accelerators#XCache); * [[yii\caching\ZendDataCache]] _(deprecated)_: использует [Zend Data Cache](https://files.zend.com/help/Zend-Server-6/zend-server.htm#data_cache_component.htm). diff --git a/docs/guide-ru/caching-http.md b/docs/guide-ru/caching-http.md index 9d25e163073..720397a1506 100644 --- a/docs/guide-ru/caching-http.md +++ b/docs/guide-ru/caching-http.md @@ -104,7 +104,7 @@ Cache-Control: public, max-age=3600 ## Ограничитель кэша сессий -Когда на странице используются сессии, PHP автоматически отправляет некоторые связанные с кэшем HTTP заголовки, определённые в настройке `session.cache_limiter` в php.ini. Эти заголовки могут вмешиваться или отключать кэширование, которое вы ожидаете от `HttpCache`. Чтобы предотвратить эту проблему, по умолчанию `HttpCache` будет автоматически отключать отправку этих заголовков. Если вы хотите изменить это поведение, вы должны настроить свойство [[yii\filters\HttpCache::sessionCacheLimiter]]. Это свойство может принимать строковое значение, включая `public`, `private`, `private_no_expire` и `nocache`. Пожалуйста, обратитесь к руководству PHP о [session_cache_limiter()](https://www.php.net/manual/en/function.session-cache-limiter.php) +Когда на странице используются сессии, PHP автоматически отправляет некоторые связанные с кэшем HTTP заголовки, определённые в настройке `session.cache_limiter` в php.ini. Эти заголовки могут вмешиваться или отключать кэширование, которое вы ожидаете от `HttpCache`. Чтобы предотвратить эту проблему, по умолчанию `HttpCache` будет автоматически отключать отправку этих заголовков. Если вы хотите изменить это поведение, вы должны настроить свойство [[yii\filters\HttpCache::sessionCacheLimiter]]. Это свойство может принимать строковое значение, включая `public`, `private`, `private_no_expire` и `nocache`. Пожалуйста, обратитесь к руководству PHP о [session_cache_limiter()](https://www.php.net/manual/ru/function.session-cache-limiter.php) для объяснения этих значений. diff --git a/docs/guide-ru/concept-di-container.md b/docs/guide-ru/concept-di-container.md index 80c2c723d86..2812d4bd8fc 100644 --- a/docs/guide-ru/concept-di-container.md +++ b/docs/guide-ru/concept-di-container.md @@ -498,7 +498,7 @@ class HotelController extends Controller как можно раньше. Ниже приведены рекомендуемые практики: * Если вы разработчик приложения, то вы можете зарегистрировать зависимости в конфигурации вашего приложения. - Как это сделать описано в подразделе [Конфигурация приложения](concept-service-locator.md#application-configurations) + Как это сделать описано в подразделе [Конфигурация приложения](concept-configurations.md#application-configurations) раздела [Конфигурации](concept-configurations.md). * Если вы разработчик распространяемого [расширения](structure-extensions.md), то вы можете зарегистрировать зависимости в загрузочном классе расширения. diff --git a/docs/guide-ru/concept-properties.md b/docs/guide-ru/concept-properties.md index ee2cd73b443..2ef04793c60 100644 --- a/docs/guide-ru/concept-properties.md +++ b/docs/guide-ru/concept-properties.md @@ -11,10 +11,10 @@ $object->label = trim($label); ``` Недостатком приведённого выше кода является то, что вам придется вызывать функцию `trim()` во всех местах, где вы -присваиваете значение полю `label`. Если в будущем понадобится производить еще какие-либо действие, например преобразовать первую букву в верхний регистр, вам придётся изменить каждый участок кода, где производится присваивание значения +присваиваете значение полю `label`. Если в будущем понадобится производить еще какие-либо действия, например, преобразовать первую букву в верхний регистр, то вам придётся изменить каждый участок кода, где производится присваивание значения полю `label`. Повторение кода приводит к ошибкам и его необходимо избегать всеми силами. -Что бы решить эту проблему, в Yii был добавлен базовый класс [[yii\base\BaseObject]] который реализует работу со свойствами +Чтобы решить эту проблему, в Yii был добавлен базовый класс [[yii\base\BaseObject]], который реализует работу со свойствами через *геттеры* и *сеттеры*. Если вашему классу нужна такая возможность, необходимо унаследовать его от [[yii\base\BaseObject]] или его потомка. diff --git a/docs/guide-ru/db-query-builder.md b/docs/guide-ru/db-query-builder.md index 41b164124e6..50bf94771ef 100644 --- a/docs/guide-ru/db-query-builder.md +++ b/docs/guide-ru/db-query-builder.md @@ -373,7 +373,7 @@ $query->orderBy([ ``` В данном коде, ключи массива - это имена столбцов, а значения массива - это соответствующее направление сортировки. -PHP константа `SORT_ASC` определяет сортировку по возрастанию и `SORT_DESC` сортировка по умолчанию. +PHP константа `SORT_ASC` определяет сортировку по возрастанию и `SORT_DESC` сортировку по убыванию. Если `ORDER BY` содержит только простые имена столбцов, вы можете определить их с помощью столбцов, также как и при написании обычного SQL. Например, diff --git a/docs/guide-ru/output-client-scripts.md b/docs/guide-ru/output-client-scripts.md index c317e776fba..2b68aaa81af 100644 --- a/docs/guide-ru/output-client-scripts.md +++ b/docs/guide-ru/output-client-scripts.md @@ -156,7 +156,7 @@ JS ); ``` -Приведенный выше пример кода использует PHP [синтаксис Heredoc](https://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc) для лучшей читаемости. Это также обеспечивает лучшую подсветку синтаксиса в большинстве IDE, поэтому это предпочтительный способ написания встроенного JavaScript, особенно полезный для кода, более длинного чем однострочный. Переменная `$message` создается PHP и благодаря [[yii\helpers\Json::htmlEncode|Json::htmlEncode]] содержит строку в допустимом синтаксисе JS, которую можно вставить в JavaScript код, чтобы поместить динамическую строку в вызов функции `alert()`. +Приведенный выше пример кода использует PHP [синтаксис Heredoc](https://www.php.net/manual/ru/language.types.string.php#language.types.string.syntax.heredoc) для лучшей читаемости. Это также обеспечивает лучшую подсветку синтаксиса в большинстве IDE, поэтому это предпочтительный способ написания встроенного JavaScript, особенно полезный для кода, более длинного чем однострочный. Переменная `$message` создается PHP и благодаря [[yii\helpers\Json::htmlEncode|Json::htmlEncode]] содержит строку в допустимом синтаксисе JS, которую можно вставить в JavaScript код, чтобы поместить динамическую строку в вызов функции `alert()`. > Note: При использовании Heredoc, будьте осторожны с именами переменных в коде JS, поскольку переменные, начинающиеся с `$`, могут интерпретироваться как переменные PHP, которые будут заменены их содержимым. > jQuery функция в форме `$(` или `$.` не интерпретируется как переменная PHP и может безопасно использоваться. diff --git a/docs/guide-ru/rest-quick-start.md b/docs/guide-ru/rest-quick-start.md index 5e93b0bfdb7..04c31712935 100644 --- a/docs/guide-ru/rest-quick-start.md +++ b/docs/guide-ru/rest-quick-start.md @@ -9,7 +9,7 @@ Yii включает полноценный набор средств для у * Получение сериализованных объектов с нужной вам выборкой полей; * Надлежащее форматирование данных и ошибок при их валидации; * Коллекция пагинаций, фильтров и сортировок; -* Поддержка [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS); +* Поддержка [HATEOAS](https://ru.wikipedia.org/wiki/HATEOAS); * Эффективная маршрутизация с надлежащей проверкой HTTP методов; * Встроенная поддержка методов `OPTIONS` и `HEAD`; * Аутентификация и авторизация; diff --git a/docs/guide-ru/rest-resources.md b/docs/guide-ru/rest-resources.md index 3564aa40cef..a9c80780243 100644 --- a/docs/guide-ru/rest-resources.md +++ b/docs/guide-ru/rest-resources.md @@ -127,7 +127,7 @@ public function extraFields() ## Ссылки -Согласно [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS), расшифровывающемуся как Hypermedia as the Engine of Application State, +Согласно [HATEOAS](https://ru.wikipedia.org/wiki/HATEOAS), расшифровывающемуся как Hypermedia as the Engine of Application State, RESTful API должны возвращать достаточно информации для того, чтобы клиенты могли определить возможные действия над ресурсами. Ключевой момент HATEOAS заключается в том, чтобы возвращать вместе с данными набора гиперссылок, указывающих на связанную с ресурсом информацию. diff --git a/docs/guide-ru/runtime-bootstrapping.md b/docs/guide-ru/runtime-bootstrapping.md index 0222473af58..4e74ac8c0c2 100644 --- a/docs/guide-ru/runtime-bootstrapping.md +++ b/docs/guide-ru/runtime-bootstrapping.md @@ -10,7 +10,7 @@ В конструкторе приложения происходит следующий процесс предзагрузки: -1. Вызывается метод [[yii\base\Application::preInit()|preInit()]], которые конфигурирует свойства приложения, имеющие +1. Вызывается метод [[yii\base\Application::preInit()|preInit()]], который конфигурирует свойства приложения, имеющие наивысший приоритет, такие как [[yii\base\Application::basePath|basePath]]; 2. Регистрируется [[yii\base\Application::errorHandler|обработчик ошибок]]; 3. Происходит инициализация свойств приложения согласно заданной конфигурации; diff --git a/docs/guide-ru/runtime-logging.md b/docs/guide-ru/runtime-logging.md index cc42a8c1872..2f45900e2ca 100644 --- a/docs/guide-ru/runtime-logging.md +++ b/docs/guide-ru/runtime-logging.md @@ -146,7 +146,7 @@ return [ Временная метка [IP-адрес][ID пользователя][ID сессии][Уровень важности][Категория] Текст сообщения ``` -Этот формат может быть изменен при помощи свойства [[yii\log\Target::prefix]], которое получает анонимную функцию, возвращающую нужный префикс сообщения. Например, следующий код позволяет настроить вывод идентификатор текущего пользователя в качестве префикса для всех сообщений. +Этот формат может быть изменен при помощи свойства [[yii\log\Target::prefix]], которое получает анонимную функцию, возвращающую нужный префикс сообщения. Например, следующий код позволяет настроить вывод идентификатора текущего пользователя в качестве префикса для всех сообщений. ```php [ diff --git a/docs/guide-ru/security-best-practices.md b/docs/guide-ru/security-best-practices.md index 52d306f75aa..a210e0b1a8d 100644 --- a/docs/guide-ru/security-best-practices.md +++ b/docs/guide-ru/security-best-practices.md @@ -185,7 +185,7 @@ CSRF - это аббревиатура для межсайтинговой по ----------------------------------------------- Yii предоставляет функции, которые зависят от куки-файлов и/или сессий PHP. Они могут быть уязвимыми, если Ваше соединение -скомпрометированно. Риск снижается, если приложение использует безопасное соединение через TLS (часто называемое как [SSL](https://en.wikipedia.org/wiki/Transport_Layer_Security)). +скомпрометированно. Риск снижается, если приложение использует безопасное соединение через TLS (часто называемое как [SSL](https://ru.wikipedia.org/wiki/TLS)). Инструкции по настройке смотрите в документации к Вашему веб-серверу. Вы также можете проверить примеры конфигураций предоставленные проектом H5BP: diff --git a/docs/guide-ru/security-passwords.md b/docs/guide-ru/security-passwords.md index 749776b3499..03fca00dd5f 100644 --- a/docs/guide-ru/security-passwords.md +++ b/docs/guide-ru/security-passwords.md @@ -7,7 +7,7 @@ Для того, чтобы обеспечить повышенную безопасность паролей ваших пользователей даже в худшем случае (ваше приложение взломано), нужно использовать алгоритм шифрования, устойчивый к атаке перебором. Лучший вариант в текущий -момент `bcrypt`. В PHP вы можете использовать хеши `bcrypt` через [функцию crypt](https://www.php.net/manual/en/function.crypt.php). +момент `bcrypt`. В PHP вы можете использовать хеши `bcrypt` через [функцию crypt](https://www.php.net/manual/ru/function.crypt.php). Yii обеспечивает две вспомогательные функции, которые упрощают использование функции `crypt` для генерации и проверки пароля. diff --git a/docs/guide-ru/structure-controllers.md b/docs/guide-ru/structure-controllers.md index c55a8cf1517..5765f26c16a 100644 --- a/docs/guide-ru/structure-controllers.md +++ b/docs/guide-ru/structure-controllers.md @@ -310,7 +310,7 @@ class HelloWorldAction extends Action [[yii\console\Response::exitStatus|статус выхода]] исполнения команды. В вышеприведенных примерах, все результаты действий являются строками, которые будут использованы в качестве тела ответа, -высланного пользователю. Следующий пример, показывает действие может перенаправить браузер пользователя на новый URL, с помощью +высланного пользователю. Следующий пример, показывает как действие может перенаправить браузер пользователя на новый URL, с помощью возврата response объекта (т. к. [[yii\web\Controller::redirect()|redirect()]] метод возвращает response объект): ```php diff --git a/docs/guide-ru/tutorial-performance-tuning.md b/docs/guide-ru/tutorial-performance-tuning.md index 3de45ee9f27..e6dee28f358 100644 --- a/docs/guide-ru/tutorial-performance-tuning.md +++ b/docs/guide-ru/tutorial-performance-tuning.md @@ -213,4 +213,4 @@ composer dumpautoload -o - [Отладочный тулбар Yii и отладчик](https://github.com/yiisoft/yii2-debug/blob/master/docs/guide/README.md) - [Профайлер XDebug](https://xdebug.org/docs/profiler) -- [XHProf](https://www.php.net/manual/en/book.xhprof.php) +- [XHProf](https://www.php.net/manual/ru/book.xhprof.php) diff --git a/docs/guide-ru/tutorial-yii-as-micro-framework.md b/docs/guide-ru/tutorial-yii-as-micro-framework.md index 39a7b25ff84..6e5c97439e2 100644 --- a/docs/guide-ru/tutorial-yii-as-micro-framework.md +++ b/docs/guide-ru/tutorial-yii-as-micro-framework.md @@ -1,6 +1,6 @@ # Использование Yii в качестве микро-framework'а -Yii можно легко использовать без функций включенных в базовый и расширенный шаблоны приложений. Другими словами Yii уже является микро-каркасом. Не требуется иметь структуру каталогов предоставляемую этими шаблонами при работе с Yii. +Yii можно легко использовать без функций, включенных в базовый и расширенный шаблоны приложений. Другими словами Yii уже является микро-каркасом. Не требуется иметь структуру каталогов предоставляемую этими шаблонами при работе с Yii. Это особенно удобно, когда Вам не нужен весь пред-установленный шаблонный код, такой как `Assets` или `Views`. Одним из таких случаев является создание JSON API. В следующих разделах будет показано, как это сделать. @@ -73,11 +73,11 @@ return [ > Info: Несмотря на то, что конфигурация приложения может находиться в файле `index.php` рекомендуется > содержать её в отдельном файле. Таким образом её можно также использовать и для консольного приложения, как показано ниже. -Теперь Ваш проект готов к наполнению кодом. Вам решать какую структуру каталогов проекта Вы выберите, пока Вы сможете видеть пространства имен. +Теперь Ваш проект готов к наполнению кодом. Вы можете выбрать любую структуру каталогов, соответствующую пространству имен. ## Создание первого контроллера -Создайте каталог `controllers` и добавьте туда файл `SiteController.php` который является контроллером по умолчанию, он будет обрабатывать запрос без пути. +Создайте каталог `controllers` и добавьте туда файл `SiteController.php`, который является контроллером по умолчанию, он будет обрабатывать запрос без пути. ```php 'default/index'`. +Например, для `DefaultController` будет соответственно `'defaultRoute' => 'default/index'`. На данный момент структура проекта должна выглядеть так: @@ -110,11 +110,11 @@ micro-app/ ``` Если Вы еще не настроили веб-сервер, Вы можете взглянуть на [примеры конфигурационных файлов веб-серверов](start-installation.md#configuring-web-servers). -Другой возможностью является использование команды `yii serve` которая будет использовать встроенный веб-сервер PHP. Вы можете запустить её из каталога `micro-app/` через: +Другой возможностью является использование команды `yii serve`, которая будет использовать встроенный веб-сервер PHP. Вы можете запустить её из каталога `micro-app/` через: vendor/bin/yii serve --docroot=./web -При открытии URL приложения в браузере, он теперь должен печатать "Hello World!" который был возвращен из `SiteController::actionIndex()`. +При открытии URL приложения в браузере, он теперь должен печатать "Hello World!", который был возвращен из `SiteController::actionIndex()`. > Info: В нашем примере мы изменили пространство имен по умолчанию приложения с `app` на` micro`, чтобы продемонстрировать > что Вы не привязаны к этому имени (в случае, если Вы считали, что это так), а затем скорректировали @@ -124,7 +124,7 @@ micro-app/ Чтобы продемонстрировать использование нашей "микроархитектуры", мы создадим простой REST API для сообщений. -Чтобы этот API обслуживал некоторые данные, нам нужна база данных. Добавим конфигурацию подключения базы данных +Чтобы у API были данные для работы, нам нужна база данных. Добавим конфигурацию подключения базы данных к конфигурации приложения: ```php @@ -138,9 +138,9 @@ micro-app/ > Info: Для простоты мы используем базу данных sqlite. Дополнительную информацию см. в [Руководство по базам данных](db-dao.md). -Затем мы создаем [миграции базы данных](db-migrations.md) для создания таблицы сообщений. -Убедитесь, что у Вас есть отдельный файл конфигурации, как описано выше, нам это нужно для того, чтобы запустить консольные команды описанные ниже. -Запуск следующих команд создаст файл миграции базы данных и применит миграцию к базе данных: +Затем, добавим [миграции базы данных](db-migrations.md) для создания таблицы сообщений. +Убедитесь, что у Вас есть отдельный файл конфигурации, как описано выше, нам это нужно для того, чтобы запустить консольные команды. +Запуск следующих команд создаст файл миграции и применит миграцию к базе данных: vendor/bin/yii migrate/create --appconfig=config.php create_post_table --fields="title:string,body:text" vendor/bin/yii migrate/up --appconfig=config.php @@ -163,7 +163,7 @@ class Post extends ActiveRecord } ``` -> Info: Созданная модель представляет собой класс ActiveRecord, который представляет данные из таблицы `posts`. +> Info: Созданная модель наследует класс ActiveRecord и представляет данные из таблицы `posts`. > Для получения дополнительной информации обратитесь к [active record руководству](db-active-record.md). Чтобы обслуживать сообщения в нашем API, добавьте `PostController` в` controllers`: @@ -199,7 +199,7 @@ class PostController extends ActiveController Начиная с этого момента Вы можете посмотреть следующие руководства для дальнейшего развития своего приложения: -- API в настоящий момент понимает только данные urlencoded как входные данные, чтобы сделать его настоящим JSON API, Вам +- API в настоящий момент принимает только urlencoded данные на вход. Чтобы сделать его настоящим JSON API, Вам необходимо настроить [[yii\web\JsonParser]]. - Чтобы сделать URL более дружественным, вам необходимо настроить маршрутизацию. См. [Руководство по маршрутизации REST](rest-routing.md) о том, как это сделать. diff --git a/docs/guide-uk/rest-quick-start.md b/docs/guide-uk/rest-quick-start.md index 8e3f06a8af1..16316c61644 100644 --- a/docs/guide-uk/rest-quick-start.md +++ b/docs/guide-uk/rest-quick-start.md @@ -9,7 +9,7 @@ Yii включає повноцінний набір засобів для сп * Отримання серіалізованих об'єктів із необхідною вам вибіркою полів; * Належне форматування даних та помилок при їх валідації; * Колекція пагінацій, фільтрів та сортувань; -* Підтримка [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS); +* Підтримка [HATEOAS](https://uk.wikipedia.org/wiki/HATEOAS); * Ефективна маршрутизація з належною перевіркою методів HTTP; * Вбудована підтримка методів `OPTIONS` та `HEAD`; * Аутентифікація та авторизація; diff --git a/docs/guide-zh-CN/caching-data.md b/docs/guide-zh-CN/caching-data.md index 94516abf01e..046c85f4124 100644 --- a/docs/guide-zh-CN/caching-data.md +++ b/docs/guide-zh-CN/caching-data.md @@ -103,7 +103,7 @@ $data = $cache->getOrSet($key, function () use ($user_id) { Yii 支持一系列缓存存储器,概况如下: -* [[yii\caching\ApcCache]]:使用 PHP [APC](https://www.php.net/manual/en/book.apcu.php) 扩展。 +* [[yii\caching\ApcCache]]:使用 PHP [APC](https://www.php.net/manual/zh/book.apcu.php) 扩展。 这个选项可以认为是集中式应用程序环境中 (例如:单一服务器,没有独立的负载均衡器等)最快的缓存方案。 * [[yii\caching\DbCache]]:使用一个数据库的表存储缓存数据。要使用这个缓存, @@ -120,14 +120,14 @@ Yii 支持一系列缓存存储器,概况如下: `Yii::$app->cache` 可能是 `null`。 * [[yii\caching\FileCache]]:使用标准文件存储缓存数据。 这个特别适用于缓存大块数据,例如一个整页的内容。 -* [[yii\caching\MemCache]]:使用 PHP [memcache](https://www.php.net/manual/en/book.memcache.php) - 和 [memcached](https://www.php.net/manual/en/book.memcached.php) 扩展。 +* [[yii\caching\MemCache]]:使用 PHP [memcache](https://www.php.net/manual/zh/book.memcache.php) + 和 [memcached](https://www.php.net/manual/zh/book.memcached.php) 扩展。 这个选项被看作分布式应用环境中(例如:多台服务器,有负载均衡等) 最快的缓存方案。 * [[yii\redis\Cache]]:实现了一个基于 [Redis](https://redis.io/) 键值对存储器的缓存组件 (需要 redis 2.6.12 及以上版本的支持 )。 * [[yii\caching\WinCache]]:使用 PHP [WinCache](https://iis.net/downloads/microsoft/wincache-extension) - ([另可参考](https://www.php.net/manual/en/book.wincache.php))扩展. + ([另可参考](https://www.php.net/manual/zh/book.wincache.php))扩展. * [[yii\caching\XCache]]:使用 PHP [XCache](https://en.wikipedia.org/wiki/List_of_PHP_accelerators#XCache)扩展。 * [[yii\caching\ZendDataCache]]:使用 [Zend Data Cache](https://files.zend.com/help/Zend-Server-6/zend- server.htm#data_cache_component.htm) diff --git a/docs/guide-zh-CN/caching-http.md b/docs/guide-zh-CN/caching-http.md index 3722807c8cf..639dab9f380 100644 --- a/docs/guide-zh-CN/caching-http.md +++ b/docs/guide-zh-CN/caching-http.md @@ -131,7 +131,7 @@ Cache-Control: public, max-age=3600 为了避免此问题,默认情况下 `HttpCache` 禁止自动发送这些头。 想改变这一行为,可以配置 [[yii\filters\HttpCache::sessionCacheLimiter]] 属性。 该属性接受一个字符串值,包括 `public`,`private`,`private_no_expire`,和 `nocache`。 -请参考 PHP 手册中的[缓存限制器](https://www.php.net/manual/en/function.session-cache-limiter.php) +请参考 PHP 手册中的[缓存限制器](https://www.php.net/manual/zh/function.session-cache-limiter.php) 了解这些值的含义。 diff --git a/docs/guide-zh-CN/helper-array.md b/docs/guide-zh-CN/helper-array.md index 0aafaaa1c0e..a119e40c307 100644 --- a/docs/guide-zh-CN/helper-array.md +++ b/docs/guide-zh-CN/helper-array.md @@ -117,7 +117,7 @@ $type = ArrayHelper::remove($array, 'type'); ## 检查键名的存在(Checking Existence of Keys) -`ArrayHelper::keyExists` 工作原理和 [array_key_exists](https://www.php.net/manual/en/function.array-key-exists.php) 差不多,除了 +`ArrayHelper::keyExists` 工作原理和 [array_key_exists](https://www.php.net/manual/zh/function.array-key-exists.php) 差不多,除了 它还可支持大小写不敏感的键名比较,比如: ```php @@ -356,7 +356,7 @@ $decoded = ArrayHelper::htmlDecode($data); 您可以使用 [[yii\helpers\ArrayHelper::merge()|ArrayHelper::merge()]] 将两个或多个数组合并成一个递归的数组。 如果每个数组都有一个具有相同字符串键值的元素,则后者将覆盖前者 -(不同于 [array_merge_recursive()](https://www.php.net/manual/en/function.array-merge-recursive.php))。 +(不同于 [array_merge_recursive()](https://www.php.net/manual/zh/function.array-merge-recursive.phpp))。 如果两个数组都有一个数组类型的元素并且具有相同的键,则将执行递归合并。 对于整数键的元素,来自后一个数组的元素将被附加到前一个数组。 您可以使用 [[yii\helpers\UnsetArrayValue]] 对象来取消前一个数组的值或 diff --git a/docs/guide-zh-CN/helper-html.md b/docs/guide-zh-CN/helper-html.md index 263030a0be4..c5a6a21dda5 100644 --- a/docs/guide-zh-CN/helper-html.md +++ b/docs/guide-zh-CN/helper-html.md @@ -2,7 +2,7 @@ Html 帮助类(Html helper) ======================= 任何一个 web 应用程序会生成很多 HTMl 超文本标记。如果超文本标记是静态的, -那么[将 PHP 和 HTML 混合在一个文件里](https://www.php.net/manual/en/language.basic-syntax.phpmode.php) +那么[将 PHP 和 HTML 混合在一个文件里](https://www.php.net/manual/zh/language.basic-syntax.phpmode.php) 这种做法是非常高效的。但是,如果这些超文本标记是动态生成的,那么如果没有额外的辅助工具,这个过程将会变得复杂。 Yii 通过 HTML 帮助类来提供生成超文本标记的方法。这个帮助类包含有一系列的用于处理通用的 HTML 标签和其属性以及内容的静态方法。 @@ -147,8 +147,8 @@ Html::removeCssStyle($options, ['width', 'height']); ### 标签内容的转码和解码(Encoding and Decoding Content) 为了让内容能够正确安全的显示,一些 HTML 特殊字符应该被转码。在 PHP 中, -这个操作由 [htmlspecialchars](https://www.php.net/manual/en/function.htmlspecialchars.php) 和 -[htmlspecialchars_decode](https://www.php.net/manual/en/function.htmlspecialchars-decode.php) 完成。 +这个操作由 [htmlspecialchars](https://www.php.net/manual/zh/function.htmlspecialchars.php) 和 +[htmlspecialchars_decode](https://www.php.net/manual/zh/function.htmlspecialchars-decode.php) 完成。 直接使用这些方法的问题是,你总是需要指定转码所需的额外标志。由于标志一般总是不变的,而内容转码的过程为了避免一些安全问题, 需要和应用的默认过程匹配, Yii 提供了两个简单可用的对 PHP 原生方法的封装: diff --git a/docs/guide-zh-CN/input-file-upload.md b/docs/guide-zh-CN/input-file-upload.md index 5532d42a867..e0a5644cbaf 100644 --- a/docs/guide-zh-CN/input-file-upload.md +++ b/docs/guide-zh-CN/input-file-upload.md @@ -123,7 +123,7 @@ class SiteController extends Controller 首先你得调整模型类,在 `file` 验证规则里增加一个 `maxFiles` 选项,用以限制一次上传文件的最大数量。 `upload()`方法也得修改,以便一个一个地保存上传的文件。将 `maxFiles` 设置为 `0` 意味着可以同时上传的文件数量没有限制。 允许同时上传的文件的最大数量也受到 PHP 指令 -[`max_file_uploads`](https://www.php.net/manual/en/ini.core.php#ini.max-file-uploads)的限制, +[`max_file_uploads`](https://www.php.net/manual/zh/ini.core.php#ini.max-file-uploads)的限制, 默认为20。还应该更新 `upload()` 方法以逐个保存上传的文件。 ```php diff --git a/docs/guide-zh-CN/output-client-scripts.md b/docs/guide-zh-CN/output-client-scripts.md index 7545a90cd6e..2af842fec5c 100644 --- a/docs/guide-zh-CN/output-client-scripts.md +++ b/docs/guide-zh-CN/output-client-scripts.md @@ -189,7 +189,7 @@ JS ``` 上面的示例代码使用 PHP -[Heredoc 语法](https://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc) 以获得更好的可读性。 +[Heredoc 语法](https://www.php.net/manual/zh/language.types.string.php#language.types.string.syntax.heredoc) 以获得更好的可读性。 这也可以在大多数 IDE 中实现更好的语法突出显示,因此它是编写内联 JavaScript 的首选方式,对于长于单行的代码尤其有用。变量 `$message` 是在 PHP 中创建的,感谢 [[yii\helpers\Json::htmlEncode|Json::htmlEncode]] 它包含有效 JS 语法中的字符串,可以将其插入到 JavaScript 代码中以放置 函数中的动态字符串调用 `alert()`。 diff --git a/docs/guide-zh-CN/output-formatting.md b/docs/guide-zh-CN/output-formatting.md index 725a511248d..de51c038c56 100644 --- a/docs/guide-zh-CN/output-formatting.md +++ b/docs/guide-zh-CN/output-formatting.md @@ -45,7 +45,7 @@ echo Yii::$app->formatter->format(0.125, ['percent', 2]); > 不要使用这个组件, > 而应该使用 [[yii\validators\DateValidator]] 和 [[yii\validators\NumberValidator]] 进行用户输入格式化 > 对于机器可读的日期和时间格式之间的简单转换, -> PHP 方法 [date()](https://www.php.net/manual/en/function.date.php) 就足够了。 +> PHP 方法 [date()](https://www.php.net/manual/zh/function.date.php) 就足够了。 ## 配置 Formatter(Configuring Formatter) @@ -75,7 +75,7 @@ return [ - [[yii\i18n\Formatter::asDate()|date]]:这个变量将被格式化为日期 `January 01, 2014`。 - [[yii\i18n\Formatter::asTime()|time]]:这个变量将被格式化为时间 `14:23`。 - [[yii\i18n\Formatter::asDatetime()|datetime]]:这个变量将被格式化为日期+时间 `January 01, 2014 14:23`。 -- [[yii\i18n\Formatter::asTimestamp()|timestamp]]:这个变量将被格式化为 UNIX 时间戳 [unix timestamp](https://en.wikipedia.org/wiki/Unix_time),例如 `1412609982`。 +- [[yii\i18n\Formatter::asTimestamp()|timestamp]]:这个变量将被格式化为 UNIX 时间戳 [unix timestamp](https://zh.wikipedia.org/wiki/UNIX%E6%97%B6%E9%97%B4),例如 `1412609982`。 - [[yii\i18n\Formatter::asRelativeTime()|relativeTime]]:这个变量将被格式化为人类可读的 当前相对时间 `1 hour ago`。 - [[yii\i18n\Formatter::asDuration()|duration]]:这个变量将被格式化为人类可读的时长 `1 day, 2 minutes`。 @@ -86,7 +86,7 @@ return [ [[yii\i18n\Formatter::timeFormat|timeFormat]], 和 [[yii\i18n\Formatter::datetimeFormat|datetimeFormat]] 即可。 同时,你还可以配置它使用 [ICU syntax](https://unicode-org.github.io/icu/userguide/format_parse/datetime/), -同时你也可以配置它使用 [PHP date() 语法](https://www.php.net/manual/en/function.date.php),只需要加上 `php:` 前缀即可。 +同时你也可以配置它使用 [PHP date() 语法](https://www.php.net/manual/zh/function.date.php),只需要加上 `php:` 前缀即可。 例如, ```php @@ -175,7 +175,7 @@ echo Yii::$app->formatter->asTime('2014-10-06 14:41:00 CEST'); // 14:41:00 如果你想要进行更高级的配置, 可以使用 [[yii\i18n\Formatter::numberFormatterOptions]] 和 [[yii\i18n\Formatter::numberFormatterTextOptions]], -[NumberFormatter class](https://www.php.net/manual/en/class.numberformatter.php) 来进行格式化。 +[NumberFormatter class](https://www.php.net/manual/zh/class.numberformatter.php) 来进行格式化。 例如,为了调整小数部分的最大值和最小值,你可以配置 [[yii\i18n\Formatter::numberFormatterOptions]] 如下: ```php @@ -235,7 +235,7 @@ echo Yii::$app->formatter->asDate('2014-01-01'); // output: 1 января 2014 默认配置下,当前 [[yii\i18n\Formatter::locale|locale]] 决定于 [[yii\base\Application::language]]. 你可以覆盖 [[yii\i18n\Formatter::locale]] 属性来满足不同的需要。 -> Note: Yii formatter 依赖 [PHP intl extension](https://www.php.net/manual/en/book.intl.php) +> Note: Yii formatter 依赖 [PHP intl extension](https://www.php.net/manual/zh/book.intl.php) > 来进行本地数据格式化 > 因为不同的 ICU 库可能会导致不同的输出,所以请在你的所有机器上保持 ICU 库的一致性。 > 请参阅 [Setting up your PHP environment for internationalization](tutorial-i18n.md#setup-environment)。 diff --git a/docs/guide-zh-CN/rest-authentication.md b/docs/guide-zh-CN/rest-authentication.md index 0df63c94606..d630b051380 100644 --- a/docs/guide-zh-CN/rest-authentication.md +++ b/docs/guide-zh-CN/rest-authentication.md @@ -10,7 +10,7 @@ 下面有几种方式来发送 access token: -* [HTTP 基本认证](https://en.wikipedia.org/wiki/Basic_access_authentication):access token +* [HTTP 基本认证](https://zh.wikipedia.org/wiki/HTTP%E5%9F%BA%E6%9C%AC%E8%AE%A4%E8%AF%81):access token 当作用户名发送,应用在 access token 可安全存在 API 使用端的场景, 例如,API 使用端是运行在一台服务器上的程序。 * 请求参数:access token 当作 API URL 请求参数发送,例如 diff --git a/docs/guide-zh-CN/rest-controllers.md b/docs/guide-zh-CN/rest-controllers.md index d202a3a90fc..850a3bb09bf 100644 --- a/docs/guide-zh-CN/rest-controllers.md +++ b/docs/guide-zh-CN/rest-controllers.md @@ -80,7 +80,7 @@ public function behaviors() 将 [Cross-Origin Resource Sharing](structure-filters.md#cors) 过滤器添加到控制器比添加到上述其他过滤器中要复杂一些, 因为必须在认证方法之前应用 CORS 过滤器, 因此与其他过滤器相比,需要一些稍微不同的方式来实现。 -并且还要为 [CORS Preflight requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#preflighted_requests) 禁用身份验证, +并且还要为 [CORS Preflight requests](https://developer.mozilla.org/zh-CN/docs/Web/HTTP/CORS#%E9%A2%84%E6%A3%80%E8%AF%B7%E6%B1%82) 禁用身份验证, 这样浏览器就可以安全地确定是否可以事先做出请求, 而无需发送身份验证凭据。 下面显示了将 [[yii\filters\Cors]] 过滤器添加到从 [[yii\rest\ActiveController]] 扩展的控制器所需的代码: diff --git a/docs/guide-zh-CN/rest-quick-start.md b/docs/guide-zh-CN/rest-quick-start.md index 339ea9bab81..da25e7a1ec6 100644 --- a/docs/guide-zh-CN/rest-quick-start.md +++ b/docs/guide-zh-CN/rest-quick-start.md @@ -9,7 +9,7 @@ Yii 提供了一整套用来简化实现 RESTful 风格的 Web Service 服务的 * 支持可选输出字段的定制对象序列化; * 适当的格式的数据采集和验证错误; * 集合分页,过滤和排序; -* 支持 [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS); +* 支持 [HATEOAS](https://zh.wikipedia.org/wiki/HATEOAS); * 有适当 HTTP 动词检查的高效的路由; * 内置 `OPTIONS` 和 `HEAD` 动词的支持; * 认证和授权; diff --git a/docs/guide-zh-CN/rest-resources.md b/docs/guide-zh-CN/rest-resources.md index cf5cacd50d1..c2111cab7c3 100644 --- a/docs/guide-zh-CN/rest-resources.md +++ b/docs/guide-zh-CN/rest-resources.md @@ -140,7 +140,7 @@ public function extraFields() ## 链接 -[HATEOAS](https://en.wikipedia.org/wiki/HATEOAS), +[HATEOAS](https://zh.wikipedia.org/wiki/HATEOAS), 是 Hypermedia as the Engine of Application State的缩写, 提升 RESTful API 应返回允许终端用户访问的资源操作的信息, HATEOAS 的目的是在API中返回包含相关链接信息的资源数据。 diff --git a/docs/guide-zh-CN/rest-response-formatting.md b/docs/guide-zh-CN/rest-response-formatting.md index 0c79b3c2dd8..93bc2218f67 100644 --- a/docs/guide-zh-CN/rest-response-formatting.md +++ b/docs/guide-zh-CN/rest-response-formatting.md @@ -5,7 +5,7 @@ 来处理响应格式: 1. 确定可能影响响应格式的各种因素,例如媒介类型,语言,版本,等等。 - 这个过程也被称为 [content negotiation](https://en.wikipedia.org/wiki/Content_negotiation)。 + 这个过程也被称为 [content negotiation](https://zh.wikipedia.org/wiki/%E5%86%85%E5%AE%B9%E5%8D%8F%E5%95%86)。 2. 资源对象转换为数组,如在 [Resources](rest-resources.md) 部分中所描述的。 通过 [[yii\rest\Serializer]] 来完成。 3. 通过内容协商步骤将数组转换成字符串。 diff --git a/docs/guide-zh-CN/security-authorization.md b/docs/guide-zh-CN/security-authorization.md index f86b2d58755..4a37e562670 100644 --- a/docs/guide-zh-CN/security-authorization.md +++ b/docs/guide-zh-CN/security-authorization.md @@ -157,7 +157,7 @@ class SiteController extends Controller 基于角色的存取控制 (RBAC) 提供了一个简单而强大的集中式存取控制机制。 详细的关于 RBAC 和诸多传统的存取控制方案对比的详情,请参阅 -[Wikipedia](https://en.wikipedia.org/wiki/Role-based_access_control)。 +[Wikipedia](https://zh.wikipedia.org/wiki/%E4%BB%A5%E8%A7%92%E8%89%B2%E7%82%BA%E5%9F%BA%E7%A4%8E%E7%9A%84%E5%AD%98%E5%8F%96%E6%8E%A7%E5%88%B6)。 Yii 实现了通用的分层的 RBAC,遵循的模型是 [NIST RBAC model](https://csrc.nist.gov/CSRC/media/Publications/conference-paper/1992/10/13/role-based-access-controls/documents/ferraiolo-kuhn-92.pdf). 它通过 [[yii\rbac\ManagerInterface|authManager]] [application component](structure-application-components.md) 提供 RBAC 功能。 diff --git a/docs/guide-zh-CN/security-best-practices.md b/docs/guide-zh-CN/security-best-practices.md index 365d351216e..89ef2118274 100644 --- a/docs/guide-zh-CN/security-best-practices.md +++ b/docs/guide-zh-CN/security-best-practices.md @@ -179,7 +179,7 @@ CSRF 是跨站请求伪造的缩写。这个攻击思想源自许多应用程序 为了避免 CSRF 攻击,你总是需要: 1. 遵循 HTTP 准则,比如 GET 不应该改变应用的状态。 - 有关详细信息,请参阅 [RFC2616](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)。 + 有关详细信息,请参阅 [RFC2616](https://www.rfc-editor.org/rfc/rfc9110.html#name-method-definitions)。 2. 保证 Yii CSRF 保护开启。 有的时候你需要对每个控制器和/或方法使用禁用 CSRF。可以通过设置其属性来实现: diff --git a/docs/guide-zh-CN/security-passwords.md b/docs/guide-zh-CN/security-passwords.md index d13e024da4e..03d7a0ae786 100644 --- a/docs/guide-zh-CN/security-passwords.md +++ b/docs/guide-zh-CN/security-passwords.md @@ -7,7 +7,7 @@ 为了即使在最糟糕的情况下(你的应用程序被破解了)也能给用户密码提供增强的安全性, 你需要使用一个能够对抗暴力破解攻击的哈希算法。目前最好的选择是 `bcrypt`。在 PHP 中, -你可以通过 [crypt 函数](https://www.php.net/manual/en/function.crypt.php) 生成 `bcrypt` 哈希。 +你可以通过 [crypt 函数](https://www.php.net/manual/zh/function.crypt.php) 生成 `bcrypt` 哈希。 Yii 提供了两个帮助函数以让使用 `crypt` 来进行安全的哈希密码生成和验证更加容易。 当一个用户为第一次使用,提供了一个密码时(比如:注册时),密码就需要被哈希化。 diff --git a/docs/guide-zh-CN/tutorial-core-validators.md b/docs/guide-zh-CN/tutorial-core-validators.md index 91e684c32bf..7c16a341a66 100644 --- a/docs/guide-zh-CN/tutorial-core-validators.md +++ b/docs/guide-zh-CN/tutorial-core-validators.md @@ -141,7 +141,7 @@ public function rules() - `format`:被验证值的日期/时间格式。 这里的值可以是 [ICU manual](https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax) 中定义的日期时间格式。 另外还可以设置以 `php:` 开头的字符串,用来表示PHP可以识别的日期时间格式。 - `Datetime` 日期时间类。请参考 获取更多支持的格式。 + `Datetime` 日期时间类。请参考 获取更多支持的格式。 如果没有设置,默认值将使用 `Yii::$app->formatter->dateFormat` 中的值。 请参考 [[yii\validators\DateValidator::$format|API 文档]] 以获取更详细的说明。 @@ -389,8 +389,8 @@ function foo($model, $attribute) { > Tip: 如果你只是想要用 trim 处理下输入值,你可以直接用 [trim](#trim) 验证器的。 > Tip: 有许多的PHP方法结构和 `filter` 需要的结构一致。 -> 比如使用类型转换方法 ([intval](https://www.php.net/manual/en/function.intval.php), -> [boolval](https://www.php.net/manual/en/function.boolval.php), ...) 来确保属性为指定的类型, +> 比如使用类型转换方法 ([intval](https://www.php.net/manual/zh/function.intval.php), +> [boolval](https://www.php.net/manual/zh/function.boolval.php), ...) 来确保属性为指定的类型, > 你可以简单的设置这些方法名而不是重新定义一个匿名函数: > > ```php diff --git a/docs/guide-zh-CN/tutorial-i18n.md b/docs/guide-zh-CN/tutorial-i18n.md index e5f6d179a64..6775748f84b 100644 --- a/docs/guide-zh-CN/tutorial-i18n.md +++ b/docs/guide-zh-CN/tutorial-i18n.md @@ -231,7 +231,7 @@ $price = 100; echo \Yii::t('app', 'Price: {0, number, currency}', $price); ``` -> Note: 参数的格式化需要安装 [intl PHP 扩展](https://www.php.net/manual/en/intro.intl.php)。 +> Note: 参数的格式化需要安装 [intl PHP 扩展](https://www.php.net/manual/zh/intro.intl.php)。 可以使用缩写的形式或完整的形式来格式化占位符: @@ -738,12 +738,12 @@ class TranslationEventHandler ## 设置 PHP 环境(Setting Up PHP Environment) -Yii 使用 [PHP intl 扩展](https://www.php.net/manual/en/book.intl.php) 来提供大多数 I18N 的功能, +Yii 使用 [PHP intl 扩展](https://www.php.net/manual/zh/book.intl.php) 来提供大多数 I18N 的功能, 如日期和数字格式的 [[yii\i18n\Formatter]] 类和消息格式的 [[yii\i18n\MessageFormatter]] 类。 当 `intl` 扩展没有安装时,两者会提供一个回调机制。然而,该回调机制只适用于目标语言是英语的情况下。 因此,当 I18N 对你来说必不可少时,强烈建议你安装 `intl`。 -[PHP intl 扩展](https://www.php.net/manual/en/book.intl.php) 是基于对于所有不同的语言环境 +[PHP intl 扩展](https://www.php.net/manual/zh/book.intl.php) 是基于对于所有不同的语言环境 提供格式化规则的 [ICU库](https://icu.unicode.org/)。 不同版本的 ICU 中可能会产生不同日期和数值格式的结果。 为了确保你的网站在所有环境产生相同的结果, diff --git a/docs/guide-zh-CN/tutorial-performance-tuning.md b/docs/guide-zh-CN/tutorial-performance-tuning.md index 559270dd7a3..598a5caa211 100644 --- a/docs/guide-zh-CN/tutorial-performance-tuning.md +++ b/docs/guide-zh-CN/tutorial-performance-tuning.md @@ -11,8 +11,8 @@ 一个好的 PHP 环境是非常重要的。为了得到最大的性能, - 使用最新稳定版本的 PHP。 PHP 的主要版本可能带来显著的性能提升。 -- 启用字节码缓存 [Opcache](https://www.php.net/opcache)(PHP 5.5或更高版本) - 或 [APC](https://www.php.net/manual/en/book.apcu.php) +- 启用字节码缓存 [Opcache](https://www.php.net/manual/zh/book.opcache.php)(PHP 5.5或更高版本) + 或 [APC](https://www.php.net/manual/zh/book.apcu.php) (PHP 5.4或更早版本)。字节码缓存省去了每次解析和加载 PHP 脚本所带来的开销。 - [Tune `realpath()` cache](https://github.com/samdark/realpath_cache_tuner). @@ -217,7 +217,7 @@ composer dumpautoload -o - [Yii debug toolbar and debugger](https://github.com/yiisoft/yii2-debug/blob/master/docs/guide/README.md) - [Blackfire](https://blackfire.io/) -- [XHProf](https://www.php.net/manual/en/book.xhprof.php) +- [XHProf](https://www.php.net/manual/zh/book.xhprof.php) - [XDebug profiler](https://xdebug.org/docs/profiler) ## 准备扩展应用程序 diff --git a/docs/guide/caching-data.md b/docs/guide/caching-data.md index f17b4a07c8c..1c712e801d0 100644 --- a/docs/guide/caching-data.md +++ b/docs/guide/caching-data.md @@ -82,6 +82,8 @@ and accessible. The following code shows how to configure the `cache` applicatio You can then access the above cache component using the expression `Yii::$app->cache`. +If no cache component is specified, then Yii will use [yii\caching\FileCache](https://www.yiiframework.com/doc/api/2.0/yii-caching-filecache) as default. + Because all cache components support the same set of APIs, you can swap the underlying cache component with a different one by reconfiguring it in the application configuration without modifying the code that uses the cache. For example, you can modify the above configuration to use [[yii\caching\ApcCache|APC cache]]: diff --git a/docs/guide/concept-di-container.md b/docs/guide/concept-di-container.md index 4f13b38cd74..4a87a9c3d44 100644 --- a/docs/guide/concept-di-container.md +++ b/docs/guide/concept-di-container.md @@ -42,7 +42,7 @@ $foo = new Foo($bar); ### Method Injection -Usually the dependencies of a class are passed to the constructor and are available inside of the class during the whole lifecycle. +Usually the dependencies of a class are passed to the constructor and are available inside the class during the whole lifecycle. With Method Injection it is possible to provide a dependency that is only needed by a single method of the class and passing it to the constructor may not be possible or may cause too much overhead in the majority of use cases. diff --git a/docs/guide/concept-properties.md b/docs/guide/concept-properties.md index 01c2d44b3b8..927b43c6e37 100644 --- a/docs/guide/concept-properties.md +++ b/docs/guide/concept-properties.md @@ -80,7 +80,7 @@ There are several special rules for, and limitations on, the properties defined * A normal call to `property_exists()` does not work to determine magic properties. You should call [[yii\base\BaseObject::canGetProperty()|canGetProperty()]] or [[yii\base\BaseObject::canSetProperty()|canSetProperty()]] respectively. -Returning back to the problem described at the beginning of this guide, instead of calling `trim()` everywhere a `label` value is assigned, +Returning to the problem described at the beginning of this guide, instead of calling `trim()` everywhere a `label` value is assigned, `trim()` now only needs to be invoked within the setter `setLabel()`. And if a new requirement makes it necessary that the label be initially capitalized, the `setLabel()` method can quickly be modified without touching any other code. The one change will universally affect every assignment to `label`. diff --git a/docs/guide/db-active-record.md b/docs/guide/db-active-record.md index e87727469bb..e77317214e5 100644 --- a/docs/guide/db-active-record.md +++ b/docs/guide/db-active-record.md @@ -650,6 +650,17 @@ life cycle will happen: > - [[yii\db\ActiveRecord::updateCounters()]] > - [[yii\db\ActiveRecord::updateAllCounters()]] +> Note: DI is not supported by default due to performance concerns. You can add support if needed by overriding +> the [[yii\db\ActiveRecord::instantiate()|instantiate()]] method to instantiate the class via [[Yii::createObject()]]: +> +> ```php +> public static function instantiate($row) +> { +> return Yii::createObject(static::class); +> } +> ``` + + ### Refreshing Data Life Cycle When calling [[yii\db\ActiveRecord::refresh()|refresh()]] to refresh an Active Record instance, the diff --git a/docs/guide/db-dao.md b/docs/guide/db-dao.md index 7e47102c55e..9ecf8d799d0 100644 --- a/docs/guide/db-dao.md +++ b/docs/guide/db-dao.md @@ -682,5 +682,5 @@ $table = Yii::$app->db->getTableSchema('post'); ``` The method returns a [[yii\db\TableSchema]] object which contains the information about the table's columns, -primary keys, foreign keys, etc. All these information are mainly utilized by [query builder](db-query-builder.md) +primary keys, foreign keys, etc. All this information is mainly utilized by [query builder](db-query-builder.md) and [active record](db-active-record.md) to help you write database-agnostic code. diff --git a/docs/guide/db-migrations.md b/docs/guide/db-migrations.md index 44f87aa7893..866d28e9c1f 100644 --- a/docs/guide/db-migrations.md +++ b/docs/guide/db-migrations.md @@ -40,9 +40,9 @@ command `yii help migrate`. > Note: When manipulating data using a migration you may find that using your [Active Record](db-active-record.md) classes > for this might be useful because some of the logic is already implemented there. Keep in mind however, that in contrast -> to code written in the migrations, who's nature is to stay constant forever, application logic is subject to change. +> to code written in the migrations, whose nature is to stay constant forever, application logic is subject to change. > So when using Active Record in migration code, changes to the logic in the Active Record layer may accidentally break -> existing migrations. For this reason migration code should be kept independent from other application logic such +> existing migrations. For this reason migration code should be kept independent of other application logic such > as Active Record classes. diff --git a/docs/guide/db-query-builder.md b/docs/guide/db-query-builder.md index c915c416b89..ed7bf4b82dc 100644 --- a/docs/guide/db-query-builder.md +++ b/docs/guide/db-query-builder.md @@ -926,7 +926,7 @@ class AllGreaterCondition implements \yii\db\conditions\ConditionInterface So we can create a condition object: ```php -$conditon = new AllGreaterCondition(['col1', 'col2'], 42); +$condition = new AllGreaterCondition(['col1', 'col2'], 42); ``` But `QueryBuilder` still does not know, to make an SQL condition out of this object. diff --git a/docs/guide/input-tabular-input.md b/docs/guide/input-tabular-input.md index 44c9ffea1d5..f5aa95b57af 100644 --- a/docs/guide/input-tabular-input.md +++ b/docs/guide/input-tabular-input.md @@ -1,4 +1,4 @@ -Collecting tabular input +Collecting Tabular Input ======================== Sometimes you need to handle multiple models of the same kind in a single form. For example, multiple settings, where diff --git a/docs/guide/intro-upgrade-from-v1.md b/docs/guide/intro-upgrade-from-v1.md index aecfd9f8526..3f30ddb33cb 100644 --- a/docs/guide/intro-upgrade-from-v1.md +++ b/docs/guide/intro-upgrade-from-v1.md @@ -265,7 +265,7 @@ Themes work completely differently in 2.0. They are now based on a path mapping view file path to a themed view file path. For example, if the path map for a theme is `['/web/views' => '/web/themes/basic']`, then the themed version for the view file `/web/views/site/index.php` will be `/web/themes/basic/site/index.php`. For this reason, themes can now -be applied to any view file, even a view rendered outside of the context of a controller or a widget. +be applied to any view file, even a view rendered outside the context of a controller or a widget. Also, there is no more `CThemeManager` component. Instead, `theme` is a configurable property of the `view` application component. diff --git a/docs/guide/output-client-scripts.md b/docs/guide/output-client-scripts.md index 8d12a5ad1fb..104b83235b9 100644 --- a/docs/guide/output-client-scripts.md +++ b/docs/guide/output-client-scripts.md @@ -41,7 +41,7 @@ determines at which position the script should be inserted into the page. Possib [document `load` event](https://learn.jquery.com/using-jquery-core/document-ready/). Same as the above, this will also register [[yii\web\JqueryAsset|jQuery]] automatically. The last argument is a unique script ID that is used to identify the script code block and replace an existing one with the same ID -instead of adding a new one. If you don't provide it, the JS code itself will be used as the ID. It is used to avoid registration of the same code muliple times. +instead of adding a new one. If you don't provide it, the JS code itself will be used as the ID. It is used to avoid registration of the same code multiple times. ### Registering script files diff --git a/docs/guide/output-sorting.md b/docs/guide/output-sorting.md index a53c76a1e07..c90b7cba28c 100644 --- a/docs/guide/output-sorting.md +++ b/docs/guide/output-sorting.md @@ -65,7 +65,7 @@ using the following array structure: Note that it will not be HTML-encoded. > Info: You can directly feed the value of [[yii\data\Sort::$orders|orders]] to the database query to build - its `ORDER BY` clause. Do not use [[yii\data\Sort::$attributeOrders|attributeOrders]] because some of the + its `ORDER BY` clause. Do not use [[yii\data\Sort::$attributeOrders|attributeOrders]] because some attributes may be composite and cannot be recognized by the database query. You can call [[yii\data\Sort::link()]] to generate a hyperlink upon which end users can click to request sorting diff --git a/docs/guide/rest-authentication.md b/docs/guide/rest-authentication.md index 87487b52e70..2b7c964a48e 100644 --- a/docs/guide/rest-authentication.md +++ b/docs/guide/rest-authentication.md @@ -27,7 +27,7 @@ To enable authentication for your APIs, do the following steps: 1. Configure the `user` [application component](structure-application-components.md): - Set the [[yii\web\User::enableSession|enableSession]] property to be `false`. - - Set the [[yii\web\User::loginUrl|loginUrl]] property to be `null` to show a HTTP 403 error instead of redirecting to the login page. + - Set the [[yii\web\User::loginUrl|loginUrl]] property to be `null` to show an HTTP 403 error instead of redirecting to the login page. 2. Specify which authentication methods you plan to use by configuring the `authenticator` behavior in your REST controller classes. 3. Implement [[yii\web\IdentityInterface::findIdentityByAccessToken()]] in your [[yii\web\User::identityClass|user identity class]]. diff --git a/docs/guide/runtime-sessions-cookies.md b/docs/guide/runtime-sessions-cookies.md index 4d7c2678fe5..e9743286142 100644 --- a/docs/guide/runtime-sessions-cookies.md +++ b/docs/guide/runtime-sessions-cookies.md @@ -390,11 +390,13 @@ If the browser supports the `sameSite` setting it will only include the cookie a You may read the [SameSite wiki article](https://owasp.org/www-community/SameSite) for more details. For better security, an exception will be thrown if `sameSite` is used with an unsupported version of PHP. To use this feature across different PHP versions check the version first. E.g. + ```php [ 'sameSite' => PHP_VERSION_ID >= 70300 ? yii\web\Cookie::SAME_SITE_LAX : null, ] ``` + > Note: Since not all browsers support the `sameSite` setting yet, it is still strongly recommended to also include [additional CSRF protection](security-best-practices.md#avoiding-csrf). diff --git a/docs/guide/security-best-practices.md b/docs/guide/security-best-practices.md index 81578ca915f..291575c846f 100644 --- a/docs/guide/security-best-practices.md +++ b/docs/guide/security-best-practices.md @@ -71,7 +71,7 @@ SELECT * FROM user WHERE username = ''; DROP TABLE user; --' This is valid query that will search for users with empty username and then will drop `user` table most probably resulting in broken website and data loss (you've set up regular backups, right?). -In Yii most of database querying happens via [Active Record](db-active-record.md) which properly uses PDO prepared +In Yii most database querying happens via [Active Record](db-active-record.md) which properly uses PDO prepared statements internally. In case of prepared statements it's not possible to manipulate query as was demonstrated above. Still, sometimes you need [raw queries](db-dao.md) or [query builder](db-query-builder.md). In this case you should use @@ -179,7 +179,7 @@ For this reason, Yii applies additional mechanisms to protect against CSRF attac In order to avoid CSRF you should always: 1. Follow HTTP specification i.e. GET should not change application state. - See [RFC2616](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html) for more details. + See [RFC2616](https://www.rfc-editor.org/rfc/rfc9110.html#name-method-definitions) for more details. 2. Keep Yii CSRF protection enabled. Sometimes you need to disable CSRF validation per controller and/or action. It could be achieved by setting its property: @@ -263,6 +263,12 @@ Further reading on the topic: - +Avoiding arbitrary object instantiations +---------------------------------------- + +Yii [configurations](concept-configurations.md) are associative arrays used by the framework to instantiate new objects through `Yii::createObject($config)`. These arrays specify the class name for instantiation, and it is important to ensure that this class name does not originate from untrusted sources. Otherwise, it can lead to Unsafe Reflection, a vulnerability that allows the execution of malicious code by exploiting the loading of specific classes. Additionally, when you need to dynamically add keys to an object derived from a framework class, such as the base `Component` class, it's essential to validate these dynamic properties using a whitelist approach. This precaution is necessary because the framework might employ `Yii::createObject($config)` within the `__set()` magic method. + + Avoiding file exposure ---------------------- diff --git a/docs/guide/start-databases.md b/docs/guide/start-databases.md index 3dc6bd2e14b..ebcfbb70984 100644 --- a/docs/guide/start-databases.md +++ b/docs/guide/start-databases.md @@ -106,7 +106,7 @@ class Country extends ActiveRecord } ``` -The `Country` class extends from [[yii\db\ActiveRecord]]. You do not need to write any code inside of it! With just the above code, +The `Country` class extends from [[yii\db\ActiveRecord]]. You do not need to write any code inside it! With just the above code, Yii will guess the associated table name from the class name. > Info: If no direct match can be made from the class name to the table name, you can diff --git a/docs/guide/start-prerequisites.md b/docs/guide/start-prerequisites.md index 4043b57e396..e6621f7ba10 100644 --- a/docs/guide/start-prerequisites.md +++ b/docs/guide/start-prerequisites.md @@ -5,11 +5,11 @@ The Yii learning curve is not as steep as other PHP frameworks but still there a ## PHP Yii is a PHP framework so make sure you [read and understand language reference](https://www.php.net/manual/en/langref.php). -When developing with Yii you will be writing code in an object oriented fashion, so make sure you are familiar with [Classes and Objects](https://www.php.net/manual/en/language.oop5.basic.php) as well as [namespaces](https://www.php.net/manual/en/language.namespaces.php). +When developing with Yii you will be writing code in an object-oriented fashion, so make sure you are familiar with [Classes and Objects](https://www.php.net/manual/en/language.oop5.basic.php) as well as [namespaces](https://www.php.net/manual/en/language.namespaces.php). ## Object oriented programming -Basic understanding of object oriented programming is required. If you're not familiar with it, check one of the many +Basic understanding of object-oriented programming is required. If you're not familiar with it, check one of the many tutorials available such as [the one from tuts+](https://code.tutsplus.com/tutorials/object-oriented-php-for-beginners--net-12762). Note that the more complicated your application is the more advanced OOP concepts you should learn in order to successfully diff --git a/docs/guide/structure-applications.md b/docs/guide/structure-applications.md index 1f0eaf457d8..97bc69dfea4 100644 --- a/docs/guide/structure-applications.md +++ b/docs/guide/structure-applications.md @@ -31,7 +31,7 @@ $config = require __DIR__ . '/../config/web.php'; Like normal [configurations](concept-configurations.md), application configurations specify how to initialize properties of application objects. Because application configurations are often -very complex, they usually are kept in [configuration files](concept-configurations.md#configuration-files), +very complex, they are usually kept in [configuration files](concept-configurations.md#configuration-files), like the `web.php` file in the above example. diff --git a/docs/guide/structure-models.md b/docs/guide/structure-models.md index 928df70ab62..db8c1361f71 100644 --- a/docs/guide/structure-models.md +++ b/docs/guide/structure-models.md @@ -293,6 +293,8 @@ public function rules() // username and password are required in "login" scenario [['username', 'password'], 'required', 'on' => self::SCENARIO_LOGIN], + + [['username'], 'string'], // username must always be a string, this rule applies to all scenarios ]; } ``` diff --git a/docs/guide/tutorial-core-validators.md b/docs/guide/tutorial-core-validators.md index 2f67b087d69..7a80507717c 100644 --- a/docs/guide/tutorial-core-validators.md +++ b/docs/guide/tutorial-core-validators.md @@ -289,7 +289,7 @@ This validator checks if the input value is a valid email address. // equivalent of ['a1', 'exist', 'targetAttribute' => ['a2' => 'a2']], - // a1 and a2 need to exist together, and they both will receive error message + // a1 and a2 need to exist together, and the first attribute without errors will receive error message // i.e. a1 = 3, a2 = 4, valid if there is value 3 in column "a1" and value 4 in column "a2" [['a1', 'a2'], 'exist', 'targetAttribute' => ['a1', 'a2']], // equivalent of @@ -327,7 +327,9 @@ an [Active Record](db-active-record.md) attribute. You can use `targetAttribute` class. If you do not specify them, they will take the values of the attribute and the model class being validated. You can use this validator to validate against a single column or multiple columns (i.e., the combination of -multiple attribute values should exist). +multiple attribute values should exist). In case of validation fail on the multiple columns checked at the same time +(like `['a1', 'a2']` in the examples) and `skipOnError` set to `true`, only the first attribute without any previous +errors will receive a new error message. - `targetClass`: the name of the [Active Record](db-active-record.md) class that should be used to look for the input value being validated. If not set, the class of the model currently being validated will be used. @@ -685,7 +687,7 @@ the input value. Note that if the input value is an array, it will be ignored by // equivalent of ['a1', 'unique', 'targetAttribute' => ['a1' => 'a2']], - // a1 and a2 need to be unique together, and they both will receive error message + // a1 and a2 need to be unique together, and the first attribute without errors will receive error message // i.e. a1 = 3, a2 = 4, valid if there is no value 3 in column "a1" and at the same time no value 4 in column "a2" [['a1', 'a2'], 'unique', 'targetAttribute' => ['a1', 'a2']], // equivalent of @@ -704,9 +706,10 @@ the input value. Note that if the input value is an array, it will be ignored by ] ``` -This validator checks if the input value is unique in a table column. It only works -with [Active Record](db-active-record.md) model attributes. It supports validation against -either a single column or multiple columns. +This validator checks if the input value is unique in a table column. It only works with [Active Record](db-active-record.md) +model attributes. It supports validation against either a single column or multiple columns. In case of validation fail +on the multiple columns checked at the same time (like `['a1', 'a2']` in the examples) and `skipOnError` set to `true`, +only the first attribute without any previous errors will receive a new error message. - `targetClass`: the name of the [Active Record](db-active-record.md) class that should be used to look for the input value being validated. If not set, the class of the model currently being validated will be used. diff --git a/docs/guide/tutorial-performance-tuning.md b/docs/guide/tutorial-performance-tuning.md index be2b86f474a..2f6fa1bb8dd 100644 --- a/docs/guide/tutorial-performance-tuning.md +++ b/docs/guide/tutorial-performance-tuning.md @@ -11,7 +11,7 @@ factors and explain how you can improve your application performance by adjustin A well configured PHP environment is very important. In order to get maximum performance, - Use the latest stable PHP version. Major releases of PHP may bring significant performance improvements. -- Enable bytecode caching with [Opcache](https://www.php.net/opcache) (PHP 5.5 or later) or [APC](https://www.php.net/manual/en/book.apcu.php) +- Enable bytecode caching with [Opcache](https://www.php.net/manual/en/book.opcache.php) (PHP 5.5 or later) or [APC](https://www.php.net/manual/en/book.apcu.php) (PHP 5.4). Bytecode caching avoids the time spent in parsing and including PHP scripts for every incoming request. - [Tune `realpath()` cache](https://github.com/samdark/realpath_cache_tuner). diff --git a/docs/guide/tutorial-template-engines.md b/docs/guide/tutorial-template-engines.md index c6017fb7fe1..757f738dbf6 100644 --- a/docs/guide/tutorial-template-engines.md +++ b/docs/guide/tutorial-template-engines.md @@ -34,7 +34,7 @@ component's behavior: ] ``` -In the code above, both Smarty and Twig are configured to be useable by the view files. But in order to get these extensions into your project, you need to also modify +In the code above, both Smarty and Twig are configured to be usable by the view files. But in order to get these extensions into your project, you need to also modify your `composer.json` file to include them, too: ``` diff --git a/docs/internals-fa/core-code-style.md b/docs/internals-fa/core-code-style.md index e63e2b77951..3becc5802b1 100644 --- a/docs/internals-fa/core-code-style.md +++ b/docs/internals-fa/core-code-style.md @@ -1,49 +1,52 @@ رعایت اصول و سبک کدنویسی فریمورک Yii2 =============================== -

-سبک کدنویسی که در نسخه 2 فریمورک و extension های رسمی استفاده میشه دارای اصول، قواعد و قانون های خودش هست. پس اگر تصمیم دارید چیزی به هسته اضافه کنید باید این قواعد رو در نظر بگیرید حتی در غیر این صورت هم رعایت این موارد خالی از لطف نیست و توصیه میکنم این کارُ انجام بدین. در حالی که میتونید راحت باشید، شما مجبور به رعایت این سبک در application خودتون نیستید... +

+سبک کدنویسی که در نسخه 2 فریمورک و extension های رسمی استفاده میشه دارای اصول، قواعد و قانون های خودش هست. پس اگر تصمیم دارید چیزی به هسته اضافه کنید باید این قواعد رو در نظر بگیرید حتی در غیر این صورت هم رعایت این موارد خالی از لطف نیست و توصیه می‌کنم این کارو انجام بدین. + +البته که نیاز نیست حتما این موارد رو در برنامه‌های خودتون رعایت کنید و می تونید در این مورد راحت باشید...

-

-میتونید برای دریافت پیکره بندی CodeSniffer اینجا رو مطالعه کنید: https://github.com/yiisoft/yii2-coding-standards +

+می‌تونید برای دریافت پیکربندی CodeSniffer اینجا رو مطالعه کنید: https://github.com/yiisoft/yii2-coding-standards

## 1. نگاه کلی -

-به طور کلی ما از سبک PSR-2 استفاده میکنیم و هر چیزی که در این سبک وجود داره اینجا هم هست. -(https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)

- -

در فایل ها باید از برچسب های php?> و =?> استفاده شود.

-

در پایان هر فایل باید یک خط جدید(newline) داشته باشید.

-

encoding فایل برای کد های php باید UTF-8 without BOM باشد.

-

به جای tab از 4 فضای خالی(space) استفاده کنید.

-

نام کلاس ها باید به صورت StudlyCaps تعریف شوند.

-

ثابت های داخل کلاس تماما باید با حروف بزرگ و گاهی با جداکننده "_" تعریف شوند.

-

نام متد ها و پراپرتی ها باید به صورت camelCase تعریف شوند.

-

پراپرتی های خصوصی(private) باید با "_" شروع شوند.

-

همیشه از elseif جای else if استفاده کنید.

- -## 2. فایل ها - -

در فایل ها باید از برچسب های php?> و =?> استفاده کرد نه از ?> .

-

در انتهای فایل های php نباید از تگ -

در انتهای هر خط نباید space وجود داشته باشد

-

پسوند فایل هایی که شامل کد php هستند باید php. باشد.

-

encoding فایل برای کد های php باید UTF-8 without BOM باشد.

- - -## 3. نام کلاس ها -

-نام کلاس ها باید به صورت StudlyCaps تعریف شوند. به عنوان مثال, `Controller`, `Model`.

- -## 4. کلاس ها - -

نام کلاس ها باید به صورت CamelCase تعریف شوند.

-

آکولاد باز باید در خط بعدی، زیر نام کلاس نوشته شود.

-

تمام کلاس ها باید بلاک مستندات مطابق استاندارد PHPDoc داشته باشند.

-

برای تمام کد های داخل کلاس باید با 4 space فاصله ایجاد کنید.

-

فقط یک کلاس داخل هر فایل php باید موجود باشد.

-

تمام کلاس ها باید namespaced داشته باشند.

-

نام کلاس باید معال نام فایل و namespace باید مطابق مسیر آن باشد.

+

+به طور کلی ما از سبک کدنویسی PSR-2 پیروی می‌کنیم: + +https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md

+ +

در فایل‌ها باید از برچسب‌های php?> و =?> استفاده شود.

+

در پایان هر فایل باید یک خط جدید (newline) داشته باشید.

+

encoding فایل برای کدهای php باید UTF-8 without BOM باشد.

+

به جای tab از 4 فضای خالی (space) استفاده کنید.

+

نام کلاس‌ها باید به صورت StudlyCaps تعریف شوند.

+

ثابت‌های داخل کلاس تماما باید با حروف بزرگ و گاهی با جداکننده "_" تعریف شوند.

+

نام متدها و پراپرتی‌ها باید به صورت camelCase تعریف شوند.

+

پراپرتی‌های خصوصی (private) باید با "_" شروع شوند.

+

همیشه از elseif جای else if استفاده کنید.

+ +## 2. فایل‌ها + +

در فایل‌ها باید از برچسب های php?> و =?> استفاده کرد نه از ?> .

+

در انتهای فایل‌های php نباید از تگ ?> استفاده کنید.

+

در انتهای هر خط نباید space وجود داشته باشد.

+

پسوند فایل‌هایی که شامل کد php هستند باید php. باشد.

+

encoding فایل برای کدهای php باید UTF-8 without BOM باشد.

+ + +## 3. نام کلاس‌ها +

+نام کلاس‌ها باید به صورت StudlyCaps تعریف شوند. به عنوان مثال، `Controller` و `Model`.

+ +## 4. کلاس‌ها + +

نام کلاس‌ها باید به صورت CamelCase تعریف شوند.

+

آکولاد باز باید در خط بعدی، زیر نام کلاس نوشته شود.

+

تمام کلاس‌ها باید بلاک مستندات مطابق استاندارد PHPDoc داشته باشند.

+

برای تمام کدهای داخل کلاس باید با 4 space فاصله ایجاد کنید.

+

فقط یک کلاس داخل هر فایل php باید موجود باشد.

+

تمام کلاس‌ها باید namespaced داشته باشند.

+

نام کلاس باید معادل نام فایل و namespace باید مطابق مسیر آن باشد.

```php /** @@ -55,9 +58,9 @@ class MyClass extends \yii\base\BaseObject implements MyInterface } ``` -### 4.1. ثابت ها -

-ثابت های داخل کلاس تماما باید با حروف بزرگ و گاهی با جداکننده "_" تعریف شوند.

+### 4.1. ثابت‌ها +

+ثابت‌های داخل کلاس تماما باید با حروف بزرگ و گاهی با جداکننده "_" تعریف شوند.

```php از کلید واژه های public، protected و private استفاده کنید.

-

پراپرتی های public و protected باید در بالای کلاس و قبل از متد ها تعریف شوند. private هم همینطور اما ممکن هست کاهی قبل از متدی که با آن مرتبط هست آورده شود.

-

ترتیب تعریف پراپرتی ها باید به صورت اول public، دوم protected و سپس private باشد! هیچ قانون سختی برای رعایت این مورد نیست...

-

برای خوانایی بهتر میتونید از خط خالی بین گروه های public، protected و private استفاده کنید. -

متغییر های private باید مثل varName_$ باشند.

-

اعضای عمومی داخل کلاس باید به صورت camelCase تعریف شوند.(حرف اول کوچک، با CamelCase فرق میکنه).

-

بهتره از نام هایی مثل i$ و j$ استفاده نکنید.

+

از کلید واژه های public ،protected و private استفاده کنید.

+

پراپرتی‌های public و protected باید در بالای کلاس و قبل از متدها تعریف شوند. private هم همینطور اما ممکن هست گاهی قبل از متدی که با آن مرتبط هست آورده شود.

+

ترتیب تعریف پراپرتی‌ها باید به صورت اول public، دوم protected و سپس private باشد! کار بسیار ساده‌ایست :)

+

برای خوانایی بهتر می‌تونید از خط خالی بین گروه‌های public، protected و private استفاده کنید. +

متغیر های private باید مثل varName_$ باشند.

+

اعضای عمومی داخل کلاس باید به صورت camelCase تعریف شوند. (حرف اول کوچک، با CamelCase فرق میکنه)

+

بهتره از نام‌هایی مثل i$ و j$ استفاده نکنید.

```php توابع و متد ها باید camelCase باشند.

-

نام باید هدف رو نشون بده.

-

از کلید واژه های public، protected و private استفاده کنید.

-

آکولاد باز باید در خط بعدی یعنی زیر نام متد قرار بگیره.

+

توابع و متدها باید camelCase باشند.

+

نام باید هدف رو نشون بده.

+

از کلید واژه های public، protected و private استفاده کنید.

+

آکولاد باز باید در خط بعدی یعنی زیر نام متد قرار بگیره.

```php /** @@ -120,14 +123,14 @@ class Foo } ``` -### 4.4 بلوک های PHPDoc +### 4.4 بلوک‌های PHPDoc -

برای متد ها باید مستندات بنویسید(PHPDoc).

-

در PHPDoc نوع param@, var@, property@ و return@ باید مشخص شود(bool, int, string, array یا null).

-

برای تایپ آرایه در PHPDoc از []ClassName استفاده کنید.

-

خط اول PHPDoc باید هدف یک متد رو شرح بده.

-

اگر متد ها چیزی رو بررسی میکنن مثل isActive بخش PHPDoc رو باید با عبارت Checks whether شروع کنید.

-

return@ در PHPDoc یاید دقیقا مشخص کنه چی بازگردانده میشود.

+

برای متدها باید مستندات بنویسید (PHPDoc).

+

در PHPDoc نوع param@ ،var@ ،property@ و return@ باید مشخص شود (bool, int, string, array یا null).

+

برای تایپ آرایه در PHPDoc از []ClassName استفاده کنید.

+

خط اول PHPDoc باید هدف یک متد رو شرح بده.

+

اگر متدها چیزی رو بررسی میکنن مثل isActive بخش PHPDoc رو باید با عبارت Checks whether شروع کنید.

+

return@ در PHPDoc یاید دقیقا مشخص کنه چی بازگردانده میشه.

```php /** @@ -146,14 +149,14 @@ class Foo ### 4.5 Constructors -

`__construct` باید به جای استایل PHP 4 constructors استفاده شود.

+

`__construct` باید به جای استایل PHP 4 constructors استفاده شود.

## 5 PHP -### 5.1 نوع ها +### 5.1 نوع‌ها -

تمام انواع و مقادیر باید با حروف کوچک نوشته شوند مثل true, false, null و array.

-

تغییر نوع یک متغییر خیلی بده، به این مثال توجه کنید:

+

تمام انواع و مقادیر باید با حروف کوچک نوشته شوند مثل true ،false ،null و array.

+

تغییر نوع یک متغیر خیلی بده، به این مثال توجه کنید:

```php @@ -164,22 +167,22 @@ public function save(Transaction $transaction, $argument2 = 100) } ``` -### 5.2 رشته ها +### 5.2 رشته‌ها -

اگر رشته ی شما شامل متغییر های دیگه این نیست از تک کوتیشن جای دابل کوتیشن استفاده کنید.

+

اگر رشته‌ی شما شامل متغیرهای دیگه‌ای نیست از تک‌کوتیشن جای دابل‌کوتیشن استفاده کنید.

```php $str = 'Like this.'; ``` -

دو روش زیر مناسب برای جایگزینی هستند:

+

دو روش زیر مناسب برای جایگزینی هستند:

```php $str1 = "Hello $username!"; $str2 = "Hello {$username}!"; ``` -

-حالت زی مجاز نیست:

+

+حالت زیر مجاز نیست:

```php $str3 = "Hello ${username}!"; @@ -187,13 +190,13 @@ $str3 = "Hello ${username}!"; #### الحاق -

برای الحاق قبل و بعد کاراکتر dot فاصله بذارید

+

برای الحاق قبل و بعد کاراکتر dot فاصله بذارید:

```php $name = 'Yii' . ' Framework'; ``` -

و اگر رشته ی شما بلند بود میتونید اینطور عمل کنید:

+

و اگر رشته ی شما بلند بود می‌تونید اینطور عمل کنید:

```php $sql = "SELECT *" @@ -201,11 +204,11 @@ $sql = "SELECT *" . "WHERE `id` = 121 "; ``` -### 5.3 آرایه ها +### 5.3 آرایه‌ها -

برای تعریف آرایه ها از نحوه ی کوتاه اون یعنی [] استفاده کنید.

-

از ایندکس منفی در آرایه ها استفاده نکنید.

-

روش های زیر قابل قبول و مناسب هستند:

+

برای تعریف آرایه‌ها از ساختار کوتاه اون یعنی [] استفاده کنید.

+

از ایندکس منفی در آرایه‌ها استفاده نکنید.

+

روش‌های زیر قابل قبول و مناسب هستند:

```php $arr = [3, 14, 15, 'Yii', 'Framework']; @@ -228,10 +231,10 @@ $config = [ ### 5.4 دستورات کنترلی -

در دستورات کنترلی قبل و بعد پرانتز space بذارید.

-

آکولاد باز در همان خط دستور قرار میگیرد.

-

آکولاد بسته در خط جدید.

-

برای دستورات یک خطی همیشه از پرانتز استفاده کنید.

+

در دستورات کنترلی قبل و بعد پرانتز space بذارید.

+

آکولاد باز در همان خط دستور قرار میگیرد.

+

آکولاد بسته در خط جدید.

+

برای دستورات یک خطی همیشه از پرانتز استفاده کنید.

```php if ($event === null) { @@ -248,7 +251,7 @@ if (!$model && null === $event) throw new Exception('test'); ``` -

بعد از return از else استفاده نکنید

+

بعد از return از else استفاده نکنید:

```php $result = $this->getResult(); @@ -258,7 +261,7 @@ if (empty($result)) { // process result } ``` -

اینطوری بهتره

+

اینطوری بهتره:

```php @@ -272,8 +275,8 @@ if (empty($result)) { #### switch -

از فرمت زیر برای switch استفاده کنید -

+

از فرمت زیر برای switch استفاده کنید:

+ ```php switch ($this->phpType) { case 'string': @@ -291,9 +294,9 @@ switch ($this->phpType) { } ``` -### 5.5 function calls +### 5.5 صدا زدن فانکشن‌ها -

روش مناسب صدا زدن توابع همراه با پارامتر ها هم اینطور صحیحه

+

روش مناسب صدا زدن فانکشن‌ها همراه با پارامتر هم به این صورته:

```php doIt(2, 3); @@ -308,7 +311,7 @@ doIt('a', [ ### 5.6 تعریف Anonymous functions (lambda) -

در توابع بی نام بین function/use فضای خالی(space) بذارید.

+

در توابع بی نام بین function/use فضای خالی (space) بذارید:

```php // good @@ -328,14 +331,14 @@ $mul = array_reduce($numbers, function($r, $x) use($n) { }); ``` -مستند نویسی +مستند نویسی ------------- -

[phpDoc](https://phpdoc.org/) رو بخونید و موارد اونُ رعایت کنید.

-

کد بدون مستندات مجاز نیست.

-

تمام کلاس ها باید شامل بلاک مستندات در ابتدای فایل باشند.

-

نیازی به نوشتن return@ ندارید اگر متد شما اگر چیزی را برنمیگرداند.

-

به مثال های زیر توجه کنید:

+

https://phpdoc.org رو بخونید و موارد اون رو رعایت کنید.

+

کد بدون مستندات مجاز نیست.

+

تمام کلاس‌ها باید شامل بلاک مستندات در ابتدای فایل باشند.

+

نیازی به نوشتن return@ ندارید اگر متد شما چیزی برنمی‌گرداند.

+

به مثال‌های زیر توجه کنید:

```php getEventHandlers($eventName)->insertAt(0, $eventHandler); - * ``` - * - * @param string $name the event name - * @return Vector list of attached event handlers for the event - * @throws Exception if the event is not defined - */ -public function getEventHandlers($name) -{ - if (!isset($this->_e[$name])) { - $this->_e[$name] = new Vector; - } - $this->ensureBehaviors(); - return $this->_e[$name]; -} +* $component->getEventHandlers($eventName)->insertAt(0, $eventHandler); +* ``` +* +* @param string $name the event name +* @return Vector list of attached event handlers for the event +* @throws Exception if the event is not defined + */ + public function getEventHandlers($name) + { + if (!isset($this->_e[$name])) { + $this->_e[$name] = new Vector; + } + $this->ensureBehaviors(); + return $this->_e[$name]; + } ``` #### نظرات -

از // برای کامنت گذاری استفاده کنید نه از #.

-

در خطوطی که کامنت گذاشتین نباید کد بنویسید، یعنی اون خط برای اون کامنت باید باشه.

+

از // برای کامنت گذاری استفاده کنید نه از #.

+

در خطوطی که کامنت گذاشتین نباید کد بنویسید، یعنی اون خط برای اون کامنت باید باشه.

قوانین بیشتر ---------------- -

تا جایی که میتونید از تابع empty به جای === استفاده کنید.

-

اگر شرایط تو در تویی در کد شما وجود نداره return زود هنگام یا ساده تر بگم return وسط متد مشکلی نخواهد داشت.

-

همیشه از static جای self به جز موارد زیر استفاده کنید:

-

1) دسترسی به ثابت ها باید با self انجام بشه.

-

2) دسترسی به پراپرتی های خصوصی باید با self انجام بشه.

-

3) مجاز به استفاده از self برای صدا زدن توابع در مواقعی مثل فراخوانی بازگشتی هستید.

+

تا جایی که می‌تونید از تابع empty به جای === استفاده کنید.

+

اگر شرایط تو در تویی در کد شما وجود نداره return زود هنگام یا ساده تر بگم return وسط متد مشکلی نخواهد داشت.

+

همیشه از static جای self به جز موارد زیر استفاده کنید:

+

1) دسترسی به ثابت‌ها باید با self انجام بشه.

+

2) دسترسی به پراپرتی‌های خصوصی باید با self انجام بشه.

+

3) مجاز به استفاده از self برای صدا زدن توابع در مواقعی مثل فراخوانی بازگشتی هستید.

-namespace ها +نیم‌اسپیس‌ها ---------------- -

از حرف کوچک استفاده کنید.

-

از فرم جمع اسم ها برای نشان دادن یک شی استفاده کنید مثل validators.

-

از فرم منفرد اسم ها برای قابلیت ها و امکانات استفاده کنید مثل web.

-

بهتره فضای نام تک کلمه ای باشه در غیر این صورت از camelCase استفاده کنید.

- +

از حرف کوچک استفاده کنید.

+

از فرم جمع اسم‌ها برای نشان دادن یک شی استفاده کنید مثل validators.

+

از فرم مفرد اسم‌ها برای قابلیت‌ها و امکانات استفاده کنید مثل web.

+

بهتره فضای نام تک‌کلمه‌ای باشه در غیر این صورت از camelCase استفاده کنید.

diff --git a/docs/internals-ja/git-workflow.md b/docs/internals-ja/git-workflow.md index 903ad246269..430bef7e9d1 100644 --- a/docs/internals-ja/git-workflow.md +++ b/docs/internals-ja/git-workflow.md @@ -28,7 +28,7 @@ Linux において、GitHub で GIT を設定するのに問題が生じたり Yii をクローンしたディレクトリ、通常は "yii2" に入って、以下のコマンドを打ち込みます。 ``` -git remote add upstream git://github.com/yiisoft/yii2.git +git remote add upstream https://github.com/yiisoft/yii2.git ``` ### 3. テスト環境を準備する @@ -238,7 +238,7 @@ Dzięki temu pomijane są automatyczne testy travisa dla zmian, które i tak nie ``` git clone git@github.com:TWOJA-NAZWA-UZYTKOWNIKA-GITHUB/yii2.git -git remote add upstream git://github.com/yiisoft/yii2.git +git remote add upstream https://github.com/yiisoft/yii2.git ``` ``` diff --git a/docs/internals-ru/git-workflow.md b/docs/internals-ru/git-workflow.md index 2bc32c44a29..30f33c6b26b 100644 --- a/docs/internals-ru/git-workflow.md +++ b/docs/internals-ru/git-workflow.md @@ -26,7 +26,7 @@ git clone git@github.com:YOUR-GITHUB-USERNAME/yii2.git Перейдите в каталог куда вы склонировали Yii, как правило "yii2". Затем введите следующую команду: ``` -git remote add upstream git://github.com/yiisoft/yii2.git +git remote add upstream https://github.com/yiisoft/yii2.git ``` ### 3. Настройка тестовой среды @@ -235,7 +235,7 @@ git push origin --delete 999-name-of-your-branch-goes-here ``` git clone git@github.com:YOUR-GITHUB-USERNAME/yii2.git -git remote add upstream git://github.com/yiisoft/yii2.git +git remote add upstream https://github.com/yiisoft/yii2.git ``` ``` diff --git a/docs/internals-sr-Latn/git-workflow.md b/docs/internals-sr-Latn/git-workflow.md index 4025813570e..1422016b23b 100644 --- a/docs/internals-sr-Latn/git-workflow.md +++ b/docs/internals-sr-Latn/git-workflow.md @@ -26,7 +26,7 @@ onda morate [podesiti vašu Git instalaciju da radi sa GitHub-om](https://help.g Locirajte se u direktorijum gde ste klonirali Yii, podrazumevano, "yii2" direktorijum. Nakon toga izvršite sledeću komandu: ``` -git remote add upstream git://github.com/yiisoft/yii2.git +git remote add upstream https://github.com/yiisoft/yii2.git ``` ### 3. Pripremite okruženje za testiranje @@ -186,7 +186,7 @@ Na ovaj način će Travis započinjati testiranje samo izmena koje nisu prvenstv ``` git clone git@github.com:VASE-GITHUB-KORISNICKO-IME/yii2.git -git remote add upstream git://github.com/yiisoft/yii2.git +git remote add upstream https://github.com/yiisoft/yii2.git ``` ``` diff --git a/docs/internals-uk/git-workflow.md b/docs/internals-uk/git-workflow.md index d8e4ee475e7..d46b76ea5e7 100644 --- a/docs/internals-uk/git-workflow.md +++ b/docs/internals-uk/git-workflow.md @@ -27,7 +27,7 @@ git clone git@github.com:ВАШЕ-ІМ’Я-НА-GITHUB/yii2.git Перейдіть у директорію, в яку ви клонували Yii, зазвичай "yii2". Потім виконайте наведену команду: ``` -git remote add upstream git://github.com/yiisoft/yii2.git +git remote add upstream https://github.com/yiisoft/yii2.git ``` ### 3. Підготуйте середовище тестування @@ -216,7 +216,7 @@ git push origin --delete 999-name-of-your-branch-goes-here ``` git clone git@github.com:YOUR-GITHUB-USERNAME/yii2.git -git remote add upstream git://github.com/yiisoft/yii2.git +git remote add upstream https://github.com/yiisoft/yii2.git ``` ``` diff --git a/docs/internals/git-workflow.md b/docs/internals/git-workflow.md index 681b7c71b1f..11e8a499a6c 100644 --- a/docs/internals/git-workflow.md +++ b/docs/internals/git-workflow.md @@ -28,7 +28,7 @@ then you must [setup your Git installation to work with GitHub](https://help.git Change to the directory where you cloned Yii, normally, "yii2". Then enter the following command: ``` -git remote add upstream git://github.com/yiisoft/yii2.git +git remote add upstream https://github.com/yiisoft/yii2.git ``` ### 3. Prepare the testing environment @@ -232,7 +232,7 @@ Doing so will save travis from commencing testruns on changes that are not cover ``` git clone git@github.com:YOUR-GITHUB-USERNAME/yii2.git -git remote add upstream git://github.com/yiisoft/yii2.git +git remote add upstream https://github.com/yiisoft/yii2.git ``` ``` diff --git a/framework/BaseYii.php b/framework/BaseYii.php index b002ad49c39..496f6aa121a 100644 --- a/framework/BaseYii.php +++ b/framework/BaseYii.php @@ -68,7 +68,7 @@ class BaseYii */ public static $classMap = []; /** - * @var \yii\console\Application|\yii\web\Application|\yii\base\Application the application instance + * @var \yii\console\Application|\yii\web\Application the application instance */ public static $app; /** @@ -93,7 +93,7 @@ class BaseYii */ public static function getVersion() { - return '2.0.47-dev'; + return '2.0.50-dev'; } /** diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 34c797b42f8..9567e04fd97 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -1,7 +1,107 @@ Yii Framework 2 Change Log ========================== -2.0.47 under development +2.0.50 under development +------------------------ + +- Bug #17181: Improved `BaseUrl::isRelative($url)` performance (sammousa, bizley, rob006) +- Bug #17191: Fixed `BaseUrl::isRelative($url)` method in `yii\helpers\BaseUrl` (ggh2e3) +- Bug #18469: Fixed `Link::serialize(array $links)` method in `yii\web\Link` (ggh2e3) +- Bug #19691: Allow using custom class to style error summary (skepticspriggan) +- Bug #20040: Fix type `boolean` in `MSSQL` (terabytesoftw) +- Bug #20005: Fix `yii\console\controllers\ServeController` to specify the router script (terabytesoftw) +- Bug #19060: Fix `yii\widgets\Menu` bug when using Closure for active item and adding additional tests in `tests\framework\widgets\MenuTest` (atrandafir) +- Bug #13920: Fixed erroneous validation for specific cases (tim-fischer-maschinensucher) +- Bug #19927: Fixed `console\controllers\MessageController` when saving translations to database: fixed FK error when adding new string and language at the same time, checking/regenerating all missing messages and dropping messages for unused languages (atrandafir) +- Bug #20002: Fixed superfluous query on HEAD request in serializer (xicond) +- Bug #20122: Fixed parsing of boolean keywords (e.g. used in SQLite) in `\yii\db\ColumnSchema::typecast()` (rhertogh) +- Enh #12743: Added new methods `BaseActiveRecord::loadRelations()` and `BaseActiveRecord::loadRelationsFor()` to eager load related models for existing primary model instances (PowerGamer1) +- Enh #20030: Improve performance of handling `ErrorHandler::$memoryReserveSize` (antonshevelev, rob006) +- Enh #20042: Add empty array check to `ActiveQueryTrait::findWith()` (renkas) +- Enh #20032: Added `yii\helpers\BaseStringHelper::mask()` method for string masking with multibyte support (salehhashemi1992) +- Enh #20034: Added `yii\helpers\BaseStringHelper::findBetween()` to retrieve a substring that lies between two strings (salehhashemi1992) + + +2.0.49.2 October 12, 2023 +------------------------- + +- Bug #19925: Improved PHP version check when handling MIME types (schmunk42) + + +2.0.49.1 October 05, 2023 +------------------------- + +- Bug #19940: File Log writer without newline (terabytesoftw) +- Bug #19950: Fix `Query::groupBy(null)` causes error for PHP 8.1: `trim(): Passing null to parameter #1 ($string) of type string is deprecated` (uaoleg) +- Bug #19951: Removed unneeded MIME file tests (schmunk42) +- Bug #19984: Do not duplicate log messages in memory (lubosdz) +- Enh #19780: added pcntl to requirements check (schmunk42) + + +2.0.49 August 29, 2023 +---------------------- + +- Bug #9899: Fix caching a MSSQL query with BLOB data type (terabytesoftw) +- Bug #16208: Fix `yii\log\FileTarget` to not export empty messages (terabytesoftw) +- Bug #18859: Fix `yii\web\Controller::bindInjectedParams()` to not throw error when argument of `ReflectionUnionType` type is passed (bizley) +- Bug #19857: Fix AttributeTypecastBehavior::resetOldAttributes() causes "class has no attribute named" InvalidArgumentException (uaoleg) +- Bug #19868: Added whitespace sanitation for tests, due to updates in ICU 72 (schmunk42) +- Bug #19872: Fixed the definition of dirty attributes in AR properties for a non-associative array in case of changing the order of elements (eegusakov) +- Bug #19899: Fixed `GridView` in some cases calling `Model::generateAttributeLabel()` to generate label values that are never used (PowerGamer1) +- Bug #19906: Fixed multiline strings in the `\yii\console\widgets\Table` widget (rhertogh) +- Bug #19908: Fix associative array cell content rendering in Table widget (rhertogh) +- Bug #19911: Resolved inconsistency in `ActiveRecord::getAttributeLabel()` with regard of overriding in primary model labels for attributes of related model in favor of allowing such overriding for all levels of relation nesting (PowerGamer1) +- Bug #19914: Fixed `ArrayHelper::keyExists()` and `::remove()` functions when the key is a float and the value is `null` (rhertogh) +- Bug #19924: Fix `yii\i18n\Formatter` to not throw error `Unknown named parameter` under PHP 8 (arollmann) +- Enh #19841: Allow jQuery 3.7 to be installed (wouter90) +- Enh #19853: Added support for default value for `\yii\helpers\Console::select()` (rhertogh) +- Enh #19884: Added support Enums in Query Builder (sk1t0n) +- Enh #19920: Broadened the accepted type of `Cookie::$expire` from `int` to `int|string|\DateTimeInterface|null` (rhertogh) + + +2.0.48.1 May 24, 2023 +--------------------- + +- Bug #19847: Fix regression introduced in #15376 that caused `DbManager::getRolesByUser()` to return stale data (michaelarnauts) + + +2.0.48 May 22, 2023 +------------------- + +- Bug #15376: Added $userId for RBAC roles cache (manchenkoff) +- Bug #17194: Fix unnecessary SQL updates in the database on attributes typecast via `yii\behaviors\AttributeTypecastBehavior` (aivchen) +- Bug #18867: Fixed multiple issues with `yii\grid\CheckboxColumn`: "check all" checkbox not being checked on page load when all data row checkboxes are initially checked; clicking checkboxes triggered "change" event for other checkboxes that do not change their state; "check all" checkbox not being checked when disabled checkboxes are present and clicking last non-checked data row checkbox (PowerGamer1) +- Bug #19635: PHP 8.2 compatibility fix for `yii\validators\DateValidator` (PowerGamer1) +- Bug #19683: Updated `framework\mimeType.php` to the actual value. Fix typo in `build/controllers/MimeTypeController.php` (DeryabinSergey) +- Bug #19693: Fix db/Command not caching `NULL` result with scalar fetchMode (Arkeins) +- Bug #19705: Add binary and other data types to `$typeMap` list for MySQL (sohelahmed7) +- Bug #19712: Cast shell_exec() output to string for jsCompressor (impayru) +- Bug #19720: Fix "zh-HK" locale causing [error][yii\i18n\PhpMessageSource::loadFallbackMessages] The message file for category 'yii' doesn't exist (uaoleg) +- Bug #19731: Fix `yii\data\Sort` to generate a proper link when multisort is on and attribute has a default sort order set (bizley) +- Bug #19734: PHP 8.1 compatibility fix for `$query->orderBy(null)` (uaoleg) +- Bug #19735: Fix `yii\validators\NumberValidator` to use a programmable message for the value validation (bizley) +- Bug #19736: Fix `StringHelper::truncate(null, 10)` causes error `Deprecated: mb_strlen(): Passing null to parameter #1 ($string) of type string is deprecated` (uaoleg) +- Bug #19743: Non-associative array values in AR weren't considered dirty when reordered (samdark) +- Bug #19749: Add PHP 8.2 support (samdark, schmunk42, aldok10, DanaLuther) +- Bug #19770: Fix `yii\mutex\MysqlMutex` `keyPrefix` expression param binding (kamarton) +- Bug #19795: Fix `yii\web\Response::redirect()` to prevent setting headers with URL containing new line character (bizley) +- Bug #19807: Fix REST serializer not using `serializeModel()` when working with an array of models (zucha) +- Bug #19813: Fix `yii\base\DynamicModel` validation with validators that reference missing attributes (michaelarnauts) +- Bug #19828: Fix "strtr(): Passing null to parameter #1 ($string) of type string is deprecated" (uaoleg) +- Bug #19837: Fixed processing of numeric file extensions in `yii\build\controllers\MimeTypeController::generateMimeTypesFile()` (rhertogh) +- Enh #9740: Usage of DI instead of new keyword in Schemas (manchenkoff) +- Enh #15376: Added cache usage for `yii\rbac\DbManager::getRolesByUser()` (manchenkoff) +- Enh #19689: Remove empty elements from the `class` array in `yii\helpers\BaseHtml::renderTagAttributes()` to prevent unwanted spaces (MoritzLost) +- Enh #19741: Added option to use a closure for `$variations` definition in `yii\filters\PageCache` (nadar) +- Enh #19766: Add support for PHP generators to JSON helper (vladis84) +- Enh #19794: Add caching in `yii\web\Request` for `getUserIP()` and `getSecureForwardedHeaderTrustedParts()` (rhertogh) +- Enh #19804: Remove the unnecessary call to `$this->oldAttributes` in `BaseActiveRecord::getDirtyAttributes()` (thiagotalma) +- Enh #19816: Explicitly pass `$fallbackToMaster` as `true` to `getSlavePdo()` to ensure it isn't affected by child class with changed defaults (developedsoftware) +- Enh #19838: Added `yii\helpers\BaseFileHelper::getExtensionByMimeType()` to get the most common extension for a given MIME type (rhertogh) +- Chg #19696: Change visibility of `yii\web\View::isPageEnded` to `protected` (lubosdz, samdark) + + +2.0.47 November 18, 2022 ------------------------ - Bug #12636: Fix CompareValidator successful state when compareAttribute has an error (manchenkoff) @@ -9,13 +109,20 @@ Yii Framework 2 Change Log - Bug #15500: Fix saving empty records to MySQL (manchenkoff) - Bug #15557: Fix empty fields exclusion in safe attributes of `yii\base\Model` (manchenkoff) - Bug #16658: Fix file readability check on publishing assets by `yii\web\AssetManager` (manchenkoff) +- Bug #19316: Fix MysqlMutex with same connection but difference database (kamarton) +- Bug #19507: Fix eager loading of nested one-to-many relations (spo0okie) - Bug #19508: Fix wrong selection for boolean attributes in GridView (alnidok) - Bug #19517: Fix regression in `CompositeAuth::authenticate()` introduced in #19418 (WinterSilence) +- Bug #19520: Fix for TIMESTAMP & ROWVERSION columns in MSSQL insert query (darkdef) - Bug #19530: Fix specifying the field id for `yii\widgets\ActiveField` (kv4nt) +- Bug #19534: Fix `yii\helpers\BaseHtml::renderSelectOptions()` to properly render boolean selection (bizley) - Bug #19537: Fix default expression detection for MariaDB `date` and `time` columns (bizley) +- Bug #19546: Reverted #19309 (bizley) +- Bug #19581: Fix regression in `CompositeAuth` introduced in #19418 (SamMousa, WinterSilence, samdark) - Bug #19589: Fix Error reporting in to the `BaseArrayHelper::getValue()` (lav45) -- Bug #19316: Fix MysqlMutex with same connection but difference database (kamarton) -- Bug #19507: Fix eager loading of nested one-to-many relations (spo0okie) +- Bug #19670: Fix Error null check PHP 8.1 `yii\rbac\DbManager` (samuelexyz) +- Chg #17811: Do not reset `retryHandler` when `yii\db\Command::reset()` called (erickskrauch) +- Chg #19354: Reuse `Validator::getAttributeNames()` in `AttributeTypecastBehavior::detectAttributeTypes()` (WinterSilence) 2.0.46 August 18, 2022 diff --git a/framework/UPGRADE.md b/framework/UPGRADE.md index 19da4c28f9f..3a9569a9822 100644 --- a/framework/UPGRADE.md +++ b/framework/UPGRADE.md @@ -51,6 +51,48 @@ if you want to upgrade from version A to version C and there is version B between A and C, you need to follow the instructions for both A and B. + +Upgrade from Yii 2.0.48 +----------------------- + +* Since Yii 2.0.49 the `yii\console\Controller::select()` function supports a default value and respects + the `yii\console\Controller::$interactive` setting. Before the user was always prompted to select an option + regardless of the `$interactive` setting. Now the `$default` value is automatically returned when `$interactive` is + `false`. +* The function signature for `yii\console\Controller::select()` and `yii\helpers\BaseConsole::select()` have changed. + They now have an additional `$default = null` parameter. In case those methods are overwritten you will need to + update your child classes accordingly. + +Upgrade from Yii 2.0.46 +----------------------- + +* The default "scope" of the `yii\mutex\MysqlMutex` has changed, the name of the mutex now includes the name of the + database by default. Before this change the "scope" of the `MysqlMutex` was "server wide". + No matter which database was used, the mutex lock was acquired for the entire server, since version 2.0.47 + the "scope" of the mutex will be limited to the database being used. + This might impact your application if … + * The database name of the database connection specified in the `MysqlMutex::$db` property is set dynamically + (or changes in any other way during your application execution): + Depending on your application you might want to set the `MysqlMutex::$keyPrefix` property (see below). + * The database connection specified in the `MysqlMutex::$db` does not include a database name: + You must specify the `MysqlMutex::$keyPrefix` property (see below). + + If you need to specify/lock the "scope" of the `MysqlMutex` you can specify the `$keyPrefix` property. + For example in your application config: + ```php + 'mutex' => [ + 'class' => 'yii\mutex\MysqlMutex', + 'db' => 'db', + 'keyPrefix' => 'myPrefix' // Your custom prefix which determines the "scope" of the mutex. + ], + ``` + > Warning: Even if you're not impacted by the aforementioned conditions and even if you specify the `$keyPrefix`, + if you rely on a locked mutex during and/or across your application deployment + (e.g. switching over in a live environment from an old version to a new version of your application) + you will have to make sure any running process that acquired a lock finishes before switching over to the new + version of your application. A lock acquired before the deployment will *not* be mutually exclusive with a + lock acquired after the deployment (even if they have the same name). + Upgrade from Yii 2.0.45 ----------------------- @@ -58,6 +100,11 @@ Upgrade from Yii 2.0.45 2.0.45 behavior, [introduce your own method](https://github.com/yiisoft/yii2/pull/19495/files). * `yii\log\FileTarget::$rotateByCopy` is now deprecated and setting it to `false` has no effect since rotating of the files is done only by copy. +* `yii\validators\UniqueValidator` and `yii\validators\ExistValidator`, when used on multiple attributes, now only + generate an error on a single attribute. Previously, they would report a separate error on each attribute. + Old behavior can be achieved by setting `'skipOnError' => false`, but this might have undesired side effects with + additional validators on one of the target attributes. + See [issue #19407](https://github.com/yiisoft/yii2/issues/19407) Upgrade from Yii 2.0.44 ----------------------- @@ -86,6 +133,9 @@ Upgrade from Yii 2.0.43 ``` * `yii\caching\Cache::multiSet()` now uses the default cache duration (`yii\caching\Cache::$defaultDuration`) when no duration is provided. A duration of 0 should be explicitly passed if items should not expire. +* Default value of `yii\console\controllers\MessageController::$translator` is updated to `['Yii::t', '\Yii::t']`, since + old value of `'Yii::t'` didn't match `\Yii::t` calls on PHP 8. If configuration file for "extract" command overrides + default value, update config file accordingly. See [issue #18941](https://github.com/yiisoft/yii2/issues/18941) Upgrade from Yii 2.0.42 ----------------------- diff --git a/framework/assets/yii.activeForm.js b/framework/assets/yii.activeForm.js index b12f812c37d..5b9ce4aaec2 100644 --- a/framework/assets/yii.activeForm.js +++ b/framework/assets/yii.activeForm.js @@ -395,9 +395,11 @@ data: $form.serialize() + extData, dataType: data.settings.ajaxDataType, complete: function (jqXHR, textStatus) { + currentAjaxRequest = null; $form.trigger(events.ajaxComplete, [jqXHR, textStatus]); }, beforeSend: function (jqXHR, settings) { + currentAjaxRequest = jqXHR; $form.trigger(events.ajaxBeforeSend, [jqXHR, settings]); }, success: function (msgs) { @@ -563,6 +565,9 @@ return; } + if (currentAjaxRequest !== null) { + currentAjaxRequest.abort(); + } if (data.settings.timer !== undefined) { clearTimeout(data.settings.timer); } @@ -929,4 +934,7 @@ $form.find(attribute.input).attr('aria-invalid', hasError ? 'true' : 'false'); } } + + var currentAjaxRequest = null; + })(window.jQuery); diff --git a/framework/assets/yii.gridView.js b/framework/assets/yii.gridView.js index 825ff5044db..f02d4d95e94 100644 --- a/framework/assets/yii.gridView.js +++ b/framework/assets/yii.gridView.js @@ -188,16 +188,19 @@ if (!options.multiple || !options.checkAll) { return; } - var checkAll = "#" + id + " input[name='" + options.checkAll + "']"; - var inputs = options['class'] ? "input." + options['class'] : "input[name='" + options.name + "']"; - var inputsEnabled = "#" + id + " " + inputs + ":enabled"; - initEventHandler($grid, 'checkAllRows', 'click.yiiGridView', checkAll, function () { - $grid.find(inputs + ":enabled").prop('checked', this.checked).change(); + var checkAllInput = "input[name='" + options.checkAll + "']"; + var inputs = (options['class'] ? "input." + options['class'] : "input[name='" + options.name + "']") + ":enabled"; + initEventHandler($grid, 'checkAllRows', 'click.yiiGridView', "#" + id + " " + checkAllInput, function () { + $grid.find(inputs + (this.checked ? ":not(:checked)" : ":checked")).prop('checked', this.checked).change(); }); - initEventHandler($grid, 'checkRow', 'click.yiiGridView', inputsEnabled, function () { + var handler = function () { var all = $grid.find(inputs).length == $grid.find(inputs + ":checked").length; - $grid.find("input[name='" + options.checkAll + "']").prop('checked', all).change(); - }); + $grid.find(checkAllInput + (all ? ":not(:checked)" : ":checked")).prop('checked', all).change(); + }; + initEventHandler($grid, 'checkRow', 'click.yiiGridView', "#" + id + " " + inputs, handler); + if($grid.find(inputs).length) { + handler(); // Ensure "check all" checkbox is checked on page load if all data row checkboxes are initially checked. + } }, getSelectedRows: function () { diff --git a/framework/base/Configurable.php b/framework/base/Configurable.php index 9982d6f627c..b44a082841e 100644 --- a/framework/base/Configurable.php +++ b/framework/base/Configurable.php @@ -15,7 +15,7 @@ * like the following: * * ```php - * public function __constructor($param1, $param2, ..., $config = []) + * public function __construct($param1, $param2, ..., $config = []) * ``` * * That is, the last parameter of the constructor must accept a configuration array. diff --git a/framework/base/Controller.php b/framework/base/Controller.php index 3e609be2e9c..2205712fb28 100644 --- a/framework/base/Controller.php +++ b/framework/base/Controller.php @@ -19,7 +19,7 @@ * @property-read Module[] $modules All ancestor modules that this controller is located within. * @property-read string $route The route (module ID, controller ID and action ID) of the current request. * @property-read string $uniqueId The controller ID that is prefixed with the module ID (if any). - * @property View $view The view object that can be used to render views or view files. + * @property View|\yii\web\View $view The view object that can be used to render views or view files. * @property string $viewPath The directory containing the view files for this controller. * * @author Qiang Xue diff --git a/framework/base/DynamicModel.php b/framework/base/DynamicModel.php index 027da6d1982..9ce466b8fa3 100644 --- a/framework/base/DynamicModel.php +++ b/framework/base/DynamicModel.php @@ -201,6 +201,7 @@ public function addRule($attributes, $validator, $options = []) } $validators->append($validator); + $this->defineAttributesByValidator($validator); return $this; } @@ -223,9 +224,11 @@ public static function validateData(array $data, $rules = []) foreach ($rules as $rule) { if ($rule instanceof Validator) { $validators->append($rule); + $model->defineAttributesByValidator($rule); } elseif (is_array($rule) && isset($rule[0], $rule[1])) { // attributes, validator type $validator = Validator::createValidator($rule[1], $model, (array)$rule[0], array_slice($rule, 2)); $validators->append($validator); + $model->defineAttributesByValidator($validator); } else { throw new InvalidConfigException('Invalid validation rule: a rule must specify both attribute names and validator type.'); } @@ -237,6 +240,19 @@ public static function validateData(array $data, $rules = []) return $model; } + /** + * Define the attributes that applies to the specified Validator. + * @param Validator $validator the validator whose attributes are to be defined. + */ + private function defineAttributesByValidator($validator) + { + foreach ($validator->getAttributeNames() as $attribute) { + if (!$this->hasAttribute($attribute)) { + $this->defineAttribute($attribute); + } + } + } + /** * {@inheritdoc} */ diff --git a/framework/base/ErrorHandler.php b/framework/base/ErrorHandler.php index 81a20f0a3c9..393438ede57 100644 --- a/framework/base/ErrorHandler.php +++ b/framework/base/ErrorHandler.php @@ -94,7 +94,7 @@ public function register() set_error_handler([$this, 'handleError']); } if ($this->memoryReserveSize > 0) { - $this->_memoryReserve = str_pad('', $this->memoryReserveSize, 'x'); + $this->_memoryReserve = str_repeat('x', $this->memoryReserveSize); } // to restore working directory in shutdown handler if (PHP_SAPI !== 'cli') { diff --git a/framework/base/Model.php b/framework/base/Model.php index 2935caf2ff5..33993d623ba 100644 --- a/framework/base/Model.php +++ b/framework/base/Model.php @@ -267,7 +267,15 @@ public function formName() */ public function attributes() { - return array_keys(Yii::getObjectVars($this)); + $class = new ReflectionClass($this); + $names = []; + foreach ($class->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) { + if (!$property->isStatic()) { + $names[] = $property->getName(); + } + } + + return $names; } /** diff --git a/framework/behaviors/AttributeTypecastBehavior.php b/framework/behaviors/AttributeTypecastBehavior.php index 541f4f95cad..a418b15de25 100644 --- a/framework/behaviors/AttributeTypecastBehavior.php +++ b/framework/behaviors/AttributeTypecastBehavior.php @@ -293,9 +293,7 @@ protected function detectAttributeTypes() } if ($type !== null) { - foreach ((array) $validator->attributes as $attribute) { - $attributeTypes[ltrim($attribute, '!')] = $type; - } + $attributeTypes += array_fill_keys($validator->getAttributeNames(), $type); } } @@ -364,5 +362,25 @@ public function afterSave($event) public function afterFind($event) { $this->typecastAttributes(); + + $this->resetOldAttributes(); + } + + /** + * Resets the old values of the named attributes. + */ + protected function resetOldAttributes() + { + if ($this->attributeTypes === null) { + return; + } + + $attributes = array_keys($this->attributeTypes); + + foreach ($attributes as $attribute) { + if ($this->owner->canSetOldAttribute($attribute)) { + $this->owner->setOldAttribute($attribute, $this->owner->{$attribute}); + } + } } } diff --git a/framework/caching/Cache.php b/framework/caching/Cache.php index 5e1828ef850..d6d363c6d34 100644 --- a/framework/caching/Cache.php +++ b/framework/caching/Cache.php @@ -294,21 +294,7 @@ public function multiSet($items, $duration = null, $dependency = null) $duration = $this->defaultDuration; } - if ($dependency !== null && $this->serializer !== false) { - $dependency->evaluateDependency($this); - } - - $data = []; - foreach ($items as $key => $value) { - if ($this->serializer === null) { - $value = serialize([$value, $dependency]); - } elseif ($this->serializer !== false) { - $value = call_user_func($this->serializer[0], [$value, $dependency]); - } - - $key = $this->buildKey($key); - $data[$key] = $value; - } + $data = $this->prepareCacheData($items, $dependency); return $this->setValues($data, $duration); } @@ -343,6 +329,21 @@ public function madd($items, $duration = 0, $dependency = null) * @since 2.0.7 */ public function multiAdd($items, $duration = 0, $dependency = null) + { + $data = $this->prepareCacheData($items, $dependency); + + return $this->addValues($data, $duration); + } + + /** + * Prepares data for caching by serializing values and evaluating dependencies. + * + * @param array $items The items to be cached. + * @param mixed $dependency The dependency to be evaluated. + * + * @return array The prepared data for caching. + */ + private function prepareCacheData($items, $dependency) { if ($dependency !== null && $this->serializer !== false) { $dependency->evaluateDependency($this); @@ -360,7 +361,7 @@ public function multiAdd($items, $duration = 0, $dependency = null) $data[$key] = $value; } - return $this->addValues($data, $duration); + return $data; } /** diff --git a/framework/caching/DbCache.php b/framework/caching/DbCache.php index 5bf3b02dedd..d707ba41a27 100644 --- a/framework/caching/DbCache.php +++ b/framework/caching/DbCache.php @@ -317,7 +317,7 @@ protected function isVarbinaryDataField() */ protected function getDataFieldName() { - return $this->isVarbinaryDataField() ? 'convert(nvarchar(max),[data]) data' : 'data'; + return $this->isVarbinaryDataField() ? 'CONVERT(VARCHAR(MAX), [[data]]) data' : 'data'; } /** diff --git a/framework/classes.php b/framework/classes.php index 439f757ce0b..46741e3180d 100644 --- a/framework/classes.php +++ b/framework/classes.php @@ -345,9 +345,9 @@ 'yii\validators\RequiredValidator' => YII2_PATH . '/validators/RequiredValidator.php', 'yii\validators\SafeValidator' => YII2_PATH . '/validators/SafeValidator.php', 'yii\validators\StringValidator' => YII2_PATH . '/validators/StringValidator.php', + 'yii\validators\TrimValidator' => YII2_PATH . '/validators/TrimValidator.php', 'yii\validators\UniqueValidator' => YII2_PATH . '/validators/UniqueValidator.php', 'yii\validators\UrlValidator' => YII2_PATH . '/validators/UrlValidator.php', - 'yii\validators\TrimValidator' => YII2_PATH . '/validators/TrimValidator.php', 'yii\validators\ValidationAsset' => YII2_PATH . '/validators/ValidationAsset.php', 'yii\validators\Validator' => YII2_PATH . '/validators/Validator.php', 'yii\web\Application' => YII2_PATH . '/web/Application.php', diff --git a/framework/composer.json b/framework/composer.json index aaafa056878..ff36473707c 100644 --- a/framework/composer.json +++ b/framework/composer.json @@ -68,11 +68,11 @@ "ext-ctype": "*", "lib-pcre": "*", "yiisoft/yii2-composer": "~2.0.4", - "ezyang/htmlpurifier": "~4.6", + "ezyang/htmlpurifier": "^4.6", "cebe/markdown": "~1.0.0 | ~1.1.0 | ~1.2.0", - "bower-asset/jquery": "3.6.*@stable | 3.5.*@stable | 3.4.*@stable | 3.3.*@stable | 3.2.*@stable | 3.1.*@stable | 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable", - "bower-asset/inputmask": "~3.2.2 | ~3.3.5", - "bower-asset/punycode": "1.3.*", + "bower-asset/jquery": "3.7.*@stable | 3.6.*@stable | 3.5.*@stable | 3.4.*@stable | 3.3.*@stable | 3.2.*@stable | 3.1.*@stable | 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable", + "bower-asset/inputmask": "^5.0.8 ", + "bower-asset/punycode": "^2.2", "bower-asset/yii2-pjax": "~2.0.1", "paragonie/random_compat": ">=1" }, diff --git a/framework/console/Controller.php b/framework/console/Controller.php index 614241d0f31..579b5977830 100644 --- a/framework/console/Controller.php +++ b/framework/console/Controller.php @@ -28,8 +28,8 @@ * where `` is a route to a controller action and the params will be populated as properties of a command. * See [[options()]] for details. * - * @property-read string $help The help information for this controller. - * @property-read string $helpSummary The one-line short summary describing this controller. + * @property-read string $help + * @property-read string $helpSummary * @property-read array $passedOptionValues The properties corresponding to the passed options. * @property-read array $passedOptions The names of the options passed during execution. * @@ -400,12 +400,19 @@ public function confirm($message, $default = false) * * @param string $prompt the prompt message * @param array $options Key-value array of options to choose from + * @param string|null $default value to use when the user doesn't provide an option. + * If the default is `null`, the user is required to select an option. * * @return string An option character the user chose + * @since 2.0.49 Added the $default argument */ - public function select($prompt, $options = []) + public function select($prompt, $options = [], $default = null) { - return Console::select($prompt, $options); + if ($this->interactive) { + return Console::select($prompt, $options, $default); + } + + return $default; } /** diff --git a/framework/console/controllers/AssetController.php b/framework/console/controllers/AssetController.php index 5215066df40..8b9d5a3fc27 100644 --- a/framework/console/controllers/AssetController.php +++ b/framework/console/controllers/AssetController.php @@ -515,7 +515,7 @@ protected function compressJsFiles($inputFiles, $outputFile) if (is_string($this->jsCompressor)) { $tmpFile = $outputFile . '.tmp'; $this->combineJsFiles($inputFiles, $tmpFile); - $this->stdout(shell_exec(strtr($this->jsCompressor, [ + $this->stdout((string)shell_exec(strtr($this->jsCompressor, [ '{from}' => escapeshellarg($tmpFile), '{to}' => escapeshellarg($outputFile), ]))); diff --git a/framework/console/controllers/MessageController.php b/framework/console/controllers/MessageController.php index e1a73576903..6d5a7d6448f 100644 --- a/framework/console/controllers/MessageController.php +++ b/framework/console/controllers/MessageController.php @@ -353,17 +353,7 @@ protected function saveMessagesToDb($messages, $db, $sourceMessageTable, $messag foreach ($rows as $row) { $currentMessages[$row['category']][$row['id']] = $row['message']; } - - $currentLanguages = []; - $rows = (new Query())->select(['language'])->from($messageTable)->groupBy('language')->all($db); - foreach ($rows as $row) { - $currentLanguages[] = $row['language']; - } - $missingLanguages = []; - if (!empty($currentLanguages)) { - $missingLanguages = array_diff($languages, $currentLanguages); - } - + $new = []; $obsolete = []; @@ -372,89 +362,130 @@ protected function saveMessagesToDb($messages, $db, $sourceMessageTable, $messag if (isset($currentMessages[$category])) { $new[$category] = array_diff($msgs, $currentMessages[$category]); + // obsolete messages per category $obsolete += array_diff($currentMessages[$category], $msgs); } else { $new[$category] = $msgs; } } - + + // obsolete categories foreach (array_diff(array_keys($currentMessages), array_keys($messages)) as $category) { $obsolete += $currentMessages[$category]; } if (!$removeUnused) { foreach ($obsolete as $pk => $msg) { + // skip already marked unused if (strncmp($msg, '@@', 2) === 0 && substr($msg, -2) === '@@') { unset($obsolete[$pk]); } } - } - - $obsolete = array_keys($obsolete); + } + $this->stdout('Inserting new messages...'); - $savedFlag = false; + $insertCount = 0; foreach ($new as $category => $msgs) { foreach ($msgs as $msg) { - $savedFlag = true; - $lastPk = $db->schema->insert($sourceMessageTable, ['category' => $category, 'message' => $msg]); - foreach ($languages as $language) { - $db->createCommand() - ->insert($messageTable, ['id' => $lastPk['id'], 'language' => $language]) - ->execute(); - } - } - } - - if (!empty($missingLanguages)) { - $updatedMessages = []; - $rows = (new Query())->select(['id', 'category', 'message'])->from($sourceMessageTable)->all($db); - foreach ($rows as $row) { - $updatedMessages[$row['category']][$row['id']] = $row['message']; - } - foreach ($updatedMessages as $category => $msgs) { - foreach ($msgs as $id => $msg) { - $savedFlag = true; - foreach ($missingLanguages as $language) { - $db->createCommand() - ->insert($messageTable, ['id' => $id, 'language' => $language]) - ->execute(); - } - } + $insertCount++; + $db->schema->insert($sourceMessageTable, ['category' => $category, 'message' => $msg]); } } - - $this->stdout($savedFlag ? "saved.\n" : "Nothing to save.\n"); + + $this->stdout($insertCount ? "{$insertCount} saved.\n" : "Nothing to save.\n"); + $this->stdout($removeUnused ? 'Deleting obsoleted messages...' : 'Updating obsoleted messages...'); if (empty($obsolete)) { $this->stdout("Nothing obsoleted...skipped.\n"); - return; } - if ($removeUnused) { - $db->createCommand() - ->delete($sourceMessageTable, ['in', 'id', $obsolete]) - ->execute(); - $this->stdout("deleted.\n"); - } elseif ($markUnused) { - $rows = (new Query()) - ->select(['id', 'message']) - ->from($sourceMessageTable) - ->where(['in', 'id', $obsolete]) - ->all($db); - - foreach ($rows as $row) { - $db->createCommand()->update( - $sourceMessageTable, - ['message' => '@@' . $row['message'] . '@@'], - ['id' => $row['id']] - )->execute(); + if ($obsolete) { + if ($removeUnused) { + $affected = $db->createCommand() + ->delete($sourceMessageTable, ['in', 'id', array_keys($obsolete)]) + ->execute(); + $this->stdout("{$affected} deleted.\n"); + } elseif ($markUnused) { + $marked=0; + $rows = (new Query()) + ->select(['id', 'message']) + ->from($sourceMessageTable) + ->where(['in', 'id', array_keys($obsolete)]) + ->all($db); + + foreach ($rows as $row) { + $marked++; + $db->createCommand()->update( + $sourceMessageTable, + ['message' => '@@' . $row['message'] . '@@'], + ['id' => $row['id']] + )->execute(); + } + $this->stdout("{$marked} updated.\n"); + } else { + $this->stdout("kept untouched.\n"); } - $this->stdout("updated.\n"); - } else { - $this->stdout("kept untouched.\n"); } + + // get fresh message id list + $freshMessagesIds = []; + $rows = (new Query())->select(['id'])->from($sourceMessageTable)->all($db); + foreach ($rows as $row) { + $freshMessagesIds[] = $row['id']; + } + + $this->stdout("Generating missing rows..."); + $generatedMissingRows = []; + + foreach ($languages as $language) { + $count = 0; + + // get list of ids of translations for this language + $msgRowsIds = []; + $msgRows = (new Query())->select(['id'])->from($messageTable)->where([ + 'language'=>$language, + ])->all($db); + foreach ($msgRows as $row) { + $msgRowsIds[] = $row['id']; + } + + // insert missing + foreach ($freshMessagesIds as $id) { + if (!in_array($id, $msgRowsIds)) { + $db->createCommand() + ->insert($messageTable, ['id' => $id, 'language' => $language]) + ->execute(); + $count++; + } + } + if ($count) { + $generatedMissingRows[] = "{$count} for {$language}"; + } + } + + $this->stdout($generatedMissingRows ? implode(", ", $generatedMissingRows).".\n" : "Nothing to do.\n"); + + $this->stdout("Dropping unused languages..."); + $droppedLanguages=[]; + + $currentLanguages = []; + $rows = (new Query())->select(['language'])->from($messageTable)->groupBy('language')->all($db); + foreach ($rows as $row) { + $currentLanguages[] = $row['language']; + } + + foreach ($currentLanguages as $currentLanguage) { + if (!in_array($currentLanguage, $languages)) { + $deleted=$db->createCommand()->delete($messageTable, "language=:language", [ + 'language'=>$currentLanguage, + ])->execute(); + $droppedLanguages[] = "removed {$deleted} rows for $currentLanguage"; + } + } + + $this->stdout($droppedLanguages ? implode(", ", $droppedLanguages).".\n" : "Nothing to do.\n"); } /** diff --git a/framework/console/controllers/ServeController.php b/framework/console/controllers/ServeController.php index 68a7e50c286..b806f67d55b 100644 --- a/framework/console/controllers/ServeController.php +++ b/framework/console/controllers/ServeController.php @@ -80,7 +80,13 @@ public function actionIndex($address = 'localhost') } $this->stdout("Quit the server with CTRL-C or COMMAND-C.\n"); - passthru('"' . PHP_BINARY . '"' . " -S {$address} -t \"{$documentRoot}\" $router"); + $command = '"' . PHP_BINARY . '"' . " -S {$address} -t \"{$documentRoot}\""; + + if ($this->router !== null && $router !== '') { + $command .= " -r \"{$router}\""; + } + + $this->runCommand($command); } /** @@ -122,4 +128,9 @@ protected function isAddressTaken($address) fclose($fp); return true; } + + protected function runCommand($command) + { + passthru($command); + } } diff --git a/framework/console/widgets/Table.php b/framework/console/widgets/Table.php index 4862e88b6be..c0ece4d4d89 100644 --- a/framework/console/widgets/Table.php +++ b/framework/console/widgets/Table.php @@ -136,7 +136,11 @@ public function setRows(array $rows) { $this->rows = array_map(function($row) { return array_map(function($value) { - return empty($value) && !is_numeric($value) ? ' ' : $value; + return empty($value) && !is_numeric($value) + ? ' ' + : (is_array($value) + ? array_values($value) + : $value); }, array_values($row)); }, $rows); return $this; @@ -252,18 +256,32 @@ protected function renderRow(array $row, $spanLeft, $spanMiddle, $spanRight) if ($index !== 0) { $buffer .= $spanMiddle . ' '; } + + $arrayFromMultilineString = false; + if (is_string($cell)) { + $cellLines = explode(PHP_EOL, $cell); + if (count($cellLines) > 1) { + $cell = $cellLines; + $arrayFromMultilineString = true; + } + } + if (is_array($cell)) { if (empty($renderedChunkTexts[$index])) { $renderedChunkTexts[$index] = ''; $start = 0; - $prefix = $this->listPrefix; + $prefix = $arrayFromMultilineString ? '' : $this->listPrefix; if (!isset($arrayPointer[$index])) { $arrayPointer[$index] = 0; } } else { $start = mb_strwidth($renderedChunkTexts[$index], Yii::$app->charset); } - $chunk = Console::ansiColorizedSubstr($cell[$arrayPointer[$index]], $start, $cellSize - 4); + $chunk = Console::ansiColorizedSubstr( + $cell[$arrayPointer[$index]], + $start, + $cellSize - 2 - Console::ansiStrwidth($prefix) + ); $renderedChunkTexts[$index] .= Console::stripAnsiFormat($chunk); $fullChunkText = Console::stripAnsiFormat($cell[$arrayPointer[$index]]); if (isset($cell[$arrayPointer[$index] + 1]) && $renderedChunkTexts[$index] === $fullChunkText) { @@ -339,6 +357,9 @@ protected function calculateRowsSize() if (is_array($val)) { return max(array_map('yii\helpers\Console::ansiStrwidth', $val)) + Console::ansiStrwidth($this->listPrefix); } + if (is_string($val)) { + return max(array_map('yii\helpers\Console::ansiStrwidth', explode(PHP_EOL, $val))); + } return Console::ansiStrwidth($val); }, $column)) + 2; $this->columnWidths[] = $columnWidth; @@ -388,6 +409,9 @@ protected function calculateRowHeight($row) if (is_array($val)) { return array_map('yii\helpers\Console::ansiStrwidth', $val); } + if (is_string($val)) { + return array_map('yii\helpers\Console::ansiStrwidth', explode(PHP_EOL, $val)); + } return Console::ansiStrwidth($val); }, $row)); return max($rowsPerCell); diff --git a/framework/data/ActiveDataProvider.php b/framework/data/ActiveDataProvider.php index a8b6e158ecf..3a129aa7293 100644 --- a/framework/data/ActiveDataProvider.php +++ b/framework/data/ActiveDataProvider.php @@ -183,15 +183,11 @@ public function setSort($value) $sort->attributes[$attribute] = [ 'asc' => [$attribute => SORT_ASC], 'desc' => [$attribute => SORT_DESC], - 'label' => $model->getAttributeLabel($attribute), ]; } - } else { - foreach ($sort->attributes as $attribute => $config) { - if (!isset($config['label'])) { - $sort->attributes[$attribute]['label'] = $model->getAttributeLabel($attribute); - } - } + } + if ($sort->modelClass === null) { + $sort->modelClass = $modelClass; } } } diff --git a/framework/data/Pagination.php b/framework/data/Pagination.php index e74bc09afcf..a928681c4da 100644 --- a/framework/data/Pagination.php +++ b/framework/data/Pagination.php @@ -133,8 +133,8 @@ class Pagination extends BaseObject implements Linkable */ public $defaultPageSize = 20; /** - * @var array|false the page size limits. The first array element stands for the minimal page size, and the second - * the maximal page size. If this is false, it means [[pageSize]] should always return the value of [[defaultPageSize]]. + * @var array|false the page size limits. The first array element defines the minimum page size, and the second + * the maximum page size. If this is false, it means [[pageSize]] should always return the value of [[defaultPageSize]]. */ public $pageSizeLimit = [1, 50]; diff --git a/framework/data/Sort.php b/framework/data/Sort.php index 5b7ff3b77db..0c0abc8b606 100644 --- a/framework/data/Sort.php +++ b/framework/data/Sort.php @@ -145,7 +145,7 @@ class Sort extends BaseObject */ public $sortParam = 'sort'; /** - * @var array the order that should be used when the current request does not specify any order. + * @var array|null the order that should be used when the current request does not specify any order. * The array keys are attribute names and the array values are the corresponding sort directions. For example, * * ```php @@ -191,6 +191,12 @@ class Sort extends BaseObject * @since 2.0.33 */ public $sortFlags = SORT_REGULAR; + /** + * @var string|null the name of the [[\yii\base\Model]]-based class used by the [[link()]] method to retrieve + * attributes' labels. See [[link]] method for details. + * @since 2.0.49 + */ + public $modelClass; /** @@ -277,6 +283,8 @@ public function getAttributeOrders($recalculate = false) } } } + + return $this->_attributeOrders; } if (empty($this->_attributeOrders) && is_array($this->defaultOrder)) { $this->_attributeOrders = $this->defaultOrder; @@ -361,7 +369,8 @@ public function getAttributeOrder($attribute) * @param array $options additional HTML attributes for the hyperlink tag. * There is one special attribute `label` which will be used as the label of the hyperlink. * If this is not set, the label defined in [[attributes]] will be used. - * If no label is defined, [[\yii\helpers\Inflector::camel2words()]] will be called to get a label. + * If no label is defined, it will be retrieved from the instance of [[modelClass]] (if [[modelClass]] is not null) + * or generated from attribute name using [[\yii\helpers\Inflector::camel2words()]]. * Note that it will not be HTML-encoded. * @return string the generated hyperlink * @throws InvalidConfigException if the attribute is unknown @@ -386,6 +395,11 @@ public function link($attribute, $options = []) } else { if (isset($this->attributes[$attribute]['label'])) { $label = $this->attributes[$attribute]['label']; + } elseif ($this->modelClass !== null) { + $modelClass = $this->modelClass; + /** @var \yii\base\Model $model */ + $model = $modelClass::instance(); + $label = $model->getAttributeLabel($attribute); } else { $label = Inflector::camel2words($attribute); } diff --git a/framework/db/ActiveQueryTrait.php b/framework/db/ActiveQueryTrait.php index e2de1dd12d9..d49fa0fba87 100644 --- a/framework/db/ActiveQueryTrait.php +++ b/framework/db/ActiveQueryTrait.php @@ -135,6 +135,10 @@ protected function createModels($rows) */ public function findWith($with, &$models) { + if (empty($models)) { + return; + } + $primaryModel = reset($models); if (!$primaryModel instanceof ActiveRecordInterface) { /* @var $modelClass ActiveRecordInterface */ diff --git a/framework/db/ActiveRecordInterface.php b/framework/db/ActiveRecordInterface.php index d845e9d32cb..441001a99ff 100644 --- a/framework/db/ActiveRecordInterface.php +++ b/framework/db/ActiveRecordInterface.php @@ -144,6 +144,7 @@ public static function isPrimaryKey($keys); * // Use where() to ignore the default condition * // SELECT FROM customer WHERE age>30 * $customers = Customer::find()->where('age>30')->all(); + * ``` * * @return ActiveQueryInterface the newly created [[ActiveQueryInterface]] instance. */ diff --git a/framework/db/BaseActiveRecord.php b/framework/db/BaseActiveRecord.php index 67a55d7884b..0791c45ec2f 100644 --- a/framework/db/BaseActiveRecord.php +++ b/framework/db/BaseActiveRecord.php @@ -282,7 +282,7 @@ public function canSetProperty($name, $checkVars = true, $checkBehaviors = true) */ public function __get($name) { - if (isset($this->_attributes[$name]) || array_key_exists($name, $this->_attributes)) { + if (array_key_exists($name, $this->_attributes)) { return $this->_attributes[$name]; } @@ -290,7 +290,7 @@ public function __get($name) return null; } - if (isset($this->_related[$name]) || array_key_exists($name, $this->_related)) { + if (array_key_exists($name, $this->_related)) { return $this->_related[$name]; } $value = parent::__get($name); @@ -576,13 +576,24 @@ public function getOldAttribute($name) */ public function setOldAttribute($name, $value) { - if (isset($this->_oldAttributes[$name]) || $this->hasAttribute($name)) { + if ($this->canSetOldAttribute($name)) { $this->_oldAttributes[$name] = $value; } else { throw new InvalidArgumentException(get_class($this) . ' has no attribute named "' . $name . '".'); } } + /** + * Returns if the old named attribute can be set. + * @param string $name the attribute name + * @return bool whether the old attribute can be set + * @see setOldAttribute() + */ + public function canSetOldAttribute($name) + { + return (isset($this->_oldAttributes[$name]) || $this->hasAttribute($name)); + } + /** * Marks an attribute dirty. * This method may be called to force updating a record when calling [[update()]], @@ -639,7 +650,7 @@ public function getDirtyAttributes($names = null) } } else { foreach ($this->_attributes as $name => $value) { - if (isset($names[$name]) && (!array_key_exists($name, $this->_oldAttributes) || $this->isAttributeDirty($name, $value))) { + if (isset($names[$name]) && (!array_key_exists($name, $this->_oldAttributes) || $this->isValueDifferent($value, $this->_oldAttributes[$name]))) { $attributes[$name] = $value; } } @@ -1599,40 +1610,46 @@ public static function isPrimaryKey($keys) /** * Returns the text label for the specified attribute. - * If the attribute looks like `relatedModel.attribute`, then the attribute will be received from the related model. + * The attribute may be specified in a dot format to retrieve the label from related model or allow this model to override the label defined in related model. + * For example, if the attribute is specified as 'relatedModel1.relatedModel2.attr' the function will return the first label definition it can find + * in the following order: + * - the label for 'relatedModel1.relatedModel2.attr' defined in [[attributeLabels()]] of this model; + * - the label for 'relatedModel2.attr' defined in related model represented by relation 'relatedModel1' of this model; + * - the label for 'attr' defined in related model represented by relation 'relatedModel2' of relation 'relatedModel1'. + * If no label definition was found then the value of $this->generateAttributeLabel('relatedModel1.relatedModel2.attr') will be returned. * @param string $attribute the attribute name * @return string the attribute label - * @see generateAttributeLabel() * @see attributeLabels() + * @see generateAttributeLabel() */ public function getAttributeLabel($attribute) { - $labels = $this->attributeLabels(); - if (isset($labels[$attribute])) { - return $labels[$attribute]; - } elseif (strpos($attribute, '.')) { - $attributeParts = explode('.', $attribute); - $neededAttribute = array_pop($attributeParts); + $model = $this; + $modelAttribute = $attribute; + for (;;) { + $labels = $model->attributeLabels(); + if (isset($labels[$modelAttribute])) { + return $labels[$modelAttribute]; + } - $relatedModel = $this; - foreach ($attributeParts as $relationName) { - if ($relatedModel->isRelationPopulated($relationName) && $relatedModel->$relationName instanceof self) { - $relatedModel = $relatedModel->$relationName; - } else { - try { - $relation = $relatedModel->getRelation($relationName); - } catch (InvalidParamException $e) { - return $this->generateAttributeLabel($attribute); - } - /* @var $modelClass ActiveRecordInterface */ - $modelClass = $relation->modelClass; - $relatedModel = $modelClass::instance(); - } + $parts = explode('.', $modelAttribute, 2); + if (count($parts) < 2) { + break; } - $labels = $relatedModel->attributeLabels(); - if (isset($labels[$neededAttribute])) { - return $labels[$neededAttribute]; + list ($relationName, $modelAttribute) = $parts; + + if ($model->isRelationPopulated($relationName) && $model->$relationName instanceof self) { + $model = $model->$relationName; + } else { + try { + $relation = $model->getRelation($relationName); + } catch (InvalidArgumentException $e) { + break; + } + /* @var $modelClass ActiveRecordInterface */ + $modelClass = $relation->modelClass; + $model = $modelClass::instance(); } } @@ -1756,18 +1773,71 @@ private function setRelationDependencies($name, $relation, $viaRelationName = nu } /** - * @param string $attribute - * @param mixed $value + * @param mixed $newValue + * @param mixed $oldValue * @return bool + * @since 2.0.48 + */ + private function isValueDifferent($newValue, $oldValue) + { + if (is_array($newValue) && is_array($oldValue) && ArrayHelper::isAssociative($oldValue)) { + $newValue = ArrayHelper::recursiveSort($newValue); + $oldValue = ArrayHelper::recursiveSort($oldValue); + } + + return $newValue !== $oldValue; + } + + /** + * Eager loads related models for the already loaded primary models. + * + * Helps to reduce the number of queries performed against database if some related models are only used + * when a specific condition is met. For example: + * + * ```php + * $customers = Customer::find()->where(['country_id' => 123])->all(); + * if (Yii:app()->getUser()->getIdentity()->canAccessOrders()) { + * Customer::loadRelationsFor($customers, 'orders.items'); + * } + * ``` + * + * @param array|ActiveRecordInterface[] $models array of primary models. Each model should have the same type and can be: + * - an active record instance; + * - active record instance represented by array (i.e. active record was loaded using [[ActiveQuery::asArray()]]). + * @param string|array $relationNames the names of the relations of primary models to be loaded from database. See [[ActiveQueryInterface::with()]] on how to specify this argument. + * @param bool $asArray whether to load each related model as an array or an object (if the relation itself does not specify that). + * @since 2.0.50 */ - private function isAttributeDirty($attribute, $value) + public static function loadRelationsFor(&$models, $relationNames, $asArray = false) { - $old_attribute = $this->oldAttributes[$attribute]; - if (is_array($value) && is_array($this->oldAttributes[$attribute])) { - $value = ArrayHelper::recursiveSort($value); - $old_attribute = ArrayHelper::recursiveSort($old_attribute); + // ActiveQueryTrait::findWith() called below assumes $models array is non-empty. + if (empty($models)) { + return; } - return $value !== $old_attribute; + static::find()->asArray($asArray)->findWith((array)$relationNames, $models); + } + + /** + * Eager loads related models for the already loaded primary model. + * + * Helps to reduce the number of queries performed against database if some related models are only used + * when a specific condition is met. For example: + * + * ```php + * $customer = Customer::find()->where(['id' => 123])->one(); + * if (Yii:app()->getUser()->getIdentity()->canAccessOrders()) { + * $customer->loadRelations('orders.items'); + * } + * ``` + * + * @param string|array $relationNames the names of the relations of this model to be loaded from database. See [[ActiveQueryInterface::with()]] on how to specify this argument. + * @param bool $asArray whether to load each relation as an array or an object (if the relation itself does not specify that). + * @since 2.0.50 + */ + public function loadRelations($relationNames, $asArray = false) + { + $models = [$this]; + static::loadRelationsFor($models, $relationNames, $asArray); } } diff --git a/framework/db/ColumnSchema.php b/framework/db/ColumnSchema.php index 74e1ddea84b..1d01cec2707 100644 --- a/framework/db/ColumnSchema.php +++ b/framework/db/ColumnSchema.php @@ -174,7 +174,7 @@ protected function typecast($value) case 'boolean': // treating a 0 bit value as false too // https://github.com/yiisoft/yii2/issues/9006 - return (bool) $value && $value !== "\0"; + return (bool) $value && $value !== "\0" && strtolower($value) !== 'false'; case 'double': return (float) $value; } diff --git a/framework/db/Command.php b/framework/db/Command.php index 1ef5a59a82d..72eda72e4e1 100644 --- a/framework/db/Command.php +++ b/framework/db/Command.php @@ -258,7 +258,7 @@ public function prepare($forRead = null) $forRead = false; } if ($forRead || $forRead === null && $this->db->getSchema()->isReadQuery($sql)) { - $pdo = $this->db->getSlavePdo(); + $pdo = $this->db->getSlavePdo(true); } else { $pdo = $this->db->getMasterPdo(); } @@ -377,6 +377,13 @@ public function bindValues($values) $this->pendingParams[$name] = [$value->getValue(), $value->getType()]; $this->params[$name] = $value->getValue(); } else { + if (version_compare(PHP_VERSION, '8.1.0') >= 0) { + if ($value instanceof \BackedEnum) { + $value = $value->value; + } elseif ($value instanceof \UnitEnum) { + $value = $value->name; + } + } $type = $schema->getPdoType($value); $this->pendingParams[$name] = [$value, $type]; $this->params[$name] = $value; @@ -631,7 +638,8 @@ public function delete($table, $condition = '', $params = []) * * The columns in the new table should be specified as name-definition pairs (e.g. 'name' => 'string'), * where name stands for a column name which will be properly quoted by the method, and definition - * stands for the column type which can contain an abstract DB type. + * stands for the column type which must contain an abstract DB type. + * * The method [[QueryBuilder::getColumnType()]] will be called * to convert the abstract column types to physical ones. For example, `string` will be converted * as `varchar(255)`, and `string not null` becomes `varchar(255) not null`. @@ -639,6 +647,16 @@ public function delete($table, $condition = '', $params = []) * If a column is specified with definition only (e.g. 'PRIMARY KEY (name, type)'), it will be directly * inserted into the generated SQL. * + * Example usage: + * ```php + * Yii::$app->db->createCommand()->createTable('post', [ + * 'id' => 'pk', + * 'title' => 'string', + * 'text' => 'text', + * 'column_name double precision null default null', + * ]); + * ``` + * * @param string $table the name of the table to be created. The name will be properly quoted by the method. * @param array $columns the columns (name => definition) in the new table. * @param string|null $options additional SQL fragment that will be appended to the generated SQL. @@ -1153,7 +1171,7 @@ protected function queryInternal($method, $fetchMode = null) $cache = $info[0]; $cacheKey = $this->getCacheKey($method, $fetchMode, ''); $result = $cache->get($cacheKey); - if (is_array($result) && isset($result[0])) { + if (is_array($result) && array_key_exists(0, $result)) { Yii::debug('Query result served from cache', 'yii\db\Command::query'); return $result[0]; } @@ -1324,6 +1342,5 @@ protected function reset() $this->params = []; $this->_refreshTableName = null; $this->_isolationLevel = false; - $this->_retryHandler = null; } } diff --git a/framework/db/Connection.php b/framework/db/Connection.php index 0693d242206..4df8f3af62f 100644 --- a/framework/db/Connection.php +++ b/framework/db/Connection.php @@ -1013,7 +1013,7 @@ public function getDriverName() if (($pos = strpos((string)$this->dsn, ':')) !== false) { $this->_driverName = strtolower(substr($this->dsn, 0, $pos)); } else { - $this->_driverName = strtolower($this->getSlavePdo()->getAttribute(PDO::ATTR_DRIVER_NAME)); + $this->_driverName = strtolower($this->getSlavePdo(true)->getAttribute(PDO::ATTR_DRIVER_NAME)); } } diff --git a/framework/db/Migration.php b/framework/db/Migration.php index be61749514e..c4bf99981af 100644 --- a/framework/db/Migration.php +++ b/framework/db/Migration.php @@ -305,13 +305,25 @@ public function delete($table, $condition = '', $params = []) * * The columns in the new table should be specified as name-definition pairs (e.g. 'name' => 'string'), * where name stands for a column name which will be properly quoted by the method, and definition - * stands for the column type which can contain an abstract DB type. + * stands for the column type which must contain an abstract DB type. * * The [[QueryBuilder::getColumnType()]] method will be invoked to convert any abstract type into a physical one. * * If a column is specified with definition only (e.g. 'PRIMARY KEY (name, type)'), it will be directly * put into the generated SQL. * + * Example usage: + * ```php + * class m200000_000000_create_table_fruits extends \yii\db\Migration + * { + * public function safeUp() + * { + * $this->createTable('{{%fruits}}', [ + * // ... + * 'column_name double precision null default null', + * ``` + * + * * @param string $table the name of the table to be created. The name will be properly quoted by the method. * @param array $columns the columns (name => definition) in the new table. * @param string|null $options additional SQL fragment that will be appended to the generated SQL. diff --git a/framework/db/Query.php b/framework/db/Query.php index f0b215859dc..1819c9c3107 100644 --- a/framework/db/Query.php +++ b/framework/db/Query.php @@ -1049,7 +1049,7 @@ public function rightJoin($table, $on = '', $params = []) /** * Sets the GROUP BY part of the query. - * @param string|array|ExpressionInterface $columns the columns to be grouped by. + * @param string|array|ExpressionInterface|null $columns the columns to be grouped by. * Columns can be specified in either a string (e.g. "id, name") or an array (e.g. ['id', 'name']). * The method will automatically quote the column names unless a column contains some parenthesis * (which means the column contains a DB expression). @@ -1067,7 +1067,7 @@ public function groupBy($columns) { if ($columns instanceof ExpressionInterface) { $columns = [$columns]; - } elseif (!is_array($columns)) { + } elseif (!is_array($columns) && !is_null($columns)) { $columns = preg_split('/\s*,\s*/', trim($columns), -1, PREG_SPLIT_NO_EMPTY); } $this->groupBy = $columns; diff --git a/framework/db/QueryBuilder.php b/framework/db/QueryBuilder.php index b96ffe28eff..114116e67c5 100644 --- a/framework/db/QueryBuilder.php +++ b/framework/db/QueryBuilder.php @@ -692,7 +692,7 @@ public function delete($table, $condition, &$params) * * The columns in the new table should be specified as name-definition pairs (e.g. 'name' => 'string'), * where name stands for a column name which will be properly quoted by the method, and definition - * stands for the column type which can contain an abstract DB type. + * stands for the column type which must contain an abstract DB type. * The [[getColumnType()]] method will be invoked to convert any abstract type into a physical one. * * If a column is specified with definition only (e.g. 'PRIMARY KEY (name, type)'), it will be directly @@ -705,6 +705,7 @@ public function delete($table, $condition, &$params) * 'id' => 'pk', * 'name' => 'string', * 'age' => 'integer', + * 'column_name double precision null default null', # definition only example * ]); * ``` * diff --git a/framework/db/QueryTrait.php b/framework/db/QueryTrait.php index 990520d4e5b..308e31db769 100644 --- a/framework/db/QueryTrait.php +++ b/framework/db/QueryTrait.php @@ -305,7 +305,7 @@ protected function isEmpty($value) /** * Sets the ORDER BY part of the query. - * @param string|array|ExpressionInterface $columns the columns (and the directions) to be ordered by. + * @param string|array|ExpressionInterface|null $columns the columns (and the directions) to be ordered by. * Columns can be specified in either a string (e.g. `"id ASC, name DESC"`) or an array * (e.g. `['id' => SORT_ASC, 'name' => SORT_DESC]`). * @@ -358,12 +358,14 @@ public function addOrderBy($columns) /** * Normalizes format of ORDER BY data. * - * @param array|string|ExpressionInterface $columns the columns value to normalize. See [[orderBy]] and [[addOrderBy]]. + * @param array|string|ExpressionInterface|null $columns the columns value to normalize. See [[orderBy]] and [[addOrderBy]]. * @return array */ protected function normalizeOrderBy($columns) { - if ($columns instanceof ExpressionInterface) { + if (empty($columns)) { + return []; + } elseif ($columns instanceof ExpressionInterface) { return [$columns]; } elseif (is_array($columns)) { return $columns; diff --git a/framework/db/Schema.php b/framework/db/Schema.php index 002a68e2bf8..53c0af9882d 100644 --- a/framework/db/Schema.php +++ b/framework/db/Schema.php @@ -313,7 +313,7 @@ public function refreshTableSchema($name) */ public function createQueryBuilder() { - return new QueryBuilder($this->db); + return Yii::createObject(QueryBuilder::className(), [$this->db]); } /** @@ -328,7 +328,7 @@ public function createQueryBuilder() */ public function createColumnSchemaBuilder($type, $length = null) { - return new ColumnSchemaBuilder($type, $length); + return Yii::createObject(ColumnSchemaBuilder::className(), [$type, $length]); } /** @@ -458,7 +458,7 @@ public function quoteValue($str) return $str; } - if (mb_stripos($this->db->dsn, 'odbc:') === false && ($value = $this->db->getSlavePdo()->quote($str)) !== false) { + if (mb_stripos((string)$this->db->dsn, 'odbc:') === false && ($value = $this->db->getSlavePdo(true)->quote($str)) !== false) { return $value; } @@ -695,7 +695,7 @@ public function isReadQuery($sql) public function getServerVersion() { if ($this->_serverVersion === null) { - $this->_serverVersion = $this->db->getSlavePdo()->getAttribute(\PDO::ATTR_SERVER_VERSION); + $this->_serverVersion = $this->db->getSlavePdo(true)->getAttribute(\PDO::ATTR_SERVER_VERSION); } return $this->_serverVersion; } @@ -809,7 +809,7 @@ protected function setTableMetadata($name, $type, $data) */ protected function normalizePdoRowKeyCase(array $row, $multiple) { - if ($this->db->getSlavePdo()->getAttribute(\PDO::ATTR_CASE) !== \PDO::CASE_UPPER) { + if ($this->db->getSlavePdo(true)->getAttribute(\PDO::ATTR_CASE) !== \PDO::CASE_UPPER) { return $row; } diff --git a/framework/db/conditions/LikeCondition.php b/framework/db/conditions/LikeCondition.php index f4684d3f54f..0fe2a8fa0eb 100644 --- a/framework/db/conditions/LikeCondition.php +++ b/framework/db/conditions/LikeCondition.php @@ -18,8 +18,8 @@ class LikeCondition extends SimpleCondition { /** - * @var array|null|false map of chars to their replacements, false if characters should not be escaped - * or either null or empty array if escaping is condition builder responsibility. + * @var array|null|false map of chars to their replacements, `false` if characters should not be escaped + * or either `null` or empty array if escaping is condition builder responsibility. * By default it's set to `null`. */ protected $escapingReplacements; @@ -40,9 +40,10 @@ public function __construct($column, $operator, $value) /** * This method allows to specify how to escape special characters in the value(s). * - * @param array an array of mappings from the special characters to their escaped counterparts. - * You may use `false` or an empty array to indicate the values are already escaped and no escape - * should be applied. Note that when using an escape mapping (or the third operand is not provided), + * @param array|null|false an array of mappings from the special characters to their escaped counterparts. + * You may use `false` to indicate the values are already escaped and no escape should be applied, + * or either `null` or empty array if escaping is condition builder responsibility. + * Note that when using an escape mapping (or the third operand is not provided), * the values will be automatically enclosed within a pair of percentage characters. */ public function setEscapingReplacements($escapingReplacements) @@ -51,7 +52,7 @@ public function setEscapingReplacements($escapingReplacements) } /** - * @return array|false + * @return array|null|false */ public function getEscapingReplacements() { diff --git a/framework/db/conditions/LikeConditionBuilder.php b/framework/db/conditions/LikeConditionBuilder.php index 049be5b92ec..accb849c2aa 100644 --- a/framework/db/conditions/LikeConditionBuilder.php +++ b/framework/db/conditions/LikeConditionBuilder.php @@ -78,7 +78,7 @@ public function build(ExpressionInterface $expression, array &$params = []) if ($value instanceof ExpressionInterface) { $phName = $this->queryBuilder->buildExpression($value, $params); } else { - $phName = $this->queryBuilder->bindParam(empty($escape) ? $value : ('%' . strtr($value, $escape) . '%'), $params); + $phName = $this->queryBuilder->bindParam(empty($escape) ? $value : ('%' . strtr((string)$value, $escape) . '%'), $params); } $parts[] = "{$column} {$operator} {$phName}{$escapeSql}"; } diff --git a/framework/db/cubrid/Schema.php b/framework/db/cubrid/Schema.php index f2e0e3643c8..65b6c11b9d4 100644 --- a/framework/db/cubrid/Schema.php +++ b/framework/db/cubrid/Schema.php @@ -7,6 +7,7 @@ namespace yii\db\cubrid; +use Yii; use yii\base\NotSupportedException; use yii\db\Constraint; use yii\db\ConstraintFinderInterface; @@ -91,7 +92,7 @@ class Schema extends \yii\db\Schema implements ConstraintFinderInterface */ protected function findTableNames($schema = '') { - $pdo = $this->db->getSlavePdo(); + $pdo = $this->db->getSlavePdo(true); $tables = $pdo->cubrid_schema(\PDO::CUBRID_SCH_TABLE); $tableNames = []; foreach ($tables as $table) { @@ -109,7 +110,7 @@ protected function findTableNames($schema = '') */ protected function loadTableSchema($name) { - $pdo = $this->db->getSlavePdo(); + $pdo = $this->db->getSlavePdo(true); $tableInfo = $pdo->cubrid_schema(\PDO::CUBRID_SCH_TABLE, $name); @@ -158,7 +159,7 @@ protected function loadTableSchema($name) */ protected function loadTablePrimaryKey($tableName) { - $primaryKey = $this->db->getSlavePdo()->cubrid_schema(\PDO::CUBRID_SCH_PRIMARY_KEY, $tableName); + $primaryKey = $this->db->getSlavePdo(true)->cubrid_schema(\PDO::CUBRID_SCH_PRIMARY_KEY, $tableName); if (empty($primaryKey)) { return null; } @@ -182,7 +183,7 @@ protected function loadTableForeignKeys($tableName) 3 => 'SET NULL', ]; - $foreignKeys = $this->db->getSlavePdo()->cubrid_schema(\PDO::CUBRID_SCH_IMPORTED_KEYS, $tableName); + $foreignKeys = $this->db->getSlavePdo(true)->cubrid_schema(\PDO::CUBRID_SCH_IMPORTED_KEYS, $tableName); $foreignKeys = ArrayHelper::index($foreignKeys, null, 'FK_NAME'); ArrayHelper::multisort($foreignKeys, 'KEY_SEQ', SORT_ASC, SORT_NUMERIC); $result = []; @@ -248,7 +249,7 @@ public function releaseSavepoint($name) */ public function createQueryBuilder() { - return new QueryBuilder($this->db); + return Yii::createObject(QueryBuilder::className(), [$this->db]); } /** @@ -385,7 +386,7 @@ public function createColumnSchemaBuilder($type, $length = null) */ private function loadTableConstraints($tableName, $returnType) { - $constraints = $this->db->getSlavePdo()->cubrid_schema(\PDO::CUBRID_SCH_CONSTRAINT, $tableName); + $constraints = $this->db->getSlavePdo(true)->cubrid_schema(\PDO::CUBRID_SCH_CONSTRAINT, $tableName); $constraints = ArrayHelper::index($constraints, null, ['TYPE', 'NAME']); ArrayHelper::multisort($constraints, 'KEY_ORDER', SORT_ASC, SORT_NUMERIC); $result = [ diff --git a/framework/db/mssql/QueryBuilder.php b/framework/db/mssql/QueryBuilder.php index 8094f1dd3c8..1225c466cc6 100644 --- a/framework/db/mssql/QueryBuilder.php +++ b/framework/db/mssql/QueryBuilder.php @@ -460,10 +460,9 @@ private function normalizeTableRowData($table, $columns, &$params) $columnSchemas = $tableSchema->columns; foreach ($columns as $name => $value) { // @see https://github.com/yiisoft/yii2/issues/12599 - if (isset($columnSchemas[$name]) && $columnSchemas[$name]->type === Schema::TYPE_BINARY && $columnSchemas[$name]->dbType === 'varbinary' && (is_string($value) || $value === null)) { - $phName = $this->bindParam($value, $params); + if (isset($columnSchemas[$name]) && $columnSchemas[$name]->type === Schema::TYPE_BINARY && $columnSchemas[$name]->dbType === 'varbinary' && (is_string($value))) { // @see https://github.com/yiisoft/yii2/issues/12599 - $columns[$name] = new Expression("CONVERT(VARBINARY(MAX), $phName)", $params); + $columns[$name] = new Expression('CONVERT(VARBINARY(MAX), ' . ('0x' . bin2hex($value)) . ')'); } } } @@ -485,7 +484,7 @@ public function insert($table, $columns, &$params) list($names, $placeholders, $values, $params) = $this->prepareInsertValues($table, $columns, $params); $cols = []; - $columns = []; + $outputColumns = []; if ($version2005orLater) { /* @var $schema TableSchema */ $schema = $this->db->getTableSchema($table); @@ -493,19 +492,26 @@ public function insert($table, $columns, &$params) if ($column->isComputed) { continue; } + + $dbType = $column->dbType; + if (in_array($dbType, ['char', 'varchar', 'nchar', 'nvarchar', 'binary', 'varbinary'])) { + $dbType .= '(MAX)'; + } + if ($column->dbType === Schema::TYPE_TIMESTAMP) { + $dbType = $column->allowNull ? 'varbinary(8)' : 'binary(8)'; + } + $quoteColumnName = $this->db->quoteColumnName($column->name); - $cols[] = $quoteColumnName . ' ' - . $column->dbType - . (in_array($column->dbType, ['char', 'varchar', 'nchar', 'nvarchar', 'binary', 'varbinary']) ? "(MAX)" : "") - . ' ' . ($column->allowNull ? "NULL" : ""); - $columns[] = 'INSERTED.' . $quoteColumnName; + $cols[] = $quoteColumnName . ' ' . $dbType . ' ' . ($column->allowNull ? "NULL" : ""); + $outputColumns[] = 'INSERTED.' . $quoteColumnName; } } - $countColumns = count($columns); + + $countColumns = count($outputColumns); $sql = 'INSERT INTO ' . $this->db->quoteTableName($table) . (!empty($names) ? ' (' . implode(', ', $names) . ')' : '') - . (($version2005orLater && $countColumns) ? ' OUTPUT ' . implode(',', $columns) . ' INTO @temporary_inserted' : '') + . (($version2005orLater && $countColumns) ? ' OUTPUT ' . implode(',', $outputColumns) . ' INTO @temporary_inserted' : '') . (!empty($placeholders) ? ' VALUES (' . implode(', ', $placeholders) . ')' : $values); if ($version2005orLater && $countColumns) { diff --git a/framework/db/mssql/Schema.php b/framework/db/mssql/Schema.php index 640b6ad093a..db7f07c87cb 100644 --- a/framework/db/mssql/Schema.php +++ b/framework/db/mssql/Schema.php @@ -7,6 +7,7 @@ namespace yii\db\mssql; +use Yii; use yii\db\CheckConstraint; use yii\db\Constraint; use yii\db\ConstraintFinderInterface; @@ -331,7 +332,7 @@ public function rollBackSavepoint($name) */ public function createQueryBuilder() { - return new QueryBuilder($this->db); + return Yii::createObject(QueryBuilder::className(), [$this->db]); } /** @@ -374,6 +375,7 @@ protected function resolveTableNames($table, $name) */ protected function loadColumnSchema($info) { + $isVersion2017orLater = version_compare($this->db->getSchema()->getServerVersion(), '14', '>='); $column = $this->createColumnSchema(); $column->name = $info['column_name']; @@ -392,20 +394,21 @@ protected function loadColumnSchema($info) if (isset($this->typeMap[$type])) { $column->type = $this->typeMap[$type]; } + + if ($isVersion2017orLater && $type === 'bit') { + $column->type = 'boolean'; + } + if (!empty($matches[2])) { $values = explode(',', $matches[2]); $column->size = $column->precision = (int) $values[0]; + if (isset($values[1])) { $column->scale = (int) $values[1]; } - if ($column->size === 1 && ($type === 'tinyint' || $type === 'bit')) { - $column->type = 'boolean'; - } elseif ($type === 'bit') { - if ($column->size > 32) { - $column->type = 'bigint'; - } elseif ($column->size === 32) { - $column->type = 'integer'; - } + + if ($isVersion2017orLater === false) { + $column->type = $this->booleanTypeLegacy($column->size, $type); } } } @@ -810,6 +813,29 @@ public function insert($table, $columns) */ public function createColumnSchemaBuilder($type, $length = null) { - return new ColumnSchemaBuilder($type, $length, $this->db); + return Yii::createObject(ColumnSchemaBuilder::className(), [$type, $length, $this->db]); + } + + /** + * Assigns a type boolean for the column type bit, for legacy versions of MSSQL. + * + * @param int $size column size. + * @param string $type column type. + * + * @return string column type. + */ + private function booleanTypeLegacy($size, $type) + { + if ($size === 1 && ($type === 'tinyint' || $type === 'bit')) { + return 'boolean'; + } elseif ($type === 'bit') { + if ($size > 32) { + return 'bigint'; + } elseif ($size === 32) { + return 'integer'; + } + } + + return $type; } } diff --git a/framework/db/mysql/QueryBuilder.php b/framework/db/mysql/QueryBuilder.php index b1517ab4da7..fc10931c7a1 100644 --- a/framework/db/mysql/QueryBuilder.php +++ b/framework/db/mysql/QueryBuilder.php @@ -410,7 +410,7 @@ private function supportsFractionalSeconds() } $version = $cache ? $cache->get($key) : null; if (!$version) { - $version = $this->db->getSlavePdo()->getAttribute(\PDO::ATTR_SERVER_VERSION); + $version = $this->db->getSlavePdo(true)->getAttribute(\PDO::ATTR_SERVER_VERSION); if ($cache) { $cache->set($key, $version, $this->db->schemaCacheDuration); } diff --git a/framework/db/mysql/Schema.php b/framework/db/mysql/Schema.php index 6a795b1de28..fa2270eb77d 100644 --- a/framework/db/mysql/Schema.php +++ b/framework/db/mysql/Schema.php @@ -7,6 +7,7 @@ namespace yii\db\mysql; +use Yii; use yii\base\InvalidConfigException; use yii\base\NotSupportedException; use yii\db\Constraint; @@ -44,6 +45,8 @@ class Schema extends \yii\db\Schema implements ConstraintFinderInterface */ public $typeMap = [ 'tinyint' => self::TYPE_TINYINT, + 'bool' => self::TYPE_TINYINT, + 'boolean' => self::TYPE_TINYINT, 'bit' => self::TYPE_INTEGER, 'smallint' => self::TYPE_SMALLINT, 'mediumint' => self::TYPE_INTEGER, @@ -52,9 +55,12 @@ class Schema extends \yii\db\Schema implements ConstraintFinderInterface 'bigint' => self::TYPE_BIGINT, 'float' => self::TYPE_FLOAT, 'double' => self::TYPE_DOUBLE, + 'double precision' => self::TYPE_DOUBLE, 'real' => self::TYPE_FLOAT, 'decimal' => self::TYPE_DECIMAL, 'numeric' => self::TYPE_DECIMAL, + 'dec' => self::TYPE_DECIMAL, + 'fixed' => self::TYPE_DECIMAL, 'tinytext' => self::TYPE_TEXT, 'mediumtext' => self::TYPE_TEXT, 'longtext' => self::TYPE_TEXT, @@ -70,6 +76,8 @@ class Schema extends \yii\db\Schema implements ConstraintFinderInterface 'time' => self::TYPE_TIME, 'timestamp' => self::TYPE_TIMESTAMP, 'enum' => self::TYPE_STRING, + 'set' => self::TYPE_STRING, + 'binary' => self::TYPE_BINARY, 'varbinary' => self::TYPE_BINARY, 'json' => self::TYPE_JSON, ]; @@ -214,7 +222,7 @@ protected function loadTableDefaultValues($tableName) */ public function createQueryBuilder() { - return new QueryBuilder($this->db); + return Yii::createObject(QueryBuilder::className(), [$this->db]); } /** @@ -464,7 +472,7 @@ public function findUniqueIndexes($table) */ public function createColumnSchemaBuilder($type, $length = null) { - return new ColumnSchemaBuilder($type, $length, $this->db); + return Yii::createObject(ColumnSchemaBuilder::className(), [$type, $length, $this->db]); } /** @@ -476,7 +484,7 @@ public function createColumnSchemaBuilder($type, $length = null) protected function isOldMysql() { if ($this->_oldMysql === null) { - $version = $this->db->getSlavePdo()->getAttribute(\PDO::ATTR_SERVER_VERSION); + $version = $this->db->getSlavePdo(true)->getAttribute(\PDO::ATTR_SERVER_VERSION); $this->_oldMysql = version_compare($version, '5.1', '<='); } diff --git a/framework/db/oci/Schema.php b/framework/db/oci/Schema.php index 5e581441892..e0e4c05e2da 100644 --- a/framework/db/oci/Schema.php +++ b/framework/db/oci/Schema.php @@ -7,6 +7,7 @@ namespace yii\db\oci; +use Yii; use yii\base\InvalidCallException; use yii\base\NotSupportedException; use yii\db\CheckConstraint; @@ -261,7 +262,7 @@ public function quoteSimpleTableName($name) */ public function createQueryBuilder() { - return new QueryBuilder($this->db); + return Yii::createObject(QueryBuilder::className(), [$this->db]); } /** @@ -269,7 +270,7 @@ public function createQueryBuilder() */ public function createColumnSchemaBuilder($type, $length = null) { - return new ColumnSchemaBuilder($type, $length, $this->db); + return Yii::createObject(ColumnSchemaBuilder::className(), [$type, $length]); } /** diff --git a/framework/db/pgsql/Schema.php b/framework/db/pgsql/Schema.php index 8fb5943b92b..154e01a3808 100644 --- a/framework/db/pgsql/Schema.php +++ b/framework/db/pgsql/Schema.php @@ -7,6 +7,7 @@ namespace yii\db\pgsql; +use Yii; use yii\base\NotSupportedException; use yii\db\CheckConstraint; use yii\db\Constraint; @@ -288,7 +289,7 @@ protected function loadTableDefaultValues($tableName) */ public function createQueryBuilder() { - return new QueryBuilder($this->db); + return Yii::createObject(QueryBuilder::className(), [$this->db]); } /** diff --git a/framework/db/sqlite/Schema.php b/framework/db/sqlite/Schema.php index 2ccd2be1ba1..32b209b2254 100644 --- a/framework/db/sqlite/Schema.php +++ b/framework/db/sqlite/Schema.php @@ -7,6 +7,7 @@ namespace yii\db\sqlite; +use Yii; use yii\base\NotSupportedException; use yii\db\CheckConstraint; use yii\db\ColumnSchema; @@ -206,7 +207,7 @@ protected function loadTableDefaultValues($tableName) */ public function createQueryBuilder() { - return new QueryBuilder($this->db); + return Yii::createObject(QueryBuilder::className(), [$this->db]); } /** @@ -215,7 +216,7 @@ public function createQueryBuilder() */ public function createColumnSchemaBuilder($type, $length = null) { - return new ColumnSchemaBuilder($type, $length); + return Yii::createObject(ColumnSchemaBuilder::className(), [$type, $length]); } /** diff --git a/framework/di/Container.php b/framework/di/Container.php index ed80f7c54b3..25626c54751 100644 --- a/framework/di/Container.php +++ b/framework/di/Container.php @@ -256,7 +256,7 @@ public function get($class, $params = [], $config = []) * parameters, `$config` the object configuration, and `$container` the container object. The return value * of the callable will be returned by [[get()]] as the object instance requested. * - a configuration array: the array contains name-value pairs that will be used to initialize the property - * values of the newly created object when [[get()]] is called. The `class` element stands for the + * values of the newly created object when [[get()]] is called. The `class` element stands for * the class of the object to be created. If `class` is not specified, `$class` will be used as the class name. * - a string: a class name, an interface name or an alias name. * @param array $params the list of constructor parameters. The parameters will be passed to the class diff --git a/framework/filters/PageCache.php b/framework/filters/PageCache.php index c10dcabe4f6..b9f02ba4ec4 100644 --- a/framework/filters/PageCache.php +++ b/framework/filters/PageCache.php @@ -7,6 +7,7 @@ namespace yii\filters; +use Closure; use Yii; use yii\base\Action; use yii\base\ActionFilter; @@ -98,7 +99,7 @@ class PageCache extends ActionFilter implements DynamicContentAwareInterface */ public $dependency; /** - * @var string[]|string list of factors that would cause the variation of the content being cached. + * @var string[]|string|callable list of factors that would cause the variation of the content being cached. * Each factor is a string representing a variation (e.g. the language, a GET parameter). * The following variation setting will cause the content to be cached in different versions * according to the current application language: @@ -108,6 +109,20 @@ class PageCache extends ActionFilter implements DynamicContentAwareInterface * Yii::$app->language, * ] * ``` + * + * Since version 2.0.48 you can provide an anonymous function to generate variations. This is especially helpful + * when you need to access the User component, which is resolved before the PageCache behavior: + * + * ```php + * 'variations' => function() { + * return [ + * Yii::$app->language, + * Yii::$app->user->id + * ]; + * } + * ``` + * + * The callable should return an array. */ public $variations; /** @@ -318,7 +333,13 @@ protected function calculateCacheKey() if ($this->varyByRoute) { $key[] = Yii::$app->requestedRoute; } - return array_merge($key, (array)$this->variations); + + if ($this->variations instanceof Closure) { + $variations = call_user_func($this->variations, $this); + } else { + $variations = $this->variations; + } + return array_merge($key, (array) $variations); } /** diff --git a/framework/filters/auth/CompositeAuth.php b/framework/filters/auth/CompositeAuth.php index 81679ea1143..02817d43227 100644 --- a/framework/filters/auth/CompositeAuth.php +++ b/framework/filters/auth/CompositeAuth.php @@ -8,6 +8,7 @@ namespace yii\filters\auth; use Yii; +use yii\base\ActionFilter; use yii\base\Controller; use yii\base\InvalidConfigException; @@ -73,10 +74,17 @@ public function authenticate($user, $request, $response) if ( $this->owner instanceof Controller - && (!isset($this->owner->action) || !$auth->isActive($this->owner->action)) + && ( + !isset($this->owner->action) + || ( + $auth instanceof ActionFilter + && !$auth->isActive($this->owner->action) + ) + ) ) { continue; } + $identity = $auth->authenticate($user, $request, $response); if ($identity !== null) { return $identity; diff --git a/framework/helpers/BaseArrayHelper.php b/framework/helpers/BaseArrayHelper.php index 0e615a579db..56411163e1e 100644 --- a/framework/helpers/BaseArrayHelper.php +++ b/framework/helpers/BaseArrayHelper.php @@ -327,7 +327,12 @@ public static function setValue(&$array, $path, $value) */ public static function remove(&$array, $key, $default = null) { - if (is_array($array) && (isset($array[$key]) || array_key_exists($key, $array))) { + // ToDo: This check can be removed when the minimum PHP version is >= 8.1 (Yii2.2) + if (is_float($key)) { + $key = (int)$key; + } + + if (is_array($array) && array_key_exists($key, $array)) { $value = $array[$key]; unset($array[$key]); @@ -608,17 +613,20 @@ public static function map($array, $from, $to, $group = null) * Checks if the given array contains the specified key. * This method enhances the `array_key_exists()` function by supporting case-insensitive * key comparison. - * @param string $key the key to check + * @param string|int $key the key to check * @param array|ArrayAccess $array the array with keys to check * @param bool $caseSensitive whether the key comparison should be case-sensitive * @return bool whether the array contains the specified key */ public static function keyExists($key, $array, $caseSensitive = true) { + // ToDo: This check can be removed when the minimum PHP version is >= 8.1 (Yii2.2) + if (is_float($key)) { + $key = (int)$key; + } + if ($caseSensitive) { - // Function `isset` checks key faster but skips `null`, `array_key_exists` handles this case - // https://www.php.net/manual/en/function.array-key-exists.php#107786 - if (is_array($array) && (isset($array[$key]) || array_key_exists($key, $array))) { + if (is_array($array) && array_key_exists($key, $array)) { return true; } // Cannot use `array_has_key` on Objects for PHP 7.4+, therefore we need to check using [[ArrayAccess::offsetExists()]] diff --git a/framework/helpers/BaseConsole.php b/framework/helpers/BaseConsole.php index abb838c9c47..febeed313b1 100644 --- a/framework/helpers/BaseConsole.php +++ b/framework/helpers/BaseConsole.php @@ -948,13 +948,17 @@ public static function confirm($message, $default = false) * @param string $prompt the prompt message * @param array $options Key-value array of options to choose from. Key is what is inputed and used, value is * what's displayed to end user by help command. + * @param string|null $default value to use when the user doesn't provide an option. + * If the default is `null`, the user is required to select an option. * * @return string An option character the user chose + * @since 2.0.49 Added the $default argument */ - public static function select($prompt, $options = []) + public static function select($prompt, $options = [], $default = null) { top: - static::stdout("$prompt [" . implode(',', array_keys($options)) . ',?]: '); + static::stdout("$prompt (" . implode(',', array_keys($options)) . ',?)' + . ($default !== null ? '[' . $default . ']' : '') . ': '); $input = static::stdin(); if ($input === '?') { foreach ($options as $key => $value) { @@ -962,6 +966,8 @@ public static function select($prompt, $options = []) } static::output(' ? - Show help'); goto top; + } elseif ($default !== null && $input === '') { + return $default; } elseif (!array_key_exists($input, $options)) { goto top; } diff --git a/framework/helpers/BaseFileHelper.php b/framework/helpers/BaseFileHelper.php index 35deec5ef49..55445aec009 100644 --- a/framework/helpers/BaseFileHelper.php +++ b/framework/helpers/BaseFileHelper.php @@ -39,6 +39,11 @@ class BaseFileHelper * @since 2.0.14 */ public static $mimeAliasesFile = '@yii/helpers/mimeAliases.php'; + /** + * @var string the path (or alias) of a PHP file containing extensions per MIME type. + * @since 2.0.48 + */ + public static $mimeExtensionsFile = '@yii/helpers/mimeExtensions.php'; /** @@ -213,10 +218,49 @@ public static function getExtensionsByMimeType($mimeType, $magicFile = null) $mimeType = $aliases[$mimeType]; } + // Note: For backwards compatibility the "MimeTypes" file is used. $mimeTypes = static::loadMimeTypes($magicFile); return array_keys($mimeTypes, mb_strtolower($mimeType, 'UTF-8'), true); } + /** + * Determines the most common extension by given MIME type. + * This method will use a local map between MIME types and extension names. + * @param string $mimeType file MIME type. + * @param bool $preferShort return an extension with a maximum of 3 characters. + * @param string|null $magicFile the path (or alias) of the file that contains all available MIME type information. + * If this is not set, the file specified by [[mimeMagicFile]] will be used. + * @return string|null the extensions corresponding to the specified MIME type + * @since 2.0.48 + */ + public static function getExtensionByMimeType($mimeType, $preferShort = false, $magicFile = null) + { + $aliases = static::loadMimeAliases(static::$mimeAliasesFile); + if (isset($aliases[$mimeType])) { + $mimeType = $aliases[$mimeType]; + } + + $mimeExtensions = static::loadMimeExtensions($magicFile); + + if (!array_key_exists($mimeType, $mimeExtensions)) { + return null; + } + + $extensions = $mimeExtensions[$mimeType]; + if (is_array($extensions)) { + if ($preferShort) { + foreach ($extensions as $extension) { + if (mb_strlen($extension, 'UTF-8') <= 3) { + return $extension; + } + } + } + return $extensions[0]; + } else { + return $extensions; + } + } + private static $_mimeTypes = []; /** @@ -260,6 +304,28 @@ protected static function loadMimeAliases($aliasesFile) return self::$_mimeAliases[$aliasesFile]; } + private static $_mimeExtensions = []; + + /** + * Loads MIME extensions from the specified file. + * @param string|null $extensionsFile the path (or alias) of the file that contains MIME type aliases. + * If this is not set, the file specified by [[mimeAliasesFile]] will be used. + * @return array the mapping from file extensions to MIME types + * @since 2.0.48 + */ + protected static function loadMimeExtensions($extensionsFile) + { + if ($extensionsFile === null) { + $extensionsFile = static::$mimeExtensionsFile; + } + $extensionsFile = Yii::getAlias($extensionsFile); + if (!isset(self::$_mimeExtensions[$extensionsFile])) { + self::$_mimeExtensions[$extensionsFile] = require $extensionsFile; + } + + return self::$_mimeExtensions[$extensionsFile]; + } + /** * Copies a whole directory as another one. * The files and sub-directories will also be copied over. @@ -465,6 +531,7 @@ public static function unlink($path) * If a negated pattern matches, this will override lower precedence patterns sources. Put a backslash (`\`) in front of the first `!` * for patterns that begin with a literal `!`, for example, `\!important!.txt`. * Note, the '/' characters in a pattern matches both '/' and '\' in the paths. + * You can find more details about the gitignore pattern format [here](https://git-scm.com/docs/gitignore/en#_pattern_format). * - `only`: array, list of patterns that the file paths should match if they are to be returned. Directory paths * are not checked against them. Same pattern matching rules as in the `except` option are used. * If a file path matches a pattern in both `only` and `except`, it will NOT be returned. diff --git a/framework/helpers/BaseFormatConverter.php b/framework/helpers/BaseFormatConverter.php index 1f2aeb4d673..3cea9c95017 100644 --- a/framework/helpers/BaseFormatConverter.php +++ b/framework/helpers/BaseFormatConverter.php @@ -97,22 +97,13 @@ class BaseFormatConverter * @param string|null $locale the locale to use for converting ICU short patterns `short`, `medium`, `long` and `full`. * If not given, `Yii::$app->language` will be used. * @return string The converted date format pattern. + * @throws \Exception */ public static function convertDateIcuToPhp($pattern, $type = 'date', $locale = null) { if (isset(self::$_icuShortFormats[$pattern])) { if (extension_loaded('intl')) { - if ($locale === null) { - $locale = Yii::$app->language; - } - if ($type === 'date') { - $formatter = new IntlDateFormatter($locale, self::$_icuShortFormats[$pattern], IntlDateFormatter::NONE); - } elseif ($type === 'time') { - $formatter = new IntlDateFormatter($locale, IntlDateFormatter::NONE, self::$_icuShortFormats[$pattern]); - } else { - $formatter = new IntlDateFormatter($locale, self::$_icuShortFormats[$pattern], self::$_icuShortFormats[$pattern]); - } - $pattern = $formatter->getPattern(); + $pattern = self::createFormatter($locale, $type, $pattern); } else { return static::$phpFallbackDatePatterns[$pattern][$type]; } @@ -350,22 +341,13 @@ public static function convertDatePhpToIcu($pattern) * @param string|null $locale the locale to use for converting ICU short patterns `short`, `medium`, `long` and `full`. * If not given, `Yii::$app->language` will be used. * @return string The converted date format pattern. + * @throws \Exception */ public static function convertDateIcuToJui($pattern, $type = 'date', $locale = null) { if (isset(self::$_icuShortFormats[$pattern])) { if (extension_loaded('intl')) { - if ($locale === null) { - $locale = Yii::$app->language; - } - if ($type === 'date') { - $formatter = new IntlDateFormatter($locale, self::$_icuShortFormats[$pattern], IntlDateFormatter::NONE); - } elseif ($type === 'time') { - $formatter = new IntlDateFormatter($locale, IntlDateFormatter::NONE, self::$_icuShortFormats[$pattern]); - } else { - $formatter = new IntlDateFormatter($locale, self::$_icuShortFormats[$pattern], self::$_icuShortFormats[$pattern]); - } - $pattern = $formatter->getPattern(); + $pattern = self::createFormatter($locale, $type, $pattern); } else { return static::$juiFallbackDatePatterns[$pattern][$type]; } @@ -545,4 +527,32 @@ public static function convertDatePhpToJui($pattern) 'U' => '@', // Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT) ]); } + + /** + * Creates a date/time formatter based on the given parameters. + * + * @param string|null $locale The locale to be used. If null, the application's current language will be used. + * @param string $type The type of formatter ('date', 'time', etc.) + * @param string $pattern The pattern for the IntlDateFormatter. + * + * @return string The resulting pattern after formatter creation. + * + * @throws \Exception If the 'intl' extension is not loaded. + */ + private static function createFormatter($locale, $type, $pattern) + { + if ($locale === null) { + $locale = Yii::$app->language; + } + + if ($type === 'date') { + $formatter = new IntlDateFormatter($locale, self::$_icuShortFormats[$pattern], IntlDateFormatter::NONE); + } elseif ($type === 'time') { + $formatter = new IntlDateFormatter($locale, IntlDateFormatter::NONE, self::$_icuShortFormats[$pattern]); + } else { + $formatter = new IntlDateFormatter($locale, self::$_icuShortFormats[$pattern], self::$_icuShortFormats[$pattern]); + } + + return $formatter->getPattern(); + } } diff --git a/framework/helpers/BaseHtml.php b/framework/helpers/BaseHtml.php index bd7f1d6fdd5..4f17fa670ea 100644 --- a/framework/helpers/BaseHtml.php +++ b/framework/helpers/BaseHtml.php @@ -792,7 +792,8 @@ protected static function booleanInput($type, $name, $checked = false, $options /** * Generates a drop-down list. * @param string $name the input name - * @param string|array|null $selection the selected value(s). String for single or array for multiple selection(s). + * @param string|bool|array|null $selection the selected value(s). String/boolean for single or array for multiple + * selection(s). * @param array $items the option data items. The array keys are option values, and the array values * are the corresponding option labels. The array can also be nested (i.e. some array values are arrays too). * For each sub-array, an option group will be generated whose label is the key associated with the sub-array. @@ -849,7 +850,8 @@ public static function dropDownList($name, $selection = null, $items = [], $opti /** * Generates a list box. * @param string $name the input name - * @param string|array|null $selection the selected value(s). String for single or array for multiple selection(s). + * @param string|bool|array|null $selection the selected value(s). String for single or array for multiple + * selection(s). * @param array $items the option data items. The array keys are option values, and the array values * are the corresponding option labels. The array can also be nested (i.e. some array values are arrays too). * For each sub-array, an option group will be generated whose label is the key associated with the sub-array. @@ -1258,6 +1260,7 @@ public static function activeHint($model, $attribute, $options = []) * - showAllErrors: boolean, if set to true every error message for each attribute will be shown otherwise * only the first error message for each attribute will be shown. Defaults to `false`. * Option is available since 2.0.10. + * - emptyClass: string, the class name that is added to an empty summary. * * The rest of the options will be rendered as the attributes of the container tag. * @@ -1269,12 +1272,17 @@ public static function errorSummary($models, $options = []) $footer = ArrayHelper::remove($options, 'footer', ''); $encode = ArrayHelper::remove($options, 'encode', true); $showAllErrors = ArrayHelper::remove($options, 'showAllErrors', false); + $emptyClass = ArrayHelper::remove($options, 'emptyClass', null); unset($options['header']); $lines = self::collectErrors($models, $encode, $showAllErrors); if (empty($lines)) { // still render the placeholder for client-side validation use $content = '
    '; - $options['style'] = isset($options['style']) ? rtrim($options['style'], ';') . '; display:none' : 'display:none'; + if ($emptyClass !== null) { + $options['class'] = $emptyClass; + } else { + $options['style'] = isset($options['style']) ? rtrim($options['style'], ';') . '; display:none' : 'display:none'; + } } else { $content = '
    • ' . implode("
    • \n
    • ", $lines) . '
    '; } @@ -1854,7 +1862,8 @@ protected static function activeListInput($type, $model, $attribute, $items, $op /** * Renders the option tags that can be used by [[dropDownList()]] and [[listBox()]]. - * @param string|array|null $selection the selected value(s). String for single or array for multiple selection(s). + * @param string|array|bool|null $selection the selected value(s). String/boolean for single or array for multiple + * selection(s). * @param array $items the option data items. The array keys are option values, and the array values * are the corresponding option labels. The array can also be nested (i.e. some array values are arrays too). * For each sub-array, an option group will be generated whose label is the key associated with the sub-array. @@ -1872,7 +1881,17 @@ protected static function activeListInput($type, $model, $attribute, $items, $op public static function renderSelectOptions($selection, $items, &$tagOptions = []) { if (ArrayHelper::isTraversable($selection)) { - $selection = array_map('strval', ArrayHelper::toArray($selection)); + $normalizedSelection = []; + foreach (ArrayHelper::toArray($selection) as $selectionItem) { + if (is_bool($selectionItem)) { + $normalizedSelection[] = $selectionItem ? '1' : '0'; + } else { + $normalizedSelection[] = (string)$selectionItem; + } + } + $selection = $normalizedSelection; + } elseif (is_bool($selection)) { + $selection = $selection ? '1' : '0'; } $lines = []; @@ -1913,9 +1932,20 @@ public static function renderSelectOptions($selection, $items, &$tagOptions = [] $attrs = isset($options[$key]) ? $options[$key] : []; $attrs['value'] = (string) $key; if (!array_key_exists('selected', $attrs)) { - $attrs['selected'] = $selection !== null && - (!ArrayHelper::isTraversable($selection) && ($strict ? !strcmp($key, $selection) : $selection == $key) - || ArrayHelper::isTraversable($selection) && ArrayHelper::isIn((string)$key, $selection, $strict)); + $selected = false; + if ($selection !== null) { + if (ArrayHelper::isTraversable($selection)) { + $selected = ArrayHelper::isIn((string)$key, $selection, $strict); + } elseif ($key === '' || $selection === '') { + $selected = $selection === $key; + } elseif ($strict) { + $selected = !strcmp((string)$key, (string)$selection); + } else { + $selected = $selection == $key; + } + } + + $attrs['selected'] = $selected; } $text = $encode ? static::encode($value) : $value; if ($encodeSpaces) { @@ -1993,7 +2023,7 @@ public static function renderTagAttributes($attributes) $value = explode(' ', implode(' ', $value)); $value = array_unique($value); } - $html .= " $name=\"" . static::encode(implode(' ', $value)) . '"'; + $html .= " $name=\"" . static::encode(implode(' ', array_filter($value))) . '"'; } elseif ($name === 'style') { if (empty($value)) { continue; diff --git a/framework/helpers/BaseJson.php b/framework/helpers/BaseJson.php index eaaee0fbd05..a2821ad9ff7 100644 --- a/framework/helpers/BaseJson.php +++ b/framework/helpers/BaseJson.php @@ -185,6 +185,12 @@ protected static function processData($data, &$expressions, $expPrefix) if ($data instanceof Arrayable) { $data = $data->toArray(); + } elseif ($data instanceof \Generator) { + $_data = []; + foreach ($data as $name => $value) { + $_data[$name] = static::processData($value, $expressions, $expPrefix); + } + $data = $_data; } elseif ($data instanceof \SimpleXMLElement) { $data = (array) $data; diff --git a/framework/helpers/BaseStringHelper.php b/framework/helpers/BaseStringHelper.php index da134163105..749f92f79cd 100644 --- a/framework/helpers/BaseStringHelper.php +++ b/framework/helpers/BaseStringHelper.php @@ -49,7 +49,7 @@ public static function byteSubstr($string, $start, $length = null) $length = static::byteLength($string); } - return mb_substr($string, $start, $length, '8bit'); + return mb_substr((string)$string, $start, $length, '8bit'); } /** @@ -67,6 +67,8 @@ public static function byteSubstr($string, $start, $length = null) */ public static function basename($path, $suffix = '') { + $path = (string)$path; + $len = mb_strlen($suffix); if ($len > 0 && mb_substr($path, -$len) === $suffix) { $path = mb_substr($path, 0, -$len); @@ -93,7 +95,7 @@ public static function basename($path, $suffix = '') public static function dirname($path) { $normalizedPath = rtrim( - str_replace('\\', '/', $path), + str_replace('\\', '/', (string)$path), '/' ); $separatorPosition = mb_strrpos($normalizedPath, '/'); @@ -122,6 +124,8 @@ public static function dirname($path) */ public static function truncate($string, $length, $suffix = '...', $encoding = null, $asHtml = false) { + $string = (string)$string; + if ($encoding === null) { $encoding = Yii::$app ? Yii::$app->charset : 'UTF-8'; } @@ -233,6 +237,9 @@ protected static function truncateHtml($string, $count, $suffix, $encoding = fal */ public static function startsWith($string, $with, $caseSensitive = true) { + $string = (string)$string; + $with = (string)$with; + if (!$bytes = static::byteLength($with)) { return true; } @@ -257,6 +264,9 @@ public static function startsWith($string, $with, $caseSensitive = true) */ public static function endsWith($string, $with, $caseSensitive = true) { + $string = (string)$string; + $with = (string)$with; + if (!$bytes = static::byteLength($with)) { return true; } @@ -487,4 +497,62 @@ public static function mb_ucwords($string, $encoding = 'UTF-8') return implode('', $parts); } + + /** + * Masks a portion of a string with a repeated character. + * This method is multibyte-safe. + * + * @param string $string The input string. + * @param int $start The starting position from where to begin masking. + * This can be a positive or negative integer. + * Positive values count from the beginning, + * negative values count from the end of the string. + * @param int $length The length of the section to be masked. + * The masking will start from the $start position + * and continue for $length characters. + * @param string $mask The character to use for masking. The default is '*'. + * @return string The masked string. + */ + public static function mask($string, $start, $length, $mask = '*') { + $strLength = mb_strlen($string, 'UTF-8'); + + // Return original string if start position is out of bounds + if ($start >= $strLength || $start < -$strLength) { + return $string; + } + + $masked = mb_substr($string, 0, $start, 'UTF-8'); + $masked .= str_repeat($mask, abs($length)); + $masked .= mb_substr($string, $start + abs($length), null, 'UTF-8'); + + return $masked; + } + + /** + * Returns the portion of the string that lies between the first occurrence of the start string + * and the last occurrence of the end string after that. + * + * @param string $string The input string. + * @param string $start The string marking the start of the portion to extract. + * @param string $end The string marking the end of the portion to extract. + * @return string|null The portion of the string between the first occurrence of + * start and the last occurrence of end, or null if either start or end cannot be found. + */ + public static function findBetween($string, $start, $end) + { + $startPos = mb_strpos($string, $start); + + if ($startPos === false) { + return null; + } + + $startPos += mb_strlen($start); + $endPos = mb_strrpos($string, $end, $startPos); + + if ($endPos === false) { + return null; + } + + return mb_substr($string, $startPos, $endPos - $startPos); + } } diff --git a/framework/helpers/BaseUrl.php b/framework/helpers/BaseUrl.php index a671123c7cd..864dbc63c48 100644 --- a/framework/helpers/BaseUrl.php +++ b/framework/helpers/BaseUrl.php @@ -378,7 +378,7 @@ public static function home($scheme = false) */ public static function isRelative($url) { - return strncmp($url, '//', 2) && strpos($url, '://') === false; + return preg_match('~^[[:alpha:]][[:alnum:]+-.]*://|^//~', $url) === 0; } /** diff --git a/framework/helpers/mimeAliases.php b/framework/helpers/mimeAliases.php index 4cd89888a77..a9e677adcbd 100644 --- a/framework/helpers/mimeAliases.php +++ b/framework/helpers/mimeAliases.php @@ -3,6 +3,9 @@ * MIME aliases. * * This file contains aliases for MIME types. + * + * All extra changes made to this file must be comitted to /build/controllers/MimeTypeController.php + * otherwise they will be lost on next build. */ return [ 'text/rtf' => 'application/rtf', diff --git a/framework/helpers/mimeExtensions.php b/framework/helpers/mimeExtensions.php new file mode 100644 index 00000000000..e4936030fd8 --- /dev/null +++ b/framework/helpers/mimeExtensions.php @@ -0,0 +1,1241 @@ + 'ez', + 'application/applixware' => 'aw', + 'application/atom+xml' => 'atom', + 'application/atomcat+xml' => 'atomcat', + 'application/atomsvc+xml' => 'atomsvc', + 'application/ccxml+xml' => 'ccxml', + 'application/cdmi-capability' => 'cdmia', + 'application/cdmi-container' => 'cdmic', + 'application/cdmi-domain' => 'cdmid', + 'application/cdmi-object' => 'cdmio', + 'application/cdmi-queue' => 'cdmiq', + 'application/cu-seeme' => 'cu', + 'application/davmount+xml' => 'davmount', + 'application/docbook+xml' => 'dbk', + 'application/dssc+der' => 'dssc', + 'application/dssc+xml' => 'xdssc', + 'application/ecmascript' => 'ecma', + 'application/emma+xml' => 'emma', + 'application/epub+zip' => 'epub', + 'application/exi' => 'exi', + 'application/font-tdpfr' => 'pfr', + 'application/gml+xml' => 'gml', + 'application/gpx+xml' => 'gpx', + 'application/gxf' => 'gxf', + 'application/hyperstudio' => 'stk', + 'application/inkml+xml' => [ + 'ink', + 'inkml', + ], + 'application/ipfix' => 'ipfix', + 'application/java-archive' => 'jar', + 'application/java-serialized-object' => 'ser', + 'application/java-vm' => 'class', + 'application/json' => 'json', + 'application/jsonml+json' => 'jsonml', + 'application/lost+xml' => 'lostxml', + 'application/mac-binhex40' => 'hqx', + 'application/mac-compactpro' => 'cpt', + 'application/mads+xml' => 'mads', + 'application/marc' => 'mrc', + 'application/marcxml+xml' => 'mrcx', + 'application/mathematica' => [ + 'ma', + 'nb', + 'mb', + ], + 'application/mathml+xml' => 'mathml', + 'application/mbox' => 'mbox', + 'application/mediaservercontrol+xml' => 'mscml', + 'application/metalink+xml' => 'metalink', + 'application/metalink4+xml' => 'meta4', + 'application/mets+xml' => 'mets', + 'application/mods+xml' => 'mods', + 'application/mp21' => [ + 'm21', + 'mp21', + ], + 'application/mp4' => 'mp4s', + 'application/msword' => [ + 'doc', + 'dot', + ], + 'application/mxf' => 'mxf', + 'application/octet-stream' => [ + 'bin', + 'dms', + 'lrf', + 'mar', + 'so', + 'dist', + 'distz', + 'pkg', + 'bpk', + 'dump', + 'elc', + 'deploy', + ], + 'application/oda' => 'oda', + 'application/oebps-package+xml' => 'opf', + 'application/ogg' => 'ogx', + 'application/omdoc+xml' => 'omdoc', + 'application/onenote' => [ + 'onetoc', + 'onetoc2', + 'onetmp', + 'onepkg', + ], + 'application/oxps' => 'oxps', + 'application/patch-ops-error+xml' => 'xer', + 'application/pdf' => 'pdf', + 'application/pgp-encrypted' => 'pgp', + 'application/pgp-signature' => [ + 'asc', + 'sig', + ], + 'application/pics-rules' => 'prf', + 'application/pkcs10' => 'p10', + 'application/pkcs7-mime' => [ + 'p7m', + 'p7c', + ], + 'application/pkcs7-signature' => 'p7s', + 'application/pkcs8' => 'p8', + 'application/pkix-attr-cert' => 'ac', + 'application/pkix-cert' => 'cer', + 'application/pkix-crl' => 'crl', + 'application/pkix-pkipath' => 'pkipath', + 'application/pkixcmp' => 'pki', + 'application/pls+xml' => 'pls', + 'application/postscript' => [ + 'ai', + 'eps', + 'ps', + ], + 'application/prs.cww' => 'cww', + 'application/pskc+xml' => 'pskcxml', + 'application/rdf+xml' => 'rdf', + 'application/reginfo+xml' => 'rif', + 'application/relax-ng-compact-syntax' => 'rnc', + 'application/resource-lists+xml' => 'rl', + 'application/resource-lists-diff+xml' => 'rld', + 'application/rls-services+xml' => 'rs', + 'application/rpki-ghostbusters' => 'gbr', + 'application/rpki-manifest' => 'mft', + 'application/rpki-roa' => 'roa', + 'application/rsd+xml' => 'rsd', + 'application/rss+xml' => 'rss', + 'application/rtf' => 'rtf', + 'application/sbml+xml' => 'sbml', + 'application/scvp-cv-request' => 'scq', + 'application/scvp-cv-response' => 'scs', + 'application/scvp-vp-request' => 'spq', + 'application/scvp-vp-response' => 'spp', + 'application/sdp' => 'sdp', + 'application/set-payment-initiation' => 'setpay', + 'application/set-registration-initiation' => 'setreg', + 'application/shf+xml' => 'shf', + 'application/smil+xml' => [ + 'smi', + 'smil', + ], + 'application/sparql-query' => 'rq', + 'application/sparql-results+xml' => 'srx', + 'application/srgs' => 'gram', + 'application/srgs+xml' => 'grxml', + 'application/sru+xml' => 'sru', + 'application/ssdl+xml' => 'ssdl', + 'application/ssml+xml' => 'ssml', + 'application/tei+xml' => [ + 'tei', + 'teicorpus', + ], + 'application/thraud+xml' => 'tfi', + 'application/timestamped-data' => 'tsd', + 'application/vnd.3gpp.pic-bw-large' => 'plb', + 'application/vnd.3gpp.pic-bw-small' => 'psb', + 'application/vnd.3gpp.pic-bw-var' => 'pvb', + 'application/vnd.3gpp2.tcap' => 'tcap', + 'application/vnd.3m.post-it-notes' => 'pwn', + 'application/vnd.accpac.simply.aso' => 'aso', + 'application/vnd.accpac.simply.imp' => 'imp', + 'application/vnd.acucobol' => 'acu', + 'application/vnd.acucorp' => [ + 'atc', + 'acutc', + ], + 'application/vnd.adobe.air-application-installer-package+zip' => 'air', + 'application/vnd.adobe.formscentral.fcdt' => 'fcdt', + 'application/vnd.adobe.fxp' => [ + 'fxp', + 'fxpl', + ], + 'application/vnd.adobe.xdp+xml' => 'xdp', + 'application/vnd.adobe.xfdf' => 'xfdf', + 'application/vnd.ahead.space' => 'ahead', + 'application/vnd.airzip.filesecure.azf' => 'azf', + 'application/vnd.airzip.filesecure.azs' => 'azs', + 'application/vnd.amazon.ebook' => 'azw', + 'application/vnd.americandynamics.acc' => 'acc', + 'application/vnd.amiga.ami' => 'ami', + 'application/vnd.android.package-archive' => 'apk', + 'application/vnd.anser-web-certificate-issue-initiation' => 'cii', + 'application/vnd.anser-web-funds-transfer-initiation' => 'fti', + 'application/vnd.antix.game-component' => 'atx', + 'application/vnd.apple.installer+xml' => 'mpkg', + 'application/vnd.apple.mpegurl' => 'm3u8', + 'application/vnd.aristanetworks.swi' => 'swi', + 'application/vnd.astraea-software.iota' => 'iota', + 'application/vnd.audiograph' => 'aep', + 'application/vnd.blueice.multipass' => 'mpm', + 'application/vnd.bmi' => 'bmi', + 'application/vnd.businessobjects' => 'rep', + 'application/vnd.chemdraw+xml' => 'cdxml', + 'application/vnd.chipnuts.karaoke-mmd' => 'mmd', + 'application/vnd.cinderella' => 'cdy', + 'application/vnd.claymore' => 'cla', + 'application/vnd.cloanto.rp9' => 'rp9', + 'application/vnd.clonk.c4group' => [ + 'c4g', + 'c4d', + 'c4f', + 'c4p', + 'c4u', + ], + 'application/vnd.cluetrust.cartomobile-config' => 'c11amc', + 'application/vnd.cluetrust.cartomobile-config-pkg' => 'c11amz', + 'application/vnd.commonspace' => 'csp', + 'application/vnd.contact.cmsg' => 'cdbcmsg', + 'application/vnd.cosmocaller' => 'cmc', + 'application/vnd.crick.clicker' => 'clkx', + 'application/vnd.crick.clicker.keyboard' => 'clkk', + 'application/vnd.crick.clicker.palette' => 'clkp', + 'application/vnd.crick.clicker.template' => 'clkt', + 'application/vnd.crick.clicker.wordbank' => 'clkw', + 'application/vnd.criticaltools.wbs+xml' => 'wbs', + 'application/vnd.ctc-posml' => 'pml', + 'application/vnd.cups-ppd' => 'ppd', + 'application/vnd.curl.car' => 'car', + 'application/vnd.curl.pcurl' => 'pcurl', + 'application/vnd.dart' => 'dart', + 'application/vnd.data-vision.rdz' => 'rdz', + 'application/vnd.dece.data' => [ + 'uvf', + 'uvvf', + 'uvd', + 'uvvd', + ], + 'application/vnd.dece.ttml+xml' => [ + 'uvt', + 'uvvt', + ], + 'application/vnd.dece.unspecified' => [ + 'uvx', + 'uvvx', + ], + 'application/vnd.dece.zip' => [ + 'uvz', + 'uvvz', + ], + 'application/vnd.denovo.fcselayout-link' => 'fe_launch', + 'application/vnd.dna' => 'dna', + 'application/vnd.dolby.mlp' => 'mlp', + 'application/vnd.dpgraph' => 'dpg', + 'application/vnd.dreamfactory' => 'dfac', + 'application/vnd.ds-keypoint' => 'kpxx', + 'application/vnd.dvb.ait' => 'ait', + 'application/vnd.dvb.service' => 'svc', + 'application/vnd.dynageo' => 'geo', + 'application/vnd.ecowin.chart' => 'mag', + 'application/vnd.enliven' => 'nml', + 'application/vnd.epson.esf' => 'esf', + 'application/vnd.epson.msf' => 'msf', + 'application/vnd.epson.quickanime' => 'qam', + 'application/vnd.epson.salt' => 'slt', + 'application/vnd.epson.ssf' => 'ssf', + 'application/vnd.eszigno3+xml' => [ + 'es3', + 'et3', + ], + 'application/vnd.ezpix-album' => 'ez2', + 'application/vnd.ezpix-package' => 'ez3', + 'application/vnd.fdf' => 'fdf', + 'application/vnd.fdsn.mseed' => 'mseed', + 'application/vnd.fdsn.seed' => [ + 'seed', + 'dataless', + ], + 'application/vnd.flographit' => 'gph', + 'application/vnd.fluxtime.clip' => 'ftc', + 'application/vnd.framemaker' => [ + 'fm', + 'frame', + 'maker', + 'book', + ], + 'application/vnd.frogans.fnc' => 'fnc', + 'application/vnd.frogans.ltf' => 'ltf', + 'application/vnd.fsc.weblaunch' => 'fsc', + 'application/vnd.fujitsu.oasys' => 'oas', + 'application/vnd.fujitsu.oasys2' => 'oa2', + 'application/vnd.fujitsu.oasys3' => 'oa3', + 'application/vnd.fujitsu.oasysgp' => 'fg5', + 'application/vnd.fujitsu.oasysprs' => 'bh2', + 'application/vnd.fujixerox.ddd' => 'ddd', + 'application/vnd.fujixerox.docuworks' => 'xdw', + 'application/vnd.fujixerox.docuworks.binder' => 'xbd', + 'application/vnd.fuzzysheet' => 'fzs', + 'application/vnd.genomatix.tuxedo' => 'txd', + 'application/vnd.geogebra.file' => 'ggb', + 'application/vnd.geogebra.slides' => 'ggs', + 'application/vnd.geogebra.tool' => 'ggt', + 'application/vnd.geometry-explorer' => [ + 'gex', + 'gre', + ], + 'application/vnd.geonext' => 'gxt', + 'application/vnd.geoplan' => 'g2w', + 'application/vnd.geospace' => 'g3w', + 'application/vnd.gmx' => 'gmx', + 'application/vnd.google-earth.kml+xml' => 'kml', + 'application/vnd.google-earth.kmz' => 'kmz', + 'application/vnd.grafeq' => [ + 'gqf', + 'gqs', + ], + 'application/vnd.groove-account' => 'gac', + 'application/vnd.groove-help' => 'ghf', + 'application/vnd.groove-identity-message' => 'gim', + 'application/vnd.groove-injector' => 'grv', + 'application/vnd.groove-tool-message' => 'gtm', + 'application/vnd.groove-tool-template' => 'tpl', + 'application/vnd.groove-vcard' => 'vcg', + 'application/vnd.hal+xml' => 'hal', + 'application/vnd.handheld-entertainment+xml' => 'zmm', + 'application/vnd.hbci' => 'hbci', + 'application/vnd.hhe.lesson-player' => 'les', + 'application/vnd.hp-hpgl' => 'hpgl', + 'application/vnd.hp-hpid' => 'hpid', + 'application/vnd.hp-hps' => 'hps', + 'application/vnd.hp-jlyt' => 'jlt', + 'application/vnd.hp-pcl' => 'pcl', + 'application/vnd.hp-pclxl' => 'pclxl', + 'application/vnd.hydrostatix.sof-data' => 'sfd-hdstx', + 'application/vnd.ibm.minipay' => 'mpy', + 'application/vnd.ibm.modcap' => [ + 'afp', + 'listafp', + 'list3820', + ], + 'application/vnd.ibm.rights-management' => 'irm', + 'application/vnd.ibm.secure-container' => 'sc', + 'application/vnd.iccprofile' => [ + 'icc', + 'icm', + ], + 'application/vnd.igloader' => 'igl', + 'application/vnd.immervision-ivp' => 'ivp', + 'application/vnd.immervision-ivu' => 'ivu', + 'application/vnd.insors.igm' => 'igm', + 'application/vnd.intercon.formnet' => [ + 'xpw', + 'xpx', + ], + 'application/vnd.intergeo' => 'i2g', + 'application/vnd.intu.qbo' => 'qbo', + 'application/vnd.intu.qfx' => 'qfx', + 'application/vnd.ipunplugged.rcprofile' => 'rcprofile', + 'application/vnd.irepository.package+xml' => 'irp', + 'application/vnd.is-xpr' => 'xpr', + 'application/vnd.isac.fcs' => 'fcs', + 'application/vnd.jam' => 'jam', + 'application/vnd.jcp.javame.midlet-rms' => 'rms', + 'application/vnd.jisp' => 'jisp', + 'application/vnd.joost.joda-archive' => 'joda', + 'application/vnd.kahootz' => [ + 'ktz', + 'ktr', + ], + 'application/vnd.kde.karbon' => 'karbon', + 'application/vnd.kde.kchart' => 'chrt', + 'application/vnd.kde.kformula' => 'kfo', + 'application/vnd.kde.kivio' => 'flw', + 'application/vnd.kde.kontour' => 'kon', + 'application/vnd.kde.kpresenter' => [ + 'kpr', + 'kpt', + ], + 'application/vnd.kde.kspread' => 'ksp', + 'application/vnd.kde.kword' => [ + 'kwd', + 'kwt', + ], + 'application/vnd.kenameaapp' => 'htke', + 'application/vnd.kidspiration' => 'kia', + 'application/vnd.kinar' => [ + 'kne', + 'knp', + ], + 'application/vnd.koan' => [ + 'skp', + 'skd', + 'skt', + 'skm', + ], + 'application/vnd.kodak-descriptor' => 'sse', + 'application/vnd.las.las+xml' => 'lasxml', + 'application/vnd.llamagraphics.life-balance.desktop' => 'lbd', + 'application/vnd.llamagraphics.life-balance.exchange+xml' => 'lbe', + 'application/vnd.lotus-1-2-3' => '123', + 'application/vnd.lotus-approach' => 'apr', + 'application/vnd.lotus-freelance' => 'pre', + 'application/vnd.lotus-notes' => 'nsf', + 'application/vnd.lotus-organizer' => 'org', + 'application/vnd.lotus-screencam' => 'scm', + 'application/vnd.lotus-wordpro' => 'lwp', + 'application/vnd.macports.portpkg' => 'portpkg', + 'application/vnd.mcd' => 'mcd', + 'application/vnd.medcalcdata' => 'mc1', + 'application/vnd.mediastation.cdkey' => 'cdkey', + 'application/vnd.mfer' => 'mwf', + 'application/vnd.mfmp' => 'mfm', + 'application/vnd.micrografx.flo' => 'flo', + 'application/vnd.micrografx.igx' => 'igx', + 'application/vnd.mif' => 'mif', + 'application/vnd.mobius.daf' => 'daf', + 'application/vnd.mobius.dis' => 'dis', + 'application/vnd.mobius.mbk' => 'mbk', + 'application/vnd.mobius.mqy' => 'mqy', + 'application/vnd.mobius.msl' => 'msl', + 'application/vnd.mobius.plc' => 'plc', + 'application/vnd.mobius.txf' => 'txf', + 'application/vnd.mophun.application' => 'mpn', + 'application/vnd.mophun.certificate' => 'mpc', + 'application/vnd.mozilla.xul+xml' => 'xul', + 'application/vnd.ms-artgalry' => 'cil', + 'application/vnd.ms-cab-compressed' => 'cab', + 'application/vnd.ms-excel' => [ + 'xls', + 'xlm', + 'xla', + 'xlc', + 'xlt', + 'xlw', + ], + 'application/vnd.ms-excel.addin.macroenabled.12' => 'xlam', + 'application/vnd.ms-excel.sheet.binary.macroenabled.12' => 'xlsb', + 'application/vnd.ms-excel.sheet.macroenabled.12' => 'xlsm', + 'application/vnd.ms-excel.template.macroenabled.12' => 'xltm', + 'application/vnd.ms-fontobject' => 'eot', + 'application/vnd.ms-htmlhelp' => 'chm', + 'application/vnd.ms-ims' => 'ims', + 'application/vnd.ms-lrm' => 'lrm', + 'application/vnd.ms-officetheme' => 'thmx', + 'application/vnd.ms-pki.seccat' => 'cat', + 'application/vnd.ms-pki.stl' => 'stl', + 'application/vnd.ms-powerpoint' => [ + 'ppt', + 'pps', + 'pot', + ], + 'application/vnd.ms-powerpoint.addin.macroenabled.12' => 'ppam', + 'application/vnd.ms-powerpoint.presentation.macroenabled.12' => 'pptm', + 'application/vnd.ms-powerpoint.slide.macroenabled.12' => 'sldm', + 'application/vnd.ms-powerpoint.slideshow.macroenabled.12' => 'ppsm', + 'application/vnd.ms-powerpoint.template.macroenabled.12' => 'potm', + 'application/vnd.ms-project' => [ + 'mpp', + 'mpt', + ], + 'application/vnd.ms-word.document.macroenabled.12' => 'docm', + 'application/vnd.ms-word.template.macroenabled.12' => 'dotm', + 'application/vnd.ms-works' => [ + 'wps', + 'wks', + 'wcm', + 'wdb', + ], + 'application/vnd.ms-wpl' => 'wpl', + 'application/vnd.ms-xpsdocument' => 'xps', + 'application/vnd.mseq' => 'mseq', + 'application/vnd.musician' => 'mus', + 'application/vnd.muvee.style' => 'msty', + 'application/vnd.mynfc' => 'taglet', + 'application/vnd.neurolanguage.nlu' => 'nlu', + 'application/vnd.nitf' => [ + 'ntf', + 'nitf', + ], + 'application/vnd.noblenet-directory' => 'nnd', + 'application/vnd.noblenet-sealer' => 'nns', + 'application/vnd.noblenet-web' => 'nnw', + 'application/vnd.nokia.n-gage.data' => 'ngdat', + 'application/vnd.nokia.n-gage.symbian.install' => 'n-gage', + 'application/vnd.nokia.radio-preset' => 'rpst', + 'application/vnd.nokia.radio-presets' => 'rpss', + 'application/vnd.novadigm.edm' => 'edm', + 'application/vnd.novadigm.edx' => 'edx', + 'application/vnd.novadigm.ext' => 'ext', + 'application/vnd.oasis.opendocument.chart' => 'odc', + 'application/vnd.oasis.opendocument.chart-template' => 'otc', + 'application/vnd.oasis.opendocument.database' => 'odb', + 'application/vnd.oasis.opendocument.formula' => 'odf', + 'application/vnd.oasis.opendocument.formula-template' => 'odft', + 'application/vnd.oasis.opendocument.graphics' => 'odg', + 'application/vnd.oasis.opendocument.graphics-template' => 'otg', + 'application/vnd.oasis.opendocument.image' => 'odi', + 'application/vnd.oasis.opendocument.image-template' => 'oti', + 'application/vnd.oasis.opendocument.presentation' => 'odp', + 'application/vnd.oasis.opendocument.presentation-template' => 'otp', + 'application/vnd.oasis.opendocument.spreadsheet' => 'ods', + 'application/vnd.oasis.opendocument.spreadsheet-template' => 'ots', + 'application/vnd.oasis.opendocument.text' => 'odt', + 'application/vnd.oasis.opendocument.text-master' => 'odm', + 'application/vnd.oasis.opendocument.text-template' => 'ott', + 'application/vnd.oasis.opendocument.text-web' => 'oth', + 'application/vnd.olpc-sugar' => 'xo', + 'application/vnd.oma.dd2+xml' => 'dd2', + 'application/vnd.openofficeorg.extension' => 'oxt', + 'application/vnd.openxmlformats-officedocument.presentationml.presentation' => 'pptx', + 'application/vnd.openxmlformats-officedocument.presentationml.slide' => 'sldx', + 'application/vnd.openxmlformats-officedocument.presentationml.slideshow' => 'ppsx', + 'application/vnd.openxmlformats-officedocument.presentationml.template' => 'potx', + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'xlsx', + 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' => 'xltx', + 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'docx', + 'application/vnd.openxmlformats-officedocument.wordprocessingml.template' => 'dotx', + 'application/vnd.osgeo.mapguide.package' => 'mgp', + 'application/vnd.osgi.dp' => 'dp', + 'application/vnd.osgi.subsystem' => 'esa', + 'application/vnd.palm' => [ + 'pdb', + 'pqa', + 'oprc', + ], + 'application/vnd.pawaafile' => 'paw', + 'application/vnd.pg.format' => 'str', + 'application/vnd.pg.osasli' => 'ei6', + 'application/vnd.picsel' => 'efif', + 'application/vnd.pmi.widget' => 'wg', + 'application/vnd.pocketlearn' => 'plf', + 'application/vnd.powerbuilder6' => 'pbd', + 'application/vnd.previewsystems.box' => 'box', + 'application/vnd.proteus.magazine' => 'mgz', + 'application/vnd.publishare-delta-tree' => 'qps', + 'application/vnd.pvi.ptid1' => 'ptid', + 'application/vnd.quark.quarkxpress' => [ + 'qxd', + 'qxt', + 'qwd', + 'qwt', + 'qxl', + 'qxb', + ], + 'application/vnd.realvnc.bed' => 'bed', + 'application/vnd.recordare.musicxml' => 'mxl', + 'application/vnd.recordare.musicxml+xml' => 'musicxml', + 'application/vnd.rig.cryptonote' => 'cryptonote', + 'application/vnd.rim.cod' => 'cod', + 'application/vnd.rn-realmedia' => 'rm', + 'application/vnd.rn-realmedia-vbr' => 'rmvb', + 'application/vnd.route66.link66+xml' => 'link66', + 'application/vnd.sailingtracker.track' => 'st', + 'application/vnd.seemail' => 'see', + 'application/vnd.sema' => 'sema', + 'application/vnd.semd' => 'semd', + 'application/vnd.semf' => 'semf', + 'application/vnd.shana.informed.formdata' => 'ifm', + 'application/vnd.shana.informed.formtemplate' => 'itp', + 'application/vnd.shana.informed.interchange' => 'iif', + 'application/vnd.shana.informed.package' => 'ipk', + 'application/vnd.simtech-mindmapper' => [ + 'twd', + 'twds', + ], + 'application/vnd.smaf' => 'mmf', + 'application/vnd.smart.teacher' => 'teacher', + 'application/vnd.solent.sdkm+xml' => [ + 'sdkm', + 'sdkd', + ], + 'application/vnd.spotfire.dxp' => 'dxp', + 'application/vnd.spotfire.sfs' => 'sfs', + 'application/vnd.stardivision.calc' => 'sdc', + 'application/vnd.stardivision.draw' => 'sda', + 'application/vnd.stardivision.impress' => 'sdd', + 'application/vnd.stardivision.math' => 'smf', + 'application/vnd.stardivision.writer' => [ + 'sdw', + 'vor', + ], + 'application/vnd.stardivision.writer-global' => 'sgl', + 'application/vnd.stepmania.package' => 'smzip', + 'application/vnd.stepmania.stepchart' => 'sm', + 'application/vnd.sun.xml.calc' => 'sxc', + 'application/vnd.sun.xml.calc.template' => 'stc', + 'application/vnd.sun.xml.draw' => 'sxd', + 'application/vnd.sun.xml.draw.template' => 'std', + 'application/vnd.sun.xml.impress' => 'sxi', + 'application/vnd.sun.xml.impress.template' => 'sti', + 'application/vnd.sun.xml.math' => 'sxm', + 'application/vnd.sun.xml.writer' => 'sxw', + 'application/vnd.sun.xml.writer.global' => 'sxg', + 'application/vnd.sun.xml.writer.template' => 'stw', + 'application/vnd.sus-calendar' => [ + 'sus', + 'susp', + ], + 'application/vnd.svd' => 'svd', + 'application/vnd.symbian.install' => [ + 'sis', + 'sisx', + ], + 'application/vnd.syncml+xml' => 'xsm', + 'application/vnd.syncml.dm+wbxml' => 'bdm', + 'application/vnd.syncml.dm+xml' => 'xdm', + 'application/vnd.tao.intent-module-archive' => 'tao', + 'application/vnd.tcpdump.pcap' => [ + 'pcap', + 'cap', + 'dmp', + ], + 'application/vnd.tmobile-livetv' => 'tmo', + 'application/vnd.trid.tpt' => 'tpt', + 'application/vnd.triscape.mxs' => 'mxs', + 'application/vnd.trueapp' => 'tra', + 'application/vnd.ufdl' => [ + 'ufd', + 'ufdl', + ], + 'application/vnd.uiq.theme' => 'utz', + 'application/vnd.umajin' => 'umj', + 'application/vnd.unity' => 'unityweb', + 'application/vnd.uoml+xml' => 'uoml', + 'application/vnd.vcx' => 'vcx', + 'application/vnd.visio' => [ + 'vsd', + 'vst', + 'vss', + 'vsw', + ], + 'application/vnd.visionary' => 'vis', + 'application/vnd.vsf' => 'vsf', + 'application/vnd.wap.wbxml' => 'wbxml', + 'application/vnd.wap.wmlc' => 'wmlc', + 'application/vnd.wap.wmlscriptc' => 'wmlsc', + 'application/vnd.webturbo' => 'wtb', + 'application/vnd.wolfram.player' => 'nbp', + 'application/vnd.wordperfect' => 'wpd', + 'application/vnd.wqd' => 'wqd', + 'application/vnd.wt.stf' => 'stf', + 'application/vnd.xara' => 'xar', + 'application/vnd.xfdl' => 'xfdl', + 'application/vnd.yamaha.hv-dic' => 'hvd', + 'application/vnd.yamaha.hv-script' => 'hvs', + 'application/vnd.yamaha.hv-voice' => 'hvp', + 'application/vnd.yamaha.openscoreformat' => 'osf', + 'application/vnd.yamaha.openscoreformat.osfpvg+xml' => 'osfpvg', + 'application/vnd.yamaha.smaf-audio' => 'saf', + 'application/vnd.yamaha.smaf-phrase' => 'spf', + 'application/vnd.yellowriver-custom-menu' => 'cmp', + 'application/vnd.zul' => [ + 'zir', + 'zirz', + ], + 'application/vnd.zzazz.deck+xml' => 'zaz', + 'application/voicexml+xml' => 'vxml', + 'application/wasm' => 'wasm', + 'application/widget' => 'wgt', + 'application/winhlp' => 'hlp', + 'application/wsdl+xml' => 'wsdl', + 'application/wspolicy+xml' => 'wspolicy', + 'application/x-7z-compressed' => '7z', + 'application/x-abiword' => 'abw', + 'application/x-ace-compressed' => 'ace', + 'application/x-apple-diskimage' => 'dmg', + 'application/x-authorware-bin' => [ + 'aab', + 'x32', + 'u32', + 'vox', + ], + 'application/x-authorware-map' => 'aam', + 'application/x-authorware-seg' => 'aas', + 'application/x-bcpio' => 'bcpio', + 'application/x-bittorrent' => 'torrent', + 'application/x-blorb' => [ + 'blb', + 'blorb', + ], + 'application/x-bzip' => 'bz', + 'application/x-bzip2' => [ + 'bz2', + 'boz', + ], + 'application/x-cbr' => [ + 'cbr', + 'cba', + 'cbt', + 'cbz', + 'cb7', + ], + 'application/x-cdlink' => 'vcd', + 'application/x-cfs-compressed' => 'cfs', + 'application/x-chat' => 'chat', + 'application/x-chess-pgn' => 'pgn', + 'application/x-conference' => 'nsc', + 'application/x-cpio' => 'cpio', + 'application/x-csh' => 'csh', + 'application/x-debian-package' => [ + 'deb', + 'udeb', + ], + 'application/x-dgc-compressed' => 'dgc', + 'application/x-director' => [ + 'dir', + 'dcr', + 'dxr', + 'cst', + 'cct', + 'cxt', + 'w3d', + 'fgd', + 'swa', + ], + 'application/x-doom' => 'wad', + 'application/x-dtbncx+xml' => 'ncx', + 'application/x-dtbook+xml' => 'dtb', + 'application/x-dtbresource+xml' => 'res', + 'application/x-dvi' => 'dvi', + 'application/x-envoy' => 'evy', + 'application/x-eva' => 'eva', + 'application/x-font-bdf' => 'bdf', + 'application/x-font-ghostscript' => 'gsf', + 'application/x-font-linux-psf' => 'psf', + 'application/x-font-pcf' => 'pcf', + 'application/x-font-snf' => 'snf', + 'application/x-font-type1' => [ + 'pfa', + 'pfb', + 'pfm', + 'afm', + ], + 'application/x-freearc' => 'arc', + 'application/x-futuresplash' => 'spl', + 'application/x-gca-compressed' => 'gca', + 'application/x-glulx' => 'ulx', + 'application/x-gnumeric' => 'gnumeric', + 'application/x-gramps-xml' => 'gramps', + 'application/x-gtar' => 'gtar', + 'application/x-hdf' => 'hdf', + 'application/x-install-instructions' => 'install', + 'application/x-iso9660-image' => 'iso', + 'application/x-java-jnlp-file' => 'jnlp', + 'application/x-latex' => 'latex', + 'application/x-lzh-compressed' => [ + 'lzh', + 'lha', + ], + 'application/x-mie' => 'mie', + 'application/x-mobipocket-ebook' => [ + 'prc', + 'mobi', + ], + 'application/x-ms-application' => 'application', + 'application/x-ms-shortcut' => 'lnk', + 'application/x-ms-wmd' => 'wmd', + 'application/x-ms-wmz' => 'wmz', + 'application/x-ms-xbap' => 'xbap', + 'application/x-msaccess' => 'mdb', + 'application/x-msbinder' => 'obd', + 'application/x-mscardfile' => 'crd', + 'application/x-msclip' => 'clp', + 'application/x-msdownload' => [ + 'exe', + 'dll', + 'com', + 'bat', + 'msi', + ], + 'application/x-msmediaview' => [ + 'mvb', + 'm13', + 'm14', + ], + 'application/x-msmetafile' => [ + 'wmf', + 'wmz', + 'emf', + 'emz', + ], + 'application/x-msmoney' => 'mny', + 'application/x-mspublisher' => 'pub', + 'application/x-msschedule' => 'scd', + 'application/x-msterminal' => 'trm', + 'application/x-mswrite' => 'wri', + 'application/x-netcdf' => [ + 'nc', + 'cdf', + ], + 'application/x-nzb' => 'nzb', + 'application/x-pkcs12' => [ + 'p12', + 'pfx', + ], + 'application/x-pkcs7-certificates' => [ + 'p7b', + 'spc', + ], + 'application/x-pkcs7-certreqresp' => 'p7r', + 'application/x-rar-compressed' => 'rar', + 'application/x-research-info-systems' => 'ris', + 'application/x-sh' => 'sh', + 'application/x-shar' => 'shar', + 'application/x-shockwave-flash' => 'swf', + 'application/x-silverlight-app' => 'xap', + 'application/x-sql' => 'sql', + 'application/x-stuffit' => 'sit', + 'application/x-stuffitx' => 'sitx', + 'application/x-subrip' => 'srt', + 'application/x-sv4cpio' => 'sv4cpio', + 'application/x-sv4crc' => 'sv4crc', + 'application/x-t3vm-image' => 't3', + 'application/x-tads' => 'gam', + 'application/x-tar' => 'tar', + 'application/x-tcl' => 'tcl', + 'application/x-tex' => 'tex', + 'application/x-tex-tfm' => 'tfm', + 'application/x-texinfo' => [ + 'texinfo', + 'texi', + ], + 'application/x-tgif' => 'obj', + 'application/x-ustar' => 'ustar', + 'application/x-wais-source' => 'src', + 'application/x-x509-ca-cert' => [ + 'der', + 'crt', + ], + 'application/x-xfig' => 'fig', + 'application/x-xliff+xml' => 'xlf', + 'application/x-xpinstall' => 'xpi', + 'application/x-xz' => 'xz', + 'application/x-zmachine' => [ + 'z1', + 'z2', + 'z3', + 'z4', + 'z5', + 'z6', + 'z7', + 'z8', + ], + 'application/xaml+xml' => 'xaml', + 'application/xcap-diff+xml' => 'xdf', + 'application/xenc+xml' => 'xenc', + 'application/xhtml+xml' => [ + 'xhtml', + 'xht', + ], + 'application/xml' => [ + 'xml', + 'xsl', + ], + 'application/xml-dtd' => 'dtd', + 'application/xop+xml' => 'xop', + 'application/xproc+xml' => 'xpl', + 'application/xslt+xml' => 'xslt', + 'application/xspf+xml' => 'xspf', + 'application/xv+xml' => [ + 'mxml', + 'xhvml', + 'xvml', + 'xvm', + ], + 'application/yang' => 'yang', + 'application/yin+xml' => 'yin', + 'application/zip' => 'zip', + 'audio/adpcm' => 'adp', + 'audio/basic' => [ + 'au', + 'snd', + ], + 'audio/midi' => [ + 'mid', + 'midi', + 'kar', + 'rmi', + ], + 'audio/mp4' => [ + 'm4a', + 'mp4a', + ], + 'audio/mpeg' => [ + 'mpga', + 'mp2', + 'mp2a', + 'mp3', + 'm2a', + 'm3a', + ], + 'audio/ogg' => [ + 'oga', + 'ogg', + 'spx', + 'opus', + ], + 'audio/s3m' => 's3m', + 'audio/silk' => 'sil', + 'audio/vnd.dece.audio' => [ + 'uva', + 'uvva', + ], + 'audio/vnd.digital-winds' => 'eol', + 'audio/vnd.dra' => 'dra', + 'audio/vnd.dts' => 'dts', + 'audio/vnd.dts.hd' => 'dtshd', + 'audio/vnd.lucent.voice' => 'lvp', + 'audio/vnd.ms-playready.media.pya' => 'pya', + 'audio/vnd.nuera.ecelp4800' => 'ecelp4800', + 'audio/vnd.nuera.ecelp7470' => 'ecelp7470', + 'audio/vnd.nuera.ecelp9600' => 'ecelp9600', + 'audio/vnd.rip' => 'rip', + 'audio/webm' => 'weba', + 'audio/x-aac' => 'aac', + 'audio/x-aiff' => [ + 'aif', + 'aiff', + 'aifc', + ], + 'audio/x-caf' => 'caf', + 'audio/x-flac' => 'flac', + 'audio/x-matroska' => 'mka', + 'audio/x-mpegurl' => 'm3u', + 'audio/x-ms-wax' => 'wax', + 'audio/x-ms-wma' => 'wma', + 'audio/x-pn-realaudio' => [ + 'ram', + 'ra', + ], + 'audio/x-pn-realaudio-plugin' => 'rmp', + 'audio/x-wav' => 'wav', + 'audio/xm' => 'xm', + 'chemical/x-cdx' => 'cdx', + 'chemical/x-cif' => 'cif', + 'chemical/x-cmdf' => 'cmdf', + 'chemical/x-cml' => 'cml', + 'chemical/x-csml' => 'csml', + 'chemical/x-xyz' => 'xyz', + 'font/collection' => 'ttc', + 'font/otf' => 'otf', + 'font/ttf' => 'ttf', + 'font/woff' => 'woff', + 'font/woff2' => 'woff2', + 'image/apng' => 'apng', + 'image/avif' => 'avif', + 'image/bmp' => 'bmp', + 'image/cgm' => 'cgm', + 'image/g3fax' => 'g3', + 'image/gif' => 'gif', + 'image/ief' => 'ief', + 'image/jpeg' => [ + 'jpeg', + 'jpg', + 'jpe', + 'jfif', + 'pjp', + 'pjpeg', + ], + 'image/ktx' => 'ktx', + 'image/png' => 'png', + 'image/prs.btif' => 'btif', + 'image/sgi' => 'sgi', + 'image/svg+xml' => [ + 'svg', + 'svgz', + ], + 'image/tiff' => [ + 'tiff', + 'tif', + ], + 'image/vnd.adobe.photoshop' => 'psd', + 'image/vnd.dece.graphic' => [ + 'uvi', + 'uvvi', + 'uvg', + 'uvvg', + ], + 'image/vnd.djvu' => [ + 'djvu', + 'djv', + ], + 'image/vnd.dvb.subtitle' => 'sub', + 'image/vnd.dwg' => 'dwg', + 'image/vnd.dxf' => 'dxf', + 'image/vnd.fastbidsheet' => 'fbs', + 'image/vnd.fpx' => 'fpx', + 'image/vnd.fst' => 'fst', + 'image/vnd.fujixerox.edmics-mmr' => 'mmr', + 'image/vnd.fujixerox.edmics-rlc' => 'rlc', + 'image/vnd.ms-modi' => 'mdi', + 'image/vnd.ms-photo' => 'wdp', + 'image/vnd.net-fpx' => 'npx', + 'image/vnd.wap.wbmp' => 'wbmp', + 'image/vnd.xiff' => 'xif', + 'image/webp' => 'webp', + 'image/x-3ds' => '3ds', + 'image/x-cmu-raster' => 'ras', + 'image/x-cmx' => 'cmx', + 'image/x-freehand' => [ + 'fh', + 'fhc', + 'fh4', + 'fh5', + 'fh7', + ], + 'image/x-icon' => 'ico', + 'image/x-mrsid-image' => 'sid', + 'image/x-pcx' => 'pcx', + 'image/x-pict' => [ + 'pic', + 'pct', + ], + 'image/x-portable-anymap' => 'pnm', + 'image/x-portable-bitmap' => 'pbm', + 'image/x-portable-graymap' => 'pgm', + 'image/x-portable-pixmap' => 'ppm', + 'image/x-rgb' => 'rgb', + 'image/x-tga' => 'tga', + 'image/x-xbitmap' => 'xbm', + 'image/x-xpixmap' => 'xpm', + 'image/x-xwindowdump' => 'xwd', + 'message/rfc822' => [ + 'eml', + 'mime', + ], + 'model/iges' => [ + 'igs', + 'iges', + ], + 'model/mesh' => [ + 'msh', + 'mesh', + 'silo', + ], + 'model/vnd.collada+xml' => 'dae', + 'model/vnd.dwf' => 'dwf', + 'model/vnd.gdl' => 'gdl', + 'model/vnd.gtw' => 'gtw', + 'model/vnd.mts' => 'mts', + 'model/vnd.vtu' => 'vtu', + 'model/vrml' => [ + 'wrl', + 'vrml', + ], + 'model/x3d+binary' => [ + 'x3db', + 'x3dbz', + ], + 'model/x3d+vrml' => [ + 'x3dv', + 'x3dvz', + ], + 'model/x3d+xml' => [ + 'x3d', + 'x3dz', + ], + 'text/cache-manifest' => 'appcache', + 'text/calendar' => [ + 'ics', + 'ifb', + ], + 'text/css' => 'css', + 'text/csv' => 'csv', + 'text/html' => [ + 'html', + 'htm', + ], + 'text/javascript' => [ + 'js', + 'mjs', + 'mjs', + ], + 'text/n3' => 'n3', + 'text/plain' => [ + 'txt', + 'text', + 'conf', + 'def', + 'list', + 'log', + 'in', + ], + 'text/prs.lines.tag' => 'dsc', + 'text/richtext' => 'rtx', + 'text/sgml' => [ + 'sgml', + 'sgm', + ], + 'text/tab-separated-values' => 'tsv', + 'text/troff' => [ + 't', + 'tr', + 'roff', + 'man', + 'me', + 'ms', + ], + 'text/turtle' => 'ttl', + 'text/uri-list' => [ + 'uri', + 'uris', + 'urls', + ], + 'text/vcard' => 'vcard', + 'text/vnd.curl' => 'curl', + 'text/vnd.curl.dcurl' => 'dcurl', + 'text/vnd.curl.mcurl' => 'mcurl', + 'text/vnd.curl.scurl' => 'scurl', + 'text/vnd.dvb.subtitle' => 'sub', + 'text/vnd.fly' => 'fly', + 'text/vnd.fmi.flexstor' => 'flx', + 'text/vnd.graphviz' => 'gv', + 'text/vnd.in3d.3dml' => '3dml', + 'text/vnd.in3d.spot' => 'spot', + 'text/vnd.sun.j2me.app-descriptor' => 'jad', + 'text/vnd.wap.wml' => 'wml', + 'text/vnd.wap.wmlscript' => 'wmls', + 'text/x-asm' => [ + 's', + 'asm', + ], + 'text/x-c' => [ + 'c', + 'cc', + 'cxx', + 'cpp', + 'h', + 'hh', + 'dic', + ], + 'text/x-fortran' => [ + 'f', + 'for', + 'f77', + 'f90', + ], + 'text/x-java-source' => 'java', + 'text/x-nfo' => 'nfo', + 'text/x-opml' => 'opml', + 'text/x-pascal' => [ + 'p', + 'pas', + ], + 'text/x-setext' => 'etx', + 'text/x-sfv' => 'sfv', + 'text/x-uuencode' => 'uu', + 'text/x-vcalendar' => 'vcs', + 'text/x-vcard' => 'vcf', + 'video/3gpp' => '3gp', + 'video/3gpp2' => '3g2', + 'video/h261' => 'h261', + 'video/h263' => 'h263', + 'video/h264' => 'h264', + 'video/jpeg' => 'jpgv', + 'video/jpm' => [ + 'jpm', + 'jpgm', + ], + 'video/mj2' => [ + 'mj2', + 'mjp2', + ], + 'video/mp4' => [ + 'mp4', + 'mp4v', + 'mpg4', + ], + 'video/mpeg' => [ + 'mpeg', + 'mpg', + 'mpe', + 'm1v', + 'm2v', + ], + 'video/ogg' => 'ogv', + 'video/quicktime' => [ + 'qt', + 'mov', + ], + 'video/vnd.dece.hd' => [ + 'uvh', + 'uvvh', + ], + 'video/vnd.dece.mobile' => [ + 'uvm', + 'uvvm', + ], + 'video/vnd.dece.pd' => [ + 'uvp', + 'uvvp', + ], + 'video/vnd.dece.sd' => [ + 'uvs', + 'uvvs', + ], + 'video/vnd.dece.video' => [ + 'uvv', + 'uvvv', + ], + 'video/vnd.dvb.file' => 'dvb', + 'video/vnd.fvt' => 'fvt', + 'video/vnd.mpegurl' => [ + 'mxu', + 'm4u', + ], + 'video/vnd.ms-playready.media.pyv' => 'pyv', + 'video/vnd.uvvu.mp4' => [ + 'uvu', + 'uvvu', + ], + 'video/vnd.vivo' => 'viv', + 'video/webm' => 'webm', + 'video/x-f4v' => 'f4v', + 'video/x-fli' => 'fli', + 'video/x-flv' => 'flv', + 'video/x-m4v' => 'm4v', + 'video/x-matroska' => [ + 'mkv', + 'mk3d', + 'mks', + ], + 'video/x-mng' => 'mng', + 'video/x-ms-asf' => [ + 'asf', + 'asx', + ], + 'video/x-ms-vob' => 'vob', + 'video/x-ms-wm' => 'wm', + 'video/x-ms-wmv' => 'wmv', + 'video/x-ms-wmx' => 'wmx', + 'video/x-ms-wvx' => 'wvx', + 'video/x-msvideo' => 'avi', + 'video/x-sgi-movie' => 'movie', + 'video/x-smv' => 'smv', + 'x-conference/x-cooltalk' => 'ice', +]; diff --git a/framework/helpers/mimeTypes.php b/framework/helpers/mimeTypes.php index 944633aa5d2..f895e8d0728 100644 --- a/framework/helpers/mimeTypes.php +++ b/framework/helpers/mimeTypes.php @@ -7,8 +7,12 @@ * Its content is generated from the apache http mime.types file. * https://svn.apache.org/viewvc/httpd/httpd/trunk/docs/conf/mime.types?view=markup * This file has been placed in the public domain for unlimited redistribution. + * + * All extra changes made to this file must be comitted to /build/controllers/MimeTypeController.php + * otherwise they will be lost on next build. */ $mimeTypes = [ + 123 => 'application/vnd.lotus-1-2-3', '3dml' => 'text/vnd.in3d.3dml', '3ds' => 'image/x-3ds', '3g2' => 'video/3gpp2', @@ -37,6 +41,7 @@ 'ait' => 'application/vnd.dvb.ait', 'ami' => 'application/vnd.amiga.ami', 'apk' => 'application/vnd.android.package-archive', + 'apng' => 'image/apng', 'appcache' => 'text/cache-manifest', 'application' => 'application/x-ms-application', 'apr' => 'application/vnd.lotus-approach', @@ -53,6 +58,7 @@ 'atx' => 'application/vnd.antix.game-component', 'au' => 'audio/basic', 'avi' => 'video/x-msvideo', + 'avif' => 'image/avif', 'aw' => 'application/applixware', 'azf' => 'application/vnd.airzip.filesecure.azf', 'azs' => 'application/vnd.airzip.filesecure.azs', @@ -279,6 +285,7 @@ 'geo' => 'application/vnd.dynageo', 'gex' => 'application/vnd.geometry-explorer', 'ggb' => 'application/vnd.geogebra.file', + 'ggs' => 'application/vnd.geogebra.slides', 'ggt' => 'application/vnd.geogebra.tool', 'ghf' => 'application/vnd.groove-help', 'gif' => 'image/gif', @@ -366,7 +373,7 @@ 'jpgm' => 'video/jpm', 'jpgv' => 'video/jpeg', 'jpm' => 'video/jpm', - 'js' => 'application/javascript', + 'js' => 'text/javascript', 'json' => 'application/json', 'jsonml' => 'application/jsonml+json', 'kar' => 'audio/midi', @@ -401,7 +408,6 @@ 'log' => 'text/plain', 'lostxml' => 'application/lost+xml', 'lrf' => 'application/octet-stream', - 0 => 'application/vnd.lotus-1-2-3', 'lrm' => 'application/vnd.ms-lrm', 'ltf' => 'application/vnd.frogans.ltf', 'lvp' => 'audio/vnd.lucent.voice', @@ -599,6 +605,8 @@ 'pgn' => 'application/x-chess-pgn', 'pgp' => 'application/pgp-encrypted', 'pic' => 'image/x-pict', + 'pjp' => 'image/jpeg', + 'pjpeg' => 'image/jpeg', 'pkg' => 'application/octet-stream', 'pki' => 'application/pkixcmp', 'pkipath' => 'application/pkix-pkipath', @@ -883,6 +891,7 @@ 'vxml' => 'application/voicexml+xml', 'w3d' => 'application/x-director', 'wad' => 'application/x-doom', + 'wasm' => 'application/wasm', 'wav' => 'audio/x-wav', 'wax' => 'audio/x-ms-wax', 'wbmp' => 'image/vnd.wap.wbmp', @@ -997,7 +1006,8 @@ 'zmm' => 'application/vnd.handheld-entertainment+xml', ]; -if (PHP_VERSION_ID >= 80100) { +# fix for bundled libmagic bug, see also https://github.com/yiisoft/yii2/issues/19925 +if ((PHP_VERSION_ID >= 80100 && PHP_VERSION_ID < 80122) || (PHP_VERSION_ID >= 80200 && PHP_VERSION_ID < 80209)) { $mimeTypes = array_replace($mimeTypes, array('xz' => 'application/octet-stream')); } diff --git a/framework/i18n/Formatter.php b/framework/i18n/Formatter.php index 3236a433beb..001b81bfa90 100644 --- a/framework/i18n/Formatter.php +++ b/framework/i18n/Formatter.php @@ -460,7 +460,7 @@ public function format($value, $format) } $method = 'as' . $format; if ($this->hasMethod($method)) { - return call_user_func_array([$this, $method], $params); + return call_user_func_array([$this, $method], array_values($params)); } throw new InvalidArgumentException("Unknown format type: $format"); diff --git a/framework/log/FileTarget.php b/framework/log/FileTarget.php index 05ad09430af..d4c267e2ed1 100644 --- a/framework/log/FileTarget.php +++ b/framework/log/FileTarget.php @@ -106,12 +106,17 @@ public function init() */ public function export() { + $text = implode("\n", array_map([$this, 'formatMessage'], $this->messages)) . "\n"; + + if (trim($text) === '') { + return; // No messages to export, so we exit the function early + } + if (strpos($this->logFile, '://') === false || strncmp($this->logFile, 'file://', 7) === 0) { $logPath = dirname($this->logFile); FileHelper::createDirectory($logPath, $this->dirMode, true); } - $text = implode("\n", array_map([$this, 'formatMessage'], $this->messages)) . "\n"; if (($fp = @fopen($this->logFile, 'a')) === false) { throw new InvalidConfigException("Unable to append to log file: {$this->logFile}"); } diff --git a/framework/messages/af/yii.php b/framework/messages/af/yii.php index b4a10bdf664..18be9560231 100644 --- a/framework/messages/af/yii.php +++ b/framework/messages/af/yii.php @@ -26,6 +26,8 @@ ' and ' => ' en ', '"{attribute}" does not support operator "{operator}".' => '"{attribute}" ondersteun nie operateur "{operator}" nie.', '(not set)' => '(nie gestel nie)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => '\'n Interne bediener fout het plaasgevind.', 'Are you sure you want to delete this item?' => 'Is jy seker jy wil hierdie item skrap?', 'Condition for "{attribute}" should be either a value or valid operator specification.' => 'Voorwaarde vir "{attribute}" moet óf \'n waarde, óf \'n geldige operateurspesifikasie wees.', @@ -43,10 +45,10 @@ 'Only files with these extensions are allowed: {extensions}.' => 'Slegs hierdie soort lêers word toegelaat: {extensions}.', 'Operator "{operator}" must be used with a search attribute.' => 'Operateur "{operator}" moet gebruik word met \'n soekkenmerk.', 'Operator "{operator}" requires multiple operands.' => 'Operateur "{operator}" vereis veelvuldige operande.', + 'Options available: {options}' => '', 'Page not found.' => 'Bladsy nie gevind nie.', 'Please fix the following errors:' => 'Maak asseblief die volgende foute reg:', 'Please upload a file.' => 'Laai asseblief \'n lêer op.', - 'Powered by {yii}' => 'Aangedryf deur {yii}', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => '', 'The combination {values} of {attributes} has already been taken.' => 'Die kombinasie {values} van {attributes} is reeds geneem.', 'The file "{file}" is not an image.' => 'Die lêer "{file}" is nie \'n prent nie.', @@ -68,7 +70,6 @@ 'Update' => 'Opdateer', 'View' => 'Beskou', 'Yes' => 'Ja', - 'Yii Framework' => 'Yii Raamwerk', 'You are not allowed to perform this action.' => 'Jy mag nie hierdie aksie uitvoer nie.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Jy kan \'n maksimum van {limit, number} {limit, plural, one{lêer} other{lêers}} oplaai.', 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => 'Jy moet ten minste {limit, number} {limit, plural, one{lêer} other{lêers}} oplaai.', @@ -108,6 +109,7 @@ '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} moet ten minste {min, number} {min, plural, one{karakter} other{karakters}} bevat.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} moet hoogstens {max, number} {max, plural, one{karakter} other{karakters}} bevat.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} moet {length, number} {length, plural, one{karakter} other{karakters}} bevat.', + '{compareAttribute} is invalid.' => '', '{delta, plural, =1{1 day} other{# days}}' => '{delta, plural, =1{1 dag} other{# dae}}', '{delta, plural, =1{1 hour} other{# hours}}' => '{delta} uur', '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta, plural, =1{1 minuut} other{# minute}}', @@ -123,7 +125,6 @@ '{nFormatted} B' => '{nFormatted} B', '{nFormatted} GB' => '{nFormatted} GB', '{nFormatted} GiB' => '{nFormatted} GiB', - '{nFormatted} kB' => '{nFormatted} KB', '{nFormatted} KiB' => '{nFormatted} KiB', '{nFormatted} MB' => '{nFormatted} MB', '{nFormatted} MiB' => '{nFormatted} MiB', @@ -131,6 +132,7 @@ '{nFormatted} PiB' => '{nFormatted} PiB', '{nFormatted} TB' => '{nFormatted} TB', '{nFormatted} TiB' => '{nFormatted} TiB', + '{nFormatted} kB' => '{nFormatted} KB', '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, =1{greep} other{grepe}}', '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} {n, plural, =1{gibigreep} other{gibigrepe}}', '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, =1{gigagreep} other{gigagrepe}}', diff --git a/framework/messages/ar/yii.php b/framework/messages/ar/yii.php index f300954a31c..a2b19347e06 100644 --- a/framework/messages/ar/yii.php +++ b/framework/messages/ar/yii.php @@ -23,8 +23,14 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + ' and ' => '', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(لم يحدد)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => '.حدث خطأ داخلي في الخادم', + 'Are you sure you want to delete this item?' => '', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => 'حذف', 'Error' => 'خطأ', 'File upload failed.' => '.فشل في تحميل الملف', @@ -34,65 +40,91 @@ 'Missing required arguments: {params}' => 'البيانات المطلوبة ضرورية: {params}', 'Missing required parameters: {params}' => 'البيانات المطلوبة ضرورية: {params}', 'No' => 'لا', - 'No help for unknown command "{command}".' => 'ليس هناك مساعدة لأمر غير معروف "{command}".', - 'No help for unknown sub-command "{command}".' => 'ليس هناك مساعدة لأمر فرعي غير معروف "{command}".', 'No results found.' => 'لم يتم العثور على نتائج', - 'Only files with these extensions are allowed: {extensions}.' => 'فقط الملفات التي تحمل هذه الصيغ مسموح بها: {extensions}.', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'فقط الملفات من هذه الأنواع مسموح بها: {mimeTypes}.', + 'Only files with these extensions are allowed: {extensions}.' => 'فقط الملفات التي تحمل هذه الصيغ مسموح بها: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => 'لم يتم العثور على الصفحة', 'Please fix the following errors:' => 'الرجاء تصحيح الأخطاء التالية:', 'Please upload a file.' => 'الرجاء تحميل ملف.', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'عرض {begin, number}-{end, number} من أصل {totalCount, number} {totalCount, plural, one{مُدخل} few{مُدخلات} many{مُدخل} other{مُدخلات}}.', + 'The combination {values} of {attributes} has already been taken.' => '', 'The file "{file}" is not an image.' => 'الملف "{file}" ليس صورة.', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'الملف "{file}" كبير الحجم. حجمه لا يجب أن يتخطى {formattedLimit}.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'الملف "{file}" صغير جداً. حجمه لا يجب أن يكون أصغر من {formattedLimit}.', 'The format of {attribute} is invalid.' => 'شكل {attribute} غير صالح', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'الصورة "{file}" كبيرة جداً. ارتفاعها لا يمكن أن يتخطى {limit, number} {limit, plural, other{بكسل}}.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'الصورة "{file}" كبيرة جداً. عرضها لا يمكن أن يتخطى {limit, number} {limit, plural, other{بكسل}}.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'الصورة "{file}" صغيرة جداً. ارتفاعها لا يمكن أن يقل عن {limit, number} {limit, plural, other{بكسل}}.', 'The image "{file}" is too small. The width cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'الصورة "{file}" كبيرة جداً. عرضها لا يمكن أن يقل عن {limit, number} {limit, plural, other{بكسل}}.', + 'The requested view "{name}" was not found.' => '', 'The verification code is incorrect.' => 'رمز التحقق غير صحيح', 'Total {count, number} {count, plural, one{item} other{items}}.' => 'مجموع {count, number} {count, plural, one{مُدخل} few{مُدخلات} many{مُدخل}}.', 'Unable to verify your data submission.' => 'لم نستطع التأكد من البيانات المقدمة.', - 'Unknown command "{command}".' => 'أمر غير معروف. "{command}"', + 'Unknown alias: -{name}' => '', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'خيار غير معروف: --{name}', 'Update' => 'تحديث', 'View' => 'عرض', 'Yes' => 'نعم', 'You are not allowed to perform this action.' => 'غير مصرح لك القيام بهذا العمل', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'تستطيع كأقصى حد تحميل {limit, number} {limit, plural, one{ملف} few{ملفات} many{ملف} other{ملفات}}.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', + 'in {delta, plural, =1{a day} other{# days}}' => '', + 'in {delta, plural, =1{a minute} other{# minutes}}' => '', + 'in {delta, plural, =1{a month} other{# months}}' => '', + 'in {delta, plural, =1{a second} other{# seconds}}' => '', + 'in {delta, plural, =1{a year} other{# years}}' => '', + 'in {delta, plural, =1{an hour} other{# hours}}' => '', + 'just now' => '', 'the input value' => 'قيمة المُدخل', '{attribute} "{value}" has already been taken.' => '{attribute} "{value}" سبق استعماله', '{attribute} cannot be blank.' => '{attribute} لا يمكن تركه فارغًا.', + '{attribute} contains wrong subnet mask.' => '', '{attribute} is invalid.' => '{attribute} غير صالح.', '{attribute} is not a valid URL.' => '{attribute} ليس بعنوان صحيح.', '{attribute} is not a valid email address.' => '{attribute} ليس ببريد إلكتروني صحيح.', + '{attribute} is not in the allowed range.' => '', '{attribute} must be "{requiredValue}".' => '{attribute} يجب أن يكون "{requiredValue}".', '{attribute} must be a number.' => '{attribute} يجب أن يكون رقمًا', '{attribute} must be a string.' => '{attribute} يجب أن يكون كلمات', + '{attribute} must be a valid IP address.' => '', + '{attribute} must be an IP address with specified subnet.' => '', '{attribute} must be an integer.' => '{attribute} يجب أن يكون رقمًا صحيحًا', '{attribute} must be either "{true}" or "{false}".' => '{attribute} يجب أن يكن إما "{true}" أو "{false}".', '{attribute} must be equal to "{compareValueOrAttribute}".' => '{attribute} يجب أن يساوي "{compareValueOrAttribute}".', - '{attribute} must not be equal to "{compareValueOrAttribute}".' => '{attribute} يجب أن لا يساوي "{compareValueOrAttribute}".', '{attribute} must be greater than "{compareValueOrAttribute}".' => '{attribute} يجب أن يكون أكبر من "{compareValueOrAttribute}".', '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '{attribute} يجب أن يكون أكبر من أو يساوي "{compareValueOrAttribute}".', '{attribute} must be less than "{compareValueOrAttribute}".' => '{attribute} يجب أن يكون أصغر من "{compareValueOrAttribute}".', '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '{attribute} يجب أن يكون أصغر من أو يساوي "{compareValueOrAttribute}".', - '{attribute} must be greater than "{compareValue}".' => '{attribute} يجب أن يكون أكبر من "{compareValue}".', - '{attribute} must be greater than or equal to "{compareValue}".' => '{attribute} يجب أن يكون أكبر من أو يساوي "{compareValue}".', - '{attribute} must be less than "{compareValue}".' => '{attribute} يجب أن يكون أصغر من "{compareValue}".', - '{attribute} must be less than or equal to "{compareValue}".' => '{attribute} يجب أن يكون أصغر من أو يساوي "{compareValue}".', '{attribute} must be no greater than {max}.' => '{attribute} يجب أن لا يكون أكبر من "{max}".', '{attribute} must be no less than {min}.' => '{attribute} يجب أن لا يكون أصغر من "{min}".', - '{attribute} must be repeated exactly.' => '{attribute} يجب أن يكون متطابق.', - '{attribute} must not be equal to "{compareValue}".' => '{attribute} يجب ان لا يساوي "{compareValue}"', + '{attribute} must not be a subnet.' => '', + '{attribute} must not be an IPv4 address.' => '', + '{attribute} must not be an IPv6 address.' => '', + '{attribute} must not be equal to "{compareValueOrAttribute}".' => '{attribute} يجب أن لا يساوي "{compareValueOrAttribute}".', '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} يجب أن يحتوي على أكثر من {min, number} {min, plural, one{حرف} few{حروف} other{حرف}}.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} يجب أن لا يحتوي على أكثر من {max, number} {max, plural, one{حرف} few{حروف} other{حرف}}.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} يجب أن يحتوي على {length, number} {length, plural, one{حرف} few{حروف} other{حرف}}.', + '{compareAttribute} is invalid.' => '', + '{delta, plural, =1{1 day} other{# days}}' => '', + '{delta, plural, =1{1 hour} other{# hours}}' => '', + '{delta, plural, =1{1 minute} other{# minutes}}' => '', + '{delta, plural, =1{1 month} other{# months}}' => '', + '{delta, plural, =1{1 second} other{# seconds}}' => '', + '{delta, plural, =1{1 year} other{# years}}' => '', + '{delta, plural, =1{a day} other{# days}} ago' => '', + '{delta, plural, =1{a minute} other{# minutes}} ago' => '', + '{delta, plural, =1{a month} other{# months}} ago' => '', + '{delta, plural, =1{a second} other{# seconds}} ago' => '', + '{delta, plural, =1{a year} other{# years}} ago' => '', + '{delta, plural, =1{an hour} other{# hours}} ago' => '', '{nFormatted} B' => '{nFormatted} بايت', '{nFormatted} GB' => '{nFormatted} جيجابايت', '{nFormatted} GiB' => '{nFormatted} جيبيبايت', - '{nFormatted} kB' => '{nFormatted} كيلوبايت', '{nFormatted} KiB' => '{nFormatted} كيبيبايت', '{nFormatted} MB' => '{nFormatted} ميجابايت', '{nFormatted} MiB' => '{nFormatted} ميبيبايت', @@ -100,6 +132,7 @@ '{nFormatted} PiB' => '{nFormatted} بيبيبايت', '{nFormatted} TB' => '{nFormatted} تيرابايت', '{nFormatted} TiB' => '{nFormatted} تيبيبايت', + '{nFormatted} kB' => '{nFormatted} كيلوبايت', '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} بايت', '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} جيبيبايت', '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} جيجابايت', diff --git a/framework/messages/az/yii.php b/framework/messages/az/yii.php index 797dc804327..a283d5501e4 100644 --- a/framework/messages/az/yii.php +++ b/framework/messages/az/yii.php @@ -23,9 +23,14 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + ' and ' => '', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(məlumat yoxdur)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Daxili server xətası meydana gəldi.', 'Are you sure you want to delete this item?' => 'Bu elementi silmək istədiyinizə əminsinizmi?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => 'Sil', 'Error' => 'Xəta', 'File upload failed.' => 'Fayl yüklənmədi.', @@ -35,65 +40,108 @@ 'Missing required arguments: {params}' => 'Tələb olunan arqumentlər tapılmadı: {params}', 'Missing required parameters: {params}' => 'Tələb olunan parametrlər tapılmadı: {params}', 'No' => 'Xeyr', - 'No help for unknown command "{command}".' => 'Qeyri-müəyyən "{command}" əmri üçün kömək yoxdur.', - 'No help for unknown sub-command "{command}".' => 'Qeyri-müəyyən "{command}" sub-əmri üçün kömək yoxdur.', 'No results found.' => 'Heç bir nəticə tapılmadı', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Ancaq bu MIME tipli fayllara icazə verilib: {mimeTypes}.', 'Only files with these extensions are allowed: {extensions}.' => 'Genişlənmələri ancaq bu tipdə olan fayllara icazə verilib: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => 'Səhifə tapılmadı.', 'Please fix the following errors:' => 'Xahiş olunur xətaları düzəldin: ', 'Please upload a file.' => 'Xahiş olunur bir fayl yükləyin.', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => '{totalCount, number} {totalCount, plural, one{elementdən} other{elementdən}} {begin, number}-{end, number} arası göstərilir.', + 'The combination {values} of {attributes} has already been taken.' => '', 'The file "{file}" is not an image.' => '"{file}" təsvir faylı deyil.', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => '"{file}" faylı çox böyükdür. Həcmi {formattedLimit} qiymətindən böyük ola bilməz.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => '"{file}" faylı çox kiçikdir. Həcmi {formattedLimit} qiymətindən kiçik ola bilməz.', 'The format of {attribute} is invalid.' => '{attribute} formatı düzgün deyil.', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '"{file}" şəkli çox böyükdür. Uzunluq {limit, plural, one{pixel} other{pixels}} qiymətindən böyük ola bilməz.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '"{file}" şəkli çox böyükdür. Eni {limit, number} {limit, plural, one{pixel} other{pixel}} qiymətindən böyük ola bilməz.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '"{file}" şəkli çox kiçikdir. Eni {limit, number} {limit, plural, one{pixel} other{pixel}} qiymətindən kiçik ola bilməz.', 'The image "{file}" is too small. The width cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '"{file}" şəkli çox kiçikdir. Eni {limit, number} {limit, plural, one{pixel} other{pixels}} qiymətindən kiçik ola bilməz.', + 'The requested view "{name}" was not found.' => '', 'The verification code is incorrect.' => 'Təsdiqləmə kodu səhvdir.', 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Toplam {count, number} {count, plural, one{element} other{element}}.', 'Unable to verify your data submission.' => 'Təqdim etdiyiniz məlumat təsdiqlənmədi.', - 'Unknown command "{command}".' => 'Qeyri-müəyyən əmr "{command}".', + 'Unknown alias: -{name}' => '', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'Qeyri-müəyyən seçim: --{name}', 'Update' => 'Yenilə', 'View' => 'Bax', 'Yes' => 'Bəli', 'You are not allowed to perform this action.' => 'Bu əməliyyatı yerinə yetirmək üçün icazəniz yoxdur.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Ancaq {limit, number} {limit, plural, one{fayl} other{fayl}} yükləyə bilərsiniz.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', + 'in {delta, plural, =1{a day} other{# days}}' => '', + 'in {delta, plural, =1{a minute} other{# minutes}}' => '', + 'in {delta, plural, =1{a month} other{# months}}' => '', + 'in {delta, plural, =1{a second} other{# seconds}}' => '', + 'in {delta, plural, =1{a year} other{# years}}' => '', + 'in {delta, plural, =1{an hour} other{# hours}}' => '', + 'just now' => '', 'the input value' => 'daxil olunmuş qiymət', '{attribute} "{value}" has already been taken.' => '{attribute} "{value}" artıq istifadə olunub.', '{attribute} cannot be blank.' => '{attribute} boş qoyula bilməz.', + '{attribute} contains wrong subnet mask.' => '', '{attribute} is invalid.' => '{attribute} düzgün deyil.', '{attribute} is not a valid URL.' => '{attribute} düzgün URL deyil.', '{attribute} is not a valid email address.' => '{attribute} düzgün e-mail deyil.', + '{attribute} is not in the allowed range.' => '', '{attribute} must be "{requiredValue}".' => '{attribute} {requiredValue} olmalıdır.', '{attribute} must be a number.' => '{attribute} ədəd olmalıdır.', '{attribute} must be a string.' => '{attribute} simvol tipli olmalıdır.', + '{attribute} must be a valid IP address.' => '', + '{attribute} must be an IP address with specified subnet.' => '', '{attribute} must be an integer.' => '{attribute} tam ədəd olmalıdır.', '{attribute} must be either "{true}" or "{false}".' => '{attribute} ya {true} ya da {false} ola bilər.', - '{attribute} must be greater than "{compareValue}".' => '{attribute}, "{compareValue}" dən böyük olmalıdır.', - '{attribute} must be greater than or equal to "{compareValue}".' => '{attribute}, "{compareValue}"dən böyük və ya bərabər olmalıdır.', - '{attribute} must be less than "{compareValue}".' => '{attribute}, "{compareValue}" dən kiçik olmalıdır.', - '{attribute} must be less than or equal to "{compareValue}".' => '{attribute}, "{compareValue}"dən kiçik və ya bərabər olmalıdır.', + '{attribute} must be equal to "{compareValueOrAttribute}".' => '', + '{attribute} must be greater than "{compareValueOrAttribute}".' => '{attribute}, "{compareValueOrAttribute}" dən böyük olmalıdır.', + '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '{attribute}, "{compareValueOrAttribute}"dən böyük və ya bərabər olmalıdır.', + '{attribute} must be less than "{compareValueOrAttribute}".' => '{attribute}, "{compareValueOrAttribute}" dən kiçik olmalıdır.', + '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '{attribute}, "{compareValueOrAttribute}"dən kiçik və ya bərabər olmalıdır.', '{attribute} must be no greater than {max}.' => '{attribute} {max} dən böyük olmamalıdır.', '{attribute} must be no less than {min}.' => '{attribute} {min} dən kiçik olmamalıdır.', - '{attribute} must be repeated exactly.' => '{attribute} dəqiqliklə təkrar olunmalıdir.', - '{attribute} must not be equal to "{compareValue}".' => '{attribute}, "{compareValue}" ilə eyni olmamalıdır', + '{attribute} must not be a subnet.' => '', + '{attribute} must not be an IPv4 address.' => '', + '{attribute} must not be an IPv6 address.' => '', + '{attribute} must not be equal to "{compareValueOrAttribute}".' => '{attribute}, "{compareValueOrAttribute}" ilə eyni olmamalıdır', '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} ən az {min, number} simvol olmalıdır.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} ən çox {max, number} simvol olmalıdır.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} {length, number} simvol olmalıdır.', - '{n, plural, =1{# byte} other{# bytes}}' => '{n} Bayt', - '{n, plural, =1{# gigabyte} other{# gigabytes}}' => '{n} Giqabayt', - '{n, plural, =1{# kilobyte} other{# kilobytes}}' => '{n} Kilobayt', - '{n, plural, =1{# megabyte} other{# megabytes}}' => '{n} Meqabayt', - '{n, plural, =1{# petabyte} other{# petabytes}}' => '{n} Petabayt', - '{n, plural, =1{# terabyte} other{# terabytes}}' => '{n} Terabayt', - '{n} B' => '{n} B', - '{n} GB' => '{n} GB', - '{n} KB' => '{n} KB', - '{n} MB' => '{n} MB', - '{n} PB' => '{n} PB', - '{n} TB' => '{n} TB', + '{compareAttribute} is invalid.' => '', + '{delta, plural, =1{1 day} other{# days}}' => '', + '{delta, plural, =1{1 hour} other{# hours}}' => '', + '{delta, plural, =1{1 minute} other{# minutes}}' => '', + '{delta, plural, =1{1 month} other{# months}}' => '', + '{delta, plural, =1{1 second} other{# seconds}}' => '', + '{delta, plural, =1{1 year} other{# years}}' => '', + '{delta, plural, =1{a day} other{# days}} ago' => '', + '{delta, plural, =1{a minute} other{# minutes}} ago' => '', + '{delta, plural, =1{a month} other{# months}} ago' => '', + '{delta, plural, =1{a second} other{# seconds}} ago' => '', + '{delta, plural, =1{a year} other{# years}} ago' => '', + '{delta, plural, =1{an hour} other{# hours}} ago' => '', + '{nFormatted} B' => '{nFormatted} B', + '{nFormatted} GB' => '{nFormatted} GB', + '{nFormatted} GiB' => '', + '{nFormatted} KiB' => '', + '{nFormatted} MB' => '{nFormatted} MB', + '{nFormatted} MiB' => '', + '{nFormatted} PB' => '{nFormatted} PB', + '{nFormatted} PiB' => '', + '{nFormatted} TB' => '{nFormatted} TB', + '{nFormatted} TiB' => '', + '{nFormatted} kB' => '{nFormatted} kB', + '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} Bayt', + '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '', + '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} Giqabayt', + '{nFormatted} {n, plural, =1{kibibyte} other{kibibytes}}' => '', + '{nFormatted} {n, plural, =1{kilobyte} other{kilobytes}}' => '{nFormatted} Kilobayt', + '{nFormatted} {n, plural, =1{mebibyte} other{mebibytes}}' => '', + '{nFormatted} {n, plural, =1{megabyte} other{megabytes}}' => '{nFormatted} Meqabayt', + '{nFormatted} {n, plural, =1{pebibyte} other{pebibytes}}' => '', + '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '{nFormatted} Petabayt', + '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '', + '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '{nFormatted} Terabayt', ]; diff --git a/framework/messages/be/yii.php b/framework/messages/be/yii.php index f2ed384a925..c2771f47385 100644 --- a/framework/messages/be/yii.php +++ b/framework/messages/be/yii.php @@ -26,6 +26,8 @@ ' and ' => ' і ', '"{attribute}" does not support operator "{operator}".' => '"{attribute}" не падтрымлівае аператар "{operator}".', '(not set)' => '(не зададзена)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Узнікла ўнутраная памылка сервера.', 'Are you sure you want to delete this item?' => 'Вы ўпэўнены, што жадаеце выдаліць гэты элемент?', 'Condition for "{attribute}" should be either a value or valid operator specification.' => 'Умова для "{attribute}" павінна быць ці значэннем, ці дакладнай спецыфікацыяй аператара.', @@ -43,10 +45,10 @@ 'Only files with these extensions are allowed: {extensions}.' => 'Дазволена загрузка файлаў толькі з наступнымі пашырэннямі: {extensions}.', 'Operator "{operator}" must be used with a search attribute.' => 'Аператар "{operator}" павінен выкарыстоўвацца праз атрыбут пошуку.', 'Operator "{operator}" requires multiple operands.' => 'Аператар "{operator}" патрабуе некалькі аперандаў.', + 'Options available: {options}' => '', 'Page not found.' => 'Старонка не знойдзена.', 'Please fix the following errors:' => 'Выпраўце наступныя памылкі:', 'Please upload a file.' => 'Загрузіце файл.', - 'Powered by {yii}' => 'Працуе на {yii}', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Паказаны запісы {begin, number}-{end, number} з {totalCount, number}.', 'The combination {values} of {attributes} has already been taken.' => 'Камбінацыя {values} параметраў {attributes} ужо існуе.', 'The file "{file}" is not an image.' => 'Файл «{file}» не зьяўляецца малюнкам.', @@ -68,7 +70,6 @@ 'Update' => 'Рэдагаваць', 'View' => 'Прагляд', 'Yes' => 'Так', - 'Yii Framework' => 'Yii Framework', 'You are not allowed to perform this action.' => 'You are not allowed to perform this action.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Вы не можаце загружаць больш за {limit, number} {limit, plural, one{файл} few{файлы} many{файлаў} other{файла}}.', 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => 'Вы павінны загрузіць мінімум {limit, number} {limit, plural, one{файл} few{файлы} many{файлаў} other{файла}}', @@ -108,6 +109,7 @@ '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => 'Значэнне «{attribute}» павінна ўтрымліваць мінімум {min, number} {min, plural, one{сімвал} few{сімвала} many{сімвалаў} other{сімвала}}.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => 'Значэнне «{attribute}» павінна ўтрымліваць максімум {max, number} {max, plural, one{сімвал} few{сімвала} many{сімвалаў} other{сімвала}}.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => 'Значэнне «{attribute}» павінна ўтрымліваць {length, number} {length, plural, one{сімвал} few{сімвала} many{сімвалаў} other{сімвала}}.', + '{compareAttribute} is invalid.' => '', '{delta, plural, =1{1 day} other{# days}}' => '{delta, plural, one{# дзень} few{# дні} many{# дзён} other{# дні}}', '{delta, plural, =1{1 hour} other{# hours}}' => '{delta, plural, one{# гадзіна} few{# гадзіны} many{# гадзін} other{# гадзіны}}', '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta, plural, one{# хвіліна} few{# хвіліны} many{# хвілін} other{# хвіліны}}', @@ -123,7 +125,6 @@ '{nFormatted} B' => '{nFormatted} Б', '{nFormatted} GB' => '{nFormatted} ГБ', '{nFormatted} GiB' => '{nFormatted} ГіБ', - '{nFormatted} kB' => '{nFormatted} КБ', '{nFormatted} KiB' => '{nFormatted} КіБ', '{nFormatted} MB' => '{nFormatted} МБ', '{nFormatted} MiB' => '{nFormatted} МіБ', @@ -131,6 +132,7 @@ '{nFormatted} PiB' => '{nFormatted} ПіБ', '{nFormatted} TB' => '{nFormatted} ТБ', '{nFormatted} TiB' => '{nFormatted} ЦіБ', + '{nFormatted} kB' => '{nFormatted} КБ', '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, one{байт} few{байта} many{байтаў} other{байта}}', '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} {n, plural, one{гібібайт} few{гібібайта} many{гібібайтаў} other{гібібайта}}', '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, one{гігабайт} few{гігабайта} many{гігабайтаў} other{гігабайта}}', diff --git a/framework/messages/bg/yii.php b/framework/messages/bg/yii.php index eb87f3bf120..d12f3e03169 100644 --- a/framework/messages/bg/yii.php +++ b/framework/messages/bg/yii.php @@ -26,6 +26,8 @@ ' and ' => ' и ', '"{attribute}" does not support operator "{operator}".' => '"{attribute}" не поддържа оператор "{operator}".', '(not set)' => '(не е попълнено)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Възникна вътрешна грешка в сървъра.', 'Are you sure you want to delete this item?' => 'Сигурни ли сте, че искате да изтриете записа?', 'Condition for "{attribute}" should be either a value or valid operator specification.' => 'Условието за "{attribute}" трябва да е валидна стойност или оператор.', @@ -43,10 +45,10 @@ 'Only files with these extensions are allowed: {extensions}.' => 'Допускат се файлове със следните разширения: {extensions}.', 'Operator "{operator}" must be used with a search attribute.' => 'Операторът "{operator}" трябва да се използва с атрибут за търсене.', 'Operator "{operator}" requires multiple operands.' => 'Операторът "{operator}" изисква множество елементи.', + 'Options available: {options}' => '', 'Page not found.' => 'Страницата не беше намерена.', 'Please fix the following errors:' => 'Моля, коригирайте следните грешки:', 'Please upload a file.' => 'Моля, прикачете файл.', - 'Powered by {yii}' => 'Задвижвано от {yii}', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Показване на {begin, number}-{end, number} от {totalCount, number} {totalCount, plural, one{запис} other{записа}}.', 'The combination {values} of {attributes} has already been taken.' => 'Комбинацията от {values} от {attributes} е вече заета.', 'The file "{file}" is not an image.' => 'Файлът "{file}" не е изображение.', @@ -68,7 +70,6 @@ 'Update' => 'Обнови', 'View' => 'Виж', 'Yes' => 'Да', - 'Yii Framework' => 'Yii Framework', 'You are not allowed to perform this action.' => 'Нямате права да изпълните тази операция.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Може да прикачите най-много {limit, number} {limit, plural, one{файл} other{файла}}.', 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => 'Трябва да качите поне {limit, number} {limit, plural, one{файл} other{файлове}}.', @@ -108,6 +109,7 @@ '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => 'Полето {attribute} трябва да съдържа поне {min, number} {min, plural, one{символ} other{символа}}.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => 'Полето "{attribute}" трябва да съдържа най-много {max, number} {max, plural, one{символ} other{символа}}.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => 'Полето "{attribute}" трябва да съдържа точно {length, number} {length, plural, one{символ} other{символа}}.', + '{compareAttribute} is invalid.' => '', '{delta, plural, =1{1 day} other{# days}}' => '{delta, plural, =1{1 ден} other{# дни}}', '{delta, plural, =1{1 hour} other{# hours}}' => '{delta, plural, =1{1 час} other{# часа}}', '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta, plural, =1{1 минута} other{# минути}}', @@ -123,7 +125,6 @@ '{nFormatted} B' => '{nFormatted} B', '{nFormatted} GB' => '{nFormatted} GB', '{nFormatted} GiB' => '{nFormatted} GiB', - '{nFormatted} kB' => '{nFormatted} KB', '{nFormatted} KiB' => '{nFormatted} KiB', '{nFormatted} MB' => '{nFormatted} MB', '{nFormatted} MiB' => '{nFormatted} MiB', @@ -131,6 +132,7 @@ '{nFormatted} PiB' => '{nFormatted} PiB', '{nFormatted} TB' => '{nFormatted} TB', '{nFormatted} TiB' => '{nFormatted} TiB', + '{nFormatted} kB' => '{nFormatted} KB', '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, =1{байта} other{байта}}', '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} {n, plural, =1{гибибайт} other{гибибайта}}', '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, =1{гигабайт} other{гигабайта}}', diff --git a/framework/messages/bs/yii.php b/framework/messages/bs/yii.php index 968d93aa442..c4013f58cf1 100644 --- a/framework/messages/bs/yii.php +++ b/framework/messages/bs/yii.php @@ -23,9 +23,14 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + ' and ' => '', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(bez vrijednosti)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Došlo je do interne greške na serveru.', 'Are you sure you want to delete this item?' => 'Jeste li sigurni da želite obrisati ovu stavku?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => 'Obriši', 'Error' => 'Greška', 'File upload failed.' => 'Slanje datoteke nije uspjelo.', @@ -38,14 +43,19 @@ 'No results found.' => 'Nema rezultata.', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Samo datoteke sa sljedećim MIME tipovima su dozvoljeni: {mimeTypes}.', 'Only files with these extensions are allowed: {extensions}.' => 'Samo datoteke sa sljedećim ekstenzijama su dozvoljeni: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => 'Stranica nije pronađena.', 'Please fix the following errors:' => 'Molimo ispravite sljedeće greške:', 'Please upload a file.' => 'Molimo da pošaljete datoteku.', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Prikazano {begin, number}-{end, number} od {totalCount, number} {totalCount, plural, one{stavke} other{stavki}}.', + 'The combination {values} of {attributes} has already been taken.' => '', 'The file "{file}" is not an image.' => 'Datoteka "{file}" nije slika.', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'Datoteka "{file}" je prevelika. Veličina ne smije biti veća od {formattedLimit}.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'Datoteka "{file}" је premala. Veličina ne smije biti manja od {formattedLimit}.', 'The format of {attribute} is invalid.' => 'Format atributa "{attribute}" je neispravan.', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Slika "{file}" je prevelika. Visina ne smije biti veća od {limit, number} {limit, plural, one{piksel} other{piksela}}.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Slika "{file}" je prevelika. Širina ne smije biti veća od {limit, number} {limit, plural, one{piksel} other{piksela}}.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Slika "{file}" je premala. Visina ne smije biti manja od {limit, number} {limit, plural, one{piksel} other{piksela}}.', @@ -54,12 +64,15 @@ 'The verification code is incorrect.' => 'Potvrdni kod nije ispravan.', 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Ukupno {count, number} {count, plural, one{stavka} other{stavki}}.', 'Unable to verify your data submission.' => 'Nije moguće provjeriti poslane podatke.', + 'Unknown alias: -{name}' => '', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'Nepoznata opcija: --{name}', 'Update' => 'Ažurirati', 'View' => 'Pregled', 'Yes' => 'Da', 'You are not allowed to perform this action.' => 'Nemate prava da izvršite ovu akciju.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Možete poslati najviše {limit, number} {limit, plural, one{datoteku} other{datoteka}}.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', 'in {delta, plural, =1{a day} other{# days}}' => 'za {delta, plural, =1{dan} one{# dan} few{# dana} many{# dana} other{# dana}}', 'in {delta, plural, =1{a minute} other{# minutes}}' => 'za {delta, plural, =1{minut} one{# minut} few{# minuta} many{# minuta} other{# minuta}}', 'in {delta, plural, =1{a month} other{# months}}' => 'za {delta, plural, =1{mjesec} one{# mjesec} few{# mjeseci} many{# mjeseci} other{# mjeseci}}', @@ -70,25 +83,39 @@ 'the input value' => 'ulazna vrijednost', '{attribute} "{value}" has already been taken.' => '{attribute} "{value}" je već zauzet.', '{attribute} cannot be blank.' => '{attribute} ne smije biti prazan.', + '{attribute} contains wrong subnet mask.' => '', '{attribute} is invalid.' => '{attribute} je neispravan.', '{attribute} is not a valid URL.' => '{attribute} ne sadrži ispravan URL.', '{attribute} is not a valid email address.' => '{attribute} ne sadrži ispravnu email adresu.', + '{attribute} is not in the allowed range.' => '', '{attribute} must be "{requiredValue}".' => '{attribute} mora biti "{requiredValue}".', '{attribute} must be a number.' => '{attribute} mora biti broj.', '{attribute} must be a string.' => '{attribute} mora biti tekst.', + '{attribute} must be a valid IP address.' => '', + '{attribute} must be an IP address with specified subnet.' => '', '{attribute} must be an integer.' => '{attribute} mora biti cijeli broj.', '{attribute} must be either "{true}" or "{false}".' => '{attribute} mora biti "{true}" ili "{false}".', - '{attribute} must be greater than "{compareValue}".' => '{attribute} mora biti veći od "{compareValue}".', - '{attribute} must be greater than or equal to "{compareValue}".' => '{attribute} mora biti veći ili jednak od "{compareValue}".', - '{attribute} must be less than "{compareValue}".' => '{attribute} mora biti manji od "{compareValue}".', - '{attribute} must be less than or equal to "{compareValue}".' => '{attribute} mora biti manji ili jednak od "{compareValue}".', + '{attribute} must be equal to "{compareValueOrAttribute}".' => '', + '{attribute} must be greater than "{compareValueOrAttribute}".' => '{attribute} mora biti veći od "{compareValueOrAttribute}".', + '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '{attribute} mora biti veći ili jednak od "{compareValueOrAttribute}".', + '{attribute} must be less than "{compareValueOrAttribute}".' => '{attribute} mora biti manji od "{compareValueOrAttribute}".', + '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '{attribute} mora biti manji ili jednak od "{compareValueOrAttribute}".', '{attribute} must be no greater than {max}.' => '{attribute} ne smije biti veći od "{max}"', '{attribute} must be no less than {min}.' => '{attribute} ne smije biti manji od {min}.', - '{attribute} must be repeated exactly.' => '{attribute} mora biti ponovljen ispravno.', - '{attribute} must not be equal to "{compareValue}".' => '{attribute} ne smije biti jednak"{compareValue}".', + '{attribute} must not be a subnet.' => '', + '{attribute} must not be an IPv4 address.' => '', + '{attribute} must not be an IPv6 address.' => '', + '{attribute} must not be equal to "{compareValueOrAttribute}".' => '{attribute} ne smije biti jednak"{compareValueOrAttribute}".', '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} treba sadržavati najmanje {min, number} {min, plural, one{znak} other{znakova}}.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} treba sadržavati najviše {max, number} {max, plural, one{znak} other{znakova}}.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} treba sadržavati {length, number} {length, plural, one{znak} other{znakova}}.', + '{compareAttribute} is invalid.' => '', + '{delta, plural, =1{1 day} other{# days}}' => '', + '{delta, plural, =1{1 hour} other{# hours}}' => '', + '{delta, plural, =1{1 minute} other{# minutes}}' => '', + '{delta, plural, =1{1 month} other{# months}}' => '', + '{delta, plural, =1{1 second} other{# seconds}}' => '', + '{delta, plural, =1{1 year} other{# years}}' => '', '{delta, plural, =1{a day} other{# days}} ago' => 'prije {delta, plural, =1{dan} one{# dan} few{# dana} many{# dana} other{# dana}}', '{delta, plural, =1{a minute} other{# minutes}} ago' => 'prije {delta, plural, =1{minut} one{# minut} few{# minuta} many{# minuta} other{# minuta}}', '{delta, plural, =1{a month} other{# months}} ago' => 'prije {delta, plural, =1{mjesec} one{# mjesec} few{# mjeseci} many{# mjeseci} other{# mjeseci}}', @@ -98,7 +125,6 @@ '{nFormatted} B' => '{nFormatted} B', '{nFormatted} GB' => '{nFormatted} GB', '{nFormatted} GiB' => '{nFormatted} GiB', - '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} KiB' => '{nFormatted} KiB', '{nFormatted} MB' => '{nFormatted} MB', '{nFormatted} MiB' => '{nFormatted} MiB', @@ -106,6 +132,7 @@ '{nFormatted} PiB' => '{nFormatted} PiB', '{nFormatted} TB' => '{nFormatted} TB', '{nFormatted} TiB' => '{nFormatted} TiB', + '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, =1{bajt} other{bajtova}}', '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} {n, plural, =1{gibibajt} other{gibibajta}}', '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, =1{gigabajt} other{gigabajta}}', diff --git a/framework/messages/ca/yii.php b/framework/messages/ca/yii.php index f404ab6411d..9e359a0dd5d 100644 --- a/framework/messages/ca/yii.php +++ b/framework/messages/ca/yii.php @@ -23,9 +23,14 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + ' and ' => '', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(no establert)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'S\'ha produït un error intern al servidor.', 'Are you sure you want to delete this item?' => 'Estas segur que vols eliminar aquest element?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => 'Eliminar', 'Error' => 'Error', 'File upload failed.' => 'Ha fallat la pujada del fitxer.', @@ -35,77 +40,108 @@ 'Missing required arguments: {params}' => 'Falten arguments requerits: {params}', 'Missing required parameters: {params}' => 'Falten paràmetres requerits: {params}', 'No' => 'No', - 'No help for unknown command "{command}".' => 'No hi ha ajuda per l\'ordre desconeguda "{command}"', - 'No help for unknown sub-command "{command}".' => 'No hi ha ajuda per la sub-ordre desconeguda "{command}"', 'No results found.' => 'No s\'han trobat resultats.', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Només s\'accepten arxius amb els següents tipus MIME: {mimeTypes}.', 'Only files with these extensions are allowed: {extensions}.' => 'Només s\'accepten arxius amb les seguents extensions: {extensions}', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => 'No s\'ha trobat la pàgina.', 'Please fix the following errors:' => 'Si us plau corregeix els següents errors:', 'Please upload a file.' => 'Si us plau puja un arxiu.', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Mostrant {begin, number}-{end, number} de {totalCount, number} {totalCount, plural, one{element} other{elements}}.', + 'The combination {values} of {attributes} has already been taken.' => '', 'The file "{file}" is not an image.' => 'L\'arxiu "{file}" no és una imatge.', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'L\'arxiu "{file}" és massa gran. El seu tamany no pot excedir {formattedLimit}.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'L\'arxiu "{file}" és massa petit. El seu tamany no pot ser menor que {formattedLimit}.', 'The format of {attribute} is invalid.' => 'El format de {attribute} és invalid.', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'La imatge "{file}" és massa gran. L\'altura no pot ser major que {limit, number} {limit, plural, one{píxel} other{píxels}}.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'La imatge "{file}" és massa gran. L\'amplada no pot ser major que {limit, number} {limit, plural, one{píxel} other{píxels}}.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'La imatge "{file}" és massa petita. L\'altura no pot ser menor que {limit, number} {limit, plural, one{píxel} other{píxels}}.', 'The image "{file}" is too small. The width cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'La imatge "{file}" és massa petita. L\'amplada no pot ser menor que {limit, number} {limit, plural, one{píxel} other{píxels}}.', + 'The requested view "{name}" was not found.' => '', 'The verification code is incorrect.' => 'El codi de verificació és incorrecte.', 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Total {count, number} {count, plural, one{element} other{elements}}.', 'Unable to verify your data submission.' => 'No s\'ha pogut verificar les dades enviades.', - 'Unknown command "{command}".' => 'Ordre desconeguda "{command}".', + 'Unknown alias: -{name}' => '', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'Opció desconeguda: --{name}', 'Update' => 'Actualitzar', 'View' => 'Veure', 'Yes' => 'Sí', 'You are not allowed to perform this action.' => 'No tems permís per executar aquesta acció.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Pots pujar com a màxim {limit, number} {limit, plural, one{arxiu} other{arxius}}.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', 'in {delta, plural, =1{a day} other{# days}}' => 'en {delta, plural, =1{un dia} other{# dies}}', 'in {delta, plural, =1{a minute} other{# minutes}}' => 'en {delta, plural, =1{un minut} other{# minuts}}', 'in {delta, plural, =1{a month} other{# months}}' => 'en {delta, plural, =1{un mes} other{# mesos}}', 'in {delta, plural, =1{a second} other{# seconds}}' => 'en {delta, plural, =1{un segon} other{# segons}}', 'in {delta, plural, =1{a year} other{# years}}' => 'en {delta, plural, =1{un any} other{# anys}}', 'in {delta, plural, =1{an hour} other{# hours}}' => 'en {delta, plural, =1{una hora} other{# hores}}', + 'just now' => '', 'the input value' => 'el valor d\'entrada', '{attribute} "{value}" has already been taken.' => '{attribute} "{value}" ja ha sigut utilitzat.', '{attribute} cannot be blank.' => '{attribute} no pot estar buit.', + '{attribute} contains wrong subnet mask.' => '', '{attribute} is invalid.' => '{attribute} és invalid.', '{attribute} is not a valid URL.' => '{attribute} no és una URL valida.', '{attribute} is not a valid email address.' => '{attribute} no es una direcció de correu valida.', + '{attribute} is not in the allowed range.' => '', '{attribute} must be "{requiredValue}".' => '{attribute} ha de ser "{requiredValue}".', '{attribute} must be a number.' => '{attribute} ha de ser un nombre.', '{attribute} must be a string.' => '{attribute} ha de ser una cadena de caràcters.', + '{attribute} must be a valid IP address.' => '', + '{attribute} must be an IP address with specified subnet.' => '', '{attribute} must be an integer.' => '{attribute} ha de ser un nombre enter.', '{attribute} must be either "{true}" or "{false}".' => '{attribute} ha de ser "{true}" o "{false}".', - '{attribute} must be greater than "{compareValue}".' => '{attribute} ha de ser major que "{compareValue}', - '{attribute} must be greater than or equal to "{compareValue}".' => '{attribute} ha de ser major o igual que "{compareValue}".', - '{attribute} must be less than "{compareValue}".' => '{attribute} ha de ser menor que "{compareValue}".', - '{attribute} must be less than or equal to "{compareValue}".' => '{attribute} ha de ser menor o igual que "{compareValue}".', + '{attribute} must be equal to "{compareValueOrAttribute}".' => '', + '{attribute} must be greater than "{compareValueOrAttribute}".' => '{attribute} ha de ser major que "{compareValueOrAttribute}', + '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '{attribute} ha de ser major o igual que "{compareValueOrAttribute}".', + '{attribute} must be less than "{compareValueOrAttribute}".' => '{attribute} ha de ser menor que "{compareValueOrAttribute}".', + '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '{attribute} ha de ser menor o igual que "{compareValueOrAttribute}".', '{attribute} must be no greater than {max}.' => '{attribute} no pot ser major que {max}.', '{attribute} must be no less than {min}.' => '{attribute} no pot ser menor que {min}.', - '{attribute} must be repeated exactly.' => '{attribute} ha de ser repetit exactament igual.', - '{attribute} must not be equal to "{compareValue}".' => '{attribute} no pot ser igual que "{compareValue}".', + '{attribute} must not be a subnet.' => '', + '{attribute} must not be an IPv4 address.' => '', + '{attribute} must not be an IPv6 address.' => '', + '{attribute} must not be equal to "{compareValueOrAttribute}".' => '{attribute} no pot ser igual que "{compareValueOrAttribute}".', '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} hauria de contenir com a mínim {min, number} {min, plural, one{lletra} other{lletres}}.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} hauria de contenir com a màxim {max, number} {max, plural, one{lletra} other{lletres}}.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} hauria contenir {length, number} {length, plural, one{lletra} other{lletres}}.', + '{compareAttribute} is invalid.' => '', + '{delta, plural, =1{1 day} other{# days}}' => '', + '{delta, plural, =1{1 hour} other{# hours}}' => '', + '{delta, plural, =1{1 minute} other{# minutes}}' => '', + '{delta, plural, =1{1 month} other{# months}}' => '', + '{delta, plural, =1{1 second} other{# seconds}}' => '', + '{delta, plural, =1{1 year} other{# years}}' => '', '{delta, plural, =1{a day} other{# days}} ago' => 'hace {delta, plural, =1{un dia} other{# dies}}', '{delta, plural, =1{a minute} other{# minutes}} ago' => 'fa {delta, plural, =1{un minut} other{# minuts}}', '{delta, plural, =1{a month} other{# months}} ago' => 'fa {delta, plural, =1{un mes} other{# mesos}}', '{delta, plural, =1{a second} other{# seconds}} ago' => 'fa {delta, plural, =1{un segon} other{# segons}}', '{delta, plural, =1{a year} other{# years}} ago' => 'fa {delta, plural, =1{un any} other{# anys}}', '{delta, plural, =1{an hour} other{# hours}} ago' => 'fa {delta, plural, =1{una hora} other{# hores}}', - '{n, plural, =1{# byte} other{# bytes}}' => '{n, plural, =1{# byte} other{# bytes}}', - '{n, plural, =1{# gigabyte} other{# gigabytes}}' => '{n, plural, =1{# gigabyte} other{# gigabytes}}', - '{n, plural, =1{# kilobyte} other{# kilobytes}}' => '{n, plural, =1{# kilobyte} other{# kilobytes}}', - '{n, plural, =1{# megabyte} other{# megabytes}}' => '{n, plural, =1{# megabyte} other{# megabytes}}', - '{n, plural, =1{# petabyte} other{# petabytes}}' => '{n, plural, =1{# petabyte} other{# petabytes}}', - '{n, plural, =1{# terabyte} other{# terabytes}}' => '{n, plural, =1{# terabyte} other{# terabytes}}', - '{n} B' => '{n} B', - '{n} GB' => '{n} GB', - '{n} KB' => '{n} KB', - '{n} MB' => '{n} MB', - '{n} PB' => '{n} PB', - '{n} TB' => '{n} TB', + '{nFormatted} B' => '{nFormatted} B', + '{nFormatted} GB' => '{nFormatted} GB', + '{nFormatted} GiB' => '', + '{nFormatted} KiB' => '', + '{nFormatted} MB' => '{nFormatted} MB', + '{nFormatted} MiB' => '', + '{nFormatted} PB' => '{nFormatted} PB', + '{nFormatted} PiB' => '', + '{nFormatted} TB' => '{nFormatted} TB', + '{nFormatted} TiB' => '', + '{nFormatted} kB' => '{nFormatted} kB', + '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, =1{byte} other{bytes}}', + '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '', + '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}', + '{nFormatted} {n, plural, =1{kibibyte} other{kibibytes}}' => '', + '{nFormatted} {n, plural, =1{kilobyte} other{kilobytes}}' => '{nFormatted} {n, plural, =1{kilobyte} other{kilobytes}}', + '{nFormatted} {n, plural, =1{mebibyte} other{mebibytes}}' => '', + '{nFormatted} {n, plural, =1{megabyte} other{megabytes}}' => '{nFormatted} {n, plural, =1{megabyte} other{megabytes}}', + '{nFormatted} {n, plural, =1{pebibyte} other{pebibytes}}' => '', + '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}', + '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '', + '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}', ]; diff --git a/framework/messages/config.php b/framework/messages/config.php index 93845f2e0a9..21ba4310a5c 100644 --- a/framework/messages/config.php +++ b/framework/messages/config.php @@ -15,8 +15,7 @@ 'languages' => [ 'af', 'ar', 'az', 'be', 'bg', 'bs', 'ca', 'cs', 'da', 'de', 'el', 'es', 'et', 'fa', 'fi', 'fr', 'he', 'hi', 'pt-BR', 'ro', 'hr', 'hu', 'hy', 'id', 'it', 'ja', 'ka', 'kk', 'ko', 'kz', 'lt', 'lv', 'ms', 'nb-NO', 'nl', - 'pl', 'pt', 'ru', 'sk', 'sl', 'sr', 'sr-Latn', 'sv', 'tg', 'th', 'tr', 'uk', 'uz', 'uz-Cy', 'vi', 'zh-CN', - 'zh-TW' + 'pl', 'pt', 'ru', 'sk', 'sl', 'sr', 'sr-Latn', 'sv', 'tg', 'th', 'tr', 'uk', 'uz', 'uz-Cy', 'vi', 'zh', 'zh-TW' ], // string, the name of the function for translating messages. // Defaults to 'Yii::t'. This is used as a mark to find the messages to be @@ -26,12 +25,12 @@ // boolean, whether to sort messages by keys when merging new messages // with the existing ones. Defaults to false, which means the new (untranslated) // messages will be separated from the old (translated) ones. - 'sort' => false, + 'sort' => true, // boolean, whether the message file should be overwritten with the merged messages 'overwrite' => true, // boolean, whether to remove messages that no longer appear in the source code. // Defaults to false, which means each of these messages will be enclosed with a pair of '@@' marks. - 'removeUnused' => false, + 'removeUnused' => true, // boolean, whether to mark messages that no longer appear in the source code. // Defaults to true, which means each of these messages will be enclosed with a pair of '@@' marks. 'markUnused' => true, diff --git a/framework/messages/cs/yii.php b/framework/messages/cs/yii.php index d5c8232f1ba..5520301c14b 100644 --- a/framework/messages/cs/yii.php +++ b/framework/messages/cs/yii.php @@ -24,43 +24,13 @@ */ return [ ' and ' => ' a ', - 'Powered by {yii}' => 'Běží na {yii}', - 'The combination {values} of {attributes} has already been taken.' => 'Kombinace {values} pro {attributes} je již použitá.', - 'Unknown alias: -{name}' => 'Neznámý alias: -{name}', - 'Yii Framework' => 'Yii Framework', - '{attribute} contains wrong subnet mask.' => '{attribute} obsahuje neplatnou masku podsítě.', - '{attribute} is not in the allowed range.' => '{attribute} není v povoleném rozsahu.', - '{attribute} must be a valid IP address.' => '{attribute} musí být platná IP adresa.', - '{attribute} must be an IP address with specified subnet.' => '{attribute} musí být IP adresa se zadanou podsítí.', - '{attribute} must be equal to "{compareValueOrAttribute}".' => '{attribute} se musí rovnat "{compareValueOrAttribute}".', - '{attribute} must be greater than "{compareValueOrAttribute}".' => '{attribute} musí být větší než "{compareValueOrAttribute}".', - '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '{attribute} musí být větší nebo roven "{compareValueOrAttribute}".', - '{attribute} must be less than "{compareValueOrAttribute}".' => '{attribute} musí být menší než "{compareValueOrAttribute}".', - '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '{attribute} musí být menší nebo roven "{compareValueOrAttribute}".', - '{attribute} must not be a subnet.' => '{attribute} nesmí být podsíť.', - '{attribute} must not be an IPv4 address.' => '{attribute} nesmí být IPv4 adresa.', - '{attribute} must not be an IPv6 address.' => '{attribute} nesmí být IPv6 adresa.', - '{attribute} must not be equal to "{compareValueOrAttribute}".' => '{attribute} se nesmí rovnat "{compareValueOrAttribute}".', - '{delta, plural, =1{1 day} other{# days}}' => '{delta, plural, =1{1 den} few{# dny} other{# dní}}', - '{delta, plural, =1{1 hour} other{# hours}}' => '{delta, plural, =1{1 hodina} few{# hodiny} other{# hodin}}', - '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta, plural, =1{1 minuta} few{# minuty} other{# minut}}', - '{delta, plural, =1{1 month} other{# months}}' => '{delta, plural, =1{1 měsíc} few{# měsíce} other{# měsíců}}', - '{delta, plural, =1{1 second} other{# seconds}}' => '{delta, plural, =1{1 sekunda} few{# sekundy} other{# sekund}}', - '{delta, plural, =1{1 year} other{# years}}' => '{delta, plural, =1{1 rok} few{# roky} other{# let}}', - '{nFormatted} B' => '{nFormatted} B', - '{nFormatted} GB' => '{nFormatted} GB', - '{nFormatted} GiB' => '{nFormatted} GiB', - '{nFormatted} kB' => '{nFormatted} kB', - '{nFormatted} KiB' => '{nFormatted} KiB', - '{nFormatted} MB' => '{nFormatted} MB', - '{nFormatted} MiB' => '{nFormatted} MiB', - '{nFormatted} PB' => '{nFormatted} PB', - '{nFormatted} PiB' => '{nFormatted} PiB', - '{nFormatted} TB' => '{nFormatted} TB', - '{nFormatted} TiB' => '{nFormatted} TiB', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(není zadáno)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Vyskytla se vnitřní chyba serveru.', 'Are you sure you want to delete this item?' => 'Opravdu chcete smazat tuto položku?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => 'Smazat', 'Error' => 'Chyba', 'File upload failed.' => 'Nepodařilo se nahrát soubor.', @@ -73,14 +43,19 @@ 'No results found.' => 'Nenalezeny žádné záznamy.', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Povolené jsou pouze soubory následujících MIME typů: {mimeTypes}.', 'Only files with these extensions are allowed: {extensions}.' => 'Povolené jsou pouze soubory s následujícími příponami: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => 'Stránka nenalezena.', 'Please fix the following errors:' => 'Opravte prosím následující chyby:', 'Please upload a file.' => 'Nahrajte prosím soubor.', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => '{totalCount, plural, one{Zobrazen} few{Zobrazeny} other{Zobrazeno}} {totalCount, plural, one{{begin, number}} other{{begin, number}-{end, number}}} z {totalCount, number} {totalCount, plural, one{záznamu} other{záznamů}}.', + 'The combination {values} of {attributes} has already been taken.' => 'Kombinace {values} pro {attributes} je již použitá.', 'The file "{file}" is not an image.' => 'Soubor "{file}" není obrázek.', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'Soubor "{file}" je příliš velký. Velikost souboru nesmí přesáhnout {formattedLimit}.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'Soubor "{file}" je příliš malý. Velikost souboru nesmí být méně než {formattedLimit}.', 'The format of {attribute} is invalid.' => 'Formát údaje {attribute} je neplatný.', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Obrázek "{file}" je příliš velký. Výška nesmí přesáhnout {limit, number} {limit, plural, one{pixel} few{pixely} other{pixelů}}.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Obrázek "{file}" je příliš velký. Šířka nesmí přesáhnout {limit, number} {limit, plural, one{pixel} few{pixely} other{pixelů}}.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Obrázek "{file}" je příliš malý. Výška nesmí být méně než {limit, number} {limit, plural, one{pixel} few{pixely} other{pixelů}}.', @@ -89,12 +64,15 @@ 'The verification code is incorrect.' => 'Nesprávný ověřovací kód.', 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Celkem {count, number} {count, plural, one{záznam} few{záznamy} other{záznamů}}.', 'Unable to verify your data submission.' => 'Nebylo možné ověřit odeslané údaje.', + 'Unknown alias: -{name}' => 'Neznámý alias: -{name}', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'Neznámá volba: --{name}', 'Update' => 'Upravit', 'View' => 'Náhled', 'Yes' => 'Ano', 'You are not allowed to perform this action.' => 'Nemáte oprávnění pro požadovanou akci.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Nahrát můžete nanejvýš {limit, number} {limit, plural, one{soubor} few{soubory} other{souborů}}.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', 'in {delta, plural, =1{a day} other{# days}}' => 'za {delta, plural, =1{den} few{# dny} other{# dnů}}', 'in {delta, plural, =1{a minute} other{# minutes}}' => 'za {delta, plural, =1{minutu} few{# minuty} other{# minut}}', 'in {delta, plural, =1{a month} other{# months}}' => 'za {delta, plural, =1{měsíc} few{# měsíce} other{# měsíců}}', @@ -105,25 +83,56 @@ 'the input value' => 'vstupní hodnota', '{attribute} "{value}" has already been taken.' => 'Hodnota "{value}" pro údaj {attribute} již byla dříve použita.', '{attribute} cannot be blank.' => 'Je zapotřebí vyplnit {attribute}.', + '{attribute} contains wrong subnet mask.' => '{attribute} obsahuje neplatnou masku podsítě.', '{attribute} is invalid.' => 'Neplatná hodnota pro {attribute}.', '{attribute} is not a valid URL.' => '{attribute} není platná URL.', '{attribute} is not a valid email address.' => 'Pro {attribute} nebyla použita platná emailová adresa.', + '{attribute} is not in the allowed range.' => '{attribute} není v povoleném rozsahu.', '{attribute} must be "{requiredValue}".' => '{attribute} musí být "{requiredValue}".', '{attribute} must be a number.' => '{attribute} musí být číslo.', '{attribute} must be a string.' => '{attribute} musí být řetězec.', + '{attribute} must be a valid IP address.' => '{attribute} musí být platná IP adresa.', + '{attribute} must be an IP address with specified subnet.' => '{attribute} musí být IP adresa se zadanou podsítí.', '{attribute} must be an integer.' => '{attribute} musí být celé číslo.', '{attribute} must be either "{true}" or "{false}".' => '{attribute} musí být buď "{true}" nebo "{false}".', + '{attribute} must be equal to "{compareValueOrAttribute}".' => '{attribute} se musí rovnat "{compareValueOrAttribute}".', + '{attribute} must be greater than "{compareValueOrAttribute}".' => '{attribute} musí být větší než "{compareValueOrAttribute}".', + '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '{attribute} musí být větší nebo roven "{compareValueOrAttribute}".', + '{attribute} must be less than "{compareValueOrAttribute}".' => '{attribute} musí být menší než "{compareValueOrAttribute}".', + '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '{attribute} musí být menší nebo roven "{compareValueOrAttribute}".', '{attribute} must be no greater than {max}.' => '{attribute} nesmí být větší než {max}.', '{attribute} must be no less than {min}.' => '{attribute} nesmí být menší než {min}.', + '{attribute} must not be a subnet.' => '{attribute} nesmí být podsíť.', + '{attribute} must not be an IPv4 address.' => '{attribute} nesmí být IPv4 adresa.', + '{attribute} must not be an IPv6 address.' => '{attribute} nesmí být IPv6 adresa.', + '{attribute} must not be equal to "{compareValueOrAttribute}".' => '{attribute} se nesmí rovnat "{compareValueOrAttribute}".', '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} musí obsahovat alespoň {min, number} {min, plural, one{znak} few{znaky} other{znaků}}.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} může obsahovat nanejvýš {max, number} {max, plural, one{znak} few{znaky} other{znaků}}.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} musí obsahovat {length, number} {length, plural, one{znak} few{znaky} other{znaků}}.', + '{compareAttribute} is invalid.' => '', + '{delta, plural, =1{1 day} other{# days}}' => '{delta, plural, =1{1 den} few{# dny} other{# dní}}', + '{delta, plural, =1{1 hour} other{# hours}}' => '{delta, plural, =1{1 hodina} few{# hodiny} other{# hodin}}', + '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta, plural, =1{1 minuta} few{# minuty} other{# minut}}', + '{delta, plural, =1{1 month} other{# months}}' => '{delta, plural, =1{1 měsíc} few{# měsíce} other{# měsíců}}', + '{delta, plural, =1{1 second} other{# seconds}}' => '{delta, plural, =1{1 sekunda} few{# sekundy} other{# sekund}}', + '{delta, plural, =1{1 year} other{# years}}' => '{delta, plural, =1{1 rok} few{# roky} other{# let}}', '{delta, plural, =1{a day} other{# days}} ago' => '{delta, plural, =1{včera} other{před # dny}}', '{delta, plural, =1{a minute} other{# minutes}} ago' => 'před {delta, plural, =1{minutou} other{# minutami}}', '{delta, plural, =1{a month} other{# months}} ago' => 'před {delta, plural, =1{měsícem} other{# měsíci}}', '{delta, plural, =1{a second} other{# seconds}} ago' => 'před {delta, plural, =1{sekundou} other{# sekundami}}', '{delta, plural, =1{a year} other{# years}} ago' => 'před {delta, plural, =1{rokem} other{# lety}}', '{delta, plural, =1{an hour} other{# hours}} ago' => 'před {delta, plural, =1{hodinou} other{# hodinami}}', + '{nFormatted} B' => '{nFormatted} B', + '{nFormatted} GB' => '{nFormatted} GB', + '{nFormatted} GiB' => '{nFormatted} GiB', + '{nFormatted} KiB' => '{nFormatted} KiB', + '{nFormatted} MB' => '{nFormatted} MB', + '{nFormatted} MiB' => '{nFormatted} MiB', + '{nFormatted} PB' => '{nFormatted} PB', + '{nFormatted} PiB' => '{nFormatted} PiB', + '{nFormatted} TB' => '{nFormatted} TB', + '{nFormatted} TiB' => '{nFormatted} TiB', + '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, =1{byte} few{byty} other{bytů}}', '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} {n, plural, =1{gibibyte} few{gibibyty} other{gibibytů}}', '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, =1{gigabyte} few{gigabyty} other{gigabytů}}', diff --git a/framework/messages/da/yii.php b/framework/messages/da/yii.php index d7e27d265e3..6f074dd60be 100644 --- a/framework/messages/da/yii.php +++ b/framework/messages/da/yii.php @@ -23,90 +23,125 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ - '(not set)' => '(ikke defineret)', - 'An internal server error occurred.' => 'Der opstod en intern server fejl.', - 'Are you sure you want to delete this item?' => 'Er du sikker på, at du vil slette dette element?', - 'Delete' => 'Slet', - 'Error' => 'Fejl', - 'File upload failed.' => 'Upload af fil fejlede.', - 'Home' => 'Start', - 'Invalid data received for parameter "{param}".' => 'Ugyldig data modtaget for parameteren "{param}".', - 'Login Required' => 'Login Påkrævet', - 'Missing required arguments: {params}' => 'Påkrævede argumenter mangler: {params}', - 'Missing required parameters: {params}' => 'Påkrævede parametre mangler: {params}', - 'No' => 'Nej', - 'No help for unknown command "{command}".' => 'Ingen hjælp til ukendt kommando "{command}".', - 'No help for unknown sub-command "{command}".' => 'Ingen hjælp til ukendt under-kommando "{command}".', - 'No results found.' => 'Ingen resultater fundet.', - 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Kun filer med følgende MIME-typer er tilladte: {mimeTypes}.', - 'Only files with these extensions are allowed: {extensions}.' => 'Kun filer med følgende filtyper er tilladte: {extensions}.', - 'Page not found.' => 'Siden blev ikke fundet.', - 'Please fix the following errors:' => 'Ret venligst følgende fejl:', - 'Please upload a file.' => 'Venligst upload en fil.', - 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Viser {begin, number}-{end, number} af {totalCount, number} {totalCount, plural, one{element} other{elementer}}.', - 'The file "{file}" is not an image.' => 'Filen "{file}" er ikke et billede.', - 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'Filen "{file}" er for stor. Størrelsen må ikke overstige {formattedLimit}.', - 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'Filen "{file}" er for lille. Størrelsen må ikke være mindre end {formattedLimit}.', - 'The format of {attribute} is invalid.' => 'Formatet af {attribute} er ugyldigt.', - 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Billedet "{file}" er for stort. Højden må ikke være større end {limit, number} {limit, plural, one{pixel} other{pixels}}.', - 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Billedet "{file}" er for stort. Bredden må ikke være større end {limit, number} {limit, plural, one{pixel} other{pixels}}.', - 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Billedet "{file}" er for lille. Højden må ikke være mindre end {limit, number} {limit, plural, one{pixel} other{pixels}}.', - 'The image "{file}" is too small. The width cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Billedet "{file}" er for lille. Bredden må ikke være mindre end {limit, number} {limit, plural, one{pixel} other{pixels}}.', - 'The requested view "{name}" was not found.' => 'Den ønskede visning "{name}" blev ikke fundet.', - 'The verification code is incorrect.' => 'Verifikationskoden er ikke korrekt.', - 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Total {count, number} {count, plural, one{element} other{elementer}}.', - 'Unable to verify your data submission.' => 'Kunne ikke verificere din data indsendelse.', - 'Unknown command "{command}".' => 'Ukendt kommando "{command}".', - 'Unknown option: --{name}' => 'Ukendt option: --{name}', - 'Update' => 'Opdatér', - 'View' => 'Vis', - 'Yes' => 'Ja', - 'You are not allowed to perform this action.' => 'Du har ikke tilladelse til at udføre denne handling.', - 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Du kan højst uploade {limit, number} {limit, plural, one{fil} other{filer}}.', - 'in {delta, plural, =1{a day} other{# days}}' => 'om {delta, plural, =1{en dag} other{# dage}}', - 'in {delta, plural, =1{a minute} other{# minutes}}' => 'om {delta, plural, =1{et minut} other{# minutter}}', - 'in {delta, plural, =1{a month} other{# months}}' => 'om {delta, plural, =1{en måned} other{# måneder}}', - 'in {delta, plural, =1{a second} other{# seconds}}' => 'om {delta, plural, =1{et sekund} other{# sekunder}}', - 'in {delta, plural, =1{a year} other{# years}}' => 'om {delta, plural, =1{et år} other{# år}}', - 'in {delta, plural, =1{an hour} other{# hours}}' => 'om {delta, plural, =1{en time} other{# timer}}', - 'the input value' => 'inputværdien', - '{attribute} "{value}" has already been taken.' => '{attribute} "{value}" er allerede i brug.', - '{attribute} cannot be blank.' => '{attribute} må ikke være tom.', - '{attribute} is invalid.' => '{attribute} er ugyldig.', - '{attribute} is not a valid URL.' => '{attribute} er ikke en gyldig URL.', - '{attribute} is not a valid email address.' => '{attribute} er ikke en gyldig emailadresse.', - '{attribute} must be "{requiredValue}".' => '{attribute} skal være "{requiredValue}".', - '{attribute} must be a number.' => '{attribute} skal være et nummer.', - '{attribute} must be a string.' => '{attribute} skal være en tekst-streng.', - '{attribute} must be an integer.' => '{attribute} skal være et heltal.', - '{attribute} must be either "{true}" or "{false}".' => '{attribute} skal være enten "{true}" eller "{false}".', - '{attribute} must be greater than "{compareValue}".' => '{attribute} skal være større end "{compareValue}".', - '{attribute} must be greater than or equal to "{compareValue}".' => '{attribute} skal være større end eller lig med "{compareValue}".', - '{attribute} must be less than "{compareValue}".' => '{attribute} skal være mindre end "{compareValue}".', - '{attribute} must be less than or equal to "{compareValue}".' => '{attribute} skal være mindre end eller lig med "{compareValue}".', - '{attribute} must be no greater than {max}.' => '{attribute} må ikke være større end {max}.', - '{attribute} must be no less than {min}.' => '{attribute} må ikke være mindre end {min}.', - '{attribute} must be repeated exactly.' => '{attribute} skal være gentaget præcist.', - '{attribute} must not be equal to "{compareValue}".' => '{attribute} må ikke være lig med "{compareValue}".', - '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} skal mindst indeholde {min, number} {min, plural, one{tegn} other{tegn}}.', - '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} skal højst indeholde {max, number} {max, plural, one{tegn} other{tegn}}.', - '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} skal indeholde {length, number} {length, plural, one{tegn} other{tegn}}.', - '{delta, plural, =1{a day} other{# days}} ago' => 'for {delta, plural, =1{en dag} other{# dage}} siden', - '{delta, plural, =1{a minute} other{# minutes}} ago' => 'for {delta, plural, =1{et minut} other{# minutter}} siden', - '{delta, plural, =1{a month} other{# months}} ago' => 'for {delta, plural, =1{en måned} other{# måneder}} siden', - '{delta, plural, =1{a second} other{# seconds}} ago' => 'for {delta, plural, =1{et sekund} other{# sekunder}} siden', - '{delta, plural, =1{a year} other{# years}} ago' => 'for {delta, plural, =1{et år} other{# år}} siden', - '{delta, plural, =1{an hour} other{# hours}} ago' => 'for {delta, plural, =1{en time} other{# timer}} siden', - '{n, plural, =1{# byte} other{# bytes}}' => '{n, plural, =1{# byte} other{# bytes}}', - '{n, plural, =1{# gigabyte} other{# gigabytes}}' => '{n, plural, =1{# gigabyte} other{# gigabytes}}', - '{n, plural, =1{# kilobyte} other{# kilobytes}}' => '{n, plural, =1{# kilobyte} other{# kilobytes}}', - '{n, plural, =1{# megabyte} other{# megabytes}}' => '{n, plural, =1{# megabyte} other{# megabytes}}', - '{n, plural, =1{# petabyte} other{# petabytes}}' => '{n, plural, =1{# petabyte} other{# petabytes}}', - '{n, plural, =1{# terabyte} other{# terabytes}}' => '{n, plural, =1{# terabyte} other{# terabytes}}', - '{n} B' => '{n} B', - '{n} GB' => '{n} GB', - '{n} KB' => '{n} KB', - '{n} MB' => '{n} MB', - '{n} PB' => '{n} PB', - '{n} TB' => '{n} TB', + ' and ' => '', + '"{attribute}" does not support operator "{operator}".' => '', + '(not set)' => '(ikke defineret)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', + 'An internal server error occurred.' => 'Der opstod en intern server fejl.', + 'Are you sure you want to delete this item?' => 'Er du sikker på, at du vil slette dette element?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', + 'Delete' => 'Slet', + 'Error' => 'Fejl', + 'File upload failed.' => 'Upload af fil fejlede.', + 'Home' => 'Start', + 'Invalid data received for parameter "{param}".' => 'Ugyldig data modtaget for parameteren "{param}".', + 'Login Required' => 'Login Påkrævet', + 'Missing required arguments: {params}' => 'Påkrævede argumenter mangler: {params}', + 'Missing required parameters: {params}' => 'Påkrævede parametre mangler: {params}', + 'No' => 'Nej', + 'No results found.' => 'Ingen resultater fundet.', + 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Kun filer med følgende MIME-typer er tilladte: {mimeTypes}.', + 'Only files with these extensions are allowed: {extensions}.' => 'Kun filer med følgende filtyper er tilladte: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', + 'Page not found.' => 'Siden blev ikke fundet.', + 'Please fix the following errors:' => 'Ret venligst følgende fejl:', + 'Please upload a file.' => 'Venligst upload en fil.', + 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Viser {begin, number}-{end, number} af {totalCount, number} {totalCount, plural, one{element} other{elementer}}.', + 'The combination {values} of {attributes} has already been taken.' => '', + 'The file "{file}" is not an image.' => 'Filen "{file}" er ikke et billede.', + 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'Filen "{file}" er for stor. Størrelsen må ikke overstige {formattedLimit}.', + 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'Filen "{file}" er for lille. Størrelsen må ikke være mindre end {formattedLimit}.', + 'The format of {attribute} is invalid.' => 'Formatet af {attribute} er ugyldigt.', + 'The format of {filter} is invalid.' => '', + 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Billedet "{file}" er for stort. Højden må ikke være større end {limit, number} {limit, plural, one{pixel} other{pixels}}.', + 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Billedet "{file}" er for stort. Bredden må ikke være større end {limit, number} {limit, plural, one{pixel} other{pixels}}.', + 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Billedet "{file}" er for lille. Højden må ikke være mindre end {limit, number} {limit, plural, one{pixel} other{pixels}}.', + 'The image "{file}" is too small. The width cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Billedet "{file}" er for lille. Bredden må ikke være mindre end {limit, number} {limit, plural, one{pixel} other{pixels}}.', + 'The requested view "{name}" was not found.' => 'Den ønskede visning "{name}" blev ikke fundet.', + 'The verification code is incorrect.' => 'Verifikationskoden er ikke korrekt.', + 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Total {count, number} {count, plural, one{element} other{elementer}}.', + 'Unable to verify your data submission.' => 'Kunne ikke verificere din data indsendelse.', + 'Unknown alias: -{name}' => '', + 'Unknown filter attribute "{attribute}"' => '', + 'Unknown option: --{name}' => 'Ukendt option: --{name}', + 'Update' => 'Opdatér', + 'View' => 'Vis', + 'Yes' => 'Ja', + 'You are not allowed to perform this action.' => 'Du har ikke tilladelse til at udføre denne handling.', + 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Du kan højst uploade {limit, number} {limit, plural, one{fil} other{filer}}.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', + 'in {delta, plural, =1{a day} other{# days}}' => 'om {delta, plural, =1{en dag} other{# dage}}', + 'in {delta, plural, =1{a minute} other{# minutes}}' => 'om {delta, plural, =1{et minut} other{# minutter}}', + 'in {delta, plural, =1{a month} other{# months}}' => 'om {delta, plural, =1{en måned} other{# måneder}}', + 'in {delta, plural, =1{a second} other{# seconds}}' => 'om {delta, plural, =1{et sekund} other{# sekunder}}', + 'in {delta, plural, =1{a year} other{# years}}' => 'om {delta, plural, =1{et år} other{# år}}', + 'in {delta, plural, =1{an hour} other{# hours}}' => 'om {delta, plural, =1{en time} other{# timer}}', + 'just now' => '', + 'the input value' => 'inputværdien', + '{attribute} "{value}" has already been taken.' => '{attribute} "{value}" er allerede i brug.', + '{attribute} cannot be blank.' => '{attribute} må ikke være tom.', + '{attribute} contains wrong subnet mask.' => '', + '{attribute} is invalid.' => '{attribute} er ugyldig.', + '{attribute} is not a valid URL.' => '{attribute} er ikke en gyldig URL.', + '{attribute} is not a valid email address.' => '{attribute} er ikke en gyldig emailadresse.', + '{attribute} is not in the allowed range.' => '', + '{attribute} must be "{requiredValue}".' => '{attribute} skal være "{requiredValue}".', + '{attribute} must be a number.' => '{attribute} skal være et nummer.', + '{attribute} must be a string.' => '{attribute} skal være en tekst-streng.', + '{attribute} must be a valid IP address.' => '', + '{attribute} must be an IP address with specified subnet.' => '', + '{attribute} must be an integer.' => '{attribute} skal være et heltal.', + '{attribute} must be either "{true}" or "{false}".' => '{attribute} skal være enten "{true}" eller "{false}".', + '{attribute} must be equal to "{compareValueOrAttribute}".' => '', + '{attribute} must be greater than "{compareValueOrAttribute}".' => '{attribute} skal være større end "{compareValueOrAttribute}".', + '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '{attribute} skal være større end eller lig med "{compareValueOrAttribute}".', + '{attribute} must be less than "{compareValueOrAttribute}".' => '{attribute} skal være mindre end "{compareValueOrAttribute}".', + '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '{attribute} skal være mindre end eller lig med "{compareValueOrAttribute}".', + '{attribute} must be no greater than {max}.' => '{attribute} må ikke være større end {max}.', + '{attribute} must be no less than {min}.' => '{attribute} må ikke være mindre end {min}.', + '{attribute} must not be a subnet.' => '', + '{attribute} must not be an IPv4 address.' => '', + '{attribute} must not be an IPv6 address.' => '', + '{attribute} must not be equal to "{compareValueOrAttribute}".' => '{attribute} må ikke være lig med "{compareValueOrAttribute}".', + '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} skal mindst indeholde {min, number} {min, plural, one{tegn} other{tegn}}.', + '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} skal højst indeholde {max, number} {max, plural, one{tegn} other{tegn}}.', + '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} skal indeholde {length, number} {length, plural, one{tegn} other{tegn}}.', + '{compareAttribute} is invalid.' => '', + '{delta, plural, =1{1 day} other{# days}}' => '', + '{delta, plural, =1{1 hour} other{# hours}}' => '', + '{delta, plural, =1{1 minute} other{# minutes}}' => '', + '{delta, plural, =1{1 month} other{# months}}' => '', + '{delta, plural, =1{1 second} other{# seconds}}' => '', + '{delta, plural, =1{1 year} other{# years}}' => '', + '{delta, plural, =1{a day} other{# days}} ago' => 'for {delta, plural, =1{en dag} other{# dage}} siden', + '{delta, plural, =1{a minute} other{# minutes}} ago' => 'for {delta, plural, =1{et minut} other{# minutter}} siden', + '{delta, plural, =1{a month} other{# months}} ago' => 'for {delta, plural, =1{en måned} other{# måneder}} siden', + '{delta, plural, =1{a second} other{# seconds}} ago' => 'for {delta, plural, =1{et sekund} other{# sekunder}} siden', + '{delta, plural, =1{a year} other{# years}} ago' => 'for {delta, plural, =1{et år} other{# år}} siden', + '{delta, plural, =1{an hour} other{# hours}} ago' => 'for {delta, plural, =1{en time} other{# timer}} siden', + '{nFormatted} B' => '{nFormatted} B', + '{nFormatted} GB' => '{nFormatted} GB', + '{nFormatted} GiB' => '', + '{nFormatted} KiB' => '', + '{nFormatted} MB' => '{nFormatted} MB', + '{nFormatted} MiB' => '', + '{nFormatted} PB' => '{nFormatted} PB', + '{nFormatted} PiB' => '', + '{nFormatted} TB' => '{nFormatted} TB', + '{nFormatted} TiB' => '', + '{nFormatted} kB' => '{nFormatted} kB', + '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, =1{byte} other{bytes}}', + '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '', + '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}', + '{nFormatted} {n, plural, =1{kibibyte} other{kibibytes}}' => '', + '{nFormatted} {n, plural, =1{kilobyte} other{kilobytes}}' => '{nFormatted} {n, plural, =1{kilobyte} other{kilobytes}}', + '{nFormatted} {n, plural, =1{mebibyte} other{mebibytes}}' => '', + '{nFormatted} {n, plural, =1{megabyte} other{megabytes}}' => '{nFormatted} {n, plural, =1{megabyte} other{megabytes}}', + '{nFormatted} {n, plural, =1{pebibyte} other{pebibytes}}' => '', + '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}', + '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '', + '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}', ]; diff --git a/framework/messages/de/yii.php b/framework/messages/de/yii.php index 51ede9951a1..96f36ac4374 100644 --- a/framework/messages/de/yii.php +++ b/framework/messages/de/yii.php @@ -24,9 +24,13 @@ */ return [ ' and ' => ' und ', + '"{attribute}" does not support operator "{operator}".' => '"{attribute}" unterstützt den Operator "{operator}" nicht.', '(not set)' => '(nicht gesetzt)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Es ist ein interner Serverfehler aufgetreten.', 'Are you sure you want to delete this item?' => 'Wollen Sie diesen Eintrag wirklich löschen?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => 'Die Bedingung für "{attribute}" muss entweder ein Wert oder ein gültiger Operator sein.', 'Delete' => 'Löschen', 'Error' => 'Fehler', 'File upload failed.' => 'Das Hochladen der Datei ist fehlgeschlagen.', @@ -39,16 +43,19 @@ 'No results found.' => 'Keine Ergebnisse gefunden', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Es sind nur Dateien mit folgenden MIME-Typen erlaubt: {mimeTypes}.', 'Only files with these extensions are allowed: {extensions}.' => 'Es sind nur Dateien mit folgenden Dateierweiterungen erlaubt: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => 'Der Operator "{operator}" muss zusammen mit einem Such-Attribut verwendet werden.', + 'Operator "{operator}" requires multiple operands.' => 'Der Operator "{operator}" erwartet mehrere Operanden.', + 'Options available: {options}' => '', 'Page not found.' => 'Seite nicht gefunden.', 'Please fix the following errors:' => 'Bitte korrigieren Sie die folgenden Fehler:', 'Please upload a file.' => 'Bitte laden Sie eine Datei hoch.', - 'Powered by {yii}' => 'Basiert auf {yii}', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Zeige {begin, number}-{end, number} von {totalCount, number} {totalCount, plural, one{Eintrag} other{Einträgen}}.', 'The combination {values} of {attributes} has already been taken.' => 'Die Kombination {values} für {attributes} wird bereits verwendet.', 'The file "{file}" is not an image.' => 'Die Datei "{file}" ist kein Bild.', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'Die Datei "{file}" ist zu groß. Es sind maximal {formattedLimit} erlaubt.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'Die Datei "{file}" ist zu klein. Es sind mindestens {formattedLimit} erforderlich.', 'The format of {attribute} is invalid.' => 'Das Format von {attribute} ist ungültig.', + 'The format of {filter} is invalid.' => 'Das Format von {filter} ist ungültig.', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Das Bild "{file}" ist zu groß. Es darf maximal {limit, number} Pixel hoch sein.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Das Bild "{file}" ist zu groß. Es darf maximal {limit, number} Pixel breit sein.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Das Bild "{file}" ist zu klein. Es muss mindestens {limit, number} Pixel hoch sein.', @@ -58,13 +65,14 @@ 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Insgesamt {count, number} {count, plural, one{Eintrag} other{Einträge}}.', 'Unable to verify your data submission.' => 'Ihre Dateneingabe konnte nicht überprüft werden oder ist ungültig.', 'Unknown alias: -{name}' => 'Unbekannter Alias: -{name}', + 'Unknown filter attribute "{attribute}"' => 'Unbekanntes Filter-Attribut "{attribute}"', 'Unknown option: --{name}' => 'Unbekannte Option: --{name}', 'Update' => 'Bearbeiten', 'View' => 'Anzeigen', 'Yes' => 'Ja', - 'Yii Framework' => 'Yii Framework', - 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Sie können maximal {limit, plural, one{eine Datei} other{# Dateien}} hochladen.', 'You are not allowed to perform this action.' => 'Sie dürfen diese Aktion nicht durchführen.', + 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Sie können maximal {limit, plural, one{eine Datei} other{# Dateien}} hochladen.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', 'in {delta, plural, =1{a day} other{# days}}' => 'in {delta, plural, =1{einem Tag} other{# Tagen}}', 'in {delta, plural, =1{a minute} other{# minutes}}' => 'in {delta, plural, =1{einer Minute} other{# Minuten}}', 'in {delta, plural, =1{a month} other{# months}}' => 'in {delta, plural, =1{einem Monat} other{# Monaten}}', @@ -101,6 +109,7 @@ '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} muss mindestens {min, number} Zeichen enthalten.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} darf maximal {max, number} Zeichen enthalten.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} muss aus genau {length, number} Zeichen bestehen.', + '{compareAttribute} is invalid.' => '', '{delta, plural, =1{1 day} other{# days}}' => '{delta, plural, =1{1 Tag} other{# Tage}}', '{delta, plural, =1{1 hour} other{# hours}}' => '{delta, plural, =1{1 Stunde} other{# Stunden}}', '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta, plural, =1{1 Minute} other{# Minuten}}', @@ -116,7 +125,6 @@ '{nFormatted} B' => '{nFormatted} B', '{nFormatted} GB' => '{nFormatted} GB', '{nFormatted} GiB' => '{nFormatted} GiB', - '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} KiB' => '{nFormatted} KiB', '{nFormatted} MB' => '{nFormatted} MB', '{nFormatted} MiB' => '{nFormatted} MiB', @@ -124,6 +132,7 @@ '{nFormatted} PiB' => '{nFormatted} PiB', '{nFormatted} TB' => '{nFormatted} TB', '{nFormatted} TiB' => '{nFormatted} TiB', + '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} Byte', '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} GibiByte', '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} Gigabyte', @@ -135,10 +144,4 @@ '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '{nFormatted} Petabyte', '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '{nFormatted} TebiByte', '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '{nFormatted} Terabyte', - '"{attribute}" does not support operator "{operator}".' => '"{attribute}" unterstützt den Operator "{operator}" nicht.', - 'Condition for "{attribute}" should be either a value or valid operator specification.' => 'Die Bedingung für "{attribute}" muss entweder ein Wert oder ein gültiger Operator sein.', - 'Operator "{operator}" must be used with a search attribute.' => 'Der Operator "{operator}" muss zusammen mit einem Such-Attribut verwendet werden.', - 'Operator "{operator}" requires multiple operands.' => 'Der Operator "{operator}" erwartet mehrere Operanden.', - 'The format of {filter} is invalid.' => 'Das Format von {filter} ist ungültig.', - 'Unknown filter attribute "{attribute}"' => 'Unbekanntes Filter-Attribut "{attribute}"', ]; diff --git a/framework/messages/el/yii.php b/framework/messages/el/yii.php index 2c4cfa79fd9..fddd64d8212 100644 --- a/framework/messages/el/yii.php +++ b/framework/messages/el/yii.php @@ -109,6 +109,7 @@ '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => 'Το «{attribute}» πρέπει να περιέχει τουλάχιστον {min, number} {min, plural, one{χαρακτήρα} few{χαρακτήρες} many{χαρακτήρες} other{χαρακτήρες}}.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => 'Το «{attribute}» πρέπει να περιέχει το πολύ {max, number} {max, plural, one{χαρακτήρα} few{χαρακτήρες} many{χαρακτήρες} other{χαρακτήρες}}.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => 'Το «{attribute}» πρέπει να περιέχει {length, number} {length, plural, one{χαρακτήρα} few{χαρακτήρες} many{χαρακτήρες} other{χαρακτήρες}}.', + '{compareAttribute} is invalid.' => '', '{delta, plural, =1{1 day} other{# days}}' => '{delta, plural, =1{1 ημέρα} other{# ημέρες}}', '{delta, plural, =1{1 hour} other{# hours}}' => '{delta, plural, =1{1 ώρα} other{# ώρες}}', '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta, plural, =1{1 λεπτό} other{# λεπτά}}', diff --git a/framework/messages/es/yii.php b/framework/messages/es/yii.php index 6d65a3233c8..af60f0767ed 100644 --- a/framework/messages/es/yii.php +++ b/framework/messages/es/yii.php @@ -24,10 +24,13 @@ */ return [ ' and ' => ' y ', - 'The combination {values} of {attributes} has already been taken.' => 'La combinación de {values} de {attributes} ya ha sido utilizada.', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(no definido)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Hubo un error interno del servidor.', 'Are you sure you want to delete this item?' => '¿Está seguro de eliminar este elemento?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => 'Eliminar', 'Error' => 'Error', 'File upload failed.' => 'Falló la subida del archivo.', @@ -40,15 +43,19 @@ 'No results found.' => 'No se encontraron resultados.', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Sólo se aceptan archivos con los siguientes tipos MIME: {mimeTypes}.', 'Only files with these extensions are allowed: {extensions}.' => 'Sólo se aceptan archivos con las siguientes extensiones: {extensions}', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => 'Página no encontrada.', 'Please fix the following errors:' => 'Por favor corrija los siguientes errores:', 'Please upload a file.' => 'Por favor suba un archivo.', - 'Powered by {yii}' => 'Desarrollado con {yii}', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Mostrando {begin, number}-{end, number} de {totalCount, number} {totalCount, plural, one{elemento} other{elementos}}.', + 'The combination {values} of {attributes} has already been taken.' => 'La combinación de {values} de {attributes} ya ha sido utilizada.', 'The file "{file}" is not an image.' => 'El archivo "{file}" no es una imagen.', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'El archivo "{file}" es demasiado grande. Su tamaño no puede exceder {formattedLimit}.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'El archivo "{file}" es demasiado pequeño. Su tamaño no puede ser menor a {formattedLimit}.', 'The format of {attribute} is invalid.' => 'El formato de {attribute} es inválido.', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'La imagen "{file}" es demasiado grande. La altura no puede ser mayor a {limit, number} {limit, plural, one{píxel} other{píxeles}}.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'La imagen "{file}" es demasiado grande. La anchura no puede ser mayor a {limit, number} {limit, plural, one{píxel} other{píxeles}}.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'La imagen "{file}" es demasiado pequeña. La altura no puede ser menor a {limit, number} {limit, plural, one{píxel} other{píxeles}}.', @@ -58,13 +65,14 @@ 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Total {count, number} {count, plural, one{elemento} other{elementos}}.', 'Unable to verify your data submission.' => 'Incapaz de verificar los datos enviados.', 'Unknown alias: -{name}' => 'Alias desconocido: -{name}', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'Opción desconocida: --{name}', 'Update' => 'Actualizar', 'View' => 'Ver', 'Yes' => 'Sí', - 'Yii Framework' => 'Yii Framework', 'You are not allowed to perform this action.' => 'No tiene permitido ejecutar esta acción.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Puedes subir como máximo {limit, number} {limit, plural, one{archivo} other{archivos}}.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', 'in {delta, plural, =1{a day} other{# days}}' => 'en {delta, plural, =1{un día} other{# días}}', 'in {delta, plural, =1{a minute} other{# minutes}}' => 'en {delta, plural, =1{un minuto} other{# minutos}}', 'in {delta, plural, =1{a month} other{# months}}' => 'en {delta, plural, =1{un mes} other{# meses}}', @@ -101,6 +109,7 @@ '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} debería contener al menos {min, number} {min, plural, one{letra} other{letras}}.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} debería contener como máximo {max, number} {max, plural, one{letra} other{letras}}.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} debería contener {length, number} {length, plural, one{letra} other{letras}}.', + '{compareAttribute} is invalid.' => '', '{delta, plural, =1{1 day} other{# days}}' => '{delta, plural, =1{1 día} other{# días}}', '{delta, plural, =1{1 hour} other{# hours}}' => '{delta, plural, =1{1 hora} other{# horas}}', '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta, plural, =1{1 minuto} other{# minutos}}', @@ -116,7 +125,6 @@ '{nFormatted} B' => '{nFormatted} B', '{nFormatted} GB' => '{nFormatted} GB', '{nFormatted} GiB' => '{nFormatted} GiB', - '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} KiB' => '{nFormatted} KiB', '{nFormatted} MB' => '{nFormatted} MB', '{nFormatted} MiB' => '{nFormatted} MiB', @@ -124,6 +132,7 @@ '{nFormatted} PiB' => '{nFormatted} PiB', '{nFormatted} TB' => '{nFormatted} TB', '{nFormatted} TiB' => '{nFormatted} TiB', + '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, =1{byte} other{bytes}}', '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}', '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}', diff --git a/framework/messages/et/yii.php b/framework/messages/et/yii.php index 337d7fc1506..950274fa961 100644 --- a/framework/messages/et/yii.php +++ b/framework/messages/et/yii.php @@ -23,9 +23,14 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + ' and ' => ' ja ', + '"{attribute}" does not support operator "{operator}".' => '"{attribute}" ei toeta tehtemärki "{operator}".', '(not set)' => '(määramata)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Ilmnes serveri sisemine viga.', 'Are you sure you want to delete this item?' => 'Kas olete kindel, et soovite selle üksuse kustutada?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => 'Atribuudi "{attribute}" tingimus peaks olema kas väärtus või korrektne tehtemärgi spetsifikatsioon.', 'Delete' => 'Kustuta', 'Error' => 'Viga', 'File upload failed.' => 'Faili üleslaadimine ebaõnnestus.', @@ -38,14 +43,19 @@ 'No results found.' => 'Ei leitud ühtegi tulemust.', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Lubatud on ainult nende MIME tüüpidega failid: {mimeTypes}.', 'Only files with these extensions are allowed: {extensions}.' => 'Lubatud on ainult nende faililaienditega failid: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => 'Tehtemärki "{operator}" peab kasutama koos otsinguatribuudiga.', + 'Operator "{operator}" requires multiple operands.' => 'Tehtemärk "{operator}" nõuab mitut operandi.', + 'Options available: {options}' => '', 'Page not found.' => 'Lehekülge ei leitud.', 'Please fix the following errors:' => 'Palun parandage järgnevad vead:', 'Please upload a file.' => 'Palun laadige fail üles.', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Näitan {totalCount, number} {totalCount, plural, one{üksusest} other{üksusest}} {begin, number}-{end, number}.', + 'The combination {values} of {attributes} has already been taken.' => 'Atribuutide {attributes} väärtuste kombinatsioon {values} on juba võetud.', 'The file "{file}" is not an image.' => 'See fail "{file}" ei ole pilt.', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'See fail "{file}" on liiga suur. Suurus ei tohi ületada {formattedLimit}.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'See fail "{file}" on liiga väike. Suurus ei tohi olla väiksem kui {formattedLimit}.', 'The format of {attribute} is invalid.' => '{attribute} on sobimatus vormingus.', + 'The format of {filter} is invalid.' => 'Filtri {filter} formaat on sobimatu.', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Pilt "{file}" on liiga suur. Kõrgus ei tohi olla suurem kui {limit, number} {limit, plural, one{piksel} other{pikslit}}.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Pilt "{file}" on liiga suur. Laius ei tohi olla suurem kui {limit, number} {limit, plural, one{piksel} other{pikslit}}.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Pilt "{file}" on liiga väike. Kõrgus ei tohi olla väiksem kui {limit, number} {limit, plural, one{piksel} other{pikslit}}.', @@ -54,72 +64,64 @@ 'The verification code is incorrect.' => 'Kontrollkood on vale.', 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Kokku {count, number} {count, plural, one{üksus} other{üksust}}.', 'Unable to verify your data submission.' => 'Ei suuda edastatud andmete õigsuses veenduda.', + 'Unknown alias: -{name}' => 'Tundmatu alias: -{name}', + 'Unknown filter attribute "{attribute}"' => 'Tundmatu filtri atribuut "{attribute}"', 'Unknown option: --{name}' => 'Tundmatu valik: --{name}', 'Update' => 'Muuda', 'View' => 'Vaata', 'Yes' => 'Jah', 'You are not allowed to perform this action.' => 'Teil pole õigust seda toimingut sooritada.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Saate üles laadida kõige rohkem {limit, number} {limit, plural, one{faili} other{faili}}.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => 'Peaksid üles laadima vähemalt {limit, number} {limit, plural, one{faili} other{faili}}.', 'in {delta, plural, =1{a day} other{# days}}' => '{delta, plural, =1{ühe päeva} other{# päeva}} pärast', 'in {delta, plural, =1{a minute} other{# minutes}}' => '{delta, plural, =1{ühe minuti} other{# minuti}} pärast', 'in {delta, plural, =1{a month} other{# months}}' => '{delta, plural, =1{ühe kuu} other{# kuu}} pärast', 'in {delta, plural, =1{a second} other{# seconds}}' => '{delta, plural, =1{ühe sekundi} other{# sekundi}} pärast', 'in {delta, plural, =1{a year} other{# years}}' => '{delta, plural, =1{ühe aasta} other{# aasta}} pärast', 'in {delta, plural, =1{an hour} other{# hours}}' => '{delta, plural, =1{ühe tunni} other{# tunni}} pärast', + 'just now' => 'just nüüd', 'the input value' => 'sisendväärtus', '{attribute} "{value}" has already been taken.' => '{attribute} "{value}" on juba kasutuses.', '{attribute} cannot be blank.' => '{attribute} ei tohi olla tühi.', + '{attribute} contains wrong subnet mask.' => '{attribute} sisaldab valet alamvõrgumaski.', '{attribute} is invalid.' => '{attribute} on sobimatu.', '{attribute} is not a valid URL.' => '{attribute} ei ole korrektne URL.', '{attribute} is not a valid email address.' => '{attribute} ei ole korrektne e-posti aadress.', + '{attribute} is not in the allowed range.' => '{attribute} ei ole lubatud vahemikus.', '{attribute} must be "{requiredValue}".' => '{attribute} peab olema "{requiredValue}".', '{attribute} must be a number.' => '{attribute} peab olema number.', '{attribute} must be a string.' => '{attribute} peab olema tekst.', - '{attribute} must be an integer.' => '{attribute} peab olema täisarv.', - '{attribute} must be either "{true}" or "{false}".' => '{attribute} peab olema kas "{true}" või "{false}".', - '{attribute} must be no greater than {max}.' => '{attribute} ei tohi olla suurem kui {max}.', - '{attribute} must be no less than {min}.' => '{attribute} ei tohi olla väiksem kui {min}.', - '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} peab sisaldama vähemalt {min, number} {min, plural, one{tähemärki} other{tähemärki}}.', - '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} tohib sisaldada maksimaalselt {max, number} {max, plural, one{tähemärki} other{tähemärki}}.', - '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} peab sisaldama {length, number} {length, plural, one{tähemärki} other{tähemärki}}.', - '{delta, plural, =1{a day} other{# days}} ago' => '{delta, plural, =1{1 päev} other{# päeva}} tagasi', - '{delta, plural, =1{a minute} other{# minutes}} ago' => '{delta, plural, =1{1 minut} other{# minutit}} tagasi', - '{delta, plural, =1{a month} other{# months}} ago' => '{delta, plural, =1{kuu aega} other{# kuud}} tagasi', - '{delta, plural, =1{a second} other{# seconds}} ago' => '{delta, plural, =1{1 sekund} other{# sekundit}} tagasi', - '{delta, plural, =1{a year} other{# years}} ago' => '{delta, plural, =1{aasta} other{# aastat}} tagasi', - '{delta, plural, =1{an hour} other{# hours}} ago' => '{delta, plural, =1{tund aega} other{# tundi}} tagasi', - ' and ' => ' ja ', - '"{attribute}" does not support operator "{operator}".' => '"{attribute}" ei toeta tehtemärki "{operator}".', - 'Condition for "{attribute}" should be either a value or valid operator specification.' => 'Atribuudi "{attribute}" tingimus peaks olema kas väärtus või korrektne tehtemärgi spetsifikatsioon.', - 'Operator "{operator}" must be used with a search attribute.' => 'Tehtemärki "{operator}" peab kasutama koos otsinguatribuudiga.', - 'Operator "{operator}" requires multiple operands.' => 'Tehtemärk "{operator}" nõuab mitut operandi.', - 'Powered by {yii}' => '', - 'The combination {values} of {attributes} has already been taken.' => 'Atribuutide {attributes} väärtuste kombinatsioon {values} on juba võetud.', - 'The format of {filter} is invalid.' => 'Filtri {filter} formaat on sobimatu.', - 'Unknown alias: -{name}' => 'Tundmatu alias: -{name}', - 'Unknown filter attribute "{attribute}"' => 'Tundmatu filtri atribuut "{attribute}"', - 'Yii Framework' => 'Yii raamistik', - 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => 'Peaksid üles laadima vähemalt {limit, number} {limit, plural, one{faili} other{faili}}.', - 'just now' => 'just nüüd', - '{attribute} contains wrong subnet mask.' => '{attribute} sisaldab valet alamvõrgumaski.', - '{attribute} is not in the allowed range.' => '{attribute} ei ole lubatud vahemikus.', '{attribute} must be a valid IP address.' => '{attribute} peab olema õige IP-aadress', '{attribute} must be an IP address with specified subnet.' => '{attribute} peab olema võrgumaskiga IP-aadress.', + '{attribute} must be an integer.' => '{attribute} peab olema täisarv.', + '{attribute} must be either "{true}" or "{false}".' => '{attribute} peab olema kas "{true}" või "{false}".', '{attribute} must be equal to "{compareValueOrAttribute}".' => '{attribute} peab olema "{compareValueOrAttribute}".', '{attribute} must be greater than "{compareValueOrAttribute}".' => '{attribute} peab olema suurem kui "{compareValueOrAttribute}".', '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '{attribute} peab olema suurem või võrdne "{compareValueOrAttribute}".', '{attribute} must be less than "{compareValueOrAttribute}".' => '{attribute} peab olema väiksem kui "{compareValueOrAttribute}".', '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '{attribute} peab olema väiksem või võrdne "{compareValueOrAttribute}".', + '{attribute} must be no greater than {max}.' => '{attribute} ei tohi olla suurem kui {max}.', + '{attribute} must be no less than {min}.' => '{attribute} ei tohi olla väiksem kui {min}.', '{attribute} must not be a subnet.' => '{attribute} ei tohi olla alamvõrk.', '{attribute} must not be an IPv4 address.' => '{attribute} ei tohi olla IPv4 aadress.', '{attribute} must not be an IPv6 address.' => '{attribute} ei tohi olla IPv6 aadress.', '{attribute} must not be equal to "{compareValueOrAttribute}".' => '{attribute} ei tohi olla "{compareValueOrAttribute}".', + '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} peab sisaldama vähemalt {min, number} {min, plural, one{tähemärki} other{tähemärki}}.', + '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} tohib sisaldada maksimaalselt {max, number} {max, plural, one{tähemärki} other{tähemärki}}.', + '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} peab sisaldama {length, number} {length, plural, one{tähemärki} other{tähemärki}}.', + '{compareAttribute} is invalid.' => '', '{delta, plural, =1{1 day} other{# days}}' => '{delta, plural, =1{1 päev} other{# päeva}}', '{delta, plural, =1{1 hour} other{# hours}}' => '{delta, plural, =1{1 tund} other{# tundi}}', '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta, plural, =1{1 minut} other{# minutit}}', '{delta, plural, =1{1 month} other{# months}}' => '{delta, plural, =1{1 kuu} other{# kuud}}', '{delta, plural, =1{1 second} other{# seconds}}' => '{delta, plural, =1{1 sekund} other{# sekundit}}', '{delta, plural, =1{1 year} other{# years}}' => '{delta, plural, =1{1 aasta} other{# aastat}}', + '{delta, plural, =1{a day} other{# days}} ago' => '{delta, plural, =1{1 päev} other{# päeva}} tagasi', + '{delta, plural, =1{a minute} other{# minutes}} ago' => '{delta, plural, =1{1 minut} other{# minutit}} tagasi', + '{delta, plural, =1{a month} other{# months}} ago' => '{delta, plural, =1{kuu aega} other{# kuud}} tagasi', + '{delta, plural, =1{a second} other{# seconds}} ago' => '{delta, plural, =1{1 sekund} other{# sekundit}} tagasi', + '{delta, plural, =1{a year} other{# years}} ago' => '{delta, plural, =1{aasta} other{# aastat}} tagasi', + '{delta, plural, =1{an hour} other{# hours}} ago' => '{delta, plural, =1{tund aega} other{# tundi}} tagasi', '{nFormatted} B' => '{nFormatted} B', '{nFormatted} GB' => '{nFormatted} GB', '{nFormatted} GiB' => '{nFormatted} GiB', diff --git a/framework/messages/fa/yii.php b/framework/messages/fa/yii.php index ec97c548788..e9213b3482f 100644 --- a/framework/messages/fa/yii.php +++ b/framework/messages/fa/yii.php @@ -24,9 +24,13 @@ */ return [ ' and ' => ' و ', + '"{attribute}" does not support operator "{operator}".' => '"{attribute}" از عملگر "{operator}" پشتیبانی نمی‌کند.', '(not set)' => '(تنظیم نشده)', + 'Action not found.' => 'عمل یافت نشد.', + 'Aliases available: {aliases}' => 'نام‌های مستعار موجود: {aliases}', 'An internal server error occurred.' => 'خطای داخلی سرور رخ داده است.', 'Are you sure you want to delete this item?' => 'آیا اطمینان به حذف این مورد دارید؟', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => 'شرط برای "{attribute}" باید یک مقدار یا مشخصه‌ی عملگر معتبر باشد.', 'Delete' => 'حذف', 'Error' => 'خطا', 'File upload failed.' => 'آپلود فایل ناموفق بود.', @@ -39,15 +43,19 @@ 'No results found.' => 'نتیجه‌ای یافت نشد.', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'فقط این نوع فایل‌ها مجاز می‌باشند: {mimeTypes}.', 'Only files with these extensions are allowed: {extensions}.' => 'فقط فایل‌های با این پسوندها مجاز هستند: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => 'عملگر "{operator}" باید با یک ویژگی جستجو استفاده شود.', + 'Operator "{operator}" requires multiple operands.' => 'عملگر "{operator}" به چند عملوند نیاز دارد.', + 'Options available: {options}' => 'گزینه‌های موجود: {options}', 'Page not found.' => 'صفحه‌ای یافت نشد.', 'Please fix the following errors:' => 'لطفاً خطاهای زیر را رفع نمائید:', 'Please upload a file.' => 'لطفاً یک فایل آپلود کنید.', - 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'نمایش {begin, number} تا {end, number} مورد از کل {totalCount, number} مورد.', + 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'نمایش {begin, number} تا {end, number} مورد از کل {totalCount, number} مورد.', 'The combination {values} of {attributes} has already been taken.' => 'مقدار {values} از {attributes} قبلاً گرفته شده است.', 'The file "{file}" is not an image.' => 'فایل "{file}" یک تصویر نیست.', - 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'حجم فایل "{file}" بسیار بیشتر می باشد. حجم آن نمی تواند از {formattedLimit} بیشتر باشد.', - 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'حجم فایل "{file}" بسیار کم می باشد. حجم آن نمی تواند از {formattedLimit} کمتر باشد.', + 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'حجم فایل "{file}" بسیار بیشتر می‌باشد. حجم آن نمی‌تواند از {formattedLimit} بیشتر باشد.', + 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'حجم فایل "{file}" بسیار کم می‌باشد. حجم آن نمی‌تواند از {formattedLimit} کمتر باشد.', 'The format of {attribute} is invalid.' => 'قالب {attribute} نامعتبر است.', + 'The format of {filter} is invalid.' => 'قالب {filter} نامعتبر است.', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'تصویر "{file}" خیلی بزرگ است. ارتفاع نمی‌تواند بزرگتر از {limit, number} پیکسل باشد.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'تصویر "{file}" خیلی بزرگ است. عرض نمی‌تواند بزرگتر از {limit, number} پیکسل باشد.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'تصویر "{file}" خیلی کوچک است. ارتفاع نمی‌تواند کوچکتر از {limit, number} پیکسل باشد.', @@ -57,12 +65,14 @@ 'Total {count, number} {count, plural, one{item} other{items}}.' => 'مجموع {count, number} مورد.', 'Unable to verify your data submission.' => 'قادر به تأیید اطلاعات ارسالی شما نمی‌باشد.', 'Unknown alias: -{name}' => 'نام مستعار ناشناخته: -{name}', + 'Unknown filter attribute "{attribute}"' => 'ویژگی "{attribute}" فیلتر ناشناخته', 'Unknown option: --{name}' => 'گزینه ناشناخته: --{name}', 'Update' => 'بروزرسانی', 'View' => 'نما', 'Yes' => 'بله', 'You are not allowed to perform this action.' => 'شما برای انجام این عملیات، دسترسی ندارید.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'شما حداکثر {limit, number} فایل را می‌توانید آپلود کنید.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => 'شما باید حداقل {limit, number} فایل آپلود کنید.', 'in {delta, plural, =1{a day} other{# days}}' => '{delta} روز دیگر', 'in {delta, plural, =1{a minute} other{# minutes}}' => '{delta} دقیقه دیگر', 'in {delta, plural, =1{a month} other{# months}}' => '{delta} ماه دیگر', @@ -71,34 +81,35 @@ 'in {delta, plural, =1{an hour} other{# hours}}' => '{delta} ساعت دیگر', 'just now' => 'هم اکنون', 'the input value' => 'مقدار ورودی', - '{attribute} "{value}" has already been taken.' => '{attribute} با مقدار "{value}" در حال حاضر گرفته‌شده است.', + '{attribute} "{value}" has already been taken.' => '{attribute} در حال حاضر با مقدار "{value}" گرفته شده است.', '{attribute} cannot be blank.' => '{attribute} نمی‌تواند خالی باشد.', - '{attribute} contains wrong subnet mask.' => '{attribute} شامل فرمت زیرشبکه اشتباه است.', + '{attribute} contains wrong subnet mask.' => '{attribute} شامل فرمت پوشش زیرشبکه (subnet mask) اشتباه است.', '{attribute} is invalid.' => '{attribute} معتبر نیست.', '{attribute} is not a valid URL.' => '{attribute} یک URL معتبر نیست.', '{attribute} is not a valid email address.' => '{attribute} یک آدرس ایمیل معتبر نیست.', - '{attribute} is not in the allowed range.' => '{attribute} در محدوده مجاز نمی‎باشد.', + '{attribute} is not in the allowed range.' => '{attribute} در محدوده مجاز نمی‌باشد.', '{attribute} must be "{requiredValue}".' => '{attribute} باید "{requiredValue}" باشد.', '{attribute} must be a number.' => '{attribute} باید یک عدد باشد.', '{attribute} must be a string.' => '{attribute} باید یک رشته باشد.', '{attribute} must be a valid IP address.' => '{attribute} باید یک آدرس IP معتبر باشد.', - '{attribute} must be an IP address with specified subnet.' => '{attribute} باید یک IP آدرس با زیرشبکه بخصوص باشد.', + '{attribute} must be an IP address with specified subnet.' => '{attribute} باید یک آدرس IP با زیرشبکه (subnet) مشخص شده باشد.', '{attribute} must be an integer.' => '{attribute} باید یک عدد صحیح باشد.', '{attribute} must be either "{true}" or "{false}".' => '{attribute} باید "{true}" و یا "{false}" باشد.', '{attribute} must be equal to "{compareValueOrAttribute}".' => '{attribute} باید با "{compareValueOrAttribute}" برابر باشد.', - '{attribute} must be greater than "{compareValueOrAttribute}".' => '{attribute} باید بزرگتر از "{compareValueOrAttribute}" باشد.', - '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '{attribute} باید بزرگتر یا برابر با "{compareValueOrAttribute}" باشد.', + '{attribute} must be greater than "{compareValueOrAttribute}".' => '{attribute} باید بیشتر از "{compareValueOrAttribute}" باشد.', + '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '{attribute} باید بیشتر یا برابر با "{compareValueOrAttribute}" باشد.', '{attribute} must be less than "{compareValueOrAttribute}".' => '{attribute} باید کمتر از "{compareValueOrAttribute}" باشد.', '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '{attribute} باید کمتر یا برابر با "{compareValueOrAttribute}" باشد.', '{attribute} must be no greater than {max}.' => '{attribute} نباید بیشتر از "{max}" باشد.', '{attribute} must be no less than {min}.' => '{attribute} نباید کمتر از "{min}" باشد.', - '{attribute} must not be a subnet.' => '{attribute} نباید یک زیرشبکه باشد.', + '{attribute} must not be a subnet.' => '{attribute} نباید یک زیرشبکه (subnet) باشد.', '{attribute} must not be an IPv4 address.' => '{attribute} نباید آدرس IPv4 باشد.', '{attribute} must not be an IPv6 address.' => '{attribute} نباید آدرس IPv6 باشد.', '{attribute} must not be equal to "{compareValueOrAttribute}".' => '{attribute} نباید برابر با "{compareValueOrAttribute}" باشد.', '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} حداقل باید شامل {min, number} کارکتر باشد.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} حداکثر باید شامل {max, number} کارکتر باشد.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} باید شامل {length, number} کارکتر باشد.', + '{compareAttribute} is invalid.' => '{compareAttribute} نامعتبر است.', '{delta, plural, =1{1 day} other{# days}}' => '{delta} روز', '{delta, plural, =1{1 hour} other{# hours}}' => '{delta} ساعت', '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta} دقیقه', @@ -114,7 +125,6 @@ '{nFormatted} B' => '{nFormatted} B', '{nFormatted} GB' => '{nFormatted} GB', '{nFormatted} GiB' => '{nFormatted} GiB', - '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} KiB' => '{nFormatted} KiB', '{nFormatted} MB' => '{nFormatted} MB', '{nFormatted} MiB' => '{nFormatted} MiB', @@ -122,6 +132,7 @@ '{nFormatted} PiB' => '{nFormatted} PiB', '{nFormatted} TB' => '{nFormatted} TB', '{nFormatted} TiB' => '{nFormatted} TiB', + '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} بایت', '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} گیبی‌بایت', '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} گیگابایت', diff --git a/framework/messages/fi/yii.php b/framework/messages/fi/yii.php index 938fd62d97c..531a44214e7 100644 --- a/framework/messages/fi/yii.php +++ b/framework/messages/fi/yii.php @@ -23,17 +23,14 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ - 'Powered by {yii}' => 'Powered by {yii}', - 'Yii Framework' => 'Yii Framework', - '{attribute} must be equal to "{compareValueOrAttribute}".' => '{attribute} täytyy olla yhtä suuri kuin "{compareValueOrAttribute}".', - '{attribute} must be greater than "{compareValueOrAttribute}".' => '{attribute} täytyy olla suurempi kuin "{compareValueOrAttribute}".', - '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '{attribute} täytyy olla suurempi tai yhtä suuri kuin "{compareValueOrAttribute}".', - '{attribute} must be less than "{compareValueOrAttribute}".' => '{attribute} täytyy olla pienempi kuin "{compareValueOrAttribute}".', - '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '{attribute} täytyy olla pienempi tai yhtä suuri kuin "{compareValueOrAttribute}".', - '{attribute} must not be equal to "{compareValueOrAttribute}".' => '{attribute} ei saa olla yhtä suuri kuin "{compareValueOrAttribute}".', + ' and ' => '', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(ei asetettu)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Sisäinen palvelinvirhe.', 'Are you sure you want to delete this item?' => 'Haluatko varmasti poistaa tämän?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => 'Poista', 'Error' => 'Virhe', 'File upload failed.' => 'Tiedoston lähetys epäonnistui.', @@ -46,14 +43,19 @@ 'No results found.' => 'Ei tuloksia.', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Sallittuja ovat vain tiedostot, joiden MIME-tyyppi on: {mimeTypes}.', 'Only files with these extensions are allowed: {extensions}.' => 'Sallittuja ovat vain tiedostot, joiden tiedostopääte on: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => 'Sivua ei löytynyt.', 'Please fix the following errors:' => 'Korjaa seuraavat virheet:', 'Please upload a file.' => 'Lähetä tiedosto.', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Näytetään {begin, number}-{end, number} kaikkiaan {totalCount, number} {totalCount, plural, one{tuloksesta} other{tuloksesta}}.', + 'The combination {values} of {attributes} has already been taken.' => '', 'The file "{file}" is not an image.' => 'Tiedosto "{file}" ei ole kuva.', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'Tiedosto "{file}" on liian iso. Sen koko ei voi olla suurempi kuin {formattedLimit}.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'Tiedosto "{file}" on liian pieni. Sen koko ei voi olla pienempi kuin {formattedLimit}.', 'The format of {attribute} is invalid.' => 'Attribuutin {attribute} formaatti on virheellinen.', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Kuva "{file}" on liian suuri. Korkeus ei voi olla suurempi kuin {limit, number} {limit, plural, one{pikseli} other{pikseliä}}.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Kuva "{file}" on liian suuri. Leveys ei voi olla suurempi kuin {limit, number} {limit, plural, one{pikseli} other{pikseliä}}.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Kuva "{file}" on liian pieni. Korkeus ei voi olla pienempi kuin {limit, number} {limit, plural, one{pikseli} other{pikseliä}}.', @@ -62,12 +64,15 @@ 'The verification code is incorrect.' => 'Vahvistuskoodi on virheellinen.', 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Yhteensä {count, number} {count, plural, one{tulos} other{tulosta}}.', 'Unable to verify your data submission.' => 'Tietojen lähetystä ei voida varmistaa.', + 'Unknown alias: -{name}' => '', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'Tuntematon valinta: --{name}', 'Update' => 'Päivitä', 'View' => 'Näytä', 'Yes' => 'Kyllä', 'You are not allowed to perform this action.' => 'Sinulla ei ole tarvittavia oikeuksia toiminnon suorittamiseen.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Voit lähettää enintään {limit, number} {limit, plural, one{tiedoston} other{tiedostoa}}.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', 'in {delta, plural, =1{a day} other{# days}}' => '{delta, plural, =1{päivässä} other{# päivässä}}', 'in {delta, plural, =1{a minute} other{# minutes}}' => '{delta, plural, =1{minuutissa} other{# minuutissa}}', 'in {delta, plural, =1{a month} other{# months}}' => '{delta, plural, =1{kuukaudessa} other{# kuukaudessa}}', @@ -90,14 +95,21 @@ '{attribute} must be an IP address with specified subnet.' => '{attribute} täytyy olla määritetyllä aliverkolla oleva IP-osoite.', '{attribute} must be an integer.' => '{attribute} täytyy olla kokonaisluku.', '{attribute} must be either "{true}" or "{false}".' => '{attribute} täytyy olla joko {true} tai {false}.', + '{attribute} must be equal to "{compareValueOrAttribute}".' => '{attribute} täytyy olla yhtä suuri kuin "{compareValueOrAttribute}".', + '{attribute} must be greater than "{compareValueOrAttribute}".' => '{attribute} täytyy olla suurempi kuin "{compareValueOrAttribute}".', + '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '{attribute} täytyy olla suurempi tai yhtä suuri kuin "{compareValueOrAttribute}".', + '{attribute} must be less than "{compareValueOrAttribute}".' => '{attribute} täytyy olla pienempi kuin "{compareValueOrAttribute}".', + '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '{attribute} täytyy olla pienempi tai yhtä suuri kuin "{compareValueOrAttribute}".', '{attribute} must be no greater than {max}.' => '{attribute} ei saa olla suurempi kuin "{max}".', '{attribute} must be no less than {min}.' => '{attribute} ei saa olla pienempi kuin "{min}".', '{attribute} must not be a subnet.' => '{attribute} ei saa olla aliverkko.', '{attribute} must not be an IPv4 address.' => '{attribute} ei saa olla IPv4-osoite.', '{attribute} must not be an IPv6 address.' => '{attribute} ei saa olla IPv6-osoite.', + '{attribute} must not be equal to "{compareValueOrAttribute}".' => '{attribute} ei saa olla yhtä suuri kuin "{compareValueOrAttribute}".', '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} tulisi sisältää vähintään {min, number} {min, plural, one{merkki} other{merkkiä}}.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} tulisi sisältää enintään {max, number} {max, plural, one{merkki} other{merkkiä}}.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} tulisi sisältää {length, number} {length, plural, one{merkki} other{merkkiä}}.', + '{compareAttribute} is invalid.' => '', '{delta, plural, =1{1 day} other{# days}}' => '{delta, plural, =1{1 päivä} other{# päivää}}', '{delta, plural, =1{1 hour} other{# hours}}' => '{delta, plural, =1{1 tunti} other{# tuntia}}', '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta, plural, =1{1 minuutti} other{# minuuttia}}', @@ -113,7 +125,6 @@ '{nFormatted} B' => '{nFormatted} t', '{nFormatted} GB' => '{nFormatted} Gt', '{nFormatted} GiB' => '{nFormatted} GiB', - '{nFormatted} kB' => '{nFormatted} kt', '{nFormatted} KiB' => '{nFormatted} KiB', '{nFormatted} MB' => '{nFormatted} Mt', '{nFormatted} MiB' => '{nFormatted} MiB', @@ -121,6 +132,7 @@ '{nFormatted} PiB' => '{nFormatted} PiB', '{nFormatted} TB' => '{nFormatted} Tt', '{nFormatted} TiB' => '{nFormatted} TiB', + '{nFormatted} kB' => '{nFormatted} kt', '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, =1{tavu} other{tavua}}', '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} {n, plural, =1{gibitavu} other{gibitavua}}', '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, =1{gigatavu} other{gigatavua}}', diff --git a/framework/messages/fr/yii.php b/framework/messages/fr/yii.php index 458d7e738e7..8e1bfda3cd4 100644 --- a/framework/messages/fr/yii.php +++ b/framework/messages/fr/yii.php @@ -24,7 +24,10 @@ */ return [ ' and ' => ' et ', + '"{attribute}" does not support operator "{operator}".' => '"{attribute}" ne supporte pas l\'opérateur "{operator}".', '(not set)' => '(non défini)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Une erreur de serveur interne s\'est produite.', 'Are you sure you want to delete this item?' => 'Êtes-vous sûr de vouloir supprimer cet élément ?', 'Condition for "{attribute}" should be either a value or valid operator specification.' => 'La condition pour "{atttribute}" doit être soit une valeur, soit une spécification d\'opérateur valide.', @@ -42,10 +45,10 @@ 'Only files with these extensions are allowed: {extensions}.' => 'Les extensions de fichiers autorisées sont : {extensions}.', 'Operator "{operator}" must be used with a search attribute.' => 'L\'opérateur "{operator}" doit être utilisé avec un attribut de recherche.', 'Operator "{operator}" requires multiple operands.' => 'L\'opérateur "{operator}" requière plusieurs opérandes.', + 'Options available: {options}' => '', 'Page not found.' => 'Page non trouvée.', 'Please fix the following errors:' => 'Veuillez vérifier les erreurs suivantes :', 'Please upload a file.' => 'Veuillez télécharger un fichier.', - 'Powered by {yii}' => 'Propulsé par {yii}', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Affichage de {begin, number}-{end, number} sur {totalCount, number} {totalCount, plural, one{élément} other{éléments}}.', 'The combination {values} of {attributes} has already been taken.' => 'La combinaison {values} de {attributes} est déjà utilisée.', 'The file "{file}" is not an image.' => 'Le fichier « {file} » n\'est pas une image.', @@ -67,7 +70,6 @@ 'Update' => 'Modifier', 'View' => 'Voir', 'Yes' => 'Oui', - 'Yii Framework' => 'Yii Framework', 'You are not allowed to perform this action.' => 'Vous n\'êtes pas autorisé à effectuer cette action.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Vous pouvez télécharger au maximum {limit, number} {limit, plural, one{fichier} other{fichiers}}.', 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => 'Vous devez télécharger au moins {limit, number} {limit, plural, one{fichier} other{fichiers}}.', @@ -107,6 +109,7 @@ '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} doit comporter au moins {min, number} {min, plural, one{caractère} other{caractères}}.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} doit comporter au plus {max, number} {max, plural, one{caractère} other{caractères}}.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} doit comporter {length, number} {length, plural, one{caractère} other{caractères}}.', + '{compareAttribute} is invalid.' => '', '{delta, plural, =1{1 day} other{# days}}' => '{delta, plural, =1{1 jour} other{# jours}}', '{delta, plural, =1{1 hour} other{# hours}}' => '{delta, plural, =1{1 heure} other{# heures}}', '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta, plural, =1{1 minute} other{# minutes}}', @@ -122,7 +125,6 @@ '{nFormatted} B' => '{nFormatted} o', '{nFormatted} GB' => '{nFormatted} Go', '{nFormatted} GiB' => '{nFormatted} Gio', - '{nFormatted} kB' => '{nFormatted} Ko', '{nFormatted} KiB' => '{nFormatted} Kio', '{nFormatted} MB' => '{nFormatted} Mo', '{nFormatted} MiB' => '{nFormatted} Mio', @@ -130,6 +132,7 @@ '{nFormatted} PiB' => '{nFormatted} Pio', '{nFormatted} TB' => '{nFormatted} To', '{nFormatted} TiB' => '{nFormatted} Tio', + '{nFormatted} kB' => '{nFormatted} Ko', '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, =1{octet} other{octets}}', '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} {n, plural, =1{# gigaoctet} other{# gigaoctets}}', '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, =1{gibioctet} other{gibioctets}}', @@ -141,5 +144,4 @@ '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '{nFormatted} {n, plural, =1{# petaoctet} other{# petaoctets}}', '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '{nFormatted} {n, plural, =1{# teraoctet} other{# teraoctets}}', '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '{nFormatted} {n, plural, =1{# teraoctet} other{# teraoctets}}', - '"{attribute}" does not support operator "{operator}".' => '"{attribute}" ne supporte pas l\'opérateur "{operator}".', ]; diff --git a/framework/messages/he/yii.php b/framework/messages/he/yii.php index 4613b419139..b3eef1b535c 100644 --- a/framework/messages/he/yii.php +++ b/framework/messages/he/yii.php @@ -23,9 +23,14 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + ' and ' => '', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(לא הוגדר)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'שגיאת שרת פנימית', 'Are you sure you want to delete this item?' => 'האם אתה בטוח שברצונך למחוק פריט זה?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => 'מחק', 'Error' => 'שגיאה', 'File upload failed.' => 'העלאת קובץ נכשלה', @@ -35,52 +40,108 @@ 'Missing required arguments: {params}' => 'חסרים ארגומנטים נדרשים: {params}', 'Missing required parameters: {params}' => 'חסרים פרמטרים נדרשים: {params}', 'No' => 'לא', - 'No help for unknown command "{command}".' => 'פקודה "{command}" לא מוכרת ואין לה עזרה', - 'No help for unknown sub-command "{command}".' => 'תת-פקודה "{command}" לא מוכרת ואין לה עזרה', 'No results found.' => 'לא נמצאו תוצאות', + 'Only files with these MIME types are allowed: {mimeTypes}.' => '', 'Only files with these extensions are allowed: {extensions}.' => 'רק קבצים עם ההרחבות הבאות מותרים: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => 'דף לא נמצא', 'Please fix the following errors:' => 'בבקשה, תקן את השגיאות הבאות: ', 'Please upload a file.' => 'נא העלה קובץ.', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'מציג {begin, number}-{end, number} מתוך {totalCount, number} {totalCount, plural, one{רשומה} other{רשומות}}.', + 'The combination {values} of {attributes} has already been taken.' => '', 'The file "{file}" is not an image.' => 'הקובץ "{file}" אינו קובץ תמונה.', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'הקובץ "{file}" גדול מדי. גודל זה אינו מצליח {formattedLimit}.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'הקובץ "{file}" קטן מדי. הקובץ אינו יכול להיות קטן מ {formattedLimit}.', 'The format of {attribute} is invalid.' => 'הפורמט של {attribute} אינו חוקי.', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'התמונה "{file}" גדולה מדי. הגובה לא יכול להיות גדול מ {limit, number} {limit, plural, one{pixel} other{pixels}}.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'התמונה "{file}" גדולה מדי. הרוחב לא יכול להיות גדול מ {limit, number} {limit, plural, one{pixel} other{pixels}}.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'התמונה "{file}" קטנה מדי. הגובה לא יכול להיות קטן מ {limit, number} {limit, plural, one{pixel} other{pixels}}.', 'The image "{file}" is too small. The width cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'התמונה "{file}" קטנה מדי. הרוחב לא יכול להיות קטן מ {limit, number} {limit, plural, one{pixel} other{pixels}}.', + 'The requested view "{name}" was not found.' => '', 'The verification code is incorrect.' => 'קוד האימות אינו תקין.', 'Total {count, number} {count, plural, one{item} other{items}}.' => 'סך הכל {count, number} {count, plural, one{אייטם} other{אייטמים}}.', 'Unable to verify your data submission.' => 'אין אפשרות לאמת את המידע שהתקבל.', - 'Unknown command "{command}".' => 'Unknown command "{command}".', + 'Unknown alias: -{name}' => '', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'Unknown option: --{name}', 'Update' => 'עדכון', 'View' => 'תצוגה', 'Yes' => 'כן', 'You are not allowed to perform this action.' => 'אינך מורשה לבצע את הפעולה הזו.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'אתה יכול להעלות לכל היותר {limit, number} {limit, plural, one{קובץ} other{קבצים}}.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', + 'in {delta, plural, =1{a day} other{# days}}' => '', + 'in {delta, plural, =1{a minute} other{# minutes}}' => '', + 'in {delta, plural, =1{a month} other{# months}}' => '', + 'in {delta, plural, =1{a second} other{# seconds}}' => '', + 'in {delta, plural, =1{a year} other{# years}}' => '', + 'in {delta, plural, =1{an hour} other{# hours}}' => '', + 'just now' => '', 'the input value' => 'הערך המוכנס', '{attribute} "{value}" has already been taken.' => '{attribute} "{value}" כבר בשימוש', '{attribute} cannot be blank.' => '{attribute} לא יכול להיות ריק.', + '{attribute} contains wrong subnet mask.' => '', '{attribute} is invalid.' => '{attribute} לא חוקי.', '{attribute} is not a valid URL.' => '{attribute} איננו כתובת אינטרנט חוקית.', '{attribute} is not a valid email address.' => '{attribute} לא כתובת מייל חוקית.', + '{attribute} is not in the allowed range.' => '', '{attribute} must be "{requiredValue}".' => '{attribute} חייב להיות "{requiredValue}".', '{attribute} must be a number.' => '{attribute} חייב להיות מספר', '{attribute} must be a string.' => '{attribute} חייב להיות מחרוזת טקסט', + '{attribute} must be a valid IP address.' => '', + '{attribute} must be an IP address with specified subnet.' => '', '{attribute} must be an integer.' => '{attribute} חייב להיות מספר שלם', '{attribute} must be either "{true}" or "{false}".' => '{attribute} חייב להיות "{true}" או "{false}".', - '{attribute} must be greater than "{compareValue}".' => '{attribute} חייב להיות גדול מ "{compareValue}".', - '{attribute} must be greater than or equal to "{compareValue}".' => '{attribute} חייב להיות גדול מ או שווה "{compareValue}".', - '{attribute} must be less than "{compareValue}".' => '{attribute} חייב להיות פחות מ "{compareValue}".', - '{attribute} must be less than or equal to "{compareValue}".' => '{attribute} חייב להיות פחות מ או שווה "{compareValue}".', + '{attribute} must be equal to "{compareValueOrAttribute}".' => '', + '{attribute} must be greater than "{compareValueOrAttribute}".' => '{attribute} חייב להיות גדול מ "{compareValueOrAttribute}".', + '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '{attribute} חייב להיות גדול מ או שווה "{compareValueOrAttribute}".', + '{attribute} must be less than "{compareValueOrAttribute}".' => '{attribute} חייב להיות פחות מ "{compareValueOrAttribute}".', + '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '{attribute} חייב להיות פחות מ או שווה "{compareValueOrAttribute}".', '{attribute} must be no greater than {max}.' => '{attribute} חייב להיות לא יותר מ "{max}".', '{attribute} must be no less than {min}.' => '{attribute} חייב להיות לא פחות מ "{min}".', - '{attribute} must be repeated exactly.' => '{attribute} חייב להיות מוחזר בדיוק.', - '{attribute} must not be equal to "{compareValue}".' => '{attribute} חייב להיות שווה ל "{compareValue}"', + '{attribute} must not be a subnet.' => '', + '{attribute} must not be an IPv4 address.' => '', + '{attribute} must not be an IPv6 address.' => '', + '{attribute} must not be equal to "{compareValueOrAttribute}".' => '{attribute} חייב להיות שווה ל "{compareValueOrAttribute}"', '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} אמור לכלול לפחות {min, number} {min, plural, one{תו} other{תוים}}.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} אמור לא לכלול יותר מ{max, number} {max, plural, one{תו} other{תוים}}.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} אמור לכלול {length, number} {length, plural, one{תו} other{תוים}}.', + '{compareAttribute} is invalid.' => '', + '{delta, plural, =1{1 day} other{# days}}' => '', + '{delta, plural, =1{1 hour} other{# hours}}' => '', + '{delta, plural, =1{1 minute} other{# minutes}}' => '', + '{delta, plural, =1{1 month} other{# months}}' => '', + '{delta, plural, =1{1 second} other{# seconds}}' => '', + '{delta, plural, =1{1 year} other{# years}}' => '', + '{delta, plural, =1{a day} other{# days}} ago' => '', + '{delta, plural, =1{a minute} other{# minutes}} ago' => '', + '{delta, plural, =1{a month} other{# months}} ago' => '', + '{delta, plural, =1{a second} other{# seconds}} ago' => '', + '{delta, plural, =1{a year} other{# years}} ago' => '', + '{delta, plural, =1{an hour} other{# hours}} ago' => '', + '{nFormatted} B' => '', + '{nFormatted} GB' => '', + '{nFormatted} GiB' => '', + '{nFormatted} KiB' => '', + '{nFormatted} MB' => '', + '{nFormatted} MiB' => '', + '{nFormatted} PB' => '', + '{nFormatted} PiB' => '', + '{nFormatted} TB' => '', + '{nFormatted} TiB' => '', + '{nFormatted} kB' => '', + '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '', + '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '', + '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '', + '{nFormatted} {n, plural, =1{kibibyte} other{kibibytes}}' => '', + '{nFormatted} {n, plural, =1{kilobyte} other{kilobytes}}' => '', + '{nFormatted} {n, plural, =1{mebibyte} other{mebibytes}}' => '', + '{nFormatted} {n, plural, =1{megabyte} other{megabytes}}' => '', + '{nFormatted} {n, plural, =1{pebibyte} other{pebibytes}}' => '', + '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '', + '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '', + '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '', ]; diff --git a/framework/messages/hi/yii.php b/framework/messages/hi/yii.php index 6c79f0c2620..0276c2d8728 100644 --- a/framework/messages/hi/yii.php +++ b/framework/messages/hi/yii.php @@ -24,9 +24,13 @@ */ return [ ' and ' => ' और ', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(स्थापित नहीं)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'सर्वर में एक आंतरिक दोष उत्पन्न हुआ है।', 'Are you sure you want to delete this item?' => 'क्या आप सुनिश्चित रूप से इस आइटम को मिटाना चाहते हैं?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => 'मिटाएँ', 'Error' => 'खामी', 'File upload failed.' => 'फ़ाइल अपलोड असफल रहा।', @@ -39,16 +43,19 @@ 'No results found.' => 'कोई परिणाम नहीं मिला।', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'केवल इन MIME प्रकारों वाली फ़ाइलों की अनुमति है: {mimeTypes}।', 'Only files with these extensions are allowed: {extensions}.' => 'केवल इन एक्सटेंशन वाली फाइलों की अनुमति है: {extensions}।', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => 'पृष्ठ नहीं मिला।', 'Please fix the following errors:' => 'कृपया निम्नलिखित खामीयां सुधारें:', 'Please upload a file.' => 'कृपया एक फ़ाइल अपलोड करें।', - 'Powered by {yii}' => '{yii} द्वारा संचालित', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'दिखाया गया है {totalCount, number} {totalCount, plural, one{चीज} other{चीज़े}} में से {begin, number}-{end, number} ।', 'The combination {values} of {attributes} has already been taken.' => '{attributes} और {values} का संयोजन पहले से ही लिया जा चुका है।', 'The file "{file}" is not an image.' => 'यह फ़ाइल "{file}" एक चित्र नहीं है।', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'यह फ़ाइल "{file}" बहुत बड़ी है। इसका आकार {formattedLimit} से अधिक नहीं हो सकता है।', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'यह फ़ाइल "{file}" बहुत छोटी है। इसका आकार {formattedLimit} से छोटा नहीं हो सकता।', 'The format of {attribute} is invalid.' => '{attribute} का प्रारूप गलत है।', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'यह चित्र "{file}" बहुत बड़ी है। ऊंचाई {limit, number} {limit, plural, one{पिक्सेल} other{पिक्सेल}} से बड़ी नहीं हो सकती।', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'यह चित्र "{file}" बहुत बड़ी है। चौड़ाई {limit, number} {limit, plural, one{पिक्सेल} other{पिक्सेल}} से बड़ी नहीं हो सकती।', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'यह चित्र "{file}" बहुत छोटी है। ऊंचाई {limit, number} {limit, plural, one{पिक्सेल} other{पिक्सेल}} से छोटी नहीं हो सकती।', @@ -58,13 +65,14 @@ 'Total {count, number} {count, plural, one{item} other{items}}.' => 'कुल {count, number} {count, plural, one{चीज} other{चीज़े}}।', 'Unable to verify your data submission.' => 'आपके डेटा सबमिशन को सत्यापित करने में असमर्थ।', 'Unknown alias: -{name}' => 'अज्ञात उपनाम: - {name}', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'अज्ञात विकल्प: - {name}', 'Update' => 'अपडेट करें', 'View' => 'देखें', 'Yes' => 'हाँ', - 'Yii Framework' => 'Yii फ़्रेमवर्क', 'You are not allowed to perform this action.' => 'आपको यह करने की अनुमति नहीं है।', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'आप अधिकतम {limit, number} {limit, plural, one{फ़ाइल} other{फाइलें}} अपलोड कर सकते हैं।', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', 'in {delta, plural, =1{a day} other{# days}}' => '{delta, plural, =1{एक दिन} other{# दिनों}} में', 'in {delta, plural, =1{a minute} other{# minutes}}' => '{delta, plural, =1{एक मिनट} other{# मिनटों}} में', 'in {delta, plural, =1{a month} other{# months}}' => '{delta, plural, =1{एक महीना} other{# महीनों}} में', @@ -101,6 +109,7 @@ '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} में कम से कम {min, number} {min, plural, one{अक्षर} other{अक्षर}} होना चाहिए।', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} में अधिकतम {max, number} {max, plural, one{अक्षर} other{अक्षर}} होना चाहिए।', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} में {length, number} {length, plural, one{अक्षर} other{अक्षर}} शामिल होना चाहिए।', + '{compareAttribute} is invalid.' => '', '{delta, plural, =1{1 day} other{# days}}' => '{delta, plural, =1{1 दिन} other{# दिन}}', '{delta, plural, =1{1 hour} other{# hours}}' => '{delta, plural, =1{1 घंटा} other{# घंटे}}', '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta, plural, =1{1 मिनट} other{# मिनिटे}}', @@ -116,7 +125,6 @@ '{nFormatted} B' => '{nFormatted} B', '{nFormatted} GB' => '{nFormatted} GB', '{nFormatted} GiB' => '{nFormatted} GiB', - '{nFormatted} kB' => '{nFormatted} KB', '{nFormatted} KiB' => '{nFormatted} KiB', '{nFormatted} MB' => '{nFormatted} MB', '{nFormatted} MiB' => '{nFormatted} MiB', @@ -124,6 +132,7 @@ '{nFormatted} PiB' => '{nFormatted} PiB', '{nFormatted} TB' => '{nFormatted} TB', '{nFormatted} TiB' => '{nFormatted} TiB', + '{nFormatted} kB' => '{nFormatted} KB', '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, =1{बाइट} other{बाइट्स}}', '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} {n, plural, =1{गिबिबाइट} other{गिबिबाइटस}}', '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, =1{गीगाबाइट} other{गीगाबाइटस}}', diff --git a/framework/messages/hr/yii.php b/framework/messages/hr/yii.php index ac445e0908c..73e5c656fb0 100644 --- a/framework/messages/hr/yii.php +++ b/framework/messages/hr/yii.php @@ -23,9 +23,14 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + ' and ' => '', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(nije postavljeno)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Došlo je do interne pogreške servera.', - 'Are you sure you want to delete this item' => 'Želiš li to obrisati?', + 'Are you sure you want to delete this item?' => '', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => 'Obrisati', 'Error' => 'Pogreška', 'File upload failed.' => 'Upload datoteke nije uspio.', @@ -35,77 +40,108 @@ 'Missing required arguments: {params}' => 'Nedostaju potrebni argunenti: {params}', 'Missing required parameters: {params}' => 'Nedostaju potrebni parametri: {params}', 'No' => 'Ne', - 'No help for unknown command "{command}".' => 'Nema pomoći za nepoznatu naredbu "{command}"', - 'No help for unknown sub-command "{command}".' => 'Nema pomoći za nepoznatu pod-naredbu "{command}"', 'No results found.' => 'Nema rezultata.', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Samo datoteke s ovim MIME vrstama su dopuštene: {mimeTypes}.', 'Only files with these extensions are allowed: {extensions}.' => 'Samo datoteke s ovim ekstenzijama su dopuštene: {extensions}', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => 'Stranica nije pronađena.', 'Please fix the following errors:' => 'Molimo vas ispravite pogreške:', 'Please upload a file.' => 'Molimo vas da uploadate datoteku.', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Prikazuj {begin, number}-{end, number} od {totalCount, number} {totalCount, plural, one{stavka} few{stavke} many{stavki} other{stavki}}.', + 'The combination {values} of {attributes} has already been taken.' => '', 'The file "{file}" is not an image.' => 'Datoteka "{file}" nije slika.', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'Datoteka "{file}" je prevelika. Ne smije biti veća od {formattedLimit}.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'Datoteka "{file}" je premalena. Ne smije biti manja od {formattedLimit}.', 'The format of {attribute} is invalid.' => 'Format od {attribute} je nevažeći.', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Slika "{file}" je prevelika. Visina slike ne smije biti veća od {limit, number} {limit, plural, one{piksel} other{piksela}}.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Slika "{file}" je prevelika. Širina slike ne smije biti veća od {limit, number} {limit, plural, one{piksel} other{piksela}}.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Slika "{file}" je premalena. Visina slike ne smije biti manja od {limit, number} {limit, plural, one{piksel} other{piksela}}.', 'The image "{file}" is too small. The width cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Slika "{file}" je premalena. Širina slike ne smije biti manja od {limit, number} {limit, plural, one{piksel} other{piksela}}.', + 'The requested view "{name}" was not found.' => '', 'The verification code is incorrect.' => 'Kod za provjeru nije točan.', 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Ukupno {count, number} {count, plural, =1{stavka} one{# stavka} few{# stavke} many{# stavki} other{# stavki}}.', 'Unable to verify your data submission.' => 'Nije moguće provjeriti poslane podatke.', - 'Unknown command "{command}".' => 'Nepoznata naredba "{command}".', + 'Unknown alias: -{name}' => '', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'Nepoznata opcija: --{name}', 'Update' => 'Uredi', 'View' => 'Pregled', 'Yes' => 'Da', 'You are not allowed to perform this action.' => 'Nije vam dopušteno obavljati tu radnju.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Najviše možete uploadat {limit, number} {limit, plural, one{datoteku} few{datoteke} other{datoteka}}.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', 'in {delta, plural, =1{a day} other{# days}}' => 'u {delta, plural, =1{dan} one{# dan} few{# dana} many{# dana} other{# dana}}', 'in {delta, plural, =1{a minute} other{# minutes}}' => 'u {delta, plural, =1{minuta} one{# minuta} few{# minute} many{# minuta} other{# minuta}}', 'in {delta, plural, =1{a month} other{# months}}' => 'u {delta, plural, =1{mjesec} one{# mjesec} few{# mjeseca} many{# mjeseci} other{# mjeseci}}', 'in {delta, plural, =1{a second} other{# seconds}}' => 'u {delta, plural, =1{sekunda} one{# sekunda} few{# sekunde} many{# sekundi} other{# sekundi}}', 'in {delta, plural, =1{a year} other{# years}}' => 'u {delta, plural, =1{godina} one{# godine} few{# godine} many{# godina} other{# godina}}', 'in {delta, plural, =1{an hour} other{# hours}}' => 'u {delta, plural, =1{sat} one{# sat} few{# sata} many{# sati} other{# sati}}', + 'just now' => '', 'the input value' => 'ulazna vrijednost', '{attribute} "{value}" has already been taken.' => '{attribute} "{value}" već se koristi.', '{attribute} cannot be blank.' => '{attribute} ne smije biti prazan.', + '{attribute} contains wrong subnet mask.' => '', '{attribute} is invalid.' => 'Atribut "{attribute}" je neispravan.', '{attribute} is not a valid URL.' => '{attribute} nije valjan URL.', '{attribute} is not a valid email address.' => '{attribute} nije valjana email adresa.', + '{attribute} is not in the allowed range.' => '', '{attribute} must be "{requiredValue}".' => '{attribute} mora biti "{requiredValue}".', '{attribute} must be a number.' => '{attribute} mora biti broj.', '{attribute} must be a string.' => '{attribute} mora biti string(riječ,tekst).', + '{attribute} must be a valid IP address.' => '', + '{attribute} must be an IP address with specified subnet.' => '', '{attribute} must be an integer.' => '{attribute} mora biti cijeli broj.', '{attribute} must be either "{true}" or "{false}".' => '{attribute} mora biti "{true}" ili "{false}".', - '{attribute} must be greater than "{compareValue}".' => '{attribute} mora biti veći od "{compareValue}', - '{attribute} must be greater than or equal to "{compareValue}".' => '{attribute} mora biti veći ili jednak "{compareValue}".', - '{attribute} must be less than "{compareValue}".' => '{attribute} mora biti manji od "{compareValue}".', - '{attribute} must be less than or equal to "{compareValue}".' => '{attribute} mora biti jednak "{compareValue}".', + '{attribute} must be equal to "{compareValueOrAttribute}".' => '', + '{attribute} must be greater than "{compareValueOrAttribute}".' => '{attribute} mora biti veći od "{compareValueOrAttribute}', + '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '{attribute} mora biti veći ili jednak "{compareValueOrAttribute}".', + '{attribute} must be less than "{compareValueOrAttribute}".' => '{attribute} mora biti manji od "{compareValueOrAttribute}".', + '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '{attribute} mora biti jednak "{compareValueOrAttribute}".', '{attribute} must be no greater than {max}.' => '{attribute} ne smije biti veći od {max}.', '{attribute} must be no less than {min}.' => '{attribute} ne smije biti manji od {min}.', - '{attribute} must be repeated exactly.' => '{attribute} mora biti točno ponovljeno.', - '{attribute} must not be equal to "{compareValue}".' => '{attribute} ne smije biti jednak "{compareValue}".', + '{attribute} must not be a subnet.' => '', + '{attribute} must not be an IPv4 address.' => '', + '{attribute} must not be an IPv6 address.' => '', + '{attribute} must not be equal to "{compareValueOrAttribute}".' => '{attribute} ne smije biti jednak "{compareValueOrAttribute}".', '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} mora najmanje sadržavati {min, number} {min, plural, =1{znak} one{znak} few{znaka} many{znakova} other{znakova}}.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} moze sadržavati najviše do {max, number} {max, plural, =1{znak} one{znak} few{znaka} many{znakova} other{znakova}}.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} mora sadržavati {length, number} {length, plural, =1{znak} one{znak} few{znaka} many{znakova} other{znakova}}.', + '{compareAttribute} is invalid.' => '', + '{delta, plural, =1{1 day} other{# days}}' => '', + '{delta, plural, =1{1 hour} other{# hours}}' => '', + '{delta, plural, =1{1 minute} other{# minutes}}' => '', + '{delta, plural, =1{1 month} other{# months}}' => '', + '{delta, plural, =1{1 second} other{# seconds}}' => '', + '{delta, plural, =1{1 year} other{# years}}' => '', '{delta, plural, =1{a day} other{# days}} ago' => '{delta, plural, =1{dan} one{# dan} few{# dana} many{# dana} other{# dana}}', '{delta, plural, =1{a minute} other{# minutes}} ago' => '{delta, plural, =1{minuta} one{# minuta} few{# minute} many{# minuta} other{# minuta}}', '{delta, plural, =1{a month} other{# months}} ago' => '{delta, plural, =1{mjesec} one{# mjesec} few{# mjeseca} many{# mjeseci} other{# mjeseci}}', '{delta, plural, =1{a second} other{# seconds}} ago' => '{delta, plural, =1{sekunda} one{# sekunda} few{# sekunde} many{# sekundi} other{# sekundi}}', '{delta, plural, =1{a year} other{# years}} ago' => '{delta, plural, =1{godina} one{# godine} few{# godine} many{# godina} other{# godina}}', '{delta, plural, =1{an hour} other{# hours}} ago' => ' {delta, plural, =1{sat} one{# sat} few{# sata} many{# sati} other{# sati}}', - '{n, plural, =1{# byte} other{# bytes}}' => '{n, plural, =1{# bajt} other{# bajta}}', - '{n, plural, =1{# gigabyte} other{# gigabytes}}' => '{n, plural, =1{# gigabajt} other{# gigabajta}}', - '{n, plural, =1{# kilobyte} other{# kilobytes}}' => '{n, plural, =1{# kilobajt} other{# kilobajta}}', - '{n, plural, =1{# megabyte} other{# megabytes}}' => '{n, plural, =1{# megabajt} other{# megabajta}}', - '{n, plural, =1{# petabyte} other{# petabytes}}' => '{n, plural, =1{# petabajt} other{# petabajta}}', - '{n, plural, =1{# terabyte} other{# terabytes}}' => '{n, plural, =1{# terabajt} other{# terabajta}}', - '{n} B' => '{n} B', - '{n} GB' => '{n} GB', - '{n} KB' => '{n} KB', - '{n} MB' => '{n} MB', - '{n} PB' => '{n} PB', - '{n} TB' => '{n} TB', + '{nFormatted} B' => '{nFormatted} B', + '{nFormatted} GB' => '{nFormatted} GB', + '{nFormatted} GiB' => '', + '{nFormatted} KiB' => '', + '{nFormatted} MB' => '{nFormatted} MB', + '{nFormatted} MiB' => '', + '{nFormatted} PB' => '{nFormatted} PB', + '{nFormatted} PiB' => '', + '{nFormatted} TB' => '{nFormatted} TB', + '{nFormatted} TiB' => '', + '{nFormatted} kB' => '{nFormatted} kB', + '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, =1{bajt} other{bajta}}', + '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '', + '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, =1{gigabajt} other{gigabajta}}', + '{nFormatted} {n, plural, =1{kibibyte} other{kibibytes}}' => '', + '{nFormatted} {n, plural, =1{kilobyte} other{kilobytes}}' => '{nFormatted} {n, plural, =1{kilobajt} other{kilobajta}}', + '{nFormatted} {n, plural, =1{mebibyte} other{mebibytes}}' => '', + '{nFormatted} {n, plural, =1{megabyte} other{megabytes}}' => '{nFormatted} {n, plural, =1{megabajt} other{megabajta}}', + '{nFormatted} {n, plural, =1{pebibyte} other{pebibytes}}' => '', + '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '{nFormatted} {n, plural, =1{petabajt} other{petabajta}}', + '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '', + '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '{nFormatted} {n, plural, =1{terabajt} other{terabajta}}', ]; diff --git a/framework/messages/hu/yii.php b/framework/messages/hu/yii.php index 88575242bd3..db42e0f2926 100644 --- a/framework/messages/hu/yii.php +++ b/framework/messages/hu/yii.php @@ -23,92 +23,125 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ - '(not set)' => '(nincs beállítva)', - 'An internal server error occurred.' => 'Egy belső szerver hiba történt.', - 'Are you sure you want to delete this item?' => 'Biztos benne, hogy törli ezt az elemet?', - 'Delete' => 'Törlés', - 'Error' => 'Hiba', - 'File upload failed.' => 'A fájlfeltöltés nem sikerült.', - 'Home' => 'Főoldal', - 'Invalid data received for parameter "{param}".' => 'Érvénytelen paraméter: {param}.', - 'Login Required' => 'Bejelentkezés szükséges', - 'Missing required arguments: {params}' => 'Hiányzó argumentumok: {params}', - 'Missing required parameters: {params}' => 'Hiányzó paraméterek: {params}', - 'No' => 'Nem', - 'No help for unknown command "{command}".' => 'Nincs súgó az ismeretlen {command} parancshoz.', - 'No help for unknown sub-command "{command}".' => 'Nincs súgó az ismeretlen {command} alparancshoz.', - 'No results found.' => 'Nincs találat.', - 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Csak a következő MIME típusú fájlok engedélyezettek: {mimeTypes}.', - 'Only files with these extensions are allowed: {extensions}.' => 'Csak a következő kiterjesztésű fájlok engedélyezettek: {extensions}.', - 'Page not found.' => 'Az oldal nem található.', - 'Please fix the following errors:' => 'Kérjük javítsa a következő hibákat:', - 'Please upload a file.' => 'Kérjük töltsön fel egy fájlt.', - 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => '{begin, number}-{end, number} megjelenítése a(z) {totalCount, number} elemből.', - 'The file "{file}" is not an image.' => '"{file}" nem egy kép.', - 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => '"{file}" túl nagy. A mérete nem lehet nagyobb {formattedLimit}.', - 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => '"{file}" túl kicsi. A mérete nem lehet kisebb {formattedLimit}.', - 'The format of {attribute} is invalid.' => 'A(z) {attribute} formátuma érvénytelen.', - 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'A(z) "{file}" kép túl nagy. A magassága nem lehet nagyobb {limit, number} pixelnél.', - 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'A(z) "{file}" kép túl nagy. A szélessége nem lehet nagyobb {limit, number} pixelnél.', - 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'A(z) "{file}" kép túl kicsi. A magassága nem lehet kisebb {limit, number} pixelnél.', - 'The image "{file}" is too small. The width cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'A(z) "{file}" kép túl kicsi. A szélessége nem lehet kisebb {limit, number} pixelnél.', - 'The requested view "{name}" was not found.' => 'A kért "{name}" nézet nem található.', - 'The verification code is incorrect.' => 'A megerősítő kód helytelen.', - 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Összesen {count, number} elem.', - 'Unable to verify your data submission.' => 'Nem sikerült ellenőrizni az adatokat.', - 'Unknown command "{command}".' => 'Ismeretlen parancs: "{command}".', - 'Unknown option: --{name}' => 'Ismeretlen kapcsoló: --{name}', - 'Update' => 'Szerkesztés', - 'View' => 'Megtekintés', - 'just now' => 'éppen most', - 'Yes' => 'Igen', - 'You are not allowed to perform this action.' => 'Nincs jogosultsága a művelet végrehajtásához.', - 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Legfeljebb {limit, number} fájlt tölthet fel.', - 'in {delta, plural, =1{a day} other{# days}}' => '{delta} napon belül', - 'in {delta, plural, =1{a minute} other{# minutes}}' => '{delta} percen belül', - 'in {delta, plural, =1{a month} other{# months}}' => '{delta} hónapon belül', - 'in {delta, plural, =1{a second} other{# seconds}}' => '{delta} másodpercen belül', - 'in {delta, plural, =1{a year} other{# years}}' => '{delta} éven belül', - 'in {delta, plural, =1{an hour} other{# hours}}' => '{delta} órán belül', - 'the input value' => 'a beviteli érték', - '{attribute} "{value}" has already been taken.' => '{attribute} "{value}" már használatban van.', - '{attribute} cannot be blank.' => '{attribute} nem lehet üres.', - '{attribute} is invalid.' => '{attribute} érvénytelen.', - '{attribute} is not a valid URL.' => '{attribute} nem valódi URL.', - '{attribute} is not a valid email address.' => '{attribute} nem valódi e-mail cím.', - '{attribute} must be "{requiredValue}".' => '{attribute} értéke "{requiredValue}" kell, hogy legyen.', - '{attribute} must be a number.' => '{attribute} csak szám lehet.', - '{attribute} must be a string.' => '{attribute} csak szöveg lehet.', - '{attribute} must be an integer.' => '{attribute} csak egész szám lehet.', - '{attribute} must be either "{true}" or "{false}".' => '{attribute} csak "{true}" vagy "{false}" lehet.', - '{attribute} must be greater than "{compareValue}".' => '{attribute} nagyobbnak kell lennie, mint "{compareValue}".', - '{attribute} must be greater than or equal to "{compareValue}".' => '{attribute} nagyobb vagy egyenlő kell legyen, mint "{compareValue}".', - '{attribute} must be less than "{compareValue}".' => '{attribute} kisebbnek kell lennie, mint "{compareValue}".', - '{attribute} must be less than or equal to "{compareValue}".' => '{attribute} kisebb vagy egyenlő kell legyen, mint "{compareValue}".', - '{attribute} must be no greater than {max}.' => '{attribute} nem lehet nagyobb, mint {max}.', - '{attribute} must be no less than {min}.' => '{attribute} nem lehet kisebb, mint {min}.', - '{attribute} must be repeated exactly.' => 'Ismételje meg pontosan a(z) {attribute} mezőbe írtakat.', - '{attribute} must not be equal to "{compareValue}".' => '{attribute} nem lehet egyenlő ezzel: "{compareValue}".', - '{attribute} must be equal to "{compareValueOrAttribute}".' => '"{attribute}" mezőnek azonosnak kell lennie a "{compareValueOrAttribute}" mezőbe írtakkal.', - '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} minimum {min, number} karakter kell, hogy legyen.', - '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} maximum {max, number} karakter lehet.', - '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} pontosan {length, number} kell, hogy legyen.', - '{delta, plural, =1{a day} other{# days}} ago' => '{delta} nappal ezelőtt', - '{delta, plural, =1{a minute} other{# minutes}} ago' => '{delta} perccel ezelőtt', - '{delta, plural, =1{a month} other{# months}} ago' => '{delta} hónappal ezelőtt', - '{delta, plural, =1{a second} other{# seconds}} ago' => '{delta} másodperccel ezelőtt', - '{delta, plural, =1{a year} other{# years}} ago' => '{delta} évvel ezelőtt', - '{delta, plural, =1{an hour} other{# hours}} ago' => '{delta} órával ezelőtt', - '{n, plural, =1{# byte} other{# bytes}}' => '{n} bájt', - '{n, plural, =1{# gigabyte} other{# gigabytes}}' => '{n} gigabájt', - '{n, plural, =1{# kilobyte} other{# kilobytes}}' => '{n} kilobájt', - '{n, plural, =1{# megabyte} other{# megabytes}}' => '{n} megabájt', - '{n, plural, =1{# petabyte} other{# petabytes}}' => '{n} petabájt', - '{n, plural, =1{# terabyte} other{# terabytes}}' => '{n} terabájt', - '{n} B' => '{n} B', - '{n} GB' => '{n} GB', - '{n} KB' => '{n} KB', - '{n} MB' => '{n} MB', - '{n} PB' => '{n} PB', - '{n} TB' => '{n} TB', + ' and ' => '', + '"{attribute}" does not support operator "{operator}".' => '', + '(not set)' => '(nincs beállítva)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', + 'An internal server error occurred.' => 'Egy belső szerver hiba történt.', + 'Are you sure you want to delete this item?' => 'Biztos benne, hogy törli ezt az elemet?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', + 'Delete' => 'Törlés', + 'Error' => 'Hiba', + 'File upload failed.' => 'A fájlfeltöltés nem sikerült.', + 'Home' => 'Főoldal', + 'Invalid data received for parameter "{param}".' => 'Érvénytelen paraméter: {param}.', + 'Login Required' => 'Bejelentkezés szükséges', + 'Missing required arguments: {params}' => 'Hiányzó argumentumok: {params}', + 'Missing required parameters: {params}' => 'Hiányzó paraméterek: {params}', + 'No' => 'Nem', + 'No results found.' => 'Nincs találat.', + 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Csak a következő MIME típusú fájlok engedélyezettek: {mimeTypes}.', + 'Only files with these extensions are allowed: {extensions}.' => 'Csak a következő kiterjesztésű fájlok engedélyezettek: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', + 'Page not found.' => 'Az oldal nem található.', + 'Please fix the following errors:' => 'Kérjük javítsa a következő hibákat:', + 'Please upload a file.' => 'Kérjük töltsön fel egy fájlt.', + 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => '{begin, number}-{end, number} megjelenítése a(z) {totalCount, number} elemből.', + 'The combination {values} of {attributes} has already been taken.' => '', + 'The file "{file}" is not an image.' => '"{file}" nem egy kép.', + 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => '"{file}" túl nagy. A mérete nem lehet nagyobb {formattedLimit}.', + 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => '"{file}" túl kicsi. A mérete nem lehet kisebb {formattedLimit}.', + 'The format of {attribute} is invalid.' => 'A(z) {attribute} formátuma érvénytelen.', + 'The format of {filter} is invalid.' => '', + 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'A(z) "{file}" kép túl nagy. A magassága nem lehet nagyobb {limit, number} pixelnél.', + 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'A(z) "{file}" kép túl nagy. A szélessége nem lehet nagyobb {limit, number} pixelnél.', + 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'A(z) "{file}" kép túl kicsi. A magassága nem lehet kisebb {limit, number} pixelnél.', + 'The image "{file}" is too small. The width cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'A(z) "{file}" kép túl kicsi. A szélessége nem lehet kisebb {limit, number} pixelnél.', + 'The requested view "{name}" was not found.' => 'A kért "{name}" nézet nem található.', + 'The verification code is incorrect.' => 'A megerősítő kód helytelen.', + 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Összesen {count, number} elem.', + 'Unable to verify your data submission.' => 'Nem sikerült ellenőrizni az adatokat.', + 'Unknown alias: -{name}' => '', + 'Unknown filter attribute "{attribute}"' => '', + 'Unknown option: --{name}' => 'Ismeretlen kapcsoló: --{name}', + 'Update' => 'Szerkesztés', + 'View' => 'Megtekintés', + 'Yes' => 'Igen', + 'You are not allowed to perform this action.' => 'Nincs jogosultsága a művelet végrehajtásához.', + 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Legfeljebb {limit, number} fájlt tölthet fel.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', + 'in {delta, plural, =1{a day} other{# days}}' => '{delta} napon belül', + 'in {delta, plural, =1{a minute} other{# minutes}}' => '{delta} percen belül', + 'in {delta, plural, =1{a month} other{# months}}' => '{delta} hónapon belül', + 'in {delta, plural, =1{a second} other{# seconds}}' => '{delta} másodpercen belül', + 'in {delta, plural, =1{a year} other{# years}}' => '{delta} éven belül', + 'in {delta, plural, =1{an hour} other{# hours}}' => '{delta} órán belül', + 'just now' => 'éppen most', + 'the input value' => 'a beviteli érték', + '{attribute} "{value}" has already been taken.' => '{attribute} "{value}" már használatban van.', + '{attribute} cannot be blank.' => '{attribute} nem lehet üres.', + '{attribute} contains wrong subnet mask.' => '', + '{attribute} is invalid.' => '{attribute} érvénytelen.', + '{attribute} is not a valid URL.' => '{attribute} nem valódi URL.', + '{attribute} is not a valid email address.' => '{attribute} nem valódi e-mail cím.', + '{attribute} is not in the allowed range.' => '', + '{attribute} must be "{requiredValue}".' => '{attribute} értéke "{requiredValue}" kell, hogy legyen.', + '{attribute} must be a number.' => '{attribute} csak szám lehet.', + '{attribute} must be a string.' => '{attribute} csak szöveg lehet.', + '{attribute} must be a valid IP address.' => '', + '{attribute} must be an IP address with specified subnet.' => '', + '{attribute} must be an integer.' => '{attribute} csak egész szám lehet.', + '{attribute} must be either "{true}" or "{false}".' => '{attribute} csak "{true}" vagy "{false}" lehet.', + '{attribute} must be equal to "{compareValueOrAttribute}".' => '"{attribute}" mezőnek azonosnak kell lennie a "{compareValueOrAttribute}" mezőbe írtakkal.', + '{attribute} must be greater than "{compareValueOrAttribute}".' => '{attribute} nagyobbnak kell lennie, mint "{compareValueOrAttribute}".', + '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '{attribute} nagyobb vagy egyenlő kell legyen, mint "{compareValueOrAttribute}".', + '{attribute} must be less than "{compareValueOrAttribute}".' => '{attribute} kisebbnek kell lennie, mint "{compareValueOrAttribute}".', + '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '{attribute} kisebb vagy egyenlő kell legyen, mint "{compareValueOrAttribute}".', + '{attribute} must be no greater than {max}.' => '{attribute} nem lehet nagyobb, mint {max}.', + '{attribute} must be no less than {min}.' => '{attribute} nem lehet kisebb, mint {min}.', + '{attribute} must not be a subnet.' => '', + '{attribute} must not be an IPv4 address.' => '', + '{attribute} must not be an IPv6 address.' => '', + '{attribute} must not be equal to "{compareValueOrAttribute}".' => '{attribute} nem lehet egyenlő ezzel: "{compareValueOrAttribute}".', + '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} minimum {min, number} karakter kell, hogy legyen.', + '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} maximum {max, number} karakter lehet.', + '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} pontosan {length, number} kell, hogy legyen.', + '{compareAttribute} is invalid.' => '', + '{delta, plural, =1{1 day} other{# days}}' => '', + '{delta, plural, =1{1 hour} other{# hours}}' => '', + '{delta, plural, =1{1 minute} other{# minutes}}' => '', + '{delta, plural, =1{1 month} other{# months}}' => '', + '{delta, plural, =1{1 second} other{# seconds}}' => '', + '{delta, plural, =1{1 year} other{# years}}' => '', + '{delta, plural, =1{a day} other{# days}} ago' => '{delta} nappal ezelőtt', + '{delta, plural, =1{a minute} other{# minutes}} ago' => '{delta} perccel ezelőtt', + '{delta, plural, =1{a month} other{# months}} ago' => '{delta} hónappal ezelőtt', + '{delta, plural, =1{a second} other{# seconds}} ago' => '{delta} másodperccel ezelőtt', + '{delta, plural, =1{a year} other{# years}} ago' => '{delta} évvel ezelőtt', + '{delta, plural, =1{an hour} other{# hours}} ago' => '{delta} órával ezelőtt', + '{nFormatted} B' => '{nFormatted} B', + '{nFormatted} GB' => '{nFormatted} GB', + '{nFormatted} GiB' => '', + '{nFormatted} KiB' => '', + '{nFormatted} MB' => '{nFormatted} MB', + '{nFormatted} MiB' => '', + '{nFormatted} PB' => '{nFormatted} PB', + '{nFormatted} PiB' => '', + '{nFormatted} TB' => '{nFormatted} TB', + '{nFormatted} TiB' => '', + '{nFormatted} kB' => '{nFormatted} kB', + '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} bájt', + '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '', + '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} gigabájt', + '{nFormatted} {n, plural, =1{kibibyte} other{kibibytes}}' => '', + '{nFormatted} {n, plural, =1{kilobyte} other{kilobytes}}' => '{nFormatted} kilobájt', + '{nFormatted} {n, plural, =1{mebibyte} other{mebibytes}}' => '', + '{nFormatted} {n, plural, =1{megabyte} other{megabytes}}' => '{nFormatted} megabájt', + '{nFormatted} {n, plural, =1{pebibyte} other{pebibytes}}' => '', + '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '{nFormatted} petabájt', + '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '', + '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '{nFormatted} terabájt', ]; diff --git a/framework/messages/hy/yii.php b/framework/messages/hy/yii.php index 8e2cb584548..b62094573e1 100644 --- a/framework/messages/hy/yii.php +++ b/framework/messages/hy/yii.php @@ -6,8 +6,7 @@ */ /** - * Message translations for Armenian (հայերեն) language. - * @author Gevorg Mansuryan + * Message translations. * * This file is automatically generated by 'yii message/extract' command. * It contains the localizable messages extracted from source code. @@ -25,9 +24,13 @@ */ return [ ' and ' => ' և ', + '"{attribute}" does not support operator "{operator}".' => '«{attribute}»-ը չի սպասարկում «{operator}» օպերատորը։', '(not set)' => '(չի նշված)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Սերվերի ներքին սխալ է տեղի ունեցել։', 'Are you sure you want to delete this item?' => 'Վստա՞հ եք, որ ցանկանում եք ջնջել այս տարրը:', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '«{attribute}»-ի համար պետք է լինի արժեք կամ գործող օպերատորի հստակեցում:', 'Delete' => 'Ջնջել', 'Error' => 'Սխալ', 'File upload failed.' => 'Ֆայլի վերբեռնումը ձախողվեց։', @@ -40,16 +43,19 @@ 'No results found.' => 'Ոչ մի արդյունք չի գտնվել։', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Թույլատրվում են միայն {mimeTypes} MIME տեսակի ֆայլերը։', 'Only files with these extensions are allowed: {extensions}.' => 'Թույլատրվում են միայն {extensions} վերջավորությամբ ֆայլերը։', + 'Operator "{operator}" must be used with a search attribute.' => '«{operator}» օպերատորը պետք է օգտագործվի որոնման ատրիբուտի հետ միասին:', + 'Operator "{operator}" requires multiple operands.' => '«{operator}» օպերատորը պահանջում բազմակի օպերանդներ։', + 'Options available: {options}' => '', 'Page not found.' => 'Էջը չի գտնվել։', 'Please fix the following errors:' => 'Խնդրում ենք ուղղել հետևյալ սխալները՝', 'Please upload a file.' => 'Խնդրում ենք վերբեռնել ֆայլ:', - 'Powered by {yii}' => 'Աշխատում է {yii}ով։', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Ցուցադրված են {begin, number}-ից {end, number}-ը ընդհանուր {totalCount, number}-ից։', 'The combination {values} of {attributes} has already been taken.' => '{attributes}-ի {values} արժեքների կոմբինացիան արդեն զբաղված է։', 'The file "{file}" is not an image.' => '«{file}» ֆայլը վավեր նկար չէ։', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => '«{file}» ֆայլը շատ մեծ է։ Նրա չափը չի կարող գերազանցել {formattedLimit}-ը։', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => '«{file}» ֆայլը շատ փոքր է։ Նրա չափը չի կարող լինել {formattedLimit}-ից փոքր։', 'The format of {attribute} is invalid.' => '{attribute}-ի ֆորմատը անվավեր է։', + 'The format of {filter} is invalid.' => '{filter}-ի ֆորմատը անվավեր է։', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '«{file}» նկարը շատ մեծ է։ Նրա բարձրությունը չի կարող գերազանցել {limit, number} {limit, plural, one{պիքսել} few{պիքսել} many{պիքսել} other{պիքսել}}ը։', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '«{file}» նկարը շատ մեծ է։ Նրա երկարությունը չի կարող գերազանցել {limit, number} {limit, plural, one{պիքսել} few{պիքսել} many{պիքսել} other{պիքսել}}ը։', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '«{file}» նկարը շատ փոքր է։ Նրա բարձրությունը չի կարող լինել {limit, number} {limit, plural, one{պիքսել} few{պիքսել} many{պիքսել} other{պիքսել}}ից փոքր։', @@ -59,13 +65,14 @@ 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Ընդհանուր {count, number} {count, plural, one{տարր} other{տարր}}։', 'Unable to verify your data submission.' => 'Հնարավոր չէ ստուգել ձեր տվյալների ներկայացումը:', 'Unknown alias: -{name}' => 'Անհայտ այլանուն՝ «{name}»։', + 'Unknown filter attribute "{attribute}"' => 'Անհայտ ֆիլտրի ատրիբուտ՝ «{attribute}»։', 'Unknown option: --{name}' => 'Անհայտ տարբերակ՝ «{name}»։', 'Update' => 'Թարմացնել', 'View' => 'Դիտել', 'Yes' => 'Այո', - 'Yii Framework' => 'Yii Framework', 'You are not allowed to perform this action.' => 'Ձեզ չի թույլատրվում կատարել այս գործողությունը:', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Դուք կարող եք վերբեռնել առավելագույնը {limit, number} {limit, plural, one{ֆայլ} few{ֆայլ} many{ֆայլ} other{ֆայլ}}։', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', 'in {delta, plural, =1{a day} other{# days}}' => '{delta, plural, =1{օր} one{# օր} few{# օր} many{# օր} other{# օր}}ից', 'in {delta, plural, =1{a minute} other{# minutes}}' => '{delta, plural, =1{րոպե} one{# րոպե} few{# րոպե} many{# րոպե} other{# րոպե}}ից', 'in {delta, plural, =1{a month} other{# months}}' => '{delta, plural, =1{ամս} one{# ամս} few{# ամս} many{# ամս} other{# ամս}}ից', @@ -102,6 +109,7 @@ '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute}-ի արժեքը պետք է պարունակի առնվազն {min, number} {min, plural, one{նիշ} other{նիշ}}։', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute}-ի արժեքը պետք է պարունակի առավելագույնը {max, number} {max, plural, one{նիշ} other{նիշ}}։', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute}-ի արժեքը պետք է պարունակի {length, number} {length, plural, one{նիշ} other{նիշ}}։', + '{compareAttribute} is invalid.' => '', '{delta, plural, =1{1 day} other{# days}}' => '{delta, plural, =1{1 օր} other{# օր}}', '{delta, plural, =1{1 hour} other{# hours}}' => '{delta, plural, =1{1 ժամ} other{# ժամ}}', '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta, plural, =1{1 րոպե} other{# րոպե}}', @@ -117,7 +125,6 @@ '{nFormatted} B' => '{nFormatted} Բ', '{nFormatted} GB' => '{nFormatted} ԳԲ', '{nFormatted} GiB' => '{nFormatted} ԳիԲ', - '{nFormatted} kB' => '{nFormatted} ԿԲ', '{nFormatted} KiB' => '{nFormatted} ԿիԲ', '{nFormatted} MB' => '{nFormatted} ՄԲ', '{nFormatted} MiB' => '{nFormatted} ՄիԲ', @@ -125,6 +132,7 @@ '{nFormatted} PiB' => '{nFormatted} ՊիԲ', '{nFormatted} TB' => '{nFormatted} ՏԲ', '{nFormatted} TiB' => '{nFormatted} ՏիԲ', + '{nFormatted} kB' => '{nFormatted} ԿԲ', '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, =1{բայթ} other{բայթ}}', '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} {n, plural, =1{գիգաբիթ} other{գիգաբիթ}}', '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, =1{գիգաբայթ} other{գիգաբայթ}}', @@ -136,10 +144,4 @@ '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '{nFormatted} {n, plural, =1{պետաբայթ} other{պետաբայթ}}', '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '{nFormatted} {n, plural, =1{տեբիբայթ} other{տեբիբայթ}}', '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '{nFormatted} {n, plural, =1{տերաբայթ} other{տերաբայթ}}', - '"{attribute}" does not support operator "{operator}".' => '«{attribute}»-ը չի սպասարկում «{operator}» օպերատորը։', - 'Condition for "{attribute}" should be either a value or valid operator specification.' => '«{attribute}»-ի համար պետք է լինի արժեք կամ գործող օպերատորի հստակեցում:', - 'Operator "{operator}" must be used with a search attribute.' => '«{operator}» օպերատորը պետք է օգտագործվի որոնման ատրիբուտի հետ միասին:', - 'Operator "{operator}" requires multiple operands.' => '«{operator}» օպերատորը պահանջում բազմակի օպերանդներ։', - 'The format of {filter} is invalid.' => '{filter}-ի ֆորմատը անվավեր է։', - 'Unknown filter attribute "{attribute}"' => 'Անհայտ ֆիլտրի ատրիբուտ՝ «{attribute}»։', ]; diff --git a/framework/messages/id/yii.php b/framework/messages/id/yii.php index b8a08f73f52..785f29f43b2 100644 --- a/framework/messages/id/yii.php +++ b/framework/messages/id/yii.php @@ -23,11 +23,14 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ - 'The requested view "{name}" was not found.' => 'View "{name}" yang diminta tidak ditemukan.', - 'You are requesting with an invalid access token.' => 'Anda melakukan permintaan dengan akses token yang tidak valid.', + ' and ' => '', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(belum diset)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Terjadi kesalahan internal server.', 'Are you sure you want to delete this item?' => 'Apakah Anda yakin ingin menghapus item ini?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => 'Hapus', 'Error' => 'Kesalahan', 'File upload failed.' => 'Mengunggah berkas gagal.', @@ -37,11 +40,12 @@ 'Missing required arguments: {params}' => 'Argumen yang diperlukan tidak ada: {params}', 'Missing required parameters: {params}' => 'Parameter yang diperlukan tidak ada: {params}', 'No' => 'Tidak', - 'No help for unknown command "{command}".' => 'Tidak ada bantuan untuk perintah yang tidak diketahui "{command}".', - 'No help for unknown sub-command "{command}".' => 'Tidak ada bantuan untuk sub perintah yang tidak diketahui "{command}".', 'No results found.' => 'Tidak ada data yang ditemukan.', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Hanya berkas dengan tipe MIME ini yang diperbolehkan: {mimeTypes}.', 'Only files with these extensions are allowed: {extensions}.' => 'Hanya berkas dengan ekstensi ini yang diperbolehkan: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => 'Halaman tidak ditemukan.', 'Please fix the following errors:' => 'Silahkan perbaiki kesalahan berikut:', 'Please upload a file.' => 'Silahkan mengunggah berkas.', @@ -51,64 +55,93 @@ 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'Berkas "{file}" terlalu besar. Ukurannya tidak boleh lebih besar dari {formattedLimit}.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'Berkas "{file}" terlalu kecil. Ukurannya tidak boleh lebih kecil dari {formattedLimit}.', 'The format of {attribute} is invalid.' => 'Format dari {attribute} tidak valid.', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Gambar "{file}" terlalu besar. Tingginya tidak boleh lebih besar dari {limit, number} {limit, plural, one{piksel} other{piksel}}.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Gambar "{file}" terlalu besar. Lebarnya tidak boleh lebih besar dari {limit, number} {limit, plural, one{piksel} other{piksel}}.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Gambar "{file}" terlalu kecil. Tingginya tidak boleh lebih kecil dari {limit, number} {limit, plural, one{piksel} other{piksel}}.', 'The image "{file}" is too small. The width cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Gambar "{file}" terlalu kecil. Lebarnya tidak boleh lebih kecil dari {limit, number} {limit, plural, one{piksel} other{piksel}}.', + 'The requested view "{name}" was not found.' => 'View "{name}" yang diminta tidak ditemukan.', 'The verification code is incorrect.' => 'Kode verifikasi tidak benar.', 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Total {count, number} {count, plural, one{item} other{item}}.', 'Unable to verify your data submission.' => 'Tidak dapat mem-verifikasi pengiriman data Anda.', - 'Unknown command "{command}".' => 'Perintah tidak dikenal "{command}".', + 'Unknown alias: -{name}' => '', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'Opsi tidak dikenal: --{name}', 'Update' => 'Ubah', 'View' => 'Lihat', 'Yes' => 'Ya', 'You are not allowed to perform this action.' => 'Anda tidak diperbolehkan untuk melakukan aksi ini.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Anda dapat mengunggah paling banyak {limit, number} {limit, plural, one{file} other{file}}.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', 'in {delta, plural, =1{a day} other{# days}}' => 'dalam {delta, plural, =1{satu hari} other{# hari}}', 'in {delta, plural, =1{a minute} other{# minutes}}' => 'dalam {delta, plural, =1{satu menit} other{# menit}}', 'in {delta, plural, =1{a month} other{# months}}' => 'dalam {delta, plural, =1{satu bulan} other{# bulan}}', 'in {delta, plural, =1{a second} other{# seconds}}' => 'dalam {delta, plural, =1{satu detik} other{# detik}}', 'in {delta, plural, =1{a year} other{# years}}' => 'dalam {delta, plural, =1{satu tahun} other{# tahun}}', 'in {delta, plural, =1{an hour} other{# hours}}' => 'dalam {delta, plural, =1{satu jam} other{# jam}}', + 'just now' => '', 'the input value' => 'nilai input', '{attribute} "{value}" has already been taken.' => '{attribute} "{value}" telah dipergunakan.', '{attribute} cannot be blank.' => '{attribute} tidak boleh kosong.', + '{attribute} contains wrong subnet mask.' => '', '{attribute} is invalid.' => '{attribute} tidak valid.', '{attribute} is not a valid URL.' => '{attribute} bukan URL yang valid.', '{attribute} is not a valid email address.' => '{attribute} bukan alamat email yang valid.', + '{attribute} is not in the allowed range.' => '', '{attribute} must be "{requiredValue}".' => '{attribute} harus berupa "{requiredValue}".', '{attribute} must be a number.' => '{attribute} harus berupa angka.', '{attribute} must be a string.' => '{attribute} harus berupa string.', + '{attribute} must be a valid IP address.' => '', + '{attribute} must be an IP address with specified subnet.' => '', '{attribute} must be an integer.' => '{attribute} harus berupa integer.', '{attribute} must be either "{true}" or "{false}".' => '{attribute} harus berupa "{true}" atau "{false}".', - '{attribute} must be greater than "{compareValue}".' => '{attribute} harus lebih besar dari "{compareValue}".', - '{attribute} must be greater than or equal to "{compareValue}".' => '{attribute} harus lebih besar dari atau sama dengan "{compareValue}".', - '{attribute} must be less than "{compareValue}".' => '{attribute} harus lebih kecil dari "{compareValue}".', - '{attribute} must be less than or equal to "{compareValue}".' => '{attribute} harus lebih kecil dari atau sama dengan "{compareValue}".', + '{attribute} must be equal to "{compareValueOrAttribute}".' => '', + '{attribute} must be greater than "{compareValueOrAttribute}".' => '{attribute} harus lebih besar dari "{compareValueOrAttribute}".', + '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '{attribute} harus lebih besar dari atau sama dengan "{compareValueOrAttribute}".', + '{attribute} must be less than "{compareValueOrAttribute}".' => '{attribute} harus lebih kecil dari "{compareValueOrAttribute}".', + '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '{attribute} harus lebih kecil dari atau sama dengan "{compareValueOrAttribute}".', '{attribute} must be no greater than {max}.' => '{attribute} harus tidak boleh lebih besar dari {max}.', '{attribute} must be no less than {min}.' => '{attribute} harus tidak boleh lebih kecil dari {min}.', - '{attribute} must be repeated exactly.' => '{attribute} harus diulang sama persis.', - '{attribute} must not be equal to "{compareValue}".' => '{attribute} harus tidak boleh sama dengan "{compareValue}".', + '{attribute} must not be a subnet.' => '', + '{attribute} must not be an IPv4 address.' => '', + '{attribute} must not be an IPv6 address.' => '', + '{attribute} must not be equal to "{compareValueOrAttribute}".' => '{attribute} harus tidak boleh sama dengan "{compareValueOrAttribute}".', '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} harus memiliki paling sedikit {min, number} {min, plural, one{karakter} other{karakter}}.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} harus memiliki paling banyak {max, number} {max, plural, one{karakter} other{karakter}}.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} harus memiliki {length, number} {length, plural, one{karakter} other{karakter}}.', + '{compareAttribute} is invalid.' => '', + '{delta, plural, =1{1 day} other{# days}}' => '', + '{delta, plural, =1{1 hour} other{# hours}}' => '', + '{delta, plural, =1{1 minute} other{# minutes}}' => '', + '{delta, plural, =1{1 month} other{# months}}' => '', + '{delta, plural, =1{1 second} other{# seconds}}' => '', + '{delta, plural, =1{1 year} other{# years}}' => '', '{delta, plural, =1{a day} other{# days}} ago' => '{delta, plural, =1{satu hari} other{# hari}} yang lalu', '{delta, plural, =1{a minute} other{# minutes}} ago' => '{delta, plural, =1{satu menit} other{# menit}} yang lalu', '{delta, plural, =1{a month} other{# months}} ago' => '{delta, plural, =1{satu bulan} other{# bulan}} yang lalu', '{delta, plural, =1{a second} other{# seconds}} ago' => '{delta, plural, =1{satu detik} other{# detik}} yang lalu', '{delta, plural, =1{a year} other{# years}} ago' => '{delta, plural, =1{satu tahun} other{# tahun}} yang lalu', '{delta, plural, =1{an hour} other{# hours}} ago' => '{delta, plural, =1{satu jam} other{# jam}} yang lalu', - '{n, plural, =1{# byte} other{# bytes}}' => '{n, plural, =1{# bita} other{# bita}}', - '{n, plural, =1{# gigabyte} other{# gigabytes}}' => '{n, plural, =1{# gigabita} other{# gigabita}}', - '{n, plural, =1{# kilobyte} other{# kilobytes}}' => '{n, plural, =1{# kilobita} other{# kilobita}}', - '{n, plural, =1{# megabyte} other{# megabytes}}' => '{n, plural, =1{# megabita} other{# megabita}}', - '{n, plural, =1{# petabyte} other{# petabytes}}' => '{n, plural, =1{# petabita} other{# petabita}}', - '{n, plural, =1{# terabyte} other{# terabytes}}' => '{n, plural, =1{# petabita} other{# petabita}}', - '{n} B' => '{n} B', - '{n} GB' => '{n} GB', - '{n} KB' => '{n} KB', - '{n} MB' => '{n} MB', - '{n} PB' => '{n} PB', - '{n} TB' => '{n} TB', + '{nFormatted} B' => '{nFormatted} B', + '{nFormatted} GB' => '{nFormatted} GB', + '{nFormatted} GiB' => '', + '{nFormatted} KiB' => '', + '{nFormatted} MB' => '{nFormatted} MB', + '{nFormatted} MiB' => '', + '{nFormatted} PB' => '{nFormatted} PB', + '{nFormatted} PiB' => '', + '{nFormatted} TB' => '{nFormatted} TB', + '{nFormatted} TiB' => '', + '{nFormatted} kB' => '{nFormatted} kB', + '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, =1{bita} other{bita}}', + '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '', + '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, =1{gigabita} other{gigabita}}', + '{nFormatted} {n, plural, =1{kibibyte} other{kibibytes}}' => '', + '{nFormatted} {n, plural, =1{kilobyte} other{kilobytes}}' => '{nFormatted} {n, plural, =1{kilobita} other{kilobita}}', + '{nFormatted} {n, plural, =1{mebibyte} other{mebibytes}}' => '', + '{nFormatted} {n, plural, =1{megabyte} other{megabytes}}' => '{nFormatted} {n, plural, =1{megabita} other{megabita}}', + '{nFormatted} {n, plural, =1{pebibyte} other{pebibytes}}' => '', + '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '{nFormatted} {n, plural, =1{petabita} other{petabita}}', + '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '', + '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '{nFormatted} {n, plural, =1{petabita} other{petabita}}', ]; diff --git a/framework/messages/it/yii.php b/framework/messages/it/yii.php index c16a9c18912..e2d7eff4165 100644 --- a/framework/messages/it/yii.php +++ b/framework/messages/it/yii.php @@ -23,35 +23,14 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ - 'Unknown alias: -{name}' => 'Alias sconosciuto: -{name}', - '{attribute} contains wrong subnet mask.' => '{attribute} contiene una subnet mask errata.', - '{attribute} is not in the allowed range.' => '{attribute} non rientra nell\'intervallo permesso', - '{attribute} must be a valid IP address.' => '{attribute} deve essere un indirizzo IP valido.', - '{attribute} must be an IP address with specified subnet.' => '{attribute} deve essere un indirizzo IP valido con subnet specificata.', - '{attribute} must be equal to "{compareValueOrAttribute}".' => '{attribute} deve essere uguale a "{compareValueOrAttribute}".', - '{attribute} must be greater than "{compareValueOrAttribute}".' => '{attribute} deve essere maggiore di "{compareValueOrAttribute}".', - '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '{attribute} deve essere maggiore o uguale a "{compareValueOrAttribute}".', - '{attribute} must be less than "{compareValueOrAttribute}".' => '{attribute} deve essere minore di "{compareValueOrAttribute}".', - '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '{attribute} deve essere minore o uguale a "{compareValueOrAttribute}".', - '{attribute} must not be a subnet.' => '{attribute} non deve essere una subnet.', - '{attribute} must not be an IPv4 address.' => '{attribute} non deve essere un indirizzo IPv4.', - '{attribute} must not be an IPv6 address.' => '{attribute} non deve essere un indirizzo IPv6.', - '{attribute} must not be equal to "{compareValueOrAttribute}".' => '{attribute} non deve essere uguale a "{compareValueOrAttribute}".', - '{delta, plural, =1{1 day} other{# days}}' => '{delta, plural, =1{1 giorno} other{# giorni}}', - '{delta, plural, =1{1 hour} other{# hours}}' => '{delta, plural, =1{1 ora} other{# ore}}', - '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta, plural, =1{1 minuto} other{# minuti}}', - '{delta, plural, =1{1 month} other{# months}}' => '{delta, plural, =1{1 mese} other{# mesi}}', - '{delta, plural, =1{1 second} other{# seconds}}' => '{delta, plural, =1{1 secondo} other{# secondi}}', - '{delta, plural, =1{1 year} other{# years}}' => '{delta, plural, =1{1 anno} other{# anni}}', - '{attribute} must be greater than "{compareValue}".' => '@@{attribute} deve essere maggiore di "{compareValue}".@@', - '{attribute} must be greater than or equal to "{compareValue}".' => '@@{attribute} deve essere maggiore o uguale a "{compareValue}".@@', - '{attribute} must be less than "{compareValue}".' => '@@{attribute} deve essere minore di "{compareValue}".@@', - '{attribute} must be less than or equal to "{compareValue}".' => '@@{attribute} deve essere minore o uguale a "{compareValue}".@@', - '{attribute} must be repeated exactly.' => '@@{attribute} deve essere ripetuto esattamente.@@', - '{attribute} must not be equal to "{compareValue}".' => '@@{attribute} non deve essere uguale a "{compareValue}".@@', + ' and ' => '', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(nessun valore)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Si è verificato un errore interno', 'Are you sure you want to delete this item?' => 'Sei sicuro di voler eliminare questo elemento?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => 'Elimina', 'Error' => 'Errore', 'File upload failed.' => 'Upload file fallito.', @@ -64,14 +43,19 @@ 'No results found.' => 'Nessun risultato trovato', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Solo i file con questi tipi MIME sono consentiti: {mimeTypes}.', 'Only files with these extensions are allowed: {extensions}.' => 'Solo i file con queste estensioni sono permessi: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => 'Pagina non trovata.', 'Please fix the following errors:' => 'Per favore correggi i seguenti errori:', 'Please upload a file.' => 'Per favore carica un file.', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Visualizzo {begin, number}-{end, number} di {totalCount, number} {totalCount, plural, one{elemento} other{elementi}}.', + 'The combination {values} of {attributes} has already been taken.' => '', 'The file "{file}" is not an image.' => 'Il file "{file}" non è una immagine.', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'Il file "{file}" è troppo grande. La dimensione non può superare i {formattedLimit}.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'Il file "{file}" è troppo piccolo. La dimensione non può essere inferiore a {formattedLimit}.', 'The format of {attribute} is invalid.' => 'Il formato di {attribute} non è valido.', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'L\'immagine "{file}" è troppo grande. La sua altezza non può essere maggiore di {limit, number} {limit, plural, one{pixel} other{pixel}}.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'L immagine "{file}" è troppo grande. La sua larghezza non può essere maggiore di {limit, number} {limit, plural, one{pixel} other{pixel}}.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'L immagine "{file}" è troppo piccola. La sua altezza non può essere minore di {limit, number} {limit, plural, one{pixel} other{pixel}}.', @@ -80,12 +64,15 @@ 'The verification code is incorrect.' => 'Il codice di verifica non è corretto.', 'Total {count, number} {count, plural, one{item} other{items}}.' => '{count, plural, one{Elementi} other{Elementi}} totali {count, number}.', 'Unable to verify your data submission.' => 'Impossibile verificare i dati inviati.', + 'Unknown alias: -{name}' => 'Alias sconosciuto: -{name}', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'Opzione Sconosciuta: --{name}', 'Update' => 'Aggiorna', 'View' => 'Visualizza', 'Yes' => 'Si', 'You are not allowed to perform this action.' => 'Non sei autorizzato ad eseguire questa operazione.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Puoi caricare al massimo {limit, number} {limit, plural, one{file} other{file}}.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', 'in {delta, plural, =1{a day} other{# days}}' => 'in {delta, plural, =1{un giorno} other{# giorni}}', 'in {delta, plural, =1{a minute} other{# minutes}}' => 'in {delta, plural, =1{un minuto} other{# minuti}}', 'in {delta, plural, =1{a month} other{# months}}' => 'in {delta, plural, =1{un mese} other{# mesi}}', @@ -96,19 +83,39 @@ 'the input value' => 'il valore del campo', '{attribute} "{value}" has already been taken.' => '{attribute} "{value}" è già presente.', '{attribute} cannot be blank.' => '{attribute} non può essere vuoto.', + '{attribute} contains wrong subnet mask.' => '{attribute} contiene una subnet mask errata.', '{attribute} is invalid.' => '{attribute} non è valido.', '{attribute} is not a valid URL.' => '{attribute} non è un URL valido.', '{attribute} is not a valid email address.' => '{attribute} non è un indirizzo email valido.', + '{attribute} is not in the allowed range.' => '{attribute} non rientra nell\'intervallo permesso', '{attribute} must be "{requiredValue}".' => '{attribute} deve essere "{requiredValue}".', '{attribute} must be a number.' => '{attribute} deve essere un numero.', '{attribute} must be a string.' => '{attribute} deve essere una stringa.', + '{attribute} must be a valid IP address.' => '{attribute} deve essere un indirizzo IP valido.', + '{attribute} must be an IP address with specified subnet.' => '{attribute} deve essere un indirizzo IP valido con subnet specificata.', '{attribute} must be an integer.' => '{attribute} deve essere un numero intero.', '{attribute} must be either "{true}" or "{false}".' => '{attribute} deve essere "{true}" oppure "{false}".', + '{attribute} must be equal to "{compareValueOrAttribute}".' => '{attribute} deve essere uguale a "{compareValueOrAttribute}".', + '{attribute} must be greater than "{compareValueOrAttribute}".' => '{attribute} deve essere maggiore di "{compareValueOrAttribute}".', + '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '{attribute} deve essere maggiore o uguale a "{compareValueOrAttribute}".', + '{attribute} must be less than "{compareValueOrAttribute}".' => '{attribute} deve essere minore di "{compareValueOrAttribute}".', + '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '{attribute} deve essere minore o uguale a "{compareValueOrAttribute}".', '{attribute} must be no greater than {max}.' => '{attribute} non deve essere maggiore di {max}.', '{attribute} must be no less than {min}.' => '{attribute} non deve essere minore di {min}.', + '{attribute} must not be a subnet.' => '{attribute} non deve essere una subnet.', + '{attribute} must not be an IPv4 address.' => '{attribute} non deve essere un indirizzo IPv4.', + '{attribute} must not be an IPv6 address.' => '{attribute} non deve essere un indirizzo IPv6.', + '{attribute} must not be equal to "{compareValueOrAttribute}".' => '{attribute} non deve essere uguale a "{compareValueOrAttribute}".', '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} dovrebbe contenere almeno {min, number} {min, plural, one{carattere} other{caratteri}}.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} dovrebbe contenere al massimo {max, number} {max, plural, one{carattere} other{caratteri}}.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} dovrebbe contenere {length, number} {length, plural, one{carattere} other{caratteri}}.', + '{compareAttribute} is invalid.' => '', + '{delta, plural, =1{1 day} other{# days}}' => '{delta, plural, =1{1 giorno} other{# giorni}}', + '{delta, plural, =1{1 hour} other{# hours}}' => '{delta, plural, =1{1 ora} other{# ore}}', + '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta, plural, =1{1 minuto} other{# minuti}}', + '{delta, plural, =1{1 month} other{# months}}' => '{delta, plural, =1{1 mese} other{# mesi}}', + '{delta, plural, =1{1 second} other{# seconds}}' => '{delta, plural, =1{1 secondo} other{# secondi}}', + '{delta, plural, =1{1 year} other{# years}}' => '{delta, plural, =1{1 anno} other{# anni}}', '{delta, plural, =1{a day} other{# days}} ago' => '{delta, plural, =1{un giorno} other{# giorni}} fa', '{delta, plural, =1{a minute} other{# minutes}} ago' => '{delta, plural, =1{un minuto} other{# minuti}} fa', '{delta, plural, =1{a month} other{# months}} ago' => '{delta, plural, =1{un mese} other{# mesi}} fa', @@ -118,7 +125,6 @@ '{nFormatted} B' => '{nFormatted} B', '{nFormatted} GB' => '{nFormatted} GB', '{nFormatted} GiB' => '{nFormatted} GiB', - '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} KiB' => '{nFormatted} KiB', '{nFormatted} MB' => '{nFormatted} MB', '{nFormatted} MiB' => '{nFormatted} MiB', @@ -126,6 +132,7 @@ '{nFormatted} PiB' => '{nFormatted} PiB', '{nFormatted} TB' => '{nFormatted} TB', '{nFormatted} TiB' => '{nFormatted} TiB', + '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, =1{byte} other{byte}}', '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} {n, plural, =1{gibibyte} other{gibibyte}}', '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, =1{gigabyte} other{gigabyte}}', diff --git a/framework/messages/ja/yii.php b/framework/messages/ja/yii.php index 42d26beba54..b1b0f43cab8 100644 --- a/framework/messages/ja/yii.php +++ b/framework/messages/ja/yii.php @@ -1,4 +1,10 @@ ' および ', '"{attribute}" does not support operator "{operator}".' => '"{attribute}" は演算子 "{operator}" をサポートしていません。', '(not set)' => '(未設定)', + 'Action not found.' => 'アクションがありません。', + 'Aliases available: {aliases}' => '利用可能なエイリアス: {aliases}', 'An internal server error occurred.' => '内部サーバーエラーが発生しました。', 'Are you sure you want to delete this item?' => 'このアイテムを削除したいというのは本当ですか?', 'Condition for "{attribute}" should be either a value or valid operator specification.' => '"{attribute}" のための条件は値であるか有効な演算子の定義でなければなりません。', @@ -37,6 +45,7 @@ 'Only files with these extensions are allowed: {extensions}.' => '次の拡張子を持つファイルだけが許可されています : {extensions}', 'Operator "{operator}" must be used with a search attribute.' => '演算子 "{operator}" はサーチ属性とともに使用されなければなりません。', 'Operator "{operator}" requires multiple operands.' => '演算子 "{operator}" は複数の被演算子を要求します。', + 'Options available: {options}' => '利用可能なオプション: {options}', 'Page not found.' => 'ページが見つかりません。', 'Please fix the following errors:' => '次のエラーを修正してください :', 'Please upload a file.' => 'ファイルをアップロードしてください。', @@ -100,6 +109,7 @@ '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} は {min} 文字以上でなければいけません。', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} は {max} 文字以下でなければいけません。', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} は {length} 文字でなければいけません。', + '{compareAttribute} is invalid.' => '{compareAttribute} は無効です。', '{delta, plural, =1{1 day} other{# days}}' => '{delta} 日間', '{delta, plural, =1{1 hour} other{# hours}}' => '{delta} 時間', '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta} 分間', @@ -115,7 +125,6 @@ '{nFormatted} B' => '{nFormatted} B', '{nFormatted} GB' => '{nFormatted} GB', '{nFormatted} GiB' => '{nFormatted} GiB', - '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} KiB' => '{nFormatted} KiB', '{nFormatted} MB' => '{nFormatted} MB', '{nFormatted} MiB' => '{nFormatted} MiB', @@ -123,6 +132,7 @@ '{nFormatted} PiB' => '{nFormatted} PiB', '{nFormatted} TB' => '{nFormatted} TB', '{nFormatted} TiB' => '{nFormatted} TiB', + '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} バイト', '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} ギビバイト', '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} ギガバイト', diff --git a/framework/messages/ka/yii.php b/framework/messages/ka/yii.php index 96eaaeb621d..c885e6bd951 100644 --- a/framework/messages/ka/yii.php +++ b/framework/messages/ka/yii.php @@ -23,9 +23,14 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + ' and ' => '', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(არ არის მითითებული)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'წარმოიშვა სერვერის შიდა შეცდომა.', 'Are you sure you want to delete this item?' => 'დარწმუნებული ხართ, რომ გინდათ ამ ელემენტის წაშლა?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => 'წაშლა', 'Error' => 'შეცდომა', 'File upload failed.' => 'ფაილის ჩამოტვირთვა ვერ მოხერხდა.', @@ -38,14 +43,19 @@ 'No results found.' => 'არაფერი მოიძებნა.', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'ნებადართულია ფაილების ჩამოტვირთვა მხოლოდ შემდეგი MIME-ტიპებით: {mimeTypes}.', 'Only files with these extensions are allowed: {extensions}.' => 'ნებადართულია ფაილების ჩამოტვირთვა მხოლოდ შემდეგი გაფართოებებით: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => 'გვერდი ვერ მოიძებნა.', 'Please fix the following errors:' => 'შეასწორეთ შემდეგი შეცდომები:', 'Please upload a file.' => 'ჩამოტვირთეთ ფაილი.', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'ნაჩვენებია ჩანაწერები {begin, number}-{end, number} из {totalCount, number}.', + 'The combination {values} of {attributes} has already been taken.' => '', 'The file "{file}" is not an image.' => 'ფაილი «{file}» არ წარმოადგენს გამოსახულებას.', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'ფაილი «{file}» ძალიან დიდია. ზომა არ უნდა აღემატებოდეს {formattedLimit}.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'ფაილი «{file}» ძალიან პატარაა. ზომა უნდა აღემატებოდეს {formattedLimit}.', 'The format of {attribute} is invalid.' => 'მნიშვნელობის «{attribute}» არასწორი ფორმატი.', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'ფაილი «{file}» ძალიან დიდია. სიმაღლე არ უნდა აღემატებოდეს {limit, number} {limit, plural, one{პიქსელს} few{პიქსელს} many{პიქსელს} other{პიქსელს}}.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'ფაილი «{file}» ძალიან დიდია. სიგანე არ უნდა აღემატებოდეს {limit, number} {limit, plural, one{პიქსელს} few{პიქსელს} many{პიქსელს} other{პიქსელს}}.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'ფაილი «{file}» ძალიან პატარაა. სიმაღლე უნდა აღემატებოდეს {limit, number} {limit, plural, one{პიქსელს} few{პიქსელს} many{პიქსელს} other{პიქსელს}}.', @@ -54,12 +64,15 @@ 'The verification code is incorrect.' => 'არასწორი შემამოწმებელი კოდი.', 'Total {count, number} {count, plural, one{item} other{items}}.' => 'სულ {count, number} {count, plural, one{ჩანაწერი} few{ჩანაწერი} many{ჩანაწერი}} other{ჩანაწერი}}.', 'Unable to verify your data submission.' => 'ვერ მოხერხდა გადაცემული მონაცემების შემოწმება.', + 'Unknown alias: -{name}' => '', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'უცნობი ოფცია: --{name}', 'Update' => 'რედაქტირება', 'View' => 'ნახვა', 'Yes' => 'დიახ', 'You are not allowed to perform this action.' => 'თქვენ არ გაქვთ მოცემული ქმედების შესრულების ნებართვა.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'თქვენ არ შეგიძლიათ ჩამოტვირთოთ {limit, number}-ზე მეტი {limit, plural, one{ფაილი} few{ფაილი} many{ფაილი} other{ფაილი}}.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', 'in {delta, plural, =1{a day} other{# days}}' => '{delta, plural, =1{დღის} one{# დღის} few{# დღის} many{# დღის} other{# დღის}} შემდეგ', 'in {delta, plural, =1{a minute} other{# minutes}}' => '{delta, plural, =1{წუთის} one{# წუთის} few{# წუთის} many{# წუთის} other{# წუთის}} შემდეგ', 'in {delta, plural, =1{a month} other{# months}}' => '{delta, plural, =1{თვის} one{# თვის} few{# თვის} many{# თვის} other{# თვის}} შემდეგ', @@ -70,25 +83,39 @@ 'the input value' => 'შეყვანილი მნიშვნელობა', '{attribute} "{value}" has already been taken.' => '{attribute} «{value}» უკვე დაკავებულია.', '{attribute} cannot be blank.' => 'საჭიროა შევსება «{attribute}».', + '{attribute} contains wrong subnet mask.' => '', '{attribute} is invalid.' => 'მნიშვნელობა «{attribute}» არასწორია.', '{attribute} is not a valid URL.' => 'მნიშვნელობა «{attribute}» არ წარმოადგენს სწორ URL-ს.', '{attribute} is not a valid email address.' => 'მნიშვნელობა «{attribute}» არ წარმოადგენს სწორ email მისამართს.', + '{attribute} is not in the allowed range.' => '', '{attribute} must be "{requiredValue}".' => 'მნიშვნელობა «{attribute}» უნდა იყოს «{requiredValue}-ს ტოლი».', '{attribute} must be a number.' => 'მნიშვნელობა «{attribute}» უნდა იყოს რიცხვი.', '{attribute} must be a string.' => 'მნიშვნელობა «{attribute}» უნდა იყოს სტრიქონი.', + '{attribute} must be a valid IP address.' => '', + '{attribute} must be an IP address with specified subnet.' => '', '{attribute} must be an integer.' => 'მნიშვნელობა «{attribute}» უნდა იყოს მთელი რიცხვი.', '{attribute} must be either "{true}" or "{false}".' => 'მნიშვნელობა «{attribute}» უნდა იყოს «{true}»-ს ან «{false}»-ს ტოლი.', - '{attribute} must be greater than "{compareValue}".' => 'მნიშვნელობა «{attribute}» უნდა იყოს «{compareValue}» მნიშვნელობაზე მეტი.', - '{attribute} must be greater than or equal to "{compareValue}".' => 'მნიშვნელობა «{attribute}» უნდა იყოს «{compareValue}» მნიშვნელობაზე მეტი ან ტოლი.', - '{attribute} must be less than "{compareValue}".' => 'მნიშვნელობა «{attribute}» უნდა იყოს «{compareValue}» მნიშვნელობაზე ნაკლები.', - '{attribute} must be less than or equal to "{compareValue}".' => 'მნიშვნელობა «{attribute}» უნდა იყოს «{compareValue}» მნიშვნელობაზე ნაკლები ან ტოლი.', + '{attribute} must be equal to "{compareValueOrAttribute}".' => '', + '{attribute} must be greater than "{compareValueOrAttribute}".' => 'მნიშვნელობა «{attribute}» უნდა იყოს «{compareValueOrAttribute}» მნიშვნელობაზე მეტი.', + '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => 'მნიშვნელობა «{attribute}» უნდა იყოს «{compareValueOrAttribute}» მნიშვნელობაზე მეტი ან ტოლი.', + '{attribute} must be less than "{compareValueOrAttribute}".' => 'მნიშვნელობა «{attribute}» უნდა იყოს «{compareValueOrAttribute}» მნიშვნელობაზე ნაკლები.', + '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => 'მნიშვნელობა «{attribute}» უნდა იყოს «{compareValueOrAttribute}» მნიშვნელობაზე ნაკლები ან ტოლი.', '{attribute} must be no greater than {max}.' => 'მნიშვნელობა «{attribute}» არ უნდა აღემატებოდეს {max}.', '{attribute} must be no less than {min}.' => 'მნიშვნელობა «{attribute}» უნდა იყოს არანაკლები {min}.', - '{attribute} must be repeated exactly.' => 'მნიშვნელობა «{attribute}» უნდა განმეორდეს ზუსტად.', - '{attribute} must not be equal to "{compareValue}".' => 'მნიშვნელობა «{attribute}» არ უნდა იყოს «{compareValue}»-ს ტოლი.', + '{attribute} must not be a subnet.' => '', + '{attribute} must not be an IPv4 address.' => '', + '{attribute} must not be an IPv6 address.' => '', + '{attribute} must not be equal to "{compareValueOrAttribute}".' => 'მნიშვნელობა «{attribute}» არ უნდა იყოს «{compareValueOrAttribute}»-ს ტოლი.', '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => 'მნიშვნელობა «{attribute}» უნდა შეიცავდეს მინიმუმ {min, number} {min, plural, one{სიმბოლს} few{სიმბოლს} many{სიმბოლს} other{სიმბოლს}}.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => 'მნიშვნელობა «{attribute}» უნდა შეიცავდეს მაქსიმუმ {max, number} {max, plural, one{სიმბოლს} few{სიმბოლს} many{სიმბოლს} other{სიმბოლს}}.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => 'მნიშვნელობა «{attribute}» უნდა შეიცავდეს {length, number} {length, plural, one{სიმბოლს} few{სიმბოლს} many{სიმბოლს} other{სიმბოლს}}.', + '{compareAttribute} is invalid.' => '', + '{delta, plural, =1{1 day} other{# days}}' => '', + '{delta, plural, =1{1 hour} other{# hours}}' => '', + '{delta, plural, =1{1 minute} other{# minutes}}' => '', + '{delta, plural, =1{1 month} other{# months}}' => '', + '{delta, plural, =1{1 second} other{# seconds}}' => '', + '{delta, plural, =1{1 year} other{# years}}' => '', '{delta, plural, =1{a day} other{# days}} ago' => '{delta, plural, =1{დღის} one{# დღის} few{# დღის} many{# დღის} other{# დღის}} უკან', '{delta, plural, =1{a minute} other{# minutes}} ago' => '{delta, plural, =1{წუთის} one{# წუთის} few{# წუთის} many{# წუთის} other{# წუთის}} უკან', '{delta, plural, =1{a month} other{# months}} ago' => '{delta, plural, =1{თვის} one{# თვის} few{# თვის} many{# თვის} other{# თვის}} უკან', @@ -98,7 +125,6 @@ '{nFormatted} B' => '{nFormatted} ბ', '{nFormatted} GB' => '{nFormatted} გბ', '{nFormatted} GiB' => '{nFormatted} გიბ', - '{nFormatted} kB' => '{nFormatted} კბ', '{nFormatted} KiB' => '{nFormatted} კიბ', '{nFormatted} MB' => '{nFormatted} მბ', '{nFormatted} MiB' => '{nFormatted} მიბ', @@ -106,6 +132,7 @@ '{nFormatted} PiB' => '{nFormatted} პიბ', '{nFormatted} TB' => '{nFormatted} ტბ', '{nFormatted} TiB' => '{nFormatted} ტიბ', + '{nFormatted} kB' => '{nFormatted} კბ', '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, one{ბაიტი} few{ბაიტს} many{ბაიტი} other{ბაიტს}}', '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} {n, plural, one{გიბიბაიტი} few{გიბიბაიტს} many{გიბიბაიტი} other{გიბიბაიტს}}', '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, one{გიგაბაიტი} few{გიგაბაიტს} many{გიგაბაიტი} other{გიგაბაიტს}}', diff --git a/framework/messages/kk/yii.php b/framework/messages/kk/yii.php index b33338dbab8..fb43703aa89 100644 --- a/framework/messages/kk/yii.php +++ b/framework/messages/kk/yii.php @@ -23,9 +23,14 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + ' and ' => '', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(берілмеген)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Сервердің ішкі қатесі туды.', 'Are you sure you want to delete this item?' => 'Бұл элементті жоюға сенімдісіз бе?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => 'Жою', 'Error' => 'Қате', 'File upload failed.' => 'Файлды жүктеу сәтті болмады', @@ -35,52 +40,108 @@ 'Missing required arguments: {params}' => 'Қажетті аргументтер жоқ: {params}', 'Missing required parameters: {params}' => 'Қажетті параметрлер жоқ: {params}', 'No' => 'Жоқ', - 'No help for unknown command "{command}".' => 'Белгісіз "{command}" командасы үшін көмек табылмады.', - 'No help for unknown sub-command "{command}".' => 'Белгісіз "{command}" ішкі командасы үшін көмек табылмады.', 'No results found.' => 'Нәтиже табылған жок.', + 'Only files with these MIME types are allowed: {mimeTypes}.' => '', 'Only files with these extensions are allowed: {extensions}.' => 'Тек мына кеңейтімдегі файлдарға ғана рұқсат етілген: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => 'Бет табылған жок.', 'Please fix the following errors:' => 'Өтінеміз, мына қателерді түзеңіз:', 'Please upload a file.' => 'Файлды жүктеңіз.', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => '{totalCount, number} жазбадан {begin, number}-{end, number} аралығы көрсетілген.', + 'The combination {values} of {attributes} has already been taken.' => '', 'The file "{file}" is not an image.' => '«{file}» файлы сурет емес.', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => '«{file}» файлының өлшемі тым үлкен. Көлемі {formattedLimit} аспау керек.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => '«{file}» файлының өлшемі тым кіші. Көлемі {formattedLimit} кем болмауы керек.', 'The format of {attribute} is invalid.' => '«{attribute}» аттрибутының форматы дұрыс емес.', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '«{file}» суретінің өлшемі тым үлкен. Биіктігі {limit, number} пиксельден аспауы қажет.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '«{file}» суретінің өлшемі тым үлкен. Ені {limit, number} пиксельден аспауы қажет.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '«{file}» суретінің өлшемі тым кіші. Биіктігі {limit, number} пиксельден кем болмауы қажет.', 'The image "{file}" is too small. The width cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '«{file}» суретінің өлшемі тым кіші. Ені {limit, number} пиксельден кем болмауы қажет.', + 'The requested view "{name}" was not found.' => '', 'The verification code is incorrect.' => 'Тексеріс коды қате.', 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Барлығы {count, number} жазба.', 'Unable to verify your data submission.' => 'Жіберілген мәліметерді тексеру мүмкін емес.', - 'Unknown command "{command}".' => '"{command}" командасы белгісіз.', + 'Unknown alias: -{name}' => '', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'Белгісіз опция: --{name}', 'Update' => 'Жаңарту', 'View' => 'Көру', 'Yes' => 'Иә', 'You are not allowed to perform this action.' => 'Сізге бұл әрекетті жасауға рұқсат жоқ', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Сіз {limit} файлдан көп жүктей алмайсыз.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', + 'in {delta, plural, =1{a day} other{# days}}' => '', + 'in {delta, plural, =1{a minute} other{# minutes}}' => '', + 'in {delta, plural, =1{a month} other{# months}}' => '', + 'in {delta, plural, =1{a second} other{# seconds}}' => '', + 'in {delta, plural, =1{a year} other{# years}}' => '', + 'in {delta, plural, =1{an hour} other{# hours}}' => '', + 'just now' => '', 'the input value' => 'енгізілген мән', '{attribute} "{value}" has already been taken.' => '{attribute} «{value}» Бұл бос емес мән.', '{attribute} cannot be blank.' => '«{attribute}» толтыруды қажет етеді.', + '{attribute} contains wrong subnet mask.' => '', '{attribute} is invalid.' => '«{attribute}» мәні жарамсыз.', '{attribute} is not a valid URL.' => '«{attribute}» жарамды URL емес.', '{attribute} is not a valid email address.' => '«{attribute}» жарамды email адрес емес.', + '{attribute} is not in the allowed range.' => '', '{attribute} must be "{requiredValue}".' => '«{attribute}» мәні «{requiredValue}» болу керек.', '{attribute} must be a number.' => '«{attribute}» мәні сан болуы керек.', '{attribute} must be a string.' => '«{attribute}» мәні мәтін болуы керек.', + '{attribute} must be a valid IP address.' => '', + '{attribute} must be an IP address with specified subnet.' => '', '{attribute} must be an integer.' => '«{attribute}» мәні бүтін сан болу керек.', '{attribute} must be either "{true}" or "{false}".' => '«{attribute}» мәні «{true}» немесе «{false}» болуы керек.', - '{attribute} must be greater than "{compareValue}".' => '«{attribute}» мәні мынадан үлкен болуы керек: «{compareValue}».', - '{attribute} must be greater than or equal to "{compareValue}".' => '«{attribute}» мәні мынадан үлкен немесе тең болуы керек: «{compareValue}».', - '{attribute} must be less than "{compareValue}".' => '«{attribute}» мәні мынадан кіші болуы керек: «{compareValue}».', - '{attribute} must be less than or equal to "{compareValue}".' => '«{attribute}» мәні мынадан кіші немесе тең болуы керек: «{compareValue}».', + '{attribute} must be equal to "{compareValueOrAttribute}".' => '', + '{attribute} must be greater than "{compareValueOrAttribute}".' => '«{attribute}» мәні мынадан үлкен болуы керек: «{compareValueOrAttribute}».', + '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '«{attribute}» мәні мынадан үлкен немесе тең болуы керек: «{compareValueOrAttribute}».', + '{attribute} must be less than "{compareValueOrAttribute}".' => '«{attribute}» мәні мынадан кіші болуы керек: «{compareValueOrAttribute}».', + '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '«{attribute}» мәні мынадан кіші немесе тең болуы керек: «{compareValueOrAttribute}».', '{attribute} must be no greater than {max}.' => '«{attribute}» мәні мынадан аспауы керек: {max}.', '{attribute} must be no less than {min}.' => '«{attribute}» мәні мынадан кем болмауы керек: {min}.', - '{attribute} must be repeated exactly.' => '«{attribute}» мәні дәлме-дәл қайталану керек.', - '{attribute} must not be equal to "{compareValue}".' => '«{attribute}» мәні мынаған тең болмауы керек: «{compareValue}».', + '{attribute} must not be a subnet.' => '', + '{attribute} must not be an IPv4 address.' => '', + '{attribute} must not be an IPv6 address.' => '', + '{attribute} must not be equal to "{compareValueOrAttribute}".' => '«{attribute}» мәні мынаған тең болмауы керек: «{compareValueOrAttribute}».', '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '«{attribute}» мәні кемінде {min} таңбадан тұруы керек.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '«{attribute}» мәні {max} таңбадан аспауы қажет.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '«{attribute}» {length} таңбадан тұруы керек.', + '{compareAttribute} is invalid.' => '', + '{delta, plural, =1{1 day} other{# days}}' => '', + '{delta, plural, =1{1 hour} other{# hours}}' => '', + '{delta, plural, =1{1 minute} other{# minutes}}' => '', + '{delta, plural, =1{1 month} other{# months}}' => '', + '{delta, plural, =1{1 second} other{# seconds}}' => '', + '{delta, plural, =1{1 year} other{# years}}' => '', + '{delta, plural, =1{a day} other{# days}} ago' => '', + '{delta, plural, =1{a minute} other{# minutes}} ago' => '', + '{delta, plural, =1{a month} other{# months}} ago' => '', + '{delta, plural, =1{a second} other{# seconds}} ago' => '', + '{delta, plural, =1{a year} other{# years}} ago' => '', + '{delta, plural, =1{an hour} other{# hours}} ago' => '', + '{nFormatted} B' => '', + '{nFormatted} GB' => '', + '{nFormatted} GiB' => '', + '{nFormatted} KiB' => '', + '{nFormatted} MB' => '', + '{nFormatted} MiB' => '', + '{nFormatted} PB' => '', + '{nFormatted} PiB' => '', + '{nFormatted} TB' => '', + '{nFormatted} TiB' => '', + '{nFormatted} kB' => '', + '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '', + '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '', + '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '', + '{nFormatted} {n, plural, =1{kibibyte} other{kibibytes}}' => '', + '{nFormatted} {n, plural, =1{kilobyte} other{kilobytes}}' => '', + '{nFormatted} {n, plural, =1{mebibyte} other{mebibytes}}' => '', + '{nFormatted} {n, plural, =1{megabyte} other{megabytes}}' => '', + '{nFormatted} {n, plural, =1{pebibyte} other{pebibytes}}' => '', + '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '', + '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '', + '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '', ]; diff --git a/framework/messages/ko/yii.php b/framework/messages/ko/yii.php index 4fe82311fe8..bf0a51babb4 100644 --- a/framework/messages/ko/yii.php +++ b/framework/messages/ko/yii.php @@ -23,8 +23,14 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + ' and ' => '', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(설정되어있지않습니다)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => '서버 오류가 발생하였습니다.', + 'Are you sure you want to delete this item?' => '', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => '삭제', 'Error' => '오류', 'File upload failed.' => '파일 업로드 실패하였습니다.', @@ -34,52 +40,108 @@ 'Missing required arguments: {params}' => '필요한 인수가 없습니다: {params}', 'Missing required parameters: {params}' => '필요한 매개변수가 없습니다: {params}', 'No' => '아니오', - 'No help for unknown command "{command}".' => '알 수 없는 명령 "{command}"에 대한 도움말이 없습니다.', - 'No help for unknown sub-command "{command}".' => '알 수 없는 하위명령 "{command}"에 대한 도움말이 없습니다.', 'No results found.' => '결과가 없습니다.', + 'Only files with these MIME types are allowed: {mimeTypes}.' => '', 'Only files with these extensions are allowed: {extensions}.' => '다음의 확장명을 가진 파일만 허용됩니다: {extensions}', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => '페이지를 찾을 수 없습니다.', 'Please fix the following errors:' => '다음 오류를 수정하십시오:', 'Please upload a file.' => '파일을 업로드하십시오.', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => '{totalCount} 중 {begin} 에서 {end} 까지 표시하고 있습니다.', + 'The combination {values} of {attributes} has already been taken.' => '', 'The file "{file}" is not an image.' => '파일 "{file}"은 이미지 파일이 아닙니다.', - 'The file "{file}" is too big. Its size cannot exceed {limit, number} {limit, plural, one{byte} other{bytes}}.' => '파일 "{file}"는 크기가 너무 큽니다. 파일 크기는 {limit} 바이트를 초과할 수 없습니다.', - 'The file "{file}" is too small. Its size cannot be smaller than {limit, number} {limit, plural, one{byte} other{bytes}}.' => '파일 "{file}"는 크기가 너무 작습니다. 크기는 {limit} 바이트 보다 작을 수 없습니다.', + 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => '', + 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => '', 'The format of {attribute} is invalid.' => '{attribute}의 형식이 올바르지 않습니다.', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '이미지 "{file}"가 너무 큽니다. 높이는 {limit} 보다 클 수 없습니다.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '이미지 "{file}"가 너무 큽니다. 넓이는 {limit} 보다 클 수 없습니다.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '이미지 "{file}"가 너무 작습니다. 높이는 {limit} 보다 작을 수 없습니다.', 'The image "{file}" is too small. The width cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '이미지 "{file}"가 너무 작습니다. 넒이는 {limit} 보다 작을 수 없습니다.', + 'The requested view "{name}" was not found.' => '', 'The verification code is incorrect.' => '확인코드가 올바르지않습니다.', 'Total {count, number} {count, plural, one{item} other{items}}.' => '모두 {count} 개', 'Unable to verify your data submission.' => '데이터 전송을 확인하지 못했습니다.', - 'Unknown command "{command}".' => '알 수 없는 명령 "{command}".', + 'Unknown alias: -{name}' => '', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => '알 수 없는 옵션: --{name}', 'Update' => '갱신', 'View' => '보기', 'Yes' => '예', 'You are not allowed to perform this action.' => '이 작업의 실행을 허가받지못하였습니다.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => '최대 {limit} 개의 파일을 업로드할 수 있습니다.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', + 'in {delta, plural, =1{a day} other{# days}}' => '', + 'in {delta, plural, =1{a minute} other{# minutes}}' => '', + 'in {delta, plural, =1{a month} other{# months}}' => '', + 'in {delta, plural, =1{a second} other{# seconds}}' => '', + 'in {delta, plural, =1{a year} other{# years}}' => '', + 'in {delta, plural, =1{an hour} other{# hours}}' => '', + 'just now' => '', 'the input value' => '입력 값', '{attribute} "{value}" has already been taken.' => '{attribute}에 "{value}"이 이미 사용되고 있습니다.', '{attribute} cannot be blank.' => '{attribute}는 공백일 수 없습니다.', + '{attribute} contains wrong subnet mask.' => '', '{attribute} is invalid.' => '{attribute}가 잘못되었습니다.', '{attribute} is not a valid URL.' => '{attribute}는 올바른 URL 형식이 아닙니다.', '{attribute} is not a valid email address.' => '{attribute}는 올바른 이메일 주소 형식이 아닙니다.', + '{attribute} is not in the allowed range.' => '', '{attribute} must be "{requiredValue}".' => '{attribute}는 {value}이어야 합니다.', '{attribute} must be a number.' => '{attribute}는 반드시 숫자이어야 합니다.', '{attribute} must be a string.' => '{attribute}는 반드시 문자이어야 합니다.', + '{attribute} must be a valid IP address.' => '', + '{attribute} must be an IP address with specified subnet.' => '', '{attribute} must be an integer.' => '{attribute}는 반드시 정수이어야 합니다.', '{attribute} must be either "{true}" or "{false}".' => '{attribute}는 {true} 또는 {false} 이어야 합니다.', - '{attribute} must be greater than "{compareValue}".' => '{attribute}는 "{compareValue}" 보다 커야 합니다.', - '{attribute} must be greater than or equal to "{compareValue}".' => '{attribute}는 "{compareValue}" 보다 크거나 같아야 합니다.', - '{attribute} must be less than "{compareValue}".' => '{attribute}는 "{compareValue}" 보다 작아야 합니다.', - '{attribute} must be less than or equal to "{compareValue}".' => '{attribute}는 "{compareValue}" 보다 작거나 같아야 합니다.', - '{attribute} must be no greater than {max}.' => '{attribute}는 "{compareValue}" 보다 클 수 없습니다.', - '{attribute} must be no less than {min}.' => '{attribute}는 "{compareValue}" 보다 작을 수 없습니다.', - '{attribute} must be repeated exactly.' => '{attribute}는 정확하게 반복합니다.', - '{attribute} must not be equal to "{compareValue}".' => '{attribute}는 "{compareValue}"와 같을 수 없습니다.', + '{attribute} must be equal to "{compareValueOrAttribute}".' => '', + '{attribute} must be greater than "{compareValueOrAttribute}".' => '{attribute}는 "{compareValueOrAttribute}" 보다 커야 합니다.', + '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '{attribute}는 "{compareValueOrAttribute}" 보다 크거나 같아야 합니다.', + '{attribute} must be less than "{compareValueOrAttribute}".' => '{attribute}는 "{compareValueOrAttribute}" 보다 작아야 합니다.', + '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '{attribute}는 "{compareValueOrAttribute}" 보다 작거나 같아야 합니다.', + '{attribute} must be no greater than {max}.' => '{attribute}는 "{max}" 보다 클 수 없습니다.', + '{attribute} must be no less than {min}.' => '{attribute}는 "{min}" 보다 작을 수 없습니다.', + '{attribute} must not be a subnet.' => '', + '{attribute} must not be an IPv4 address.' => '', + '{attribute} must not be an IPv6 address.' => '', + '{attribute} must not be equal to "{compareValueOrAttribute}".' => '{attribute}는 "{compareValueOrAttribute}"와 같을 수 없습니다.', '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute}는 최소 {min}자 이어야합니다.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute}는 최대 {max}자 이어야합니다.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute}는 {length}자 이어야합니다.', + '{compareAttribute} is invalid.' => '', + '{delta, plural, =1{1 day} other{# days}}' => '', + '{delta, plural, =1{1 hour} other{# hours}}' => '', + '{delta, plural, =1{1 minute} other{# minutes}}' => '', + '{delta, plural, =1{1 month} other{# months}}' => '', + '{delta, plural, =1{1 second} other{# seconds}}' => '', + '{delta, plural, =1{1 year} other{# years}}' => '', + '{delta, plural, =1{a day} other{# days}} ago' => '', + '{delta, plural, =1{a minute} other{# minutes}} ago' => '', + '{delta, plural, =1{a month} other{# months}} ago' => '', + '{delta, plural, =1{a second} other{# seconds}} ago' => '', + '{delta, plural, =1{a year} other{# years}} ago' => '', + '{delta, plural, =1{an hour} other{# hours}} ago' => '', + '{nFormatted} B' => '', + '{nFormatted} GB' => '', + '{nFormatted} GiB' => '', + '{nFormatted} KiB' => '', + '{nFormatted} MB' => '', + '{nFormatted} MiB' => '', + '{nFormatted} PB' => '', + '{nFormatted} PiB' => '', + '{nFormatted} TB' => '', + '{nFormatted} TiB' => '', + '{nFormatted} kB' => '', + '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '', + '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '', + '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '', + '{nFormatted} {n, plural, =1{kibibyte} other{kibibytes}}' => '', + '{nFormatted} {n, plural, =1{kilobyte} other{kilobytes}}' => '', + '{nFormatted} {n, plural, =1{mebibyte} other{mebibytes}}' => '', + '{nFormatted} {n, plural, =1{megabyte} other{megabytes}}' => '', + '{nFormatted} {n, plural, =1{pebibyte} other{pebibytes}}' => '', + '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '', + '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '', + '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '', ]; diff --git a/framework/messages/kz/yii.php b/framework/messages/kz/yii.php index d8a3cf94b5a..76c43e120c8 100644 --- a/framework/messages/kz/yii.php +++ b/framework/messages/kz/yii.php @@ -1,8 +1,14 @@ '{nFormatted} Б', - '{nFormatted} GB' => '{nFormatted} ГБ', - '{nFormatted} GiB' => '{nFormatted} ГиБ', - '{nFormatted} kB' => '{nFormatted} КБ', - '{nFormatted} KiB' => '{nFormatted} КиБ', - '{nFormatted} MB' => '{nFormatted} МБ', - '{nFormatted} MiB' => '{nFormatted} МиБ', - '{nFormatted} PB' => '{nFormatted} ПБ', - '{nFormatted} PiB' => '{nFormatted} ПиБ', - '{nFormatted} TB' => '{nFormatted} ТБ', - '{nFormatted} TiB' => '{nFormatted} ТиБ', - '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, one{байттар} few{байт} many{байттар} other{байт}}', - '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} {n, plural, one{гибибайт} few{гибибайта} many{гибибайтов} other{гибибайта}}', - '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, one{гигабайт} few{гигабайта} many{гигабайтов} other{гигабайта}}', - '{nFormatted} {n, plural, =1{kibibyte} other{kibibytes}}' => '{nFormatted} {n, plural, one{кибибайт} few{кибибайта} many{кибибайтов} other{кибибайта}}', - '{nFormatted} {n, plural, =1{kilobyte} other{kilobytes}}' => '{nFormatted} {n, plural, one{килобайт} few{килобайта} many{килобайтов} other{килобайта}}', - '{nFormatted} {n, plural, =1{mebibyte} other{mebibytes}}' => '{nFormatted} {n, plural, one{мебибайт} few{мебибайта} many{мебибайтов} other{мебибайта}}', - '{nFormatted} {n, plural, =1{megabyte} other{megabytes}}' => '{nFormatted} {n, plural, one{мегабайт} few{мегабайта} many{мегабайтов} other{мегабайта}}', - '{nFormatted} {n, plural, =1{pebibyte} other{pebibytes}}' => '{nFormatted} {n, plural, one{пебибайт} few{пебибайта} many{пебибайтов} other{пебибайта}}', - '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '{nFormatted} {n, plural, one{петабайт} few{петабайта} many{петабайтов} other{петабайта}}', - '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '{nFormatted} {n, plural, one{тебибайт} few{тебибайта} many{тебибайтов} other{тебибайта}}', - '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '{nFormatted} {n, plural, one{терабайт} few{терабайта} many{терабайтов} other{терабайта}}', + ' and ' => '', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(көрсетілмеген)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Ішкі сервер қатесі орын алды.', 'Are you sure you want to delete this item?' => 'Бұл элементті жою керек пе?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => 'Жою', 'Error' => 'Қате', 'File upload failed.' => 'Файл жүктелмеді.', @@ -51,19 +40,22 @@ 'Missing required arguments: {params}' => 'Қажетті дәлелдер жоқ: {params}', 'Missing required parameters: {params}' => 'Қажетті параметрлер жоқ: {params}', 'No' => 'Жоқ', - 'No help for unknown command "{command}".' => 'Анық емес "{command}" пәрменіне көмек жоқ.', - 'No help for unknown sub-command "{command}".' => 'Анық емес субкоманда "{command}" үшін көмек жоқ.', 'No results found.' => 'Еш нәрсе табылмады.', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Тек келесі MIME-түріндегі файлдарға рұқсат етіледі: {mimeTypes}.', 'Only files with these extensions are allowed: {extensions}.' => 'Тек келесі кеңейтілімдері бар файлдарға рұқсат етіледі: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => 'Бет табылмады.', 'Please fix the following errors:' => 'Келесі қателерді түзетіңіз:', 'Please upload a file.' => 'Файлды жүктеп алыңыз.', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Жазбаларды көрсету {begin, number}-{end, number} из {totalCount, number}.', + 'The combination {values} of {attributes} has already been taken.' => '', 'The file "{file}" is not an image.' => '"{file}" файлы сурет емес.', - 'The file "{file}" is too big. Its size cannot exceed {limit, number} {limit, plural, one{byte} other{bytes}}.' => '«{file}» файлы тым үлкен. Өлшемі {шектеу, сан} {limit, plural, one{байттар} few{байт} many{байттар} other{байта}}.', - 'The file "{file}" is too small. Its size cannot be smaller than {limit, number} {limit, plural, one{byte} other{bytes}}.' => '«{file}» файлы тым кішкентай. Өлшем көп болуы керек {limit, number} {limit, plural, one{байттар} few{байта} many{байт} other{байта}}.', + 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => '', + 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => '', 'The format of {attribute} is invalid.' => '{attribute} мәнінің пішімі дұрыс емес.', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '«{file}» файлы тым үлкен. Биіктігі аспауы керек {limit, number} {limit, plural, other{пиксел}}.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '«{file}» файлы тым үлкен. Ені аспауы тиіс {limit, number} {limit, plural, other{пиксел}}.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '«{file}» файлы тым кішкентай. Биіктігі көп болуы керек {limit, number} {limit, plural, other{пиксел}}.', @@ -72,13 +64,15 @@ 'The verification code is incorrect.' => 'Растау коды дұрыс емес.', 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Барлығы {count, number} {count, plural, one{кіру} few{жазбалар} many{жазбалар} other{жазбалар}}.', 'Unable to verify your data submission.' => 'Жіберілген деректерді тексере алмадық.', - 'Unknown command "{command}".' => 'Белгісіз команда "{command}".', + 'Unknown alias: -{name}' => '', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'Белгісіз опция: --{name}', 'Update' => 'Өңдеу', 'View' => 'Ішінде қараңыз', 'Yes' => 'Ия', 'You are not allowed to perform this action.' => 'Сіз бұл әрекетті орындауға рұқсатыңыз жоқ.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Көбірек жүктей алмайсыз {limit, number} {limit, plural, one{файл} few{файлдар} many{файлдар} other{файл}}.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', 'in {delta, plural, =1{a day} other{# days}}' => 'арқылы {delta, plural, =1{күн} one{# күн} few{# күн} many{# күндер} other{# күн}}', 'in {delta, plural, =1{a minute} other{# minutes}}' => 'арқылы {delta, plural, =1{минутына} one{# минутына} few{# минуттар} many{# минуттар} other{# минуттар}}', 'in {delta, plural, =1{a month} other{# months}}' => 'арқылы {delta, plural, =1{ай} one{# ай} few{# айлар} many{# айлар} other{# айлар}}', @@ -89,29 +83,65 @@ 'the input value' => 'енгізілген мән', '{attribute} "{value}" has already been taken.' => '{attribute} «{value}» қазірдің өзінде қабылданды.', '{attribute} cannot be blank.' => 'Толтырылуы керек «{attribute}».', + '{attribute} contains wrong subnet mask.' => '', '{attribute} is invalid.' => '«{attribute}» мәні жарамсыз.', '{attribute} is not a valid URL.' => '«{attribute}» мәні жарамды URL емес.', '{attribute} is not a valid email address.' => '«{attribute}» мәні жарамды электрондық пошта мекенжайы емес.', + '{attribute} is not in the allowed range.' => '', '{attribute} must be "{requiredValue}".' => '«{attribute}» мәні «{requiredValue}» дегенге тең болуы керек.', '{attribute} must be a number.' => '«{attribute}» мәні сан болуы керек.', '{attribute} must be a string.' => '«{attribute}» мәні жол болуы керек.', + '{attribute} must be a valid IP address.' => '', + '{attribute} must be an IP address with specified subnet.' => '', '{attribute} must be an integer.' => '«{attribute}» мәні бүтін сан болуы керек.', '{attribute} must be either "{true}" or "{false}".' => '«{attribute}» мәні «{true}» немесе «{false}» мәніне тең болуы керек.', - '{attribute} must be greater than "{compareValue}".' => '«{attribute}» мәні «{compareValue}» мәнінен үлкен болуы керек.', - '{attribute} must be greater than or equal to "{compareValue}".' => '«{attribute}» мәні «{compareValue}» мәнінен үлкен немесе тең болуы керек.', - '{attribute} must be less than "{compareValue}".' => '«{attribute}» мәні «{compareValue}» мәнінен аз болуы керек.', - '{attribute} must be less than or equal to "{compareValue}".' => '«{attribute}» мәні «{compareValue}» мәнінен аз немесе тең болуы керек.', + '{attribute} must be equal to "{compareValueOrAttribute}".' => '', + '{attribute} must be greater than "{compareValueOrAttribute}".' => '«{attribute}» мәні «{compareValueOrAttribute}» мәнінен үлкен болуы керек.', + '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '«{attribute}» мәні «{compareValueOrAttribute}» мәнінен үлкен немесе тең болуы керек.', + '{attribute} must be less than "{compareValueOrAttribute}".' => '«{attribute}» мәні «{compareValueOrAttribute}» мәнінен аз болуы керек.', + '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '«{attribute}» мәні «{compareValueOrAttribute}» мәнінен аз немесе тең болуы керек.', '{attribute} must be no greater than {max}.' => '«{attribute}» мәні {max} аспауы керек.', '{attribute} must be no less than {min}.' => '«{attribute}» мәні кем дегенде {min} болуы керек.', - '{attribute} must be repeated exactly.' => '«{attribute}» мәні дәл қайталануы керек.', - '{attribute} must not be equal to "{compareValue}".' => '«{attribute}» мәні «{compareValue}» тең болмауы керек.', + '{attribute} must not be a subnet.' => '', + '{attribute} must not be an IPv4 address.' => '', + '{attribute} must not be an IPv6 address.' => '', + '{attribute} must not be equal to "{compareValueOrAttribute}".' => '«{attribute}» мәні «{compareValueOrAttribute}» тең болмауы керек.', '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '«{attribute}» мәні минималды {min, number} болуы керек {min, number} {min, plural, one{таңба} few{таңба} many{таңбалар} other{таңба}}.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '«{attribute}» мәні ең көп {max, number} {max, plural, one{таңба} few{таңба} many{таңбалар} other{таңба}}.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '«{attribute}» мәні {length, number} болуы керек {length, plural, one{таңба} few{таңба} many{таңбалар} other{таңба}}.', + '{compareAttribute} is invalid.' => '', + '{delta, plural, =1{1 day} other{# days}}' => '', + '{delta, plural, =1{1 hour} other{# hours}}' => '', + '{delta, plural, =1{1 minute} other{# minutes}}' => '', + '{delta, plural, =1{1 month} other{# months}}' => '', + '{delta, plural, =1{1 second} other{# seconds}}' => '', + '{delta, plural, =1{1 year} other{# years}}' => '', '{delta, plural, =1{a day} other{# days}} ago' => '{delta, plural, =1{күн} one{күн} few{# күн} many{# күндер} other{# күн}} артқа қарай', '{delta, plural, =1{a minute} other{# minutes}} ago' => '{delta, plural, =1{минутына} one{# минутына} few{# минуттар} many{# минуттар} other{# минуттар}} артқа қарай', '{delta, plural, =1{a month} other{# months}} ago' => '{delta, plural, =1{ай} one{# ай} few{# айлар} many{# айлар} other{# айлар}} артқа қарай', '{delta, plural, =1{a second} other{# seconds}} ago' => '{delta, plural, other{# екіншіден}} артқа қарай', '{delta, plural, =1{a year} other{# years}} ago' => '{delta, plural, =1{жыл} one{# жыл} few{# жыл} many{# жастағы} other{# жыл}} артқа қарай', '{delta, plural, =1{an hour} other{# hours}} ago' => '{delta, plural, other{# сағат}} артқа қарай', -]; \ No newline at end of file + '{nFormatted} B' => '{nFormatted} Б', + '{nFormatted} GB' => '{nFormatted} ГБ', + '{nFormatted} GiB' => '{nFormatted} ГиБ', + '{nFormatted} KiB' => '{nFormatted} КиБ', + '{nFormatted} MB' => '{nFormatted} МБ', + '{nFormatted} MiB' => '{nFormatted} МиБ', + '{nFormatted} PB' => '{nFormatted} ПБ', + '{nFormatted} PiB' => '{nFormatted} ПиБ', + '{nFormatted} TB' => '{nFormatted} ТБ', + '{nFormatted} TiB' => '{nFormatted} ТиБ', + '{nFormatted} kB' => '{nFormatted} КБ', + '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, one{байттар} few{байт} many{байттар} other{байт}}', + '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} {n, plural, one{гибибайт} few{гибибайта} many{гибибайтов} other{гибибайта}}', + '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, one{гигабайт} few{гигабайта} many{гигабайтов} other{гигабайта}}', + '{nFormatted} {n, plural, =1{kibibyte} other{kibibytes}}' => '{nFormatted} {n, plural, one{кибибайт} few{кибибайта} many{кибибайтов} other{кибибайта}}', + '{nFormatted} {n, plural, =1{kilobyte} other{kilobytes}}' => '{nFormatted} {n, plural, one{килобайт} few{килобайта} many{килобайтов} other{килобайта}}', + '{nFormatted} {n, plural, =1{mebibyte} other{mebibytes}}' => '{nFormatted} {n, plural, one{мебибайт} few{мебибайта} many{мебибайтов} other{мебибайта}}', + '{nFormatted} {n, plural, =1{megabyte} other{megabytes}}' => '{nFormatted} {n, plural, one{мегабайт} few{мегабайта} many{мегабайтов} other{мегабайта}}', + '{nFormatted} {n, plural, =1{pebibyte} other{pebibytes}}' => '{nFormatted} {n, plural, one{пебибайт} few{пебибайта} many{пебибайтов} other{пебибайта}}', + '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '{nFormatted} {n, plural, one{петабайт} few{петабайта} many{петабайтов} other{петабайта}}', + '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '{nFormatted} {n, plural, one{тебибайт} few{тебибайта} many{тебибайтов} other{тебибайта}}', + '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '{nFormatted} {n, plural, one{терабайт} few{терабайта} many{терабайтов} other{терабайта}}', +]; diff --git a/framework/messages/lt/yii.php b/framework/messages/lt/yii.php index fce59c5471b..72d8d5b3081 100644 --- a/framework/messages/lt/yii.php +++ b/framework/messages/lt/yii.php @@ -23,32 +23,14 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ - 'just now' => 'dabar', - '{nFormatted} B' => '{nFormatted} B', - '{nFormatted} GB' => '{nFormatted} GB', - '{nFormatted} GiB' => '{nFormatted} GiB', - '{nFormatted} kB' => '{nFormatted} kB', - '{nFormatted} KiB' => '{nFormatted} KiB', - '{nFormatted} MB' => '{nFormatted} MB', - '{nFormatted} MiB' => '{nFormatted} MiB', - '{nFormatted} PB' => '{nFormatted} PB', - '{nFormatted} PiB' => '{nFormatted} PiB', - '{nFormatted} TB' => '{nFormatted} TB', - '{nFormatted} TiB' => '{nFormatted} TiB', - '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, one{baitas} few{baitai} other{baitų}}', - '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} gibi{n, plural, one{baitas} few{baitai} other{baitų}}', - '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} giga{n, plural, one{baitas} few{baitai} other{baitų}}', - '{nFormatted} {n, plural, =1{kibibyte} other{kibibytes}}' => '{nFormatted} kibi{n, plural, one{baitas} few{baitai} other{baitų}}', - '{nFormatted} {n, plural, =1{kilobyte} other{kilobytes}}' => '{nFormatted} kilo{n, plural, one{baitas} few{baitai} other{baitų}}', - '{nFormatted} {n, plural, =1{mebibyte} other{mebibytes}}' => '{nFormatted} mebi{n, plural, one{baitas} few{baitai} other{baitų}}', - '{nFormatted} {n, plural, =1{megabyte} other{megabytes}}' => '{nFormatted} mega{n, plural, one{baitas} few{baitai} other{baitų}}', - '{nFormatted} {n, plural, =1{pebibyte} other{pebibytes}}' => '{nFormatted} pebi{n, plural, one{baitas} few{baitai} other{baitų}}', - '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '{nFormatted} peta{n, plural, one{baitas} few{baitai} other{baitų}}', - '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '{nFormatted} tebi{n, plural, one{baitas} few{baitai} other{baitų}}', - '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '{nFormatted} tera{n, plural, one{baitas} few{baitai} other{baitų}}', + ' and ' => '', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(nenustatyta)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Įvyko vidinė serverio klaida', 'Are you sure you want to delete this item?' => 'Ar tikrai norite ištrinti šį elementą?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => 'Ištrinti', 'Error' => 'Klaida', 'File upload failed.' => 'Nepavyko įkelti failo.', @@ -61,14 +43,19 @@ 'No results found.' => 'Nėra užklausą atitinkančių įrašų.', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Leidžiama įkelti tik šių MIME tipų failus: {mimeTypes}.', 'Only files with these extensions are allowed: {extensions}.' => 'Leidžiama įkelti failus tik su šiais plėtiniais: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => 'Puslapis nerastas.', 'Please fix the following errors:' => 'Prašytume ištaisyti nurodytas klaidas:', 'Please upload a file.' => 'Prašome įkelti failą.', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Rodomi rezultatai {begin, number}-{end, number}{totalCount, number}.', + 'The combination {values} of {attributes} has already been taken.' => '', 'The file "{file}" is not an image.' => 'Failas „{file}“ nėra paveikslėlis.', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'Failas „{file}“ yra per didelis. Dydis negali viršyti {formattedLimit}.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'Failas „{file}“ yra per mažas. Dydis negali būti mažesnis už {formattedLimit}.', 'The format of {attribute} is invalid.' => 'Atributo „{attribute}“ formatas yra netinkamas.', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Paveikslėlis „{file}“ yra per didelis. Aukštis negali viršyti {limit, number} {limit, plural, one{taško} few{taškų} other{taškų}}.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Paveikslėlis „{file}“ yra per didelis. Plotis negali viršyti {limit, number} {limit, plural, one{taško} few{taškų} other{taškų}}.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Paveikslėlis „{file}“ yra per mažas. Aukštis turi viršyti {limit, number} {limit, plural, one{tašką} few{taškus} other{taškų}}.', @@ -77,44 +64,84 @@ 'The verification code is incorrect.' => 'Neteisingas patikrinimo kodas.', 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Iš viso {count, number} {count, plural, one{elementas} few{elementai} other{elementų}}.', 'Unable to verify your data submission.' => 'Neįmanoma patikrinti jūsų siunčiamų duomenų.', + 'Unknown alias: -{name}' => '', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'Nežinomas pasirinkimas: --{name}', 'Update' => 'Atnaujinti', 'View' => 'Peržiūrėti', 'Yes' => 'Taip', 'You are not allowed to perform this action.' => 'Jums neleidžiama atlikti šio veiksmo.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Leidžiama įkelti ne daugiau nei {limit, number} {limit, plural, one{failą} few{failus} other{failų}}.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', 'in {delta, plural, =1{a day} other{# days}}' => 'po {delta, plural, =1{dienos} one{# dienos} other{# dienų}}', 'in {delta, plural, =1{a minute} other{# minutes}}' => 'po {delta, plural, =1{minutės} one{# minutės} other{# minučių}}', 'in {delta, plural, =1{a month} other{# months}}' => 'po {delta, plural, =1{mėnesio} one{# mėnesio} other{# mėnesių}}', 'in {delta, plural, =1{a second} other{# seconds}}' => 'po {delta, plural, =1{sekundės} one{# sekundės} other{# sekundžių}}', 'in {delta, plural, =1{a year} other{# years}}' => 'po {delta, plural, =1{metų} other{# metų}}', 'in {delta, plural, =1{an hour} other{# hours}}' => 'po {delta, plural, =1{valandos} one{# valandos} other{# valandų}}', + 'just now' => 'dabar', 'the input value' => 'įvesties reikšmė', '{attribute} "{value}" has already been taken.' => '{attribute} reikšmė „{value}“ jau naudojama.', '{attribute} cannot be blank.' => '„{attribute}“ negali būti tuščias.', + '{attribute} contains wrong subnet mask.' => '', '{attribute} is invalid.' => '„{attribute}“ reikšmė netinkama.', '{attribute} is not a valid URL.' => '„{attribute}“ įvestas netinkamas URL.', '{attribute} is not a valid email address.' => '„{attribute}“ įvestas netinkamas el. pašto adresas.', + '{attribute} is not in the allowed range.' => '', '{attribute} must be "{requiredValue}".' => '„{attribute}“ privalo būti „{requiredValue}“.', '{attribute} must be a number.' => '„{attribute}“ privalo būti skaičius.', '{attribute} must be a string.' => '„{attribute}“ privalo būti eilutė.', + '{attribute} must be a valid IP address.' => '', + '{attribute} must be an IP address with specified subnet.' => '', '{attribute} must be an integer.' => '„{attribute}“ privalo būti sveikas skaičius.', '{attribute} must be either "{true}" or "{false}".' => '„{attribute}“ privalo būti „{true}“ arba „{false}“.', - '{attribute} must be greater than "{compareValue}".' => 'Laukelio „{attribute}“ reikšmė privalo būti didesnė nei „{compareValue}“.', - '{attribute} must be greater than or equal to "{compareValue}".' => 'Laukelio „{attribute}“ reikšmė privalo būti didesnė arba lygi „{compareValue}“.', - '{attribute} must be less than "{compareValue}".' => 'Laukelio „{attribute}“ reikšmė privalo būti mažesnė nei „{compareValue}“.', - '{attribute} must be less than or equal to "{compareValue}".' => 'Laukelio „{attribute}“ reikšmė privalo būti mažesnė arba lygi „{compareValue}“.', + '{attribute} must be equal to "{compareValueOrAttribute}".' => '', + '{attribute} must be greater than "{compareValueOrAttribute}".' => 'Laukelio „{attribute}“ reikšmė privalo būti didesnė nei „{compareValueOrAttribute}“.', + '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => 'Laukelio „{attribute}“ reikšmė privalo būti didesnė arba lygi „{compareValueOrAttribute}“.', + '{attribute} must be less than "{compareValueOrAttribute}".' => 'Laukelio „{attribute}“ reikšmė privalo būti mažesnė nei „{compareValueOrAttribute}“.', + '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => 'Laukelio „{attribute}“ reikšmė privalo būti mažesnė arba lygi „{compareValueOrAttribute}“.', '{attribute} must be no greater than {max}.' => 'Laukelio „{attribute}“ reikšmė privalo būti ne didesnė nei {max}.', '{attribute} must be no less than {min}.' => 'Laukelio „{attribute}“ reikšmė privalo būti ne mažesnė nei {min}.', - '{attribute} must be repeated exactly.' => 'Laukelio „{attribute}“ reikšmė privalo būti pakartota tiksliai.', - '{attribute} must not be equal to "{compareValue}".' => 'Laukelio „{attribute}“ reikšmė negali būti lygi „{compareValue}“.', + '{attribute} must not be a subnet.' => '', + '{attribute} must not be an IPv4 address.' => '', + '{attribute} must not be an IPv6 address.' => '', + '{attribute} must not be equal to "{compareValueOrAttribute}".' => 'Laukelio „{attribute}“ reikšmė negali būti lygi „{compareValueOrAttribute}“.', '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => 'Laukelio „{attribute}“ reikšmę privalo sudaryti mažiausiai {min, number} {min, plural, one{ženklas} few{ženklai} other{ženklų}}.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => 'Laukelio „{attribute}“ reikšmę privalo sudaryti daugiausiai {max, number} {max, plural, one{ženklas} few{ženklai} other{ženklų}}.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => 'Laukelio „{attribute}“ reikšmę privalo sudaryti {length, number} {length, plural, one{ženklas} few{ženklai} other{ženklų}}.', + '{compareAttribute} is invalid.' => '', + '{delta, plural, =1{1 day} other{# days}}' => '', + '{delta, plural, =1{1 hour} other{# hours}}' => '', + '{delta, plural, =1{1 minute} other{# minutes}}' => '', + '{delta, plural, =1{1 month} other{# months}}' => '', + '{delta, plural, =1{1 second} other{# seconds}}' => '', + '{delta, plural, =1{1 year} other{# years}}' => '', '{delta, plural, =1{a day} other{# days}} ago' => 'prieš {delta, plural, =1{dieną} one{# dieną} few{# dienas} other{# dienų}}', '{delta, plural, =1{a minute} other{# minutes}} ago' => 'prieš {delta, plural, =1{minutę} one{# minutę} few{# minutes} other{# minučių}}', '{delta, plural, =1{a month} other{# months}} ago' => 'prieš {delta, plural, =1{mėnesį} one{# mėnesį} few{# mėnesius} other{# mėnesių}}', '{delta, plural, =1{a second} other{# seconds}} ago' => 'prieš {delta, plural, =1{sekundę} one{# sekundę} few{# sekundes} other{# sekundžių}}', '{delta, plural, =1{a year} other{# years}} ago' => 'prieš {delta, plural, =1{metus} one{# metus} few{# metus} other{# metų}}', '{delta, plural, =1{an hour} other{# hours}} ago' => 'prieš {delta, plural, =1{valandą} one{# valandą} few{# valandas} other{# valandų}}', + '{nFormatted} B' => '{nFormatted} B', + '{nFormatted} GB' => '{nFormatted} GB', + '{nFormatted} GiB' => '{nFormatted} GiB', + '{nFormatted} KiB' => '{nFormatted} KiB', + '{nFormatted} MB' => '{nFormatted} MB', + '{nFormatted} MiB' => '{nFormatted} MiB', + '{nFormatted} PB' => '{nFormatted} PB', + '{nFormatted} PiB' => '{nFormatted} PiB', + '{nFormatted} TB' => '{nFormatted} TB', + '{nFormatted} TiB' => '{nFormatted} TiB', + '{nFormatted} kB' => '{nFormatted} kB', + '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, one{baitas} few{baitai} other{baitų}}', + '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} gibi{n, plural, one{baitas} few{baitai} other{baitų}}', + '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} giga{n, plural, one{baitas} few{baitai} other{baitų}}', + '{nFormatted} {n, plural, =1{kibibyte} other{kibibytes}}' => '{nFormatted} kibi{n, plural, one{baitas} few{baitai} other{baitų}}', + '{nFormatted} {n, plural, =1{kilobyte} other{kilobytes}}' => '{nFormatted} kilo{n, plural, one{baitas} few{baitai} other{baitų}}', + '{nFormatted} {n, plural, =1{mebibyte} other{mebibytes}}' => '{nFormatted} mebi{n, plural, one{baitas} few{baitai} other{baitų}}', + '{nFormatted} {n, plural, =1{megabyte} other{megabytes}}' => '{nFormatted} mega{n, plural, one{baitas} few{baitai} other{baitų}}', + '{nFormatted} {n, plural, =1{pebibyte} other{pebibytes}}' => '{nFormatted} pebi{n, plural, one{baitas} few{baitai} other{baitų}}', + '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '{nFormatted} peta{n, plural, one{baitas} few{baitai} other{baitų}}', + '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '{nFormatted} tebi{n, plural, one{baitas} few{baitai} other{baitų}}', + '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '{nFormatted} tera{n, plural, one{baitas} few{baitai} other{baitų}}', ]; diff --git a/framework/messages/lv/yii.php b/framework/messages/lv/yii.php index e49ca559500..d1ad194b9d4 100644 --- a/framework/messages/lv/yii.php +++ b/framework/messages/lv/yii.php @@ -23,31 +23,14 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ - '{nFormatted} B' => '{nFormatted} B', - '{nFormatted} GB' => '{nFormatted} Gb', - '{nFormatted} GiB' => '{nFormatted} GiB', - '{nFormatted} kB' => '{nFormatted} kB', - '{nFormatted} KiB' => '{nFormatted} KiB', - '{nFormatted} MB' => '{nFormatted} MB', - '{nFormatted} MiB' => '{nFormatted} MiB', - '{nFormatted} PB' => '{nFormatted} PB', - '{nFormatted} PiB' => '{nFormatted} PiB', - '{nFormatted} TB' => '{nFormatted} TB', - '{nFormatted} TiB' => '{nFormatted} TiB', - '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, zero{baitu} one{baits} other{baiti}}', - '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} gibi{n, plural, zero{baitu} one{baits} other{baiti}}', - '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} giga{n, plural, zero{baitu} one{baits} other{baiti}}', - '{nFormatted} {n, plural, =1{kibibyte} other{kibibytes}}' => '{nFormatted} kibi{n, plural, zero{baitu} one{baits} other{baiti}}', - '{nFormatted} {n, plural, =1{kilobyte} other{kilobytes}}' => '{nFormatted} kilo{n, plural, zero{baitu} one{baits} other{baiti}}', - '{nFormatted} {n, plural, =1{mebibyte} other{mebibytes}}' => '{nFormatted} mebi{n, plural, zero{baitu} one{baits} other{baiti}}', - '{nFormatted} {n, plural, =1{megabyte} other{megabytes}}' => '{nFormatted} mega{n, plural, zero{baitu} one{baits} other{baiti}}', - '{nFormatted} {n, plural, =1{pebibyte} other{pebibytes}}' => '{nFormatted} pebi{n, plural, zero{baitu} one{baits} other{baiti}}', - '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '{nFormatted} peta{n, plural, zero{baitu} one{baits} other{baiti}}', - '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '{nFormatted} tebi{n, plural, zero{baitu} one{baits} other{baiti}}', - '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '{nFormatted} tera{n, plural, zero{baitu} one{baits} other{baiti}}', + ' and ' => ' un ', + '"{attribute}" does not support operator "{operator}".' => '"{attribute}" neatbalsta operātoru "{operator}".', '(not set)' => '(nav uzstādīts)', + 'Action not found.' => 'Darbība nav atrasta', + 'Aliases available: {aliases}' => 'Pieejamie pseidonīmi: {aliases}', 'An internal server error occurred.' => 'Notika servera iekšējā kļūda.', 'Are you sure you want to delete this item?' => 'Vai jūs esat pārliecināti, ka vēlaties dzēst šo vienumu?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '"{attribute}" nosacījumam jābūt vai nu vērtībai, vai derīgai operatora specifikācijai.', 'Delete' => 'Dzēst', 'Error' => 'Kļūda', 'File upload failed.' => 'Neizdevās augšupielādēt datni.', @@ -57,23 +40,22 @@ 'Missing required arguments: {params}' => 'Trūkst nepieciešamie argumenti: {params}', 'Missing required parameters: {params}' => 'Trūkst nepieciešamie parametri: {params}', 'No' => 'Nē', - '{delta, plural, =1{1 day} other{# days}}' => '{delta, plural, zero{# dienas} one{# diena} other{# dienas}}', - '{delta, plural, =1{1 hour} other{# hours}}' => '{delta, plural, zero{# stundas} one{# stunda} other{# stundas}}', - '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta, plural, zero{# minūtes} one{# minūte} other{# minūtes}}', - '{delta, plural, =1{1 month} other{# months}}' => '{delta, plural, zero{# mēneši} one{# mēnesis} other{# mēneši}}', - '{delta, plural, =1{1 second} other{# seconds}}' => '{delta, plural, zero{# sekundes} one{# sekunde} other{# sekundes}}', - '{delta, plural, =1{1 year} other{# years}}' => '{delta, plural, zero{# gadi} one{# gads} other{# gadi}}', 'No results found.' => 'Nekas netika atrasts.', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Ir atļauts augšupielādēt datnes tikai ar šādiem MIME-tipiem: {mimeTypes}.', 'Only files with these extensions are allowed: {extensions}.' => 'Ir atļauts augšupielādēt datnes tikai ar šādiem paplašinājumiem: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => 'Operātoru "{operator}" jāizmanto meklēšanas atribūtā', + 'Operator "{operator}" requires multiple operands.' => 'Operātoram "{operator}" nepieciešami vairāki operandi', + 'Options available: {options}' => 'Pieejamas opvijas: {options}', 'Page not found.' => 'Pieprasītā lapa netika atrasta.', 'Please fix the following errors:' => 'Nepieciešams izlabot šādas kļūdas:', 'Please upload a file.' => 'Lūdzu, augšupielādēt datni.', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Tiek rādīti ieraksti {begin, number}-{end, number} no {totalCount, number}.', + 'The combination {values} of {attributes} has already been taken.' => 'Kombinācija {values} priekš {attributes} ir jau aizņemta.', 'The file "{file}" is not an image.' => 'Saņemtā "{file}" datne nav attēls.', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'Saņemtās "{file}" datnes izmērs pārsniedz pieļaujamo ierobežojumu {formattedLimit} apmērā.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'Saņemtās "{file}" datnes izmērs ir pārāk maza, tai ir jābūt vismaz {formattedLimit} apmērā.', 'The format of {attribute} is invalid.' => '{attribute} vērtības formāts ir nepareizs.', + 'The format of {filter} is invalid.' => '{filter} formāts ir kļūdains', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Attēls "{file}" ir pārāk liels. Augstumam ir jābūt mazākam par {limit, number} {limit, plural, one{pikseli} other{pikseļiem}}.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Attēls "{file}" ir pārāk liels. Platumam ir jābūt mazākam par {limit, number} {limit, plural, one{pikseli} other{pikseļiem}}.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Attēls "{file}" ir pārāk mazs. Augstumam ir jābūt lielākam par {limit, number} {limit, plural, one{pikseli} other{pikseļiem}}.', @@ -82,67 +64,84 @@ 'The verification code is incorrect.' => 'Cilvēktesta kods bija nepareizs.', 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Kopā {count, number} {count, plural, zero{ierakstu} one{ieraksts} other{ieraksti}}.', 'Unable to verify your data submission.' => 'Neizdevās apstiprināt saņemtos datus.', + 'Unknown alias: -{name}' => 'Neatpazīts preidonīms {name}', + 'Unknown filter attribute "{attribute}"' => 'Neatpazīts filtra attribūts "{attribute}"', 'Unknown option: --{name}' => 'Nezināma iespēja: --{name}', 'Update' => 'Labot', 'View' => 'Apskatīt', 'Yes' => 'Jā', 'You are not allowed to perform this action.' => 'Jūs neesat autorizēts veikt šo darbību.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Jūs nevarat augšupielādēt vairāk par {limit, number} {limit, plural, one{failu} other{failiem}}.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => 'Jums jāaugšupielādē vismaz {limit, number} {limit, mulural, one {file} other {files}}.', 'in {delta, plural, =1{a day} other{# days}}' => 'pēc {delta, plural, =1{dienas} one{# dienas} other{# dienām}}', 'in {delta, plural, =1{a minute} other{# minutes}}' => 'pēc {delta, plural, =1{minūtes} one{# minūtes} other{# minūtēm}}', 'in {delta, plural, =1{a month} other{# months}}' => 'pēc {delta, plural, =1{mēneša} one{# mēneša} other{# mēnešiem}}', 'in {delta, plural, =1{a second} other{# seconds}}' => 'pēc {delta, plural, =1{sekundes} one{# sekundes} other{# sekundēm}}', 'in {delta, plural, =1{a year} other{# years}}' => 'pēc {delta, plural, =1{gada} one{# gada} other{# gadiem}}', 'in {delta, plural, =1{an hour} other{# hours}}' => 'pēc {delta, plural, =1{stundas} one{# stundas} other{# stundām}}', + 'just now' => 'tikko', 'the input value' => 'ievadītā vērtība', '{attribute} "{value}" has already been taken.' => '{attribute} "{value}" jau ir aizņemts.', '{attribute} cannot be blank.' => 'Ir jāaizpilda {attribute}.', + '{attribute} contains wrong subnet mask.' => '{attribute} satur kļūdainu apakštīklu.', '{attribute} is invalid.' => '{attribute} vērtība ir nepareiza.', '{attribute} is not a valid URL.' => '{attribute} vērtība nav pareiza URL formātā.', '{attribute} is not a valid email address.' => '{attribute} vērtība nav pareizas e-pasta adreses formātā.', + '{attribute} is not in the allowed range.' => '{attribute} nav atļautajā diapazonā.', '{attribute} must be "{requiredValue}".' => '{attribute} vērtībai ir jābūt vienādai ar "{requiredValue}".', '{attribute} must be a number.' => '{attribute} vērtībai ir jābūt skaitlim.', '{attribute} must be a string.' => '{attribute} vērtībai ir jābūt simbolu virknei.', + '{attribute} must be a valid IP address.' => '{attribute} jābūt derīgai IP adresei.', + '{attribute} must be an IP address with specified subnet.' => '{attribute} jābūt IP adresei ar norādīto apakštīklu.', '{attribute} must be an integer.' => '{attribute} vērtībai ir jābūt veselam skaitlim.', '{attribute} must be either "{true}" or "{false}".' => '{attribute} vērtībai ir jābūt "{true}" vai "{false}".', + '{attribute} must be equal to "{compareValueOrAttribute}".' => '{attribute} vērtībai ir jābūt vienādai ar "{compareValueOrAttribute}".', '{attribute} must be greater than "{compareValueOrAttribute}".' => '{attribute} vērtībai ir jābūt lielākai par "{compareValueOrAttribute}" vērtību.', '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '{attribute} vērtībai ir jābūt lielākai vai vienādai ar "{compareValueOrAttribute}" vērtību.', '{attribute} must be less than "{compareValueOrAttribute}".' => '{attribute} vērtībai ir jābūt mazākai par "{compareValueOrAttribute}" vērtību.', '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '{attribute} vērtībai ir jābūt mazākai vai vienādai ar "{compareValueOrAttribute}" vērtību.', '{attribute} must be no greater than {max}.' => '{attribute} vērtībai ir jābūt ne lielākai par {max}.', '{attribute} must be no less than {min}.' => '{attribute} vērtībai ir jābūt ne mazākai par {min}.', - '{attribute} must be equal to "{compareValueOrAttribute}".' => '{attribute} vērtībai ir jābūt vienādai ar "{compareValueOrAttribute}".', + '{attribute} must not be a subnet.' => '{attribute} nedrīkst būt apakštīkls.', + '{attribute} must not be an IPv4 address.' => '{attribute} nedrīkst būt IPv4 adrese.', + '{attribute} must not be an IPv6 address.' => '{attribute} nedrīkst būt IPv6 adrese.', '{attribute} must not be equal to "{compareValueOrAttribute}".' => '{attribute} vērtība nedrīkst būt vienāda ar "{compareValueOrAttribute}" vērtību.', '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} vērtībai ir jābūt ne īsākai par {min, number} {min, plural, one{simbolu} other{simboliem}}.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} vērtībai ir jābūt ne garākai par {max, number} {max, plural, one{simbolu} other{simboliem}}.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} vērtībai ir jāsastāv no {length, number} {length, plural, one{simbola} other{simboliem}}.', + '{compareAttribute} is invalid.' => '', + '{delta, plural, =1{1 day} other{# days}}' => '{delta, plural, zero{# dienas} one{# diena} other{# dienas}}', + '{delta, plural, =1{1 hour} other{# hours}}' => '{delta, plural, zero{# stundas} one{# stunda} other{# stundas}}', + '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta, plural, zero{# minūtes} one{# minūte} other{# minūtes}}', + '{delta, plural, =1{1 month} other{# months}}' => '{delta, plural, zero{# mēneši} one{# mēnesis} other{# mēneši}}', + '{delta, plural, =1{1 second} other{# seconds}}' => '{delta, plural, zero{# sekundes} one{# sekunde} other{# sekundes}}', + '{delta, plural, =1{1 year} other{# years}}' => '{delta, plural, zero{# gadi} one{# gads} other{# gadi}}', '{delta, plural, =1{a day} other{# days}} ago' => 'pirms {delta, plural, =1{dienas} one{# dienas} other{# dienām}}', '{delta, plural, =1{a minute} other{# minutes}} ago' => 'pirms {delta, plural, =1{minūtes} one{# minūtes} other{# minūtēm}}', '{delta, plural, =1{a month} other{# months}} ago' => 'pirms {delta, plural, =1{mēneša} one{# mēneša} other{# mēnešiem}}', '{delta, plural, =1{a second} other{# seconds}} ago' => 'pirms {delta, plural, =1{sekundes} one{# sekundes} other{# sekundēm}}', '{delta, plural, =1{a year} other{# years}} ago' => 'pirms {delta, plural, =1{gada} one{# gada} other{# gadiem}}', '{delta, plural, =1{an hour} other{# hours}} ago' => 'pirms {delta, plural, =1{stundas} one{# stundas} other{# stundām}}', - ' and ' => ' un ', - '"{attribute}" does not support operator "{operator}".' => '"{attribute}" neatbalsta operātoru "{operator}".', - 'Action not found.' => 'Darbība nav atrasta', - 'Aliases available: {aliases}' => 'Pieejamie pseidonīmi: {aliases}', - 'Condition for "{attribute}" should be either a value or valid operator specification.' => '"{attribute}" nosacījumam jābūt vai nu vērtībai, vai derīgai operatora specifikācijai.', - 'Operator "{operator}" must be used with a search attribute.' => 'Operātoru "{operator}" jāizmanto meklēšanas atribūtā', - 'Operator "{operator}" requires multiple operands.' => 'Operātoram "{operator}" nepieciešami vairāki operandi', - 'Options available: {options}' => 'Pieejamas opvijas: {options}', - 'Powered by {yii}' => 'Darbojas ar {yii}', - 'The combination {values} of {attributes} has already been taken.' => 'Kombinācija {values} priekš {attributes} ir jau aizņemta.', - 'The format of {filter} is invalid.' => '{filter} formāts ir kļūdains', - 'Unknown alias: -{name}' => 'Neatpazīts preidonīms {name}', - 'Unknown filter attribute "{attribute}"' => 'Neatpazīts filtra attribūts "{attribute}"', - 'Yii Framework' => 'Yii ietvars', - 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => 'Jums jāaugšupielādē vismaz {limit, number} {limit, mulural, one {file} other {files}}.', - 'just now' => 'tikko', - '{attribute} contains wrong subnet mask.' => '{attribute} satur kļūdainu apakštīklu.', - '{attribute} is not in the allowed range.' => '{attribute} nav atļautajā diapazonā.', - '{attribute} must be a valid IP address.' => '{attribute} jābūt derīgai IP adresei.', - '{attribute} must be an IP address with specified subnet.' => '{attribute} jābūt IP adresei ar norādīto apakštīklu.', - '{attribute} must not be a subnet.' => '{attribute} nedrīkst būt apakštīkls.', - '{attribute} must not be an IPv4 address.' => '{attribute} nedrīkst būt IPv4 adrese.', - '{attribute} must not be an IPv6 address.' => '{attribute} nedrīkst būt IPv6 adrese.', + '{nFormatted} B' => '{nFormatted} B', + '{nFormatted} GB' => '{nFormatted} Gb', + '{nFormatted} GiB' => '{nFormatted} GiB', + '{nFormatted} KiB' => '{nFormatted} KiB', + '{nFormatted} MB' => '{nFormatted} MB', + '{nFormatted} MiB' => '{nFormatted} MiB', + '{nFormatted} PB' => '{nFormatted} PB', + '{nFormatted} PiB' => '{nFormatted} PiB', + '{nFormatted} TB' => '{nFormatted} TB', + '{nFormatted} TiB' => '{nFormatted} TiB', + '{nFormatted} kB' => '{nFormatted} kB', + '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, zero{baitu} one{baits} other{baiti}}', + '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} gibi{n, plural, zero{baitu} one{baits} other{baiti}}', + '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} giga{n, plural, zero{baitu} one{baits} other{baiti}}', + '{nFormatted} {n, plural, =1{kibibyte} other{kibibytes}}' => '{nFormatted} kibi{n, plural, zero{baitu} one{baits} other{baiti}}', + '{nFormatted} {n, plural, =1{kilobyte} other{kilobytes}}' => '{nFormatted} kilo{n, plural, zero{baitu} one{baits} other{baiti}}', + '{nFormatted} {n, plural, =1{mebibyte} other{mebibytes}}' => '{nFormatted} mebi{n, plural, zero{baitu} one{baits} other{baiti}}', + '{nFormatted} {n, plural, =1{megabyte} other{megabytes}}' => '{nFormatted} mega{n, plural, zero{baitu} one{baits} other{baiti}}', + '{nFormatted} {n, plural, =1{pebibyte} other{pebibytes}}' => '{nFormatted} pebi{n, plural, zero{baitu} one{baits} other{baiti}}', + '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '{nFormatted} peta{n, plural, zero{baitu} one{baits} other{baiti}}', + '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '{nFormatted} tebi{n, plural, zero{baitu} one{baits} other{baiti}}', + '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '{nFormatted} tera{n, plural, zero{baitu} one{baits} other{baiti}}', ]; diff --git a/framework/messages/ms/yii.php b/framework/messages/ms/yii.php index 72212cbb3ed..3850dcaa6fe 100644 --- a/framework/messages/ms/yii.php +++ b/framework/messages/ms/yii.php @@ -23,9 +23,14 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + ' and ' => '', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(tidak ditetapkan)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Ralat dalaman pelayan web telah berlaku', 'Are you sure you want to delete this item?' => 'Adakah anda pasti untuk menghapuskan item ini?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => 'Padam', 'Error' => 'Ralat', 'File upload failed.' => 'Gagal memuat naik fail', @@ -38,14 +43,19 @@ 'No results found.' => 'Tiada keputusan dijumpai', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Hanya fail yang berjenis MIME dibenarkan: {mimeTypes}.', 'Only files with these extensions are allowed: {extensions}.' => 'Hanya fail yang mempunyai sambungan berikut dibenarkan: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => 'Halaman tidak dijumpai.', 'Please fix the following errors:' => 'Sila betulkan ralat berikut:', 'Please upload a file.' => 'Sila muat naik fail', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Memaparkan {begin, number}-{end, number} daripada {totalCount, number} {totalCount, plural, one{item} other{items}}.', + 'The combination {values} of {attributes} has already been taken.' => '', 'The file "{file}" is not an image.' => 'Fail ini "{file}" bukan berjenis gambar.', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'Fail ini "{file}" terlalu besar. Saiz tidak boleh lebih besar daripada {formattedLimit}.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'Fail ini "{file}" terlalu kecil. Saiznya tidak boleh lebih kecil daripada {formattedLimit}.', 'The format of {attribute} is invalid.' => 'Format untuk atribut ini {attribute} tidak sah.', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Gambar "{file}" terlalu panjang. Panjang gambar tidak boleh lebih besar daripada {limit, number} {limit, plural, one{pixel} other{pixels}}.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Gambar "{file}" terlalu lebar. Gambar tidak boleh lebih lebar daripada {limit, number} {limit, plural, one{pixel} other{pixels}}.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Gambar "{file}" terlalu singkat. Panjang tidak boleh lebih singkat daripada {limit, number} {limit, plural, one{pixel} other{pixels}}.', @@ -54,12 +64,15 @@ 'The verification code is incorrect.' => 'Kod penyesah tidak tepat.', 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Jumlah {count, number} {count, plural, one{item} other{items}}.', 'Unable to verify your data submission.' => 'Tidak bejaya mengesahkan data yang dihantar.', + 'Unknown alias: -{name}' => '', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'Pilihan lain: --{name}', 'Update' => 'Kemaskini', 'View' => 'Paparan', 'Yes' => 'Ya', 'You are not allowed to perform this action.' => 'Anda tidak dibenarkan untuk mengunakan fungsi ini.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Anda boleh memuat naik tidak lebih daripada {limit, number} {limit, plural, one{file} other{files}}.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', 'in {delta, plural, =1{a day} other{# days}}' => 'dalam {delta, plural, =1{1 hari} other{# hari}}', 'in {delta, plural, =1{a minute} other{# minutes}}' => 'dalam {delta, plural, =1{1 minit} other{# minit}}', 'in {delta, plural, =1{a month} other{# months}}' => 'dalam {delta, plural, =1{1 bulan} other{# bulan}}', @@ -70,25 +83,39 @@ 'the input value' => 'nilai input', '{attribute} "{value}" has already been taken.' => '{attribute} "{value}" telah digunakan.', '{attribute} cannot be blank.' => '{attribute} tidak boleh dibiarkan kosong.', + '{attribute} contains wrong subnet mask.' => '', '{attribute} is invalid.' => '{attribute} tidak sah.', '{attribute} is not a valid URL.' => '{attribute} alamat URL yang tidak sah.', '{attribute} is not a valid email address.' => '{attribute} adalah alamat email yang tidak sah.', + '{attribute} is not in the allowed range.' => '', '{attribute} must be "{requiredValue}".' => '{attribute} mestilah "{requiredValue}".', '{attribute} must be a number.' => '{attribute} mestilah nombor.', '{attribute} must be a string.' => '{attribute} mestilah perkataan.', + '{attribute} must be a valid IP address.' => '', + '{attribute} must be an IP address with specified subnet.' => '', '{attribute} must be an integer.' => '{attribute} mestilah nombor tanpa titik perpuluhan.', '{attribute} must be either "{true}" or "{false}".' => '{attribute} mestilah "{true}" atau "{false}".', - '{attribute} must be greater than "{compareValue}".' => '{attribute} mestilah lebih besar daripada "{compareValue}".', - '{attribute} must be greater than or equal to "{compareValue}".' => '{attribute} mestilah lebih besar atau sama dengan "{compareValue}".', - '{attribute} must be less than "{compareValue}".' => '{attribute} mestilah kurang daripada "{compareValue}".', - '{attribute} must be less than or equal to "{compareValue}".' => '{attribute} mestilah kurang daripada atau sama dengan "{compareValue}".', + '{attribute} must be equal to "{compareValueOrAttribute}".' => '', + '{attribute} must be greater than "{compareValueOrAttribute}".' => '{attribute} mestilah lebih besar daripada "{compareValueOrAttribute}".', + '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '{attribute} mestilah lebih besar atau sama dengan "{compareValueOrAttribute}".', + '{attribute} must be less than "{compareValueOrAttribute}".' => '{attribute} mestilah kurang daripada "{compareValueOrAttribute}".', + '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '{attribute} mestilah kurang daripada atau sama dengan "{compareValueOrAttribute}".', '{attribute} must be no greater than {max}.' => '{attribute} tidak boleh lebih besar daripada {max}.', '{attribute} must be no less than {min}.' => '{attribute} tidak boleh kurang daripada {min}.', - '{attribute} must be repeated exactly.' => '{attribute} mestilah diulang dengan tepat.', - '{attribute} must not be equal to "{compareValue}".' => '{attribute} mestilah tidak sama dengan "{compareValue}".', + '{attribute} must not be a subnet.' => '', + '{attribute} must not be an IPv4 address.' => '', + '{attribute} must not be an IPv6 address.' => '', + '{attribute} must not be equal to "{compareValueOrAttribute}".' => '{attribute} mestilah tidak sama dengan "{compareValueOrAttribute}".', '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} mesti mengandungi sekurang-kurangnya {min, number} {min, plural, one{character} other{characters}}.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} mesti mengangungi paling banyak {max, number} {max, plural, one{character} other{characters}}.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} mesti mengandungi {length, number} {length, plural, one{character} other{characters}}.', + '{compareAttribute} is invalid.' => '', + '{delta, plural, =1{1 day} other{# days}}' => '', + '{delta, plural, =1{1 hour} other{# hours}}' => '', + '{delta, plural, =1{1 minute} other{# minutes}}' => '', + '{delta, plural, =1{1 month} other{# months}}' => '', + '{delta, plural, =1{1 second} other{# seconds}}' => '', + '{delta, plural, =1{1 year} other{# years}}' => '', '{delta, plural, =1{a day} other{# days}} ago' => '{delta, plural, =1{1 hari} other{# hari}} lalu', '{delta, plural, =1{a minute} other{# minutes}} ago' => '{delta, plural, =1{1 minit} other{# minit}} lalu', '{delta, plural, =1{a month} other{# months}} ago' => '{delta, plural, =1{1 bulan} other{# bulan}} lalu', @@ -98,7 +125,6 @@ '{nFormatted} B' => '', '{nFormatted} GB' => '', '{nFormatted} GiB' => '', - '{nFormatted} kB' => '', '{nFormatted} KiB' => '', '{nFormatted} MB' => '', '{nFormatted} MiB' => '', @@ -106,6 +132,7 @@ '{nFormatted} PiB' => '', '{nFormatted} TB' => '', '{nFormatted} TiB' => '', + '{nFormatted} kB' => '', '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '', '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '', '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '', diff --git a/framework/messages/nb-NO/yii.php b/framework/messages/nb-NO/yii.php index 9f9870c5e0a..7aebeffa60f 100644 --- a/framework/messages/nb-NO/yii.php +++ b/framework/messages/nb-NO/yii.php @@ -23,9 +23,14 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + ' and ' => '', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(ikke angitt)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'En intern serverfeil oppstod.', 'Are you sure you want to delete this item?' => 'Er du sikker på at du vil slette dette elementet?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => 'Slett', 'Error' => 'Feil', 'File upload failed.' => 'Filopplasting feilet.', @@ -38,14 +43,19 @@ 'No results found.' => 'Ingen resultater funnet.', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Bare filer med disse MIME-typene er tillatt: {mimeTypes}.', 'Only files with these extensions are allowed: {extensions}.' => 'Bare filer med disse filendelsene er tillatt: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => 'Siden finnes ikke.', 'Please fix the following errors:' => 'Vennligs fiks følgende feil:', 'Please upload a file.' => 'Vennligs last opp en fil.', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Viser {begin, number}-{end, number} av {totalCount, number} {totalCount, plural, one{element} other{elementer}}.', + 'The combination {values} of {attributes} has already been taken.' => '', 'The file "{file}" is not an image.' => 'Filen "{file}" er ikke et bilde.', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'Filen "{file}" er for stor. Størrelsen kan ikke overskride {formattedLimit}.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'Filen "{file}" er for liten. Størrelsen kan ikke være mindre enn {formattedLimit}.', 'The format of {attribute} is invalid.' => 'Formatet til {attribute} er ugyldig.', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Bildet "{file}" er for stort. Høyden kan ikke overskride {limit, number} {limit, plural, one{piksel} other{piksler}}.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Bildet "{file}" er for stort. Bredden kan ikke overskride {limit, number} {limit, plural, one{piksel} other{piksler}}.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Bildet "{file}" er for lite. Høyden kan ikke være mindre enn {limit, number} {limit, plural, one{piksel} other{piksler}}.', @@ -54,12 +64,15 @@ 'The verification code is incorrect.' => 'Verifiseringskoden er feil.', 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Totalt {count, number} {count, plural, one{element} other{elementer}}.', 'Unable to verify your data submission.' => 'Kunne ikke verifisere innsendt data.', + 'Unknown alias: -{name}' => '', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'Ukjent alternativ: --{name}', 'Update' => 'Oppdater', 'View' => 'Vis', 'Yes' => 'Ja', 'You are not allowed to perform this action.' => 'Du har ikke tilatelse til å gjennomføre denne handlingen.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Du kan laste opp maks {limit, number} {limit, plural, one{fil} other{filer}}.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', 'in {delta, plural, =1{a day} other{# days}}' => 'om {delta, plural, =1{en dag} other{# dager}}', 'in {delta, plural, =1{a minute} other{# minutes}}' => 'om {delta, plural, =1{ett minutt} other{# minutter}}', 'in {delta, plural, =1{a month} other{# months}}' => 'om {delta, plural, =1{en måned} other{# måneder}}', @@ -70,25 +83,39 @@ 'the input value' => 'inndataverdien', '{attribute} "{value}" has already been taken.' => '{attribute} "{value}" er allerede tatt i bruk.', '{attribute} cannot be blank.' => '{attribute} kan ikke være tomt.', + '{attribute} contains wrong subnet mask.' => '', '{attribute} is invalid.' => '{attribute} er ugyldig.', '{attribute} is not a valid URL.' => '{attribute} er ikke en gyldig URL.', '{attribute} is not a valid email address.' => '{attribute} er ikke en gyldig e-postadresse.', + '{attribute} is not in the allowed range.' => '', '{attribute} must be "{requiredValue}".' => '{attribute} må være "{requiredValue}".', '{attribute} must be a number.' => '{attribute} må være et nummer.', '{attribute} must be a string.' => '{attribute} må være en tekststreng.', + '{attribute} must be a valid IP address.' => '', + '{attribute} must be an IP address with specified subnet.' => '', '{attribute} must be an integer.' => '{attribute} må være et heltall.', '{attribute} must be either "{true}" or "{false}".' => '{attribute} må være enten "{true}" eller "{false}".', - '{attribute} must be greater than "{compareValue}".' => '{attribute} må være større enn "{compareValue}".', - '{attribute} must be greater than or equal to "{compareValue}".' => '{attribute} må være større enn eller lik "{compareValue}".', - '{attribute} must be less than "{compareValue}".' => '{attribute} må være mindre enn "{compareValue}".', - '{attribute} must be less than or equal to "{compareValue}".' => '{attribute} må være mindre enn eller lik "{compareValue}".', + '{attribute} must be equal to "{compareValueOrAttribute}".' => '', + '{attribute} must be greater than "{compareValueOrAttribute}".' => '{attribute} må være større enn "{compareValueOrAttribute}".', + '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '{attribute} må være større enn eller lik "{compareValueOrAttribute}".', + '{attribute} must be less than "{compareValueOrAttribute}".' => '{attribute} må være mindre enn "{compareValueOrAttribute}".', + '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '{attribute} må være mindre enn eller lik "{compareValueOrAttribute}".', '{attribute} must be no greater than {max}.' => '{attribute} kan ikke være større enn {max}.', '{attribute} must be no less than {min}.' => '{attribute} kan ikke være mindre enn {min}.', - '{attribute} must be repeated exactly.' => '{attribute} må gjentas nøyaktig.', - '{attribute} must not be equal to "{compareValue}".' => '{attribute} kan ikke være lik "{compareValue}".', + '{attribute} must not be a subnet.' => '', + '{attribute} must not be an IPv4 address.' => '', + '{attribute} must not be an IPv6 address.' => '', + '{attribute} must not be equal to "{compareValueOrAttribute}".' => '{attribute} kan ikke være lik "{compareValueOrAttribute}".', '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} må inneholde minst {min, number} {min, plural, one{tegn} other{tegn}}.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} kan inneholde maks {max, number} {max, plural, one{tegn} other{tegn}}.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} må inneholde {length, number} {length, plural, one{tegn} other{tegn}}.', + '{compareAttribute} is invalid.' => '', + '{delta, plural, =1{1 day} other{# days}}' => '', + '{delta, plural, =1{1 hour} other{# hours}}' => '', + '{delta, plural, =1{1 minute} other{# minutes}}' => '', + '{delta, plural, =1{1 month} other{# months}}' => '', + '{delta, plural, =1{1 second} other{# seconds}}' => '', + '{delta, plural, =1{1 year} other{# years}}' => '', '{delta, plural, =1{a day} other{# days}} ago' => '{delta, plural, =1{en dag} other{# dager}} siden', '{delta, plural, =1{a minute} other{# minutes}} ago' => '{delta, plural, =1{ett minutt} other{# minutter}} siden', '{delta, plural, =1{a month} other{# months}} ago' => '{delta, plural, =1{en måned} other{# måneder}} siden', @@ -98,7 +125,6 @@ '{nFormatted} B' => '{nFormatted} B', '{nFormatted} GB' => '{nFormatted} GB', '{nFormatted} GiB' => '{nFormatted} GiB', - '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} KiB' => '{nFormatted} KiB', '{nFormatted} MB' => '{nFormatted} MB', '{nFormatted} MiB' => '{nFormatted} MiB', @@ -106,15 +132,16 @@ '{nFormatted} PiB' => '{nFormatted} PiB', '{nFormatted} TB' => '{nFormatted} TB', '{nFormatted} TiB' => '{nFormatted} TiB', + '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, =1{byte} other{byte}}', - '{nFormatted} {n, plural, =1{gibibyte} other{gibibyte}}' => '{nFormatted} {n, plural, =1{gibibyte} other{gibibyte}}', - '{nFormatted} {n, plural, =1{gigabyte} other{gigabyte}}' => '{nFormatted} {n, plural, =1{gigabyte} other{gigabyte}}', - '{nFormatted} {n, plural, =1{kibibyte} other{kibibyte}}' => '{nFormatted} {n, plural, =1{kibibyte} other{kibibyte}}', - '{nFormatted} {n, plural, =1{kilobyte} other{kilobyte}}' => '{nFormatted} {n, plural, =1{kilobyte} other{kilobyte}}', - '{nFormatted} {n, plural, =1{mebibyte} other{mebibyte}}' => '{nFormatted} {n, plural, =1{mebibyte} other{mebibyte}}', - '{nFormatted} {n, plural, =1{megabyte} other{megabyte}}' => '{nFormatted} {n, plural, =1{megabyte} other{megabyte}}', - '{nFormatted} {n, plural, =1{pebibyte} other{pebibyte}}' => '{nFormatted} {n, plural, =1{pebibyte} other{pebibyte}}', - '{nFormatted} {n, plural, =1{petabyte} other{petabyte}}' => '{nFormatted} {n, plural, =1{petabyte} other{petabyte}}', - '{nFormatted} {n, plural, =1{tebibyte} other{tebibyte}}' => '{nFormatted} {n, plural, =1{tebibyte} other{tebibyte}}', - '{nFormatted} {n, plural, =1{terabyte} other{terabyte}}' => '{nFormatted} {n, plural, =1{terabyte} other{terabyte}}', + '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '', + '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '', + '{nFormatted} {n, plural, =1{kibibyte} other{kibibytes}}' => '', + '{nFormatted} {n, plural, =1{kilobyte} other{kilobytes}}' => '', + '{nFormatted} {n, plural, =1{mebibyte} other{mebibytes}}' => '', + '{nFormatted} {n, plural, =1{megabyte} other{megabytes}}' => '', + '{nFormatted} {n, plural, =1{pebibyte} other{pebibytes}}' => '', + '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '', + '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '', + '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '', ]; diff --git a/framework/messages/nl/yii.php b/framework/messages/nl/yii.php index 24261d0520b..a647a96df31 100644 --- a/framework/messages/nl/yii.php +++ b/framework/messages/nl/yii.php @@ -23,9 +23,14 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + ' and ' => '', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(niet ingesteld)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Er is een interne serverfout opgetreden.', 'Are you sure you want to delete this item?' => 'Weet je zeker dat je dit item wilt verwijderen?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => 'Verwijderen', 'Error' => 'Fout', 'File upload failed.' => 'Bestand uploaden mislukt.', @@ -38,14 +43,19 @@ 'No results found.' => 'Geen resultaten gevonden', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Alleen bestanden met de volgende MIME types zijn toegestaan: {mimeTypes}', 'Only files with these extensions are allowed: {extensions}.' => 'Alleen bestanden met de volgende extensies zijn toegestaan: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => 'Pagina niet gevonden.', 'Please fix the following errors:' => 'Corrigeer de volgende fouten:', 'Please upload a file.' => 'Upload een bestand.', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Resultaat {begin, number}-{end, number} van {totalCount, number} {totalCount, plural, one{item} other{items}}.', + 'The combination {values} of {attributes} has already been taken.' => '', 'The file "{file}" is not an image.' => 'Het bestand "{file}" is geen afbeelding.', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'Het bestand "{file}" is te groot. Het kan niet groter zijn dan {formattedLimit}.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'Het bestand "{file}" is te klein. Het kan niet kleiner zijn dan {formattedLimit}.', 'The format of {attribute} is invalid.' => 'Het formaat van {attribute} is ongeldig', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'De afbeelding "{file}" is te groot. Het mag maximaal {limit, number} {limit, plural, one{pixel} other{pixels}} hoog zijn.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'De afbeelding "{file}" is te groot. Het mag maximaal {limit, number} {limit, plural, one{pixel} other{pixels}} breed zijn.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'De afbeelding "{file}" is te klein. Het moet minimaal {limit, number} {limit, plural, one{pixel} other{pixels}} hoog zijn.', @@ -54,12 +64,15 @@ 'The verification code is incorrect.' => 'De verificatiecode is onjuist.', 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Totaal {count, number} {count, plural, one{item} other{items}}.', 'Unable to verify your data submission.' => 'Het is niet mogelijk uw verstrekte gegevens te verifiëren.', + 'Unknown alias: -{name}' => '', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'Onbekende optie: --{name}', 'Update' => 'Bewerk', 'View' => 'Bekijk', 'Yes' => 'Ja', 'You are not allowed to perform this action.' => 'U bent niet gemachtigd om deze actie uit te voeren.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'U kunt maximaal {limit, number} {limit, plural, one{ander bestand} other{andere bestander}} uploaden.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', 'in {delta, plural, =1{a day} other{# days}}' => 'binnen {delta, plural, =1{een dag} other{# dagen}}', 'in {delta, plural, =1{a minute} other{# minutes}}' => 'binnen {delta, plural, =1{een minuut} other{# minuten}}', 'in {delta, plural, =1{a month} other{# months}}' => 'binnen {delta, plural, =1{een maand} other{# maanden}}', @@ -70,31 +83,39 @@ 'the input value' => 'de invoerwaarde', '{attribute} "{value}" has already been taken.' => '{attribute} "{value}" is reeds in gebruik.', '{attribute} cannot be blank.' => '{attribute} mag niet leeg zijn.', + '{attribute} contains wrong subnet mask.' => '', '{attribute} is invalid.' => '{attribute} is ongeldig.', '{attribute} is not a valid URL.' => '{attribute} is geen geldige URL.', '{attribute} is not a valid email address.' => '{attribute} is geen geldig emailadres.', + '{attribute} is not in the allowed range.' => '', '{attribute} must be "{requiredValue}".' => '{attribute} moet "{requiredValue}" zijn.', '{attribute} must be a number.' => '{attribute} moet een getal zijn.', '{attribute} must be a string.' => '{attribute} moet een string zijn.', + '{attribute} must be a valid IP address.' => '', + '{attribute} must be an IP address with specified subnet.' => '', '{attribute} must be an integer.' => '{attribute} moet een geheel getal zijn.', '{attribute} must be either "{true}" or "{false}".' => '{attribute} moet "{true}" of "{false}" zijn.', - '{attribute} must be greater than "{compareValue}".' => '{attribute} moet groter zijn dan "{compareValue}".', - '{attribute} must be greater than or equal to "{compareValue}".' => '{attribute} moet groter dan of gelijk aan "{compareValue}" zijn.', - '{attribute} must be less than "{compareValue}".' => '{attribute} moet minder zijn dan "{compareValue}".', - '{attribute} must be less than or equal to "{compareValue}".' => '{attribute} moet minder dan of gelijk aan "{compareValue}" zijn.', + '{attribute} must be equal to "{compareValueOrAttribute}".' => '', + '{attribute} must be greater than "{compareValueOrAttribute}".' => '{attribute} moet groter zijn dan "{compareValueOrAttribute}".', + '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '{attribute} moet groter dan of gelijk aan "{compareValueOrAttribute}" zijn.', + '{attribute} must be less than "{compareValueOrAttribute}".' => '{attribute} moet minder zijn dan "{compareValueOrAttribute}".', + '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '{attribute} moet minder dan of gelijk aan "{compareValueOrAttribute}" zijn.', '{attribute} must be no greater than {max}.' => '{attribute} mag niet groter zijn dan {max}.', '{attribute} must be no less than {min}.' => '{attribute} mag niet kleiner zijn dan {min}.', - '{attribute} must be repeated exactly.' => '{attribute} moet exact herhaald worden.', - '{attribute} must not be equal to "{compareValue}".' => '{attribute} mag niet gelijk zijn aan "{compareValue}".', + '{attribute} must not be a subnet.' => '', + '{attribute} must not be an IPv4 address.' => '', + '{attribute} must not be an IPv6 address.' => '', + '{attribute} must not be equal to "{compareValueOrAttribute}".' => '{attribute} mag niet gelijk zijn aan "{compareValueOrAttribute}".', '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} moet minstens {min, number} {min, plural, one{karakter} other{karakters}} bevatten.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} mag maximaal {max, number} {max, plural, one{karakter} other{karakters}} bevatten.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} moet precies {min, number} {min, plural, one{karakter} other{karakters}} bevatten.', + '{compareAttribute} is invalid.' => '', '{delta, plural, =1{1 day} other{# days}}' => '{delta, plural, one{# dag} other{# dagen}}', + '{delta, plural, =1{1 hour} other{# hours}}' => '{delta, plural, one{# uur} other{# uur}}', '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta, plural, one{# minuut} other{# minuten}}', '{delta, plural, =1{1 month} other{# months}}' => '{delta, plural, one{# maand} other{# maanden}}', '{delta, plural, =1{1 second} other{# seconds}}' => '{delta, plural, one{# seconde} other{# seconden}}', '{delta, plural, =1{1 year} other{# years}}' => '{delta, plural, one{# jaar} other{# jaar}}', - '{delta, plural, =1{1 hour} other{# hours}}' => '{delta, plural, one{# uur} other{# uur}}', '{delta, plural, =1{a day} other{# days}} ago' => '{delta, plural, =1{een dag} other{# dagen}} geleden', '{delta, plural, =1{a minute} other{# minutes}} ago' => '{delta, plural, =1{een minuut} other{# minuten}} geleden', '{delta, plural, =1{a month} other{# months}} ago' => '{delta, plural, =1{een maand} other{# maanden}} geleden', @@ -104,7 +125,6 @@ '{nFormatted} B' => '{nFormatted} B', '{nFormatted} GB' => '{nFormatted} GB', '{nFormatted} GiB' => '{nFormatted} GiB', - '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} KiB' => '{nFormatted} KiB', '{nFormatted} MB' => '{nFormatted} MB', '{nFormatted} MiB' => '{nFormatted} MiB', @@ -112,6 +132,7 @@ '{nFormatted} PiB' => '{nFormatted} PiB', '{nFormatted} TB' => '{nFormatted} TB', '{nFormatted} TiB' => '{nFormatted} TiB', + '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, =1{byte} other{bytes}}', '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}', '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}', diff --git a/framework/messages/pl/yii.php b/framework/messages/pl/yii.php index 35dae0b7611..53d609ba0b5 100644 --- a/framework/messages/pl/yii.php +++ b/framework/messages/pl/yii.php @@ -26,6 +26,8 @@ ' and ' => ' i ', '"{attribute}" does not support operator "{operator}".' => 'Operator "{operator}" nie jest dozwolony dla "{attribute}".', '(not set)' => '(brak wartości)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Wystąpił wewnętrzny błąd serwera.', 'Are you sure you want to delete this item?' => 'Czy na pewno usunąć ten element?', 'Condition for "{attribute}" should be either a value or valid operator specification.' => 'Warunek dla "{attribute}" powinien mieć określoną wartość lub być operatorem o prawidłowej konstrukcji.', @@ -33,27 +35,20 @@ 'Error' => 'Błąd', 'File upload failed.' => 'Wgrywanie pliku nie powiodło się.', 'Home' => 'Strona domowa', - 'in {delta, plural, =1{a day} other{# days}}' => 'za {delta, plural, =1{jeden dzień} other{# dni}}', - 'in {delta, plural, =1{a minute} other{# minutes}}' => 'za {delta, plural, =1{minutę} few{# minuty} many{# minut} other{# minuty}}', - 'in {delta, plural, =1{a month} other{# months}}' => 'za {delta, plural, =1{miesiąc} few{# miesiące} many{# miesięcy} other{# miesiąca}}', - 'in {delta, plural, =1{a second} other{# seconds}}' => 'za {delta, plural, =1{sekundę} few{# sekundy} many{# sekund} other{# sekundy}}', - 'in {delta, plural, =1{a year} other{# years}}' => 'za {delta, plural, =1{rok} few{# lata} many{# lat} other{# roku}}', - 'in {delta, plural, =1{an hour} other{# hours}}' => 'za {delta, plural, =1{godzinę} few{# godziny} many{# godzin} other{# godziny}}', 'Invalid data received for parameter "{param}".' => 'Otrzymano nieprawidłowe dane dla parametru "{param}".', - 'just now' => 'przed chwilą', 'Login Required' => 'Wymagane zalogowanie się', 'Missing required arguments: {params}' => 'Brak wymaganych argumentów: {params}', 'Missing required parameters: {params}' => 'Brak wymaganych parametrów: {params}', - 'No results found.' => 'Brak wyników.', 'No' => 'Nie', - 'Only files with these extensions are allowed: {extensions}.' => 'Dozwolone są tylko pliki z następującymi rozszerzeniami: {extensions}.', + 'No results found.' => 'Brak wyników.', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Dozwolone są tylko pliki z następującymi typami MIME: {mimeTypes}.', - 'Operator "{operator}" must be used with a search attribute.' => 'Operator "{operator}" musi być użyty razem z szukanym atrybutem.', + 'Only files with these extensions are allowed: {extensions}.' => 'Dozwolone są tylko pliki z następującymi rozszerzeniami: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => 'Operator "{operator}" musi być użyty razem z atrybutem wyszukiwania.', 'Operator "{operator}" requires multiple operands.' => 'Operator "{operator}" wymaga więcej niż jednego argumentu.', + 'Options available: {options}' => '', 'Page not found.' => 'Nie odnaleziono strony.', 'Please fix the following errors:' => 'Proszę poprawić następujące błędy:', 'Please upload a file.' => 'Proszę wgrać plik.', - 'Powered by {yii}' => 'Powered by {yii}', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Wyświetlone {begin, number}-{end, number} z {totalCount, number} {totalCount, plural, one{rekordu} other{rekordów}}.', 'The combination {values} of {attributes} has already been taken.' => 'Zestawienie {values} dla {attributes} jest już w użyciu.', 'The file "{file}" is not an image.' => 'Plik "{file}" nie jest obrazem.', @@ -65,7 +60,6 @@ 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Obraz "{file}" jest zbyt duży. Szerokość nie może być większa niż {limit, number} {limit, plural, one{piksela} few{pikseli} many{pikseli} other{piksela}}.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Obraz "{file}" jest za mały. Wysokość nie może być mniejsza niż {limit, number} {limit, plural, one{piksela} few{pikseli} many{pikseli} other{piksela}}.', 'The image "{file}" is too small. The width cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Obraz "{file}" jest za mały. Szerokość nie może być mniejsza niż {limit, number} {limit, plural, one{piksela} few{pikseli} many{pikseli} other{piksela}}.', - 'the input value' => 'wartość wejściowa', 'The requested view "{name}" was not found.' => 'Żądany widok "{name}" nie został odnaleziony.', 'The verification code is incorrect.' => 'Kod weryfikacyjny jest nieprawidłowy.', 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Razem {count, number} {count, plural, one{rekord} few{rekordy} many{rekordów} other{rekordu}}.', @@ -76,23 +70,30 @@ 'Update' => 'Aktualizuj', 'View' => 'Zobacz szczegóły', 'Yes' => 'Tak', - 'Yii Framework' => 'Yii Framework', 'You are not allowed to perform this action.' => 'Brak upoważnienia do wykonania tej czynności.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Możliwe wgranie najwyżej {limit, number} {limit, plural, one{pliku} few{plików} many{plików} other{pliku}}.', - 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => 'Należy wgrać przynajmniej {limit, number} {limit, plural, one{plik} few{pliki} many{plików} other{plików}}.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => 'Należy wgrać przynajmniej {limit, number} {limit, plural, one{plik} few{pliki} many{plików} other{pliku}}.', + 'in {delta, plural, =1{a day} other{# days}}' => 'za {delta, plural, =1{jeden dzień} other{# dni}}', + 'in {delta, plural, =1{a minute} other{# minutes}}' => 'za {delta, plural, =1{minutę} few{# minuty} many{# minut} other{# minuty}}', + 'in {delta, plural, =1{a month} other{# months}}' => 'za {delta, plural, =1{miesiąc} few{# miesiące} many{# miesięcy} other{# miesiąca}}', + 'in {delta, plural, =1{a second} other{# seconds}}' => 'za {delta, plural, =1{sekundę} few{# sekundy} many{# sekund} other{# sekundy}}', + 'in {delta, plural, =1{a year} other{# years}}' => 'za {delta, plural, =1{rok} few{# lata} many{# lat} other{# roku}}', + 'in {delta, plural, =1{an hour} other{# hours}}' => 'za {delta, plural, =1{godzinę} few{# godziny} many{# godzin} other{# godziny}}', + 'just now' => 'przed chwilą', + 'the input value' => 'wartość wejściowa', '{attribute} "{value}" has already been taken.' => '{attribute} "{value}" jest już w użyciu.', '{attribute} cannot be blank.' => '{attribute} nie może pozostać bez wartości.', '{attribute} contains wrong subnet mask.' => '{attribute} posiada złą maskę podsieci.', '{attribute} is invalid.' => '{attribute} zawiera nieprawidłową wartość.', - '{attribute} is not a valid email address.' => '{attribute} nie zawiera prawidłowego adresu email.', '{attribute} is not a valid URL.' => '{attribute} nie zawiera prawidłowego adresu URL.', + '{attribute} is not a valid email address.' => '{attribute} nie zawiera prawidłowego adresu email.', '{attribute} is not in the allowed range.' => '{attribute} nie jest w dozwolonym zakresie.', '{attribute} must be "{requiredValue}".' => '{attribute} musi mieć wartość "{requiredValue}".', '{attribute} must be a number.' => '{attribute} musi być liczbą.', '{attribute} must be a string.' => '{attribute} musi być tekstem.', '{attribute} must be a valid IP address.' => '{attribute} musi być poprawnym adresem IP.', - '{attribute} must be an integer.' => '{attribute} musi być liczbą całkowitą.', '{attribute} must be an IP address with specified subnet.' => '{attribute} musi być adresem IP w określonej podsieci.', + '{attribute} must be an integer.' => '{attribute} musi być liczbą całkowitą.', '{attribute} must be either "{true}" or "{false}".' => '{attribute} musi mieć wartość "{true}" lub "{false}".', '{attribute} must be equal to "{compareValueOrAttribute}".' => '{attribute} musi mieć tę samą wartość co "{compareValueOrAttribute}".', '{attribute} must be greater than "{compareValueOrAttribute}".' => '{attribute} musi mieć wartość większą od "{compareValueOrAttribute}".', @@ -108,13 +109,14 @@ '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} musi zawierać co najmniej {min, number} {min, plural, one{znak} few{znaki} many{znaków} other{znaku}}.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} musi zawierać nie więcej niż {max, number} {max, plural, one{znak} few{znaki} many{znaków} other{znaku}}.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} musi zawierać dokładnie {length, number} {length, plural, one{znak} few{znaki} many{znaków} other{znaku}}.', - '{delta, plural, =1{1 day} other{# days}}' => '{delta, plural, =1{1 dzień} other{# dni} other{# dnia}}', + '{compareAttribute} is invalid.' => '', + '{delta, plural, =1{1 day} other{# days}}' => '{delta, plural, =1{1 dzień} few{# dni} many{# dni} other{# dnia}}', '{delta, plural, =1{1 hour} other{# hours}}' => '{delta, plural, =1{1 godzina} few{# godziny} many{# godzin} other{# godziny}}', '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta, plural, =1{1 minuta} few{# minuty} many{# minut} other{# minuty}}', '{delta, plural, =1{1 month} other{# months}}' => '{delta, plural, =1{1 miesiąc} few{# miesiące} many{# miesięcy} other{# miesiąca}}', '{delta, plural, =1{1 second} other{# seconds}}' => '{delta, plural, =1{1 sekunda} few{# sekundy} many{# sekund} other{# sekundy}}', '{delta, plural, =1{1 year} other{# years}}' => '{delta, plural, =1{1 rok} few{# lata} many{# lat} other{# roku}}', - '{delta, plural, =1{a day} other{# days}} ago' => '{delta, plural, =1{jeden dzień} other{# dni} other{# dnia}} temu', + '{delta, plural, =1{a day} other{# days}} ago' => '{delta, plural, =1{jeden dzień} few{# dni} many{# dni} other{# dnia}} temu', '{delta, plural, =1{a minute} other{# minutes}} ago' => '{delta, plural, =1{minutę} few{# minuty} many{# minut} other{# minuty}} temu', '{delta, plural, =1{a month} other{# months}} ago' => '{delta, plural, =1{miesiąc} few{# miesiące} many{# miesięcy} other{# miesiąca}} temu', '{delta, plural, =1{a second} other{# seconds}} ago' => '{delta, plural, =1{sekundę} few{# sekundy} many{# sekund} other{# sekundy}} temu', @@ -123,7 +125,6 @@ '{nFormatted} B' => '{nFormatted} B', '{nFormatted} GB' => '{nFormatted} GB', '{nFormatted} GiB' => '{nFormatted} GiB', - '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} KiB' => '{nFormatted} KiB', '{nFormatted} MB' => '{nFormatted} MB', '{nFormatted} MiB' => '{nFormatted} MiB', @@ -131,11 +132,12 @@ '{nFormatted} PiB' => '{nFormatted} PiB', '{nFormatted} TB' => '{nFormatted} TB', '{nFormatted} TiB' => '{nFormatted} TiB', + '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, =1{bajt} few{bajty} many{bajtów} other{bajta}}', - '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} {n, plural, =1{gibibajt} few{gigabajty} many{gibiajtów} other{gibiajta}}', - '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, =1{gigabajt} few{gigabajty} many{gigabajtów} other{gigabaja}}', - '{nFormatted} {n, plural, =1{kibibyte} other{kibibytes}}' => '{nFormatted} {n, plural, =1{kibibajt} few{kibibajty} many{kibibajtów} other{kibibajtów}}', - '{nFormatted} {n, plural, =1{kilobyte} other{kilobytes}}' => '{nFormatted} {n, plural, =1{kilobajt} few{kilobajty} many{kilobajtów} other{kilobajtów}}', + '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} {n, plural, =1{gibibajt} few{gibibajty} many{gibibajtów} other{gibibajta}}', + '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, =1{gigabajt} few{gigabajty} many{gigabajtów} other{gigabajta}}', + '{nFormatted} {n, plural, =1{kibibyte} other{kibibytes}}' => '{nFormatted} {n, plural, =1{kibibajt} few{kibibajty} many{kibibajtów} other{kibibajta}}', + '{nFormatted} {n, plural, =1{kilobyte} other{kilobytes}}' => '{nFormatted} {n, plural, =1{kilobajt} few{kilobajty} many{kilobajtów} other{kilobajta}}', '{nFormatted} {n, plural, =1{mebibyte} other{mebibytes}}' => '{nFormatted} {n, plural, =1{mebibajt} few{mebibajty} many{mebibajtów} other{mebibajta}}', '{nFormatted} {n, plural, =1{megabyte} other{megabytes}}' => '{nFormatted} {n, plural, =1{megabajt} few{megabajty} many{megabajtów} other{megabajta}}', '{nFormatted} {n, plural, =1{pebibyte} other{pebibytes}}' => '{nFormatted} {n, plural, =1{pebibajt} few{pebibajty} many{pebibajtów} other{pebibajta}}', diff --git a/framework/messages/pt-BR/yii.php b/framework/messages/pt-BR/yii.php index c626562c9c8..c71b5b4ac27 100644 --- a/framework/messages/pt-BR/yii.php +++ b/framework/messages/pt-BR/yii.php @@ -23,17 +23,14 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ - '"{attribute}" does not support operator "{operator}".' => '"{attribute}" não suporta o operador "{operator}".', - 'Condition for "{attribute}" should be either a value or valid operator specification.' => 'A condição para "{attribute}" deve ser um valor ou a especificação de um operador válido.', - 'Operator "{operator}" must be used with a search attribute.' => 'O operador "{operator}" deve ser usado com um atributo de busca.', - 'Operator "{operator}" requires multiple operands.' => 'O operador "{operator}" requer múltiplos operandos.', - 'The format of {filter} is invalid.' => 'O formato de {filter} é inválido.', - 'Unknown filter attribute "{attribute}"' => 'Atributo de filtro desconhecido "{attribute}"', - 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => 'Você deve enviar ao menos {limit, number} {limit, plural, one{arquivo} other{arquivos}}.', ' and ' => ' e ', + '"{attribute}" does not support operator "{operator}".' => '"{attribute}" não suporta o operador "{operator}".', '(not set)' => '(não definido)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Ocorreu um erro interno do servidor.', 'Are you sure you want to delete this item?' => 'Deseja realmente excluir este item?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => 'A condição para "{attribute}" deve ser um valor ou a especificação de um operador válido.', 'Delete' => 'Excluir', 'Error' => 'Erro', 'File upload failed.' => 'O upload do arquivo falhou.', @@ -46,16 +43,19 @@ 'No results found.' => 'Nenhum resultado foi encontrado.', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'São permitidos somente arquivos com os seguintes tipos MIME: {mimeTypes}.', 'Only files with these extensions are allowed: {extensions}.' => 'São permitidos somente arquivos com as seguintes extensões: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => 'O operador "{operator}" deve ser usado com um atributo de busca.', + 'Operator "{operator}" requires multiple operands.' => 'O operador "{operator}" requer múltiplos operandos.', + 'Options available: {options}' => '', 'Page not found.' => 'Página não encontrada.', 'Please fix the following errors:' => 'Por favor, corrija os seguintes erros:', 'Please upload a file.' => 'Por favor, faça upload de um arquivo.', - 'Powered by {yii}' => 'Desenvolvido com {yii}', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Exibindo {begin, number}-{end, number} de {totalCount, number} {totalCount, plural, one{item} other{itens}}.', 'The combination {values} of {attributes} has already been taken.' => 'A combinação {values} de {attributes} já foi utilizado.', 'The file "{file}" is not an image.' => 'O arquivo "{file}" não é uma imagem.', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'O arquivo "{file}" é grande demais. Seu tamanho não pode exceder {formattedLimit}.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'O arquivo "{file}" é pequeno demais. Seu tamanho não pode ser menor que {formattedLimit}.', 'The format of {attribute} is invalid.' => 'O formato de "{attribute}" é inválido.', + 'The format of {filter} is invalid.' => 'O formato de {filter} é inválido.', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'O arquivo "{file}" é grande demais. A altura não pode ser maior que {limit, number} {limit, plural, one{pixel} other{pixels}}.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'O arquivo "{file}" é grande demais. A largura não pode ser maior que {limit, number} {limit, plural, one{pixel} other{pixels}}.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'O arquivo "{file}" é pequeno demais. A altura não pode ser menor que {limit, number} {limit, plural, one{pixel} other{pixels}}.', @@ -65,13 +65,14 @@ 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Total {count, number} {count, plural, one{item} other{itens}}.', 'Unable to verify your data submission.' => 'Não foi possível verificar o seu envio de dados.', 'Unknown alias: -{name}' => 'Alias desconhecido: -{name}', + 'Unknown filter attribute "{attribute}"' => 'Atributo de filtro desconhecido "{attribute}"', 'Unknown option: --{name}' => 'Opção desconhecida : --{name}', 'Update' => 'Alterar', 'View' => 'Exibir', 'Yes' => 'Sim', - 'Yii Framework' => 'Yii Framework', 'You are not allowed to perform this action.' => 'Você não está autorizado a realizar essa ação.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Você pode fazer o upload de, no máximo, {limit, number} {limit, plural, one{arquivo} other{arquivos}}.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => 'Você deve enviar ao menos {limit, number} {limit, plural, one{arquivo} other{arquivos}}.', 'in {delta, plural, =1{a day} other{# days}}' => 'em {delta, plural, =1{1 dia} other{# dias}}', 'in {delta, plural, =1{a minute} other{# minutes}}' => 'em {delta, plural, =1{1 minuto} other{# minutos}}', 'in {delta, plural, =1{a month} other{# months}}' => 'em {delta, plural, =1{1 mês} other{# meses}}', @@ -108,6 +109,7 @@ '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '"{attribute}" deve conter pelo menos {min, number} {min, plural, one{caractere} other{caracteres}}.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '"{attribute}" deve conter no máximo {max, number} {max, plural, one{caractere} other{caracteres}}.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '"{attribute}" deve conter {length, number} {length, plural, one{caractere} other{caracteres}}.', + '{compareAttribute} is invalid.' => '', '{delta, plural, =1{1 day} other{# days}}' => '{delta, plural, =1{1 dia} other{# dias}}', '{delta, plural, =1{1 hour} other{# hours}}' => '{delta, plural, =1{1 hora} other{# horas}}', '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta, plural, =1{1 minuto} other{# minutos}}', @@ -123,7 +125,6 @@ '{nFormatted} B' => '{nFormatted} B', '{nFormatted} GB' => '{nFormatted} GB', '{nFormatted} GiB' => '{nFormatted} GiB', - '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} KiB' => '{nFormatted} KiB', '{nFormatted} MB' => '{nFormatted} MB', '{nFormatted} MiB' => '{nFormatted} MiB', @@ -131,6 +132,7 @@ '{nFormatted} PiB' => '{nFormatted} PiB', '{nFormatted} TB' => '{nFormatted} TB', '{nFormatted} TiB' => '{nFormatted} TiB', + '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, =1{byte} other{bytes}}', '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}', '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}', diff --git a/framework/messages/pt/yii.php b/framework/messages/pt/yii.php index f6bdfe5f62c..9cc4999d438 100644 --- a/framework/messages/pt/yii.php +++ b/framework/messages/pt/yii.php @@ -25,19 +25,53 @@ return [ ' and ' => ' e ', '"{attribute}" does not support operator "{operator}".' => '"{attribute}" não suporta o operador "{operator}".', + '(not set)' => '(não definido)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', + 'An internal server error occurred.' => 'Ocorreu um erro interno do servidor.', 'Are you sure you want to delete this item?' => 'Tens a certeza que queres apagar este item?', 'Condition for "{attribute}" should be either a value or valid operator specification.' => 'A condição para "{attribute}" tem de ser ou um valor ou uma especificação válida do operador.', + 'Delete' => 'Apagar', + 'Error' => 'Erro', + 'File upload failed.' => 'O upload do ficheiro falhou.', + 'Home' => 'Página Inicial', + 'Invalid data received for parameter "{param}".' => 'Dados inválidos recebidos para o parâmetro “{param}”.', + 'Login Required' => 'Login Necessário.', + 'Missing required arguments: {params}' => 'Argumentos obrigatórios em falta: {params}', + 'Missing required parameters: {params}' => 'Parâmetros obrigatórios em falta: {params}', + 'No' => 'Não', + 'No results found.' => 'Não foram encontrados resultados.', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Apenas ficheiros com este tipo de MIME são permitidos: {mimeTypes}.', + 'Only files with these extensions are allowed: {extensions}.' => 'Só são permitidos ficheiros com as seguintes extensões: {extensions}.', 'Operator "{operator}" must be used with a search attribute.' => 'O operador "{operator}" tem de ser usado com um atributo de pesquisa.', 'Operator "{operator}" requires multiple operands.' => 'O operador "{operator}" requer vários operandos.', - 'Powered by {yii}' => 'Distribuído por {yii}', + 'Options available: {options}' => '', + 'Page not found.' => 'Página não encontrada.', + 'Please fix the following errors:' => 'Por favor, corrija os seguintes erros:', + 'Please upload a file.' => 'Por favor faça upload de um ficheiro.', + 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'A exibir {begin, number}-{end, number} de {totalCount, number} {totalCount, plural, one{item} other{itens}}.', 'The combination {values} of {attributes} has already been taken.' => 'A combinação {values} de {attributes} já está a ser utilizada.', + 'The file "{file}" is not an image.' => 'O ficheiro “{file}” não é uma imagem.', + 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'O ficheiro “{file}” é grande demais. O tamanho não pode exceder {formattedLimit}.', + 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'O ficheiro “{file}” é pequeno demais. O tamanho não pode ser menor do que {formattedLimit}.', + 'The format of {attribute} is invalid.' => 'O formato de “{attribute}” é inválido.', 'The format of {filter} is invalid.' => 'O formato de {filter} é inválido.', + 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'O ficheiro “{file}” é grande demais. A altura não pode ser maior do que {limit, number} {limit, plural, one{pixel} other{pixels}}.', + 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'O ficheiro “{file}” é grande demais. A largura não pode ser maior do que {limit, number} {limit, plural, one{pixel} other{pixels}}.', + 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'O ficheiro “{file}” é pequeno demais. A altura não pode ser menor do que {limit, number} {limit, plural, one{pixel} other{pixels}}.', + 'The image "{file}" is too small. The width cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'O ficheiro “{file}” é pequeno demais. A largura não pode ser menor do que {limit, number} {limit, plural, one{pixel} other{pixels}}.', 'The requested view "{name}" was not found.' => 'A visualização solicitada "{name}" não foi encontrada.', + 'The verification code is incorrect.' => 'O código de verificação está incorreto.', + 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Total {count, number} {count, plural, one{item} other{itens}}.', + 'Unable to verify your data submission.' => 'Não foi possível verificar a sua submissão de dados.', 'Unknown alias: -{name}' => 'Alias desconhecido: -{name}', 'Unknown filter attribute "{attribute}"' => 'Atributo de filtro desconhecido "{attribute}"', - 'View' => 'Vêr', - 'Yii Framework' => 'Yii Framework', + 'Unknown option: --{name}' => 'Opção desconhecida : --{name}', + 'Update' => 'Atualizar', + 'View' => 'Ver', + 'Yes' => 'Sim', + 'You are not allowed to perform this action.' => 'Você não está autorizado a realizar essa ação.', + 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Você pode fazer o upload de no máximo {limit, number} {limit, plural, one{ficheiro} other{ficheiros}}.', 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => 'A transferência deve ser pelo menos {limit, number} {limit, plural, one{ficheiro} other{ficheiros}}. ', 'in {delta, plural, =1{a day} other{# days}}' => 'em {delta, plural, =1{um dia} other{# dias}}', 'in {delta, plural, =1{a minute} other{# minutes}}' => 'em {delta, plural, =1{um minuto} other{# minutos}}', @@ -46,19 +80,36 @@ 'in {delta, plural, =1{a year} other{# years}}' => 'em {delta, plural, =1{um ano} other{# anos}}', 'in {delta, plural, =1{an hour} other{# hours}}' => 'em {delta, plural, =1{uma hora} other{# horas}}', 'just now' => 'agora mesmo', + 'the input value' => 'o valor de entrada', + '{attribute} "{value}" has already been taken.' => '{attribute} “{value}” já foi atribuido.', + '{attribute} cannot be blank.' => '“{attribute}” não pode ficar em branco.', '{attribute} contains wrong subnet mask.' => '{attribute} contém uma máscara de sub-rede errada.', + '{attribute} is invalid.' => '“{attribute}” é inválido.', + '{attribute} is not a valid URL.' => '“{attribute}” não é uma URL válida.', + '{attribute} is not a valid email address.' => '“{attribute}” não é um endereço de e-mail válido.', '{attribute} is not in the allowed range.' => '{attribute} não está no alcance permitido.', + '{attribute} must be "{requiredValue}".' => '“{attribute}” deve ser “{requiredValue}”.', + '{attribute} must be a number.' => '“{attribute}” deve ser um número.', + '{attribute} must be a string.' => '“{attribute}” deve ser uma string.', '{attribute} must be a valid IP address.' => '{attribute} tem de ser um endereço IP válido.', '{attribute} must be an IP address with specified subnet.' => '{attribute} tem de ser um endereço IP com a sub-rede especificada.', + '{attribute} must be an integer.' => '“{attribute}” deve ser um número inteiro.', + '{attribute} must be either "{true}" or "{false}".' => '“{attribute}” deve ser “{true}” ou “{false}”.', '{attribute} must be equal to "{compareValueOrAttribute}".' => '{attribute} tem de ser igual a "{compareValueOrAttribute}".', '{attribute} must be greater than "{compareValueOrAttribute}".' => '{attribute} tem de ser maior que "{compareValueOrAttribute}".', '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '{attribute} tem de ser maior ou igual a "{compareValueOrAttribute}".', '{attribute} must be less than "{compareValueOrAttribute}".' => '{attribute} tem de ser menor que "{compareValueOrAttribute}".', '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '{attribute} tem de ser menor ou igual a "{compareValueOrAttribute}".', + '{attribute} must be no greater than {max}.' => '“{attribute}” não pode ser maior do que {max}.', + '{attribute} must be no less than {min}.' => '“{attribute}” não pode ser menor do que {min}.', '{attribute} must not be a subnet.' => '{attribute} não pode ser uma sub-rede.', '{attribute} must not be an IPv4 address.' => '{attribute} não pode ser um endereço IPv4.', '{attribute} must not be an IPv6 address.' => '{attribute} não pode ser um endereço IPv6.', '{attribute} must not be equal to "{compareValueOrAttribute}".' => '{attribute} não pode ser igual a "{compareValueOrAttribute}".', + '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '“{attribute}” deve conter pelo menos {min, number} {min, plural, one{caractere} other{caracteres}}.', + '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '“{attribute}” deve conter no máximo {max, number} {max, plural, one{caractere} other{caracteres}}.', + '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '“{attribute}” deve conter {length, number} {length, plural, one{caractere} other{caracteres}}.', + '{compareAttribute} is invalid.' => '', '{delta, plural, =1{1 day} other{# days}}' => '{delta, plural, =1{1 dia} other{# dias}}', '{delta, plural, =1{1 hour} other{# hours}}' => '{delta, plural, =1{1 hora} other{# horas}}', '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta, plural, =1{1 minuto} other{# minutos}}', @@ -74,7 +125,6 @@ '{nFormatted} B' => '{nFormatted} B', '{nFormatted} GB' => '{nFormatted} GB', '{nFormatted} GiB' => '{nFormatted} GiB', - '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} KiB' => '{nFormatted} KiB', '{nFormatted} MB' => '{nFormatted} MB', '{nFormatted} MiB' => '{nFormatted} MiB', @@ -82,6 +132,7 @@ '{nFormatted} PiB' => '{nFormatted} PiB', '{nFormatted} TB' => '{nFormatted} TB', '{nFormatted} TiB' => '{nFormatted} TiB', + '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, =1{byte} other{bytes}}', '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}', '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}', @@ -93,53 +144,4 @@ '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}', '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}', '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}', - '(not set)' => '(não definido)', - 'An internal server error occurred.' => 'Ocorreu um erro interno do servidor.', - 'Delete' => 'Apagar', - 'Error' => 'Erro', - 'File upload failed.' => 'O upload do ficheiro falhou.', - 'Home' => 'Página Inicial', - 'Invalid data received for parameter "{param}".' => 'Dados inválidos recebidos para o parâmetro “{param}”.', - 'Login Required' => 'Login Necessário.', - 'Missing required arguments: {params}' => 'Argumentos obrigatórios em falta: {params}', - 'Missing required parameters: {params}' => 'Parâmetros obrigatórios em falta: {params}', - 'No' => 'Não', - 'No results found.' => 'Não foram encontrados resultados.', - 'Only files with these extensions are allowed: {extensions}.' => 'Só são permitidos ficheiros com as seguintes extensões: {extensions}.', - 'Page not found.' => 'Página não encontrada.', - 'Please fix the following errors:' => 'Por favor, corrija os seguintes erros:', - 'Please upload a file.' => 'Por favor faça upload de um ficheiro.', - 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'A exibir {begin, number}-{end, number} de {totalCount, number} {totalCount, plural, one{item} other{itens}}.', - 'The file "{file}" is not an image.' => 'O ficheiro “{file}” não é uma imagem.', - 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'O ficheiro “{file}” é grande demais. O tamanho não pode exceder {formattedLimit}.', - 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'O ficheiro “{file}” é pequeno demais. O tamanho não pode ser menor do que {formattedLimit}.', - 'The format of {attribute} is invalid.' => 'O formato de “{attribute}” é inválido.', - 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'O ficheiro “{file}” é grande demais. A altura não pode ser maior do que {limit, number} {limit, plural, one{pixel} other{pixels}}.', - 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'O ficheiro “{file}” é grande demais. A largura não pode ser maior do que {limit, number} {limit, plural, one{pixel} other{pixels}}.', - 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'O ficheiro “{file}” é pequeno demais. A altura não pode ser menor do que {limit, number} {limit, plural, one{pixel} other{pixels}}.', - 'The image "{file}" is too small. The width cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'O ficheiro “{file}” é pequeno demais. A largura não pode ser menor do que {limit, number} {limit, plural, one{pixel} other{pixels}}.', - 'The verification code is incorrect.' => 'O código de verificação está incorreto.', - 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Total {count, number} {count, plural, one{item} other{itens}}.', - 'Unable to verify your data submission.' => 'Não foi possível verificar a sua submissão de dados.', - 'Unknown option: --{name}' => 'Opção desconhecida : --{name}', - 'Update' => 'Atualizar', - 'Yes' => 'Sim', - 'You are not allowed to perform this action.' => 'Você não está autorizado a realizar essa ação.', - 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Você pode fazer o upload de no máximo {limit, number} {limit, plural, one{ficheiro} other{ficheiros}}.', - 'the input value' => 'o valor de entrada', - '{attribute} "{value}" has already been taken.' => '{attribute} “{value}” já foi atribuido.', - '{attribute} cannot be blank.' => '“{attribute}” não pode ficar em branco.', - '{attribute} is invalid.' => '“{attribute}” é inválido.', - '{attribute} is not a valid URL.' => '“{attribute}” não é uma URL válida.', - '{attribute} is not a valid email address.' => '“{attribute}” não é um endereço de e-mail válido.', - '{attribute} must be "{requiredValue}".' => '“{attribute}” deve ser “{requiredValue}”.', - '{attribute} must be a number.' => '“{attribute}” deve ser um número.', - '{attribute} must be a string.' => '“{attribute}” deve ser uma string.', - '{attribute} must be an integer.' => '“{attribute}” deve ser um número inteiro.', - '{attribute} must be either "{true}" or "{false}".' => '“{attribute}” deve ser “{true}” ou “{false}”.', - '{attribute} must be no greater than {max}.' => '“{attribute}” não pode ser maior do que {max}.', - '{attribute} must be no less than {min}.' => '“{attribute}” não pode ser menor do que {min}.', - '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '“{attribute}” deve conter pelo menos {min, number} {min, plural, one{caractere} other{caracteres}}.', - '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '“{attribute}” deve conter no máximo {max, number} {max, plural, one{caractere} other{caracteres}}.', - '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '“{attribute}” deve conter {length, number} {length, plural, one{caractere} other{caracteres}}.', ]; diff --git a/framework/messages/ro/yii.php b/framework/messages/ro/yii.php index 6042d0bd695..7d62653f784 100644 --- a/framework/messages/ro/yii.php +++ b/framework/messages/ro/yii.php @@ -23,8 +23,14 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + ' and ' => '', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(nu este setat)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'A aparut o eroare internă de server.', + 'Are you sure you want to delete this item?' => '', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => 'Șterge', 'Error' => 'Eroare', 'File upload failed.' => 'Încărcarea fișierului a eșuat.', @@ -34,52 +40,108 @@ 'Missing required arguments: {params}' => 'Lipsesc argumente obligatorii: {params}', 'Missing required parameters: {params}' => 'Lipsesc parametrii obligatori: {params}', 'No' => 'Nu', - 'No help for unknown command "{command}".' => 'Nu sunt referințe pentru comanda necunoscută "{command}".', - 'No help for unknown sub-command "{command}".' => 'Nu sunt referințe pentru sub-comanda necunoscută "{command}".', 'No results found.' => 'Nu a fost găsit niciun rezultat.', + 'Only files with these MIME types are allowed: {mimeTypes}.' => '', 'Only files with these extensions are allowed: {extensions}.' => 'Se acceptă numai fișiere cu următoarele extensii: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => 'Pagina nu a fost găsită.', 'Please fix the following errors:' => 'Vă rugăm sa corectați următoarele erori:', 'Please upload a file.' => 'Vă rugăm sa încărcați un fișier.', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Sunt afișați itemii {begin, number}-{end, number} din {totalCount, number}.', + 'The combination {values} of {attributes} has already been taken.' => '', 'The file "{file}" is not an image.' => 'Fișierul «{file}» nu este o imagine.', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'Fișierul «{file}» este prea mare. Dimensiunea acestuia nu trebuie să fie mai mare de {formattedLimit}.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'Fișierul «{file}» este prea mic. Dimensiunea acestuia nu trebuie sa fie mai mică de {formattedLimit}.', 'The format of {attribute} is invalid.' => 'Formatul «{attribute}» nu este valid.', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Imaginea «{file}» este prea mare. Înălțimea nu trebuie să fie mai mare de {limit, number} {limit, plural, one{pixel} other{pixeli}}.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Imaginea «{file}» este prea mare. Lățimea nu trebuie să fie mai mare de {limit, number} {limit, plural, one{pixel} other{pixeli}}.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Imaginea «{file}» este prea mică. Înălțimea nu trebuie să fie mai mică de {limit, number} {limit, plural, one{pixel} other{pixeli}}.', 'The image "{file}" is too small. The width cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Imaginea «{file}» este prea mică. Lățimea nu trebuie sa fie mai mică de {limit, number} {limit, plural, one{pixel} other{pixeli}}.', + 'The requested view "{name}" was not found.' => '', 'The verification code is incorrect.' => 'Codul de verificare este incorect.', 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Total {count, number} {count, plural, one{item} other{itemi}}.', 'Unable to verify your data submission.' => 'Datele trimise nu au putut fi verificate.', - 'Unknown command "{command}".' => 'Comandă necunoscută "{command}".', + 'Unknown alias: -{name}' => '', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'Opțiune necunoscută : --{name}', 'Update' => 'Redactare', 'View' => 'Vizualizare', 'Yes' => 'Da', 'You are not allowed to perform this action.' => 'Nu aveți dreptul să efectuați această acțiunea.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Puteți încărca maxim {limit, number} {limit, plural, one{fișier} other{fișiere}}.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', + 'in {delta, plural, =1{a day} other{# days}}' => '', + 'in {delta, plural, =1{a minute} other{# minutes}}' => '', + 'in {delta, plural, =1{a month} other{# months}}' => '', + 'in {delta, plural, =1{a second} other{# seconds}}' => '', + 'in {delta, plural, =1{a year} other{# years}}' => '', + 'in {delta, plural, =1{an hour} other{# hours}}' => '', + 'just now' => '', 'the input value' => 'valoarea introdusă', '{attribute} "{value}" has already been taken.' => '{attribute} «{value}» este deja ocupat.', '{attribute} cannot be blank.' => '«{attribute}» nu poate fi gol.', + '{attribute} contains wrong subnet mask.' => '', '{attribute} is invalid.' => '«{attribute}» este incorect.', '{attribute} is not a valid URL.' => '«{attribute}» nu este un URL valid.', '{attribute} is not a valid email address.' => '«{attribute}» nu este o adresă de email validă.', + '{attribute} is not in the allowed range.' => '', '{attribute} must be "{requiredValue}".' => '«{attribute}» trebuie să fie «{requiredValue}».', '{attribute} must be a number.' => '«{attribute}» trebuie să fie un număr.', '{attribute} must be a string.' => '«{attribute}» trebuie să fie un șir de caractere.', + '{attribute} must be a valid IP address.' => '', + '{attribute} must be an IP address with specified subnet.' => '', '{attribute} must be an integer.' => '«{attribute}» trebuie să fie un număr întreg.', '{attribute} must be either "{true}" or "{false}".' => '«{attribute}» trebuie să fie «{true}» sau «{false}».', - '{attribute} must be greater than "{compareValue}".' => '«{attribute}» trebuie să fie mai mare ca «{compareValue}».', - '{attribute} must be greater than or equal to "{compareValue}".' => '«{attribute}» trebuie să fie mai mare sau egal cu «{compareValue}».', - '{attribute} must be less than "{compareValue}".' => '«{attribute}» trebuie să fie mai mic ca «{compareValue}».', - '{attribute} must be less than or equal to "{compareValue}".' => '«{attribute}» trebuie să fie mai mic sau egal cu «{compareValue}».', + '{attribute} must be equal to "{compareValueOrAttribute}".' => '', + '{attribute} must be greater than "{compareValueOrAttribute}".' => '«{attribute}» trebuie să fie mai mare ca «{compareValueOrAttribute}».', + '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '«{attribute}» trebuie să fie mai mare sau egal cu «{compareValueOrAttribute}».', + '{attribute} must be less than "{compareValueOrAttribute}".' => '«{attribute}» trebuie să fie mai mic ca «{compareValueOrAttribute}».', + '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '«{attribute}» trebuie să fie mai mic sau egal cu «{compareValueOrAttribute}».', '{attribute} must be no greater than {max}.' => '«{attribute}» nu trebuie să fie mai mare ca {max}.', '{attribute} must be no less than {min}.' => '«{attribute}» nu trebuie să fie mai mic ca {min}.', - '{attribute} must be repeated exactly.' => '«{attribute}» trebuie să fie repetat exact.', - '{attribute} must not be equal to "{compareValue}".' => '«{attribute}» nu trebuie să fie egală cu «{compareValue}».', + '{attribute} must not be a subnet.' => '', + '{attribute} must not be an IPv4 address.' => '', + '{attribute} must not be an IPv6 address.' => '', + '{attribute} must not be equal to "{compareValueOrAttribute}".' => '«{attribute}» nu trebuie să fie egală cu «{compareValueOrAttribute}».', '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '«{attribute}» trebuie să conțină minim {min, number} {min, plural, one{caracter} other{caractere}}.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '«{attribute}» trebuie să conțină maxim {max, number} {max, plural, one{caracter} other{caractere}}.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '«{attribute}» trebuie să conțină {length, number} {length, plural, one{caracter} other{caractere}}.', + '{compareAttribute} is invalid.' => '', + '{delta, plural, =1{1 day} other{# days}}' => '', + '{delta, plural, =1{1 hour} other{# hours}}' => '', + '{delta, plural, =1{1 minute} other{# minutes}}' => '', + '{delta, plural, =1{1 month} other{# months}}' => '', + '{delta, plural, =1{1 second} other{# seconds}}' => '', + '{delta, plural, =1{1 year} other{# years}}' => '', + '{delta, plural, =1{a day} other{# days}} ago' => '', + '{delta, plural, =1{a minute} other{# minutes}} ago' => '', + '{delta, plural, =1{a month} other{# months}} ago' => '', + '{delta, plural, =1{a second} other{# seconds}} ago' => '', + '{delta, plural, =1{a year} other{# years}} ago' => '', + '{delta, plural, =1{an hour} other{# hours}} ago' => '', + '{nFormatted} B' => '', + '{nFormatted} GB' => '', + '{nFormatted} GiB' => '', + '{nFormatted} KiB' => '', + '{nFormatted} MB' => '', + '{nFormatted} MiB' => '', + '{nFormatted} PB' => '', + '{nFormatted} PiB' => '', + '{nFormatted} TB' => '', + '{nFormatted} TiB' => '', + '{nFormatted} kB' => '', + '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '', + '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '', + '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '', + '{nFormatted} {n, plural, =1{kibibyte} other{kibibytes}}' => '', + '{nFormatted} {n, plural, =1{kilobyte} other{kilobytes}}' => '', + '{nFormatted} {n, plural, =1{mebibyte} other{mebibytes}}' => '', + '{nFormatted} {n, plural, =1{megabyte} other{megabytes}}' => '', + '{nFormatted} {n, plural, =1{pebibyte} other{pebibytes}}' => '', + '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '', + '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '', + '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '', ]; diff --git a/framework/messages/ru/yii.php b/framework/messages/ru/yii.php index 31b27234323..44bced6a49d 100644 --- a/framework/messages/ru/yii.php +++ b/framework/messages/ru/yii.php @@ -26,6 +26,8 @@ ' and ' => ' и ', '"{attribute}" does not support operator "{operator}".' => '"{attribute}" не поддерживает оператор "{operator}".', '(not set)' => '(не задано)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Возникла внутренняя ошибка сервера.', 'Are you sure you want to delete this item?' => 'Вы уверены, что хотите удалить этот элемент?', 'Condition for "{attribute}" should be either a value or valid operator specification.' => 'Условие для "{attribute}" должно быть или значением или верной спецификацией оператора.', @@ -43,10 +45,10 @@ 'Only files with these extensions are allowed: {extensions}.' => 'Разрешена загрузка файлов только со следующими расширениями: {extensions}.', 'Operator "{operator}" must be used with a search attribute.' => 'Оператор "{operator}" должен использоваться через атрибут поиска.', 'Operator "{operator}" requires multiple operands.' => 'Оператор "{operator}" требует несколько операндов.', + 'Options available: {options}' => '', 'Page not found.' => 'Страница не найдена.', 'Please fix the following errors:' => 'Исправьте следующие ошибки:', 'Please upload a file.' => 'Загрузите файл.', - 'Powered by {yii}' => 'Работает на {yii}', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Показаны записи {begin, number}-{end, number} из {totalCount, number}.', 'The combination {values} of {attributes} has already been taken.' => 'Комбинация {values} параметров {attributes} уже существует.', 'The file "{file}" is not an image.' => 'Файл «{file}» не является изображением.', @@ -68,9 +70,9 @@ 'Update' => 'Редактировать', 'View' => 'Просмотр', 'Yes' => 'Да', - 'Yii Framework' => 'Yii Framework', 'You are not allowed to perform this action.' => 'Вам не разрешено производить данное действие.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Вы не можете загружать более {limit, number} {limit, plural, one{файла} few{файлов} many{файлов} other{файла}}.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => 'Вы должны загрузить как минимум {limit, number} {limit, plural, one{файл} few{файла} many{файлов} other{файла}}.', 'in {delta, plural, =1{a day} other{# days}}' => 'через {delta, plural, =1{день} one{# день} few{# дня} many{# дней} other{# дня}}', 'in {delta, plural, =1{a minute} other{# minutes}}' => 'через {delta, plural, =1{минуту} one{# минуту} few{# минуты} many{# минут} other{# минуты}}', 'in {delta, plural, =1{a month} other{# months}}' => 'через {delta, plural, =1{месяц} one{# месяц} few{# месяца} many{# месяцев} other{# месяца}}', @@ -107,6 +109,7 @@ '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => 'Значение «{attribute}» должно содержать минимум {min, number} {min, plural, one{символ} few{символа} many{символов} other{символа}}.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => 'Значение «{attribute}» должно содержать максимум {max, number} {max, plural, one{символ} few{символа} many{символов} other{символа}}.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => 'Значение «{attribute}» должно содержать {length, number} {length, plural, one{символ} few{символа} many{символов} other{символа}}.', + '{compareAttribute} is invalid.' => '', '{delta, plural, =1{1 day} other{# days}}' => '{delta, plural, one{# день} few{# дня} many{# дней} other{# дня}}', '{delta, plural, =1{1 hour} other{# hours}}' => '{delta, plural, one{# час} few{# часа} many{# часов} other{# часа}}', '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta, plural, one{# минута} few{# минуты} many{# минут} other{# минуты}}', @@ -122,7 +125,6 @@ '{nFormatted} B' => '{nFormatted} Б', '{nFormatted} GB' => '{nFormatted} ГБ', '{nFormatted} GiB' => '{nFormatted} ГиБ', - '{nFormatted} kB' => '{nFormatted} КБ', '{nFormatted} KiB' => '{nFormatted} КиБ', '{nFormatted} MB' => '{nFormatted} МБ', '{nFormatted} MiB' => '{nFormatted} МиБ', @@ -130,6 +132,7 @@ '{nFormatted} PiB' => '{nFormatted} ПиБ', '{nFormatted} TB' => '{nFormatted} ТБ', '{nFormatted} TiB' => '{nFormatted} ТиБ', + '{nFormatted} kB' => '{nFormatted} КБ', '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, one{байт} few{байта} many{байтов} other{байта}}', '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} {n, plural, one{гибибайт} few{гибибайта} many{гибибайтов} other{гибибайта}}', '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, one{гигабайт} few{гигабайта} many{гигабайтов} other{гигабайта}}', @@ -141,5 +144,4 @@ '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '{nFormatted} {n, plural, one{петабайт} few{петабайта} many{петабайтов} other{петабайта}}', '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '{nFormatted} {n, plural, one{тебибайт} few{тебибайта} many{тебибайтов} other{тебибайта}}', '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '{nFormatted} {n, plural, one{терабайт} few{терабайта} many{терабайтов} other{терабайта}}', - 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => 'Вы должны загрузить как минимум {limit, number} {limit, plural, one{файл} few{файла} many{файлов} other{файла}}.', ]; diff --git a/framework/messages/sk/yii.php b/framework/messages/sk/yii.php index 28aaaa78de1..50ff8e981b2 100644 --- a/framework/messages/sk/yii.php +++ b/framework/messages/sk/yii.php @@ -26,6 +26,8 @@ ' and ' => ' a ', '"{attribute}" does not support operator "{operator}".' => '"{attribute}" nepodporuje operátor "{operator}".', '(not set)' => '(nie je nastavené)', + 'Action not found.' => 'Akcia nebola nájdená.', + 'Aliases available: {aliases}' => 'Dostupné aliasy: {aliases}', 'An internal server error occurred.' => 'Vyskytla sa interná chyba servera.', 'Are you sure you want to delete this item?' => 'Skutočne chcete odstrániť tento záznam?', 'Condition for "{attribute}" should be either a value or valid operator specification.' => 'Podmienkou pre "{attribute}" by mala byť hodnota alebo platná špecifikácia operátora.', @@ -43,10 +45,10 @@ 'Only files with these extensions are allowed: {extensions}.' => 'Povolené sú len súbory s nasledovnými príponami: {extensions}.', 'Operator "{operator}" must be used with a search attribute.' => 'Operátor "{operator}" musí byť použitý s atribútom vyhľadávania.', 'Operator "{operator}" requires multiple operands.' => 'Operátor "{operator}" vyžaduje viac operandov.', + 'Options available: {options}' => 'Dostupné možnosti: {options}', 'Page not found.' => 'Stránka nebola nájdená.', 'Please fix the following errors:' => 'Opravte prosím nasledujúce chyby:', 'Please upload a file.' => 'Nahrajte prosím súbor.', - 'Powered by {yii}' => 'Beží na {yii}', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Zobrazujem {begin, number}-{end, number} z {totalCount, number} záznamov.', 'The combination {values} of {attributes} has already been taken.' => 'Kombinácia {values} pre {attributes} je už použitá.', 'The file "{file}" is not an image.' => 'Súbor "{file}" nie je obrázok.', @@ -68,7 +70,6 @@ 'Update' => 'Upraviť', 'View' => 'Náhľad', 'Yes' => 'Áno', - 'Yii Framework' => 'Yii Framework', 'You are not allowed to perform this action.' => 'Nemáte oprávnenie pre požadovanú akciu.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Nahrať môžete najviac {limit, number} {limit, plural, =1{súbor} =2{súbory} =3{súbory} =4{súbory} other{súborov}}.', 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => 'Je potrebné nahrať aspoň {limit, number} {limit, plural, =1{súbor} =2{súbory} =3{súbory} =4{súbory} other{súborov}}.', @@ -108,6 +109,7 @@ '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} musí obsahovať aspoň {min, number} {min, plural, =1{znak} =2{znaky} =3{znaky} =4{znaky} other{znakov}}.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} môže obsahovať najviac {max, number} {max, plural, =1{znak} =2{znaky} =3{znaky} =4{znaky} other{znakov}}.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} musí obsahovať {length, number} {length, plural, =1{znak} =2{znaky} =3{znaky} =4{znaky} other{znakov}}.', + '{compareAttribute} is invalid.' => '', '{delta, plural, =1{1 day} other{# days}}' => '{delta, plural, =1{1 deň} =2{2 dni} =3{3 dni} =4{4 dni} other{# dní}}', '{delta, plural, =1{1 hour} other{# hours}}' => '{delta, plural, =1{1 hodina} =2{2 hodiny} =3{3 hodiny} =4{4 hodiny} other{# hodín}}', '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta, plural, =1{1 minúta} =2{2 minúty} =3{3 minúty} =4{4 minúty} other{# minút}}', @@ -142,7 +144,4 @@ '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '{nFormatted} {n, plural, =1{petabajt} =2{petabajty} =3{petabajty} =4{petabajty} other{petabajtov}}', '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '{nFormatted} {n, plural, =1{tebibajt} =2{tebibajty} =3{tebibajty} =4{tebibajty} other{tebibajtov}}', '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '{nFormatted} {n, plural, =1{terabajt} =2{terabajty} =3{terabajty} =4{terabajty} other{terabajtov}}', - 'Action not found.' => 'Akcia nebola nájdená.', - 'Aliases available: {aliases}' => 'Dostupné aliasy: {aliases}', - 'Options available: {options}' => 'Dostupné možnosti: {options}', ]; diff --git a/framework/messages/sl/yii.php b/framework/messages/sl/yii.php index 7fa542489bb..5b15a08321c 100644 --- a/framework/messages/sl/yii.php +++ b/framework/messages/sl/yii.php @@ -23,10 +23,14 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ - 'just now' => 'ravno zdaj', + ' and ' => '', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(ni nastavljeno)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Prišlo je do notranje napake na strežniku.', 'Are you sure you want to delete this item?' => 'Ste prepričani, da želite izbrisati ta element?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => 'Izbrišite', 'Error' => 'Napaka', 'File upload failed.' => 'Nalaganje datoteke ni bilo uspešno.', @@ -36,19 +40,22 @@ 'Missing required arguments: {params}' => 'Manjkajo zahtevani argumenti: {params}', 'Missing required parameters: {params}' => 'Manjkajo zahtevani parametri: {params}', 'No' => 'Ne', - 'No help for unknown command "{command}".' => 'Pomoči za neznani ukaz "{command}" ni mogoče najti.', - 'No help for unknown sub-command "{command}".' => 'Pomoči za neznani pod-ukaz "{command}" ni mogoče najti.', 'No results found.' => 'Rezultatov ni bilo mogoče najti.', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Dovoljene so samo datoteke s temi MIME tipi: {mimeTypes}.', 'Only files with these extensions are allowed: {extensions}.' => 'Dovoljene so samo datoteke s temi končnicami: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => 'Strani ni mogoče najti.', 'Please fix the following errors:' => 'Prosimo, popravite sledeče napake:', 'Please upload a file.' => 'Prosimo, naložite datoteko.', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Prikaz {begin, number}-{end, number} od {totalCount, number} {totalCount, plural, one{Element} two{Elementa} few{Elementi} other{Elementov}}.', + 'The combination {values} of {attributes} has already been taken.' => '', 'The file "{file}" is not an image.' => 'Datoteka "{file}" ni slika.', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'Datoteka "{file}" je prevelika. Njena velikost {formattedLimit}.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'Datoteka "{file}" je premajhna. Njena velikost ne sme biti manjša od {formattedLimit}.', 'The format of {attribute} is invalid.' => 'Format {attribute} ni veljaven.', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Slika "{file}" je prevelika. Višina ne sme biti večja od {limit, number} {limit, plural, one{piksla} other{pikslov}}.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Slika "{file}" je prevelika. Širina ne sme biti večja od {limit, number} {limit, plural, one{piksla} other{pikslov}}.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Slika "{file}" je premajhna. Višina ne sme biti manjša od {limit, number} {limit, plural, one{piksla} other{pikslov}}.', @@ -57,41 +64,58 @@ 'The verification code is incorrect.' => 'Koda za preverjanje je napačna.', 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Skupaj {count, number} {count, plural, one{element} two{elementa} few{elementi} other{elementov}}.', 'Unable to verify your data submission.' => 'Preverjanje vaših poslanih podatkov ni uspelo.', - 'Unknown command "{command}".' => 'Neznani ukaz "{command}".', + 'Unknown alias: -{name}' => '', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'Neznana opcija: --{name}', 'Update' => 'Posodobitev', 'View' => 'Pogled', 'Yes' => 'Da', 'You are not allowed to perform this action.' => 'Ta akcija ni dovoljena za izvajanje.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Naložite lahko največ {limit, number} {limit, plural, one{datoteko} two{datoteki} few{datoteke} other{datotek}}.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', 'in {delta, plural, =1{a day} other{# days}}' => 'v {delta, plural, one{# dnevu} other{# dneh}}', 'in {delta, plural, =1{a minute} other{# minutes}}' => 'v {delta, plural, one{# minuti} other{# minutah}}', 'in {delta, plural, =1{a month} other{# months}}' => 'v {delta, plural, one{# mesecu} other{# mesecih}}', 'in {delta, plural, =1{a second} other{# seconds}}' => 'v {delta, plural, one{# sekundi} other{# sekundah}}', 'in {delta, plural, =1{a year} other{# years}}' => 'v {delta, plural, one{# letu} other{# letih}}', 'in {delta, plural, =1{an hour} other{# hours}}' => 'v {delta, plural, one{# uri} other{# urah}}', + 'just now' => 'ravno zdaj', 'the input value' => 'vhodna vrednost', '{attribute} "{value}" has already been taken.' => 'Atribut {attribute} "{value}" je že nastavljen.', '{attribute} cannot be blank.' => 'Atribut {attribute} ne more biti prazen', + '{attribute} contains wrong subnet mask.' => '', '{attribute} is invalid.' => 'Atribut {attribute} je neveljaven.', '{attribute} is not a valid URL.' => 'Atribut {attribute} ni veljaven URL.', '{attribute} is not a valid email address.' => 'Atribut {attribute} ni veljaven e-poštni naslov.', + '{attribute} is not in the allowed range.' => '', '{attribute} must be "{requiredValue}".' => '{attribute} mora biti "{requiredValue}".', '{attribute} must be a number.' => '{attribute} mora biti število.', '{attribute} must be a string.' => '{attribute} mora biti niz.', + '{attribute} must be a valid IP address.' => '', + '{attribute} must be an IP address with specified subnet.' => '', '{attribute} must be an integer.' => '{attribute} mora biti celo število.', '{attribute} must be either "{true}" or "{false}".' => '{attribute} mora biti ali "{true}" ali "{false}".', - '{attribute} must be greater than "{compareValue}".' => 'Atribut {attribute} mora biti večji od "{compareValue}".', - '{attribute} must be greater than or equal to "{compareValue}".' => 'Atribut {attribute} mora biti večji ali enak "{compareValue}".', - '{attribute} must be less than "{compareValue}".' => 'Atribut {attribute} mora biti manjši od "{compareValue}".', - '{attribute} must be less than or equal to "{compareValue}".' => 'Atribut {attribute} mora biti manjši ali enak "{compareValue}".', + '{attribute} must be equal to "{compareValueOrAttribute}".' => '', + '{attribute} must be greater than "{compareValueOrAttribute}".' => 'Atribut {attribute} mora biti večji od "{compareValueOrAttribute}".', + '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => 'Atribut {attribute} mora biti večji ali enak "{compareValueOrAttribute}".', + '{attribute} must be less than "{compareValueOrAttribute}".' => 'Atribut {attribute} mora biti manjši od "{compareValueOrAttribute}".', + '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => 'Atribut {attribute} mora biti manjši ali enak "{compareValueOrAttribute}".', '{attribute} must be no greater than {max}.' => 'Atribut {attribute} ne sme biti večji od {max}', '{attribute} must be no less than {min}.' => 'Atribut {attribute} ne sme biti manjši od {min}.', - '{attribute} must be repeated exactly.' => 'Atribut {attribute} mora biti točno ponovljen.', - '{attribute} must not be equal to "{compareValue}".' => 'Atribut {attribute} ne sme biti enak "{compareValue}".', + '{attribute} must not be a subnet.' => '', + '{attribute} must not be an IPv4 address.' => '', + '{attribute} must not be an IPv6 address.' => '', + '{attribute} must not be equal to "{compareValueOrAttribute}".' => 'Atribut {attribute} ne sme biti enak "{compareValueOrAttribute}".', '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => 'Atribut {attribute} mora vsebovati vsaj {min, number} {min, plural, one{znak} two{znaka} few{znake} other{znakov}}.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => 'Atribut {attribute} mora vsebovati največ {max, number} {max, plural, one{znak} two{znaka} few{znake} other{znakov}}.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => 'Atribut {attribute} mora vsebovati {length, number} {length, plural, one{znak} two{znaka} few{znake} other{znakov}}.', + '{compareAttribute} is invalid.' => '', + '{delta, plural, =1{1 day} other{# days}}' => '', + '{delta, plural, =1{1 hour} other{# hours}}' => '', + '{delta, plural, =1{1 minute} other{# minutes}}' => '', + '{delta, plural, =1{1 month} other{# months}}' => '', + '{delta, plural, =1{1 second} other{# seconds}}' => '', + '{delta, plural, =1{1 year} other{# years}}' => '', '{delta, plural, =1{a day} other{# days}} ago' => 'pred {delta, plural, one{# dnevom} two{# dnevoma} other{# dnevi}}', '{delta, plural, =1{a minute} other{# minutes}} ago' => 'pred {delta, plural, one{# minuto} two{# minutama} other{# minutami}}', '{delta, plural, =1{a month} other{# months}} ago' => 'pred {delta, plural, one{# mesecem} two{# mesecema} other{# meseci}}', @@ -101,7 +125,6 @@ '{nFormatted} B' => '{nFormatted} B', '{nFormatted} GB' => '{nFormatted} GB', '{nFormatted} GiB' => '{nFormatted} GiB', - '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} KiB' => '{nFormatted} KiB', '{nFormatted} MB' => '{nFormatted} MB', '{nFormatted} MiB' => '{nFormatted} MiB', @@ -109,6 +132,7 @@ '{nFormatted} PiB' => '{nFormatted} PiB', '{nFormatted} TB' => '{nFormatted} TB', '{nFormatted} TiB' => '{nFormatted} TiB', + '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, one{bajt} two{bajta} few{bajti} other{bajtov}}', '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} {n, plural, one{gibibajt} two{gibibajta} few{gibibajti} other{gibibajtov}}', '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, one{gigabajt} two{gigabajta} few{gigabajti} other{gigabajtov}}', diff --git a/framework/messages/sr-Latn/yii.php b/framework/messages/sr-Latn/yii.php index e4467b9a679..768dbd8eacd 100644 --- a/framework/messages/sr-Latn/yii.php +++ b/framework/messages/sr-Latn/yii.php @@ -23,36 +23,14 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ - 'just now' => 'upravo sada', - 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Samo sledeći MIME tipovi su dozvoljeni: {mimeTypes}.', - 'The requested view "{name}" was not found.' => 'Traženi prikaz "{name}" nije pronađen.', - 'in {delta, plural, =1{a day} other{# days}}' => 'za {delta, plural, =1{dan} one{# dan} few{# dana} many{# dana} other{# dana}}', - 'in {delta, plural, =1{a minute} other{# minutes}}' => 'za {delta, plural, =1{minut} one{# minut} few{# minuta} many{# minuta} other{# minuta}}', - 'in {delta, plural, =1{a month} other{# months}}' => 'za {delta, plural, =1{mesec} one{# mesec} few{# meseca} many{# meseci} other{# meseci}}', - 'in {delta, plural, =1{a second} other{# seconds}}' => 'za {delta, plural, =1{sekundu} one{# sekundu} few{# sekunde} many{# sekundi} other{# sekundi}}', - 'in {delta, plural, =1{a year} other{# years}}' => 'za {delta, plural, =1{godinu} one{# godinu} few{# godine} many{# godina} other{# godina}}', - 'in {delta, plural, =1{an hour} other{# hours}}' => 'za {delta, plural, =1{sat} one{# sat} few{# sata} many{# sati} other{# sati}}', - '{delta, plural, =1{a day} other{# days}} ago' => 'pre {delta, plural, =1{dan} one{# dan} few{# dana} many{# dana} other{# dana}}', - '{delta, plural, =1{a minute} other{# minutes}} ago' => 'pre {delta, plural, =1{minut} one{# minut} few{# minuta} many{# minuta} other{# minuta}}', - '{delta, plural, =1{a month} other{# months}} ago' => 'pre {delta, plural, =1{mesec} one{# meseca} few{# meseca} many{# meseci} other{# meseci}}', - '{delta, plural, =1{a second} other{# seconds}} ago' => 'pre {delta, plural, =1{sekundu} one{# sekunde} few{# sekunde} many{# sekundi} other{# sekundi}}', - '{delta, plural, =1{a year} other{# years}} ago' => 'pre {delta, plural, =1{godinu} one{# godine} few{# godine} many{# godina} other{# godina}}', - '{delta, plural, =1{an hour} other{# hours}} ago' => 'pre {delta, plural, =1{sat} one{# sat} few{# sata} many{# sati} other{# sati}}', - '{n, plural, =1{# byte} other{# bytes}}' => '{n, plural, one{# bajt} few{# bajta} many{# bajtova} other{# bajta}}', - '{n, plural, =1{# gigabyte} other{# gigabytes}}' => '{n, plural, one{# gigabajt} few{# gigabajta} many{# gigabajta} other{# gigabajta}}', - '{n, plural, =1{# kilobyte} other{# kilobytes}}' => '{n, plural, one{# kilobajt} few{# kilobajta} many{# kilobajta} other{# kilobajta}}', - '{n, plural, =1{# megabyte} other{# megabytes}}' => '{n, plural, one{# megabajt} few{# megabajta} many{# megabajta} other{# megabajta}}', - '{n, plural, =1{# petabyte} other{# petabytes}}' => '{n, plural, one{# petabajt} few{# petabajta} many{# petabajta} other{# petabajta}}', - '{n, plural, =1{# terabyte} other{# terabytes}}' => '{n, plural, one{# terabajt} few{# terabajta} many{# terabajta} other{# terabajta}}', - '{n} B' => '{n} B', - '{n} GB' => '{n} GB', - '{n} KB' => '{n} KB', - '{n} MB' => '{n} MB', - '{n} PB' => '{n} PB', - '{n} TB' => '{n} TB', + ' and ' => '', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(bez vrednosti)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Došlo je do interne greške na serveru.', 'Are you sure you want to delete this item?' => 'Da li ste sigurni da želite da obrišete ovu stavku?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => 'Obriši', 'Error' => 'Greška', 'File upload failed.' => 'Postavljanje fajla nije uspelo.', @@ -62,52 +40,108 @@ 'Missing required arguments: {params}' => 'Nedostaju obavezni argumenti: {params}', 'Missing required parameters: {params}' => 'Nedostaju obavezni parametri: {params}', 'No' => 'Ne', - 'No help for unknown command "{command}".' => 'Ne postoji pomoć za nepoznatu komandu "{command}".', - 'No help for unknown sub-command "{command}".' => 'Ne postoji pomoć za nepoznatu pod-komandu "{command}".', 'No results found.' => 'Nema rezultata.', + 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Samo sledeći MIME tipovi su dozvoljeni: {mimeTypes}.', 'Only files with these extensions are allowed: {extensions}.' => 'Samo fajlovi sa sledećim ekstenzijama su dozvoljeni: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => 'Stranica nije pronađena.', 'Please fix the following errors:' => 'Molimo vas ispravite sledeće greške:', 'Please upload a file.' => 'Molimo vas postavite fajl.', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Prikazano {begin, number}-{end, number} od {totalCount, number} {totalCount, plural, =1{stavke} one{stavke} few{stavke} many{stavki} other{stavki}}.', + 'The combination {values} of {attributes} has already been taken.' => '', 'The file "{file}" is not an image.' => 'Fajl "{file}" nije slika.', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'Fajl "{file}" je prevelik. Veličina ne može biti veća od {formattedLimit}.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'Fajl "{file}" je premali. Veličina ne može biti manja od {formattedLimit}.', 'The format of {attribute} is invalid.' => 'Format atributa "{attribute}" je neispravan.', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Slika "{file}" je prevelika. Visina ne sme biti veća od {limit, number} {limit, plural, one{piksel} other{piksela}}.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Slika "{file}" je prevelika. Širina ne sme biti veća od {limit, number} {limit, plural, one{piksel} other{piksela}}.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Slika "{file}" je premala. Visina ne sme biti manja od {limit, number} {limit, plural, one{piksel} other{piksela}}.', 'The image "{file}" is too small. The width cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Slika "{file}" je premala. Širina ne sme biti manja od {limit, number} {limit, plural, one{piksel} other{piksela}}.', + 'The requested view "{name}" was not found.' => 'Traženi prikaz "{name}" nije pronađen.', 'The verification code is incorrect.' => 'Kod za potvrdu nije ispravan.', 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Ukupno {count, number} {count, plural, one{stavka} few{stavke} other{stavki}}.', 'Unable to verify your data submission.' => 'Nije moguće verifikovati vaše poslate podatke.', - 'Unknown command "{command}".' => 'Nepoznata komanda "{command}".', + 'Unknown alias: -{name}' => '', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'Nepoznata opcija: --{name}', 'Update' => 'Ispravi', 'View' => 'Prikaz', 'Yes' => 'Da', 'You are not allowed to perform this action.' => 'Nemate prava da izvršite ovu akciju.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Možete postaviti najviše {limit, number} {limit, plural, one{fajl} few{fajla} other{fajlova}}.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', + 'in {delta, plural, =1{a day} other{# days}}' => 'za {delta, plural, =1{dan} one{# dan} few{# dana} many{# dana} other{# dana}}', + 'in {delta, plural, =1{a minute} other{# minutes}}' => 'za {delta, plural, =1{minut} one{# minut} few{# minuta} many{# minuta} other{# minuta}}', + 'in {delta, plural, =1{a month} other{# months}}' => 'za {delta, plural, =1{mesec} one{# mesec} few{# meseca} many{# meseci} other{# meseci}}', + 'in {delta, plural, =1{a second} other{# seconds}}' => 'za {delta, plural, =1{sekundu} one{# sekundu} few{# sekunde} many{# sekundi} other{# sekundi}}', + 'in {delta, plural, =1{a year} other{# years}}' => 'za {delta, plural, =1{godinu} one{# godinu} few{# godine} many{# godina} other{# godina}}', + 'in {delta, plural, =1{an hour} other{# hours}}' => 'za {delta, plural, =1{sat} one{# sat} few{# sata} many{# sati} other{# sati}}', + 'just now' => 'upravo sada', 'the input value' => 'ulazna vrednost', '{attribute} "{value}" has already been taken.' => '{attribute} "{value}" je već zauzet.', '{attribute} cannot be blank.' => '{attribute} ne sme biti prazan.', + '{attribute} contains wrong subnet mask.' => '', '{attribute} is invalid.' => '{attribute} je neispravan.', '{attribute} is not a valid URL.' => '{attribute} nije ispravan URL.', '{attribute} is not a valid email address.' => '{attribute} nije ispravna email adresa.', + '{attribute} is not in the allowed range.' => '', '{attribute} must be "{requiredValue}".' => '{attribute} mora biti "{requiredValue}".', '{attribute} must be a number.' => '{attribute} mora biti broj.', '{attribute} must be a string.' => '{attribute} mora biti tekst.', + '{attribute} must be a valid IP address.' => '', + '{attribute} must be an IP address with specified subnet.' => '', '{attribute} must be an integer.' => '{attribute} mora biti celi broj.', '{attribute} must be either "{true}" or "{false}".' => '{attribute} mora biti "{true}" ili "{false}".', - '{attribute} must be greater than "{compareValue}".' => '{attribute} mora biti veći od "{compareValue}".', - '{attribute} must be greater than or equal to "{compareValue}".' => '{attribute} mora biti veći ili jednak "{compareValue}".', - '{attribute} must be less than "{compareValue}".' => '{attribute} mora biti manji od "{compareValue}".', - '{attribute} must be less than or equal to "{compareValue}".' => '{attribute} mora biti manji ili jednak "{compareValue}".', + '{attribute} must be equal to "{compareValueOrAttribute}".' => '', + '{attribute} must be greater than "{compareValueOrAttribute}".' => '{attribute} mora biti veći od "{compareValueOrAttribute}".', + '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '{attribute} mora biti veći ili jednak "{compareValueOrAttribute}".', + '{attribute} must be less than "{compareValueOrAttribute}".' => '{attribute} mora biti manji od "{compareValueOrAttribute}".', + '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '{attribute} mora biti manji ili jednak "{compareValueOrAttribute}".', '{attribute} must be no greater than {max}.' => '{attribute} ne sme biti veći od "{max}".', '{attribute} must be no less than {min}.' => '{attribute} ne sme biti manji od {min}.', - '{attribute} must be repeated exactly.' => '{attribute} mora biti ispravno ponovljen.', - '{attribute} must not be equal to "{compareValue}".' => '{attribute} ne sme biti jednak "{compareValue}".', + '{attribute} must not be a subnet.' => '', + '{attribute} must not be an IPv4 address.' => '', + '{attribute} must not be an IPv6 address.' => '', + '{attribute} must not be equal to "{compareValueOrAttribute}".' => '{attribute} ne sme biti jednak "{compareValueOrAttribute}".', '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} treba da sadrži bar {min, number} {min, plural, one{karakter} other{karaktera}}.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} treba da sadrži najviše {max, number} {max, plural, one{karakter} other{karaktera}}.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} treba da sadrži {length, number} {length, plural, one{karakter} other{karaktera}}.', + '{compareAttribute} is invalid.' => '', + '{delta, plural, =1{1 day} other{# days}}' => '', + '{delta, plural, =1{1 hour} other{# hours}}' => '', + '{delta, plural, =1{1 minute} other{# minutes}}' => '', + '{delta, plural, =1{1 month} other{# months}}' => '', + '{delta, plural, =1{1 second} other{# seconds}}' => '', + '{delta, plural, =1{1 year} other{# years}}' => '', + '{delta, plural, =1{a day} other{# days}} ago' => 'pre {delta, plural, =1{dan} one{# dan} few{# dana} many{# dana} other{# dana}}', + '{delta, plural, =1{a minute} other{# minutes}} ago' => 'pre {delta, plural, =1{minut} one{# minut} few{# minuta} many{# minuta} other{# minuta}}', + '{delta, plural, =1{a month} other{# months}} ago' => 'pre {delta, plural, =1{mesec} one{# meseca} few{# meseca} many{# meseci} other{# meseci}}', + '{delta, plural, =1{a second} other{# seconds}} ago' => 'pre {delta, plural, =1{sekundu} one{# sekunde} few{# sekunde} many{# sekundi} other{# sekundi}}', + '{delta, plural, =1{a year} other{# years}} ago' => 'pre {delta, plural, =1{godinu} one{# godine} few{# godine} many{# godina} other{# godina}}', + '{delta, plural, =1{an hour} other{# hours}} ago' => 'pre {delta, plural, =1{sat} one{# sat} few{# sata} many{# sati} other{# sati}}', + '{nFormatted} B' => '{nFormatted} B', + '{nFormatted} GB' => '{nFormatted} GB', + '{nFormatted} GiB' => '', + '{nFormatted} KiB' => '', + '{nFormatted} MB' => '{nFormatted} MB', + '{nFormatted} MiB' => '', + '{nFormatted} PB' => '{nFormatted} PB', + '{nFormatted} PiB' => '', + '{nFormatted} TB' => '{nFormatted} TB', + '{nFormatted} TiB' => '', + '{nFormatted} kB' => '{nFormatted} kB', + '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, one{bajt} few{bajta} many{bajtova} other{bajta}}', + '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '', + '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, one{gigabajt} few{gigabajta} many{gigabajta} other{gigabajta}}', + '{nFormatted} {n, plural, =1{kibibyte} other{kibibytes}}' => '', + '{nFormatted} {n, plural, =1{kilobyte} other{kilobytes}}' => '{nFormatted} {n, plural, one{kilobajt} few{kilobajta} many{kilobajta} other{kilobajta}}', + '{nFormatted} {n, plural, =1{mebibyte} other{mebibytes}}' => '', + '{nFormatted} {n, plural, =1{megabyte} other{megabytes}}' => '{nFormatted} {n, plural, one{megabajt} few{megabajta} many{megabajta} other{megabajta}}', + '{nFormatted} {n, plural, =1{pebibyte} other{pebibytes}}' => '', + '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '{nFormatted} {n, plural, one{petabajt} few{petabajta} many{petabajta} other{petabajta}}', + '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '', + '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '{nFormatted} {n, plural, one{terabajt} few{terabajta} many{terabajta} other{terabajta}}', ]; diff --git a/framework/messages/sr/yii.php b/framework/messages/sr/yii.php index 6e7ba378329..7262ded5773 100644 --- a/framework/messages/sr/yii.php +++ b/framework/messages/sr/yii.php @@ -23,36 +23,14 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ - 'just now' => 'управо сада', - 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Само следећи MIME типови су дозвољени: {mimeTypes}.', - 'The requested view "{name}" was not found.' => 'Тражени приказ "{name}" није пронађен.', - 'in {delta, plural, =1{a day} other{# days}}' => 'за {delta, plural, =1{дан} one{# дан} few{# дана} many{# дана} other{# дана}}', - 'in {delta, plural, =1{a minute} other{# minutes}}' => 'за {delta, plural, =1{минут} one{# минут} few{# минута} many{# минута} other{# минута}}', - 'in {delta, plural, =1{a month} other{# months}}' => 'за {delta, plural, =1{месец} one{# месец} few{# месеца} many{# месеци} other{# месеци}}', - 'in {delta, plural, =1{a second} other{# seconds}}' => 'за {delta, plural, =1{секунду} one{# секунду} few{# секундe} many{# секунди} other{# секунди}}', - 'in {delta, plural, =1{a year} other{# years}}' => 'за {delta, plural, =1{годину} one{# годину} few{# године} many{# година} other{# година}}', - 'in {delta, plural, =1{an hour} other{# hours}}' => 'за {delta, plural, =1{сат} one{# сат} few{# сата} many{# сати} other{# сати}}', - '{delta, plural, =1{a day} other{# days}} ago' => 'пре {delta, plural, =1{дан} one{дан} few{# дана} many{# дана} other{# дана}}', - '{delta, plural, =1{a minute} other{# minutes}} ago' => 'пре {delta, plural, =1{минут} one{# минут} few{# минута} many{# минута} other{# минута}}', - '{delta, plural, =1{a month} other{# months}} ago' => 'пре {delta, plural, =1{месец} one{# месец} few{# месеца} many{# месеци} other{# месеци}}', - '{delta, plural, =1{a second} other{# seconds}} ago' => 'пре {delta, plural, =1{секунде} one{# секунде} few{# секунде} many{# секунди} other{# секунди}}', - '{delta, plural, =1{a year} other{# years}} ago' => 'пре {delta, plural, =1{године} one{# године} few{# године} many{# година} other{# година}}', - '{delta, plural, =1{an hour} other{# hours}} ago' => 'пре {delta, plural, =1{сат} one{# сат} few{# сата} many{# сати} other{# сати}}', - '{n, plural, =1{# byte} other{# bytes}}' => '{n, plural, one{# бајт} few{# бајта} many{# бајтова} other{# бајта}}', - '{n, plural, =1{# gigabyte} other{# gigabytes}}' => '{n, plural, one{# гигабајт} few{# гигабајта} many{# гигабајта} other{# гигабајта}}', - '{n, plural, =1{# kilobyte} other{# kilobytes}}' => '{n, plural, one{# килобајт} few{# килобајта} many{# килобајта} other{# килобајта}}', - '{n, plural, =1{# megabyte} other{# megabytes}}' => '{n, plural, one{# мегабајт} few{# мегабајта} many{# мегабајта} other{# мегабајта}}', - '{n, plural, =1{# petabyte} other{# petabytes}}' => '{n, plural, one{# петабајт} few{# петабајта} many{# петабајта} other{# петабајта}}', - '{n, plural, =1{# terabyte} other{# terabytes}}' => '{n, plural, one{# терабајт} few{# терабајта} many{# терабајта} other{# терабајта}}', - '{n} B' => '{n} Б', - '{n} GB' => '{n} ГБ', - '{n} KB' => '{n} КБ', - '{n} MB' => '{n} МБ', - '{n} PB' => '{n} ПБ', - '{n} TB' => '{n} ТБ', + ' and ' => '', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(без вредности)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Дошло је до интерне грешке на серверу.', 'Are you sure you want to delete this item?' => 'Да ли сте сигурни да желите да обришете ову ставку?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => 'Обриши', 'Error' => 'Грешка', 'File upload failed.' => 'Постављање фајла није успело.', @@ -62,52 +40,108 @@ 'Missing required arguments: {params}' => 'Недостају обавезни аргументи: {params}', 'Missing required parameters: {params}' => 'Недостају обавезни параметри: {params}', 'No' => 'Не', - 'No help for unknown command "{command}".' => 'Не постоји помоћ за непознату команду "{command}".', - 'No help for unknown sub-command "{command}".' => 'Не постоји помоћ за непознату под-команду "{command}".', 'No results found.' => 'Нема резултата.', + 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Само следећи MIME типови су дозвољени: {mimeTypes}.', 'Only files with these extensions are allowed: {extensions}.' => 'Само фајлови са следећим екстензијама су дозвољени: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => 'Страница није пронађена.', 'Please fix the following errors:' => 'Молимо вас исправите следеће грешке:', 'Please upload a file.' => 'Молимо вас поставите фајл.', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Приказано {begin, number}-{end, number} од {totalCount, number} {totalCount, plural, =1{ставке} one{ставкe} few{ставке} many{ставки} other{ставки}}.', + 'The combination {values} of {attributes} has already been taken.' => '', 'The file "{file}" is not an image.' => 'Фајл "{file}" није слика.', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'Фајл "{file}" је превелик. Величина не може бити већа од {formattedLimit}.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'Фајл "{file}" је премали. Величина не може бити мања од {formattedLimit}.', 'The format of {attribute} is invalid.' => 'Формат атрибута "{attribute}" је неисправан.', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Слика "{file}" је превелика. Висина не сме бити већа од {limit, number} {limit, plural, one{пиксел} other{пиксела}}.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Слика "{file}" је превелика. Ширина не сме бити већа од {limit, number} {limit, plural, one{пиксел} other{пиксела}}.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Слика "{file}" је премала. Висина не сме бити мања од {limit, number} {limit, plural, one{пиксел} other{пиксела}}.', 'The image "{file}" is too small. The width cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Слика "{file}" је премала. Ширина не сме бити мања од {limit, number} {limit, plural, one{пиксел} other{пиксела}}.', + 'The requested view "{name}" was not found.' => 'Тражени приказ "{name}" није пронађен.', 'The verification code is incorrect.' => 'Код за потврду није исправан.', 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Укупно {count, number} {count, plural, one{ставка} few{ставке} other{ставки}}.', 'Unable to verify your data submission.' => 'Није могуће верификовати ваше послате податке.', - 'Unknown command "{command}".' => 'Непозната команда "{command}".', + 'Unknown alias: -{name}' => '', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'Непозната опција: --{name}', 'Update' => 'Исправи', 'View' => 'Приказ', 'Yes' => 'Да', 'You are not allowed to perform this action.' => 'Немате права да извршите ову акцију.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Можете поставити највише {limit, number} {limit, plural, one{фајл} few{фајлa} other{фајлова}}.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', + 'in {delta, plural, =1{a day} other{# days}}' => 'за {delta, plural, =1{дан} one{# дан} few{# дана} many{# дана} other{# дана}}', + 'in {delta, plural, =1{a minute} other{# minutes}}' => 'за {delta, plural, =1{минут} one{# минут} few{# минута} many{# минута} other{# минута}}', + 'in {delta, plural, =1{a month} other{# months}}' => 'за {delta, plural, =1{месец} one{# месец} few{# месеца} many{# месеци} other{# месеци}}', + 'in {delta, plural, =1{a second} other{# seconds}}' => 'за {delta, plural, =1{секунду} one{# секунду} few{# секундe} many{# секунди} other{# секунди}}', + 'in {delta, plural, =1{a year} other{# years}}' => 'за {delta, plural, =1{годину} one{# годину} few{# године} many{# година} other{# година}}', + 'in {delta, plural, =1{an hour} other{# hours}}' => 'за {delta, plural, =1{сат} one{# сат} few{# сата} many{# сати} other{# сати}}', + 'just now' => 'управо сада', 'the input value' => 'улазна вредност', '{attribute} "{value}" has already been taken.' => '{attribute} "{value}" је већ заузет.', '{attribute} cannot be blank.' => '{attribute} не сме бити празан.', + '{attribute} contains wrong subnet mask.' => '', '{attribute} is invalid.' => '{attribute} је неисправан.', '{attribute} is not a valid URL.' => '{attribute} није исправан URL.', '{attribute} is not a valid email address.' => '{attribute} није исправна email адреса.', + '{attribute} is not in the allowed range.' => '', '{attribute} must be "{requiredValue}".' => '{attribute} мора бити "{requiredValue}".', '{attribute} must be a number.' => '{attribute} мора бити број.', '{attribute} must be a string.' => '{attribute} мора бити текст.', + '{attribute} must be a valid IP address.' => '', + '{attribute} must be an IP address with specified subnet.' => '', '{attribute} must be an integer.' => '{attribute} мора бити цели број.', '{attribute} must be either "{true}" or "{false}".' => '{attribute} мора бити "{true}" или "{false}".', - '{attribute} must be greater than "{compareValue}".' => '{attribute} мора бити већи од "{compareValue}".', - '{attribute} must be greater than or equal to "{compareValue}".' => '{attribute} мора бити већи или једнак "{compareValue}".', - '{attribute} must be less than "{compareValue}".' => '{attribute} мора бити мањи од "{compareValue}".', - '{attribute} must be less than or equal to "{compareValue}".' => '{attribute} мора бити мањи или једнак "{compareValue}".', + '{attribute} must be equal to "{compareValueOrAttribute}".' => '', + '{attribute} must be greater than "{compareValueOrAttribute}".' => '{attribute} мора бити већи од "{compareValueOrAttribute}".', + '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '{attribute} мора бити већи или једнак "{compareValueOrAttribute}".', + '{attribute} must be less than "{compareValueOrAttribute}".' => '{attribute} мора бити мањи од "{compareValueOrAttribute}".', + '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '{attribute} мора бити мањи или једнак "{compareValueOrAttribute}".', '{attribute} must be no greater than {max}.' => '{attribute} не сме бити већи од "{max}".', '{attribute} must be no less than {min}.' => '{attribute} не сме бити мањи од {min}.', - '{attribute} must be repeated exactly.' => '{attribute} мора бити исправно поновљен.', - '{attribute} must not be equal to "{compareValue}".' => '{attribute} не сме бити једнак "{compareValue}".', + '{attribute} must not be a subnet.' => '', + '{attribute} must not be an IPv4 address.' => '', + '{attribute} must not be an IPv6 address.' => '', + '{attribute} must not be equal to "{compareValueOrAttribute}".' => '{attribute} не сме бити једнак "{compareValueOrAttribute}".', '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} треба да садржи барем {min, number} {min, plural, one{карактер} other{карактера}}.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} треба да садржи највише {max, number} {max, plural, one{карактер} other{карактера}}.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} треба да садржи {length, number} {length, plural, one{карактер} other{карактера}}.', + '{compareAttribute} is invalid.' => '', + '{delta, plural, =1{1 day} other{# days}}' => '', + '{delta, plural, =1{1 hour} other{# hours}}' => '', + '{delta, plural, =1{1 minute} other{# minutes}}' => '', + '{delta, plural, =1{1 month} other{# months}}' => '', + '{delta, plural, =1{1 second} other{# seconds}}' => '', + '{delta, plural, =1{1 year} other{# years}}' => '', + '{delta, plural, =1{a day} other{# days}} ago' => 'пре {delta, plural, =1{дан} one{дан} few{# дана} many{# дана} other{# дана}}', + '{delta, plural, =1{a minute} other{# minutes}} ago' => 'пре {delta, plural, =1{минут} one{# минут} few{# минута} many{# минута} other{# минута}}', + '{delta, plural, =1{a month} other{# months}} ago' => 'пре {delta, plural, =1{месец} one{# месец} few{# месеца} many{# месеци} other{# месеци}}', + '{delta, plural, =1{a second} other{# seconds}} ago' => 'пре {delta, plural, =1{секунде} one{# секунде} few{# секунде} many{# секунди} other{# секунди}}', + '{delta, plural, =1{a year} other{# years}} ago' => 'пре {delta, plural, =1{године} one{# године} few{# године} many{# година} other{# година}}', + '{delta, plural, =1{an hour} other{# hours}} ago' => 'пре {delta, plural, =1{сат} one{# сат} few{# сата} many{# сати} other{# сати}}', + '{nFormatted} B' => '{nFormatted} Б', + '{nFormatted} GB' => '{nFormatted} ГБ', + '{nFormatted} GiB' => '', + '{nFormatted} KiB' => '', + '{nFormatted} MB' => '{nFormatted} МБ', + '{nFormatted} MiB' => '', + '{nFormatted} PB' => '{nFormatted} ПБ', + '{nFormatted} PiB' => '', + '{nFormatted} TB' => '{nFormatted} ТБ', + '{nFormatted} TiB' => '', + '{nFormatted} kB' => '{nFormatted} кБ', + '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, one{бајт} few{бајта} many{бајтова} other{бајта}}', + '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '', + '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, one{гигабајт} few{гигабајта} many{гигабајта} other{гигабајта}}', + '{nFormatted} {n, plural, =1{kibibyte} other{kibibytes}}' => '', + '{nFormatted} {n, plural, =1{kilobyte} other{kilobytes}}' => '{nFormatted} {n, plural, one{килобајт} few{килобајта} many{килобајта} other{килобајта}}', + '{nFormatted} {n, plural, =1{mebibyte} other{mebibytes}}' => '', + '{nFormatted} {n, plural, =1{megabyte} other{megabytes}}' => '{nFormatted} {n, plural, one{мегабајт} few{мегабајта} many{мегабајта} other{мегабајта}}', + '{nFormatted} {n, plural, =1{pebibyte} other{pebibytes}}' => '', + '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '{nFormatted} {n, plural, one{петабајт} few{петабајта} many{петабајта} other{петабајта}}', + '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '', + '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '{nFormatted} {n, plural, one{терабајт} few{терабајта} many{терабајта} other{терабајта}}', ]; diff --git a/framework/messages/sv/yii.php b/framework/messages/sv/yii.php index b3777626b02..4be34190894 100644 --- a/framework/messages/sv/yii.php +++ b/framework/messages/sv/yii.php @@ -23,9 +23,14 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + ' and ' => '', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(ej satt)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Ett internt serverfel har inträffat.', 'Are you sure you want to delete this item?' => 'Är du säker på att du vill radera objektet?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => 'Radera', 'Error' => 'Error', 'File upload failed.' => 'Uppladdningen misslyckades.', @@ -38,14 +43,19 @@ 'No results found.' => 'Inga resultat hittades.', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Endast filer med följande MIME-typer är tillåtna: {mimeTypes}', 'Only files with these extensions are allowed: {extensions}.' => 'Endast filer med följande filnamnstillägg är tillåtna: {extensions}', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => 'Sidan hittades inte.', 'Please fix the following errors:' => 'Var god fixa följande fel:', 'Please upload a file.' => 'Var god ladda upp en fil.', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Visar {begin, number}-{end, number} av {totalCount, number} objekt.', + 'The combination {values} of {attributes} has already been taken.' => '', 'The file "{file}" is not an image.' => 'Filen "{file}" är inte en bild.', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'Filen "{file}" är för stor. Filstorleken får inte överskrida {formattedLimit}.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'Filen "{file}" är för liten. Filstorleken måste vara minst {formattedLimit}.', 'The format of {attribute} is invalid.' => 'Formatet för "{attribute}" är ogiltigt.', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Bilden "{file}" är för stor. Höjden får inte överskrida {limit, number} {limit, plural, =1{pixel} other{pixlar}}.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Bilden "{file}" är för stor. Bredden får inte överskrida {limit, number} {limit, plural, =1{pixel} other{pixlar}}.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Bilden "{file}" är för liten. Bilden måste vara minst {limit, number} {limit, plural, =1{pixel} other{pixlar}} hög.', @@ -54,12 +64,15 @@ 'The verification code is incorrect.' => 'Verifieringskoden är felaktig.', 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Totalt {count, number} objekt.', 'Unable to verify your data submission.' => 'Det gick inte att verifiera skickad data.', + 'Unknown alias: -{name}' => '', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'Okänt alternativ: --{name}', 'Update' => 'Uppdatera', 'View' => 'Visa', 'Yes' => 'Ja', 'You are not allowed to perform this action.' => 'Du har inte behörighet att utföra den här åtgärden.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Du får inte ladda upp mer än {limit, number} {limit, plural, =1{fil} other{filer}}.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', 'in {delta, plural, =1{a day} other{# days}}' => 'under {delta, plural, =1{en dag} other{# dagar}}', 'in {delta, plural, =1{a minute} other{# minutes}}' => 'under {delta, plural, =1{en minut} other{# minuter}}', 'in {delta, plural, =1{a month} other{# months}}' => 'under {delta, plural, =1{en månad} other{# månader}}', @@ -70,25 +83,39 @@ 'the input value' => 'inmatningsvärdet', '{attribute} "{value}" has already been taken.' => '{attribute} "{value}" används redan.', '{attribute} cannot be blank.' => 'Värdet för {attribute} får inte vara tomt.', + '{attribute} contains wrong subnet mask.' => '', '{attribute} is invalid.' => 'Värdet för {attribute} är ogiltigt.', '{attribute} is not a valid URL.' => '{attribute} är inte en giltig URL.', '{attribute} is not a valid email address.' => '{attribute} är inte en giltig emailadress.', + '{attribute} is not in the allowed range.' => '', '{attribute} must be "{requiredValue}".' => '{attribute} måste vara satt till "{requiredValue}".', '{attribute} must be a number.' => '{attribute} måste vara ett nummer.', '{attribute} must be a string.' => '{attribute} måste vara en sträng.', + '{attribute} must be a valid IP address.' => '', + '{attribute} must be an IP address with specified subnet.' => '', '{attribute} must be an integer.' => '{attribute} måste vara ett heltal.', '{attribute} must be either "{true}" or "{false}".' => '{attribute} måste vara satt till antingen "{true}" eller "{false}".', - '{attribute} must be greater than "{compareValue}".' => '{attribute} måste vara större än "{compareValue}".', - '{attribute} must be greater than or equal to "{compareValue}".' => '{attribute} måste vara större än eller lika med "{compareValue}".', - '{attribute} must be less than "{compareValue}".' => '{attribute} måste vara mindre än "{compareValue}".', - '{attribute} must be less than or equal to "{compareValue}".' => '{attribute} måste vara mindre än eller lika med "{compareValue}".', + '{attribute} must be equal to "{compareValueOrAttribute}".' => '', + '{attribute} must be greater than "{compareValueOrAttribute}".' => '{attribute} måste vara större än "{compareValueOrAttribute}".', + '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '{attribute} måste vara större än eller lika med "{compareValueOrAttribute}".', + '{attribute} must be less than "{compareValueOrAttribute}".' => '{attribute} måste vara mindre än "{compareValueOrAttribute}".', + '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '{attribute} måste vara mindre än eller lika med "{compareValueOrAttribute}".', '{attribute} must be no greater than {max}.' => '{attribute} får inte överskrida {max}.', '{attribute} must be no less than {min}.' => '{attribute} får som minst vara {min}.', - '{attribute} must be repeated exactly.' => '{attribute} måste upprepas exakt.', - '{attribute} must not be equal to "{compareValue}".' => '{attribute} får inte vara satt till "{compareValue}".', + '{attribute} must not be a subnet.' => '', + '{attribute} must not be an IPv4 address.' => '', + '{attribute} must not be an IPv6 address.' => '', + '{attribute} must not be equal to "{compareValueOrAttribute}".' => '{attribute} får inte vara satt till "{compareValueOrAttribute}".', '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} bör innehålla minst {min, number} tecken.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} bör innehålla max {max, number} tecken.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} bör innehålla {length, number} tecken.', + '{compareAttribute} is invalid.' => '', + '{delta, plural, =1{1 day} other{# days}}' => '', + '{delta, plural, =1{1 hour} other{# hours}}' => '', + '{delta, plural, =1{1 minute} other{# minutes}}' => '', + '{delta, plural, =1{1 month} other{# months}}' => '', + '{delta, plural, =1{1 second} other{# seconds}}' => '', + '{delta, plural, =1{1 year} other{# years}}' => '', '{delta, plural, =1{a day} other{# days}} ago' => '{delta, plural, =1{en dag} other{# dagar}} sedan', '{delta, plural, =1{a minute} other{# minutes}} ago' => '{delta, plural, =1{en minut} other{# minuter}} sedan', '{delta, plural, =1{a month} other{# months}} ago' => '{delta, plural, =1{en månad} other{# månader}} sedan', @@ -98,7 +125,6 @@ '{nFormatted} B' => '{nFormatted} B', '{nFormatted} GB' => '{nFormatted} GB', '{nFormatted} GiB' => '{nFormatted} GiB', - '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} KiB' => '{nFormatted} KiB', '{nFormatted} MB' => '{nFormatted} MB', '{nFormatted} MiB' => '{nFormatted} MiB', @@ -106,6 +132,7 @@ '{nFormatted} PiB' => '{nFormatted} PiB', '{nFormatted} TB' => '{nFormatted} TB', '{nFormatted} TiB' => '{nFormatted} TiB', + '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, =1{byte} other{byte}}', '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} {n, plural, =1{gibibyte} other{gibibyte}}', '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, =1{gigabyte} other{gigabyte}}', diff --git a/framework/messages/tg/yii.php b/framework/messages/tg/yii.php index 76429c5874e..7c9d9fc884e 100644 --- a/framework/messages/tg/yii.php +++ b/framework/messages/tg/yii.php @@ -23,13 +23,14 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ - 'Powered by {yii}' => 'Дар {yii} кор мекунад', - 'Unknown alias: -{name}' => 'Тахаллуси номаълум: -{name}', - 'Yii Framework' => 'Yii Framework', - '(not set)' => '(супориш дода нашуд)', ' and ' => ' ва ', + '"{attribute}" does not support operator "{operator}".' => '', + '(not set)' => '(супориш дода нашуд)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Хатои дохилии сервер рух дод.', 'Are you sure you want to delete this item?' => 'Шумо боварманд ҳастед, ки ҳамин элементро нест кардан мехоҳед?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => 'Нест кардан', 'Error' => 'Иштибоҳ', 'File upload failed.' => 'Фарокашии файл муяссар гашт.', @@ -42,6 +43,9 @@ 'No results found.' => 'Ҳеҷ чиз ёфт нашуд.', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Барои фарокашии файлҳо танҳо бо намудҳои зерини MIME иҷозат аст: {mimeTypes}.', 'Only files with these extensions are allowed: {extensions}.' => 'Барои фарокашии файлҳо танҳо тавассути зиёдкуни зерин иҷозат аст: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => 'Саҳифа ёфт нашуд.', 'Please fix the following errors:' => 'Лутфан, хатогиҳои зеринро ислоҳ намоед:', 'Please upload a file.' => 'Лутфан, файлро бор кунед.', @@ -51,6 +55,7 @@ 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'Ҳаҷми файли "{file}" азҳад зиёд калон аст. Андозаи он набояд аз {formattedLimit} зиёдтар бошад.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'Ҳаҷми файли "{file}" аз ҳад зиёд хурд аст. Он бояд аз {formattedLimit} калонтар бошад.', 'The format of {attribute} is invalid.' => 'Формати нодурусти маънӣ {attribute}.', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Ҳаҷми файли "{file}" аз ҳад зиёд калон аст. Баландияш набояд аз {limit, number} {limit, plural, one{пиксел} few{пиксел} many{пиксел} other{пиксел}} зиёд бошад.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Ҳаҷми файл "{file}" аз ҳад зиёд калон аст. Дарозияш набояд аз {limit, number} {limit, plural, one{пиксел} few{пиксел} many{пиксел} other{пиксел}} зиёд бошад.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Ҳаҷми файл "{file}" аз ҳад зиёд хурд аст. Баландияш бояд аз {limit, number} {limit, plural, one{пиксел} few{пиксел} many{пиксел} other{пиксел}} зиёд бошад.', @@ -59,12 +64,15 @@ 'The verification code is incorrect.' => 'Рамзи нодурусти санҷишӣ.', 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Ҳамаги {count, number} {count, plural, one{қайд} few{қайд} many{қайдҳо} other{қайд}}.', 'Unable to verify your data submission.' => 'Санҷидани маълумоти фиристодаи Шумо муяссар нагардид.', + 'Unknown alias: -{name}' => 'Тахаллуси номаълум: -{name}', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'Гузинаи номаълум: --{name}', 'Update' => 'Таҳрир намудан', 'View' => 'Аз назар гузарондан', 'Yes' => 'Ҳа', 'You are not allowed to perform this action.' => 'Шумо барои анҷом додани амали мазкур иҷозат надоред.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Шумо наметавонед зиёда аз {limit, number} {limit, plural,one{файлро} few{файлҳоро} many{файлро} other{файлро}} фаро бикашед.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', 'in {delta, plural, =1{a day} other{# days}}' => 'баъд аз {delta, plural, =1{рӯз} one{# рӯз} few{# рӯз} many{# рӯз} other{# рӯз}}', 'in {delta, plural, =1{a minute} other{# minutes}}' => 'баъд аз {delta, plural, =1{дақиқа} one{# дақиқа} few{# дақиқа} many{# дақиқа} other{# дақиқа}}', 'in {delta, plural, =1{a month} other{# months}}' => 'баъд аз {delta, plural, =1{моҳ} one{# моҳ} few{# моҳ} many{# моҳ} other{# моҳ}}', @@ -101,6 +109,7 @@ '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => 'Ҷадвали «{attribute}» бояд хади ақал {min, number} {min, plural, one{аломат} few{аломат} many{аломат} other{аломат}} дошта бошад.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => 'Ҷадвали «{attribute}» бояд ҳади аксар {min, number} {min, plural, one{аломат} few{аломат} many{аломат} other{аломат}} дошта бошад.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => 'Ҷадвали «{attribute}» бояд {length, number} {length, plural, one{аломат} few{аломат} many{аломат} other{аломат}} дошта бошад.', + '{compareAttribute} is invalid.' => '', '{delta, plural, =1{1 day} other{# days}}' => '{delta, plural, one{# рӯз} few{# рӯз} many{# рӯз} other{# рӯз}}', '{delta, plural, =1{1 hour} other{# hours}}' => '{delta, plural, one{# соат} few{# соат} many{# соат} other{# соат}}', '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta, plural, one{# дақиқа} few{# дақиқа} many{# дақиқа} other{# дақиқа}}', @@ -116,7 +125,6 @@ '{nFormatted} B' => '{nFormatted} Б', '{nFormatted} GB' => '{nFormatted} ГБ', '{nFormatted} GiB' => '{nFormatted} ГиБ', - '{nFormatted} kB' => '{nFormatted} КБ', '{nFormatted} KiB' => '{nFormatted} КиБ', '{nFormatted} MB' => '{nFormatted} МБ', '{nFormatted} MiB' => '{nFormatted} МиБ', @@ -124,6 +132,7 @@ '{nFormatted} PiB' => '{nFormatted} PiB', '{nFormatted} TB' => '{nFormatted} TB', '{nFormatted} TiB' => '{nFormatted} TiB', + '{nFormatted} kB' => '{nFormatted} КБ', '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, one{байт} few{байт} many{байт} other{байт}}', '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} {n, plural, one{гибибайт} few{гибибайт} many{гибибайт} other{гибибайт}}', '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, one{гигабайт} few{гигабайт} many{гигабайт} other{гигабайт}}', diff --git a/framework/messages/th/yii.php b/framework/messages/th/yii.php index 0b2c056ed9f..6ce740fde16 100644 --- a/framework/messages/th/yii.php +++ b/framework/messages/th/yii.php @@ -23,9 +23,14 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + ' and ' => '', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(ไม่ได้ตั้ง)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'เกิดข้อผิดพลาดภายในเซิร์ฟเวอร์', 'Are you sure you want to delete this item?' => 'คุณแน่ใจหรือไม่ที่จะลบรายการนี้?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => 'ลบ', 'Error' => 'ผิดพลาด', 'File upload failed.' => 'อัพโหลดไฟล์ล้มเหลว', @@ -38,15 +43,19 @@ 'No results found.' => 'ไม่พบผลลัพธ์', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'เฉพาะไฟล์ที่มีชนิด MIME ต่อไปนี้ที่ได้รับการอนุญาต: {mimeTypes}', 'Only files with these extensions are allowed: {extensions}.' => 'เฉพาะไฟล์ที่มีนามสกุลต่อไปนี้ที่ได้รับอนุญาต: {extensions}', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => 'ไม่พบหน้า', 'Please fix the following errors:' => 'โปรดแก้ไขข้อผิดพลาดต่อไปนี้:', 'Please upload a file.' => 'กรุณาอัพโหลดไฟล์', - 'Powered by {yii}' => 'ขับเคลื่อนโดย {yii}', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'แสดง {begin, number} ถึง {end, number} จาก {totalCount, number} ผลลัพธ์', + 'The combination {values} of {attributes} has already been taken.' => '', 'The file "{file}" is not an image.' => 'ไฟล์ "{file}" ไม่ใช่รูปภาพ', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'ไฟล์ "{file}" มีขนาดใหญ่ไป ไฟล์จะต้องมีขนาดไม่เกิน {formattedLimit}', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'ไฟล์ "{file}" มีขนาดเล็กเกินไป ไฟล์จะต้องมีขนาดมากกว่า {formattedLimit}', 'The format of {attribute} is invalid.' => 'รูปแบบ {attribute} ไม่ถูกต้อง', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'รูปภาพ "{file}" ใหญ่เกินไป ความสูงต้องน้อยกว่า {limit, number} พิกเซล', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'รูปภาพ "{file}" ใหญ่เกินไป ความกว้างต้องน้อยกว่า {limit, number} พิกเซล', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'รูปภาพ "{file}" เล็กเกินไป ความสูงต้องมากว่า {limit, number} พิกเซล', @@ -55,28 +64,35 @@ 'The verification code is incorrect.' => 'รหัสการยืนยันไม่ถูกต้อง', 'Total {count, number} {count, plural, one{item} other{items}}.' => 'ทั้งหมด {count, number} ผลลัพธ์', 'Unable to verify your data submission.' => 'ไม่สามารถตรวจสอบการส่งข้อมูลของคุณ', + 'Unknown alias: -{name}' => '', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'ไม่รู้จักตัวเลือก: --{name}', 'Update' => 'ปรับปรุง', 'View' => 'ดู', 'Yes' => 'ใช่', 'You are not allowed to perform this action.' => 'คุณไม่ได้รับอนุญาตให้ดำเนินการนี้', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'คุณสามารถอัพโหลดมากที่สุด {limit, number} ไฟล์', - 'in {delta, plural, =1{a second} other{# seconds}}' => 'ใน {delta} วินาที', - 'in {delta, plural, =1{a minute} other{# minutes}}' => 'ใน {delta} นาที', - 'in {delta, plural, =1{an hour} other{# hours}}' => 'ใน {delta} ชั่วโมง', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', 'in {delta, plural, =1{a day} other{# days}}' => 'ใน {delta} วัน', + 'in {delta, plural, =1{a minute} other{# minutes}}' => 'ใน {delta} นาที', 'in {delta, plural, =1{a month} other{# months}}' => 'ใน {delta} เดือน', + 'in {delta, plural, =1{a second} other{# seconds}}' => 'ใน {delta} วินาที', 'in {delta, plural, =1{a year} other{# years}}' => 'ใน {delta} ปี', + 'in {delta, plural, =1{an hour} other{# hours}}' => 'ใน {delta} ชั่วโมง', 'just now' => 'เมื่อสักครู่นี้', 'the input value' => 'ค่าป้อนที่เข้ามา', '{attribute} "{value}" has already been taken.' => '{attribute} "{value}" ถูกใช้ไปแล้ว', '{attribute} cannot be blank.' => '{attribute}ต้องไม่ว่างเปล่า', + '{attribute} contains wrong subnet mask.' => '{attribute}ไม่ใช่ซับเน็ตที่ถูกต้อง', '{attribute} is invalid.' => '{attribute}ไม่ถูกต้อง', '{attribute} is not a valid URL.' => '{attribute}ไม่ใช่รูปแบบ URL ที่ถูกต้อง', '{attribute} is not a valid email address.' => '{attribute}ไม่ใช่รูปแบบอีเมลที่ถูกต้อง', + '{attribute} is not in the allowed range.' => '{attribute}ไม่ได้อยู่ในช่วงที่ได้รับอนุญาต', '{attribute} must be "{requiredValue}".' => '{attribute}ต้องการ "{requiredValue}"', '{attribute} must be a number.' => '{attribute}ต้องเป็นตัวเลขเท่านั้น', '{attribute} must be a string.' => '{attribute}ต้องเป็นตัวอักขระเท่านั้น', + '{attribute} must be a valid IP address.' => '{attribute}ต้องเป็นที่อยู่ไอพีที่ถูกต้อง', + '{attribute} must be an IP address with specified subnet.' => '{attribute}ต้องเป็นที่อยู่ไอพีกับซับเน็ตที่ระบุ', '{attribute} must be an integer.' => '{attribute}ต้องเป็นจำนวนเต็มเท่านั้น', '{attribute} must be either "{true}" or "{false}".' => '{attribute}ต้องเป็น "{true}" หรือ "{false}"', '{attribute} must be equal to "{compareValueOrAttribute}".' => '{attribute}ต้องเหมือนกับ "{compareValueOrAttribute}"', @@ -86,27 +102,46 @@ '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '{attribute}ต้องน้อยกว่าหรือเท่ากับ "{compareValueOrAttribute}"', '{attribute} must be no greater than {max}.' => '{attribute}ต้องไม่มากกว่า {max}.', '{attribute} must be no less than {min}.' => '{attribute}ต้องไม่น้อยกว่า {min}', + '{attribute} must not be a subnet.' => '{attribute}ต้องไม่ใช่ซับเน็ต', + '{attribute} must not be an IPv4 address.' => '{attribute}ต้องไม่ใช่ที่อยู่ไอพีรุ่น 4', + '{attribute} must not be an IPv6 address.' => '{attribute}ต้องไม่ใช่ที่อยู่ไอพีรุ่น 6', '{attribute} must not be equal to "{compareValueOrAttribute}".' => '{attribute}ต้องมีค่าไม่เหมือนกับ "{compareValueOrAttribute}"', '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute}ควรประกอบด้วยอักขระอย่างน้อย {min, number} อักขระ', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute}ควรประกอบด้วยอักขระอย่างมาก {max, number} อักขระ', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute}ควรประกอบด้วย {length, number} อักขระ', - '{attribute} contains wrong subnet mask.' => '{attribute}ไม่ใช่ซับเน็ตที่ถูกต้อง', - '{attribute} is not in the allowed range.' => '{attribute}ไม่ได้อยู่ในช่วงที่ได้รับอนุญาต', - '{attribute} must be a valid IP address.' => '{attribute}ต้องเป็นที่อยู่ไอพีที่ถูกต้อง', - '{attribute} must be an IP address with specified subnet.' => '{attribute}ต้องเป็นที่อยู่ไอพีกับซับเน็ตที่ระบุ', - '{attribute} must not be a subnet.' => '{attribute}ต้องไม่ใช่ซับเน็ต', - '{attribute} must not be an IPv4 address.' => '{attribute}ต้องไม่ใช่ที่อยู่ไอพีรุ่น 4', - '{attribute} must not be an IPv6 address.' => '{attribute}ต้องไม่ใช่ที่อยู่ไอพีรุ่น 6', - '{delta, plural, =1{1 second} other{# seconds}}' => '{delta} วินาที', + '{compareAttribute} is invalid.' => '', + '{delta, plural, =1{1 day} other{# days}}' => '{delta} วัน', '{delta, plural, =1{1 hour} other{# hours}}' => '{delta} ชั่วโมง', '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta} นาที', - '{delta, plural, =1{1 day} other{# days}}' => '{delta} วัน', '{delta, plural, =1{1 month} other{# months}}' => '{delta} เดือน', + '{delta, plural, =1{1 second} other{# seconds}}' => '{delta} วินาที', '{delta, plural, =1{1 year} other{# years}}' => '{delta} ปี', - '{delta, plural, =1{a second} other{# seconds}} ago' => '{delta} วินาทีที่ผ่านมา', - '{delta, plural, =1{a minute} other{# minutes}} ago' => '{delta} นาทีที่ผ่านมา', - '{delta, plural, =1{an hour} other{# hours}} ago' => '{delta} ชั่วโมงที่ผ่านมา', '{delta, plural, =1{a day} other{# days}} ago' => '{delta} วันที่ผ่านมา', + '{delta, plural, =1{a minute} other{# minutes}} ago' => '{delta} นาทีที่ผ่านมา', '{delta, plural, =1{a month} other{# months}} ago' => '{delta} เดือนที่ผ่านมา', + '{delta, plural, =1{a second} other{# seconds}} ago' => '{delta} วินาทีที่ผ่านมา', '{delta, plural, =1{a year} other{# years}} ago' => '{delta} ปีที่ผ่านมา', + '{delta, plural, =1{an hour} other{# hours}} ago' => '{delta} ชั่วโมงที่ผ่านมา', + '{nFormatted} B' => '', + '{nFormatted} GB' => '', + '{nFormatted} GiB' => '', + '{nFormatted} KiB' => '', + '{nFormatted} MB' => '', + '{nFormatted} MiB' => '', + '{nFormatted} PB' => '', + '{nFormatted} PiB' => '', + '{nFormatted} TB' => '', + '{nFormatted} TiB' => '', + '{nFormatted} kB' => '', + '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '', + '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '', + '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '', + '{nFormatted} {n, plural, =1{kibibyte} other{kibibytes}}' => '', + '{nFormatted} {n, plural, =1{kilobyte} other{kilobytes}}' => '', + '{nFormatted} {n, plural, =1{mebibyte} other{mebibytes}}' => '', + '{nFormatted} {n, plural, =1{megabyte} other{megabytes}}' => '', + '{nFormatted} {n, plural, =1{pebibyte} other{pebibytes}}' => '', + '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '', + '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '', + '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '', ]; diff --git a/framework/messages/tr/yii.php b/framework/messages/tr/yii.php index b846f17d1e0..f17530b26ca 100644 --- a/framework/messages/tr/yii.php +++ b/framework/messages/tr/yii.php @@ -23,9 +23,14 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + ' and ' => '', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(Veri Yok)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Bir sunucu hatası oluştu.', 'Are you sure you want to delete this item?' => 'Bu veriyi silmek istediğinizden emin misiniz?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => 'Sil', 'Error' => 'Hata', 'File upload failed.' => 'Dosya yükleme başarısız.', @@ -38,28 +43,36 @@ 'No results found.' => 'Sonuç bulunamadı', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Sadece bu tip MIME türleri geçerlidir: {mimeTypes}.', 'Only files with these extensions are allowed: {extensions}.' => 'Sadece bu tip uzantıları olan dosyalar geçerlidir: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => 'Sayfa bulunamadı.', 'Please fix the following errors:' => 'Lütfen hataları düzeltin:', 'Please upload a file.' => 'Lütfen bir dosya yükleyin.', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => '{totalCount, number} {totalCount, plural, one{öğenin} other{öğenin}} {begin, number}-{end, number} arası gösteriliyor.', + 'The combination {values} of {attributes} has already been taken.' => '', 'The file "{file}" is not an image.' => '"{file}" bir resim dosyası değil.', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => '"{file}" dosyası çok büyük. Boyutu {formattedLimit} değerinden büyük olamaz.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => '"{file}" dosyası çok küçük. Boyutu {formattedLimit} değerinden küçük olamaz.', 'The format of {attribute} is invalid.' => '{attribute} formatı geçersiz.', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '"{file}" çok büyük. Yükseklik {limit, plural, one{pixel} other{pixels}} değerinden büyük olamaz.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '"{file}" çok büyük. Genişlik {limit, number} {limit, plural, one{pixel} other{pixels}} değerinden büyük olamaz.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '"{file}" çok küçük. Genişlik {limit, number} {limit, plural, one{pixel} other{pixels}} değerinden küçük olamaz.', 'The image "{file}" is too small. The width cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '"{file}" çok küçük. Genişlik {limit, number} {limit, plural, one{pixel} other{pixels}} değerinden küçük olamaz.', + 'The requested view "{name}" was not found.' => '', 'The verification code is incorrect.' => 'Doğrulama kodu yanlış.', 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Toplam {count, number} {count, plural, one{öğe} other{öğe}}.', 'Unable to verify your data submission.' => 'İlettiğiniz veri doğrulanamadı.', 'Unknown alias: -{name}' => 'Bilinmeyen rumuz: -{name}', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'Bilinmeyen opsiyon: --{name}', 'Update' => 'Güncelle', 'View' => 'Görüntüle', 'Yes' => 'Evet', 'You are not allowed to perform this action.' => 'Bu işlemi yapmaya yetkiniz yok.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Sadece {limit, number} {limit, plural, one{dosya} other{# dosya}} yükleyebilirsiniz.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', 'in {delta, plural, =1{a day} other{# days}}' => '{delta, plural, =1{bir gün} other{# gün}} içerisinde', 'in {delta, plural, =1{a minute} other{# minutes}}' => '{delta, plural, =1{bir dakika} other{# dakika}} içerisinde', 'in {delta, plural, =1{a month} other{# months}}' => '{delta, plural, =1{bir ay} other{# ay}} içerisinde', @@ -96,6 +109,7 @@ '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} en az {min, number} karakter içermeli.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} en fazla {max, number} karakter içermeli.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} {length, number} karakter içermeli.', + '{compareAttribute} is invalid.' => '', '{delta, plural, =1{1 day} other{# days}}' => '{delta, plural, =1{1 gün} other{# gün}}', '{delta, plural, =1{1 hour} other{# hours}}' => '{delta, plural, =1{1 saat} other{# saat}}', '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta, plural, =1{1 dakika} other{# dakika}}', @@ -111,7 +125,6 @@ '{nFormatted} B' => '{nFormatted} B', '{nFormatted} GB' => '{nFormatted} GB', '{nFormatted} GiB' => '{nFormatted} GiB', - '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} KiB' => '{nFormatted} KiB', '{nFormatted} MB' => '{nFormatted} MB', '{nFormatted} MiB' => '{nFormatted} MiB', @@ -119,6 +132,7 @@ '{nFormatted} PiB' => '{nFormatted} PiB', '{nFormatted} TB' => '{nFormatted} TB', '{nFormatted} TiB' => '{nFormatted} TiB', + '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, =1{bayt} other{bayt}}', '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} {n, plural, =1{gibibayt} other{gibibayt}}', '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, =1{gigabayt} other{gigabayt}}', diff --git a/framework/messages/uk/yii.php b/framework/messages/uk/yii.php index fb6fed9c46a..1a61ec73c2b 100644 --- a/framework/messages/uk/yii.php +++ b/framework/messages/uk/yii.php @@ -23,15 +23,14 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ - '{attribute} must be equal to "{compareValueOrAttribute}".' => 'Значення "{attribute}" повинно бути рівним "{compareValueOrAttribute}".', - '{attribute} must be greater than "{compareValueOrAttribute}".' => 'Значення "{attribute}" повинно бути більшим значення "{compareValueOrAttribute}".', - '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => 'Значення "{attribute}" повинно бути більшим або дорівнювати значенню "{compareValueOrAttribute}".', - '{attribute} must be less than "{compareValueOrAttribute}".' => 'Значення "{attribute}" повинно бути меншим значення "{compareValueOrAttribute}".', - '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => 'Значення "{attribute}" повинно бути меншим або дорівнювати значенню "{compareValueOrAttribute}".', - '{attribute} must not be equal to "{compareValueOrAttribute}".' => 'Значення "{attribute}" не повинно бути рівним "{compareValueOrAttribute}".', + ' and ' => '', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(не задано)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Виникла внутрішня помилка сервера.', 'Are you sure you want to delete this item?' => 'Ви впевнені, що хочете видалити цей елемент?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => 'Видалити', 'Error' => 'Помилка', 'File upload failed.' => 'Завантаження файлу не вдалося.', @@ -44,14 +43,19 @@ 'No results found.' => 'Нічого не знайдено.', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Дозволені файли лише з наступними MIME-типами: {mimeTypes}.', 'Only files with these extensions are allowed: {extensions}.' => 'Дозволені файли лише з наступними розширеннями: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => 'Сторінка не знайдена.', 'Please fix the following errors:' => 'Будь ласка, виправте наступні помилки:', 'Please upload a file.' => 'Будь ласка, завантажте файл.', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Показані {begin, number}-{end, number} із {totalCount, number} {totalCount, plural, one{запису} other{записів}}.', + 'The combination {values} of {attributes} has already been taken.' => '', 'The file "{file}" is not an image.' => 'Файл "{file}" не є зображенням.', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'Файл "{file}" занадто великий. Розмір не повинен перевищувати {formattedLimit}.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'Файл "{file}" занадто малий. Розмір повинен бути більше, ніж {formattedLimit}.', 'The format of {attribute} is invalid.' => 'Невірний формат значення "{attribute}".', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Зображення "{file}" занадто велике. Висота не повинна перевищувати {limit, number} {limit, plural, one{піксель} few{пікселя} many{пікселів} other{пікселя}}.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Зображення "{file}" занадто велике. Ширина не повинна перевищувати {limit, number} {limit, plural, one{піксель} few{пікселя} many{пікселів} other{пікселя}}.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Зображення "{file}" занадто мале. Висота повинна бути більше, ніж {limit, number} {limit, plural, one{піксель} few{пікселя} many{пікселів} other{пікселя}}.', @@ -60,12 +64,15 @@ 'The verification code is incorrect.' => 'Невірний код перевірки.', 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Всього {count, number} {count, plural, one{запис} few{записи} many{записів} other{записи}}.', 'Unable to verify your data submission.' => 'Не вдалося перевірити передані дані.', + 'Unknown alias: -{name}' => '', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'Невідома опція : --{name}', 'Update' => 'Оновити', 'View' => 'Переглянути', 'Yes' => 'Так', 'You are not allowed to perform this action.' => 'Вам не дозволено виконувати дану дію.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Ви не можете завантажувати більше {limit, number} {limit, plural, one{файла} few{файлів} many{файлів} other{файла}}.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', 'in {delta, plural, =1{a day} other{# days}}' => 'через {delta, plural, =1{день} one{# день} few{# дні} many{# днів} other{# дні}}', 'in {delta, plural, =1{a minute} other{# minutes}}' => 'через {delta, plural, =1{хвилину} one{# хвилину} few{# хвилини} many{# хвилин} other{# хвилини}}', 'in {delta, plural, =1{a month} other{# months}}' => 'через {delta, plural, =1{місяць} one{# місяць} few{# місяці} many{# місяців} other{# місяці}}', @@ -88,14 +95,21 @@ '{attribute} must be an IP address with specified subnet.' => 'Значення «{attribute}» повинно бути IP адресою з підмережею.', '{attribute} must be an integer.' => 'Значення "{attribute}" має бути цілим числом.', '{attribute} must be either "{true}" or "{false}".' => 'Значення "{attribute}" має дорівнювати "{true}" або "{false}".', + '{attribute} must be equal to "{compareValueOrAttribute}".' => 'Значення "{attribute}" повинно бути рівним "{compareValueOrAttribute}".', + '{attribute} must be greater than "{compareValueOrAttribute}".' => 'Значення "{attribute}" повинно бути більшим значення "{compareValueOrAttribute}".', + '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => 'Значення "{attribute}" повинно бути більшим або дорівнювати значенню "{compareValueOrAttribute}".', + '{attribute} must be less than "{compareValueOrAttribute}".' => 'Значення "{attribute}" повинно бути меншим значення "{compareValueOrAttribute}".', + '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => 'Значення "{attribute}" повинно бути меншим або дорівнювати значенню "{compareValueOrAttribute}".', '{attribute} must be no greater than {max}.' => 'Значення "{attribute}" не повинно перевищувати {max}.', '{attribute} must be no less than {min}.' => 'Значення "{attribute}" має бути більшим {min}.', '{attribute} must not be a subnet.' => 'Значення «{attribute}» не повинно бути підмережею.', '{attribute} must not be an IPv4 address.' => 'Значення «{attribute}» не повинно бути IPv4 адресою.', '{attribute} must not be an IPv6 address.' => 'Значення «{attribute}» не повинно бути IPv6 адресою.', + '{attribute} must not be equal to "{compareValueOrAttribute}".' => 'Значення "{attribute}" не повинно бути рівним "{compareValueOrAttribute}".', '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => 'Значення "{attribute}" повинно містити мінімум {min, number} {min, plural, one{символ} few{символа} many{символів} other{символа}}.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => 'Значення "{attribute}" повинно містити максимум {max, number} {max, plural, one{символ} few{символа} many{символів} other{символа}}.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => 'Значення "{attribute}" повинно містити {length, number} {length, plural, one{символ} few{символа} many{символів} other{символа}}.', + '{compareAttribute} is invalid.' => '', '{delta, plural, =1{1 day} other{# days}}' => '{delta, plural, one{# день} few{# дні} many{# днів} other{# днів}}', '{delta, plural, =1{1 hour} other{# hours}}' => '{delta, plural, one{# година} few{# години} many{# годин} other{# годин}}', '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta, plural, one{# хвилина} few{# хвилини} many{# хвилин} other{# хвилин}}', @@ -111,7 +125,6 @@ '{nFormatted} B' => '{nFormatted} Б', '{nFormatted} GB' => '{nFormatted} Гб', '{nFormatted} GiB' => '{nFormatted} ГіБ', - '{nFormatted} kB' => '{nFormatted} Кб', '{nFormatted} KiB' => '{nFormatted} КіБ', '{nFormatted} MB' => '{nFormatted} Мб', '{nFormatted} MiB' => '{nFormatted} МіБ', @@ -119,6 +132,7 @@ '{nFormatted} PiB' => '{nFormatted} ПіБ', '{nFormatted} TB' => '{nFormatted} Тб', '{nFormatted} TiB' => '{nFormatted} ТіБ', + '{nFormatted} kB' => '{nFormatted} Кб', '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, one{байт} few{байта} many{байтів} other{байта}}', '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} {n, plural, one{гібібайт} few{гібібайта} many{гібібайтів} other{гібібайта}}', '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, one{гігабайт} few{гігабайта} many{гігабайтів} other{гігабайта}}', diff --git a/framework/messages/uz-Cy/yii.php b/framework/messages/uz-Cy/yii.php index f9d59f1c927..3d8d03ad5bb 100644 --- a/framework/messages/uz-Cy/yii.php +++ b/framework/messages/uz-Cy/yii.php @@ -1,125 +1,147 @@ '{nFormatted} Б', - '{nFormatted} GB' => '{nFormatted} ГБ', - '{nFormatted} GiB' => '{nFormatted} ГиБ', - '{nFormatted} KB' => '{nFormatted} КБ', - '{nFormatted} KiB' => '{nFormatted} КиБ', - '{nFormatted} MB' => '{nFormatted} МБ', - '{nFormatted} MiB' => '{nFormatted} МиБ', - '{nFormatted} PB' => '{nFormatted} ПБ', - '{nFormatted} PiB' => '{nFormatted} ПиБ', - '{nFormatted} TB' => '{nFormatted} ТБ', - '{nFormatted} TiB' => '{nFormatted} ТиБ', - '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, one{байт} few{байт} many{байтлар} other{байт}}', - '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} {n, plural, one{гибибайт} few{гибибайт} many{гибибайт} other{гибибайт}}', - '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, one{гигабайт} few{гигабайт} many{гигабайт} other{гигабайт}}', - '{nFormatted} {n, plural, =1{kibibyte} other{kibibytes}}' => '{nFormatted} {n, plural, one{кибибайт} few{кибибайт} many{кибибайт} other{кибибайт}}', - '{nFormatted} {n, plural, =1{kilobyte} other{kilobytes}}' => '{nFormatted} {n, plural, one{килобайт} few{килобайт} many{килобайт} other{килобайт}}', - '{nFormatted} {n, plural, =1{mebibyte} other{mebibytes}}' => '{nFormatted} {n, plural, one{мебибайт} few{мебибайт} many{мебибайт} other{мебибайт}}', - '{nFormatted} {n, plural, =1{megabyte} other{megabytes}}' => '{nFormatted} {n, plural, one{мегабайт} few{мегабайт} many{мегабайт} other{мегабайт}}', - '{nFormatted} {n, plural, =1{pebibyte} other{pebibytes}}' => '{nFormatted} {n, plural, one{пебибайт} few{пебибайт} many{пебибайт} other{пебибайт}}', - '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '{nFormatted} {n, plural, one{петабайт} few{петабайт} many{петабайт} other{петабайт}}', - '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '{nFormatted} {n, plural, one{тебибайт} few{тебибайт} many{тебибайт} other{тебибайт}}', - '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '{nFormatted} {n, plural, one{терабайт} few{терабайт} many{терабайт} other{терабайт}}', - '(not set)' => '(қийматланмаган)', - 'An internal server error occurred.' => 'Сервернинг ички хатолиги юз берди.', - 'Are you sure you want to delete this item?' => 'Сиз ростдан ҳам ушбу элементни ўчирмоқчимисиз?', - 'Delete' => 'Ўчириш', - 'Error' => 'Хато', - 'File upload failed.' => 'Файлни юклаб бўлмади.', - 'Home' => 'Асосий', - 'Invalid data received for parameter "{param}".' => '"{param}" параметр қиймати нотўғри.', - 'Login Required' => 'Кириш талаб қилинади.', - 'Missing required arguments: {params}' => 'Қуйидаги зарур аргументлар мавжуд эмас: {params}', - 'Missing required parameters: {params}' => 'Қуйидаги зарур параметрлар мавжуд эмас: {params}', - 'No' => 'Йўқ', - 'No help for unknown command "{command}".' => '"{command}" ноаниқ команда учун маълумотнома мавжуд эмас.', - 'No help for unknown sub-command "{command}".' => '"{command}" ноаниқ қисм команда учун маълумотнома мавжуд эмас.', - 'No results found.' => 'Хеч нима топилмади.', - 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Фақат MIME-туридаги файлларни юклашга рухсат берилган: {mimeTypes}.', - 'Only files with these extensions are allowed: {extensions}.' => 'Фақат қуйидаги кенгайтмали файлларни юклашга рухсат берилган: {extensions}.', - 'Page not found.' => 'Саҳифа топилмади.', - 'Please fix the following errors:' => 'Қуйидаги хатоликларни тўғриланг:', - 'Please upload a file.' => 'Файлни юкланг.', - 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Намойиш этиляпти {begin, number}-{end, number} маълумот, жами: {totalCount, number} та', - 'The file "{file}" is not an image.' => '«{file}» расм файл эмас.', - 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => '«{file}» файл жуда катта. Ўлчам {formattedLimit} ошиши керак эмас.', - 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => '«{file}» файл жуда кичкина. Ўлчам {formattedLimit} кам бўлмаслиги керак.', - 'The format of {attribute} is invalid.' => '«{attribute}» қийматнинг формати нотўғри.', - 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '«{file}» файл жуда катта. Баландлик {limit, number} {limit, plural, one{пикселдан} few{пикселдан} many{пикселдан} other{пикселдан}} ошмаслиги керак.', - 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '«{file}» файл жуда катта. Эни {limit, number} {limit, plural, one{пикселдан} few{пикселдан} many{пикселдан} other{пикселдан}} ошмаслиги керак.', - 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '«{file}» файл жуда кичкина. Баландлик {limit, number} {limit, plural, one{пикселдан} few{пикселдан} many{пикселдан} other{пикселдан}} кам бўлмаслиги керак.', - 'The image "{file}" is too small. The width cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '«{file}» файл жуда кичкина. Эни {limit, number} {limit, plural, one{пикселдан} few{пикселдан} many{пикселдан} other{пикселдан}} кам бўлмаслиги керак.', - 'The requested view "{name}" was not found.' => 'Сўралаётган "{name}" файли топилмади.', - 'The verification code is incorrect.' => 'Текширув коди нотўғри.', - 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Жами {count, number} {count, plural, one{ёзув} few{ёзув} many{ёзув} other{ёзув}}.', - 'Unable to verify your data submission.' => 'Юборилган маълумотларни текшириб бўлмади.', - 'Unknown command "{command}".' => '"{command}" ноаниқ бўйриқ.', - 'Unknown option: --{name}' => 'Ноаниқ танлов: --{name}', - 'Update' => 'Таҳририлаш', - 'View' => 'Кўриш', - 'Yes' => 'Ҳа', - 'You are not allowed to perform this action.' => 'Сизга ушбу амални бажаришга руҳсат берилмаган.', - 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Сиз {limit, number} {limit, plural, one{файлдан} few{файллардан} many{файллардан} other{файллардан}} кўпини юклаб ололмайсиз.', - 'in {delta, plural, =1{a day} other{# days}}' => '{delta, plural, =1{кундан} one{# кундан} few{# кундан} many{# кунлардан} other{# кундан}} кейин', - 'in {delta, plural, =1{a minute} other{# minutes}}' => '{delta, plural, =1{минутдан} one{# минутдан} few{# минутлардан} many{# минутдан} other{# минутлардан}} кейин', - 'in {delta, plural, =1{a month} other{# months}}' => '{delta, plural, =1{ойдан} one{# ойдан} few{# ойдан} many{# ойлардан} other{# ойлардан}} кейин', - 'in {delta, plural, =1{a second} other{# seconds}}' => '{delta, plural, =1{секунддан} one{# секунддан} few{# секундлардан} many{# секунддан} other{# секундлардан}} кейин', - 'in {delta, plural, =1{a year} other{# years}}' => '{delta, plural, =1{йилдан} one{# йилдан} few{# йиллардан} many{# йиллардан} other{# йиллардан}} кейин', - 'in {delta, plural, =1{an hour} other{# hours}}' => '{delta, plural, =1{соатдан} one{# соатдан} few{# соатлардан} many{# соатлардан} other{# соатлардан}} кейин', - 'just now' => 'ҳозироқ', - 'the input value' => 'киритилган қиймат', - '{attribute} "{value}" has already been taken.' => '{attribute} «{value}» аввалроқ банд қилинган.', - '{attribute} cannot be blank.' => '«{attribute}» тўлдириш шарт.', - '{attribute} is invalid.' => '«{attribute}» қиймати нотўғри', - '{attribute} is not a valid URL.' => '«{attribute}» тўғри URL эмас.', - '{attribute} is not a valid email address.' => '«{attribute}» тўғри электрон манзил эмас.', - '{attribute} must be "{requiredValue}".' => '«{attribute}» қиймати «{requiredValue}» га тенг бўлиши керак.', - '{attribute} must be a number.' => '«{attribute}» қиймати сон бўлиши керак.', - '{attribute} must be a string.' => '«{attribute}» қиймати матн бўлиши керак.', - '{attribute} must be an integer.' => '«{attribute}» қиймати бутун сон бўлиши керак.', - '{attribute} must be either "{true}" or "{false}".' => '«{attribute}» қиймати «{true}» ёки «{false}» бўлиши керак.', - '{attribute} must be greater than "{compareValue}".' => '«{attribute}» қиймати «{compareValue}» дан катта бўлиши керак.', - '{attribute} must be greater than or equal to "{compareValue}".' => '«{attribute}» қиймати «{compareValue}» дан катта ёки тенг бўлиши керак.', - '{attribute} must be less than "{compareValue}".' => '«{attribute}» қиймати «{compareValue}» дан кичкина бўлиши керак.', - '{attribute} must be less than or equal to "{compareValue}".' => '«{attribute}» қиймати «{compareValue}» дан кичик ёки тенг бўлиши керак.', - '{attribute} must be no greater than {max}.' => '«{attribute}» қиймати {max} дан ошмаслиги керак.', - '{attribute} must be no less than {min}.' => '«{attribute}» қиймати {min} дан кичкина бўлиши керак.', - '{attribute} must be repeated exactly.' => '«{attribute}» қиймати бир хил тарзда такрорланиши керак.', - '{attribute} must not be equal to "{compareValue}".' => '«{attribute}» қиймати «{compareValue}» га тенг бўлмаслиги керак.', - '{attribute} must not be equal to "{compareValueOrAttribute}".' => '«{attribute}» қиймати «{compareValueOrAttribute}» қийматига тенг бўлмаслиги лозим.', - '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '«{attribute}» қиймати минимум {min, number} {min, plural, one{белгидан} few{белгидан} many{белгидан} other{белгидан}} ташкил топиши керак.', - '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '«{attribute}» қиймати максимум {max, number} {max, plural, one{белгидан} few{белгидан} many{белгидан} other{белгидан}} ошмаслиги керак.', - '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '«{attribute}» қиймати {length, number} {length, plural, one{белгидан} few{белгидан} many{белгидан} other{белгидан}} ташкил топиши керак.', - '{delta, plural, =1{a day} other{# days}} ago' => '{delta, plural, =1{кун} one{кун} few{# кун} many{# кун} other{# кун}} аввал', - '{delta, plural, =1{a minute} other{# minutes}} ago' => '{delta, plural, =1{дақиқа} one{# дақиқа} few{# дақиқа} many{# дақиқа} other{# дақиқа}} аввал', - '{delta, plural, =1{a month} other{# months}} ago' => '{delta, plural, =1{ой} one{# ой} few{# ой} many{# ой} other{# ой}} аввал', - '{delta, plural, =1{a second} other{# seconds}} ago' => '{delta, plural, =1{сония} one{# сония} few{# сония} many{# сония} other{# сония}} аввал', - '{delta, plural, =1{a year} other{# years}} ago' => '{delta, plural, =1{йил} one{# йил} few{# йил} many{# йил} other{# йил}} аввал', - '{delta, plural, =1{an hour} other{# hours}} ago' => '{delta, plural, =1{соат} one{# соат} few{# соат} many{# соат} other{# соат}} аввал', - ]; +/** + * @link https://www.yiiframework.com/ + * @copyright Copyright (c) 2008 Yii Software LLC + * @license https://www.yiiframework.com/license/ + */ +/** + * Message translations. + * + * This file is automatically generated by 'yii message/extract' command. + * It contains the localizable messages extracted from source code. + * You may modify this file by translating the extracted messages. + * + * Each array element represents the translation (value) of a message (key). + * If the value is empty, the message is considered as not translated. + * Messages that no longer need translation will have their translations + * enclosed between a pair of '@@' marks. + * + * Message string can be used with plural forms format. Check i18n section + * of the guide for details. + * + * NOTE: this file must be saved in UTF-8 encoding. + */ +return [ + ' and ' => '', + '"{attribute}" does not support operator "{operator}".' => '', + '(not set)' => '(қийматланмаган)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', + 'An internal server error occurred.' => 'Сервернинг ички хатолиги юз берди.', + 'Are you sure you want to delete this item?' => 'Сиз ростдан ҳам ушбу элементни ўчирмоқчимисиз?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', + 'Delete' => 'Ўчириш', + 'Error' => 'Хато', + 'File upload failed.' => 'Файлни юклаб бўлмади.', + 'Home' => 'Асосий', + 'Invalid data received for parameter "{param}".' => '"{param}" параметр қиймати нотўғри.', + 'Login Required' => 'Кириш талаб қилинади.', + 'Missing required arguments: {params}' => 'Қуйидаги зарур аргументлар мавжуд эмас: {params}', + 'Missing required parameters: {params}' => 'Қуйидаги зарур параметрлар мавжуд эмас: {params}', + 'No' => 'Йўқ', + 'No results found.' => 'Хеч нима топилмади.', + 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Фақат MIME-туридаги файлларни юклашга рухсат берилган: {mimeTypes}.', + 'Only files with these extensions are allowed: {extensions}.' => 'Фақат қуйидаги кенгайтмали файлларни юклашга рухсат берилган: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', + 'Page not found.' => 'Саҳифа топилмади.', + 'Please fix the following errors:' => 'Қуйидаги хатоликларни тўғриланг:', + 'Please upload a file.' => 'Файлни юкланг.', + 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Намойиш этиляпти {begin, number}-{end, number} маълумот, жами: {totalCount, number} та', + 'The combination {values} of {attributes} has already been taken.' => '', + 'The file "{file}" is not an image.' => '«{file}» расм файл эмас.', + 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => '«{file}» файл жуда катта. Ўлчам {formattedLimit} ошиши керак эмас.', + 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => '«{file}» файл жуда кичкина. Ўлчам {formattedLimit} кам бўлмаслиги керак.', + 'The format of {attribute} is invalid.' => '«{attribute}» қийматнинг формати нотўғри.', + 'The format of {filter} is invalid.' => '', + 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '«{file}» файл жуда катта. Баландлик {limit, number} {limit, plural, one{пикселдан} few{пикселдан} many{пикселдан} other{пикселдан}} ошмаслиги керак.', + 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '«{file}» файл жуда катта. Эни {limit, number} {limit, plural, one{пикселдан} few{пикселдан} many{пикселдан} other{пикселдан}} ошмаслиги керак.', + 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '«{file}» файл жуда кичкина. Баландлик {limit, number} {limit, plural, one{пикселдан} few{пикселдан} many{пикселдан} other{пикселдан}} кам бўлмаслиги керак.', + 'The image "{file}" is too small. The width cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '«{file}» файл жуда кичкина. Эни {limit, number} {limit, plural, one{пикселдан} few{пикселдан} many{пикселдан} other{пикселдан}} кам бўлмаслиги керак.', + 'The requested view "{name}" was not found.' => 'Сўралаётган "{name}" файли топилмади.', + 'The verification code is incorrect.' => 'Текширув коди нотўғри.', + 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Жами {count, number} {count, plural, one{ёзув} few{ёзув} many{ёзув} other{ёзув}}.', + 'Unable to verify your data submission.' => 'Юборилган маълумотларни текшириб бўлмади.', + 'Unknown alias: -{name}' => '', + 'Unknown filter attribute "{attribute}"' => '', + 'Unknown option: --{name}' => 'Ноаниқ танлов: --{name}', + 'Update' => 'Таҳрирлаш', + 'View' => 'Кўриш', + 'Yes' => 'Ҳа', + 'You are not allowed to perform this action.' => 'Сизга ушбу амални бажаришга руҳсат берилмаган.', + 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Сиз {limit, number} {limit, plural, one{файлдан} few{файллардан} many{файллардан} other{файллардан}} кўпини юклаб ололмайсиз.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', + 'in {delta, plural, =1{a day} other{# days}}' => '{delta, plural, =1{кундан} one{# кундан} few{# кундан} many{# кунлардан} other{# кундан}} кейин', + 'in {delta, plural, =1{a minute} other{# minutes}}' => '{delta, plural, =1{минутдан} one{# минутдан} few{# минутлардан} many{# минутдан} other{# минутлардан}} кейин', + 'in {delta, plural, =1{a month} other{# months}}' => '{delta, plural, =1{ойдан} one{# ойдан} few{# ойдан} many{# ойлардан} other{# ойлардан}} кейин', + 'in {delta, plural, =1{a second} other{# seconds}}' => '{delta, plural, =1{секунддан} one{# секунддан} few{# секундлардан} many{# секунддан} other{# секундлардан}} кейин', + 'in {delta, plural, =1{a year} other{# years}}' => '{delta, plural, =1{йилдан} one{# йилдан} few{# йиллардан} many{# йиллардан} other{# йиллардан}} кейин', + 'in {delta, plural, =1{an hour} other{# hours}}' => '{delta, plural, =1{соатдан} one{# соатдан} few{# соатлардан} many{# соатлардан} other{# соатлардан}} кейин', + 'just now' => 'ҳозироқ', + 'the input value' => 'киритилган қиймат', + '{attribute} "{value}" has already been taken.' => '{attribute} «{value}» аввалроқ банд қилинган.', + '{attribute} cannot be blank.' => '«{attribute}» тўлдириш шарт.', + '{attribute} contains wrong subnet mask.' => '', + '{attribute} is invalid.' => '«{attribute}» қиймати нотўғри', + '{attribute} is not a valid URL.' => '«{attribute}» тўғри URL эмас.', + '{attribute} is not a valid email address.' => '«{attribute}» тўғри электрон манзил эмас.', + '{attribute} is not in the allowed range.' => '', + '{attribute} must be "{requiredValue}".' => '«{attribute}» қиймати «{requiredValue}» га тенг бўлиши керак.', + '{attribute} must be a number.' => '«{attribute}» қиймати сон бўлиши керак.', + '{attribute} must be a string.' => '«{attribute}» қиймати матн бўлиши керак.', + '{attribute} must be a valid IP address.' => '', + '{attribute} must be an IP address with specified subnet.' => '', + '{attribute} must be an integer.' => '«{attribute}» қиймати бутун сон бўлиши керак.', + '{attribute} must be either "{true}" or "{false}".' => '«{attribute}» қиймати «{true}» ёки «{false}» бўлиши керак.', + '{attribute} must be equal to "{compareValueOrAttribute}".' => '', + '{attribute} must be greater than "{compareValueOrAttribute}".' => '«{attribute}» қиймати «{compareValueOrAttribute}» дан катта бўлиши керак.', + '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '«{attribute}» қиймати «{compareValueOrAttribute}» дан катта ёки тенг бўлиши керак.', + '{attribute} must be less than "{compareValueOrAttribute}".' => '«{attribute}» қиймати «{compareValueOrAttribute}» дан кичкина бўлиши керак.', + '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '«{attribute}» қиймати «{compareValueOrAttribute}» дан кичик ёки тенг бўлиши керак.', + '{attribute} must be no greater than {max}.' => '«{attribute}» қиймати {max} дан ошмаслиги керак.', + '{attribute} must be no less than {min}.' => '«{attribute}» қиймати {min} дан катта бўлиши керак.', + '{attribute} must not be a subnet.' => '', + '{attribute} must not be an IPv4 address.' => '', + '{attribute} must not be an IPv6 address.' => '', + '{attribute} must not be equal to "{compareValueOrAttribute}".' => '«{attribute}» қиймати «{compareValueOrAttribute}» қийматига тенг бўлмаслиги лозим.', + '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '«{attribute}» қиймати минимум {min, number} {min, plural, one{белгидан} few{белгидан} many{белгидан} other{белгидан}} ташкил топиши керак.', + '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '«{attribute}» қиймати максимум {max, number} {max, plural, one{белгидан} few{белгидан} many{белгидан} other{белгидан}} ошмаслиги керак.', + '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '«{attribute}» қиймати {length, number} {length, plural, one{белгидан} few{белгидан} many{белгидан} other{белгидан}} ташкил топиши керак.', + '{compareAttribute} is invalid.' => '', + '{delta, plural, =1{1 day} other{# days}}' => '', + '{delta, plural, =1{1 hour} other{# hours}}' => '', + '{delta, plural, =1{1 minute} other{# minutes}}' => '', + '{delta, plural, =1{1 month} other{# months}}' => '', + '{delta, plural, =1{1 second} other{# seconds}}' => '', + '{delta, plural, =1{1 year} other{# years}}' => '', + '{delta, plural, =1{a day} other{# days}} ago' => '{delta, plural, =1{кун} one{кун} few{# кун} many{# кун} other{# кун}} аввал', + '{delta, plural, =1{a minute} other{# minutes}} ago' => '{delta, plural, =1{дақиқа} one{# дақиқа} few{# дақиқа} many{# дақиқа} other{# дақиқа}} аввал', + '{delta, plural, =1{a month} other{# months}} ago' => '{delta, plural, =1{ой} one{# ой} few{# ой} many{# ой} other{# ой}} аввал', + '{delta, plural, =1{a second} other{# seconds}} ago' => '{delta, plural, =1{сония} one{# сония} few{# сония} many{# сония} other{# сония}} аввал', + '{delta, plural, =1{a year} other{# years}} ago' => '{delta, plural, =1{йил} one{# йил} few{# йил} many{# йил} other{# йил}} аввал', + '{delta, plural, =1{an hour} other{# hours}} ago' => '{delta, plural, =1{соат} one{# соат} few{# соат} many{# соат} other{# соат}} аввал', + '{nFormatted} B' => '{nFormatted} Б', + '{nFormatted} GB' => '{nFormatted} ГБ', + '{nFormatted} GiB' => '{nFormatted} ГиБ', + '{nFormatted} KiB' => '{nFormatted} КиБ', + '{nFormatted} MB' => '{nFormatted} МБ', + '{nFormatted} MiB' => '{nFormatted} МиБ', + '{nFormatted} PB' => '{nFormatted} ПБ', + '{nFormatted} PiB' => '{nFormatted} ПиБ', + '{nFormatted} TB' => '{nFormatted} ТБ', + '{nFormatted} TiB' => '{nFormatted} ТиБ', + '{nFormatted} kB' => '', + '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, one{байт} few{байт} many{байтлар} other{байт}}', + '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} {n, plural, one{гибибайт} few{гибибайт} many{гибибайт} other{гибибайт}}', + '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, one{гигабайт} few{гигабайт} many{гигабайт} other{гигабайт}}', + '{nFormatted} {n, plural, =1{kibibyte} other{kibibytes}}' => '{nFormatted} {n, plural, one{кибибайт} few{кибибайт} many{кибибайт} other{кибибайт}}', + '{nFormatted} {n, plural, =1{kilobyte} other{kilobytes}}' => '{nFormatted} {n, plural, one{килобайт} few{килобайт} many{килобайт} other{килобайт}}', + '{nFormatted} {n, plural, =1{mebibyte} other{mebibytes}}' => '{nFormatted} {n, plural, one{мебибайт} few{мебибайт} many{мебибайт} other{мебибайт}}', + '{nFormatted} {n, plural, =1{megabyte} other{megabytes}}' => '{nFormatted} {n, plural, one{мегабайт} few{мегабайт} many{мегабайт} other{мегабайт}}', + '{nFormatted} {n, plural, =1{pebibyte} other{pebibytes}}' => '{nFormatted} {n, plural, one{пебибайт} few{пебибайт} many{пебибайт} other{пебибайт}}', + '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '{nFormatted} {n, plural, one{петабайт} few{петабайт} many{петабайт} other{петабайт}}', + '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '{nFormatted} {n, plural, one{тебибайт} few{тебибайт} many{тебибайт} other{тебибайт}}', + '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '{nFormatted} {n, plural, one{терабайт} few{терабайт} many{терабайт} other{терабайт}}', +]; diff --git a/framework/messages/uz/yii.php b/framework/messages/uz/yii.php index 306de73abcc..cf1a2f612f3 100644 --- a/framework/messages/uz/yii.php +++ b/framework/messages/uz/yii.php @@ -23,31 +23,14 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ - '{nFormatted} B' => '{nFormatted} B', - '{nFormatted} GB' => '{nFormatted} GB', - '{nFormatted} GiB' => '{nFormatted} GiB', - '{nFormatted} kB' => '{nFormatted} kB', - '{nFormatted} KiB' => '{nFormatted} KiB', - '{nFormatted} MB' => '{nFormatted} MB', - '{nFormatted} MiB' => '{nFormatted} MiB', - '{nFormatted} PB' => '{nFormatted} PB', - '{nFormatted} PiB' => '{nFormatted} PiB', - '{nFormatted} TB' => '{nFormatted} TB', - '{nFormatted} TiB' => '{nFormatted} TiB', - '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, one{bayt} few{bayt} many{baytlar} other{bayt}}', - '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} {n, plural, one{gibibayt} few{gibibayt} many{gibibayt} other{gibibayt}}', - '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, one{gigabayt} few{gigabayt} many{gigabayt} other{gigabayt}}', - '{nFormatted} {n, plural, =1{kibibyte} other{kibibytes}}' => '{nFormatted} {n, plural, one{kibibayt} few{kibibayt} many{kibibayt} other{kibibayt}}', - '{nFormatted} {n, plural, =1{kilobyte} other{kilobytes}}' => '{nFormatted} {n, plural, one{kilobayt} few{kilobayt} many{kilobayt} other{kilobayt}}', - '{nFormatted} {n, plural, =1{mebibyte} other{mebibytes}}' => '{nFormatted} {n, plural, one{mebibayt} few{mebibayt} many{mebibayt} other{mebibayt}}', - '{nFormatted} {n, plural, =1{megabyte} other{megabytes}}' => '{nFormatted} {n, plural, one{megabayt} few{megabayt} many{megabayt} other{megabayt}}', - '{nFormatted} {n, plural, =1{pebibyte} other{pebibytes}}' => '{nFormatted} {n, plural, one{pebibayt} few{pebibayt} many{pebibayt} other{pebibayt}}', - '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '{nFormatted} {n, plural, one{petabayt} few{petabayt} many{petabayt} other{petabayt}}', - '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '{nFormatted} {n, plural, one{tebibayt} few{tebibayt} many{tebibayt} other{tebibayt}}', - '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '{nFormatted} {n, plural, one{terabayt} few{terabayt} many{terabayt} other{terabayt}}', + ' and ' => '', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(qiymatlanmagan)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Serverning ichki xatoligi yuz berdi.', 'Are you sure you want to delete this item?' => 'Siz rostdan ham ushbu elementni o`chirmoqchimisiz?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => 'O`chirish', 'Error' => 'Xato', 'File upload failed.' => 'Faylni yuklab bo`lmadi.', @@ -57,19 +40,22 @@ 'Missing required arguments: {params}' => 'Quyidagi zarur argumentlar mavjud emas: {params}', 'Missing required parameters: {params}' => 'Quyidagi zarur parametrlar mavjud emas: {params}', 'No' => 'Yo`q', - 'No help for unknown command "{command}".' => '"{command}" noaniq komanda uchun ma`lumotnoma mavjud emas.', - 'No help for unknown sub-command "{command}".' => '"{command}" noaniq qism komanda uchun ma`lumotnoma mavjud emas.', 'No results found.' => 'Hech nima topilmadi.', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Faqat quyidagi MIME-turidagi fayllarni yuklashga ruhsat berilgan: {mimeTypes}.', 'Only files with these extensions are allowed: {extensions}.' => 'Faqat quyidagi kengaytmali fayllarni yuklashga ruhsat berilgan: {extensions}.', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => 'Sahifa topilmadi.', 'Please fix the following errors:' => 'Navbatdagi xatoliklarni to`g`rilang:', 'Please upload a file.' => 'Faylni yuklang.', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Namoyish etilayabdi {begin, number}-{end, number} ta yozuv {totalCount, number} tadan.', + 'The combination {values} of {attributes} has already been taken.' => '', 'The file "{file}" is not an image.' => '«{file}» fayl rasm emas.', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => '«{file}» fayl juda katta. O`lcham {formattedLimit} oshishi kerak emas.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => '«{file}» fayl juda kichkina. O`lcham {formattedLimit} kam bo`lmasligi kerak.', 'The format of {attribute} is invalid.' => '«{attribute}» qiymatning formati noto`g`ri.', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '«{file}» fayl juda katta. Balandlik {limit, number} {limit, plural, one{pikseldan} few{pikseldan} many{pikseldan} other{pikseldan}} oshmasligi kerak.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '«{file}» fayl juda katta. Eni {limit, number} {limit, plural, one{pikseldan} few{pikseldan} many{pikseldan} other{pikseldan}} oshmasligi kerak.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '«{file}» fayl juda kichkina. Balandlik {limit, number} {limit, plural, one{pikseldan} few{pikseldan} many{pikseldan} other{pikseldan}} kam bo`lmasligi kerak.', @@ -78,13 +64,15 @@ 'The verification code is incorrect.' => 'Tekshiruv kodi noto`g`ri.', 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Jami {count, number} {count, plural, one{yozuv} few{yozuv} many{yozuv} other{yozuv}}.', 'Unable to verify your data submission.' => 'Yuborilgan ma`lumotlarni tekshirib bo`lmadi.', - 'Unknown command "{command}".' => '"{command}" noaniq komanda.', + 'Unknown alias: -{name}' => '', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'Noaniq opsiya: --{name}', 'Update' => 'Tahrirlash', 'View' => 'Ko`rish', 'Yes' => 'Ha', 'You are not allowed to perform this action.' => 'Sizga ushbu amalni bajarishga ruhsat berilmagan.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Siz {limit, number} {limit, plural, one{fayldan} few{fayllardan} many{fayllardan} other{fayllardan}} ko`pini yuklab ola olmaysiz.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', 'in {delta, plural, =1{a day} other{# days}}' => '{delta, plural, =1{kundan} one{# kundan} few{# kundan} many{# kunlardan} other{# kundan}} keyin', 'in {delta, plural, =1{a minute} other{# minutes}}' => '{delta, plural, =1{minutdan} one{# minutdan} few{# minutlardan} many{# minutdan} other{# minutlardan}} keyin', 'in {delta, plural, =1{a month} other{# months}}' => '{delta, plural, =1{oydan} one{# oydan} few{# oydan} many{# oylardan} other{# oylardan}} keyin', @@ -95,30 +83,65 @@ 'the input value' => 'kiritilgan qiymat', '{attribute} "{value}" has already been taken.' => '{attribute} «{value}» avvalroq band qilingan.', '{attribute} cannot be blank.' => '«{attribute}» to`ldirish shart.', + '{attribute} contains wrong subnet mask.' => '', '{attribute} is invalid.' => '«{attribute}» qiymati noto`g`ri.', '{attribute} is not a valid URL.' => '«{attribute}» qiymati to`g`ri URL emas.', '{attribute} is not a valid email address.' => '«{attribute}» qiymati to`g`ri email manzil emas.', + '{attribute} is not in the allowed range.' => '', '{attribute} must be "{requiredValue}".' => '«{attribute}» qiymati «{requiredValue}» ga teng bo`lishi kerak.', '{attribute} must be a number.' => '«{attribute}» qiymati son bo`lishi kerak.', '{attribute} must be a string.' => '«{attribute}» qiymati satr bo`lishi kerak.', + '{attribute} must be a valid IP address.' => '', + '{attribute} must be an IP address with specified subnet.' => '', '{attribute} must be an integer.' => '«{attribute}» qiymati butun son bo`lishi kerak.', '{attribute} must be either "{true}" or "{false}".' => '«{attribute}» qiymati «{true}» yoki «{false}» bo`lishi kerak.', - '{attribute} must be greater than "{compareValue}".' => '«{attribute}» qiymati «{compareValue}» dan katta bo`lishi kerak.', - '{attribute} must be greater than or equal to "{compareValue}".' => '«{attribute}» qiymati «{compareValue}» dan katta yoki teng bo`lishi kerak.', - '{attribute} must be less than "{compareValue}".' => '«{attribute}» qiymati «{compareValue}» dan kichkina bo`lishi kerak.', - '{attribute} must be less than or equal to "{compareValue}".' => '«{attribute}» qiymati «{compareValue}» dan kichik yoki teng bo`lishi kerak.', + '{attribute} must be equal to "{compareValueOrAttribute}".' => '', + '{attribute} must be greater than "{compareValueOrAttribute}".' => '«{attribute}» qiymati «{compareValueOrAttribute}» dan katta bo`lishi kerak.', + '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '«{attribute}» qiymati «{compareValueOrAttribute}» dan katta yoki teng bo`lishi kerak.', + '{attribute} must be less than "{compareValueOrAttribute}".' => '«{attribute}» qiymati «{compareValueOrAttribute}» dan kichkina bo`lishi kerak.', + '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '«{attribute}» qiymati «{compareValueOrAttribute}» dan kichik yoki teng bo`lishi kerak.', '{attribute} must be no greater than {max}.' => '«{attribute}» qiymati {max} dan oshmasligi kerak.', '{attribute} must be no less than {min}.' => '«{attribute}» qiymati {min} dan kichkina bo`lmasligi kerak.', - '{attribute} must be repeated exactly.' => '«{attribute}» qiymati bir xil tarzda takrorlanishi kerak.', - '{attribute} must not be equal to "{compareValue}".' => '«{attribute}» qiymati «{compareValue}» ga teng bo`lmasligi kerak.', + '{attribute} must not be a subnet.' => '', + '{attribute} must not be an IPv4 address.' => '', + '{attribute} must not be an IPv6 address.' => '', '{attribute} must not be equal to "{compareValueOrAttribute}".' => '«{attribute}» qiymati «{compareValueOrAttribute}» qiymatiga teng bo`lmasligi lozim.', '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '«{attribute}» qiymati minimum {min, number} {min, plural, one{belgidan} few{belgidan} many{belgidan} other{belgidan}} tashkil topishi kerak.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '«{attribute}» qiymati maksimum {max, number} {max, plural, one{belgidan} few{belgidan} many{belgidan} other{belgidan}} oshmasligi kerak.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '«{attribute}» qiymati {length, number} {length, plural, one{belgidan} few{belgidan} many{belgidan} other{belgidan}} tashkil topishi kerak.', + '{compareAttribute} is invalid.' => '', + '{delta, plural, =1{1 day} other{# days}}' => '', + '{delta, plural, =1{1 hour} other{# hours}}' => '', + '{delta, plural, =1{1 minute} other{# minutes}}' => '', + '{delta, plural, =1{1 month} other{# months}}' => '', + '{delta, plural, =1{1 second} other{# seconds}}' => '', + '{delta, plural, =1{1 year} other{# years}}' => '', '{delta, plural, =1{a day} other{# days}} ago' => '{delta, plural, =1{kun} one{kun} few{# kun} many{# kun} other{# kun}} avval', '{delta, plural, =1{a minute} other{# minutes}} ago' => '{delta, plural, =1{daqiqa} one{# daqiqa} few{# daqiqa} many{# daqiqa} other{# daqiqa}} avval', '{delta, plural, =1{a month} other{# months}} ago' => '{delta, plural, =1{oy} one{# oy} few{# oy} many{# oy} other{# oy}} avval', '{delta, plural, =1{a second} other{# seconds}} ago' => '{delta, plural, =1{soniya} one{# soniya} few{# soniya} many{# soniya} other{# soniya}} avval', '{delta, plural, =1{a year} other{# years}} ago' => '{delta, plural, =1{yil} one{# yil} few{# yil} many{# yil} other{# yil}} avval', '{delta, plural, =1{an hour} other{# hours}} ago' => '{delta, plural, =1{soat} one{# soat} few{# soat} many{# soat} other{# soat}} avval', + '{nFormatted} B' => '{nFormatted} B', + '{nFormatted} GB' => '{nFormatted} GB', + '{nFormatted} GiB' => '{nFormatted} GiB', + '{nFormatted} KiB' => '{nFormatted} KiB', + '{nFormatted} MB' => '{nFormatted} MB', + '{nFormatted} MiB' => '{nFormatted} MiB', + '{nFormatted} PB' => '{nFormatted} PB', + '{nFormatted} PiB' => '{nFormatted} PiB', + '{nFormatted} TB' => '{nFormatted} TB', + '{nFormatted} TiB' => '{nFormatted} TiB', + '{nFormatted} kB' => '{nFormatted} kB', + '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} {n, plural, one{bayt} few{bayt} many{baytlar} other{bayt}}', + '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} {n, plural, one{gibibayt} few{gibibayt} many{gibibayt} other{gibibayt}}', + '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} {n, plural, one{gigabayt} few{gigabayt} many{gigabayt} other{gigabayt}}', + '{nFormatted} {n, plural, =1{kibibyte} other{kibibytes}}' => '{nFormatted} {n, plural, one{kibibayt} few{kibibayt} many{kibibayt} other{kibibayt}}', + '{nFormatted} {n, plural, =1{kilobyte} other{kilobytes}}' => '{nFormatted} {n, plural, one{kilobayt} few{kilobayt} many{kilobayt} other{kilobayt}}', + '{nFormatted} {n, plural, =1{mebibyte} other{mebibytes}}' => '{nFormatted} {n, plural, one{mebibayt} few{mebibayt} many{mebibayt} other{mebibayt}}', + '{nFormatted} {n, plural, =1{megabyte} other{megabytes}}' => '{nFormatted} {n, plural, one{megabayt} few{megabayt} many{megabayt} other{megabayt}}', + '{nFormatted} {n, plural, =1{pebibyte} other{pebibytes}}' => '{nFormatted} {n, plural, one{pebibayt} few{pebibayt} many{pebibayt} other{pebibayt}}', + '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '{nFormatted} {n, plural, one{petabayt} few{petabayt} many{petabayt} other{petabayt}}', + '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '{nFormatted} {n, plural, one{tebibayt} few{tebibayt} many{tebibayt} other{tebibayt}}', + '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '{nFormatted} {n, plural, one{terabayt} few{terabayt} many{terabayt} other{terabayt}}', ]; diff --git a/framework/messages/vi/yii.php b/framework/messages/vi/yii.php index 4bbc9f4896b..947442e6d21 100644 --- a/framework/messages/vi/yii.php +++ b/framework/messages/vi/yii.php @@ -24,9 +24,13 @@ */ return [ ' and ' => ' và ', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(không có)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => 'Máy chủ đã gặp sự cố nội bộ.', 'Are you sure you want to delete this item?' => 'Bạn có chắc là sẽ xóa mục này không?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => 'Xóa', 'Error' => 'Lỗi', 'File upload failed.' => 'Không tải được file lên.', @@ -36,19 +40,22 @@ 'Missing required arguments: {params}' => 'Thiếu đối số: {params}', 'Missing required parameters: {params}' => 'Thiếu tham số: {params}', 'No' => 'Không', - 'No help for unknown command "{command}".' => 'Không có trợ giúp cho lệnh không rõ "{command}"', - 'No help for unknown sub-command "{command}".' => 'Không có trợ giúp cho tiểu lệnh không rõ "{command}"', 'No results found.' => 'Không tìm thấy kết quả nào.', 'Only files with these MIME types are allowed: {mimeTypes}.' => 'Chỉ các file với kiểu MIME sau đây được phép tải lên: {mimeTypes}', 'Only files with these extensions are allowed: {extensions}.' => 'Chỉ các file với phần mở rộng sau đây được phép tải lên: {extensions}', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => 'Không tìm thấy trang.', 'Please fix the following errors:' => 'Vui lòng sửa các lỗi sau đây:', 'Please upload a file.' => 'Hãy tải file lên.', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => 'Trình bày {begin, number}-{end, number} trong số {totalCount, number} mục.', + 'The combination {values} of {attributes} has already been taken.' => '', 'The file "{file}" is not an image.' => 'File "{file}" phải là một ảnh.', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => 'File "{file}" quá lớn. Kích cỡ tối đa được phép tải lên là {formattedLimit}.', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => 'File "{file}" quá nhỏ. Kích cỡ tối thiểu được phép tải lên là {formattedLimit}.', 'The format of {attribute} is invalid.' => 'Định dạng của {attribute} không hợp lệ.', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'File "{file}" có kích thước quá lớn. Chiều cao tối đa được phép là {limit, number} pixel.', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Ảnh "{file}" có kích thước quá lớn. Chiều rộng tối đa được phép là {limit, number} pixel.', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => 'Ảnh "{file}" quá nhỏ. Chiều cao của ảnh không được phép nhỏ hơn {limit, number} pixel.', @@ -57,13 +64,15 @@ 'The verification code is incorrect.' => 'Mã xác thực không đúng.', 'Total {count, number} {count, plural, one{item} other{items}}.' => 'Tổng số {count, number} mục.', 'Unable to verify your data submission.' => 'Không kiểm tra được dữ liệu đã gửi lên.', - 'Unknown command "{command}".' => 'Lệnh không biết "{command}"', + 'Unknown alias: -{name}' => '', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'Tùy chọn không biết: --{name}', 'Update' => 'Sửa', 'View' => 'Xem', 'Yes' => 'Có', 'You are not allowed to perform this action.' => 'Bạn không được phép truy cập chức năng này.', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => 'Chỉ có thể tải lên tối đa {limit, number} file.', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', 'in {delta, plural, =1{a day} other{# days}}' => 'trong {delta} ngày', 'in {delta, plural, =1{a minute} other{# minutes}}' => 'trong {delta} phút', 'in {delta, plural, =1{a month} other{# months}}' => 'trong {delta} tháng', @@ -74,42 +83,65 @@ 'the input value' => 'giá trị đã nhập', '{attribute} "{value}" has already been taken.' => '{attribute} "{value}" đã bị sử dụng.', '{attribute} cannot be blank.' => '{attribute} không được để trống.', + '{attribute} contains wrong subnet mask.' => '', '{attribute} is invalid.' => '{attribute} không hợp lệ.', '{attribute} is not a valid URL.' => '{attribute} không phải là URL hợp lệ.', '{attribute} is not a valid email address.' => '{attribute} không phải là địa chỉ email hợp lệ.', + '{attribute} is not in the allowed range.' => '', '{attribute} must be "{requiredValue}".' => '{attribute} phải là "{requiredValue}"', '{attribute} must be a number.' => '{attribute} phải là số.', '{attribute} must be a string.' => '{attribute} phải là chuỗi.', + '{attribute} must be a valid IP address.' => '', + '{attribute} must be an IP address with specified subnet.' => '', '{attribute} must be an integer.' => '{attribute} phải là số nguyên.', '{attribute} must be either "{true}" or "{false}".' => '{attribute} phải là "{true}" hoặc "{false}".', - '{attribute} must be greater than "{compareValue}".' => '{attribute} phải lớn hơn "{compareValue}"', - '{attribute} must be greater than or equal to "{compareValue}".' => '{attribute} phải lớn hơn hoặc bằng "{compareValue}"', - '{attribute} must be less than "{compareValue}".' => '{attribute} phải nhỏ hơn "{compareValue}"', - '{attribute} must be less than or equal to "{compareValue}".' => '{attribute} phải nhỏ hơn hoặc bằng "{compareValue}"', + '{attribute} must be equal to "{compareValueOrAttribute}".' => '{attribute} phải bằng "{compareValueOrAttribute}"', + '{attribute} must be greater than "{compareValueOrAttribute}".' => '{attribute} phải lớn hơn "{compareValueOrAttribute}"', + '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '{attribute} phải lớn hơn hoặc bằng "{compareValueOrAttribute}"', + '{attribute} must be less than "{compareValueOrAttribute}".' => '{attribute} phải nhỏ hơn "{compareValueOrAttribute}"', + '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '{attribute} phải nhỏ hơn hoặc bằng "{compareValueOrAttribute}"', '{attribute} must be no greater than {max}.' => '{attribute} không được lớn hơn {max}.', '{attribute} must be no less than {min}.' => '{attribute} không được nhỏ hơn {min}', - '{attribute} must be repeated exactly.' => '{attribute} phải lặp lại chính xác.', - '{attribute} must not be equal to "{compareValue}".' => '{attribute} không được phép bằng "{compareValue}"', - '{attribute} must be equal to "{compareValue}".' => '{attribute} phải bằng "{compareValue}"', + '{attribute} must not be a subnet.' => '', + '{attribute} must not be an IPv4 address.' => '', + '{attribute} must not be an IPv6 address.' => '', + '{attribute} must not be equal to "{compareValueOrAttribute}".' => '{attribute} không được phép bằng "{compareValueOrAttribute}"', '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} phải chứa ít nhất {min, number} ký tự.', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} phải chứa nhiều nhất {max, number} ký tự.', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} phải bao gồm {length, number} ký tự.', + '{compareAttribute} is invalid.' => '', + '{delta, plural, =1{1 day} other{# days}}' => '', + '{delta, plural, =1{1 hour} other{# hours}}' => '', + '{delta, plural, =1{1 minute} other{# minutes}}' => '', + '{delta, plural, =1{1 month} other{# months}}' => '', + '{delta, plural, =1{1 second} other{# seconds}}' => '', + '{delta, plural, =1{1 year} other{# years}}' => '', '{delta, plural, =1{a day} other{# days}} ago' => '{delta} ngày trước', '{delta, plural, =1{a minute} other{# minutes}} ago' => '{delta} phút trước', '{delta, plural, =1{a month} other{# months}} ago' => '{delta} tháng trước', '{delta, plural, =1{a second} other{# seconds}} ago' => '{delta} giây trước', '{delta, plural, =1{a year} other{# years}} ago' => '{delta} năm trước', '{delta, plural, =1{an hour} other{# hours}} ago' => '{delta} giờ trước', - '{n, plural, =1{# byte} other{# bytes}}' => '{n} byte', - '{n, plural, =1{# gigabyte} other{# gigabytes}}' => '{n} gigabyte', - '{n, plural, =1{# kilobyte} other{# kilobytes}}' => '{n} kilobyte', - '{n, plural, =1{# megabyte} other{# megabytes}}' => '{n} megabyte', - '{n, plural, =1{# petabyte} other{# petabytes}}' => '{n} petabyte', - '{n, plural, =1{# terabyte} other{# terabytes}}' => '{n} terabyte', - '{n} B' => '{n} B', - '{n} GB' => '{n} GB', - '{n} KB' => '{n} KB', - '{n} MB' => '{n} MB', - '{n} PB' => '{n} PB', - '{n} TB' => '{n} TB', + '{nFormatted} B' => '{nFormatted} B', + '{nFormatted} GB' => '{nFormatted} GB', + '{nFormatted} GiB' => '', + '{nFormatted} KiB' => '', + '{nFormatted} MB' => '{nFormatted} MB', + '{nFormatted} MiB' => '', + '{nFormatted} PB' => '{nFormatted} PB', + '{nFormatted} PiB' => '', + '{nFormatted} TB' => '{nFormatted} TB', + '{nFormatted} TiB' => '', + '{nFormatted} kB' => '{nFormatted} kB', + '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{n} byte', + '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '', + '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} gigabyte', + '{nFormatted} {n, plural, =1{kibibyte} other{kibibytes}}' => '', + '{nFormatted} {n, plural, =1{kilobyte} other{kilobytes}}' => '{nFormatted} kilobyte', + '{nFormatted} {n, plural, =1{mebibyte} other{mebibytes}}' => '', + '{nFormatted} {n, plural, =1{megabyte} other{megabytes}}' => '{nFormatted} megabyte', + '{nFormatted} {n, plural, =1{pebibyte} other{pebibytes}}' => '', + '{nFormatted} {n, plural, =1{petabyte} other{petabytes}}' => '{nFormatted} petabyte', + '{nFormatted} {n, plural, =1{tebibyte} other{tebibytes}}' => '', + '{nFormatted} {n, plural, =1{terabyte} other{terabytes}}' => '{nFormatted} terabyte', ]; diff --git a/framework/messages/zh-TW/yii.php b/framework/messages/zh-TW/yii.php index 866b25d0f9b..c9bc82152c1 100644 --- a/framework/messages/zh-TW/yii.php +++ b/framework/messages/zh-TW/yii.php @@ -23,10 +23,14 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ - 'Unknown alias: -{name}' => '未知的別名: -{name}', + ' and ' => '', + '"{attribute}" does not support operator "{operator}".' => '', '(not set)' => '(未設定)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => '內部系統錯誤。', 'Are you sure you want to delete this item?' => '您確定要刪除此項嗎?', + 'Condition for "{attribute}" should be either a value or valid operator specification.' => '', 'Delete' => '刪除', 'Error' => '錯誤', 'File upload failed.' => '未能上傳檔案。', @@ -36,22 +40,22 @@ 'Missing required arguments: {params}' => '參數不齊全:{params}', 'Missing required parameters: {params}' => '參數不齊全:{params}', 'No' => '否', - 'No help for unknown command "{command}".' => '子命令 "{command}" 發生未知的錯誤。', - 'No help for unknown sub-command "{command}".' => '子命令 "{command}" 發生未知的錯誤。', 'No results found.' => '沒有資料。', 'Only files with these MIME types are allowed: {mimeTypes}.' => '只允許這些MIME類型的文件: {mimeTypes}。', 'Only files with these extensions are allowed: {extensions}.' => '只可以使用以下擴充名的檔案:{extensions}。', + 'Operator "{operator}" must be used with a search attribute.' => '', + 'Operator "{operator}" requires multiple operands.' => '', + 'Options available: {options}' => '', 'Page not found.' => '找不到頁面。', 'Please fix the following errors:' => '請修正以下錯誤:', 'Please upload a file.' => '請上傳一個檔案。', - 'Powered by {yii}' => '技术支持 {yii}', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => '第 {begin, number}-{end, number} 項,共 {totalCount, number} 項資料.', + 'The combination {values} of {attributes} has already been taken.' => '', 'The file "{file}" is not an image.' => '檔案 "{file}" 不是一個圖片檔案。', 'The file "{file}" is too big. Its size cannot exceed {formattedLimit}.' => '檔案"{file}"太大了。它的大小不可以超過{formattedLimit}。', 'The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.' => '文件"{file}"太小了。它的大小不可以小於{formattedLimit}。', - 'The file "{file}" is too big. Its size cannot exceed {limit, number} {limit, plural, one{byte} other{bytes}}.' => '檔案 "{file}" 太大。它的大小不可以超過 {limit, number} 位元組。', - 'The file "{file}" is too small. Its size cannot be smaller than {limit, number} {limit, plural, one{byte} other{bytes}}.' => '檔案 "{file}" 太小。它的大小不可以小於 {limit, number} 位元組。', 'The format of {attribute} is invalid.' => '屬性 {attribute} 的格式不正確。', + 'The format of {filter} is invalid.' => '', 'The image "{file}" is too large. The height cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '圖像 "{file}" 太大。它的高度不可以超過 {limit, number} 像素。', 'The image "{file}" is too large. The width cannot be larger than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '圖像 "{file}" 太大。它的寬度不可以超過 {limit, number} 像素。', 'The image "{file}" is too small. The height cannot be smaller than {limit, number} {limit, plural, one{pixel} other{pixels}}.' => '圖像 "{file}" 太小。它的高度不可以小於 {limit, number} 像素。', @@ -60,14 +64,22 @@ 'The verification code is incorrect.' => '驗證碼不正確。', 'Total {count, number} {count, plural, one{item} other{items}}.' => '總計 {count, number} 項資料。', 'Unable to verify your data submission.' => '您提交的資料無法被驗證。', - 'Unknown command "{command}".' => '未知的指令 "{command}"。', + 'Unknown alias: -{name}' => '未知的別名: -{name}', + 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => '未知的選項:--{name}', 'Update' => '更新', 'View' => '查看', 'Yes' => '是', - 'Yii Framework' => 'Yii 框架', 'You are not allowed to perform this action.' => '您沒有執行此操作的權限。', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => '您最多可以上載 {limit, number} 個檔案。', + 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '', + 'in {delta, plural, =1{a day} other{# days}}' => '{delta}天後', + 'in {delta, plural, =1{a minute} other{# minutes}}' => '{delta}分鐘後', + 'in {delta, plural, =1{a month} other{# months}}' => '{delta}個月後', + 'in {delta, plural, =1{a second} other{# seconds}}' => '{delta}秒後', + 'in {delta, plural, =1{a year} other{# years}}' => '{delta}年後', + 'in {delta, plural, =1{an hour} other{# hours}}' => '{delta}小時後', + 'just now' => '剛剛', 'the input value' => '該輸入', '{attribute} "{value}" has already been taken.' => '{attribute} 的值 "{value}" 已經被佔用了。', '{attribute} cannot be blank.' => '{attribute} 不能為空白。', @@ -84,43 +96,35 @@ '{attribute} must be an integer.' => '{attribute} 必須為整數。', '{attribute} must be either "{true}" or "{false}".' => '{attribute} 必須為 "{true}" 或 "{false}"。', '{attribute} must be equal to "{compareValueOrAttribute}".' => '{attribute}必須等於"{compareValueOrAttribute}"。', - '{attribute} must be greater than "{compareValue}".' => '{attribute} 必須大於 "{compareValue}"。', - '{attribute} must be greater than or equal to "{compareValue}".' => '{attribute} 必須大或等於 "{compareValue}"。', - '{attribute} must be less than "{compareValue}".' => '{attribute} 必須小於 "{compareValue}"。', - '{attribute} must be less than or equal to "{compareValue}".' => '{attribute} 必須少或等於 "{compareValue}"。', + '{attribute} must be greater than "{compareValueOrAttribute}".' => '{attribute} 必須大於 "{compareValueOrAttribute}"。', + '{attribute} must be greater than or equal to "{compareValueOrAttribute}".' => '{attribute} 必須大或等於 "{compareValueOrAttribute}"。', + '{attribute} must be less than "{compareValueOrAttribute}".' => '{attribute} 必須小於 "{compareValueOrAttribute}"。', + '{attribute} must be less than or equal to "{compareValueOrAttribute}".' => '{attribute} 必須少或等於 "{compareValueOrAttribute}"。', '{attribute} must be no greater than {max}.' => '{attribute} 不可以大於 {max}。', '{attribute} must be no less than {min}.' => '{attribute} 不可以少於 {min}。', '{attribute} must not be a subnet.' => '{attribute} 必須不是一個子網。', '{attribute} must not be an IPv4 address.' => '{attribute} 必須不是一個IPv4地址。', '{attribute} must not be an IPv6 address.' => '{attribute} 必須不是一個IPv6地址。', - '{attribute} must be repeated exactly.' => '{attribute} 必須重複一致。', - '{attribute} must not be equal to "{compareValue}".' => '{attribute} 不可以等於 "{compareValue}"。', + '{attribute} must not be equal to "{compareValueOrAttribute}".' => '{attribute} 不可以等於 "{compareValueOrAttribute}"。', '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute} 應該包含至少 {min, number} 個字符。', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute} 只能包含最多 {max, number} 個字符。', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute} 應該包含 {length, number} 個字符。', - 'in {delta, plural, =1{a year} other{# years}}' => '{delta}年後', - 'in {delta, plural, =1{a month} other{# months}}' => '{delta}個月後', - 'in {delta, plural, =1{a day} other{# days}}' => '{delta}天後', - 'in {delta, plural, =1{an hour} other{# hours}}' => '{delta}小時後', - 'in {delta, plural, =1{a minute} other{# minutes}}' => '{delta}分鐘後', - 'in {delta, plural, =1{a second} other{# seconds}}' => '{delta}秒後', + '{compareAttribute} is invalid.' => '', '{delta, plural, =1{1 day} other{# days}}' => '{delta} 天', '{delta, plural, =1{1 hour} other{# hours}}' => '{delta} 小時', '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta} 分鐘', '{delta, plural, =1{1 month} other{# months}}' => '{delta} 月', '{delta, plural, =1{1 second} other{# seconds}}' => '{delta} 秒', '{delta, plural, =1{1 year} other{# years}}' => '{delta} 年', - '{delta, plural, =1{a year} other{# years}} ago' => '{delta}年前', - '{delta, plural, =1{a month} other{# months}} ago' => '{delta}個月前', '{delta, plural, =1{a day} other{# days}} ago' => '{delta}天前', - '{delta, plural, =1{an hour} other{# hours}} ago' => '{delta}小時前', '{delta, plural, =1{a minute} other{# minutes}} ago' => '{delta}分鐘前', - 'just now' => '剛剛', + '{delta, plural, =1{a month} other{# months}} ago' => '{delta}個月前', '{delta, plural, =1{a second} other{# seconds}} ago' => '{delta}秒前', + '{delta, plural, =1{a year} other{# years}} ago' => '{delta}年前', + '{delta, plural, =1{an hour} other{# hours}} ago' => '{delta}小時前', '{nFormatted} B' => '{nFormatted} B', '{nFormatted} GB' => '{nFormatted} GB', '{nFormatted} GiB' => '{nFormatted} GiB', - '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} KiB' => '{nFormatted} KiB', '{nFormatted} MB' => '{nFormatted} MB', '{nFormatted} MiB' => '{nFormatted} MiB', @@ -128,6 +132,7 @@ '{nFormatted} PiB' => '{nFormatted} PiB', '{nFormatted} TB' => '{nFormatted} TB', '{nFormatted} TiB' => '{nFormatted} TiB', + '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} 字節', '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} 千兆位二進制字節', '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} 千兆字節', diff --git a/framework/messages/zh-CN/yii.php b/framework/messages/zh/yii.php similarity index 98% rename from framework/messages/zh-CN/yii.php rename to framework/messages/zh/yii.php index 9d5447b89d7..7f1f3de35d9 100644 --- a/framework/messages/zh-CN/yii.php +++ b/framework/messages/zh/yii.php @@ -26,6 +26,8 @@ ' and ' => ' 与 ', '"{attribute}" does not support operator "{operator}".' => '"{attribute}" 不支持操作 "{operator}"', '(not set)' => '(未设置)', + 'Action not found.' => '', + 'Aliases available: {aliases}' => '', 'An internal server error occurred.' => '服务器内部错误。', 'Are you sure you want to delete this item?' => '您确定要删除此项吗?', 'Condition for "{attribute}" should be either a value or valid operator specification.' => '"{attribute}" 的条件应为一个值或有效的操作规约。', @@ -43,10 +45,10 @@ 'Only files with these extensions are allowed: {extensions}.' => '只允许使用以下文件扩展名的文件:{extensions}。', 'Operator "{operator}" must be used with a search attribute.' => '操作 "{operator}" 必须与一个搜索属性一起使用。', 'Operator "{operator}" requires multiple operands.' => '操作 "{operator}" 需要多个操作数。', + 'Options available: {options}' => '', 'Page not found.' => '页面未找到。', 'Please fix the following errors:' => '请修复以下错误', 'Please upload a file.' => '请上传一个文件。', - 'Powered by {yii}' => '技术支持 {yii}', 'Showing {begin, number}-{end, number} of {totalCount, number} {totalCount, plural, one{item} other{items}}.' => '第{begin, number}-{end, number}条,共{totalCount, number}条数据.', 'The combination {values} of {attributes} has already been taken.' => '{attributes} 的值 "{values}" 已经被占用了。', 'The file "{file}" is not an image.' => '文件 "{file}" 不是一个图像文件。', @@ -68,7 +70,6 @@ 'Update' => '更新', 'View' => '查看', 'Yes' => '是', - 'Yii Framework' => 'Yii 框架', 'You are not allowed to perform this action.' => '您没有执行此操作的权限。', 'You can upload at most {limit, number} {limit, plural, one{file} other{files}}.' => '您最多上传{limit, number}个文件。', 'You should upload at least {limit, number} {limit, plural, one{file} other{files}}.' => '需要至少 {limit, number} 个文件。', @@ -108,6 +109,7 @@ '{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => '{attribute}应该包含至少{min, number}个字符。', '{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => '{attribute}只能包含至多{max, number}个字符。', '{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => '{attribute}应该包含{length, number}个字符。', + '{compareAttribute} is invalid.' => '', '{delta, plural, =1{1 day} other{# days}}' => '{delta} 天', '{delta, plural, =1{1 hour} other{# hours}}' => '{delta} 小时', '{delta, plural, =1{1 minute} other{# minutes}}' => '{delta} 分钟', @@ -123,7 +125,6 @@ '{nFormatted} B' => '{nFormatted} B', '{nFormatted} GB' => '{nFormatted} GB', '{nFormatted} GiB' => '{nFormatted} GiB', - '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} KiB' => '{nFormatted} KiB', '{nFormatted} MB' => '{nFormatted} MB', '{nFormatted} MiB' => '{nFormatted} MiB', @@ -131,6 +132,7 @@ '{nFormatted} PiB' => '{nFormatted} PiB', '{nFormatted} TB' => '{nFormatted} TB', '{nFormatted} TiB' => '{nFormatted} TiB', + '{nFormatted} kB' => '{nFormatted} kB', '{nFormatted} {n, plural, =1{byte} other{bytes}}' => '{nFormatted} 字节', '{nFormatted} {n, plural, =1{gibibyte} other{gibibytes}}' => '{nFormatted} 千兆二进制字节', '{nFormatted} {n, plural, =1{gigabyte} other{gigabytes}}' => '{nFormatted} 千兆字节', diff --git a/framework/mutex/MysqlMutex.php b/framework/mutex/MysqlMutex.php index 0880b2fa1ac..d7716e8c64e 100644 --- a/framework/mutex/MysqlMutex.php +++ b/framework/mutex/MysqlMutex.php @@ -42,6 +42,7 @@ class MysqlMutex extends DbMutex */ public $keyPrefix = null; + /** * Initializes MySQL specific mutex component implementation. * @throws InvalidConfigException if [[db]] is not MySQL connection. @@ -68,9 +69,13 @@ protected function acquireLock($name, $timeout = 0) { return $this->db->useMaster(function ($db) use ($name, $timeout) { /** @var \yii\db\Connection $db */ - return (bool) $db->createCommand( - 'SELECT GET_LOCK(SUBSTRING(CONCAT(:prefix, :name), 1, 64), :timeout)', - [':name' => $this->hashLockName($name), ':timeout' => $timeout, ':prefix' => $this->keyPrefix] + $nameData = $this->prepareName(); + return (bool)$db->createCommand( + 'SELECT GET_LOCK(' . $nameData[0] . ', :timeout), :prefix', + array_merge( + [':name' => $this->hashLockName($name), ':timeout' => $timeout, ':prefix' => $this->keyPrefix], + $nameData[1] + ) )->queryScalar(); }); } @@ -85,13 +90,33 @@ protected function releaseLock($name) { return $this->db->useMaster(function ($db) use ($name) { /** @var \yii\db\Connection $db */ - return (bool) $db->createCommand( - 'SELECT RELEASE_LOCK(SUBSTRING(CONCAT(:prefix, :name), 1, 64))', - [':name' => $this->hashLockName($name), ':prefix' => $this->keyPrefix] + $nameData = $this->prepareName(); + return (bool)$db->createCommand( + 'SELECT RELEASE_LOCK(' . $nameData[0] . '), :prefix', + array_merge( + [':name' => $this->hashLockName($name), ':prefix' => $this->keyPrefix], + $nameData[1] + ) )->queryScalar(); }); } + /** + * Prepare lock name + * @return array expression and params + * @since 2.0.48 + */ + protected function prepareName() + { + $params = []; + $expression = "SUBSTRING(CONCAT(:prefix, :name), 1, 64)"; + if ($this->keyPrefix instanceof Expression) { + $expression = strtr($expression, [':prefix' => $this->keyPrefix->expression]); + $params = $this->keyPrefix->params; + } + return [$expression, $params]; + } + /** * Generate hash for lock name to avoid exceeding lock name length limit. * @@ -100,7 +125,8 @@ protected function releaseLock($name) * @since 2.0.16 * @see https://github.com/yiisoft/yii2/pull/16836 */ - protected function hashLockName($name) { + protected function hashLockName($name) + { return sha1($name); } } diff --git a/framework/rbac/DbManager.php b/framework/rbac/DbManager.php index eb7a86e8cfd..2685ad5a1cd 100644 --- a/framework/rbac/DbManager.php +++ b/framework/rbac/DbManager.php @@ -87,6 +87,11 @@ class DbManager extends BaseManager * @since 2.0.3 */ public $cacheKey = 'rbac'; + /** + * @var string the key used to store user RBAC roles in cache + * @since 2.0.48 + */ + public $rolesCacheSuffix = 'roles'; /** * @var Item[] all auth items (name => Item) @@ -471,6 +476,14 @@ public function getRolesByUser($userId) return []; } + if ($this->cache !== null) { + $data = $this->cache->get($this->getUserRolesCacheKey($userId)); + + if ($data !== false) { + return $data; + } + } + $query = (new Query())->select('b.*') ->from(['a' => $this->assignmentTable, 'b' => $this->itemTable]) ->where('{{a}}.[[item_name]]={{b}}.[[name]]') @@ -482,6 +495,10 @@ public function getRolesByUser($userId) $roles[$row['name']] = $this->populateItem($row); } + if ($this->cache !== null) { + $this->cacheUserRolesData($userId, $roles); + } + return $roles; } @@ -654,7 +671,9 @@ public function getRule($name) if (is_resource($data)) { $data = stream_get_contents($data); } - + if (!$data) { + return null; + } return unserialize($data); } @@ -675,7 +694,9 @@ public function getRules() if (is_resource($data)) { $data = stream_get_contents($data); } - $rules[$row['name']] = unserialize($data); + if ($data) { + $rules[$row['name']] = unserialize($data); + } } return $rules; @@ -861,6 +882,9 @@ public function assign($role, $userId) ])->execute(); unset($this->checkAccessAssignments[(string) $userId]); + + $this->invalidateCache(); + return $assignment; } @@ -874,9 +898,13 @@ public function revoke($role, $userId) } unset($this->checkAccessAssignments[(string) $userId]); - return $this->db->createCommand() + $result = $this->db->createCommand() ->delete($this->assignmentTable, ['user_id' => (string) $userId, 'item_name' => $role->name]) ->execute() > 0; + + $this->invalidateCache(); + + return $result; } /** @@ -889,9 +917,13 @@ public function revokeAll($userId) } unset($this->checkAccessAssignments[(string) $userId]); - return $this->db->createCommand() + $result = $this->db->createCommand() ->delete($this->assignmentTable, ['user_id' => (string) $userId]) ->execute() > 0; + + $this->invalidateCache(); + + return $result; } /** @@ -984,6 +1016,16 @@ public function invalidateCache() $this->items = null; $this->rules = null; $this->parents = null; + + $cachedUserIds = $this->cache->get($this->getUserRolesCachedSetKey()); + + if ($cachedUserIds !== false) { + foreach ($cachedUserIds as $userId) { + $this->cache->delete($this->getUserRolesCacheKey($userId)); + } + + $this->cache->delete($this->getUserRolesCachedSetKey()); + } } $this->checkAccessAssignments = []; } @@ -1013,7 +1055,9 @@ public function loadFromCache() if (is_resource($data)) { $data = stream_get_contents($data); } - $this->rules[$row['name']] = unserialize($data); + if ($data) { + $this->rules[$row['name']] = unserialize($data); + } } $query = (new Query())->from($this->itemChildTable); @@ -1055,4 +1099,28 @@ protected function isEmptyUserId($userId) { return !isset($userId) || $userId === ''; } + + private function getUserRolesCacheKey($userId) + { + return $this->cacheKey . $this->rolesCacheSuffix . $userId; + } + + private function getUserRolesCachedSetKey() + { + return $this->cacheKey . $this->rolesCacheSuffix; + } + + private function cacheUserRolesData($userId, $roles) + { + $cachedUserIds = $this->cache->get($this->getUserRolesCachedSetKey()); + + if ($cachedUserIds === false) { + $cachedUserIds = []; + } + + $cachedUserIds[] = $userId; + + $this->cache->set($this->getUserRolesCacheKey($userId), $roles); + $this->cache->set($this->getUserRolesCachedSetKey(), $cachedUserIds); + } } diff --git a/framework/requirements/YiiRequirementChecker.php b/framework/requirements/YiiRequirementChecker.php index c3c707876fb..45675cd716c 100644 --- a/framework/requirements/YiiRequirementChecker.php +++ b/framework/requirements/YiiRequirementChecker.php @@ -56,6 +56,11 @@ */ class YiiRequirementChecker { + /** + * @var Check result + */ + public $result; + /** * Check the given requirements, collecting results into internal field. * This method can be invoked several times checking different requirement sets. diff --git a/framework/requirements/requirements.php b/framework/requirements/requirements.php index 55593061518..d065f6363bc 100644 --- a/framework/requirements/requirements.php +++ b/framework/requirements/requirements.php @@ -111,5 +111,12 @@ 'memo' => 'When IpValidator::expandIPv6 property is set to true, PHP must support IPv6 protocol stack. Currently PHP constant AF_INET6 is not defined and IPv6 is probably unsupported.' + ), + array( + 'name' => 'pcntl', + 'mandatory' => false, + 'condition' => extension_loaded('pcntl'), + 'by' => 'Process Control', + 'memo' => 'Recommended for yii2-queue CLI operations' ) ); diff --git a/framework/rest/Serializer.php b/framework/rest/Serializer.php index a4d16b195f2..eedd96c2cc6 100644 --- a/framework/rest/Serializer.php +++ b/framework/rest/Serializer.php @@ -188,6 +188,12 @@ protected function getRequestedFields() */ protected function serializeDataProvider($dataProvider) { + if (($pagination = $dataProvider->getPagination()) !== false) { + $this->addPaginationHeaders($pagination); + } + if ($this->request->getIsHead()) { + return null; + } if ($this->preserveKeys) { $models = $dataProvider->getModels(); } else { @@ -195,13 +201,7 @@ protected function serializeDataProvider($dataProvider) } $models = $this->serializeModels($models); - if (($pagination = $dataProvider->getPagination()) !== false) { - $this->addPaginationHeaders($pagination); - } - - if ($this->request->getIsHead()) { - return null; - } elseif ($this->collectionEnvelope === null) { + if ($this->collectionEnvelope === null) { return $models; } @@ -294,10 +294,9 @@ protected function serializeModelErrors($model) */ protected function serializeModels(array $models) { - list($fields, $expand) = $this->getRequestedFields(); foreach ($models as $i => $model) { if ($model instanceof Arrayable) { - $models[$i] = $model->toArray($fields, $expand); + $models[$i] = $this->serializeModel($model); } elseif (is_array($model)) { $models[$i] = ArrayHelper::toArray($model); } diff --git a/framework/validators/DateValidator.php b/framework/validators/DateValidator.php index 740011846de..c0f66454120 100644 --- a/framework/validators/DateValidator.php +++ b/framework/validators/DateValidator.php @@ -441,8 +441,8 @@ private function parseDateValuePHP($value, $format) // if no time was provided in the format string set timezone to default one to match yii\i18n\Formatter::formatDateTimeValue() $timezone = $hasTimeInfo ? $this->timeZone : $this->defaultTimeZone; $date = DateTime::createFromFormat($format, $value, new DateTimeZone($timezone)); - $errors = DateTime::getLastErrors(); - if ($date === false || $errors['error_count'] || $errors['warning_count'] || ($this->strictDateFormat && $date->format($format) !== $value)) { + $errors = DateTime::getLastErrors(); // Before PHP 8.2 may return array instead of false (see https://github.com/php/php-src/issues/9431). + if ($date === false || ($errors !== false && ($errors['error_count'] || $errors['warning_count'])) || ($this->strictDateFormat && $date->format($format) !== $value)) { return false; } diff --git a/framework/validators/ExistValidator.php b/framework/validators/ExistValidator.php index be02f1a4197..faea7b55d47 100644 --- a/framework/validators/ExistValidator.php +++ b/framework/validators/ExistValidator.php @@ -162,7 +162,7 @@ private function checkTargetAttributeExistence($model, $attribute) } $params = $this->prepareConditions($targetAttribute, $model, $attribute); - $conditions = [$this->targetAttributeJunction == 'or' ? 'or' : 'and']; + $conditions = [$this->targetAttributeJunction === 'or' ? 'or' : 'and']; if (!$this->allowArray) { foreach ($params as $key => $value) { @@ -264,17 +264,14 @@ protected function validateValue($value) private function valueExists($targetClass, $query, $value) { $db = $targetClass::getDb(); - $exists = false; if ($this->forceMasterDb && method_exists($db, 'useMaster')) { - $exists = $db->useMaster(function () use ($query, $value) { + return $db->useMaster(function () use ($query, $value) { return $this->queryValueExists($query, $value); }); - } else { - $exists = $this->queryValueExists($query, $value); } - return $exists; + return $this->queryValueExists($query, $value); } @@ -290,6 +287,7 @@ private function queryValueExists($query, $value) if (is_array($value)) { return $query->count("DISTINCT [[$this->targetAttribute]]") == count(array_unique($value)); } + return $query->exists(); } @@ -328,7 +326,7 @@ private function applyTableAlias($query, $conditions, $alias = null) foreach ($conditions as $columnName => $columnValue) { if (strpos($columnName, '(') === false) { $prefixedColumn = "{$alias}.[[" . preg_replace( - '/^' . preg_quote($alias) . '\.(.*)$/', + '/^' . preg_quote($alias, '/') . '\.(.*)$/', '$1', $columnName) . ']]'; } else { diff --git a/framework/validators/NumberValidator.php b/framework/validators/NumberValidator.php index 714288a27f6..074af8cf45f 100644 --- a/framework/validators/NumberValidator.php +++ b/framework/validators/NumberValidator.php @@ -116,19 +116,19 @@ public function validateAttribute($model, $attribute) protected function validateValue($value) { if (is_array($value) && !$this->allowArray) { - return [Yii::t('yii', '{attribute} is invalid.'), []]; + return [$this->message, []]; } $values = !is_array($value) ? [$value] : $value; - foreach ($values as $value) { - if ($this->isNotNumber($value)) { - return [Yii::t('yii', '{attribute} is invalid.'), []]; + foreach ($values as $sample) { + if ($this->isNotNumber($sample)) { + return [$this->message, []]; } $pattern = $this->integerOnly ? $this->integerPattern : $this->numberPattern; - if (!preg_match($pattern, StringHelper::normalizeNumber($value))) { + if (!preg_match($pattern, StringHelper::normalizeNumber($sample))) { return [$this->message, []]; - } elseif ($this->min !== null && $value < $this->min) { + } elseif ($this->min !== null && $sample < $this->min) { return [$this->tooSmall, ['min' => $this->min]]; - } elseif ($this->max !== null && $value > $this->max) { + } elseif ($this->max !== null && $sample > $this->max) { return [$this->tooBig, ['max' => $this->max]]; } } diff --git a/framework/validators/TrimValidator.php b/framework/validators/TrimValidator.php index 89a2eb86b97..022369810b5 100644 --- a/framework/validators/TrimValidator.php +++ b/framework/validators/TrimValidator.php @@ -31,6 +31,7 @@ class TrimValidator extends Validator */ public $skipOnEmpty = false; + /** * @inheritDoc */ diff --git a/framework/validators/UniqueValidator.php b/framework/validators/UniqueValidator.php index 56bb0fe4841..74edcfd661c 100644 --- a/framework/validators/UniqueValidator.php +++ b/framework/validators/UniqueValidator.php @@ -189,8 +189,8 @@ private function modelExists($targetClass, $conditions, $model) /** @var ActiveRecordInterface|\yii\base\BaseObject $targetClass $query */ $query = $this->prepareQuery($targetClass, $conditions); - if (!$model instanceof ActiveRecordInterface || $model->getIsNewRecord() || $model->className() !== $targetClass::className()) { - // if current $model isn't in the database yet then it's OK just to call exists() + if (!$model instanceof ActiveRecordInterface || $model->getIsNewRecord() || $model::className() !== $targetClass::className()) { + // if current $model isn't in the database yet, then it's OK just to call exists() // also there's no need to run check based on primary keys, when $targetClass is not the same as $model's class $exists = $query->exists(); } else { @@ -328,7 +328,7 @@ private function applyTableAlias($query, $conditions, $alias = null) $prefixedConditions = []; foreach ($conditions as $columnName => $columnValue) { if (strpos($columnName, '(') === false) { - $columnName = preg_replace('/^' . preg_quote($alias) . '\.(.*)$/', '$1', $columnName); + $columnName = preg_replace('/^' . preg_quote($alias, '/') . '\.(.*)$/', '$1', $columnName); if (strncmp($columnName, '[[', 2) === 0) { $prefixedColumn = "{$alias}.{$columnName}"; } else { diff --git a/framework/web/Controller.php b/framework/web/Controller.php index 52de6c998e7..86be85819f0 100644 --- a/framework/web/Controller.php +++ b/framework/web/Controller.php @@ -17,10 +17,6 @@ * * For more details and usage information on Controller, see the [guide article on controllers](guide:structure-controllers). * - * @property Request $request The request object. - * @property Response $response The response object. - * @property View $view The view object that can be used to render views or view files. - * * @author Qiang Xue * @since 2.0 */ @@ -145,6 +141,7 @@ public function bindActionParams($action, $params) } elseif ( PHP_VERSION_ID >= 70000 && ($type = $param->getType()) !== null + && method_exists($type, 'isBuiltin') && $type->isBuiltin() && ($params[$name] !== null || !$type->allowsNull()) ) { diff --git a/framework/web/Cookie.php b/framework/web/Cookie.php index ac9a7233710..d249afa6cbd 100644 --- a/framework/web/Cookie.php +++ b/framework/web/Cookie.php @@ -57,8 +57,8 @@ class Cookie extends \yii\base\BaseObject */ public $domain = ''; /** - * @var int the timestamp at which the cookie expires. This is the server timestamp. - * Defaults to 0, meaning "until the browser is closed". + * @var int|string|\DateTimeInterface|null the timestamp or date at which the cookie expires. This is the server timestamp. + * Defaults to 0, meaning "until the browser is closed" (the same applies to `null`). */ public $expire = 0; /** diff --git a/framework/web/CookieCollection.php b/framework/web/CookieCollection.php index aa09b9ca455..597fc2f5fd7 100644 --- a/framework/web/CookieCollection.php +++ b/framework/web/CookieCollection.php @@ -18,7 +18,6 @@ * For more details and usage information on CookieCollection, see the [guide article on handling cookies](guide:runtime-sessions-cookies). * * @property-read int $count The number of cookies in the collection. - * @property-read ArrayIterator $iterator An iterator for traversing the cookies in the collection. * * @author Qiang Xue * @since 2.0 @@ -52,7 +51,7 @@ public function __construct($cookies = [], $config = []) * Returns an iterator for traversing the cookies in the collection. * This method is required by the SPL interface [[\IteratorAggregate]]. * It will be implicitly called when you use `foreach` to traverse the collection. - * @return ArrayIterator an iterator for traversing the cookies in the collection. + * @return ArrayIterator an iterator for traversing the cookies in the collection. */ #[\ReturnTypeWillChange] public function getIterator() @@ -114,7 +113,18 @@ public function getValue($name, $defaultValue = null) public function has($name) { return isset($this->_cookies[$name]) && $this->_cookies[$name]->value !== '' - && ($this->_cookies[$name]->expire === null || $this->_cookies[$name]->expire === 0 || $this->_cookies[$name]->expire >= time()); + && ($this->_cookies[$name]->expire === null + || $this->_cookies[$name]->expire === 0 + || ( + (is_string($this->_cookies[$name]->expire) && strtotime($this->_cookies[$name]->expire) >= time()) + || ( + interface_exists('\\DateTimeInterface') + && $this->_cookies[$name]->expire instanceof \DateTimeInterface + && $this->_cookies[$name]->expire->getTimestamp() >= time() + ) + || $this->_cookies[$name]->expire >= time() + ) + ); } /** @@ -175,7 +185,7 @@ public function removeAll() /** * Returns the collection as a PHP array. - * @return array the array representation of the collection. + * @return Cookie[] the array representation of the collection. * The array keys are cookie names, and the array values are the corresponding cookie objects. */ public function toArray() diff --git a/framework/web/HeaderCollection.php b/framework/web/HeaderCollection.php index 07d6502ef46..724e875bc69 100644 --- a/framework/web/HeaderCollection.php +++ b/framework/web/HeaderCollection.php @@ -13,9 +13,6 @@ /** * HeaderCollection is used by [[Response]] to maintain the currently registered HTTP headers. * - * @property-read int $count The number of headers in the collection. - * @property-read \ArrayIterator $iterator An iterator for traversing the headers in the collection. - * * @author Qiang Xue * @since 2.0 */ diff --git a/framework/web/Link.php b/framework/web/Link.php index c64c34f81c5..3f90fc66a28 100644 --- a/framework/web/Link.php +++ b/framework/web/Link.php @@ -62,11 +62,10 @@ public static function serialize(array $links) { foreach ($links as $rel => $link) { if (is_array($link)) { - foreach ($link as $i => $l) { - $link[$i] = $l instanceof self ? array_filter((array) $l) : ['href' => $l]; - } - $links[$rel] = $link; - } elseif (!$link instanceof self) { + $links[$rel] = self::serialize($link); + } elseif ($link instanceof self) { + $links[$rel] = array_filter((array)$link); + } else { $links[$rel] = ['href' => $link]; } } diff --git a/framework/web/Request.php b/framework/web/Request.php index d3a716c97f0..d87489ce389 100644 --- a/framework/web/Request.php +++ b/framework/web/Request.php @@ -1220,6 +1220,8 @@ protected function getUserIpFromIpHeaders() return null; } + private $_ip = null; + /** * Returns the user IP address. * The IP is determined using headers and / or `$_SERVER` variables. @@ -1227,8 +1229,14 @@ protected function getUserIpFromIpHeaders() */ public function getUserIP() { - $ip = $this->getUserIpFromIpHeaders(); - return $ip === null ? $this->getRemoteIP() : $ip; + if ($this->_ip === null) { + $this->_ip = $this->getUserIpFromIpHeaders(); + if ($this->_ip === null) { + $this->_ip = $this->getRemoteIP(); + } + } + + return $this->_ip; } /** @@ -1902,6 +1910,8 @@ protected function getSecureForwardedHeaderTrustedPart($token) return null; } + private $_secureForwardedHeaderTrustedParts; + /** * Gets only trusted `Forwarded` header parts * @@ -1911,6 +1921,10 @@ protected function getSecureForwardedHeaderTrustedPart($token) */ protected function getSecureForwardedHeaderTrustedParts() { + if ($this->_secureForwardedHeaderTrustedParts !== null) { + return $this->_secureForwardedHeaderTrustedParts; + } + $validator = $this->getIpValidator(); $trustedHosts = []; foreach ($this->trustedHosts as $trustedCidr => $trustedCidrOrHeaders) { @@ -1921,9 +1935,14 @@ protected function getSecureForwardedHeaderTrustedParts() } $validator->setRanges($trustedHosts); - return array_filter($this->getSecureForwardedHeaderParts(), function ($headerPart) use ($validator) { - return isset($headerPart['for']) ? !$validator->validate($headerPart['for']) : true; - }); + $this->_secureForwardedHeaderTrustedParts = array_filter( + $this->getSecureForwardedHeaderParts(), + function ($headerPart) use ($validator) { + return isset($headerPart['for']) ? !$validator->validate($headerPart['for']) : true; + } + ); + + return $this->_secureForwardedHeaderTrustedParts; } private $_secureForwardedHeaderParts; diff --git a/framework/web/Response.php b/framework/web/Response.php index bc06a4b04dd..1724438803e 100644 --- a/framework/web/Response.php +++ b/framework/web/Response.php @@ -10,6 +10,7 @@ use Yii; use yii\base\InvalidArgumentException; use yii\base\InvalidConfigException; +use yii\base\InvalidRouteException; use yii\helpers\FileHelper; use yii\helpers\Inflector; use yii\helpers\StringHelper; @@ -400,12 +401,21 @@ protected function sendCookies() } foreach ($this->getCookies() as $cookie) { $value = $cookie->value; - if ($cookie->expire != 1 && isset($validationKey)) { + $expire = $cookie->expire; + if (is_string($expire)) { + $expire = strtotime($expire); + } elseif (interface_exists('\\DateTimeInterface') && $expire instanceof \DateTimeInterface) { + $expire = $expire->getTimestamp(); + } + if ($expire === null || $expire === false) { + $expire = 0; + } + if ($expire != 1 && isset($validationKey)) { $value = Yii::$app->getSecurity()->hashData(serialize([$cookie->name, $value]), $validationKey); } if (PHP_VERSION_ID >= 70300) { setcookie($cookie->name, $value, [ - 'expires' => $cookie->expire, + 'expires' => $expire, 'path' => $cookie->path, 'domain' => $cookie->domain, 'secure' => $cookie->secure, @@ -419,7 +429,7 @@ protected function sendCookies() if (!is_null($cookie->sameSite)) { $cookiePath .= '; samesite=' . $cookie->sameSite; } - setcookie($cookie->name, $value, $cookie->expire, $cookiePath, $cookie->domain, $cookie->secure, $cookie->httpOnly); + setcookie($cookie->name, $value, $expire, $cookiePath, $cookie->domain, $cookie->secure, $cookie->httpOnly); } } } @@ -886,12 +896,13 @@ public function redirect($url, $statusCode = 302, $checkAjax = true) } $request = Yii::$app->getRequest(); $normalizedUrl = Url::to($url); - if ( - $normalizedUrl !== null - && strncmp($normalizedUrl, '/', 1) === 0 - && strncmp($normalizedUrl, '//', 2) !== 0 - ) { - $normalizedUrl = $request->getHostInfo() . $normalizedUrl; + if ($normalizedUrl !== null) { + if (preg_match('/\n/', $normalizedUrl)) { + throw new InvalidRouteException('Route with new line character detected "' . $normalizedUrl . '".'); + } + if (strncmp($normalizedUrl, '/', 1) === 0 && strncmp($normalizedUrl, '//', 2) !== 0) { + $normalizedUrl = $request->getHostInfo() . $normalizedUrl; + } } if ($checkAjax && $request->getIsAjax()) { diff --git a/framework/web/Session.php b/framework/web/Session.php index 01997ff5f5f..eb900bf96c1 100644 --- a/framework/web/Session.php +++ b/framework/web/Session.php @@ -57,7 +57,6 @@ * @property bool $hasSessionId Whether the current request has sent the session ID. * @property string $id The current session ID. * @property-read bool $isActive Whether the session has started. - * @property-read SessionIterator $iterator An iterator for traversing the session variables. * @property string $name The current session name. * @property string $savePath The current session save path, defaults to '/tmp'. * @property int $timeout The number of seconds after which data will be seen as 'garbage' and cleaned up. The @@ -399,14 +398,14 @@ public function getCookieParams() * of `session_get_cookie_params()`. * @param array $value cookie parameters, valid keys include: `lifetime`, `path`, `domain`, `secure` and `httponly`. * Starting with Yii 2.0.21 `sameSite` is also supported. It requires PHP version 7.3.0 or higher. - * For securtiy, an exception will be thrown if `sameSite` is set while using an unsupported version of PHP. + * For security, an exception will be thrown if `sameSite` is set while using an unsupported version of PHP. * To use this feature across different PHP versions check the version first. E.g. * ```php * [ * 'sameSite' => PHP_VERSION_ID >= 70300 ? yii\web\Cookie::SAME_SITE_LAX : null, * ] * ``` - * See https://www.owasp.org/index.php/SameSite for more information about `sameSite`. + * See https://owasp.org/www-community/SameSite for more information about `sameSite`. * * @throws InvalidArgumentException if the parameters are incomplete. * @see https://www.php.net/manual/en/function.session-set-cookie-params.php diff --git a/framework/web/UrlManager.php b/framework/web/UrlManager.php index 292c4bc3e70..71c38f85d49 100644 --- a/framework/web/UrlManager.php +++ b/framework/web/UrlManager.php @@ -413,7 +413,7 @@ public function createUrl($params) $anchor = isset($params['#']) ? '#' . $params['#'] : ''; unset($params['#'], $params[$this->routeParam]); - $route = trim($params[0], '/'); + $route = trim(isset($params[0]) ? $params[0] : '', '/'); unset($params[0]); $baseUrl = $this->showScriptName || !$this->enablePrettyUrl ? $this->getScriptUrl() : $this->getBaseUrl(); diff --git a/framework/web/View.php b/framework/web/View.php index c372fece58c..f2c19fc721f 100644 --- a/framework/web/View.php +++ b/framework/web/View.php @@ -132,12 +132,14 @@ class View extends \yii\base\View public $jsFiles = []; private $_assetManager; + + /** * Whether [[endPage()]] has been called and all files have been registered * @var bool + * @since 2.0.44 */ - private $_isPageEnded = false; - + protected $isPageEnded = false; /** * Marks the position of an HTML head section. @@ -179,7 +181,7 @@ public function endPage($ajaxMode = false) { $this->trigger(self::EVENT_END_PAGE); - $this->_isPageEnded = true; + $this->isPageEnded = true; $content = ob_get_clean(); @@ -497,8 +499,8 @@ private function registerFile($type, $url, $options = [], $key = null) } $appendTimestamp = ArrayHelper::remove($options, 'appendTimestamp', $assetManagerAppendTimestamp); - if ($this->_isPageEnded) { - Yii::warning('You\'re trying to register a file after View::endPage() has been called'); + if ($this->isPageEnded) { + Yii::warning('You\'re trying to register a file after View::endPage() has been called.'); } if (empty($depends)) { diff --git a/framework/widgets/MaskedInput.php b/framework/widgets/MaskedInput.php index 0ed87e131f5..7513169e9b0 100644 --- a/framework/widgets/MaskedInput.php +++ b/framework/widgets/MaskedInput.php @@ -123,6 +123,7 @@ class MaskedInput extends InputWidget 'canClearPosition' ]; + /** * Initializes the widget. * diff --git a/framework/widgets/MaskedInputAsset.php b/framework/widgets/MaskedInputAsset.php index 57748be86f8..473f4315ffa 100644 --- a/framework/widgets/MaskedInputAsset.php +++ b/framework/widgets/MaskedInputAsset.php @@ -21,7 +21,7 @@ class MaskedInputAsset extends AssetBundle { public $sourcePath = '@bower/inputmask/dist'; public $js = [ - 'jquery.inputmask.bundle.js', + 'jquery.inputmask.js', ]; public $depends = [ 'yii\web\YiiAsset', diff --git a/framework/widgets/Menu.php b/framework/widgets/Menu.php index a70ad1f3e1a..d474ceb3a0e 100644 --- a/framework/widgets/Menu.php +++ b/framework/widgets/Menu.php @@ -23,7 +23,7 @@ * Menu checks the current route and request parameters to toggle certain menu items * with active state. * - * Note that Menu only renders the HTML tags about the menu. It does do any styling. + * Note that Menu only renders the HTML tags about the menu. It does not do any styling. * You are responsible to provide CSS styles to make it look like a real menu. * * The following example shows how to use Menu: @@ -283,7 +283,11 @@ protected function normalizeItems($items, &$active) $items[$i]['active'] = false; } } elseif ($item['active'] instanceof Closure) { - $active = $items[$i]['active'] = call_user_func($item['active'], $item, $hasActiveChild, $this->isItemActive($item), $this); + if (call_user_func($item['active'], $item, $hasActiveChild, $this->isItemActive($item), $this)) { + $active = $items[$i]['active'] = true; + } else { + $items[$i]['active'] = false; + } } elseif ($item['active']) { $active = true; } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 34e150ef8ed..2b9f7c6df55 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -21,7 +21,6 @@ framework/web/ResponseFormatterInterface.php framework/.phpstorm.meta.php framework/base - framework/db/mssql framework/bootstrap diff --git a/tests/TestCase.php b/tests/TestCase.php index d18e1145949..5a8287f1f55 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -123,6 +123,39 @@ protected function assertEqualsWithoutLE($expected, $actual, $message = '') $this->assertEquals($expected, $actual, $message); } + /** + * Asserting two strings equality ignoring unicode whitespaces. + * @param string $expected + * @param string $actual + * @param string $message + */ + protected function assertEqualsAnyWhitespace($expected, $actual, $message = ''){ + $expected = $this->sanitizeWhitespaces($expected); + $actual = $this->sanitizeWhitespaces($actual); + + $this->assertEquals($expected, $actual, $message); + } + + /** + * Asserts that two variables have the same type and value and sanitizes value if it is a string. + * Used on objects, it asserts that two variables reference + * the same object. + * + * @param mixed $expected + * @param mixed $actual + * @param string $message + */ + protected function assertSameAnyWhitespace($expected, $actual, $message = ''){ + if (is_string($expected)) { + $expected = $this->sanitizeWhitespaces($expected); + } + if (is_string($actual)) { + $actual = $this->sanitizeWhitespaces($actual); + } + + $this->assertSame($expected, $actual, $message); + } + /** * Asserts that a haystack contains a needle ignoring line endings. * @@ -138,6 +171,17 @@ protected function assertContainsWithoutLE($needle, $haystack, $message = '') $this->assertContains($needle, $haystack, $message); } + /** + * Replaces unicode whitespaces with standard whitespace + * + * @see https://github.com/yiisoft/yii2/issues/19868 (ICU 72 changes) + * @param $string + * @return string + */ + protected function sanitizeWhitespaces($string){ + return preg_replace("/[\pZ\pC]/u", " ", $string); + } + /** * Invokes a inaccessible method. * @param $object diff --git a/tests/data/ar/NoAutoLabels.php b/tests/data/ar/NoAutoLabels.php new file mode 100644 index 00000000000..e33a3847d84 --- /dev/null +++ b/tests/data/ar/NoAutoLabels.php @@ -0,0 +1,27 @@ + 'Label for attr1', + ]; + } + + public function generateAttributeLabel($name) + { + throw new \yii\base\InvalidArgumentException('Label not defined!'); + } +} diff --git a/tests/framework/base/DynamicModelTest.php b/tests/framework/base/DynamicModelTest.php index 0c4a25110b3..d3dca504b6f 100644 --- a/tests/framework/base/DynamicModelTest.php +++ b/tests/framework/base/DynamicModelTest.php @@ -37,6 +37,20 @@ public function testValidateData() $this->assertTrue($model->hasErrors('age')); } + public function testValidateDataWithPostData() + { + $post = [ + 'name' => 'long name', + ]; + $model = DynamicModel::validateData($post, [ + [['email', 'name'], 'required'], + ['age', 'default', 'value' => 18], + ]); + $this->assertTrue($model->hasErrors()); + $this->assertTrue($model->hasErrors('email')); + $this->assertEquals(18, $model->age); + } + public function testAddRule() { $model = new DynamicModel(); diff --git a/tests/framework/behaviors/AttributeTypecastBehaviorTest.php b/tests/framework/behaviors/AttributeTypecastBehaviorTest.php index ee84530e53d..a43b9346bbe 100644 --- a/tests/framework/behaviors/AttributeTypecastBehaviorTest.php +++ b/tests/framework/behaviors/AttributeTypecastBehaviorTest.php @@ -127,6 +127,24 @@ public function testAfterFindEvent() $this->assertSame('callback: find', $model->callback); } + /** + * @see https://github.com/yiisoft/yii2/issues/17194 + */ + public function testDirtyAttributesAreEmptyAfterFind() + { + $model = new ActiveRecordAttributeTypecast(); + $model->name = 123; + $model->amount = '58'; + $model->price = '100.8'; + $model->isActive = 1; + $model->callback = 'foo'; + $model->save(false); + + $model = ActiveRecordAttributeTypecast::find()->one(); + + $this->assertEmpty($model->getDirtyAttributes()); + } + /** * @depends testTypecast */ diff --git a/tests/framework/caching/ApcCacheTest.php b/tests/framework/caching/ApcCacheTest.php index 809286bbd89..7f3311b7702 100644 --- a/tests/framework/caching/ApcCacheTest.php +++ b/tests/framework/caching/ApcCacheTest.php @@ -23,7 +23,7 @@ class ApcCacheTest extends CacheTestCase */ protected function getCacheInstance() { - if (!extension_loaded('apc')) { + if (!extension_loaded('apc') && !extension_loaded('apcu')) { $this->markTestSkipped('APC not installed. Skipping.'); } elseif ('cli' === PHP_SAPI && !ini_get('apc.enable_cli')) { $this->markTestSkipped('APC cli is not enabled. Skipping.'); @@ -33,7 +33,9 @@ protected function getCacheInstance() $this->markTestSkipped('APC is installed but not enabled. Skipping.'); } - if ($this->_cacheInstance === null) { + if ($this->_cacheInstance === null && PHP_VERSION_ID >= 70400) { + $this->_cacheInstance = new ApcCache(['useApcu' => true]); + } elseif ($this->_cacheInstance === null) { $this->_cacheInstance = new ApcCache(); } diff --git a/tests/framework/caching/DbDependencyTest.php b/tests/framework/caching/DbDependencyTest.php index bd801e3528c..bb723be3a49 100644 --- a/tests/framework/caching/DbDependencyTest.php +++ b/tests/framework/caching/DbDependencyTest.php @@ -21,7 +21,6 @@ class DbDependencyTest extends DatabaseTestCase */ protected $driverName = 'sqlite'; - /** * {@inheritdoc} */ @@ -39,11 +38,14 @@ protected function setUp() $db->createCommand()->insert('dependency_item', ['value' => 'initial'])->execute(); } - public function testIsChanged() + public function testQueryOneIsExecutedWhenQueryCacheEnabled() { $db = $this->getConnection(false); $cache = new ArrayCache(); + // Enable the query cache + $db->enableQueryCache = true; + $dependency = new DbDependency(); $dependency->db = $db; $dependency->sql = 'SELECT [[id]] FROM {{dependency_item}} ORDER BY [[id]] DESC LIMIT 1'; @@ -56,4 +58,39 @@ public function testIsChanged() $this->assertTrue($dependency->isChanged($cache)); } + + public function testQueryOneIsExecutedWhenQueryCacheDisabled() + { + $db = $this->getConnection(false); + $cache = new ArrayCache(); + + // Disable the query cache + $db->enableQueryCache = false; + + $dependency = new DbDependency(); + $dependency->db = $db; + $dependency->sql = 'SELECT [[id]] FROM {{dependency_item}} ORDER BY [[id]] DESC LIMIT 1'; + $dependency->reusable = false; + + $dependency->evaluateDependency($cache); + $this->assertFalse($dependency->isChanged($cache)); + + $db->createCommand()->insert('dependency_item', ['value' => 'new'])->execute(); + + $this->assertTrue($dependency->isChanged($cache)); + } + + public function testMissingSqlThrowsException() + { + $this->expectException('\yii\base\InvalidConfigException'); + + $db = $this->getConnection(false); + $cache = new ArrayCache(); + + $dependency = new DbDependency(); + $dependency->db = $db; + $dependency->sql = null; + + $dependency->evaluateDependency($cache); + } } diff --git a/tests/framework/caching/MemCachedTest.php b/tests/framework/caching/MemCachedTest.php index 8b6b735b433..742d53d05ae 100644 --- a/tests/framework/caching/MemCachedTest.php +++ b/tests/framework/caching/MemCachedTest.php @@ -27,7 +27,9 @@ protected function getCacheInstance() $this->markTestSkipped('memcached not installed. Skipping.'); } - if (PHP_VERSION_ID >= 80100 && version_compare(phpversion('memcached'), '3.1.5', '<=')) { + if ( + PHP_VERSION_ID >= 80100 && version_compare(phpversion('memcached'), '3.1.5', '<=') + ) { $php_version = phpversion(); $memcached_version = phpversion('memcached'); $this->markTestSkipped("memcached version $memcached_version is not ready for PHP $php_version. Skipping."); diff --git a/tests/framework/console/controllers/ServeControllerTest.php b/tests/framework/console/controllers/ServeControllerTest.php new file mode 100644 index 00000000000..35a5db6d075 --- /dev/null +++ b/tests/framework/console/controllers/ServeControllerTest.php @@ -0,0 +1,163 @@ +mockApplication(); + } + + public function testAddressTaken() + { + $docroot = __DIR__ . '/stub'; + + /** @var ServeController $serveController */ + $serveController = $this->getMockBuilder(ServeControllerMocK::className()) + ->setConstructorArgs(['serve', Yii::$app]) + ->setMethods(['isAddressTaken', 'runCommand']) + ->getMock(); + + $serveController->expects($this->once())->method('isAddressTaken')->willReturn(true); + $serveController->expects($this->never())->method('runCommand'); + + $serveController->docroot = $docroot; + $serveController->port = 8080; + + ob_start(); + $serveController->actionIndex('localhost:8080'); + ob_end_clean(); + + $result = $serveController->flushStdOutBuffer(); + + $this->assertContains('http://localhost:8080 is taken by another process.', $result); + } + + public function testDefaultValues() + { + $docroot = __DIR__ . '/stub'; + + /** @var ServeController $serveController */ + $serveController = $this->getMockBuilder(ServeControllerMock::className()) + ->setConstructorArgs(['serve', Yii::$app]) + ->setMethods(['runCommand']) + ->getMock(); + + $serveController->docroot = $docroot; + $serveController->port = 8080; + + $serveController->expects($this->once())->method('runCommand')->willReturn(true); + + ob_start(); + $serveController->actionIndex(); + ob_end_clean(); + + $result = $serveController->flushStdOutBuffer(); + + $this->assertContains('Server started on http://localhost:8080', $result); + $this->assertContains("Document root is \"{$docroot}\"", $result); + $this->assertContains('Quit the server with CTRL-C or COMMAND-C.', $result); + } + + public function testDoocRootWithNoExistValue() + { + $docroot = '/not/exist/path'; + + /** @var ServeController $serveController */ + $serveController = $this->getMockBuilder(ServeControllerMock::className()) + ->setConstructorArgs(['serve', Yii::$app]) + ->setMethods(['runCommand']) + ->getMock(); + + $serveController->docroot = $docroot; + + $serveController->expects($this->any())->method('runCommand')->willReturn(true); + + ob_start(); + $serveController->actionIndex(); + ob_end_clean(); + + $result = $serveController->flushStdOutBuffer(); + + $this->assertContains("Document root \"{$docroot}\" does not exist.", $result); + } + + public function testWithRouterNoExistValue() + { + $docroot = __DIR__ . '/stub'; + $router = '/not/exist/path'; + + /** @var ServeController $serveController */ + $serveController = $this->getMockBuilder(ServeControllerMock::className()) + ->setConstructorArgs(['serve', Yii::$app]) + ->setMethods(['runCommand']) + ->getMock(); + + $serveController->docroot = $docroot; + $serveController->port = 8081; + $serveController->router = $router; + + $serveController->expects($this->any())->method('runCommand')->willReturn(true); + + ob_start(); + $serveController->actionIndex(); + ob_end_clean(); + + $result = $serveController->flushStdOutBuffer(); + + $this->assertContains("Routing file \"$router\" does not exist.", $result); + } + + public function testWithRouterValue() + { + $docroot = __DIR__ . '/stub'; + $router = __DIR__ . '/stub/index.php'; + + /** @var ServeController $serveController */ + $serveController = $this->getMockBuilder(ServeControllerMock::className()) + ->setConstructorArgs(['serve', Yii::$app]) + ->setMethods(['runCommand']) + ->getMock(); + + $serveController->docroot = $docroot; + $serveController->port = 8081; + $serveController->router = $router; + + $serveController->expects($this->once())->method('runCommand')->willReturn(true); + + ob_start(); + $serveController->actionIndex(); + ob_end_clean(); + + $result = $serveController->flushStdOutBuffer(); + + $this->assertContains('Server started on http://localhost:8081', $result); + $this->assertContains("Document root is \"{$docroot}\"", $result); + $this->assertContains("Routing file is \"{$router}\"", $result); + $this->assertContains('Quit the server with CTRL-C or COMMAND-C.', $result); + } +} + +/** + * Mock class for [[\yii\console\controllers\ServeController]]. + */ +class ServeControllerMock extends ServeController +{ + use StdOutBufferControllerTrait; +} diff --git a/tests/framework/console/controllers/stub/index.php b/tests/framework/console/controllers/stub/index.php new file mode 100644 index 00000000000..8b57cd3113e --- /dev/null +++ b/tests/framework/console/controllers/stub/index.php @@ -0,0 +1,3 @@ +setHeaders($headers) + ->setRows($rows) + ->setScreenWidth(200) + ->run(); + $this->assertEqualsWithoutLE($expected, $tableContent); + } + + public function getMultiLineTableData() + { + return [ + [ + ['test1', 'test2', 'test3' . PHP_EOL . 'multiline'], + [ + ['test' . PHP_EOL . 'content1', 'testcontent2', 'test' . PHP_EOL . 'content3'], + [ + 'testcontent21', + 'testcontent22' . PHP_EOL + . 'loooooooooooooooooooooooooooooooooooong' . PHP_EOL + . 'content', + 'testcontent23' . PHP_EOL + . 'loooooooooooooooooooooooooooooooooooong content' + ], + ] + ], + [ + ['key1' => 'test1', 'key2' => 'test2', 'key3' => 'test3' . PHP_EOL . 'multiline'], + [ + [ + 'key1' => 'test' . PHP_EOL . 'content1', + 'key2' => 'testcontent2', + 'key3' => 'test' . PHP_EOL . 'content3' + ], + [ + 'key1' => 'testcontent21', + 'key2' => 'testcontent22' . PHP_EOL + . 'loooooooooooooooooooooooooooooooooooong' . PHP_EOL + . 'content', + 'key3' => 'testcontent23' . PHP_EOL + . 'loooooooooooooooooooooooooooooooooooong content' + ], + ] + ] + ]; + } + + /** + * @dataProvider getMultiLineTableData + */ + public function testMultiLineTable($headers, $rows) + { + $table = new Table(); + + $expected = <<<'EXPECTED' +╔═════════════╤═════════════════════════════════════╤═════════════════════════════════════════════╗ +║ test1 │ test2 │ test3 ║ +║ │ │ multiline ║ +╟─────────────┼─────────────────────────────────────┼─────────────────────────────────────────────╢ +║ test │ testcontent2 │ test ║ +║ content1 │ │ content3 ║ +╟─────────────┼─────────────────────────────────────┼─────────────────────────────────────────────╢ +║ testcontent │ testcontent22 │ testcontent23 ║ +║ 21 │ loooooooooooooooooooooooooooooooooo │ loooooooooooooooooooooooooooooooooooong con ║ +║ │ oong │ tent ║ +║ │ content │ ║ +╚═════════════╧═════════════════════════════════════╧═════════════════════════════════════════════╝ + +EXPECTED; + + $tableContent = $table + ->setHeaders($headers) + ->setRows($rows) + ->setScreenWidth(100) + ->run(); + $this->assertEqualsWithoutLE($expected, $tableContent); + } + + public function getNumericTableData() + { + return [ + [ + [1, 2, 3], + [ + [1, 1.2, -1.3], + [-2, 2.2, 2.3], + ] + ], + [ + ['key1' => 1, 'key2' => 2, 'key3' => 3], + [ + ['key1' => 1, 'key2' => 1.2, 'key3' => -1.3], + ['key1' => -2, 'key2' => 2.2, 'key3' => 2.3], + ] + ] + ]; + } + + /** + * @dataProvider getNumericTableData + */ + public function testNumericTable($headers, $rows) + { + $table = new Table(); + + $expected = <<<'EXPECTED' +╔════╤═════╤══════╗ +║ 1 │ 2 │ 3 ║ +╟────┼─────┼──────╢ +║ 1 │ 1.2 │ -1.3 ║ +╟────┼─────┼──────╢ +║ -2 │ 2.2 │ 2.3 ║ +╚════╧═════╧══════╝ + EXPECTED; $tableContent = $table @@ -101,7 +216,8 @@ public function testLists() ╔═══════════════╤═══════════════╤══════════════╗ ║ test1 │ test2 │ test3 ║ ╟───────────────┼───────────────┼──────────────╢ -║ testcontent1 │ testcontent2 │ testcontent3 ║ +║ • col1 │ testcontent2 │ testcontent3 ║ +║ • col2 │ │ ║ ╟───────────────┼───────────────┼──────────────╢ ║ testcontent21 │ testcontent22 │ • col1 ║ ║ │ │ • col2 ║ @@ -111,7 +227,7 @@ public function testLists() $this->assertEqualsWithoutLE($expected, $table->setHeaders(['test1', 'test2', 'test3']) ->setRows([ - ['testcontent1', 'testcontent2', 'testcontent3'], + [['key1' => 'col1', 'key2' => 'col2'], 'testcontent2', 'testcontent3'], ['testcontent21', 'testcontent22', ['col1', 'col2']], ])->setScreenWidth(200)->run() ); @@ -141,6 +257,35 @@ public function testListPrefix() ); } + public function testLongerListPrefix() + { + $table = new Table(); + + $expected = <<<'EXPECTED' +╔═════════════════════════════════╤═════════════════════════════════╤═════════════════════════════╗ +║ test1 │ test2 │ test3 ║ +╟─────────────────────────────────┼─────────────────────────────────┼─────────────────────────────╢ +║ testcontent1 │ testcontent2 │ testcontent3 ║ +╟─────────────────────────────────┼─────────────────────────────────┼─────────────────────────────╢ +║ testcontent21 with looooooooooo │ testcontent22 with looooooooooo │ -- col1 with looooooooooooo ║ +║ ooooooooooooong content │ ooooooooooooong content │ ooooooooooong content ║ +║ │ │ -- col2 with long content ║ +╚═════════════════════════════════╧═════════════════════════════════╧═════════════════════════════╝ + +EXPECTED; + + $this->assertEqualsWithoutLE($expected, $table->setHeaders(['test1', 'test2', 'test3']) + ->setRows([ + ['testcontent1', 'testcontent2', 'testcontent3'], + [ + 'testcontent21 with loooooooooooooooooooooooong content', + 'testcontent22 with loooooooooooooooooooooooong content', + ['col1 with loooooooooooooooooooooooong content', 'col2 with long content'] + ], + ])->setScreenWidth(100)->setListPrefix('-- ')->run() + ); + } + public function testCustomChars() { $table = new Table(); diff --git a/tests/framework/data/BaseDataProviderTest.php b/tests/framework/data/BaseDataProviderTest.php index ea5ae21cb69..c06d4a09bc2 100644 --- a/tests/framework/data/BaseDataProviderTest.php +++ b/tests/framework/data/BaseDataProviderTest.php @@ -20,7 +20,7 @@ public function testGenerateId() $rc = new \ReflectionClass(BaseDataProvider::className()); $rp = $rc->getProperty('counter'); $rp->setAccessible(true); - $rp->setValue(null); + $rp->setValue(new ConcreteDataProvider(), null); $this->assertNull((new ConcreteDataProvider())->id); $this->assertNotNull((new ConcreteDataProvider())->id); diff --git a/tests/framework/data/SortTest.php b/tests/framework/data/SortTest.php index 19367bfa2c2..c9bb1884212 100644 --- a/tests/framework/data/SortTest.php +++ b/tests/framework/data/SortTest.php @@ -53,9 +53,6 @@ public function testGetOrders() $this->assertEquals(SORT_ASC, $orders['age']); } - /** - * @depends testGetOrders - */ public function testGetAttributeOrders() { $sort = new Sort([ @@ -83,9 +80,6 @@ public function testGetAttributeOrders() $this->assertEquals(SORT_ASC, $orders['age']); } - /** - * @depends testGetAttributeOrders - */ public function testGetAttributeOrder() { $sort = new Sort([ @@ -107,9 +101,6 @@ public function testGetAttributeOrder() $this->assertNull($sort->getAttributeOrder('xyz')); } - /** - * @depends testGetAttributeOrders - */ public function testSetAttributeOrders() { $sort = new Sort([ @@ -217,10 +208,20 @@ public function testCreateUrl() $this->assertEquals('/index.php?r=site%2Findex&sort=age', $sort->createUrl('name')); } + public function providerForLinkWithParams() + { + return [ + [true, null, 'Age'], + [false, null, 'Age'], + [true, ['age' => SORT_DESC], 'Age'], + [false, ['age' => SORT_DESC], 'Age'], + ]; + } + /** - * @depends testCreateUrl + * @dataProvider providerForLinkWithParams */ - public function testLink() + public function testLinkWithParams($enableMultiSort, $defaultOrder, $link) { $this->mockApplication(); $manager = new UrlManager([ @@ -240,12 +241,98 @@ public function testLink() 'params' => [ 'sort' => 'age,-name', ], + 'enableMultiSort' => $enableMultiSort, + 'defaultOrder' => $defaultOrder, + 'urlManager' => $manager, + 'route' => 'site/index', + ]); + + $this->assertEquals($link, $sort->link('age')); + } + + public function providerForLinkWithParamsAndPassedButEmptySort() + { + return [ + [null], + [['age' => SORT_DESC]], + [['age' => SORT_ASC]], + ]; + } + + /** + * @dataProvider providerForLinkWithParamsAndPassedButEmptySort + */ + public function testLinkWithParamsAndPassedButEmptySort($defaultOrder) + { + $this->mockApplication(); + $manager = new UrlManager([ + 'baseUrl' => '/', + 'scriptUrl' => '/index.php', + 'cache' => null, + ]); + + $sort = new Sort([ + 'attributes' => [ + 'age', + 'name' => [ + 'asc' => ['first_name' => SORT_ASC, 'last_name' => SORT_ASC], + 'desc' => ['first_name' => SORT_DESC, 'last_name' => SORT_DESC], + ], + ], + 'params' => [ + 'sort' => '', + ], 'enableMultiSort' => true, + 'defaultOrder' => $defaultOrder, + 'urlManager' => $manager, + 'route' => 'site/index', + ]); + + $this->assertEquals( + 'Age', + $sort->link('age') + ); + } + + public function providerForLinkWithoutParams() + { + return [ + [false, null, 'Age'], + [false, ['age' => SORT_DESC], 'Age'], + [false, ['age' => SORT_ASC], 'Age'], + [true, null, 'Age'], + [true, ['age' => SORT_DESC], 'Age'], + [true, ['age' => SORT_ASC], 'Age'], + ]; + } + + /** + * @dataProvider providerForLinkWithoutParams + */ + public function testLinkWithoutParams($enableMultiSort, $defaultOrder, $link) + { + $this->mockApplication(); + $manager = new UrlManager([ + 'baseUrl' => '/', + 'scriptUrl' => '/index.php', + 'cache' => null, + ]); + + $sort = new Sort([ + 'attributes' => [ + 'age', + 'name' => [ + 'asc' => ['first_name' => SORT_ASC, 'last_name' => SORT_ASC], + 'desc' => ['first_name' => SORT_DESC, 'last_name' => SORT_DESC], + ], + ], + 'enableMultiSort' => $enableMultiSort, + 'defaultOrder' => $defaultOrder, 'urlManager' => $manager, 'route' => 'site/index', ]); - $this->assertEquals('Age', $sort->link('age')); + $this->assertEquals($link, $sort->link('age')); } public function testParseSortParam() @@ -269,8 +356,6 @@ public function testParseSortParam() } /** - * @depends testGetOrders - * * @see https://github.com/yiisoft/yii2/pull/13260 */ public function testGetExpressionOrders() diff --git a/tests/framework/db/ActiveRecordTest.php b/tests/framework/db/ActiveRecordTest.php index f1370f47282..e50cca3e024 100644 --- a/tests/framework/db/ActiveRecordTest.php +++ b/tests/framework/db/ActiveRecordTest.php @@ -2192,4 +2192,134 @@ public function testVirtualRelation() $this->assertNotNull($order->virtualCustomer); } + public function labelTestModelProvider() + { + $data = []; + + // Model 2 and 3 are represented by objects. + $model1 = new LabelTestModel1(); + $model2 = new LabelTestModel2(); + $model3 = new LabelTestModel3(); + $model2->populateRelation('model3', $model3); + $model1->populateRelation('model2', $model2); + $data[] = [$model1]; + + // Model 2 and 3 are represented by arrays instead of objects. + $model1 = new LabelTestModel1(); + $model2 = ['model3' => []]; + $model1->populateRelation('model2', $model2); + $data[] = [$model1]; + + return $data; + } + + /** + * @dataProvider labelTestModelProvider + * @param \yii\db\ActiveRecord $model + */ + public function testGetAttributeLabel($model) + { + $this->assertEquals('model3.attr1 from model2', $model->getAttributeLabel('model2.model3.attr1')); + $this->assertEquals('attr2 from model3', $model->getAttributeLabel('model2.model3.attr2')); + $this->assertEquals('model3.attr3 from model2', $model->getAttributeLabel('model2.model3.attr3')); + $attr = 'model2.doesNotExist.attr1'; + $this->assertEquals($model->generateAttributeLabel($attr), $model->getAttributeLabel($attr)); + } + + public function testLoadRelations() + { + // Test eager loading relations for multiple primary models using loadRelationsFor(). + /** @var Customer[] $customers */ + $customers = Customer::find()->all(); + Customer::loadRelationsFor($customers, ['orders.items']); + foreach ($customers as $customer) { + $this->assertTrue($customer->isRelationPopulated('orders')); + foreach ($customer->orders as $order) { + $this->assertTrue($order->isRelationPopulated('items')); + } + } + + // Test eager loading relations as arrays. + /** @var array $customers */ + $customers = Customer::find()->asArray(true)->all(); + Customer::loadRelationsFor($customers, ['orders.items' => function ($query) { $query->asArray(false); }], true); + foreach ($customers as $customer) { + $this->assertTrue(isset($customer['orders'])); + $this->assertTrue(is_array($customer['orders'])); + foreach ($customer['orders'] as $order) { + $this->assertTrue(is_array($order)); + $this->assertTrue(isset($order['items'])); + $this->assertTrue(is_array($order['items'])); + foreach ($order['items'] as $item) { + $this->assertFalse(is_array($item)); + } + } + } + + // Test eager loading relations for a single primary model using loadRelations(). + /** @var Customer $customer */ + $customer = Customer::find()->where(['id' => 1])->one(); + $customer->loadRelations('orders.items'); + $this->assertTrue($customer->isRelationPopulated('orders')); + foreach ($customer->orders as $order) { + $this->assertTrue($order->isRelationPopulated('items')); + } + + // Test eager loading previously loaded relation (relation value should be replaced with a new value loaded from database). + /** @var Customer $customer */ + $customer = Customer::find()->where(['id' => 2])->with(['orders' => function ($query) { $query->orderBy(['id' => SORT_ASC]); }])->one(); + $this->assertTrue($customer->orders[0]->id < $customer->orders[1]->id, 'Related models should be sorted by ID in ascending order.'); + $customer->loadRelations(['orders' => function ($query) { $query->orderBy(['id' => SORT_DESC]); }]); + $this->assertTrue($customer->orders[0]->id > $customer->orders[1]->id, 'Related models should be sorted by ID in descending order.'); + } +} + +class LabelTestModel1 extends \yii\db\ActiveRecord +{ + public function attributes() + { + return []; + } + + public function getModel2() + { + return $this->hasOne(LabelTestModel2::className(), []); + } +} + +class LabelTestModel2 extends \yii\db\ActiveRecord +{ + public function attributes() + { + return []; + } + + public function getModel3() + { + return $this->hasOne(LabelTestModel3::className(), []); + } + + public function attributeLabels() + { + return [ + 'model3.attr1' => 'model3.attr1 from model2', // Override label defined in model3. + 'model3.attr3' => 'model3.attr3 from model2', // Define label not defined in model3. + ]; + } +} + +class LabelTestModel3 extends \yii\db\ActiveRecord +{ + public function attributes() + { + return ['attr1', 'attr2', 'attr3']; + } + + public function attributeLabels() + { + return [ + 'attr1' => 'attr1 from model3', + 'attr2' => 'attr2 from model3', + ]; + } } diff --git a/tests/framework/db/BaseActiveRecordTest.php b/tests/framework/db/BaseActiveRecordTest.php new file mode 100644 index 00000000000..0427421cd81 --- /dev/null +++ b/tests/framework/db/BaseActiveRecordTest.php @@ -0,0 +1,42 @@ +getConnection(); + } + + public function provideArrayValueWithChange() + { + return [ + 'not an associative array with data change' => [ + [1, 2, 3], + [1, 3, 2], + ], + + 'associative array with data change case 1' => [ + ['pineapple' => 2, 'apple' => 5, 'banana' => 1], + ['apple' => 5, 'pineapple' => 1, 'banana' => 3], + ], + 'associative array with data change case 2' => [ + ['pineapple' => 2, 'apple' => 5, 'banana' => 1], + ['pineapple' => 2, 'apple' => 3, 'banana' => 1], + ], + + 'filling an empty array' => [ + [], + ['pineapple' => 3, 'apple' => 1, 'banana' => 1], + ], + 'zeroing the array' => [ + ['pineapple' => 3, 'apple' => 1, 'banana' => 17], + [], + ], + ]; + } +} diff --git a/tests/framework/db/CommandTest.php b/tests/framework/db/CommandTest.php index 15ac5f4160f..041b788f3c1 100644 --- a/tests/framework/db/CommandTest.php +++ b/tests/framework/db/CommandTest.php @@ -1525,4 +1525,23 @@ public function testBindValuesSupportsDeprecatedPDOCastingFormat() $db->createCommand()->setSql("SELECT :p1")->bindValues([':p1' => [2, \PDO::PARAM_STR]]); $this->assertTrue(true); } + + public function testBindValuesSupportsEnums() + { + if (version_compare(PHP_VERSION, '8.1.0') >= 0) { + $db = $this->getConnection(); + $command = $db->createCommand(); + + $command->setSql('SELECT :p1')->bindValues([':p1' => enums\Status::ACTIVE]); + $this->assertSame('ACTIVE', $command->params[':p1']); + + $command->setSql('SELECT :p1')->bindValues([':p1' => enums\StatusTypeString::ACTIVE]); + $this->assertSame('active', $command->params[':p1']); + + $command->setSql('SELECT :p1')->bindValues([':p1' => enums\StatusTypeInt::ACTIVE]); + $this->assertSame(1, $command->params[':p1']); + } else { + $this->markTestSkipped('Enums are not supported in PHP < 8.1'); + } + } } diff --git a/tests/framework/db/ConnectionTest.php b/tests/framework/db/ConnectionTest.php index 39e6677610b..a155517ffdf 100644 --- a/tests/framework/db/ConnectionTest.php +++ b/tests/framework/db/ConnectionTest.php @@ -469,7 +469,7 @@ public function testClone() /** - * Test whether slave connection is recovered when call getSlavePdo() after close(). + * Test whether slave connection is recovered when call getSlavePdo(true) after close(). * * @see https://github.com/yiisoft/yii2/issues/14165 */ diff --git a/tests/framework/db/QueryTest.php b/tests/framework/db/QueryTest.php index 5dbcc0b0b7d..4de29107045 100644 --- a/tests/framework/db/QueryTest.php +++ b/tests/framework/db/QueryTest.php @@ -727,6 +727,11 @@ public function testQueryCache() $this->assertEquals('user1', $query->noCache()->where(['id' => 1])->scalar($db)); $this->assertEquals('user11', $query->cache()->where(['id' => 1])->scalar($db)); }, 10); + + $update->bindValues([':id' => 3, ':name' => null])->execute(); + $this->assertEquals(null, $query->cache()->where(['id' => 3])->scalar($db)); + $update->bindValues([':id' => 3, ':name' => 'user3'])->execute(); + $this->assertEquals(null, $query->cache()->where(['id' => 3])->scalar($db), 'Null value should be cached.'); } diff --git a/tests/framework/db/SchemaTest.php b/tests/framework/db/SchemaTest.php index b3200207e99..dd05f78d9c2 100644 --- a/tests/framework/db/SchemaTest.php +++ b/tests/framework/db/SchemaTest.php @@ -545,6 +545,39 @@ public function testColumnSchemaDbTypecastWithEmptyCharType() $this->assertSame('', $columnSchema->dbTypecast('')); } + /** + * @dataProvider columnSchemaDbTypecastBooleanPhpTypeProvider + * @param mixed $value + * @param bool $expected + */ + public function testColumnSchemaDbTypecastBooleanPhpType($value, $expected) + { + $columnSchema = new ColumnSchema(['phpType' => Schema::TYPE_BOOLEAN]); + $this->assertSame($expected, $columnSchema->dbTypecast($value)); + } + + public function columnSchemaDbTypecastBooleanPhpTypeProvider() + { + return [ + [1, true], + [0, false], + ['1', true], + ['0', false], + + // https://github.com/yiisoft/yii2/issues/9006 + ["\1", true], + ["\0", false], + + // https://github.com/yiisoft/yii2/pull/20122 + ['TRUE', true], + ['FALSE', false], + ['true', true], + ['false', false], + ['True', true], + ['False', false], + ]; + } + public function testFindUniqueIndexes() { if ($this->driverName === 'sqlsrv') { @@ -757,7 +790,7 @@ public function testTableSchemaConstraintsWithPdoUppercase($tableName, $type, $e } $connection = $this->getConnection(false); - $connection->getSlavePdo()->setAttribute(PDO::ATTR_CASE, PDO::CASE_UPPER); + $connection->getSlavePdo(true)->setAttribute(PDO::ATTR_CASE, PDO::CASE_UPPER); $constraints = $connection->getSchema()->{'getTable' . ucfirst($type)}($tableName, true); $this->assertMetadataEquals($expected, $constraints); } @@ -775,7 +808,7 @@ public function testTableSchemaConstraintsWithPdoLowercase($tableName, $type, $e } $connection = $this->getConnection(false); - $connection->getSlavePdo()->setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER); + $connection->getSlavePdo(true)->setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER); $constraints = $connection->getSchema()->{'getTable' . ucfirst($type)}($tableName, true); $this->assertMetadataEquals($expected, $constraints); } diff --git a/tests/framework/db/cubrid/QueryBuilderTest.php b/tests/framework/db/cubrid/QueryBuilderTest.php index 6dc54e56375..366a457a5f9 100644 --- a/tests/framework/db/cubrid/QueryBuilderTest.php +++ b/tests/framework/db/cubrid/QueryBuilderTest.php @@ -57,7 +57,7 @@ public function testResetSequence() public function testCommentColumn() { - $version = $this->getQueryBuilder(false)->db->getSlavePdo()->getAttribute(\PDO::ATTR_SERVER_VERSION); + $version = $this->getQueryBuilder(false)->db->getSlavePdo(true)->getAttribute(\PDO::ATTR_SERVER_VERSION); if (version_compare($version, '10.0', '<')) { $this->markTestSkipped('Comments on columns are supported starting with CUBRID 10.0.'); return; diff --git a/tests/framework/db/enums/Status.php b/tests/framework/db/enums/Status.php new file mode 100644 index 00000000000..799a552319b --- /dev/null +++ b/tests/framework/db/enums/Status.php @@ -0,0 +1,9 @@ +assertTrue($record->save(false)); $this->assertEquals(1, $record->id); } + + /** + * @throws Exception + */ + public function testSaveWithRowVersionColumn() + { + $db = $this->getConnection(); + + $sql = 'ALTER TABLE [dbo].[test_trigger] ADD [RV] rowversion'; + $db->createCommand($sql)->execute(); + + $record = new TestTrigger(); + $record->stringcol = 'test'; + $this->assertTrue($record->save(false)); + $this->assertEquals(1, $record->id); + $this->assertEquals('test', $record->stringcol); + } + + /** + * @throws Exception + */ + public function testSaveWithRowVersionNullColumn() + { + $db = $this->getConnection(); + + $sql = 'ALTER TABLE [dbo].[test_trigger] ADD [RV] rowversion NULL'; + $db->createCommand($sql)->execute(); + + $record = new TestTrigger(); + $record->stringcol = 'test'; + $record->RV = new Expression('DEFAULT'); + $this->assertTrue($record->save(false)); + $this->assertEquals(1, $record->id); + $this->assertEquals('test', $record->stringcol); + } } diff --git a/tests/framework/db/mssql/CommandTest.php b/tests/framework/db/mssql/CommandTest.php index b09f87bb6b8..25a58a3a9e4 100644 --- a/tests/framework/db/mssql/CommandTest.php +++ b/tests/framework/db/mssql/CommandTest.php @@ -134,22 +134,19 @@ public function testUpsertVarbinary() { $db = $this->getConnection(); - $testData = json_encode(['test' => 'string', 'test2' => 'integer']); - $params = []; - $qb = $db->getQueryBuilder(); - $sql = $qb->upsert('T_upsert_varbinary', ['id' => 1, 'blob_col' => $testData] , ['blob_col' => $testData], $params); + $testData = json_encode(['test' => 'string', 'test2' => 'integer'], JSON_THROW_ON_ERROR); - $result = $db->createCommand($sql, $params)->execute(); + $params = []; - $this->assertEquals(1, $result); + $sql = $qb->upsert('T_upsert_varbinary', ['id' => 1, 'blob_col' => $testData], ['blob_col' => $testData], $params); + $result = $db->createCommand($sql, $params)->execute(); - $query = (new Query()) - ->select(['convert(nvarchar(max),blob_col) as blob_col']) - ->from('T_upsert_varbinary') - ->where(['id' => 1]); + $this->assertSame(1, $result); + $query = (new Query())->select(['blob_col'])->from('T_upsert_varbinary')->where(['id' => 1]); $resultData = $query->createCommand($db)->queryOne(); - $this->assertEquals($testData, $resultData['blob_col']); + + $this->assertSame($testData, $resultData['blob_col']); } } diff --git a/tests/framework/db/mssql/QueryCacheTest.php b/tests/framework/db/mssql/QueryCacheTest.php new file mode 100644 index 00000000000..b35c11fde1c --- /dev/null +++ b/tests/framework/db/mssql/QueryCacheTest.php @@ -0,0 +1,55 @@ +getConnection(); + $db->enableQueryCache = true; + $db->queryCache = new FileCache(['cachePath' => '@yiiunit/runtime/cache']); + + $db->createCommand()->delete('type')->execute(); + $db->createCommand()->insert('type', [ + 'int_col' => $key = 1, + 'char_col' => '', + 'char_col2' => '6a3ce1a0bffe8eeb6fa986caf443e24c', + 'float_col' => 0.0, + 'blob_col' => 'a:1:{s:13:"template";s:1:"1";}', + 'bool_col' => true, + ])->execute(); + + $function = function($db) use ($key){ + return (new Query()) + ->select(['blob_col']) + ->from('type') + ->where(['int_col' => $key]) + ->createCommand($db) + ->queryScalar(); + }; + + // First run return + $result = $db->cache($function); + $this->assertSame('a:1:{s:13:"template";s:1:"1";}', $result); + + // After the request has been cached return + $result = $db->cache($function); + $this->assertSame('a:1:{s:13:"template";s:1:"1";}', $result); + } +} diff --git a/tests/framework/db/mssql/type/BooleanTest.php b/tests/framework/db/mssql/type/BooleanTest.php new file mode 100644 index 00000000000..97fd7124519 --- /dev/null +++ b/tests/framework/db/mssql/type/BooleanTest.php @@ -0,0 +1,198 @@ +getConnection(true); + $schema = $db->getSchema(); + $tableName = '{{%boolean}}'; + + if ($db->getTableSchema($tableName)) { + $db->createCommand()->dropTable($tableName)->execute(); + } + + $db->createCommand()->createTable( + $tableName, + [ + 'id' => $schema->createColumnSchemaBuilder(Schema::TYPE_PK), + 'bool_col' => $schema->createColumnSchemaBuilder(Schema::TYPE_BOOLEAN), + ] + )->execute(); + + // test type + $column = $db->getTableSchema($tableName)->getColumn('bool_col'); + $this->assertSame('boolean', $column->phpType); + + // test value `false` + $db->createCommand()->insert($tableName, ['bool_col' => false])->execute(); + $boolValue = $db->createCommand("SELECT bool_col FROM $tableName WHERE id = 1")->queryScalar(); + $this->assertEquals(0, $boolValue); + + // test php typecast + $phpTypeCast = $column->phpTypecast($boolValue); + $this->assertFalse($phpTypeCast); + + // test value `true` + $db->createCommand()->insert($tableName, ['bool_col' => true])->execute(); + $boolValue = $db->createCommand("SELECT bool_col FROM $tableName WHERE id = 2")->queryScalar(); + $this->assertEquals(1, $boolValue); + + // test php typecast + $phpTypeCast = $column->phpTypecast($boolValue); + $this->assertTrue($phpTypeCast); + } + + public function testBooleanWithValueInteger() + { + $db = $this->getConnection(true); + $schema = $db->getSchema(); + $tableName = '{{%boolean}}'; + + if ($db->getTableSchema($tableName)) { + $db->createCommand()->dropTable($tableName)->execute(); + } + + $db->createCommand()->createTable( + $tableName, + [ + 'id' => $schema->createColumnSchemaBuilder(Schema::TYPE_PK), + 'bool_col' => $schema->createColumnSchemaBuilder(Schema::TYPE_BOOLEAN), + ] + )->execute(); + + // test type + $column = $db->getTableSchema($tableName)->getColumn('bool_col'); + $this->assertSame('boolean', $column->phpType); + + // test value 0 + $db->createCommand()->insert($tableName, ['bool_col' => 0])->execute(); + $boolValue = $db->createCommand("SELECT bool_col FROM $tableName WHERE id = 1")->queryScalar(); + $this->assertEquals(0, $boolValue); + + // test php typecast + $phpTypeCast = $column->phpTypecast($boolValue); + $this->assertFalse($phpTypeCast); + + // test value 1 + $db->createCommand()->insert($tableName, ['bool_col' => 1])->execute(); + $boolValue = $db->createCommand("SELECT bool_col FROM $tableName WHERE id = 2")->queryScalar(); + $this->assertEquals(1, $boolValue); + + // test php typecast + $phpTypeCast = $column->phpTypecast($boolValue); + $this->assertTrue($phpTypeCast); + } + + public function testBooleanValueNegative() + { + $db = $this->getConnection(true); + $schema = $db->getSchema(); + $tableName = '{{%boolean}}'; + + if ($db->getTableSchema($tableName)) { + $db->createCommand()->dropTable($tableName)->execute(); + } + + $db->createCommand()->createTable( + $tableName, + [ + 'id' => $schema->createColumnSchemaBuilder(Schema::TYPE_PK), + 'bool_col' => $schema->createColumnSchemaBuilder(Schema::TYPE_BOOLEAN), + ] + )->execute(); + + // test type + $column = $db->getTableSchema($tableName)->getColumn('bool_col'); + $this->assertSame('boolean', $column->phpType); + + // test value 2 + $db->createCommand()->insert($tableName, ['bool_col' => -1])->execute(); + $boolValue = $db->createCommand("SELECT bool_col FROM $tableName WHERE id = 1")->queryScalar(); + $this->assertEquals(1, $boolValue); + + // test php typecast + $phpTypeCast = $column->phpTypecast($boolValue); + $this->assertTrue($phpTypeCast); + } + + public function testBooleanWithValueNull() + { + $db = $this->getConnection(true); + $schema = $db->getSchema(); + $tableName = '{{%boolean}}'; + + if ($db->getTableSchema($tableName)) { + $db->createCommand()->dropTable($tableName)->execute(); + } + + $db->createCommand()->createTable( + $tableName, + [ + 'id' => $schema->createColumnSchemaBuilder(Schema::TYPE_PK), + 'bool_col' => $schema->createColumnSchemaBuilder(Schema::TYPE_BOOLEAN), + ] + )->execute(); + + // test type + $column = $db->getTableSchema($tableName)->getColumn('bool_col'); + $this->assertSame('boolean', $column->phpType); + + // test value `null` + $db->createCommand()->insert($tableName, ['bool_col' => null])->execute(); + $boolValue = $db->createCommand("SELECT bool_col FROM $tableName WHERE id = 1")->queryScalar(); + $this->assertNull($boolValue); + + // test php typecast + $phpTypeCast = $column->phpTypecast($boolValue); + $this->assertNull($phpTypeCast); + } + + public function testBooleanWithValueOverflow() + { + $db = $this->getConnection(true); + $schema = $db->getSchema(); + $tableName = '{{%boolean}}'; + + if ($db->getTableSchema($tableName)) { + $db->createCommand()->dropTable($tableName)->execute(); + } + + $db->createCommand()->createTable( + $tableName, + [ + 'id' => $schema->createColumnSchemaBuilder(Schema::TYPE_PK), + 'bool_col' => $schema->createColumnSchemaBuilder(Schema::TYPE_BOOLEAN), + ] + )->execute(); + + // test type + $column = $db->getTableSchema($tableName)->getColumn('bool_col'); + $this->assertSame('boolean', $column->phpType); + + // test value 2 + $db->createCommand()->insert($tableName, ['bool_col' => 2])->execute(); + $boolValue = $db->createCommand("SELECT bool_col FROM $tableName WHERE id = 1")->queryScalar(); + $this->assertEquals(1, $boolValue); + + // test php typecast + $phpTypeCast = $column->phpTypecast($boolValue); + $this->assertTrue($phpTypeCast); + } +} diff --git a/tests/framework/db/mssql/type/VarbinaryTest.php b/tests/framework/db/mssql/type/VarbinaryTest.php new file mode 100644 index 00000000000..b72a2b4c469 --- /dev/null +++ b/tests/framework/db/mssql/type/VarbinaryTest.php @@ -0,0 +1,44 @@ +getConnection(); + + $db->createCommand()->delete('type')->execute(); + $db->createCommand()->insert('type', [ + 'int_col' => $key = 1, + 'char_col' => '', + 'char_col2' => '6a3ce1a0bffe8eeb6fa986caf443e24c', + 'float_col' => 0.0, + 'blob_col' => 'a:1:{s:13:"template";s:1:"1";}', + 'bool_col' => true, + ])->execute(); + + $result = (new Query()) + ->select(['blob_col']) + ->from('type') + ->where(['int_col' => $key]) + ->createCommand($db) + ->queryScalar(); + + $this->assertSame('a:1:{s:13:"template";s:1:"1";}', $result); + } +} diff --git a/tests/framework/db/mysql/BaseActiveRecordTest.php b/tests/framework/db/mysql/BaseActiveRecordTest.php new file mode 100644 index 00000000000..394922e87f7 --- /dev/null +++ b/tests/framework/db/mysql/BaseActiveRecordTest.php @@ -0,0 +1,37 @@ +getConnection()->getSchema()->getServerVersion(), '5.7', '<')) { + $this->markTestSkipped('JSON columns are not supported in MySQL < 5.7'); + } + if (version_compare(PHP_VERSION, '5.6', '<')) { + $this->markTestSkipped('JSON columns are not supported in PDO for PHP < 5.6'); + } + + $createdStorage = new Storage(['data' => $actual]); + + $createdStorage->save(); + + $foundStorage = Storage::find()->limit(1)->one(); + + $this->assertNotNull($foundStorage); + + $foundStorage->data = $modified; + + $this->assertSame(['data' => $modified], $foundStorage->getDirtyAttributes()); + } +} diff --git a/tests/framework/db/mysql/QueryBuilderTest.php b/tests/framework/db/mysql/QueryBuilderTest.php index 21257bb2b2e..659bf1a9ee2 100644 --- a/tests/framework/db/mysql/QueryBuilderTest.php +++ b/tests/framework/db/mysql/QueryBuilderTest.php @@ -125,7 +125,7 @@ public function columnTimeTypes() /** * @link https://github.com/yiisoft/yii2/issues/14367 */ - $mysqlVersion = $this->getDb()->getSlavePdo()->getAttribute(\PDO::ATTR_SERVER_VERSION); + $mysqlVersion = $this->getDb()->getSlavePdo(true)->getAttribute(\PDO::ATTR_SERVER_VERSION); $supportsFractionalSeconds = version_compare($mysqlVersion,'5.6.4', '>='); if ($supportsFractionalSeconds) { $expectedValues = [ diff --git a/tests/framework/db/mysql/SchemaTest.php b/tests/framework/db/mysql/SchemaTest.php index 4e602a317ea..43a66a60b57 100644 --- a/tests/framework/db/mysql/SchemaTest.php +++ b/tests/framework/db/mysql/SchemaTest.php @@ -230,7 +230,6 @@ public function getExpectedColumns() if (version_compare($version, '5.7', '<')) { $columns['int_col3']['phpType'] = 'string'; - $columns['json_col']['type'] = 'text'; $columns['json_col']['dbType'] = 'longtext'; $columns['json_col']['phpType'] = 'string'; diff --git a/tests/framework/db/mysql/connection/DeadLockTest.php b/tests/framework/db/mysql/connection/DeadLockTest.php index 40f6d573f87..6e3da047eea 100644 --- a/tests/framework/db/mysql/connection/DeadLockTest.php +++ b/tests/framework/db/mysql/connection/DeadLockTest.php @@ -119,7 +119,12 @@ public function testDeadlockException() . ($logContent ? ". Shared children log:\n$logContent" : '') ); } - $this->assertEquals(1, $deadlockHitCount, "exactly one child must hit deadlock; shared children log:\n" . $logContent); + + if (version_compare($this->getConnection()->getSchema()->getServerVersion(), '8.0', '<')) { + $this->assertEquals(1, $deadlockHitCount, "exactly one child must hit deadlock; shared children log:\n" . $logContent); + } else { + $this->assertEquals(0, $deadlockHitCount, "exactly zero children must hit deadlock; shared children log:\n" . $logContent); + } } /** diff --git a/tests/framework/db/pgsql/BaseActiveRecordTest.php b/tests/framework/db/pgsql/BaseActiveRecordTest.php new file mode 100644 index 00000000000..a4993685249 --- /dev/null +++ b/tests/framework/db/pgsql/BaseActiveRecordTest.php @@ -0,0 +1,46 @@ + new JsonExpression($actual), + ]); + + $createdStorage->save(); + + $foundStorage = ArrayAndJsonType::find()->limit(1)->one(); + + $this->assertNotNull($foundStorage); + + $foundStorage->json_col = $modified; + + $this->assertSame(['json_col' => $modified], $foundStorage->getDirtyAttributes()); + } +} + +/** + * {@inheritdoc} + * @property array id + * @property array json_col + */ +class ArrayAndJsonType extends ActiveRecord +{ + public static function tableName() + { + return '{{%array_and_json_types}}'; + } +} diff --git a/tests/framework/db/pgsql/type/BooleanTest.php b/tests/framework/db/pgsql/type/BooleanTest.php new file mode 100644 index 00000000000..4a9b21df249 --- /dev/null +++ b/tests/framework/db/pgsql/type/BooleanTest.php @@ -0,0 +1,239 @@ +getConnection(true); + $schema = $db->getSchema(); + $tableName = '{{%boolean}}'; + + if ($db->getTableSchema($tableName)) { + $db->createCommand()->dropTable($tableName)->execute(); + } + + $db->createCommand()->createTable( + $tableName, + [ + 'id' => $schema->createColumnSchemaBuilder(Schema::TYPE_PK), + 'bool_col' => $schema->createColumnSchemaBuilder(Schema::TYPE_BOOLEAN), + ] + )->execute(); + + // test type `boolean` + $column = $db->getTableSchema($tableName)->getColumn('bool_col'); + $this->assertSame('boolean', $column->phpType); + + // test value `false` + $db->createCommand()->insert($tableName, ['bool_col' => false])->execute(); + $boolValue = $db->createCommand("SELECT bool_col FROM $tableName WHERE id = 1")->queryScalar(); + $this->assertEquals(0, $boolValue); + + // test php typecast + $phpTypeCast = $column->phpTypecast($boolValue); + $this->assertFalse($phpTypeCast); + + // test value `true` + $db->createCommand()->insert($tableName, ['bool_col' => true])->execute(); + $boolValue = $db->createCommand("SELECT bool_col FROM $tableName WHERE id = 2")->queryScalar(); + $this->assertEquals(1, $boolValue); + + // test php typecast + $phpTypeCast = $column->phpTypecast($boolValue); + $this->assertTrue($phpTypeCast); + } + + public function testBooleanWithValueInteger() + { + $db = $this->getConnection(true); + $schema = $db->getSchema(); + $tableName = '{{%boolean}}'; + + if ($db->getTableSchema($tableName)) { + $db->createCommand()->dropTable($tableName)->execute(); + } + + $db->createCommand()->createTable( + $tableName, + [ + 'id' => $schema->createColumnSchemaBuilder(Schema::TYPE_PK), + 'bool_col' => $schema->createColumnSchemaBuilder(Schema::TYPE_BOOLEAN), + ] + )->execute(); + + // test type `boolean` + $column = $db->getTableSchema($tableName)->getColumn('bool_col'); + $this->assertSame('boolean', $column->phpType); + + // test value `0` + $db->createCommand()->insert($tableName, ['bool_col' => 0])->execute(); + $boolValue = $db->createCommand("SELECT bool_col FROM $tableName WHERE id = 1")->queryScalar(); + $this->assertEquals(0, $boolValue); + + // test php typecast + $phpTypeCast = $column->phpTypecast($boolValue); + $this->assertFalse($phpTypeCast); + + // test value `1` + $db->createCommand()->insert($tableName, ['bool_col' => 1])->execute(); + $boolValue = $db->createCommand("SELECT bool_col FROM $tableName WHERE id = 2")->queryScalar(); + $this->assertEquals(1, $boolValue); + + // test php typecast + $phpTypeCast = $column->phpTypecast($boolValue); + $this->assertTrue($phpTypeCast); + } + + public function testBooleanWithValueNegative() + { + $db = $this->getConnection(true); + $schema = $db->getSchema(); + $tableName = '{{%boolean}}'; + + if ($db->getTableSchema($tableName)) { + $db->createCommand()->dropTable($tableName)->execute(); + } + + $db->createCommand()->createTable( + $tableName, + [ + 'id' => $schema->createColumnSchemaBuilder(Schema::TYPE_PK), + 'bool_col' => $schema->createColumnSchemaBuilder(Schema::TYPE_BOOLEAN), + ] + )->execute(); + + // test type `boolean` + $column = $db->getTableSchema($tableName)->getColumn('bool_col'); + $this->assertSame('boolean', $column->phpType); + + // test value `-1` + $db->createCommand()->insert($tableName, ['bool_col' => '-1'])->execute(); + $boolValue = $db->createCommand("SELECT bool_col FROM $tableName WHERE id = 1")->queryScalar(); + $this->assertEquals(1, $boolValue); + + // test php typecast + $phpTypeCast = $column->phpTypecast($boolValue); + $this->assertTrue($phpTypeCast); + } + + public function testBooleanWithValueNull() + { + $db = $this->getConnection(true); + $schema = $db->getSchema(); + $tableName = '{{%boolean}}'; + + if ($db->getTableSchema($tableName)) { + $db->createCommand()->dropTable($tableName)->execute(); + } + + $db->createCommand()->createTable( + $tableName, + [ + 'id' => $schema->createColumnSchemaBuilder(Schema::TYPE_PK), + 'bool_col' => $schema->createColumnSchemaBuilder(Schema::TYPE_BOOLEAN), + ] + )->execute(); + + // test type `boolean` + $column = $db->getTableSchema($tableName)->getColumn('bool_col'); + $this->assertSame('boolean', $column->phpType); + + // test value `null` + $db->createCommand()->insert($tableName, ['bool_col' => null])->execute(); + $boolValue = $db->createCommand("SELECT bool_col FROM $tableName WHERE id = 1")->queryScalar(); + $this->assertNull($boolValue); + + // test php typecast + $phpTypeCast = $column->phpTypecast($boolValue); + $this->assertNull($phpTypeCast); + } + + public function testBooleanWithValueOverflow() + { + $db = $this->getConnection(true); + $schema = $db->getSchema(); + $tableName = '{{%boolean}}'; + + if ($db->getTableSchema($tableName)) { + $db->createCommand()->dropTable($tableName)->execute(); + } + + $db->createCommand()->createTable( + $tableName, + [ + 'id' => $schema->createColumnSchemaBuilder(Schema::TYPE_PK), + 'bool_col' => $schema->createColumnSchemaBuilder(Schema::TYPE_BOOLEAN), + ] + )->execute(); + + // test type `boolean` + $column = $db->getTableSchema($tableName)->getColumn('bool_col'); + $this->assertSame('boolean', $column->phpType); + + // test value `2` + $db->createCommand()->insert($tableName, ['bool_col' => 2])->execute(); + $boolValue = $db->createCommand("SELECT bool_col FROM $tableName WHERE id = 1")->queryScalar(); + $this->assertEquals(1, $boolValue); + + // test php typecast + $phpTypeCast = $column->phpTypecast($boolValue); + $this->assertTrue($phpTypeCast); + } + + public function testBooleanWithValueString() + { + $db = $this->getConnection(true); + $schema = $db->getSchema(); + $tableName = '{{%boolean}}'; + + if ($db->getTableSchema($tableName)) { + $db->createCommand()->dropTable($tableName)->execute(); + } + + $db->createCommand()->createTable( + $tableName, + [ + 'id' => $schema->createColumnSchemaBuilder(Schema::TYPE_PK), + 'bool_col' => $schema->createColumnSchemaBuilder(Schema::TYPE_BOOLEAN), + ] + )->execute(); + + // test type `boolean` + $column = $db->getTableSchema($tableName)->getColumn('bool_col'); + $this->assertSame('boolean', $column->phpType); + + // test value `0` + $db->createCommand()->insert($tableName, ['bool_col' => '0'])->execute(); + $boolValue = $db->createCommand("SELECT bool_col FROM $tableName WHERE id = 1")->queryScalar(); + $this->assertEquals(0, $boolValue); + + // test php typecast + $phpTypeCast = $column->phpTypecast($boolValue); + $this->assertFalse($phpTypeCast); + + // test value `1` + $db->createCommand()->insert($tableName, ['bool_col' => '1'])->execute(); + $boolValue = $db->createCommand("SELECT bool_col FROM $tableName WHERE id = 2")->queryScalar(); + $this->assertEquals(1, $boolValue); + + // test php typecast + $phpTypeCast = $column->phpTypecast($boolValue); + $this->assertTrue($phpTypeCast); + } +} diff --git a/tests/framework/db/sqlite/CommandTest.php b/tests/framework/db/sqlite/CommandTest.php index 23012f38fec..b7492c0d1d8 100644 --- a/tests/framework/db/sqlite/CommandTest.php +++ b/tests/framework/db/sqlite/CommandTest.php @@ -7,6 +7,8 @@ namespace yiiunit\framework\db\sqlite; +use yii\db\sqlite\Schema; + /** * @group db * @group sqlite @@ -109,4 +111,60 @@ public function batchInsertSqlProvider() return $parent; } + + public function testResetSequence() + { + $db = $this->getConnection(); + + if ($db->getTableSchema('reset_sequence', true) !== null) { + $db->createCommand()->dropTable('reset_sequence')->execute(); + } + + // create table reset_sequence + $db->createCommand()->createTable( + 'reset_sequence', + [ + 'id' => Schema::TYPE_PK, + 'description' => Schema::TYPE_TEXT, + ] + )->execute(); + + // ensure auto increment is working + $db->createCommand()->insert('reset_sequence', ['description' => 'test'])->execute(); + $this->assertEquals(1, $db->createCommand('SELECT MAX([[id]]) FROM {{reset_sequence}}')->queryScalar()); + + // remove all records + $db->createCommand()->delete('reset_sequence')->execute(); + $this->assertEquals(0, $db->createCommand('SELECT COUNT(*) FROM {{reset_sequence}}')->queryScalar()); + + // counter should be reset to 1 + $db->createCommand()->resetSequence('reset_sequence')->execute(); + $db->createCommand()->insert('reset_sequence', ['description' => 'test'])->execute(); + $this->assertEquals(1, $db->createCommand('SELECT COUNT(*) FROM {{reset_sequence}}')->queryScalar()); + $this->assertEquals(1, $db->createCommand('SELECT MAX([[id]]) FROM {{reset_sequence}}')->queryScalar()); + + // counter should be reset to 5, so next record gets ID 5 + $db->createCommand()->resetSequence('reset_sequence', 5)->execute(); + $db->createCommand()->insert('reset_sequence', ['description' => 'test'])->execute(); + $this->assertEquals(2, $db->createCommand('SELECT COUNT(*) FROM {{reset_sequence}}')->queryScalar()); + $this->assertEquals(5, $db->createCommand('SELECT MAX([[id]]) FROM {{reset_sequence}}')->queryScalar()); + } + + public function testResetSequenceExceptionTableNoExist() + { + $this->expectException('yii\base\InvalidArgumentException'); + $this->expectExceptionMessage('Table not found: no_exist_table'); + + $db = $this->getConnection(); + $db->createCommand()->resetSequence('no_exist_table', 5)->execute(); + } + + public function testResetSequenceExceptionSquenceNoExist() + { + $this->expectException('yii\base\InvalidArgumentException'); + $this->expectExceptionMessage("There is not sequence associated with table 'type'."); + + $db = $this->getConnection(); + $db->createCommand()->resetSequence('type', 5)->execute(); + } } diff --git a/tests/framework/db/sqlite/type/BooleanTest.php b/tests/framework/db/sqlite/type/BooleanTest.php new file mode 100644 index 00000000000..c5bfd811c11 --- /dev/null +++ b/tests/framework/db/sqlite/type/BooleanTest.php @@ -0,0 +1,249 @@ +getConnection(true); + $schema = $db->getSchema(); + $tableName = '{{%boolean}}'; + + if ($db->getTableSchema($tableName)) { + $db->createCommand()->dropTable($tableName)->execute(); + } + + $db->createCommand()->createTable( + $tableName, + [ + 'id' => $schema->createColumnSchemaBuilder(Schema::TYPE_PK), + 'bool_col_tinyint' => $schema->createColumnSchemaBuilder(Schema::TYPE_BOOLEAN), + 'bool_col_bit' => $schema->createColumnSchemaBuilder('bit', 1), + ] + )->execute(); + + // test type `boolean` + $columnBoolColTinyint = $db->getTableSchema($tableName)->getColumn('bool_col_tinyint'); + $this->assertSame('boolean', $columnBoolColTinyint->phpType); + + $columnBoolColBit = $db->getTableSchema($tableName)->getColumn('bool_col_bit'); + $this->assertSame('boolean', $columnBoolColBit->phpType); + + // test value `false` + $db->createCommand()->insert($tableName, ['bool_col_tinyint' => false, 'bool_col_bit' => false])->execute(); + $boolValues = $db->createCommand("SELECT * FROM $tableName WHERE id = 1")->queryOne(); + $this->assertEquals(0, $boolValues['bool_col_tinyint']); + $this->assertEquals(0, $boolValues['bool_col_bit']); + + // test php typecast + $phpTypeCastBoolColTinyint = $columnBoolColTinyint->phpTypecast($boolValues['bool_col_tinyint']); + $this->assertFalse($phpTypeCastBoolColTinyint); + + $phpTypeCastBoolColBit = $columnBoolColBit->phpTypecast($boolValues['bool_col_bit']); + $this->assertFalse($phpTypeCastBoolColBit); + + // test value `true` + $db->createCommand()->insert($tableName, ['bool_col_tinyint' => true, 'bool_col_bit' => true])->execute(); + $boolValues = $db->createCommand("SELECT * FROM $tableName WHERE id = 2")->queryOne(); + $this->assertEquals(1, $boolValues['bool_col_tinyint']); + $this->assertEquals(1, $boolValues['bool_col_bit']); + + // test php typecast + $phpTypeCastBoolColTinyint = $columnBoolColTinyint->phpTypecast($boolValues['bool_col_tinyint']); + $this->assertTrue($phpTypeCastBoolColTinyint); + + $phpTypeCastBoolColBit = $columnBoolColBit->phpTypecast($boolValues['bool_col_bit']); + $this->assertTrue($phpTypeCastBoolColBit); + } + + public function testBooleanWithValueInteger() + { + $db = $this->getConnection(true); + $schema = $db->getSchema(); + $tableName = '{{%boolean}}'; + + if ($db->getTableSchema($tableName)) { + $db->createCommand()->dropTable($tableName)->execute(); + } + + $db->createCommand()->createTable( + $tableName, + [ + 'id' => $schema->createColumnSchemaBuilder(Schema::TYPE_PK), + 'bool_col_tinyint' => $schema->createColumnSchemaBuilder(Schema::TYPE_BOOLEAN), + 'bool_col_bit' => $schema->createColumnSchemaBuilder('bit', 1), + ] + )->execute(); + + // test type `boolean` + $columnBoolColTinyint = $db->getTableSchema($tableName)->getColumn('bool_col_tinyint'); + $this->assertSame('boolean', $columnBoolColTinyint->phpType); + + $columnBoolColBit = $db->getTableSchema($tableName)->getColumn('bool_col_bit'); + $this->assertSame('boolean', $columnBoolColBit->phpType); + + // test value `0` + $db->createCommand()->insert($tableName, ['bool_col_tinyint' => 0, 'bool_col_bit' => 0])->execute(); + $boolValues = $db->createCommand("SELECT * FROM $tableName WHERE id = 1")->queryOne(); + $this->assertEquals(0, $boolValues['bool_col_tinyint']); + $this->assertEquals(0, $boolValues['bool_col_bit']); + + // test php typecast + $phpTypeCastBoolColTinyint = $columnBoolColTinyint->phpTypecast($boolValues['bool_col_tinyint']); + $this->assertFalse($phpTypeCastBoolColTinyint); + + $phpTypeCastBoolColBit = $columnBoolColBit->phpTypecast($boolValues['bool_col_bit']); + $this->assertFalse($phpTypeCastBoolColBit); + + // test value `1` + $db->createCommand()->insert($tableName, ['bool_col_tinyint' => 1, 'bool_col_bit' => 1])->execute(); + $boolValues = $db->createCommand("SELECT * FROM $tableName WHERE id = 2")->queryOne(); + $this->assertEquals(1, $boolValues['bool_col_tinyint']); + $this->assertEquals(1, $boolValues['bool_col_bit']); + + // test php typecast + $phpTypeCastBoolColTinyint = $columnBoolColTinyint->phpTypecast($boolValues['bool_col_tinyint']); + $this->assertTrue($phpTypeCastBoolColTinyint); + + $phpTypeCastBoolColBit = $columnBoolColBit->phpTypecast($boolValues['bool_col_bit']); + $this->assertTrue($phpTypeCastBoolColBit); + } + + public function testBooleanWithValueNegative() + { + $db = $this->getConnection(true); + $schema = $db->getSchema(); + $tableName = '{{%boolean}}'; + + if ($db->getTableSchema($tableName)) { + $db->createCommand()->dropTable($tableName)->execute(); + } + + $db->createCommand()->createTable( + $tableName, + [ + 'id' => $schema->createColumnSchemaBuilder(Schema::TYPE_PK), + 'bool_col_tinyint' => $schema->createColumnSchemaBuilder(Schema::TYPE_BOOLEAN), + 'bool_col_bit' => $schema->createColumnSchemaBuilder('bit', 1), + ] + )->execute(); + + // test type `boolean` + $columnBoolColTinyint = $db->getTableSchema($tableName)->getColumn('bool_col_tinyint'); + $this->assertSame('boolean', $columnBoolColTinyint->phpType); + + $columnBoolColBit = $db->getTableSchema($tableName)->getColumn('bool_col_bit'); + $this->assertSame('boolean', $columnBoolColBit->phpType); + + // test value `-1` + $db->createCommand()->insert($tableName, ['bool_col_tinyint' => -1, 'bool_col_bit' => -1])->execute(); + $boolValues = $db->createCommand("SELECT * FROM $tableName WHERE id = 1")->queryOne(); + + $this->assertEquals(1, $boolValues['bool_col_tinyint']); + $this->assertEquals(1, $boolValues['bool_col_bit']); + + // test php typecast + $phpTypeCastBoolColTinyint = $columnBoolColTinyint->phpTypecast($boolValues['bool_col_tinyint']); + $this->assertTrue($phpTypeCastBoolColTinyint); + + $phpTypeCastBoolColBit = $columnBoolColBit->phpTypecast($boolValues['bool_col_bit']); + $this->assertTrue($phpTypeCastBoolColBit); + } + + public function testBooleanWithValueNull() + { + $db = $this->getConnection(true); + $schema = $db->getSchema(); + $tableName = '{{%boolean}}'; + + if ($db->getTableSchema($tableName)) { + $db->createCommand()->dropTable($tableName)->execute(); + } + + $db->createCommand()->createTable( + $tableName, + [ + 'id' => $schema->createColumnSchemaBuilder(Schema::TYPE_PK), + 'bool_col_tinyint' => $schema->createColumnSchemaBuilder(Schema::TYPE_BOOLEAN), + 'bool_col_bit' => $schema->createColumnSchemaBuilder('bit', 1), + ] + )->execute(); + + // test type `boolean` + $columnBoolColTinyint = $db->getTableSchema($tableName)->getColumn('bool_col_tinyint'); + $this->assertSame('boolean', $columnBoolColTinyint->phpType); + + $columnBoolColBit = $db->getTableSchema($tableName)->getColumn('bool_col_bit'); + $this->assertSame('boolean', $columnBoolColBit->phpType); + + // test value `null` + $db->createCommand()->insert($tableName, ['bool_col_tinyint' => null, 'bool_col_bit' => null])->execute(); + $boolValues = $db->createCommand("SELECT * FROM $tableName WHERE id = 1")->queryOne(); + + $this->assertNull($boolValues['bool_col_tinyint']); + $this->assertNull($boolValues['bool_col_bit']); + + // test php typecast + $phpTypeCastBoolColTinyint = $columnBoolColTinyint->phpTypecast($boolValues['bool_col_tinyint']); + $this->assertNull($phpTypeCastBoolColTinyint); + + $phpTypeCastBoolColBit = $columnBoolColBit->phpTypecast($boolValues['bool_col_bit']); + $this->assertNull($phpTypeCastBoolColBit); + } + + public function testBooleanWithValueOverflow() + { + $db = $this->getConnection(true); + $schema = $db->getSchema(); + $tableName = '{{%boolean}}'; + + if ($db->getTableSchema($tableName)) { + $db->createCommand()->dropTable($tableName)->execute(); + } + + $db->createCommand()->createTable( + $tableName, + [ + 'id' => $schema->createColumnSchemaBuilder(Schema::TYPE_PK), + 'bool_col_tinyint' => $schema->createColumnSchemaBuilder(Schema::TYPE_BOOLEAN), + 'bool_col_bit' => $schema->createColumnSchemaBuilder('bit', 1), + ] + )->execute(); + + // test type `boolean` + $columnBoolColTinyint = $db->getTableSchema($tableName)->getColumn('bool_col_tinyint'); + $this->assertSame('boolean', $columnBoolColTinyint->phpType); + + $columnBoolColBit = $db->getTableSchema($tableName)->getColumn('bool_col_bit'); + $this->assertSame('boolean', $columnBoolColBit->phpType); + + // test value `2` + $db->createCommand()->insert($tableName, ['bool_col_tinyint' => 2, 'bool_col_bit' => 2])->execute(); + $boolValues = $db->createCommand("SELECT * FROM $tableName WHERE id = 1")->queryOne(); + + $this->assertEquals(1, $boolValues['bool_col_tinyint']); + $this->assertEquals(1, $boolValues['bool_col_bit']); + + // test php typecast + $phpTypeCastBoolColTinyint = $columnBoolColTinyint->phpTypecast($boolValues['bool_col_tinyint']); + $this->assertTrue($phpTypeCastBoolColTinyint); + + $phpTypeCastBoolColBit = $columnBoolColBit->phpTypecast($boolValues['bool_col_bit']); + $this->assertTrue($phpTypeCastBoolColBit); + } +} diff --git a/tests/framework/filters/AccessRuleTest.php b/tests/framework/filters/AccessRuleTest.php index 4c2ded2d2dd..620766788d8 100644 --- a/tests/framework/filters/AccessRuleTest.php +++ b/tests/framework/filters/AccessRuleTest.php @@ -422,17 +422,18 @@ public function testMatchIP() { $action = $this->mockAction(); $user = false; - $request = $this->mockRequest(); $rule = new AccessRule(); // by default match all IPs + $request = $this->mockRequest(); $rule->allow = true; $this->assertTrue($rule->allows($action, $user, $request)); $rule->allow = false; $this->assertFalse($rule->allows($action, $user, $request)); // empty IPs = match all IPs + $request = $this->mockRequest(); $rule->ips = []; $rule->allow = true; $this->assertTrue($rule->allows($action, $user, $request)); @@ -441,6 +442,7 @@ public function testMatchIP() // match, one IP $_SERVER['REMOTE_ADDR'] = '127.0.0.1'; + $request = $this->mockRequest(); $rule->ips = ['127.0.0.1']; $rule->allow = true; $this->assertTrue($rule->allows($action, $user, $request)); @@ -449,6 +451,7 @@ public function testMatchIP() // no match, one IP $_SERVER['REMOTE_ADDR'] = '127.0.0.1'; + $request = $this->mockRequest(); $rule->ips = ['192.168.0.1']; $rule->allow = true; $this->assertNull($rule->allows($action, $user, $request)); @@ -457,12 +460,14 @@ public function testMatchIP() // no partial match, one IP $_SERVER['REMOTE_ADDR'] = '127.0.0.1'; + $request = $this->mockRequest(); $rule->ips = ['127.0.0.10']; $rule->allow = true; $this->assertNull($rule->allows($action, $user, $request)); $rule->allow = false; $this->assertNull($rule->allows($action, $user, $request)); $_SERVER['REMOTE_ADDR'] = '127.0.0.10'; + $request = $this->mockRequest(); $rule->ips = ['127.0.0.1']; $rule->allow = true; $this->assertNull($rule->allows($action, $user, $request)); @@ -471,6 +476,7 @@ public function testMatchIP() // match, one IP IPv6 $_SERVER['REMOTE_ADDR'] = '::1'; + $request = $this->mockRequest(); $rule->ips = ['::1']; $rule->allow = true; $this->assertTrue($rule->allows($action, $user, $request)); @@ -479,6 +485,7 @@ public function testMatchIP() // no match, one IP IPv6 $_SERVER['REMOTE_ADDR'] = '::1'; + $request = $this->mockRequest(); $rule->ips = ['dead::beaf::1']; $rule->allow = true; $this->assertNull($rule->allows($action, $user, $request)); @@ -487,12 +494,14 @@ public function testMatchIP() // no partial match, one IP IPv6 $_SERVER['REMOTE_ADDR'] = '::1'; + $request = $this->mockRequest(); $rule->ips = ['::123']; $rule->allow = true; $this->assertNull($rule->allows($action, $user, $request)); $rule->allow = false; $this->assertNull($rule->allows($action, $user, $request)); $_SERVER['REMOTE_ADDR'] = '::123'; + $request = $this->mockRequest(); $rule->ips = ['::1']; $rule->allow = true; $this->assertNull($rule->allows($action, $user, $request)); @@ -501,6 +510,7 @@ public function testMatchIP() // undefined IP $_SERVER['REMOTE_ADDR'] = null; + $request = $this->mockRequest(); $rule->ips = ['192.168.*']; $rule->allow = true; $this->assertNull($rule->allows($action, $user, $request)); @@ -512,12 +522,12 @@ public function testMatchIPWildcard() { $action = $this->mockAction(); $user = false; - $request = $this->mockRequest(); $rule = new AccessRule(); // no match $_SERVER['REMOTE_ADDR'] = '127.0.0.1'; + $request = $this->mockRequest(); $rule->ips = ['192.168.*']; $rule->allow = true; $this->assertNull($rule->allows($action, $user, $request)); @@ -526,6 +536,7 @@ public function testMatchIPWildcard() // match $_SERVER['REMOTE_ADDR'] = '127.0.0.1'; + $request = $this->mockRequest(); $rule->ips = ['127.0.*']; $rule->allow = true; $this->assertTrue($rule->allows($action, $user, $request)); @@ -534,6 +545,7 @@ public function testMatchIPWildcard() // match, IPv6 $_SERVER['REMOTE_ADDR'] = '2a01:4f8:120:7202::2'; + $request = $this->mockRequest(); $rule->ips = ['2a01:4f8:120:*']; $rule->allow = true; $this->assertTrue($rule->allows($action, $user, $request)); @@ -542,6 +554,7 @@ public function testMatchIPWildcard() // no match, IPv6 $_SERVER['REMOTE_ADDR'] = '::1'; + $request = $this->mockRequest(); $rule->ips = ['2a01:4f8:120:*']; $rule->allow = true; $this->assertNull($rule->allows($action, $user, $request)); @@ -553,12 +566,12 @@ public function testMatchIPMask() { $action = $this->mockAction(); $user = false; - $request = $this->mockRequest(); $rule = new AccessRule(); // no match $_SERVER['REMOTE_ADDR'] = '127.0.0.1'; + $request = $this->mockRequest(); $rule->ips = ['127.0.0.32/27']; $rule->allow = true; $this->assertNull($rule->allows($action, $user, $request)); @@ -567,6 +580,7 @@ public function testMatchIPMask() // match $_SERVER['REMOTE_ADDR'] = '127.0.0.1'; + $request = $this->mockRequest(); $rule->ips = ['127.0.0.1/27']; $rule->allow = true; $this->assertTrue($rule->allows($action, $user, $request)); @@ -575,6 +589,7 @@ public function testMatchIPMask() // match, IPv6 $_SERVER['REMOTE_ADDR'] = '2a01:4f8:120:7202::2'; + $request = $this->mockRequest(); $rule->ips = ['2a01:4f8:120:7202::2/127']; $rule->allow = true; $this->assertTrue($rule->allows($action, $user, $request)); @@ -583,6 +598,7 @@ public function testMatchIPMask() // no match, IPv6 $_SERVER['REMOTE_ADDR'] = '2a01:4f8:120:7202::ffff'; + $request = $this->mockRequest(); $rule->ips = ['2a01:4f8:120:7202::2/123']; $rule->allow = true; $this->assertNull($rule->allows($action, $user, $request)); diff --git a/tests/framework/filters/PageCacheTest.php b/tests/framework/filters/PageCacheTest.php index 0d69a1a76e9..6dc5ef5f9a6 100644 --- a/tests/framework/filters/PageCacheTest.php +++ b/tests/framework/filters/PageCacheTest.php @@ -472,4 +472,24 @@ public function testCalculateCacheKey() $keys = $this->invokeMethod(new PageCache(), 'calculateCacheKey'); $this->assertEquals(['yii\filters\PageCache', 'test'], $keys); } + + public function testClosureVariations() + { + $keys = $this->invokeMethod(new PageCache([ + 'variations' => function() { + return [ + 'foobar' + ]; + } + ]), 'calculateCacheKey'); + $this->assertEquals(['yii\filters\PageCache', 'test', 'foobar'], $keys); + + // test type cast of string + $keys = $this->invokeMethod(new PageCache([ + 'variations' => function() { + return 'foobarstring'; + } + ]), 'calculateCacheKey'); + $this->assertEquals(['yii\filters\PageCache', 'test', 'foobarstring'], $keys); + } } diff --git a/tests/framework/grid/GridViewTest.php b/tests/framework/grid/GridViewTest.php index 392aefbd0ba..b698011493b 100644 --- a/tests/framework/grid/GridViewTest.php +++ b/tests/framework/grid/GridViewTest.php @@ -7,10 +7,12 @@ namespace yiiunit\framework\grid; +use Yii; use yii\data\ArrayDataProvider; use yii\grid\DataColumn; use yii\grid\GridView; use yii\web\View; +use yiiunit\data\ar\NoAutoLabels; /** * @author Evgeniy Tkachenko @@ -150,4 +152,53 @@ public function testFooter() { $this->assertTrue(preg_match("/<\/tbody>/", $html) === 1); } + + public function testHeaderLabels() + { + // Ensure GridView does not call Model::generateAttributeLabel() to generate labels unless the labels are explicitly used. + + $this->mockApplication([ + 'components' => [ + 'db' => [ + 'class' => \yii\db\Connection::className(), + 'dsn' => 'sqlite::memory:', + ], + ], + ]); + + NoAutoLabels::$db = Yii::$app->getDb(); + Yii::$app->getDb()->createCommand()->createTable(NoAutoLabels::tableName(), ['attr1' => 'int', 'attr2' => 'int'])->execute(); + + $urlManager = new \yii\web\UrlManager([ + 'baseUrl' => '/', + 'scriptUrl' => '/index.php', + ]); + + $grid = new GridView([ + 'dataProvider' => new \yii\data\ActiveDataProvider([ + 'query' => NoAutoLabels::find(), + ]), + 'columns' => [ + 'attr1', + 'attr2:text:Label for attr2', + ], + ]); + + // NoAutoLabels::generateAttributeLabel() should not be called. + $grid->dataProvider->setSort([ + 'route' => '/', + 'urlManager' => $urlManager, + ]); + $grid->renderTableHeader(); + + // NoAutoLabels::generateAttributeLabel() should not be called. + $grid->dataProvider->setSort([ + 'route' => '/', + 'urlManager' => $urlManager, + 'attributes' => ['attr1', 'attr2'], + ]); + $grid->renderTableHeader(); + + // If NoAutoLabels::generateAttributeLabel() has not been called no exception will be thrown meaning this test passed successfully. + } } diff --git a/tests/framework/helpers/ArrayHelperTest.php b/tests/framework/helpers/ArrayHelperTest.php index 063eeafcaf6..0d706bc552f 100644 --- a/tests/framework/helpers/ArrayHelperTest.php +++ b/tests/framework/helpers/ArrayHelperTest.php @@ -135,6 +135,29 @@ public function testRemove() $this->assertEquals('defaultValue', $default); } + /** + * @return void + */ + public function testRemoveWithFloat() + { + if (version_compare(PHP_VERSION, '8.1.0', '>=')) { + $this->markTestSkipped('Using floats as array key is deprecated.'); + } + + $array = ['name' => 'b', 'age' => 3, 1.1 => null]; + + $name = ArrayHelper::remove($array, 'name'); + $this->assertEquals($name, 'b'); + $this->assertEquals($array, ['age' => 3, 1.1 => null]); + + $floatVal = ArrayHelper::remove($array, 1.1); + $this->assertNull($floatVal); + $this->assertEquals($array, ['age' => 3]); + + $default = ArrayHelper::remove($array, 'nonExisting', 'defaultValue'); + $this->assertEquals('defaultValue', $default); + } + public function testRemoveValueMultiple() { $array = [ @@ -506,14 +529,21 @@ public function testMergeEmpty() /** * @see https://github.com/yiisoft/yii2/pull/11549 */ - public function test() + public function testGetValueWithFloatKeys() { - $array = []; - $array[1.0] = 'some value'; + if (version_compare(PHP_VERSION, '8.1.0', '>=')) { + $this->markTestSkipped('Using floats as array key is deprecated.'); + } - $result = ArrayHelper::getValue($array, 1.0); + $array = []; + $array[1.1] = 'some value'; + $array[2.1] = null; + $result = ArrayHelper::getValue($array, 1.2); $this->assertEquals('some value', $result); + + $result = ArrayHelper::getValue($array, 2.2); + $this->assertNull($result); } public function testIndex() @@ -712,6 +742,7 @@ public function testKeyExists() 'a' => 1, 'B' => 2, ]; + $this->assertTrue(ArrayHelper::keyExists('a', $array)); $this->assertFalse(ArrayHelper::keyExists('b', $array)); $this->assertTrue(ArrayHelper::keyExists('B', $array)); @@ -723,6 +754,27 @@ public function testKeyExists() $this->assertFalse(ArrayHelper::keyExists('c', $array, false)); } + public function testKeyExistsWithFloat() + { + if (version_compare(PHP_VERSION, '8.1.0', '>=')) { + $this->markTestSkipped('Using floats as array key is deprecated.'); + } + + $array = [ + 1 => 3, + 2.2 => 4, // Note: Floats are cast to ints, which means that the fractional part will be truncated. + 3.3 => null, + ]; + + $this->assertTrue(ArrayHelper::keyExists(1, $array)); + $this->assertTrue(ArrayHelper::keyExists(1.1, $array)); + $this->assertTrue(ArrayHelper::keyExists(2, $array)); + $this->assertTrue(ArrayHelper::keyExists('2', $array)); + $this->assertTrue(ArrayHelper::keyExists(2.2, $array)); + $this->assertTrue(ArrayHelper::keyExists(3, $array)); + $this->assertTrue(ArrayHelper::keyExists(3.3, $array)); + } + public function testKeyExistsArrayAccess() { $array = new TraversableArrayAccessibleObject([ diff --git a/tests/framework/helpers/BaseUrlTest.php b/tests/framework/helpers/BaseUrlTest.php new file mode 100644 index 00000000000..9bcd39ef981 --- /dev/null +++ b/tests/framework/helpers/BaseUrlTest.php @@ -0,0 +1,116 @@ +assertTrue(BaseUrl::isRelative($url)); + } + + /** @dataProvider relativeFalseUrlProvider */ + public function testIsRelativeWillReturnFalse($url) + { + $this->assertFalse(BaseUrl::isRelative($url)); + } + + /** @dataProvider ensureSchemeUrlProvider */ + public function testEnsureScheme($url, $scheme, $expected) + { + $this->assertEquals($expected, BaseUrl::ensureScheme($url, $scheme)); + } + + public function ensureSchemeUrlProvider() + { + return [ + 'relative url and https scheme will return input url' => [ + 'url' => 'acme.com?name=bugs.bunny', + 'scheme' => 'https', + 'expected result' => 'acme.com?name=bugs.bunny', + ], + 'relative url and another url as parameter will return input url' => [ + 'url' => 'acme.com/test?tnt-link=https://tnt.com/', + 'scheme' => 'https', + 'expected' => 'acme.com/test?tnt-link=https://tnt.com/', + ], + 'url with scheme not a string will return input url' => [ + 'url' => 'acme.com?name=bugs.bunny', + 'scheme' => 123, + 'expected' => 'acme.com?name=bugs.bunny', + ], + 'protocol relative url and https scheme will be processed' => [ + 'url' => '//acme.com?characters/list', + 'scheme' => 'https', + 'expected' => 'https://acme.com?characters/list', + ], + 'protocol relative url and empty scheme will be returned' => [ + 'url' => '//acme.com?characters/list', + 'scheme' => '', + 'expected' => '//acme.com?characters/list', + ], + 'absolute url and empty scheme will create protocol relative url' => [ + 'url' => 'https://acme.com?characters/list', + 'scheme' => '', + 'expected' => '//acme.com?characters/list', + ], + 'absolute url and different scheme will be processed' => [ + 'url' => 'http://acme.com/test?tnt-link=https://tnt.com/', + 'scheme' => 'https', + 'expected' => 'https://acme.com/test?tnt-link=https://tnt.com/', + ] + ]; + } + + public function relativeTrueUrlProvider() + { + return [ + 'url url without protocol' => [ + 'url' => 'acme.com/tnt-room=123', + ], + 'url without protocol and another url in a parameter value' => [ + 'url' => 'acme.com?tnt-room-link=https://tnt.com', + ], + 'path only' => [ + 'url' => '/path', + ], + 'path with param' => [ + 'url' => '/path=/home/user', + ], + ]; + } + + public function relativeFalseUrlProvider() + { + return [ + 'url with https protocol' => [ + 'url' => 'https://acme.com', + ], + 'url with https protocol and ending slash' => [ + 'url' => 'https://acme.com/', + ], + 'url with https protocol and another url as param value' => [ + 'url' => 'https://acme.com?tnt-link=https://tnt.com', + ], + 'url starting with two slashes' => [ + 'url' => '//example.com', + ], + 'url with ftp protocol' => [ + 'url' => 'ftp://ftp.acme.com/tnt-suppliers.txt', + ], + 'url with http protocol' => [ + 'url' => 'http://no-protection.acme.com', + ], + 'file url' => [ + 'url' => 'file:///home/User/2ndFile.html', + ] + ]; + } +} diff --git a/tests/framework/helpers/ConsoleTest.php b/tests/framework/helpers/ConsoleTest.php index b729e266910..cbd1b322ee5 100644 --- a/tests/framework/helpers/ConsoleTest.php +++ b/tests/framework/helpers/ConsoleTest.php @@ -216,27 +216,6 @@ public function testErrorSummary() $expectedHtml = "Error message. Here are some chars: < >\nError message. Here are even more chars: \"\""; $this->assertEqualsWithoutLE($expectedHtml, Console::errorSummary($model, $options)); } -} - -/** - * @property string name - * @property array types - * @property string description - */ -class TestConsoleModel extends DynamicModel -{ - public function rules() - { - return [ - ['name', 'required'], - ['name', 'string', 'max' => 100] - ]; - } - - public function init() - { - $this->defineAttribute('name'); - } /** * @covers \yii\helpers\BaseConsole::input() @@ -390,16 +369,16 @@ public function testConfirm() $this->truncateStreams(); foreach ([ - 'y' => true, - 'Y' => true, - 'yes' => true, - 'YeS' => true, - 'n' => false, - 'N' => false, - 'no' => false, - 'NO' => false, - 'WHAT?!' . PHP_EOL . 'yes' => true, - ] as $currInput => $currAssertion) { + 'y' => true, + 'Y' => true, + 'yes' => true, + 'YeS' => true, + 'n' => false, + 'N' => false, + 'no' => false, + 'NO' => false, + 'WHAT?!' . PHP_EOL . 'yes' => true, + ] as $currInput => $currAssertion) { $this->sendInput($currInput); $result = ConsoleStub::confirm('Are you sure?'); $this->assertEquals($currAssertion, $result, $currInput); @@ -420,31 +399,63 @@ public function testSelect() $this->sendInput('c'); $result = ConsoleStub::select('Usual behavior', $options); - $this->assertEquals('Usual behavior [c,d,m,?]: ', $this->readOutput()); + $this->assertEquals('Usual behavior (c,d,m,?): ', $this->readOutput()); $this->assertEquals('c', $result); $this->truncateStreams(); $this->sendInput('x', 'd'); $result = ConsoleStub::select('Wrong character', $options); - $this->assertEquals('Wrong character [c,d,m,?]: Wrong character [c,d,m,?]: ', $this->readOutput()); + $this->assertEquals('Wrong character (c,d,m,?): Wrong character (c,d,m,?): ', $this->readOutput()); $this->assertEquals('d', $result); $this->truncateStreams(); $this->sendInput('?', 'm'); $result = ConsoleStub::select('Using help', $options); $this->assertEquals( - 'Using help [c,d,m,?]: ' - . ' c - cat' - . PHP_EOL - . ' d - dog' - . PHP_EOL - . ' m - mouse' - . PHP_EOL - . ' ? - Show help' - . PHP_EOL - . 'Using help [c,d,m,?]: ', + 'Using help (c,d,m,?): ' + . ' c - cat' + . PHP_EOL + . ' d - dog' + . PHP_EOL + . ' m - mouse' + . PHP_EOL + . ' ? - Show help' + . PHP_EOL + . 'Using help (c,d,m,?): ', $this->readOutput() ); $this->truncateStreams(); + + $this->sendInput(''); + $result = ConsoleStub::select('Use Default', $options, 'm'); + $this->assertEquals('m', $result); + $this->truncateStreams(); + + $this->sendInput('', 'd'); + $result = ConsoleStub::select('Empty without Default', $options); + $this->assertEquals('Empty without Default (c,d,m,?): Empty without Default (c,d,m,?): ', $this->readOutput()); + $this->assertEquals('d', $result); + $this->truncateStreams(); + } +} + +/** + * @property string name + * @property array types + * @property string description + */ +class TestConsoleModel extends DynamicModel +{ + public function rules() + { + return [ + ['name', 'required'], + ['name', 'string', 'max' => 100] + ]; + } + + public function init() + { + $this->defineAttribute('name'); } } diff --git a/tests/framework/helpers/FileHelperTest.php b/tests/framework/helpers/FileHelperTest.php index df33c8c1801..448e6148fd4 100644 --- a/tests/framework/helpers/FileHelperTest.php +++ b/tests/framework/helpers/FileHelperTest.php @@ -653,6 +653,15 @@ public function testFindFilesExclude() ); })); $this->assertEquals($expect, $foundFiles); + + // negative pattern + $foundFiles = FileHelper::findFiles($basePath, ['except' => ['/one/*', '!/one/two']]); + sort($foundFiles); + $expect = array_values(array_filter($flat, function ($p) { + return strpos($p, DIRECTORY_SEPARATOR . 'one') === false || strpos($p, DIRECTORY_SEPARATOR . 'two') !== false; + })); + + $this->assertEquals($expect, $foundFiles); } /** @@ -1261,4 +1270,60 @@ public function changeOwnershipInvalidArgumentsProvider() [true, null, 'test'], ]; } + + /** + * @dataProvider getExtensionsByMimeTypeProvider + * @param string $mimeType + * @param array $extensions + * @return void + */ + public function testGetExtensionsByMimeType($mimeType, $extensions) + { + $this->assertEquals($extensions, FileHelper::getExtensionsByMimeType($mimeType)); + } + + public function getExtensionsByMimeTypeProvider() + { + return [ + [ + 'application/json', + [ + 'json', + ], + ], + [ + 'image/jpeg', + [ // Note: For backwards compatibility the (alphabetic) order of `framework/helpers/mimeTypes.php` is expected. + 'jfif', + 'jpe', + 'jpeg', + 'jpg', + 'pjp', + 'pjpeg', + ], + ], + ]; + } + + /** + * @dataProvider getExtensionByMimeTypeProvider + * @param string $mimeType + * @param bool $preferShort + * @param array $extension + * @return void + */ + public function testGetExtensionByMimeType($mimeType, $preferShort, $extension) + { + $this->assertEquals($extension, FileHelper::getExtensionByMimeType($mimeType, $preferShort)); + } + + public function getExtensionByMimeTypeProvider() + { + return [ + ['application/json', true, 'json'], + ['application/json', false, 'json'], + ['image/jpeg', true, 'jpg'], + ['image/jpeg', false, 'jpeg'], + ]; + } } diff --git a/tests/framework/helpers/FormatConverterTest.php b/tests/framework/helpers/FormatConverterTest.php index 3dffe4e0823..dd8d470a1cd 100644 --- a/tests/framework/helpers/FormatConverterTest.php +++ b/tests/framework/helpers/FormatConverterTest.php @@ -39,8 +39,8 @@ protected function tearDown() public function testIntlIcuToPhpShortForm() { - $this->assertEquals('n/j/y', FormatConverter::convertDateIcuToPhp('short', 'date', 'en-US')); - $this->assertEquals('d.m.y', FormatConverter::convertDateIcuToPhp('short', 'date', 'de-DE')); + $this->assertEqualsAnyWhitespace('n/j/y', FormatConverter::convertDateIcuToPhp('short', 'date', 'en-US')); + $this->assertEqualsAnyWhitespace('d.m.y', FormatConverter::convertDateIcuToPhp('short', 'date', 'de-DE')); } public function testIntlIcuToPhpShortFormDefaultLang() @@ -53,13 +53,13 @@ public function testIntlIcuToPhpShortFormDefaultLang() public function testIntlIcuToPhpShortFormTime() { - $this->assertEquals('g:i A', FormatConverter::convertDateIcuToPhp('short', 'time', 'en-US')); - $this->assertEquals('H:i', FormatConverter::convertDateIcuToPhp('short', 'time', 'de-DE')); + $this->assertEqualsAnyWhitespace('g:i A', FormatConverter::convertDateIcuToPhp('short', 'time', 'en-US')); + $this->assertEqualsAnyWhitespace('H:i', FormatConverter::convertDateIcuToPhp('short', 'time', 'de-DE')); } public function testIntlIcuToPhpShortFormDateTime() { - $this->assertEquals('n/j/y, g:i A', FormatConverter::convertDateIcuToPhp('short', 'datetime', 'en-US')); + $this->assertEqualsAnyWhitespace('n/j/y, g:i A', FormatConverter::convertDateIcuToPhp('short', 'datetime', 'en-US')); $this->assertEquals( PHP_VERSION_ID < 50600 ? 'd.m.y H:i' : 'd.m.y, H:i', FormatConverter::convertDateIcuToPhp('short', 'datetime', 'de-DE') @@ -208,13 +208,13 @@ public function testIntlIcuToJuiShortFormDefaultLang() public function testIntlIcuToJuiShortFormTime() { - $this->assertEquals(': ', FormatConverter::convertDateIcuToJui('short', 'time', 'en-US')); - $this->assertEquals(':', FormatConverter::convertDateIcuToJui('short', 'time', 'de-DE')); + $this->assertEqualsAnyWhitespace(': ', FormatConverter::convertDateIcuToJui('short', 'time', 'en-US')); + $this->assertEqualsAnyWhitespace(':', FormatConverter::convertDateIcuToJui('short', 'time', 'de-DE')); } public function testIntlIcuToJuiShortFormDateTime() { - $this->assertEquals('m/d/y, : ', FormatConverter::convertDateIcuToJui('short', 'datetime', 'en-US')); + $this->assertEqualsAnyWhitespace('m/d/y, : ', FormatConverter::convertDateIcuToJui('short', 'datetime', 'en-US')); $this->assertEquals( PHP_VERSION_ID < 50600 ? 'dd.mm.y :' : 'dd.mm.y, :', FormatConverter::convertDateIcuToJui('short', 'datetime', 'de-DE') diff --git a/tests/framework/helpers/HtmlTest.php b/tests/framework/helpers/HtmlTest.php index 91cc82f9e4a..eef2f84bf7f 100644 --- a/tests/framework/helpers/HtmlTest.php +++ b/tests/framework/helpers/HtmlTest.php @@ -513,6 +513,7 @@ public function testDropDownList() EOD; $this->assertEqualsWithoutLE($expected, Html::dropDownList('test')); + $expected = <<<'EOD' EOD; $this->assertEqualsWithoutLE($expected, Html::dropDownList('test', null, $this->getDataItems())); - $expected = <<<'EOD' - -EOD; - $this->assertEqualsWithoutLE($expected, Html::dropDownList('test', 'value2', $this->getDataItems())); $expected = <<<'EOD' EOD; - $this->assertEqualsWithoutLE($expected, Html::dropDownList('test', null, $this->getDataItems(), [ - 'options' => [ - 'value2' => ['selected' => true], - ], - ])); + $this->assertEqualsWithoutLE($expected, Html::dropDownList('test', 'value2', $this->getDataItems())); + $this->assertEqualsWithoutLE( + $expected, + Html::dropDownList('test', null, $this->getDataItems(), [ + 'options' => [ + 'value2' => ['selected' => true], + ], + ]) + ); $expected = <<<'EOD' EOD; - $this->assertEqualsWithoutLE($expected, Html::dropDownList('test', [0], $this->getDataItems3(), ['multiple' => 'true'])); - $this->assertEqualsWithoutLE($expected, Html::dropDownList('test', new \ArrayObject([0]), $this->getDataItems3(), ['multiple' => 'true'])); + $this->assertEqualsWithoutLE( + $expected, + Html::dropDownList('test', [0], $this->getDataItems3(), ['multiple' => 'true']) + ); + $this->assertEqualsWithoutLE( + $expected, + Html::dropDownList('test', new \ArrayObject([0]), $this->getDataItems3(), ['multiple' => 'true']) + ); $expected = <<<'EOD' EOD; - $this->assertEqualsWithoutLE($expected, Html::dropDownList('test', ['1', 'value3'], $this->getDataItems3(), ['multiple' => 'true'])); - $this->assertEqualsWithoutLE($expected, Html::dropDownList('test', new \ArrayObject(['1', 'value3']), $this->getDataItems3(), ['multiple' => 'true'])); + $this->assertEqualsWithoutLE( + $expected, + Html::dropDownList('test', ['1', 'value3'], $this->getDataItems3(), ['multiple' => 'true']) + ); + $this->assertEqualsWithoutLE( + $expected, + Html::dropDownList('test', new \ArrayObject(['1', 'value3']), $this->getDataItems3(), ['multiple' => 'true'] + ) + ); + } + + public function providerForNonStrictBooleanDropDownList() + { + return [ + [null, false, false, false], + ['', true, false, false], + [0, false, false, true], + [1, false, true, false], + ['0', false, false, true], + ['1', false, true, false], + [false, false, false, true], + [true, false, true, false], + ]; + } + + /** + * @dataProvider providerForNonStrictBooleanDropDownList + */ + public function testNonStrictBooleanDropDownList($selection, $selectedEmpty, $selectedYes, $selectedNo) + { + $selectedEmpty = $selectedEmpty ? ' selected' : ''; + $selectedYes = $selectedYes ? ' selected' : ''; + $selectedNo = $selectedNo ? ' selected' : ''; + $expected = << + + + + +HTML; + $this->assertEqualsWithoutLE( + $expected, + Html::dropDownList('test', $selection, ['' => '', '1' => 'Yes', '0' => 'No']) + ); + } + + public function providerForStrictBooleanDropDownList() + { + return [ + [null, false, false, false], + ['', true, false, false], + [0, false, false, true], + [1, false, true, false], + ['0', false, false, true], + ['1', false, true, false], + [false, false, false, true], + [true, false, true, false], + ]; + } + + /** + * @dataProvider providerForStrictBooleanDropDownList + */ + public function testStrictBooleanDropDownList($selection, $selectedEmpty, $selectedYes, $selectedNo) + { + $selectedEmpty = $selectedEmpty ? ' selected' : ''; + $selectedYes = $selectedYes ? ' selected' : ''; + $selectedNo = $selectedNo ? ' selected' : ''; + $expected = << + + + + +HTML; + $this->assertEqualsWithoutLE( + $expected, + Html::dropDownList('test', $selection, ['' => '', '1' => 'Yes', '0' => 'No'], ['strict' => true]) + ); } public function testListBox() @@ -1117,11 +1198,6 @@ public function testRenderOptions() //$attributes = ['prompt' => 'Please select']; //$this->assertEqualsWithoutLE($expected, Html::renderSelectOptions([false], $data, $attributes)); - $expected = <<<'EOD' - - - -EOD; $attributes = ['prompt' => 'Please select', 'strict' => true]; $this->assertEqualsWithoutLE($expected, Html::renderSelectOptions(false, $data, $attributes)); $attributes = ['prompt' => 'Please select', 'strict' => true]; @@ -1134,6 +1210,7 @@ public function testRenderTagAttributes() $this->assertEquals(' name="test" value="1<>"', Html::renderTagAttributes(['name' => 'test', 'empty' => null, 'value' => '1<>'])); $this->assertEquals(' checked disabled', Html::renderTagAttributes(['checked' => true, 'disabled' => true, 'hidden' => false])); $this->assertEquals(' class="first second"', Html::renderTagAttributes(['class' => ['first', 'second']])); + $this->assertEquals(' class="first second"', Html::renderTagAttributes(['class' => ['first', null, 'second', '']])); Html::$normalizeClassAttribute = true; $this->assertEquals(' class="first second"', Html::renderTagAttributes(['class' => ['first second', 'first']])); $this->assertEquals('', Html::renderTagAttributes(['class' => []])); @@ -1154,7 +1231,6 @@ public function testRenderTagAttributes() ]; $this->assertEquals(' data-foo', Html::renderTagAttributes($attributes)); - $attributes = [ 'data' => [ 'foo' => false, @@ -1596,6 +1672,11 @@ function ($model) { $model->addError('name', 'Error message. Here are even more chars: ""'); }, ], + [ + 'empty_class', + ['emptyClass' => 'd-none'], + '

    Please fix the following errors:

      ', + ], ]; } diff --git a/tests/framework/helpers/InflectorTest.php b/tests/framework/helpers/InflectorTest.php index e9be96563b5..7b1632b9929 100644 --- a/tests/framework/helpers/InflectorTest.php +++ b/tests/framework/helpers/InflectorTest.php @@ -319,7 +319,7 @@ public function testTransliterateMedium() 'Српска: ђ, њ, џ!' => ['Srpska: d, n, d!'], // Spanish - '¿Español?' => ['¿Espanol?'], + '¿Español?' => ['¿Espanol?', '?Espanol?'], // Chinese '美国' => ['mei guo'], ]; @@ -362,7 +362,7 @@ public function testTransliterateLoose() 'Српска: ђ, њ, џ!' => ['Srpska: d, n, d!'], // Spanish - '¿Español?' => ['Espanol?'], + '¿Español?' => ['Espanol?', '?Espanol?'], // Chinese '美国' => ['mei guo'], ]; diff --git a/tests/framework/helpers/JsonTest.php b/tests/framework/helpers/JsonTest.php index b2bcf0b86a3..f8150c764d8 100644 --- a/tests/framework/helpers/JsonTest.php +++ b/tests/framework/helpers/JsonTest.php @@ -95,6 +95,19 @@ public function testEncode() $data = new JsonModel(); $data->data = (object) null; $this->assertSame('{}', Json::encode($data)); + + // Generator (Only supported since PHP 5.5) + if (PHP_VERSION_ID >= 50500) { + $data = eval(<<<'PHP' + return function () { + foreach (['a' => 1, 'b' => 2] as $name => $value) { + yield $name => $value; + } + }; +PHP + ); + $this->assertSame('{"a":1,"b":2}', Json::encode($data())); + } } public function testHtmlEncode() diff --git a/tests/framework/helpers/MimeTest.php b/tests/framework/helpers/MimeTest.php deleted file mode 100644 index 0d4aa3792b2..00000000000 --- a/tests/framework/helpers/MimeTest.php +++ /dev/null @@ -1,1038 +0,0 @@ -assertSame( - [ - 'text/rtf' => 'application/rtf', - 'text/xml' => 'application/xml', - 'image/svg' => 'image/svg+xml', - 'image/x-bmp' => 'image/bmp', - 'image/x-bitmap' => 'image/bmp', - 'image/x-xbitmap' => 'image/bmp', - 'image/x-win-bitmap' => 'image/bmp', - 'image/x-windows-bmp' => 'image/bmp', - 'image/ms-bmp' => 'image/bmp', - 'image/x-ms-bmp' => 'image/bmp', - 'application/bmp' => 'image/bmp', - 'application/x-bmp' => 'image/bmp', - 'application/x-win-bitmap' => 'image/bmp', - ], - require __DIR__ . '/../../../framework/helpers/mimeAliases.php' - ); - } - - public function testMimeTypes() - { - $coreMimeTypes = [ - '3dml' => 'text/vnd.in3d.3dml', - '3ds' => 'image/x-3ds', - '3g2' => 'video/3gpp2', - '3gp' => 'video/3gpp', - '7z' => 'application/x-7z-compressed', - 'aab' => 'application/x-authorware-bin', - 'aac' => 'audio/x-aac', - 'aam' => 'application/x-authorware-map', - 'aas' => 'application/x-authorware-seg', - 'abw' => 'application/x-abiword', - 'ac' => 'application/pkix-attr-cert', - 'acc' => 'application/vnd.americandynamics.acc', - 'ace' => 'application/x-ace-compressed', - 'acu' => 'application/vnd.acucobol', - 'acutc' => 'application/vnd.acucorp', - 'adp' => 'audio/adpcm', - 'aep' => 'application/vnd.audiograph', - 'afm' => 'application/x-font-type1', - 'afp' => 'application/vnd.ibm.modcap', - 'ahead' => 'application/vnd.ahead.space', - 'ai' => 'application/postscript', - 'aif' => 'audio/x-aiff', - 'aifc' => 'audio/x-aiff', - 'aiff' => 'audio/x-aiff', - 'air' => 'application/vnd.adobe.air-application-installer-package+zip', - 'ait' => 'application/vnd.dvb.ait', - 'ami' => 'application/vnd.amiga.ami', - 'apk' => 'application/vnd.android.package-archive', - 'appcache' => 'text/cache-manifest', - 'application' => 'application/x-ms-application', - 'apr' => 'application/vnd.lotus-approach', - 'arc' => 'application/x-freearc', - 'asc' => 'application/pgp-signature', - 'asf' => 'video/x-ms-asf', - 'asm' => 'text/x-asm', - 'aso' => 'application/vnd.accpac.simply.aso', - 'asx' => 'video/x-ms-asf', - 'atc' => 'application/vnd.acucorp', - 'atom' => 'application/atom+xml', - 'atomcat' => 'application/atomcat+xml', - 'atomsvc' => 'application/atomsvc+xml', - 'atx' => 'application/vnd.antix.game-component', - 'au' => 'audio/basic', - 'avi' => 'video/x-msvideo', - 'aw' => 'application/applixware', - 'azf' => 'application/vnd.airzip.filesecure.azf', - 'azs' => 'application/vnd.airzip.filesecure.azs', - 'azw' => 'application/vnd.amazon.ebook', - 'bat' => 'application/x-msdownload', - 'bcpio' => 'application/x-bcpio', - 'bdf' => 'application/x-font-bdf', - 'bdm' => 'application/vnd.syncml.dm+wbxml', - 'bed' => 'application/vnd.realvnc.bed', - 'bh2' => 'application/vnd.fujitsu.oasysprs', - 'bin' => 'application/octet-stream', - 'blb' => 'application/x-blorb', - 'blorb' => 'application/x-blorb', - 'bmi' => 'application/vnd.bmi', - 'bmp' => 'image/bmp', - 'book' => 'application/vnd.framemaker', - 'box' => 'application/vnd.previewsystems.box', - 'boz' => 'application/x-bzip2', - 'bpk' => 'application/octet-stream', - 'btif' => 'image/prs.btif', - 'bz' => 'application/x-bzip', - 'bz2' => 'application/x-bzip2', - 'c' => 'text/x-c', - 'c11amc' => 'application/vnd.cluetrust.cartomobile-config', - 'c11amz' => 'application/vnd.cluetrust.cartomobile-config-pkg', - 'c4d' => 'application/vnd.clonk.c4group', - 'c4f' => 'application/vnd.clonk.c4group', - 'c4g' => 'application/vnd.clonk.c4group', - 'c4p' => 'application/vnd.clonk.c4group', - 'c4u' => 'application/vnd.clonk.c4group', - 'cab' => 'application/vnd.ms-cab-compressed', - 'caf' => 'audio/x-caf', - 'cap' => 'application/vnd.tcpdump.pcap', - 'car' => 'application/vnd.curl.car', - 'cat' => 'application/vnd.ms-pki.seccat', - 'cb7' => 'application/x-cbr', - 'cba' => 'application/x-cbr', - 'cbr' => 'application/x-cbr', - 'cbt' => 'application/x-cbr', - 'cbz' => 'application/x-cbr', - 'cc' => 'text/x-c', - 'cct' => 'application/x-director', - 'ccxml' => 'application/ccxml+xml', - 'cdbcmsg' => 'application/vnd.contact.cmsg', - 'cdf' => 'application/x-netcdf', - 'cdkey' => 'application/vnd.mediastation.cdkey', - 'cdmia' => 'application/cdmi-capability', - 'cdmic' => 'application/cdmi-container', - 'cdmid' => 'application/cdmi-domain', - 'cdmio' => 'application/cdmi-object', - 'cdmiq' => 'application/cdmi-queue', - 'cdx' => 'chemical/x-cdx', - 'cdxml' => 'application/vnd.chemdraw+xml', - 'cdy' => 'application/vnd.cinderella', - 'cer' => 'application/pkix-cert', - 'cfs' => 'application/x-cfs-compressed', - 'cgm' => 'image/cgm', - 'chat' => 'application/x-chat', - 'chm' => 'application/vnd.ms-htmlhelp', - 'chrt' => 'application/vnd.kde.kchart', - 'cif' => 'chemical/x-cif', - 'cii' => 'application/vnd.anser-web-certificate-issue-initiation', - 'cil' => 'application/vnd.ms-artgalry', - 'cla' => 'application/vnd.claymore', - 'class' => 'application/java-vm', - 'clkk' => 'application/vnd.crick.clicker.keyboard', - 'clkp' => 'application/vnd.crick.clicker.palette', - 'clkt' => 'application/vnd.crick.clicker.template', - 'clkw' => 'application/vnd.crick.clicker.wordbank', - 'clkx' => 'application/vnd.crick.clicker', - 'clp' => 'application/x-msclip', - 'cmc' => 'application/vnd.cosmocaller', - 'cmdf' => 'chemical/x-cmdf', - 'cml' => 'chemical/x-cml', - 'cmp' => 'application/vnd.yellowriver-custom-menu', - 'cmx' => 'image/x-cmx', - 'cod' => 'application/vnd.rim.cod', - 'com' => 'application/x-msdownload', - 'conf' => 'text/plain', - 'cpio' => 'application/x-cpio', - 'cpp' => 'text/x-c', - 'cpt' => 'application/mac-compactpro', - 'crd' => 'application/x-mscardfile', - 'crl' => 'application/pkix-crl', - 'crt' => 'application/x-x509-ca-cert', - 'cryptonote' => 'application/vnd.rig.cryptonote', - 'csh' => 'application/x-csh', - 'csml' => 'chemical/x-csml', - 'csp' => 'application/vnd.commonspace', - 'css' => 'text/css', - 'cst' => 'application/x-director', - 'csv' => 'text/csv', - 'cu' => 'application/cu-seeme', - 'curl' => 'text/vnd.curl', - 'cww' => 'application/prs.cww', - 'cxt' => 'application/x-director', - 'cxx' => 'text/x-c', - 'dae' => 'model/vnd.collada+xml', - 'daf' => 'application/vnd.mobius.daf', - 'dart' => 'application/vnd.dart', - 'dataless' => 'application/vnd.fdsn.seed', - 'davmount' => 'application/davmount+xml', - 'dbk' => 'application/docbook+xml', - 'dcr' => 'application/x-director', - 'dcurl' => 'text/vnd.curl.dcurl', - 'dd2' => 'application/vnd.oma.dd2+xml', - 'ddd' => 'application/vnd.fujixerox.ddd', - 'deb' => 'application/x-debian-package', - 'def' => 'text/plain', - 'deploy' => 'application/octet-stream', - 'der' => 'application/x-x509-ca-cert', - 'dfac' => 'application/vnd.dreamfactory', - 'dgc' => 'application/x-dgc-compressed', - 'dic' => 'text/x-c', - 'dir' => 'application/x-director', - 'dis' => 'application/vnd.mobius.dis', - 'dist' => 'application/octet-stream', - 'distz' => 'application/octet-stream', - 'djv' => 'image/vnd.djvu', - 'djvu' => 'image/vnd.djvu', - 'dll' => 'application/x-msdownload', - 'dmg' => 'application/x-apple-diskimage', - 'dmp' => 'application/vnd.tcpdump.pcap', - 'dms' => 'application/octet-stream', - 'dna' => 'application/vnd.dna', - 'doc' => 'application/msword', - 'docm' => 'application/vnd.ms-word.document.macroenabled.12', - 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'dot' => 'application/msword', - 'dotm' => 'application/vnd.ms-word.template.macroenabled.12', - 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', - 'dp' => 'application/vnd.osgi.dp', - 'dpg' => 'application/vnd.dpgraph', - 'dra' => 'audio/vnd.dra', - 'dsc' => 'text/prs.lines.tag', - 'dssc' => 'application/dssc+der', - 'dtb' => 'application/x-dtbook+xml', - 'dtd' => 'application/xml-dtd', - 'dts' => 'audio/vnd.dts', - 'dtshd' => 'audio/vnd.dts.hd', - 'dump' => 'application/octet-stream', - 'dvb' => 'video/vnd.dvb.file', - 'dvi' => 'application/x-dvi', - 'dwf' => 'model/vnd.dwf', - 'dwg' => 'image/vnd.dwg', - 'dxf' => 'image/vnd.dxf', - 'dxp' => 'application/vnd.spotfire.dxp', - 'dxr' => 'application/x-director', - 'ecelp4800' => 'audio/vnd.nuera.ecelp4800', - 'ecelp7470' => 'audio/vnd.nuera.ecelp7470', - 'ecelp9600' => 'audio/vnd.nuera.ecelp9600', - 'ecma' => 'application/ecmascript', - 'edm' => 'application/vnd.novadigm.edm', - 'edx' => 'application/vnd.novadigm.edx', - 'efif' => 'application/vnd.picsel', - 'ei6' => 'application/vnd.pg.osasli', - 'elc' => 'application/octet-stream', - 'emf' => 'application/x-msmetafile', - 'eml' => 'message/rfc822', - 'emma' => 'application/emma+xml', - 'emz' => 'application/x-msmetafile', - 'eol' => 'audio/vnd.digital-winds', - 'eot' => 'application/vnd.ms-fontobject', - 'eps' => 'application/postscript', - 'epub' => 'application/epub+zip', - 'es3' => 'application/vnd.eszigno3+xml', - 'esa' => 'application/vnd.osgi.subsystem', - 'esf' => 'application/vnd.epson.esf', - 'et3' => 'application/vnd.eszigno3+xml', - 'etx' => 'text/x-setext', - 'eva' => 'application/x-eva', - 'evy' => 'application/x-envoy', - 'exe' => 'application/x-msdownload', - 'exi' => 'application/exi', - 'ext' => 'application/vnd.novadigm.ext', - 'ez' => 'application/andrew-inset', - 'ez2' => 'application/vnd.ezpix-album', - 'ez3' => 'application/vnd.ezpix-package', - 'f' => 'text/x-fortran', - 'f4v' => 'video/x-f4v', - 'f77' => 'text/x-fortran', - 'f90' => 'text/x-fortran', - 'fbs' => 'image/vnd.fastbidsheet', - 'fcdt' => 'application/vnd.adobe.formscentral.fcdt', - 'fcs' => 'application/vnd.isac.fcs', - 'fdf' => 'application/vnd.fdf', - 'fe_launch' => 'application/vnd.denovo.fcselayout-link', - 'fg5' => 'application/vnd.fujitsu.oasysgp', - 'fgd' => 'application/x-director', - 'fh' => 'image/x-freehand', - 'fh4' => 'image/x-freehand', - 'fh5' => 'image/x-freehand', - 'fh7' => 'image/x-freehand', - 'fhc' => 'image/x-freehand', - 'fig' => 'application/x-xfig', - 'flac' => 'audio/x-flac', - 'fli' => 'video/x-fli', - 'flo' => 'application/vnd.micrografx.flo', - 'flv' => 'video/x-flv', - 'flw' => 'application/vnd.kde.kivio', - 'flx' => 'text/vnd.fmi.flexstor', - 'fly' => 'text/vnd.fly', - 'fm' => 'application/vnd.framemaker', - 'fnc' => 'application/vnd.frogans.fnc', - 'for' => 'text/x-fortran', - 'fpx' => 'image/vnd.fpx', - 'frame' => 'application/vnd.framemaker', - 'fsc' => 'application/vnd.fsc.weblaunch', - 'fst' => 'image/vnd.fst', - 'ftc' => 'application/vnd.fluxtime.clip', - 'fti' => 'application/vnd.anser-web-funds-transfer-initiation', - 'fvt' => 'video/vnd.fvt', - 'fxp' => 'application/vnd.adobe.fxp', - 'fxpl' => 'application/vnd.adobe.fxp', - 'fzs' => 'application/vnd.fuzzysheet', - 'g2w' => 'application/vnd.geoplan', - 'g3' => 'image/g3fax', - 'g3w' => 'application/vnd.geospace', - 'gac' => 'application/vnd.groove-account', - 'gam' => 'application/x-tads', - 'gbr' => 'application/rpki-ghostbusters', - 'gca' => 'application/x-gca-compressed', - 'gdl' => 'model/vnd.gdl', - 'geo' => 'application/vnd.dynageo', - 'gex' => 'application/vnd.geometry-explorer', - 'ggb' => 'application/vnd.geogebra.file', - 'ggt' => 'application/vnd.geogebra.tool', - 'ghf' => 'application/vnd.groove-help', - 'gif' => 'image/gif', - 'gim' => 'application/vnd.groove-identity-message', - 'gml' => 'application/gml+xml', - 'gmx' => 'application/vnd.gmx', - 'gnumeric' => 'application/x-gnumeric', - 'gph' => 'application/vnd.flographit', - 'gpx' => 'application/gpx+xml', - 'gqf' => 'application/vnd.grafeq', - 'gqs' => 'application/vnd.grafeq', - 'gram' => 'application/srgs', - 'gramps' => 'application/x-gramps-xml', - 'gre' => 'application/vnd.geometry-explorer', - 'grv' => 'application/vnd.groove-injector', - 'grxml' => 'application/srgs+xml', - 'gsf' => 'application/x-font-ghostscript', - 'gtar' => 'application/x-gtar', - 'gtm' => 'application/vnd.groove-tool-message', - 'gtw' => 'model/vnd.gtw', - 'gv' => 'text/vnd.graphviz', - 'gxf' => 'application/gxf', - 'gxt' => 'application/vnd.geonext', - 'h' => 'text/x-c', - 'h261' => 'video/h261', - 'h263' => 'video/h263', - 'h264' => 'video/h264', - 'hal' => 'application/vnd.hal+xml', - 'hbci' => 'application/vnd.hbci', - 'hdf' => 'application/x-hdf', - 'hh' => 'text/x-c', - 'hlp' => 'application/winhlp', - 'hpgl' => 'application/vnd.hp-hpgl', - 'hpid' => 'application/vnd.hp-hpid', - 'hps' => 'application/vnd.hp-hps', - 'hqx' => 'application/mac-binhex40', - 'htke' => 'application/vnd.kenameaapp', - 'htm' => 'text/html', - 'html' => 'text/html', - 'hvd' => 'application/vnd.yamaha.hv-dic', - 'hvp' => 'application/vnd.yamaha.hv-voice', - 'hvs' => 'application/vnd.yamaha.hv-script', - 'i2g' => 'application/vnd.intergeo', - 'icc' => 'application/vnd.iccprofile', - 'ice' => 'x-conference/x-cooltalk', - 'icm' => 'application/vnd.iccprofile', - 'ico' => 'image/x-icon', - 'ics' => 'text/calendar', - 'ief' => 'image/ief', - 'ifb' => 'text/calendar', - 'ifm' => 'application/vnd.shana.informed.formdata', - 'iges' => 'model/iges', - 'igl' => 'application/vnd.igloader', - 'igm' => 'application/vnd.insors.igm', - 'igs' => 'model/iges', - 'igx' => 'application/vnd.micrografx.igx', - 'iif' => 'application/vnd.shana.informed.interchange', - 'imp' => 'application/vnd.accpac.simply.imp', - 'ims' => 'application/vnd.ms-ims', - 'in' => 'text/plain', - 'ink' => 'application/inkml+xml', - 'inkml' => 'application/inkml+xml', - 'install' => 'application/x-install-instructions', - 'iota' => 'application/vnd.astraea-software.iota', - 'ipfix' => 'application/ipfix', - 'ipk' => 'application/vnd.shana.informed.package', - 'irm' => 'application/vnd.ibm.rights-management', - 'irp' => 'application/vnd.irepository.package+xml', - 'iso' => 'application/x-iso9660-image', - 'itp' => 'application/vnd.shana.informed.formtemplate', - 'ivp' => 'application/vnd.immervision-ivp', - 'ivu' => 'application/vnd.immervision-ivu', - 'jad' => 'text/vnd.sun.j2me.app-descriptor', - 'jam' => 'application/vnd.jam', - 'jar' => 'application/java-archive', - 'java' => 'text/x-java-source', - 'jfif' => 'image/jpeg', - 'jisp' => 'application/vnd.jisp', - 'jlt' => 'application/vnd.hp-jlyt', - 'jnlp' => 'application/x-java-jnlp-file', - 'joda' => 'application/vnd.joost.joda-archive', - 'jpe' => 'image/jpeg', - 'jpeg' => 'image/jpeg', - 'jpg' => 'image/jpeg', - 'jpgm' => 'video/jpm', - 'jpgv' => 'video/jpeg', - 'jpm' => 'video/jpm', - 'js' => 'application/javascript', - 'json' => 'application/json', - 'jsonml' => 'application/jsonml+json', - 'kar' => 'audio/midi', - 'karbon' => 'application/vnd.kde.karbon', - 'kfo' => 'application/vnd.kde.kformula', - 'kia' => 'application/vnd.kidspiration', - 'kml' => 'application/vnd.google-earth.kml+xml', - 'kmz' => 'application/vnd.google-earth.kmz', - 'kne' => 'application/vnd.kinar', - 'knp' => 'application/vnd.kinar', - 'kon' => 'application/vnd.kde.kontour', - 'kpr' => 'application/vnd.kde.kpresenter', - 'kpt' => 'application/vnd.kde.kpresenter', - 'kpxx' => 'application/vnd.ds-keypoint', - 'ksp' => 'application/vnd.kde.kspread', - 'ktr' => 'application/vnd.kahootz', - 'ktx' => 'image/ktx', - 'ktz' => 'application/vnd.kahootz', - 'kwd' => 'application/vnd.kde.kword', - 'kwt' => 'application/vnd.kde.kword', - 'lasxml' => 'application/vnd.las.las+xml', - 'latex' => 'application/x-latex', - 'lbd' => 'application/vnd.llamagraphics.life-balance.desktop', - 'lbe' => 'application/vnd.llamagraphics.life-balance.exchange+xml', - 'les' => 'application/vnd.hhe.lesson-player', - 'lha' => 'application/x-lzh-compressed', - 'link66' => 'application/vnd.route66.link66+xml', - 'list' => 'text/plain', - 'list3820' => 'application/vnd.ibm.modcap', - 'listafp' => 'application/vnd.ibm.modcap', - 'lnk' => 'application/x-ms-shortcut', - 'log' => 'text/plain', - 'lostxml' => 'application/lost+xml', - 'lrf' => 'application/octet-stream', - 0 => 'application/vnd.lotus-1-2-3', - 'lrm' => 'application/vnd.ms-lrm', - 'ltf' => 'application/vnd.frogans.ltf', - 'lvp' => 'audio/vnd.lucent.voice', - 'lwp' => 'application/vnd.lotus-wordpro', - 'lzh' => 'application/x-lzh-compressed', - 'm13' => 'application/x-msmediaview', - 'm14' => 'application/x-msmediaview', - 'm1v' => 'video/mpeg', - 'm21' => 'application/mp21', - 'm2a' => 'audio/mpeg', - 'm2v' => 'video/mpeg', - 'm3a' => 'audio/mpeg', - 'm3u' => 'audio/x-mpegurl', - 'm3u8' => 'application/vnd.apple.mpegurl', - 'm4a' => 'audio/mp4', - 'm4u' => 'video/vnd.mpegurl', - 'm4v' => 'video/x-m4v', - 'ma' => 'application/mathematica', - 'mads' => 'application/mads+xml', - 'mag' => 'application/vnd.ecowin.chart', - 'maker' => 'application/vnd.framemaker', - 'man' => 'text/troff', - 'mar' => 'application/octet-stream', - 'mathml' => 'application/mathml+xml', - 'mb' => 'application/mathematica', - 'mbk' => 'application/vnd.mobius.mbk', - 'mbox' => 'application/mbox', - 'mc1' => 'application/vnd.medcalcdata', - 'mcd' => 'application/vnd.mcd', - 'mcurl' => 'text/vnd.curl.mcurl', - 'mdb' => 'application/x-msaccess', - 'mdi' => 'image/vnd.ms-modi', - 'me' => 'text/troff', - 'mesh' => 'model/mesh', - 'meta4' => 'application/metalink4+xml', - 'metalink' => 'application/metalink+xml', - 'mets' => 'application/mets+xml', - 'mfm' => 'application/vnd.mfmp', - 'mft' => 'application/rpki-manifest', - 'mgp' => 'application/vnd.osgeo.mapguide.package', - 'mgz' => 'application/vnd.proteus.magazine', - 'mid' => 'audio/midi', - 'midi' => 'audio/midi', - 'mie' => 'application/x-mie', - 'mif' => 'application/vnd.mif', - 'mime' => 'message/rfc822', - 'mj2' => 'video/mj2', - 'mjp2' => 'video/mj2', - 'mjs' => 'text/javascript', - 'mk3d' => 'video/x-matroska', - 'mka' => 'audio/x-matroska', - 'mks' => 'video/x-matroska', - 'mkv' => 'video/x-matroska', - 'mlp' => 'application/vnd.dolby.mlp', - 'mmd' => 'application/vnd.chipnuts.karaoke-mmd', - 'mmf' => 'application/vnd.smaf', - 'mmr' => 'image/vnd.fujixerox.edmics-mmr', - 'mng' => 'video/x-mng', - 'mny' => 'application/x-msmoney', - 'mobi' => 'application/x-mobipocket-ebook', - 'mods' => 'application/mods+xml', - 'mov' => 'video/quicktime', - 'movie' => 'video/x-sgi-movie', - 'mp2' => 'audio/mpeg', - 'mp21' => 'application/mp21', - 'mp2a' => 'audio/mpeg', - 'mp3' => 'audio/mpeg', - 'mp4' => 'video/mp4', - 'mp4a' => 'audio/mp4', - 'mp4s' => 'application/mp4', - 'mp4v' => 'video/mp4', - 'mpc' => 'application/vnd.mophun.certificate', - 'mpe' => 'video/mpeg', - 'mpeg' => 'video/mpeg', - 'mpg' => 'video/mpeg', - 'mpg4' => 'video/mp4', - 'mpga' => 'audio/mpeg', - 'mpkg' => 'application/vnd.apple.installer+xml', - 'mpm' => 'application/vnd.blueice.multipass', - 'mpn' => 'application/vnd.mophun.application', - 'mpp' => 'application/vnd.ms-project', - 'mpt' => 'application/vnd.ms-project', - 'mpy' => 'application/vnd.ibm.minipay', - 'mqy' => 'application/vnd.mobius.mqy', - 'mrc' => 'application/marc', - 'mrcx' => 'application/marcxml+xml', - 'ms' => 'text/troff', - 'mscml' => 'application/mediaservercontrol+xml', - 'mseed' => 'application/vnd.fdsn.mseed', - 'mseq' => 'application/vnd.mseq', - 'msf' => 'application/vnd.epson.msf', - 'msh' => 'model/mesh', - 'msi' => 'application/x-msdownload', - 'msl' => 'application/vnd.mobius.msl', - 'msty' => 'application/vnd.muvee.style', - 'mts' => 'model/vnd.mts', - 'mus' => 'application/vnd.musician', - 'musicxml' => 'application/vnd.recordare.musicxml+xml', - 'mvb' => 'application/x-msmediaview', - 'mwf' => 'application/vnd.mfer', - 'mxf' => 'application/mxf', - 'mxl' => 'application/vnd.recordare.musicxml', - 'mxml' => 'application/xv+xml', - 'mxs' => 'application/vnd.triscape.mxs', - 'mxu' => 'video/vnd.mpegurl', - 'n-gage' => 'application/vnd.nokia.n-gage.symbian.install', - 'n3' => 'text/n3', - 'nb' => 'application/mathematica', - 'nbp' => 'application/vnd.wolfram.player', - 'nc' => 'application/x-netcdf', - 'ncx' => 'application/x-dtbncx+xml', - 'nfo' => 'text/x-nfo', - 'ngdat' => 'application/vnd.nokia.n-gage.data', - 'nitf' => 'application/vnd.nitf', - 'nlu' => 'application/vnd.neurolanguage.nlu', - 'nml' => 'application/vnd.enliven', - 'nnd' => 'application/vnd.noblenet-directory', - 'nns' => 'application/vnd.noblenet-sealer', - 'nnw' => 'application/vnd.noblenet-web', - 'npx' => 'image/vnd.net-fpx', - 'nsc' => 'application/x-conference', - 'nsf' => 'application/vnd.lotus-notes', - 'ntf' => 'application/vnd.nitf', - 'nzb' => 'application/x-nzb', - 'oa2' => 'application/vnd.fujitsu.oasys2', - 'oa3' => 'application/vnd.fujitsu.oasys3', - 'oas' => 'application/vnd.fujitsu.oasys', - 'obd' => 'application/x-msbinder', - 'obj' => 'application/x-tgif', - 'oda' => 'application/oda', - 'odb' => 'application/vnd.oasis.opendocument.database', - 'odc' => 'application/vnd.oasis.opendocument.chart', - 'odf' => 'application/vnd.oasis.opendocument.formula', - 'odft' => 'application/vnd.oasis.opendocument.formula-template', - 'odg' => 'application/vnd.oasis.opendocument.graphics', - 'odi' => 'application/vnd.oasis.opendocument.image', - 'odm' => 'application/vnd.oasis.opendocument.text-master', - 'odp' => 'application/vnd.oasis.opendocument.presentation', - 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', - 'odt' => 'application/vnd.oasis.opendocument.text', - 'oga' => 'audio/ogg', - 'ogg' => 'audio/ogg', - 'ogv' => 'video/ogg', - 'ogx' => 'application/ogg', - 'omdoc' => 'application/omdoc+xml', - 'onepkg' => 'application/onenote', - 'onetmp' => 'application/onenote', - 'onetoc' => 'application/onenote', - 'onetoc2' => 'application/onenote', - 'opf' => 'application/oebps-package+xml', - 'opml' => 'text/x-opml', - 'oprc' => 'application/vnd.palm', - 'opus' => 'audio/ogg', - 'org' => 'application/vnd.lotus-organizer', - 'osf' => 'application/vnd.yamaha.openscoreformat', - 'osfpvg' => 'application/vnd.yamaha.openscoreformat.osfpvg+xml', - 'otc' => 'application/vnd.oasis.opendocument.chart-template', - 'otf' => 'font/otf', - 'otg' => 'application/vnd.oasis.opendocument.graphics-template', - 'oth' => 'application/vnd.oasis.opendocument.text-web', - 'oti' => 'application/vnd.oasis.opendocument.image-template', - 'otp' => 'application/vnd.oasis.opendocument.presentation-template', - 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', - 'ott' => 'application/vnd.oasis.opendocument.text-template', - 'oxps' => 'application/oxps', - 'oxt' => 'application/vnd.openofficeorg.extension', - 'p' => 'text/x-pascal', - 'p10' => 'application/pkcs10', - 'p12' => 'application/x-pkcs12', - 'p7b' => 'application/x-pkcs7-certificates', - 'p7c' => 'application/pkcs7-mime', - 'p7m' => 'application/pkcs7-mime', - 'p7r' => 'application/x-pkcs7-certreqresp', - 'p7s' => 'application/pkcs7-signature', - 'p8' => 'application/pkcs8', - 'pas' => 'text/x-pascal', - 'paw' => 'application/vnd.pawaafile', - 'pbd' => 'application/vnd.powerbuilder6', - 'pbm' => 'image/x-portable-bitmap', - 'pcap' => 'application/vnd.tcpdump.pcap', - 'pcf' => 'application/x-font-pcf', - 'pcl' => 'application/vnd.hp-pcl', - 'pclxl' => 'application/vnd.hp-pclxl', - 'pct' => 'image/x-pict', - 'pcurl' => 'application/vnd.curl.pcurl', - 'pcx' => 'image/x-pcx', - 'pdb' => 'application/vnd.palm', - 'pdf' => 'application/pdf', - 'pfa' => 'application/x-font-type1', - 'pfb' => 'application/x-font-type1', - 'pfm' => 'application/x-font-type1', - 'pfr' => 'application/font-tdpfr', - 'pfx' => 'application/x-pkcs12', - 'pgm' => 'image/x-portable-graymap', - 'pgn' => 'application/x-chess-pgn', - 'pgp' => 'application/pgp-encrypted', - 'pic' => 'image/x-pict', - 'pkg' => 'application/octet-stream', - 'pki' => 'application/pkixcmp', - 'pkipath' => 'application/pkix-pkipath', - 'plb' => 'application/vnd.3gpp.pic-bw-large', - 'plc' => 'application/vnd.mobius.plc', - 'plf' => 'application/vnd.pocketlearn', - 'pls' => 'application/pls+xml', - 'pml' => 'application/vnd.ctc-posml', - 'png' => 'image/png', - 'pnm' => 'image/x-portable-anymap', - 'portpkg' => 'application/vnd.macports.portpkg', - 'pot' => 'application/vnd.ms-powerpoint', - 'potm' => 'application/vnd.ms-powerpoint.template.macroenabled.12', - 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template', - 'ppam' => 'application/vnd.ms-powerpoint.addin.macroenabled.12', - 'ppd' => 'application/vnd.cups-ppd', - 'ppm' => 'image/x-portable-pixmap', - 'pps' => 'application/vnd.ms-powerpoint', - 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroenabled.12', - 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', - 'ppt' => 'application/vnd.ms-powerpoint', - 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroenabled.12', - 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', - 'pqa' => 'application/vnd.palm', - 'prc' => 'application/x-mobipocket-ebook', - 'pre' => 'application/vnd.lotus-freelance', - 'prf' => 'application/pics-rules', - 'ps' => 'application/postscript', - 'psb' => 'application/vnd.3gpp.pic-bw-small', - 'psd' => 'image/vnd.adobe.photoshop', - 'psf' => 'application/x-font-linux-psf', - 'pskcxml' => 'application/pskc+xml', - 'ptid' => 'application/vnd.pvi.ptid1', - 'pub' => 'application/x-mspublisher', - 'pvb' => 'application/vnd.3gpp.pic-bw-var', - 'pwn' => 'application/vnd.3m.post-it-notes', - 'pya' => 'audio/vnd.ms-playready.media.pya', - 'pyv' => 'video/vnd.ms-playready.media.pyv', - 'qam' => 'application/vnd.epson.quickanime', - 'qbo' => 'application/vnd.intu.qbo', - 'qfx' => 'application/vnd.intu.qfx', - 'qps' => 'application/vnd.publishare-delta-tree', - 'qt' => 'video/quicktime', - 'qwd' => 'application/vnd.quark.quarkxpress', - 'qwt' => 'application/vnd.quark.quarkxpress', - 'qxb' => 'application/vnd.quark.quarkxpress', - 'qxd' => 'application/vnd.quark.quarkxpress', - 'qxl' => 'application/vnd.quark.quarkxpress', - 'qxt' => 'application/vnd.quark.quarkxpress', - 'ra' => 'audio/x-pn-realaudio', - 'ram' => 'audio/x-pn-realaudio', - 'rar' => 'application/x-rar-compressed', - 'ras' => 'image/x-cmu-raster', - 'rcprofile' => 'application/vnd.ipunplugged.rcprofile', - 'rdf' => 'application/rdf+xml', - 'rdz' => 'application/vnd.data-vision.rdz', - 'rep' => 'application/vnd.businessobjects', - 'res' => 'application/x-dtbresource+xml', - 'rgb' => 'image/x-rgb', - 'rif' => 'application/reginfo+xml', - 'rip' => 'audio/vnd.rip', - 'ris' => 'application/x-research-info-systems', - 'rl' => 'application/resource-lists+xml', - 'rlc' => 'image/vnd.fujixerox.edmics-rlc', - 'rld' => 'application/resource-lists-diff+xml', - 'rm' => 'application/vnd.rn-realmedia', - 'rmi' => 'audio/midi', - 'rmp' => 'audio/x-pn-realaudio-plugin', - 'rms' => 'application/vnd.jcp.javame.midlet-rms', - 'rmvb' => 'application/vnd.rn-realmedia-vbr', - 'rnc' => 'application/relax-ng-compact-syntax', - 'roa' => 'application/rpki-roa', - 'roff' => 'text/troff', - 'rp9' => 'application/vnd.cloanto.rp9', - 'rpss' => 'application/vnd.nokia.radio-presets', - 'rpst' => 'application/vnd.nokia.radio-preset', - 'rq' => 'application/sparql-query', - 'rs' => 'application/rls-services+xml', - 'rsd' => 'application/rsd+xml', - 'rss' => 'application/rss+xml', - 'rtf' => 'application/rtf', - 'rtx' => 'text/richtext', - 's' => 'text/x-asm', - 's3m' => 'audio/s3m', - 'saf' => 'application/vnd.yamaha.smaf-audio', - 'sbml' => 'application/sbml+xml', - 'sc' => 'application/vnd.ibm.secure-container', - 'scd' => 'application/x-msschedule', - 'scm' => 'application/vnd.lotus-screencam', - 'scq' => 'application/scvp-cv-request', - 'scs' => 'application/scvp-cv-response', - 'scurl' => 'text/vnd.curl.scurl', - 'sda' => 'application/vnd.stardivision.draw', - 'sdc' => 'application/vnd.stardivision.calc', - 'sdd' => 'application/vnd.stardivision.impress', - 'sdkd' => 'application/vnd.solent.sdkm+xml', - 'sdkm' => 'application/vnd.solent.sdkm+xml', - 'sdp' => 'application/sdp', - 'sdw' => 'application/vnd.stardivision.writer', - 'see' => 'application/vnd.seemail', - 'seed' => 'application/vnd.fdsn.seed', - 'sema' => 'application/vnd.sema', - 'semd' => 'application/vnd.semd', - 'semf' => 'application/vnd.semf', - 'ser' => 'application/java-serialized-object', - 'setpay' => 'application/set-payment-initiation', - 'setreg' => 'application/set-registration-initiation', - 'sfd-hdstx' => 'application/vnd.hydrostatix.sof-data', - 'sfs' => 'application/vnd.spotfire.sfs', - 'sfv' => 'text/x-sfv', - 'sgi' => 'image/sgi', - 'sgl' => 'application/vnd.stardivision.writer-global', - 'sgm' => 'text/sgml', - 'sgml' => 'text/sgml', - 'sh' => 'application/x-sh', - 'shar' => 'application/x-shar', - 'shf' => 'application/shf+xml', - 'sid' => 'image/x-mrsid-image', - 'sig' => 'application/pgp-signature', - 'sil' => 'audio/silk', - 'silo' => 'model/mesh', - 'sis' => 'application/vnd.symbian.install', - 'sisx' => 'application/vnd.symbian.install', - 'sit' => 'application/x-stuffit', - 'sitx' => 'application/x-stuffitx', - 'skd' => 'application/vnd.koan', - 'skm' => 'application/vnd.koan', - 'skp' => 'application/vnd.koan', - 'skt' => 'application/vnd.koan', - 'sldm' => 'application/vnd.ms-powerpoint.slide.macroenabled.12', - 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide', - 'slt' => 'application/vnd.epson.salt', - 'sm' => 'application/vnd.stepmania.stepchart', - 'smf' => 'application/vnd.stardivision.math', - 'smi' => 'application/smil+xml', - 'smil' => 'application/smil+xml', - 'smv' => 'video/x-smv', - 'smzip' => 'application/vnd.stepmania.package', - 'snd' => 'audio/basic', - 'snf' => 'application/x-font-snf', - 'so' => 'application/octet-stream', - 'spc' => 'application/x-pkcs7-certificates', - 'spf' => 'application/vnd.yamaha.smaf-phrase', - 'spl' => 'application/x-futuresplash', - 'spot' => 'text/vnd.in3d.spot', - 'spp' => 'application/scvp-vp-response', - 'spq' => 'application/scvp-vp-request', - 'spx' => 'audio/ogg', - 'sql' => 'application/x-sql', - 'src' => 'application/x-wais-source', - 'srt' => 'application/x-subrip', - 'sru' => 'application/sru+xml', - 'srx' => 'application/sparql-results+xml', - 'ssdl' => 'application/ssdl+xml', - 'sse' => 'application/vnd.kodak-descriptor', - 'ssf' => 'application/vnd.epson.ssf', - 'ssml' => 'application/ssml+xml', - 'st' => 'application/vnd.sailingtracker.track', - 'stc' => 'application/vnd.sun.xml.calc.template', - 'std' => 'application/vnd.sun.xml.draw.template', - 'stf' => 'application/vnd.wt.stf', - 'sti' => 'application/vnd.sun.xml.impress.template', - 'stk' => 'application/hyperstudio', - 'stl' => 'application/vnd.ms-pki.stl', - 'str' => 'application/vnd.pg.format', - 'stw' => 'application/vnd.sun.xml.writer.template', - 'sub' => 'text/vnd.dvb.subtitle', - 'sus' => 'application/vnd.sus-calendar', - 'susp' => 'application/vnd.sus-calendar', - 'sv4cpio' => 'application/x-sv4cpio', - 'sv4crc' => 'application/x-sv4crc', - 'svc' => 'application/vnd.dvb.service', - 'svd' => 'application/vnd.svd', - 'svg' => 'image/svg+xml', - 'svgz' => 'image/svg+xml', - 'swa' => 'application/x-director', - 'swf' => 'application/x-shockwave-flash', - 'swi' => 'application/vnd.aristanetworks.swi', - 'sxc' => 'application/vnd.sun.xml.calc', - 'sxd' => 'application/vnd.sun.xml.draw', - 'sxg' => 'application/vnd.sun.xml.writer.global', - 'sxi' => 'application/vnd.sun.xml.impress', - 'sxm' => 'application/vnd.sun.xml.math', - 'sxw' => 'application/vnd.sun.xml.writer', - 't' => 'text/troff', - 't3' => 'application/x-t3vm-image', - 'taglet' => 'application/vnd.mynfc', - 'tao' => 'application/vnd.tao.intent-module-archive', - 'tar' => 'application/x-tar', - 'tcap' => 'application/vnd.3gpp2.tcap', - 'tcl' => 'application/x-tcl', - 'teacher' => 'application/vnd.smart.teacher', - 'tei' => 'application/tei+xml', - 'teicorpus' => 'application/tei+xml', - 'tex' => 'application/x-tex', - 'texi' => 'application/x-texinfo', - 'texinfo' => 'application/x-texinfo', - 'text' => 'text/plain', - 'tfi' => 'application/thraud+xml', - 'tfm' => 'application/x-tex-tfm', - 'tga' => 'image/x-tga', - 'thmx' => 'application/vnd.ms-officetheme', - 'tif' => 'image/tiff', - 'tiff' => 'image/tiff', - 'tmo' => 'application/vnd.tmobile-livetv', - 'torrent' => 'application/x-bittorrent', - 'tpl' => 'application/vnd.groove-tool-template', - 'tpt' => 'application/vnd.trid.tpt', - 'tr' => 'text/troff', - 'tra' => 'application/vnd.trueapp', - 'trm' => 'application/x-msterminal', - 'tsd' => 'application/timestamped-data', - 'tsv' => 'text/tab-separated-values', - 'ttc' => 'font/collection', - 'ttf' => 'font/ttf', - 'ttl' => 'text/turtle', - 'twd' => 'application/vnd.simtech-mindmapper', - 'twds' => 'application/vnd.simtech-mindmapper', - 'txd' => 'application/vnd.genomatix.tuxedo', - 'txf' => 'application/vnd.mobius.txf', - 'txt' => 'text/plain', - 'u32' => 'application/x-authorware-bin', - 'udeb' => 'application/x-debian-package', - 'ufd' => 'application/vnd.ufdl', - 'ufdl' => 'application/vnd.ufdl', - 'ulx' => 'application/x-glulx', - 'umj' => 'application/vnd.umajin', - 'unityweb' => 'application/vnd.unity', - 'uoml' => 'application/vnd.uoml+xml', - 'uri' => 'text/uri-list', - 'uris' => 'text/uri-list', - 'urls' => 'text/uri-list', - 'ustar' => 'application/x-ustar', - 'utz' => 'application/vnd.uiq.theme', - 'uu' => 'text/x-uuencode', - 'uva' => 'audio/vnd.dece.audio', - 'uvd' => 'application/vnd.dece.data', - 'uvf' => 'application/vnd.dece.data', - 'uvg' => 'image/vnd.dece.graphic', - 'uvh' => 'video/vnd.dece.hd', - 'uvi' => 'image/vnd.dece.graphic', - 'uvm' => 'video/vnd.dece.mobile', - 'uvp' => 'video/vnd.dece.pd', - 'uvs' => 'video/vnd.dece.sd', - 'uvt' => 'application/vnd.dece.ttml+xml', - 'uvu' => 'video/vnd.uvvu.mp4', - 'uvv' => 'video/vnd.dece.video', - 'uvva' => 'audio/vnd.dece.audio', - 'uvvd' => 'application/vnd.dece.data', - 'uvvf' => 'application/vnd.dece.data', - 'uvvg' => 'image/vnd.dece.graphic', - 'uvvh' => 'video/vnd.dece.hd', - 'uvvi' => 'image/vnd.dece.graphic', - 'uvvm' => 'video/vnd.dece.mobile', - 'uvvp' => 'video/vnd.dece.pd', - 'uvvs' => 'video/vnd.dece.sd', - 'uvvt' => 'application/vnd.dece.ttml+xml', - 'uvvu' => 'video/vnd.uvvu.mp4', - 'uvvv' => 'video/vnd.dece.video', - 'uvvx' => 'application/vnd.dece.unspecified', - 'uvvz' => 'application/vnd.dece.zip', - 'uvx' => 'application/vnd.dece.unspecified', - 'uvz' => 'application/vnd.dece.zip', - 'vcard' => 'text/vcard', - 'vcd' => 'application/x-cdlink', - 'vcf' => 'text/x-vcard', - 'vcg' => 'application/vnd.groove-vcard', - 'vcs' => 'text/x-vcalendar', - 'vcx' => 'application/vnd.vcx', - 'vis' => 'application/vnd.visionary', - 'viv' => 'video/vnd.vivo', - 'vob' => 'video/x-ms-vob', - 'vor' => 'application/vnd.stardivision.writer', - 'vox' => 'application/x-authorware-bin', - 'vrml' => 'model/vrml', - 'vsd' => 'application/vnd.visio', - 'vsf' => 'application/vnd.vsf', - 'vss' => 'application/vnd.visio', - 'vst' => 'application/vnd.visio', - 'vsw' => 'application/vnd.visio', - 'vtu' => 'model/vnd.vtu', - 'vxml' => 'application/voicexml+xml', - 'w3d' => 'application/x-director', - 'wad' => 'application/x-doom', - 'wav' => 'audio/x-wav', - 'wax' => 'audio/x-ms-wax', - 'wbmp' => 'image/vnd.wap.wbmp', - 'wbs' => 'application/vnd.criticaltools.wbs+xml', - 'wbxml' => 'application/vnd.wap.wbxml', - 'wcm' => 'application/vnd.ms-works', - 'wdb' => 'application/vnd.ms-works', - 'wdp' => 'image/vnd.ms-photo', - 'weba' => 'audio/webm', - 'webm' => 'video/webm', - 'webp' => 'image/webp', - 'wg' => 'application/vnd.pmi.widget', - 'wgt' => 'application/widget', - 'wks' => 'application/vnd.ms-works', - 'wm' => 'video/x-ms-wm', - 'wma' => 'audio/x-ms-wma', - 'wmd' => 'application/x-ms-wmd', - 'wmf' => 'application/x-msmetafile', - 'wml' => 'text/vnd.wap.wml', - 'wmlc' => 'application/vnd.wap.wmlc', - 'wmls' => 'text/vnd.wap.wmlscript', - 'wmlsc' => 'application/vnd.wap.wmlscriptc', - 'wmv' => 'video/x-ms-wmv', - 'wmx' => 'video/x-ms-wmx', - 'wmz' => 'application/x-msmetafile', - 'woff' => 'font/woff', - 'woff2' => 'font/woff2', - 'wpd' => 'application/vnd.wordperfect', - 'wpl' => 'application/vnd.ms-wpl', - 'wps' => 'application/vnd.ms-works', - 'wqd' => 'application/vnd.wqd', - 'wri' => 'application/x-mswrite', - 'wrl' => 'model/vrml', - 'wsdl' => 'application/wsdl+xml', - 'wspolicy' => 'application/wspolicy+xml', - 'wtb' => 'application/vnd.webturbo', - 'wvx' => 'video/x-ms-wvx', - 'x32' => 'application/x-authorware-bin', - 'x3d' => 'model/x3d+xml', - 'x3db' => 'model/x3d+binary', - 'x3dbz' => 'model/x3d+binary', - 'x3dv' => 'model/x3d+vrml', - 'x3dvz' => 'model/x3d+vrml', - 'x3dz' => 'model/x3d+xml', - 'xaml' => 'application/xaml+xml', - 'xap' => 'application/x-silverlight-app', - 'xar' => 'application/vnd.xara', - 'xbap' => 'application/x-ms-xbap', - 'xbd' => 'application/vnd.fujixerox.docuworks.binder', - 'xbm' => 'image/x-xbitmap', - 'xdf' => 'application/xcap-diff+xml', - 'xdm' => 'application/vnd.syncml.dm+xml', - 'xdp' => 'application/vnd.adobe.xdp+xml', - 'xdssc' => 'application/dssc+xml', - 'xdw' => 'application/vnd.fujixerox.docuworks', - 'xenc' => 'application/xenc+xml', - 'xer' => 'application/patch-ops-error+xml', - 'xfdf' => 'application/vnd.adobe.xfdf', - 'xfdl' => 'application/vnd.xfdl', - 'xht' => 'application/xhtml+xml', - 'xhtml' => 'application/xhtml+xml', - 'xhvml' => 'application/xv+xml', - 'xif' => 'image/vnd.xiff', - 'xla' => 'application/vnd.ms-excel', - 'xlam' => 'application/vnd.ms-excel.addin.macroenabled.12', - 'xlc' => 'application/vnd.ms-excel', - 'xlf' => 'application/x-xliff+xml', - 'xlm' => 'application/vnd.ms-excel', - 'xls' => 'application/vnd.ms-excel', - 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroenabled.12', - 'xlsm' => 'application/vnd.ms-excel.sheet.macroenabled.12', - 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - 'xlt' => 'application/vnd.ms-excel', - 'xltm' => 'application/vnd.ms-excel.template.macroenabled.12', - 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', - 'xlw' => 'application/vnd.ms-excel', - 'xm' => 'audio/xm', - 'xml' => 'application/xml', - 'xo' => 'application/vnd.olpc-sugar', - 'xop' => 'application/xop+xml', - 'xpi' => 'application/x-xpinstall', - 'xpl' => 'application/xproc+xml', - 'xpm' => 'image/x-xpixmap', - 'xpr' => 'application/vnd.is-xpr', - 'xps' => 'application/vnd.ms-xpsdocument', - 'xpw' => 'application/vnd.intercon.formnet', - 'xpx' => 'application/vnd.intercon.formnet', - 'xsl' => 'application/xml', - 'xslt' => 'application/xslt+xml', - 'xsm' => 'application/vnd.syncml+xml', - 'xspf' => 'application/xspf+xml', - 'xul' => 'application/vnd.mozilla.xul+xml', - 'xvm' => 'application/xv+xml', - 'xvml' => 'application/xv+xml', - 'xwd' => 'image/x-xwindowdump', - 'xyz' => 'chemical/x-xyz', - 'xz' => 'application/x-xz', - 'yang' => 'application/yang', - 'yin' => 'application/yin+xml', - 'z1' => 'application/x-zmachine', - 'z2' => 'application/x-zmachine', - 'z3' => 'application/x-zmachine', - 'z4' => 'application/x-zmachine', - 'z5' => 'application/x-zmachine', - 'z6' => 'application/x-zmachine', - 'z7' => 'application/x-zmachine', - 'z8' => 'application/x-zmachine', - 'zaz' => 'application/vnd.zzazz.deck+xml', - 'zip' => 'application/zip', - 'zir' => 'application/vnd.zul', - 'zirz' => 'application/vnd.zul', - 'zmm' => 'application/vnd.handheld-entertainment+xml', - ]; - - if (PHP_VERSION_ID >= 80100) { - $coreMimeTypes = array_replace($coreMimeTypes, array('xz' => 'application/octet-stream')); - } - - $this->assertSame($coreMimeTypes, - require __DIR__ . '/../../../framework/helpers/mimeTypes.php' - ); - } -} diff --git a/tests/framework/helpers/StringHelperTest.php b/tests/framework/helpers/StringHelperTest.php index 56acdb0c268..94efbf67137 100644 --- a/tests/framework/helpers/StringHelperTest.php +++ b/tests/framework/helpers/StringHelperTest.php @@ -474,4 +474,66 @@ public function dataProviderDirname() ['', ''], ]; } + + public function testMask() + { + // Standard masking + $this->assertSame('12******90', StringHelper::mask('1234567890', 2, 6)); + $this->assertSame('a********j', StringHelper::mask('abcdefghij', 1, 8)); + $this->assertSame('*************', StringHelper::mask('Hello, World!', 0, 13)); + $this->assertSame('************!', StringHelper::mask('Hello, World!', 0, 12)); + $this->assertSame('Hello, *orld!', StringHelper::mask('Hello, World!', 7, 1)); + $this->assertSame('Saleh Hashemi', StringHelper::mask('Saleh Hashemi', 0, 0)); + + // Different Mask Character + $this->assertSame('12######90', StringHelper::mask('1234567890', 2, 6, '#')); + + // Positions outside the string + $this->assertSame('1234567890', StringHelper::mask('1234567890', 20, 6)); + $this->assertSame('1234567890', StringHelper::mask('1234567890', -20, 6)); + + // Negative values for start + $this->assertSame('1234****90', StringHelper::mask('1234567890', -6, 4)); + + // type-related edge case + $this->assertSame('1234****90', StringHelper::mask(1234567890, -6, 4)); + + // Multibyte characters + $this->assertSame('你**', StringHelper::mask('你好吗', 1, 2)); + $this->assertSame('你好吗', StringHelper::mask('你好吗', 4, 2)); + + // Special characters + $this->assertSame('em**l@email.com', StringHelper::mask('email@email.com', 2, 2)); + $this->assertSame('******email.com', StringHelper::mask('email@email.com', 0, 6)); + } + + /** + * @param string $string + * @param string $start + * @param string $end + * @param string $expectedResult + * @dataProvider dataProviderFindBetween + */ + public function testFindBetween($string, $start, $end, $expectedResult) + { + $this->assertSame($expectedResult, StringHelper::findBetween($string, $start, $end)); + } + + public function dataProviderFindBetween() + { + return [ + ['hello world hello', ' hello', ' world', null], // end before start + ['This is a sample string', ' is ', ' string', 'a sample'], // normal case + ['startendstart', 'start', 'end', ''], // end before start + ['startmiddleend', 'start', 'end', 'middle'], // normal case + ['startend', 'start', 'end', ''], // end immediately follows start + ['multiple start start end end', 'start ', ' end', 'start end'], // multiple starts and ends + ['', 'start', 'end', null], // empty string + ['no delimiters here', 'start', 'end', null], // no start and end + ['start only', 'start', 'end', null], // start found but no end + ['end only', 'start', 'end', null], // end found but no start + ['spécial !@#$%^&*()', 'spé', '&*()', 'cial !@#$%^'], // Special characters + ['من صالح هاشمی هستم', 'من ', ' هستم', 'صالح هاشمی'], // other languages + ]; + } } diff --git a/tests/framework/i18n/FormatterDateTest.php b/tests/framework/i18n/FormatterDateTest.php index 43fc1311cb9..ef488433572 100644 --- a/tests/framework/i18n/FormatterDateTest.php +++ b/tests/framework/i18n/FormatterDateTest.php @@ -143,23 +143,23 @@ public function testIntlAsTime() public function testAsTime() { $value = time(); - $this->assertSame(date('g:i:s A', $value), $this->formatter->asTime($value)); + $this->assertSameAnyWhitespace(date('g:i:s A', $value), $this->formatter->asTime($value)); $this->assertSame(date('h:i:s A', $value), $this->formatter->asTime($value, 'php:h:i:s A')); $value = new DateTime(); - $this->assertSame(date('g:i:s A', $value->getTimestamp()), $this->formatter->asTime($value)); + $this->assertSameAnyWhitespace(date('g:i:s A', $value->getTimestamp()), $this->formatter->asTime($value)); $this->assertSame(date('h:i:s A', $value->getTimestamp()), $this->formatter->asTime($value, 'php:h:i:s A')); if (version_compare(PHP_VERSION, '5.5.0', '>=')) { $value = new \DateTimeImmutable(); - $this->assertSame(date('g:i:s A', $value->getTimestamp()), $this->formatter->asTime($value)); + $this->assertSameAnyWhitespace(date('g:i:s A', $value->getTimestamp()), $this->formatter->asTime($value)); $this->assertSame(date('h:i:s A', $value->getTimestamp()), $this->formatter->asTime($value, 'php:h:i:s A')); } // empty input - $this->assertSame('12:00:00 AM', $this->formatter->asTime('')); - $this->assertSame('12:00:00 AM', $this->formatter->asTime(0)); - $this->assertSame('12:00:00 AM', $this->formatter->asTime(false)); + $this->assertSameAnyWhitespace('12:00:00 AM', $this->formatter->asTime('')); + $this->assertSameAnyWhitespace('12:00:00 AM', $this->formatter->asTime(0)); + $this->assertSameAnyWhitespace('12:00:00 AM', $this->formatter->asTime(false)); // null display $this->assertSame($this->formatter->nullDisplay, $this->formatter->asTime(null)); } @@ -178,23 +178,35 @@ public function testIntlAsDatetime() public function testAsDatetime() { $value = time(); - $this->assertRegExp(date('~M j, Y,? g:i:s A~', $value), $this->formatter->asDatetime($value)); + $this->assertRegExp( + $this->sanitizeWhitespaces(date('~M j, Y,? g:i:s A~', $value)), + $this->sanitizeWhitespaces($this->formatter->asDatetime($value)) + ); $this->assertSame(date('Y/m/d h:i:s A', $value), $this->formatter->asDatetime($value, 'php:Y/m/d h:i:s A')); $value = new DateTime(); - $this->assertRegExp(date('~M j, Y,? g:i:s A~', $value->getTimestamp()), $this->formatter->asDatetime($value)); + $this->assertRegExp( + $this->sanitizeWhitespaces(date('~M j, Y,? g:i:s A~', $value->getTimestamp())), + $this->sanitizeWhitespaces($this->formatter->asDatetime($value)) + ); $this->assertSame(date('Y/m/d h:i:s A', $value->getTimestamp()), $this->formatter->asDatetime($value, 'php:Y/m/d h:i:s A')); // empty time $value = new DateTime(); $date = $value->format('Y-m-d'); $value = new DateTime($date); - $this->assertRegExp(date('~M j, Y,? g:i:s A~', $value->getTimestamp()), $this->formatter->asDatetime($date)); + $this->assertRegExp( + $this->sanitizeWhitespaces(date('~M j, Y,? g:i:s A~', $value->getTimestamp())), + $this->sanitizeWhitespaces($this->formatter->asDatetime($date)) + ); $this->assertSame(date('Y/m/d h:i:s A', $value->getTimestamp()), $this->formatter->asDatetime($date, 'php:Y/m/d h:i:s A')); if (PHP_VERSION_ID >= 50500) { $value = new \DateTimeImmutable(); - $this->assertRegExp(date('~M j, Y,? g:i:s A~', $value->getTimestamp()), $this->formatter->asDatetime($value)); + $this->assertRegExp( + $this->sanitizeWhitespaces(date('~M j, Y,? g:i:s A~', $value->getTimestamp())), + $this->sanitizeWhitespaces($this->formatter->asDatetime($value)) + ); $this->assertSame(date('Y/m/d h:i:s A', $value->getTimestamp()), $this->formatter->asDatetime($value, 'php:Y/m/d h:i:s A')); } @@ -205,9 +217,18 @@ public function testAsDatetime() } // empty input - $this->assertRegExp('~Jan 1, 1970,? 12:00:00 AM~', $this->formatter->asDatetime('')); - $this->assertRegExp('~Jan 1, 1970,? 12:00:00 AM~', $this->formatter->asDatetime(0)); - $this->assertRegExp('~Jan 1, 1970,? 12:00:00 AM~', $this->formatter->asDatetime(false)); + $this->assertRegExp( + $this->sanitizeWhitespaces('~Jan 1, 1970,? 12:00:00 AM~'), + $this->sanitizeWhitespaces($this->formatter->asDatetime('')) + ); + $this->assertRegExp( + $this->sanitizeWhitespaces('~Jan 1, 1970,? 12:00:00 AM~'), + $this->sanitizeWhitespaces($this->formatter->asDatetime(0)) + ); + $this->assertRegExp( + $this->sanitizeWhitespaces('~Jan 1, 1970,? 12:00:00 AM~'), + $this->sanitizeWhitespaces($this->formatter->asDatetime(false)) + ); // null display $this->assertSame($this->formatter->nullDisplay, $this->formatter->asDatetime(null)); } diff --git a/tests/framework/log/FileTargetTest.php b/tests/framework/log/FileTargetTest.php index 217a94af0f0..4f6eaf4ae75 100644 --- a/tests/framework/log/FileTargetTest.php +++ b/tests/framework/log/FileTargetTest.php @@ -12,6 +12,7 @@ use yii\log\Dispatcher; use yii\log\FileTarget; use yii\log\Logger; +use yiiunit\framework\log\mocks\CustomLogger; use yiiunit\TestCase; /** @@ -110,4 +111,53 @@ public function testRotate() $this->assertFileNotExists($logFile . '.3'); $this->assertFileNotExists($logFile . '.4'); } + + public function testLogEmptyStrings() + { + $logFile = Yii::getAlias('@yiiunit/runtime/log/filetargettest.log'); + $this->clearLogFile($logFile); + + $logger = new CustomLogger(); + $logger->logFile = $logFile; + $logger->messages = array_fill(0, 1, 'xxx'); + $logger->export(); + + $test = file($logFile); + $this->assertEquals("xxx\n", $test[0]); + + $this->clearLogFile($logFile); + + $logger = new CustomLogger(); + $logger->logFile = $logFile; + $logger->messages = array_fill(0, 3, 'xxx'); + $logger->export(); + + $test = file($logFile); + $this->assertEquals("xxx\n", $test[0]); + $this->assertEquals("xxx\n", $test[1]); + $this->assertEquals("xxx\n", $test[2]); + + $this->clearLogFile($logFile); + + $logger->messages = array_fill(0, 1, 'yyy'); + $logger->export(); + + $this->assertFileNotExists($logFile); + + $logger->messages = array_fill(0, 10, ''); + $logger->export(); + + $this->assertFileNotExists($logFile); + + $logger->messages = array_fill(0, 10, null); + $logger->export(); + + $this->assertFileNotExists($logFile); + } + + private function clearLogFile($logFile) + { + FileHelper::removeDirectory(dirname($logFile)); + mkdir(dirname($logFile), 0777, true); + } } diff --git a/tests/framework/log/mocks/CustomLogger.php b/tests/framework/log/mocks/CustomLogger.php new file mode 100644 index 00000000000..5dae134b7ed --- /dev/null +++ b/tests/framework/log/mocks/CustomLogger.php @@ -0,0 +1,22 @@ +assertTrue($mutexOne->release($mutexName)); $this->assertTrue($mutexTwo->release($mutexName)); } + + /** + * @dataProvider mutexDataProvider() + * + * @param string $mutexName + */ + public function testThatMutexLocksWithKeyPrefixesExpressionCalculatedValue($mutexName) + { + $mutexOne = $this->createMutex(['keyPrefix' => new Expression('1+1')]); + $mutexTwo = $this->createMutex(['keyPrefix' => new Expression('1*2')]); + + $this->assertTrue($mutexOne->acquire($mutexName)); + $this->assertFalse($mutexTwo->acquire($mutexName)); + $this->assertTrue($mutexOne->release($mutexName)); + } + + public function testCreateMutex() + { + $mutex = $this->createMutex(['keyPrefix' => new Expression('1+1')]); + $this->assertInstanceOf(MysqlMutex::classname(), $mutex); + $this->assertInstanceOf(Expression::classname(), $mutex->keyPrefix); + $this->assertSame("1+1", $mutex->keyPrefix->expression); + } } diff --git a/tests/framework/rbac/DbManagerTestCase.php b/tests/framework/rbac/DbManagerTestCase.php index b2828871ba7..bb5debaddc8 100644 --- a/tests/framework/rbac/DbManagerTestCase.php +++ b/tests/framework/rbac/DbManagerTestCase.php @@ -7,7 +7,6 @@ namespace yiiunit\framework\rbac; -use app\models\User; use Yii; use yii\caching\ArrayCache; use yii\console\Application; @@ -214,6 +213,38 @@ public function testGetRolesByUserWithEmptyValue($userId, $searchUserId, $isVali } } + public function testGetCachedRolesByUserId() + { + $this->auth->removeAll(); + $this->auth->cache = new ArrayCache(); + + $admin = $this->auth->createRole('Admin'); + $this->auth->add($admin); + + $manager = $this->auth->createRole('Manager'); + $this->auth->add($manager); + + $adminUserRoles = $this->auth->getRolesByUser(1); + $this->assertArrayHasKey('myDefaultRole', $adminUserRoles); + $this->assertArrayNotHasKey('Admin', $adminUserRoles); + $this->auth->assign($admin, 1); + + $managerUserRoles = $this->auth->getRolesByUser(2); + $this->assertArrayHasKey('myDefaultRole', $managerUserRoles); + $this->assertArrayNotHasKey('Manager', $managerUserRoles); + $this->auth->assign($manager, 2); + + $adminUserRoles = $this->auth->getRolesByUser(1); + $this->assertArrayHasKey('myDefaultRole', $adminUserRoles); + $this->assertArrayHasKey('Admin', $adminUserRoles); + $this->assertEquals($admin->name, $adminUserRoles['Admin']->name); + + $managerUserRoles = $this->auth->getRolesByUser(2); + $this->assertArrayHasKey('myDefaultRole', $managerUserRoles); + $this->assertArrayHasKey('Manager', $managerUserRoles); + $this->assertEquals($manager->name, $managerUserRoles['Manager']->name); + } + /** * @dataProvider emptyValuesProvider * @param mixed $userId @@ -329,7 +360,7 @@ public function testCheckAccessCache() } $this->assertSingleQueryToAssignmentsTable($logTarget); - // verify cache is flushed on unassign (createPost is now false again) + // verify cache is flushed on revoke (createPost is now false again) $this->auth->revoke($this->auth->getRole('admin'), 'reader A'); foreach (['readPost' => true, 'createPost' => false] as $permission => $result) { $this->assertEquals($result, $this->auth->checkAccess('reader A', $permission), "Checking $permission"); @@ -358,8 +389,11 @@ public function testCheckAccessCache() private function assertSingleQueryToAssignmentsTable($logTarget) { - $this->assertCount(1, $logTarget->messages, 'Only one query should have been performed, but there are the following logs: ' . print_r($logTarget->messages, true)); - $this->assertContains('auth_assignment', $logTarget->messages[0][0], 'Log message should be a query to auth_assignment table'); + $messages = array_filter($logTarget->messages, function ($message) { + return strpos($message[0], 'auth_assignment') !== false; + }); + $this->assertCount(1, $messages, 'Only one query should have been performed, but there are the following logs: ' . print_r($logTarget->messages, true)); + $this->assertContains('auth_assignment', $messages[0][0], 'Log message should be a query to auth_assignment table'); $logTarget->messages = []; } } diff --git a/tests/framework/rest/IndexActionTest.php b/tests/framework/rest/IndexActionTest.php index ffbf6e98944..d6481aa10e2 100644 --- a/tests/framework/rest/IndexActionTest.php +++ b/tests/framework/rest/IndexActionTest.php @@ -174,7 +174,7 @@ public function dataProviderTestPrepareDataProviderWithPaginationAndSorting() ]), 11, // page size set as param in test 992, - ['created_at_2' => SORT_DESC], // test sort set as param in test is ignored + [], // sort param is set so no default sorting anymore ['created_at_2' => SORT_DESC] ], [ // Disable pagination and sort diff --git a/tests/framework/rest/SerializerTest.php b/tests/framework/rest/SerializerTest.php index 361aba38a91..217d7fbf7a9 100644 --- a/tests/framework/rest/SerializerTest.php +++ b/tests/framework/rest/SerializerTest.php @@ -10,6 +10,7 @@ use yii\base\Model; use yii\data\ArrayDataProvider; use yii\rest\Serializer; +use yii\web\Request; use yiiunit\TestCase; /** @@ -415,6 +416,32 @@ public function testSerializeDataProvider($dataProvider, $expectedResult, $saveK $this->assertEquals($expectedResult, $serializer->serialize($dataProvider)); } + /** + * @dataProvider dataProviderSerializeDataProvider + * + * @param \yii\data\DataProviderInterface $dataProvider + * @param array $expectedResult + * @param bool $saveKeys + */ + public function testHeadSerializeDataProvider($dataProvider, $expectedResult, $saveKeys = false) + { + $serializer = new Serializer(); + $serializer->preserveKeys = $saveKeys; + $serializer->collectionEnvelope = 'data'; + + $this->assertEquals($expectedResult, $serializer->serialize($dataProvider)['data']); + + $_SERVER['REQUEST_METHOD'] = 'HEAD'; + $request = new Request(); + $_POST[$request->methodParam] = 'HEAD'; + $serializer = new Serializer([ + 'request' => $request + ]); + $serializer->preserveKeys = $saveKeys; + $this->assertEmpty($serializer->serialize($dataProvider)); + unset($_POST[$request->methodParam], $_SERVER['REQUEST_METHOD']); + } + /** * @see https://github.com/yiisoft/yii2/issues/16334 */ diff --git a/tests/framework/validators/FileValidatorTest.php b/tests/framework/validators/FileValidatorTest.php index f6af4ec6816..157269e5d41 100644 --- a/tests/framework/validators/FileValidatorTest.php +++ b/tests/framework/validators/FileValidatorTest.php @@ -546,7 +546,8 @@ public function validMimeTypes() ['test.tar.xz', 'application/x-xz', 'tar.xz'], ]); - if (PHP_VERSION_ID >= 80100) { + # fix for bundled libmagic bug, see also https://github.com/yiisoft/yii2/issues/19925 + if ((PHP_VERSION_ID >= 80100 && PHP_VERSION_ID < 80122) || (PHP_VERSION_ID >= 80200 && PHP_VERSION_ID < 80209)) { $v81_zx = ['test.tar.xz', 'application/octet-stream', 'tar.xz']; array_pop($validMimeTypes); $validMimeTypes[] = $v81_zx; diff --git a/tests/framework/validators/NumberValidatorTest.php b/tests/framework/validators/NumberValidatorTest.php index 82f643f83d5..826eb9cf915 100644 --- a/tests/framework/validators/NumberValidatorTest.php +++ b/tests/framework/validators/NumberValidatorTest.php @@ -61,12 +61,15 @@ protected function setUp() public function testEnsureMessageOnInit() { $val = new NumberValidator(); - $this->assertInternalType('string', $val->message); - $this->assertTrue($val->max === null); + $this->assertSame('{attribute} must be a number.', $val->message); + $this->assertNull($val->max); + $this->assertNull($val->min); + $this->assertNull($val->tooSmall); + $this->assertNull($val->tooBig); $val = new NumberValidator(['min' => -1, 'max' => 20, 'integerOnly' => true]); - $this->assertInternalType('string', $val->message); - $this->assertInternalType('string', $val->tooSmall); - $this->assertInternalType('string', $val->tooBig); + $this->assertSame('{attribute} must be an integer.', $val->message); + $this->assertSame('{attribute} must be no less than {min}.', $val->tooSmall); + $this->assertSame('{attribute} must be no greater than {max}.', $val->tooBig); } public function testValidateValueSimple() @@ -77,39 +80,69 @@ public function testValidateValueSimple() $this->assertTrue($val->validate(-20)); $this->assertTrue($val->validate('20')); $this->assertTrue($val->validate(25.45)); - $this->assertFalse($val->validate(false)); - $this->assertFalse($val->validate(true)); + $this->assertFalse($val->validate(false, $error)); + $this->assertSame('the input value must be a number.', $error); + $this->assertFalse($val->validate(true, $error)); + $this->assertSame('the input value must be a number.', $error); + $this->assertFalse($val->validate('0x14', $error)); + $this->assertSame('the input value must be a number.', $error); + $this->assertTrue($val->validate(0x14)); + $this->assertTrue($val->validate('0123')); + $this->assertTrue($val->validate(0123)); + $this->assertFalse($val->validate('0b111', $error)); + $this->assertSame('the input value must be a number.', $error); + $this->assertTrue($val->validate(0b111)); $this->setPointDecimalLocale(); - $this->assertFalse($val->validate('25,45')); + $this->assertFalse($val->validate('25,45', $error)); + $this->assertSame('the input value must be a number.', $error); $this->setCommaDecimalLocale(); $this->assertTrue($val->validate('25,45')); $this->restoreLocale(); - $this->assertFalse($val->validate('12:45')); + $this->assertFalse($val->validate('12:45', $error)); + $this->assertSame('the input value must be a number.', $error); + $val = new NumberValidator(['integerOnly' => true]); $this->assertTrue($val->validate(20)); $this->assertTrue($val->validate(0)); - $this->assertFalse($val->validate(25.45)); + $this->assertFalse($val->validate(25.45, $error)); + $this->assertSame('the input value must be an integer.', $error); $this->assertTrue($val->validate('20')); - $this->assertFalse($val->validate('25,45')); + $this->assertFalse($val->validate('25,45', $error)); + $this->assertSame('the input value must be an integer.', $error); $this->assertTrue($val->validate('020')); + $this->assertFalse($val->validate('0x14', $error)); + $this->assertSame('the input value must be an integer.', $error); $this->assertTrue($val->validate(0x14)); - $this->assertFalse($val->validate('0x14')); // todo check this - $this->assertFalse($val->validate(false)); - $this->assertFalse($val->validate(true)); + $this->assertTrue($val->validate('0123')); + $this->assertTrue($val->validate(0123)); + $this->assertFalse($val->validate('0b111', $error)); + $this->assertSame('the input value must be an integer.', $error); + $this->assertTrue($val->validate(0b111)); + $this->assertFalse($val->validate(false, $error)); + $this->assertSame('the input value must be an integer.', $error); + $this->assertFalse($val->validate(true, $error)); + $this->assertSame('the input value must be an integer.', $error); } public function testValidateValueArraySimple() { $val = new NumberValidator(); - $this->assertFalse($val->validate([20])); - $this->assertFalse($val->validate([0])); - $this->assertFalse($val->validate([-20])); - $this->assertFalse($val->validate(['20'])); - $this->assertFalse($val->validate([25.45])); - $this->assertFalse($val->validate([false])); - $this->assertFalse($val->validate([true])); + $this->assertFalse($val->validate([20], $error)); + $this->assertSame('the input value must be a number.', $error); + $this->assertFalse($val->validate([0], $error)); + $this->assertSame('the input value must be a number.', $error); + $this->assertFalse($val->validate([-20], $error)); + $this->assertSame('the input value must be a number.', $error); + $this->assertFalse($val->validate(['20'], $error)); + $this->assertSame('the input value must be a number.', $error); + $this->assertFalse($val->validate([25.45], $error)); + $this->assertSame('the input value must be a number.', $error); + $this->assertFalse($val->validate([false], $error)); + $this->assertSame('the input value must be a number.', $error); + $this->assertFalse($val->validate([true], $error)); + $this->assertSame('the input value must be a number.', $error); $val = new NumberValidator(); $val->allowArray = true; @@ -118,28 +151,38 @@ public function testValidateValueArraySimple() $this->assertTrue($val->validate([-20])); $this->assertTrue($val->validate(['20'])); $this->assertTrue($val->validate([25.45])); - $this->assertFalse($val->validate([false])); - $this->assertFalse($val->validate([true])); + $this->assertFalse($val->validate([false], $error)); + $this->assertSame('the input value must be a number.', $error); + $this->assertFalse($val->validate([true], $error)); + $this->assertSame('the input value must be a number.', $error); $this->setPointDecimalLocale(); - $this->assertFalse($val->validate(['25,45'])); + $this->assertFalse($val->validate(['25,45'], $error)); + $this->assertSame('the input value must be a number.', $error); $this->setCommaDecimalLocale(); $this->assertTrue($val->validate(['25,45'])); $this->restoreLocale(); - $this->assertFalse($val->validate(['12:45'])); + $this->assertFalse($val->validate(['12:45'], $error)); + $this->assertSame('the input value must be a number.', $error); + $val = new NumberValidator(['integerOnly' => true]); $val->allowArray = true; $this->assertTrue($val->validate([20])); $this->assertTrue($val->validate([0])); - $this->assertFalse($val->validate([25.45])); + $this->assertFalse($val->validate([25.45], $error)); + $this->assertSame('the input value must be an integer.', $error); $this->assertTrue($val->validate(['20'])); - $this->assertFalse($val->validate(['25,45'])); + $this->assertFalse($val->validate(['25,45'], $error)); + $this->assertSame('the input value must be an integer.', $error); $this->assertTrue($val->validate(['020'])); $this->assertTrue($val->validate([0x14])); - $this->assertFalse($val->validate(['0x14'])); // todo check this - $this->assertFalse($val->validate([false])); - $this->assertFalse($val->validate([true])); + $this->assertFalse($val->validate(['0x14'], $error)); + $this->assertSame('the input value must be an integer.', $error); + $this->assertFalse($val->validate([false], $error)); + $this->assertSame('the input value must be an integer.', $error); + $this->assertFalse($val->validate([true], $error)); + $this->assertSame('the input value must be an integer.', $error); } public function testValidateValueAdvanced() @@ -148,18 +191,30 @@ public function testValidateValueAdvanced() $this->assertTrue($val->validate('-1.23')); // signed float $this->assertTrue($val->validate('-4.423e-12')); // signed float + exponent $this->assertTrue($val->validate('12E3')); // integer + exponent - $this->assertFalse($val->validate('e12')); // just exponent - $this->assertFalse($val->validate('-e3')); - $this->assertFalse($val->validate('-4.534-e-12')); // 'signed' exponent - $this->assertFalse($val->validate('12.23^4')); // expression instead of value + $this->assertFalse($val->validate('e12', $error)); // just exponent + $this->assertSame('the input value must be a number.', $error); + $this->assertFalse($val->validate('-e3', $error)); + $this->assertSame('the input value must be a number.', $error); + $this->assertFalse($val->validate('-4.534-e-12', $error)); // 'signed' exponent + $this->assertSame('the input value must be a number.', $error); + $this->assertFalse($val->validate('12.23^4', $error)); // expression instead of value + $this->assertSame('the input value must be a number.', $error); + $val = new NumberValidator(['integerOnly' => true]); - $this->assertFalse($val->validate('-1.23')); - $this->assertFalse($val->validate('-4.423e-12')); - $this->assertFalse($val->validate('12E3')); - $this->assertFalse($val->validate('e12')); - $this->assertFalse($val->validate('-e3')); - $this->assertFalse($val->validate('-4.534-e-12')); - $this->assertFalse($val->validate('12.23^4')); + $this->assertFalse($val->validate('-1.23', $error)); + $this->assertSame('the input value must be an integer.', $error); + $this->assertFalse($val->validate('-4.423e-12', $error)); + $this->assertSame('the input value must be an integer.', $error); + $this->assertFalse($val->validate('12E3', $error)); + $this->assertSame('the input value must be an integer.', $error); + $this->assertFalse($val->validate('e12', $error)); + $this->assertSame('the input value must be an integer.', $error); + $this->assertFalse($val->validate('-e3', $error)); + $this->assertSame('the input value must be an integer.', $error); + $this->assertFalse($val->validate('-4.534-e-12', $error)); + $this->assertSame('the input value must be an integer.', $error); + $this->assertFalse($val->validate('12.23^4', $error)); + $this->assertSame('the input value must be an integer.', $error); } public function testValidateValueWithLocaleWhereDecimalPointIsComma() @@ -180,28 +235,37 @@ public function testValidateValueMin() $val = new NumberValidator(['min' => 1]); $this->assertTrue($val->validate(1)); $this->assertFalse($val->validate(-1, $error)); - $this->assertContains('the input value must be no less than 1.', $error); - $this->assertFalse($val->validate('22e-12')); + $this->assertSame('the input value must be no less than 1.', $error); + $this->assertFalse($val->validate('22e-12', $error)); + $this->assertSame('the input value must be no less than 1.', $error); $this->assertTrue($val->validate(PHP_INT_MAX + 1)); - $val = new NumberValidator(['min' => 1], ['integerOnly' => true]); + + $val = new NumberValidator(['min' => 1, 'integerOnly' => true]); $this->assertTrue($val->validate(1)); - $this->assertFalse($val->validate(-1)); - $this->assertFalse($val->validate('22e-12')); - $this->assertTrue($val->validate(PHP_INT_MAX + 1)); + $this->assertFalse($val->validate(-1, $error)); + $this->assertSame('the input value must be no less than 1.', $error); + $this->assertFalse($val->validate('22e-12', $error)); + $this->assertSame('the input value must be an integer.', $error); + $this->assertFalse($val->validate(PHP_INT_MAX + 1, $error)); + $this->assertSame('the input value must be an integer.', $error); } public function testValidateValueMax() { $val = new NumberValidator(['max' => 1.25]); $this->assertTrue($val->validate(1)); - $this->assertFalse($val->validate(1.5)); + $this->assertFalse($val->validate(1.5, $error)); + $this->assertSame('the input value must be no greater than 1.25.', $error); $this->assertTrue($val->validate('22e-12')); $this->assertTrue($val->validate('125e-2')); $val = new NumberValidator(['max' => 1.25, 'integerOnly' => true]); $this->assertTrue($val->validate(1)); - $this->assertFalse($val->validate(1.5)); - $this->assertFalse($val->validate('22e-12')); - $this->assertFalse($val->validate('125e-2')); + $this->assertFalse($val->validate(1.5, $error)); + $this->assertSame('the input value must be an integer.', $error); + $this->assertFalse($val->validate('22e-12', $error)); + $this->assertSame('the input value must be an integer.', $error); + $this->assertFalse($val->validate('125e-2', $error)); + $this->assertSame('the input value must be an integer.', $error); } public function testValidateValueRange() @@ -209,13 +273,19 @@ public function testValidateValueRange() $val = new NumberValidator(['min' => -10, 'max' => 20]); $this->assertTrue($val->validate(0)); $this->assertTrue($val->validate(-10)); - $this->assertFalse($val->validate(-11)); - $this->assertFalse($val->validate(21)); + $this->assertFalse($val->validate(-11, $error)); + $this->assertSame('the input value must be no less than -10.', $error); + $this->assertFalse($val->validate(21, $error)); + $this->assertSame('the input value must be no greater than 20.', $error); + $val = new NumberValidator(['min' => -10, 'max' => 20, 'integerOnly' => true]); $this->assertTrue($val->validate(0)); - $this->assertFalse($val->validate(-11)); - $this->assertFalse($val->validate(22)); - $this->assertFalse($val->validate('20e-1')); + $this->assertFalse($val->validate(-11, $error)); + $this->assertSame('the input value must be no less than -10.', $error); + $this->assertFalse($val->validate(22, $error)); + $this->assertSame('the input value must be no greater than 20.', $error); + $this->assertFalse($val->validate('20e-1', $error)); + $this->assertSame('the input value must be an integer.', $error); } public function testValidateAttribute() @@ -228,6 +298,7 @@ public function testValidateAttribute() $model->attr_number = '43^32'; //expression $val->validateAttribute($model, 'attr_number'); $this->assertTrue($model->hasErrors('attr_number')); + $this->assertSame('attr_number must be a number.', $model->getFirstError('attr_number')); $val = new NumberValidator(['min' => 10]); $model = new FakedValidationModel(); $model->attr_number = 10; @@ -236,6 +307,7 @@ public function testValidateAttribute() $model->attr_number = 5; $val->validateAttribute($model, 'attr_number'); $this->assertTrue($model->hasErrors('attr_number')); + $this->assertSame('attr_number must be no less than 10.', $model->getFirstError('attr_number')); $val = new NumberValidator(['max' => 10]); $model = new FakedValidationModel(); $model->attr_number = 10; @@ -244,6 +316,7 @@ public function testValidateAttribute() $model->attr_number = 15; $val->validateAttribute($model, 'attr_number'); $this->assertTrue($model->hasErrors('attr_number')); + $this->assertSame('attr_number must be no greater than 10.', $model->getFirstError('attr_number')); $val = new NumberValidator(['max' => 10, 'integerOnly' => true]); $model = new FakedValidationModel(); $model->attr_number = 10; @@ -252,10 +325,12 @@ public function testValidateAttribute() $model->attr_number = 3.43; $val->validateAttribute($model, 'attr_number'); $this->assertTrue($model->hasErrors('attr_number')); + $this->assertSame('attr_number must be an integer.', $model->getFirstError('attr_number')); $val = new NumberValidator(['min' => 1]); $model = FakedValidationModel::createWithAttributes(['attr_num' => [1, 2, 3]]); $val->validateAttribute($model, 'attr_num'); $this->assertTrue($model->hasErrors('attr_num')); + $this->assertSame('attr_num must be a number.', $model->getFirstError('attr_num')); // @see https://github.com/yiisoft/yii2/issues/11672 $model = new FakedValidationModel(); @@ -275,6 +350,7 @@ public function testValidateAttributeArray() $model->attr_number = ['43^32']; //expression $val->validateAttribute($model, 'attr_number'); $this->assertTrue($model->hasErrors('attr_number')); + $this->assertSame('attr_number must be a number.', $model->getFirstError('attr_number')); $val = new NumberValidator(['min' => 10]); $val->allowArray = true; $model = new FakedValidationModel(); @@ -284,6 +360,7 @@ public function testValidateAttributeArray() $model->attr_number = [5]; $val->validateAttribute($model, 'attr_number'); $this->assertTrue($model->hasErrors('attr_number')); + $this->assertSame('attr_number must be no less than 10.', $model->getFirstError('attr_number')); $val = new NumberValidator(['max' => 10]); $val->allowArray = true; $model = new FakedValidationModel(); @@ -293,6 +370,7 @@ public function testValidateAttributeArray() $model->attr_number = [15]; $val->validateAttribute($model, 'attr_number'); $this->assertTrue($model->hasErrors('attr_number')); + $this->assertSame('attr_number must be no greater than 10.', $model->getFirstError('attr_number')); $val = new NumberValidator(['max' => 10, 'integerOnly' => true]); $val->allowArray = true; $model = new FakedValidationModel(); @@ -302,61 +380,73 @@ public function testValidateAttributeArray() $model->attr_number = [3.43]; $val->validateAttribute($model, 'attr_number'); $this->assertTrue($model->hasErrors('attr_number')); + $this->assertSame('attr_number must be an integer.', $model->getFirstError('attr_number')); $val = new NumberValidator(['min' => 1]); $val->allowArray = true; $model = FakedValidationModel::createWithAttributes(['attr_num' => [[1], [2], [3]]]); $val->validateAttribute($model, 'attr_num'); $this->assertTrue($model->hasErrors('attr_num')); + $this->assertSame('attr_num must be a number.', $model->getFirstError('attr_num')); // @see https://github.com/yiisoft/yii2/issues/11672 $model = new FakedValidationModel(); $model->attr_number = new \stdClass(); $val->validateAttribute($model, 'attr_number'); $this->assertTrue($model->hasErrors('attr_number')); - + $this->assertSame('attr_number must be a number.', $model->getFirstError('attr_number')); $val = new NumberValidator(); $model = new FakedValidationModel(); $model->attr_number = ['5.5e1']; $val->validateAttribute($model, 'attr_number'); $this->assertTrue($model->hasErrors('attr_number')); + $this->assertSame('attr_number must be a number.', $model->getFirstError('attr_number')); $model->attr_number = ['43^32']; //expression $val->validateAttribute($model, 'attr_number'); $this->assertTrue($model->hasErrors('attr_number')); + $this->assertSame('attr_number must be a number.', $model->getFirstError('attr_number')); $val = new NumberValidator(['min' => 10]); $model = new FakedValidationModel(); $model->attr_number = [10]; $val->validateAttribute($model, 'attr_number'); $this->assertTrue($model->hasErrors('attr_number')); + $this->assertSame('attr_number must be a number.', $model->getFirstError('attr_number')); $model->attr_number = [5]; $val->validateAttribute($model, 'attr_number'); $this->assertTrue($model->hasErrors('attr_number')); + $this->assertSame('attr_number must be a number.', $model->getFirstError('attr_number')); $val = new NumberValidator(['max' => 10]); $model = new FakedValidationModel(); $model->attr_number = [10]; $val->validateAttribute($model, 'attr_number'); $this->assertTrue($model->hasErrors('attr_number')); + $this->assertSame('attr_number must be a number.', $model->getFirstError('attr_number')); $model->attr_number = [15]; $val->validateAttribute($model, 'attr_number'); $this->assertTrue($model->hasErrors('attr_number')); + $this->assertSame('attr_number must be a number.', $model->getFirstError('attr_number')); $val = new NumberValidator(['max' => 10, 'integerOnly' => true]); $model = new FakedValidationModel(); $model->attr_number = [10]; $val->validateAttribute($model, 'attr_number'); $this->assertTrue($model->hasErrors('attr_number')); + $this->assertSame('attr_number must be an integer.', $model->getFirstError('attr_number')); $model->attr_number = [3.43]; $val->validateAttribute($model, 'attr_number'); $this->assertTrue($model->hasErrors('attr_number')); + $this->assertSame('attr_number must be an integer.', $model->getFirstError('attr_number')); $val = new NumberValidator(['min' => 1]); $model = FakedValidationModel::createWithAttributes(['attr_num' => [[1], [2], [3]]]); $val->validateAttribute($model, 'attr_num'); $this->assertTrue($model->hasErrors('attr_num')); + $this->assertSame('attr_num must be a number.', $model->getFirstError('attr_num')); // @see https://github.com/yiisoft/yii2/issues/11672 $model = new FakedValidationModel(); $model->attr_number = new \stdClass(); $val->validateAttribute($model, 'attr_number'); $this->assertTrue($model->hasErrors('attr_number')); + $this->assertSame('attr_number must be a number.', $model->getFirstError('attr_number')); } public function testValidateAttributeWithLocaleWhereDecimalPointIsComma() @@ -376,10 +466,22 @@ public function testValidateAttributeWithLocaleWhereDecimalPointIsComma() $this->restoreLocale(); } - public function testEnsureCustomMessageIsSetOnValidateAttribute() + public function testEnsureCustomMessageIsSetOnValidateAttributeGeneral() + { + $val = new NumberValidator(['message' => '{attribute} is not integer.']); + $model = new FakedValidationModel(); + $model->attr_number = 'as'; + $val->validateAttribute($model, 'attr_number'); + $this->assertTrue($model->hasErrors('attr_number')); + $this->assertCount(1, $model->getErrors('attr_number')); + $msgs = $model->getErrors('attr_number'); + $this->assertSame('attr_number is not integer.', $msgs[0]); + } + + public function testEnsureCustomMessageIsSetOnValidateAttributeMin() { $val = new NumberValidator([ - 'tooSmall' => '{attribute} is to small.', + 'tooSmall' => '{attribute} is too small.', 'min' => 5, ]); $model = new FakedValidationModel(); @@ -388,7 +490,22 @@ public function testEnsureCustomMessageIsSetOnValidateAttribute() $this->assertTrue($model->hasErrors('attr_number')); $this->assertCount(1, $model->getErrors('attr_number')); $msgs = $model->getErrors('attr_number'); - $this->assertSame('attr_number is to small.', $msgs[0]); + $this->assertSame('attr_number is too small.', $msgs[0]); + } + + public function testEnsureCustomMessageIsSetOnValidateAttributeMax() + { + $val = new NumberValidator([ + 'tooBig' => '{attribute} is too big.', + 'max' => 5, + ]); + $model = new FakedValidationModel(); + $model->attr_number = 6; + $val->validateAttribute($model, 'attr_number'); + $this->assertTrue($model->hasErrors('attr_number')); + $this->assertCount(1, $model->getErrors('attr_number')); + $msgs = $model->getErrors('attr_number'); + $this->assertSame('attr_number is too big.', $msgs[0]); } /** diff --git a/tests/framework/web/ControllerTest.php b/tests/framework/web/ControllerTest.php index 21680f08cc6..1ce51eeb298 100644 --- a/tests/framework/web/ControllerTest.php +++ b/tests/framework/web/ControllerTest.php @@ -10,7 +10,6 @@ use RuntimeException; use Yii; use yii\base\InlineAction; -use yii\web\HttpException; use yii\web\NotFoundHttpException; use yii\web\Response; use yii\web\ServerErrorHttpException; @@ -332,4 +331,34 @@ public function testRedirect() $this->assertEquals($this->controller->redirect(['//controller/index', 'id_1' => 3, 'id_2' => 4])->headers->get('location'), '/index.php?r=controller%2Findex&id_1=3&id_2=4'); $this->assertEquals($this->controller->redirect(['//controller/index', 'slug' => 'äöüß!"§$%&/()'])->headers->get('location'), '/index.php?r=controller%2Findex&slug=%C3%A4%C3%B6%C3%BC%C3%9F%21%22%C2%A7%24%25%26%2F%28%29'); } + + public function testUnionBindingActionParams() + { + if (PHP_VERSION_ID < 80000) { + $this->markTestSkipped('Can not be tested on PHP < 8.0'); + return; + } + + // Use the PHP80 controller for this test + $this->controller = new FakePhp80Controller('fake', new \yii\web\Application([ + 'id' => 'app', + 'basePath' => __DIR__, + 'components' => [ + 'request' => [ + 'cookieValidationKey' => 'wefJDF8sfdsfSDefwqdxj9oq', + 'scriptFile' => __DIR__ . '/index.php', + 'scriptUrl' => '/index.php', + ], + ], + ])); + + $this->mockWebApplication(['controller' => $this->controller]); + + $injectionAction = new InlineAction('injection', $this->controller, 'actionInjection'); + $params = ['arg' => 'test', 'second' => 1]; + + $args = $this->controller->bindActionParams($injectionAction, $params); + $this->assertSame('test', $args[0]); + $this->assertSame(1, $args[1]); + } } diff --git a/tests/framework/web/ErrorHandlerTest.php b/tests/framework/web/ErrorHandlerTest.php index 1634c572d4a..4ea8b15e6c8 100644 --- a/tests/framework/web/ErrorHandlerTest.php +++ b/tests/framework/web/ErrorHandlerTest.php @@ -42,6 +42,49 @@ public function testCorrectResponseCodeInErrorView() Exception: yii\web\NotFoundHttpException', $out); } + public function testFormatRaw() + { + Yii::$app->response->format = yii\web\Response::FORMAT_RAW; + + /** @var ErrorHandler $handler */ + $handler = Yii::$app->getErrorHandler(); + + ob_start(); // suppress response output + $this->invokeMethod($handler, 'renderException', [new \Exception('Test Exception')]); + $out = ob_get_clean(); + + $this->assertcontains('Test Exception', $out); + + $this->assertTrue(is_string(Yii::$app->response->data)); + $this->assertcontains("Exception 'Exception' with message 'Test Exception'", Yii::$app->response->data); + } + + public function testFormatXml() + { + Yii::$app->response->format = yii\web\Response::FORMAT_XML; + + /** @var ErrorHandler $handler */ + $handler = Yii::$app->getErrorHandler(); + + ob_start(); // suppress response output + $this->invokeMethod($handler, 'renderException', [new \Exception('Test Exception')]); + $out = ob_get_clean(); + + $this->assertcontains('Test Exception', $out); + + $outArray = Yii::$app->response->data; + + $this->assertTrue(is_array(Yii::$app->response->data)); + + $this->assertEquals('Exception', $outArray['name']); + $this->assertEquals('Test Exception', $outArray['message']); + $this->assertArrayHasKey('code', $outArray); + $this->assertEquals('Exception', $outArray['type']); + $this->assertContains('ErrorHandlerTest.php', $outArray['file']); + $this->assertArrayHasKey('stack-trace', $outArray); + $this->assertArrayHasKey('line', $outArray); + } + public function testClearAssetFilesInErrorView() { Yii::$app->getView()->registerJsFile('somefile.js'); diff --git a/tests/framework/web/FakePhp80Controller.php b/tests/framework/web/FakePhp80Controller.php new file mode 100644 index 00000000000..8f8fc20fe7b --- /dev/null +++ b/tests/framework/web/FakePhp80Controller.php @@ -0,0 +1,20 @@ + 'https://example.com/users/4', + 'name' => 'User 4', + 'title' => 'My Manager', + ]); + + $expected = [ + 'self' => [ + 'href' => 'https://example.com/users/1' + ], + 'manager' => [ + 'href' => 'https://example.com/users/4', + 'name' => 'User 4', + 'title' => 'My Manager', + ], + ]; + + $this->assertEquals($expected, Link::serialize([ + 'self' => 'https://example.com/users/1', + 'manager' => $managerLink, + ])); + } + + public function testSerializeNestedArrayWithLinkWillSerialize() + { + $linkData = [ + 'self' => new Link([ + 'href' => 'https://example.com/users/3', + 'name' => 'Daffy Duck', + ]), + 'fellows' => [ + [ + new Link([ + 'href' => 'https://example.com/users/4', + 'name' => 'Bugs Bunny', + ]), + ], + [ + new Link([ + 'href' => 'https://example.com/users/5', + 'name' => 'Lola Bunny', + ]), + ] + ] + ]; + + $expected = [ + 'self' => [ + 'href' => 'https://example.com/users/3', + 'name' => 'Daffy Duck', + ], + 'fellows' => [ + [ + [ + 'href' => 'https://example.com/users/4', + 'name' => 'Bugs Bunny', + ] + ], + [ + [ + 'href' => 'https://example.com/users/5', + 'name' => 'Lola Bunny', + ] + ] + ], + ]; + + $this->assertEquals($expected, Link::serialize($linkData)); + } +} diff --git a/tests/framework/web/ResponseTest.php b/tests/framework/web/ResponseTest.php index 12ee7ef2d4e..2c49964fbcd 100644 --- a/tests/framework/web/ResponseTest.php +++ b/tests/framework/web/ResponseTest.php @@ -171,6 +171,16 @@ public function testRedirect() ); } + /** + * @see https://github.com/yiisoft/yii2/issues/19795 + */ + public function testRedirectNewLine() + { + $this->expectException('yii\base\InvalidRouteException'); + + $this->response->redirect(urldecode('http://test-domain.com/gql.json;%0aa.html')); + } + /** * @dataProvider dataProviderAjaxRedirectInternetExplorer11 */ @@ -370,21 +380,116 @@ public function testSendFileWithInvalidCharactersInFileName() ); } - public function testSameSiteCookie() + /** + * @dataProvider cookiesTestProvider + */ + public function testCookies($cookieConfig, $expected) { $response = new Response(); - $response->cookies->add(new Cookie([ - 'name' => 'test', - 'value' => 'testValue', - 'sameSite' => Cookie::SAME_SITE_STRICT, - ])); + $response->cookies->add(new Cookie(array_merge( + [ + 'name' => 'test', + 'value' => 'testValue', + ], + $cookieConfig + ))); ob_start(); $response->send(); $content = ob_get_clean(); - // Only way to test is that it doesn't create any errors - $this->assertEquals('', $content); + $cookies = $this->parseHeaderCookies(); + if ($cookies === false) { + // Unable to resolve cookies, only way to test is that it doesn't create any errors + $this->assertEquals('', $content); + } else { + $testCookie = $cookies['test']; + $actual = array_intersect_key($testCookie, $expected); + ksort($actual); + ksort($expected); + $this->assertEquals($expected, $actual); + } + } + + public function cookiesTestProvider() + { + $expireInt = time() + 3600; + $expireString = date('D, d-M-Y H:i:s', $expireInt) . ' GMT'; + + $testCases = [ + 'same-site' => [ + ['sameSite' => Cookie::SAME_SITE_STRICT], + ['samesite' => Cookie::SAME_SITE_STRICT], + ], + 'expire-as-int' => [ + ['expire' => $expireInt], + ['expires' => $expireString], + ], + 'expire-as-string' => [ + ['expire' => $expireString], + ['expires' => $expireString], + ], + ]; + + if (version_compare(PHP_VERSION, '5.5.0', '>=')) { + $testCases = array_merge($testCases, [ + 'expire-as-date_time' => [ + ['expire' => new \DateTime('@' . $expireInt)], + ['expires' => $expireString], + ], + 'expire-as-date_time_immutable' => [ + ['expire' => new \DateTimeImmutable('@' . $expireInt)], + ['expires' => $expireString], + ], + ]); + } + + return $testCases; + } + + /** + * Tries to parse cookies set in the response headers. + * When running PHP on the CLI headers are not available (the `headers_list()` function always returns an + * empty array). If possible use xDebug: http://xdebug.org/docs/all_functions#xdebug_get_headers + * @param $name + * @return array|false + */ + protected function parseHeaderCookies() { + + if (!function_exists('xdebug_get_headers')) { + return false; + } + + $cookies = []; + foreach(xdebug_get_headers() as $header) { + if (strpos($header, 'Set-Cookie: ') !== 0) { + continue; + } + + $name = null; + $params = []; + $pairs = explode(';', substr($header, 12)); + foreach ($pairs as $index => $pair) { + $pair = trim($pair); + if (strpos($pair, '=') === false) { + $params[strtolower($pair)] = true; + } else { + list($paramName, $paramValue) = explode('=', $pair, 2); + if ($index === 0) { + $name = $paramName; + $params['value'] = urldecode($paramValue); + } else { + $params[strtolower($paramName)] = urldecode($paramValue); + } + } + } + if ($name === null) { + throw new \Exception('Could not determine cookie name for header "' . $header . '".'); + } + $cookies[$name] = $params; + } + + return $cookies; } /** diff --git a/tests/framework/widgets/LinkSorterTest.php b/tests/framework/widgets/LinkSorterTest.php index 13d4311da73..49da1fce71e 100644 --- a/tests/framework/widgets/LinkSorterTest.php +++ b/tests/framework/widgets/LinkSorterTest.php @@ -8,7 +8,6 @@ namespace yiiunit\framework\widgets; use yii\data\ActiveDataProvider; -use yii\widgets\Breadcrumbs; use yii\widgets\LinkSorter; use yii\widgets\ListView; use yiiunit\data\ar\ActiveRecord; @@ -28,7 +27,6 @@ protected function setUp() parent::setUp(); ActiveRecord::$db = $this->getConnection(); $this->mockWebApplication(); - $this->breadcrumbs = new Breadcrumbs(); } public function testLabelsSimple() diff --git a/tests/framework/widgets/MenuTest.php b/tests/framework/widgets/MenuTest.php index 192bb44131f..3de5f5efd83 100644 --- a/tests/framework/widgets/MenuTest.php +++ b/tests/framework/widgets/MenuTest.php @@ -18,7 +18,14 @@ class MenuTest extends \yiiunit\TestCase protected function setUp() { parent::setUp(); - $this->mockApplication(); + $this->mockWebApplication([ + 'components'=>[ + 'urlManager' => [ + 'enablePrettyUrl' => true, + 'showScriptName' => false, + ], + ], + ]); } public function testEncodeLabel() @@ -201,6 +208,149 @@ public function testActiveItemClosure() $this->assertEqualsWithoutLE($expected, $output); } + public function testActiveItemClosureWithLogic() + { + $output = Menu::widget([ + 'route' => 'test/logic', + 'params' => [], + 'linkTemplate' => '', + 'labelTemplate' => '', + 'items' => [ + [ + 'label' => 'logic item', + 'url' => 'test/logic', + 'template' => 'label: {label}; url: {url}', + 'active' => function ($item, $hasActiveChild, $isItemActive, $widget) { + return $widget->route === 'test/logic'; + }, + ], + [ + 'label' => 'another item', + 'url' => 'test/another', + 'template' => 'label: {label}; url: {url}', + ] + ], + ]); + + $expected = <<<'HTML' +
      • label: logic item; url: test/logic
      • +
      • label: another item; url: test/another
      +HTML; + + $this->assertEqualsWithoutLE($expected, $output); + } + + public function testActiveItemClosureWithLogicParent() + { + $output = Menu::widget([ + 'route' => 'test/logic', + 'params' => [], + 'linkTemplate' => '', + 'labelTemplate' => '', + 'activateParents' => true, + 'items' => [ + [ + 'label' => 'Home', + 'url' => 'test/home', + 'template' => 'label: {label}; url: {url}', + ], + [ + 'label' => 'About', + 'url' => 'test/about', + 'template' => 'label: {label}; url: {url}', + ], + [ + 'label' => 'Parent', + 'items' => [ + [ + 'label' => 'logic item', + 'url' => 'test/logic', + 'template' => 'label: {label}; url: {url}', + 'active' => function ($item, $hasActiveChild, $isItemActive, $widget) { + return $widget->route === 'test/logic'; + }, + ], + [ + 'label' => 'another item', + 'url' => 'test/another', + 'template' => 'label: {label}; url: {url}', + ] + ], + ], + ], + ]); + + $expected = <<<'HTML' +
      • label: Home; url: test/home
      • +
      • label: About; url: test/about
      • +
      • +
          +
        • label: logic item; url: test/logic
        • +
        • label: another item; url: test/another
        • +
        +
      +HTML; + + $this->assertEqualsWithoutLE($expected, $output); + } + + public function testActiveItemClosureParentAnotherItem() + { + /** @see https://github.com/yiisoft/yii2/issues/19060 */ + $output = Menu::widget([ + 'route' => 'test/another', + 'params' => [], + 'linkTemplate' => '', + 'labelTemplate' => '', + 'activateParents' => true, + 'items' => [ + [ + 'label' => 'Home', + 'url' => 'test/home', + 'template' => 'label: {label}; url: {url}', + ], + [ + 'label' => 'About', + 'url' => 'test/about', + 'template' => 'label: {label}; url: {url}', + ], + [ + 'label' => 'Parent', + 'items' => [ + [ + 'label' => 'another item', + // use non relative route to avoid error in BaseUrl::normalizeRoute (missing controller) + 'url' => ['/test/another'], + 'template' => 'label: {label}; url: {url}', + ], + [ + 'label' => 'logic item', + 'url' => 'test/logic', + 'template' => 'label: {label}; url: {url}', + 'active' => function ($item, $hasActiveChild, $isItemActive, $widget) { + return $widget->route === 'test/logic'; + }, + ], + + ], + ], + ], + ]); + + $expected = <<<'HTML' +
      • label: Home; url: test/home
      • +
      • label: About; url: test/about
      • +
      • +
          +
        • label: another item; url: /test/another
        • +
        • label: logic item; url: test/logic
        • +
        +
      +HTML; + + $this->assertEqualsWithoutLE($expected, $output); + } + public function testItemClassAsArray() { $output = Menu::widget([ @@ -302,8 +452,31 @@ public function testItemClassAsString() $this->assertEqualsWithoutLE($expected, $output); } - /*public function testIsItemActive() + public function testIsItemActive() { - // TODO: implement test of protected method isItemActive() - }*/ + $output = Menu::widget([ + 'route' => 'test/item2', + 'params' => [ + 'page'=>'5', + ], + 'items' => [ + [ + 'label' => 'item1', + 'url' => ['/test/item1'] + ], + [ + 'label' => 'item2', + // use non relative route to avoid error in BaseUrl::normalizeRoute (missing controller) + 'url' => ['/test/item2','page'=>'5'] + ], + + ], + ]); + + $expected = <<<'HTML' + +HTML; + $this->assertEqualsWithoutLE($expected, $output); + } } diff --git a/tests/js/data/yii.activeForm.html b/tests/js/data/yii.activeForm.html index d44c9f1282b..d278be5b8b8 100644 --- a/tests/js/data/yii.activeForm.html +++ b/tests/js/data/yii.activeForm.html @@ -48,3 +48,15 @@
      +
      +
      + + +
      +
      +
      + + +
      +
      +
      diff --git a/tests/js/tests/yii.activeForm.test.js b/tests/js/tests/yii.activeForm.test.js index 16671239ea3..f79599b0747 100644 --- a/tests/js/tests/yii.activeForm.test.js +++ b/tests/js/tests/yii.activeForm.test.js @@ -27,6 +27,21 @@ describe('yii.activeForm', function () { var script = new vm.Script(code); var context = new vm.createContext({window: window, document: window.document, yii: yii}); script.runInContext(context); + /** This is a workaround for a jsdom issue, that prevents :hidden and :visible from working as expected. + * @see https://github.com/jsdom/jsdom/issues/1048 */ + context.window.Element.prototype.getClientRects = function () { + var node = this; + while(node) { + if(node === document) { + break; + } + if (!node.style || node.style.display === 'none' || node.style.visibility === 'hidden') { + return []; + } + node = node.parentNode; + } + return [{width: 100, height: 100}]; + }; } var activeFormHtml = fs.readFileSync('tests/js/data/yii.activeForm.html', 'utf-8'); @@ -117,6 +132,60 @@ describe('yii.activeForm', function () { assert.isFalse($activeForm.data('yiiActiveForm').validated); }); }); + + describe('with ajax validation', function () { + describe('with rapid validation of multiple fields', function () { + it('should cancel overlapping ajax requests and not display outdated validation results', function () { + $activeForm = $('#w3'); + $activeForm.yiiActiveForm([{ + id: 'test-text2', + input: '#test-text2', + container: '.field-test-text2', + enableAjaxValidation: true + }, { + id: 'test-text3', + input: '#test-text3', + container: '.field-test-text3', + enableAjaxValidation: true + }], { + validationUrl: '' + }); + + let requests = []; + function fakeAjax(object) { + const request = { + jqXHR: { + abort: function () { + request.aborted = true; + } + }, + aborted: false, + respond: function (response) { + if (this.aborted) { + return; + } + object.success(response); + object.complete(this.jqXHR, ''); + } + }; + requests.push(request); + object.beforeSend(request.jqXHR, ''); + } + + const ajaxStub = sinon.stub($, 'ajax', fakeAjax); + $activeForm.yiiActiveForm('validateAttribute', 'test-text2'); + assert.isTrue(requests.length === 1); + $activeForm.yiiActiveForm('validateAttribute', 'test-text3'); + // When validateAttribute was called on text2, its value was valid. + // The value of text3 wasn't. + requests[0].respond({'test-text3': ['Field cannot be empty']}); + // When validateAttribute was called on text3, its value was valid. + requests[1].respond([]); + assert.isTrue($activeForm.find('.field-test-text3').hasClass('has-success')); + ajaxStub.restore(); + }); + }); + }) }); describe('resetForm method', function () { diff --git a/tests/js/tests/yii.gridView.test.js b/tests/js/tests/yii.gridView.test.js index bc1feb6ceee..85f5b56637e 100644 --- a/tests/js/tests/yii.gridView.test.js +++ b/tests/js/tests/yii.gridView.test.js @@ -658,8 +658,8 @@ describe('yii.gridView', function () { click($checkAllCheckbox); assert.lengthOf($checkRowCheckboxes.filter(':checked'), 3); assert.isTrue($checkAllCheckbox.prop('checked')); - // "change" should be called 3 times, 1 time per each row, no matter what state it has - assert.equal(changedSpy.callCount, 3); + // "change" should be called 2 more times for the remaining 2 unchecked rows + assert.equal(changedSpy.callCount, 2); // Uncheck first row changedSpy.reset(); @@ -711,12 +711,12 @@ describe('yii.gridView', function () { checkAll: 'selection_all' }); - // Check first row ("prop" should be called once) + // Click first row checkbox ("prop" on "check all" checkbox should not be called) click($gridView.find('input[name="selection[]"][value="1"]')); - // Check all rows ("prop" should be called 2 times, 1 time for each row) + // Click "check all" checkbox ("prop" should be called once on the remaining unchecked row) click($gridView.find('input[name="selection_all"]')); - assert.equal(jQueryPropStub.callCount, 3); + assert.equal(jQueryPropStub.callCount, 1); }); }); }); @@ -831,9 +831,9 @@ describe('yii.gridView', function () { click($gridView2.find('input[name="selection[]"][value="1"]')); assert.equal(jQueryPropStub.callCount, 0); - click($checkRowCheckboxes.filter('[value="1"]')); // Check first row ("prop" should be called once) - click($checkAllCheckbox); // Check all rows ("prop" should be called 3 times, 1 time for each row) - assert.equal(jQueryPropStub.callCount, 4); + click($checkRowCheckboxes.filter('[value="1"]')); // Click first row checkbox ("prop" on "check all" checkbox should not be called) + click($checkAllCheckbox); // Click "check all" checkbox ("prop" should be called 2 times on the remaining unchecked rows) + assert.equal(jQueryPropStub.callCount, 2); }); });