diff --git a/.eslintrc b/.eslintrc index 9faa37508e5..5d860d64da6 100644 --- a/.eslintrc +++ b/.eslintrc @@ -9,7 +9,7 @@ env: jquery: true node: true -# http://eslint.org/docs/rules/ +# https://eslint.org/docs/latest/rules/ rules: # Possible Errors comma-dangle: [2, never] 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/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 3813ff4fd60..bdf7df026de 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -3,5 +3,5 @@ Contributing to Yii 2 - [Report an issue](../docs/internals/report-an-issue.md) - [Translate documentation or messages](../docs/internals/translation-workflow.md) -- [Give us feedback or start a design discussion](http://www.yiiframework.com/forum/index.php/forum/42-general-discussions-for-yii-20/) +- [Give us feedback or start a design discussion](https://www.yiiframework.com/forum/index.php/forum/42-general-discussions-for-yii-20/) - [Contribute to the core code or fix bugs](../docs/internals/git-workflow.md) 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/.scrutinizer.yml b/.scrutinizer.yml index 35eb5cd4036..a30e8f62d95 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -35,7 +35,7 @@ build: services: db-mysql: - image: mysql:8.0 + image: mysql:5.7 # Define any additional environment variables that are needed by the service. env: 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/build b/build/build index 1d34560e505..9892daee039 100755 --- a/build/build +++ b/build/build @@ -3,9 +3,9 @@ /** * build script file. * - * @link http://www.yiiframework.com/ + * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC - * @license http://www.yiiframework.com/license/ + * @license https://www.yiiframework.com/license/ */ define('YII_DEBUG', true); diff --git a/build/build.bat b/build/build.bat index e659199de2e..67fc5fdbf91 100644 --- a/build/build.bat +++ b/build/build.bat @@ -6,9 +6,9 @@ rem rem This is the bootstrap script for running build on Windows. rem rem @author Qiang Xue -rem @link http://www.yiiframework.com/ +rem @link https://www.yiiframework.com/ rem @copyright 2008 Yii Software LLC -rem @license http://www.yiiframework.com/license/ +rem @license https://www.yiiframework.com/license/ rem @version $Id$ rem ------------------------------------------------------------- @@ -20,4 +20,4 @@ if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe %PHP_COMMAND% "%BUILD_PATH%build" %* -@endlocal \ No newline at end of file +@endlocal diff --git a/build/build.xml b/build/build.xml index 846e4cf969c..253d5632dcd 100644 --- a/build/build.xml +++ b/build/build.xml @@ -4,9 +4,9 @@ * Phing build file for Yii 2. * * @author Qiang Xue - * @link http://www.yiiframework.com/ + * @link https://www.yiiframework.com/ * @copyright 2008 Yii Software LLC - * @license http://www.yiiframework.com/license/ + * @license https://www.yiiframework.com/license/ */ --> @@ -241,7 +241,7 @@ Please update yiisite/common/data/versions.php file with the following code: package="${phing.project.name}" summary="Yii PHP Framework" pkgdescription="Yii PHP Framework: Best for Web 2.0 Development" - notes="http://www.yiiframework.com/files/CHANGELOG-${yii.release}.txt" + notes="https://www.yiiframework.com/files/CHANGELOG-${yii.release}.txt" license="BSD" /> diff --git a/build/controllers/ClassmapController.php b/build/controllers/ClassmapController.php index 7a4e3b243b7..978504a86f5 100644 --- a/build/controllers/ClassmapController.php +++ b/build/controllers/ClassmapController.php @@ -1,8 +1,8 @@ '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('http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/conf/mime.types?view=co')) { + 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"); @@ -990,7 +990,7 @@ protected function composerSetStability($what, $version) protected function updateYiiVersion($frameworkPath, $version) { $this->sed( - '/function getVersion\(\)\R \{\R return \'(.+?)\';/', + '/function getVersion\(\)\R {4}\{\R {8}return \'(.+?)\';/', "function getVersion()\n {\n return '$version';", $frameworkPath . '/BaseYii.php'); } diff --git a/build/controllers/TranslationController.php b/build/controllers/TranslationController.php index dd89ad24ea9..3ca61667620 100644 --- a/build/controllers/TranslationController.php +++ b/build/controllers/TranslationController.php @@ -1,8 +1,8 @@ unicodeOrd($char)); $hexcode = str_repeat('0', max(4 - \strlen($hexcode), 0)) . $hexcode; - $this->stdout(" at $line:$pos FOUND $what: 0x$hexcode '$char' http://unicode-table.com/en/$hexcode/\n"); + $this->stdout(" at $line:$pos FOUND $what: 0x$hexcode '$char' https://unicode-table.com/en/$hexcode/\n"); } /** * Equivalent for ord() just for unicode. * - * http://stackoverflow.com/a/10333324/1106908 + * https://stackoverflow.com/questions/10333098/utf-8-safe-equivalent-of-ord-or-charcodeat-in-php/10333324#10333324 * * @param $c * @return bool|int 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/contrib/completion/bash/yii b/contrib/completion/bash/yii index c5e78849e45..12e50f759f0 100644 --- a/contrib/completion/bash/yii +++ b/contrib/completion/bash/yii @@ -3,7 +3,7 @@ # See also: # - https://debian-administration.org/article/317/An_introduction_to_bash_completion_part_2 on how this works. # - https://www.gnu.org/software/bash/manual/html_node/Programmable-Completion.html -# - http://www.yiiframework.com/doc-2.0/guide-tutorial-console.html#bash-completion +# - https://www.yiiframework.com/doc-2.0/guide-tutorial-console.html#bash-completion # # Usage: # Temporarily you can source this file in you bash by typing: source yii diff --git a/cs/src/YiiConfig.php b/cs/src/YiiConfig.php index 95442861a4e..582ab283bf0 100644 --- a/cs/src/YiiConfig.php +++ b/cs/src/YiiConfig.php @@ -1,8 +1,8 @@ mergeRules([ diff --git a/docs/guide-ar/start-databases.md b/docs/guide-ar/start-databases.md index 883595e3d8d..d3e53b29008 100644 --- a/docs/guide-ar/start-databases.md +++ b/docs/guide-ar/start-databases.md @@ -254,7 +254,7 @@ use yii\widgets\LinkPager;

``` -http://hostname/index.php?r=country%2Findex +https://hostname/index.php?r=country%2Findex ``` ![Country List](../guide/images/start-country-list.png) @@ -266,7 +266,7 @@ http://hostname/index.php?r=country%2Findex

``` -http://hostname/index.php?r=country%2Findex&page=2 +https://hostname/index.php?r=country%2Findex&page=2 ```

diff --git a/docs/guide-ar/start-forms.md b/docs/guide-ar/start-forms.md index e607a1fcc5b..db97d4bf61c 100644 --- a/docs/guide-ar/start-forms.md +++ b/docs/guide-ar/start-forms.md @@ -191,7 +191,7 @@ use yii\widgets\ActiveForm;

``` -http://hostname/index.php?r=site%2Fentry +https://hostname/index.php?r=site%2Fentry ```

diff --git a/docs/guide-ar/start-gii.md b/docs/guide-ar/start-gii.md index 0dd7f11943b..074cbbe3a03 100644 --- a/docs/guide-ar/start-gii.md +++ b/docs/guide-ar/start-gii.md @@ -50,7 +50,7 @@ defined('YII_ENV') or define('YII_ENV', 'dev');

``` -http://hostname/index.php?r=gii +https://hostname/index.php?r=gii ```

@@ -127,7 +127,7 @@ http://hostname/index.php?r=gii

``` -http://hostname/index.php?r=country%2Findex +https://hostname/index.php?r=country%2Findex ```

diff --git a/docs/guide-ar/start-hello.md b/docs/guide-ar/start-hello.md index ddcb12f405c..28faccb0d5c 100644 --- a/docs/guide-ar/start-hello.md +++ b/docs/guide-ar/start-hello.md @@ -107,7 +107,7 @@ use yii\helpers\Html;

``` -http://hostname/index.php?r=site%2Fsay&message=Hello+World +https://hostname/index.php?r=site%2Fsay&message=Hello+World ``` ![Hello World](../guide/images/start-hello-world.png) diff --git a/docs/guide-ar/start-installation.md b/docs/guide-ar/start-installation.md index 187ee325fdb..600c0d8e94c 100644 --- a/docs/guide-ar/start-installation.md +++ b/docs/guide-ar/start-installation.md @@ -196,7 +196,7 @@ http://localhost:8080/

على ال production server، قد ترغب في إعداد خادم الويب الخاص بك بحيث يمكن الوصول إلى التطبيق -الخاص بك عبر ال URL التالي http://www.example.com/index.php بدلاً من http://www.example.com/basic/web/index.php. هذا الكلام يتطلب إنشاء إعداد يقوم بتوجيه ال document root الموجود على ال web server الى مجلد ال basic/web، كما قد ترغب أيضا بإخفاء ال index.php من ال URL كما هو موضح في ال Routing and URL Creation. في هذا الموضوع ستتعلم كيف يمكنك إعداد ال Apache أو ال Nginx server لتحقيق هذه الأهداف. +الخاص بك عبر ال URL التالي https://www.example.com/index.php بدلاً من https://www.example.com/basic/web/index.php. هذا الكلام يتطلب إنشاء إعداد يقوم بتوجيه ال document root الموجود على ال web server الى مجلد ال basic/web، كما قد ترغب أيضا بإخفاء ال index.php من ال URL كما هو موضح في ال Routing and URL Creation. في هذا الموضوع ستتعلم كيف يمكنك إعداد ال Apache أو ال Nginx server لتحقيق هذه الأهداف.

diff --git a/docs/guide-ar/start-workflow.md b/docs/guide-ar/start-workflow.md index 34d5ecf421d..edc6977d876 100644 --- a/docs/guide-ar/start-workflow.md +++ b/docs/guide-ar/start-workflow.md @@ -2,12 +2,12 @@

بعد تثبيت ال Yii، سيكون لديك تطبيق Yii جاهز للعمل عليه ويمكن الوصول إليه عبر -الرابط التالي: http://hostname/basic/web/index.php أو http://hostname/index.php إعتمادا على الإعدادات +الرابط التالي: https://hostname/basic/web/index.php أو https://hostname/index.php إعتمادا على الإعدادات الخاصة بك (إعدادت ال web server). في هذا الجزء سنستعرض الوظائف ال built-in الموجودة في التطبيق الإفتراضي لإطار العمل Yii، وكيف يقوم بتنظيم الشيفرة البرمجية، وكيف يعالج (handling) هذا التطبيق الطلبات (requests) بشكل عام.

- معلومة: من أجل تبسيط الطرح، ومن خلال هذا البرنامج التعليمي " Getting Started - البداية من هنا"، من المفترض أنك قمت بتعيين basic/web ك document root لل Web server، وقد قمت أيضا بإعداد ال Url الذي يسمح لك بالوصول الى التطبيق المثبت من خلاله ليكون على الشكل التالي: http://hostname/index.php أو ما شابه ذلك. + معلومة: من أجل تبسيط الطرح، ومن خلال هذا البرنامج التعليمي " Getting Started - البداية من هنا"، من المفترض أنك قمت بتعيين basic/web ك document root لل Web server، وقد قمت أيضا بإعداد ال Url الذي يسمح لك بالوصول الى التطبيق المثبت من خلاله ليكون على الشكل التالي: https://hostname/index.php أو ما شابه ذلك. اذا لم تقم بذلك، ولتلبية إحتياجاتك في هذا البرنامج التعليمي، يرجى ضبط ال Url كما هو موضح في هذه الصفحة. يمكنك معرفة الضبط الخاص بال Web server من هنا: تثبيت ال Yii

@@ -24,7 +24,7 @@

    -
  • الصفحة الرئيسية(Homepage): يتم عرض هذه الصفحة من خلال الرابط التالي http://hostname/index.php
  • +
  • الصفحة الرئيسية(Homepage): يتم عرض هذه الصفحة من خلال الرابط التالي https://hostname/index.php
  • صفحة من نحن(About)
  • صفحة اتصل بنا (Contact): في هذه الصفحة يتم عرض form يسمح للأعشاء بالإتصال بك من خلال البريد الإلكتروني.
  • صفحة تسجيل الدخول (Login): في هذه الصفحة يتم عرض form يسمح للأعضاء بالحصول على الإذن لإستخدام الخصائص التي لا يجوز لغيرهم من الوصول اليها، قم بتجربة تسجيل الدخول من خلال استخدام admin/admin ولاحظ أن كلمة "Login" ستختفي من القائمة الرئيسية وستظهر محلها الكلمة "Logout"
  • 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/concept-aliases.md b/docs/guide-es/concept-aliases.md index a617d2a6328..7a8a6cfae60 100644 --- a/docs/guide-es/concept-aliases.md +++ b/docs/guide-es/concept-aliases.md @@ -18,7 +18,7 @@ Para definir un alias puedes llamar a [[Yii::setAlias()]] para una determinada r Yii::setAlias('@foo', '/path/to/foo'); // una alias de un URL -Yii::setAlias('@bar', 'http://www.example.com'); +Yii::setAlias('@bar', 'https://www.example.com'); ``` > Note: Una ruta de archivo o URL en alias NO debe necesariamente referirse a un archivo o recurso existente. @@ -44,7 +44,7 @@ return [ // ... 'aliases' => [ '@foo' => '/path/to/foo', - '@bar' => 'http://www.example.com', + '@bar' => 'https://www.example.com', ], ]; ``` @@ -58,7 +58,7 @@ además resolver un alias derivado en su correspondiente ruta de archivo o URL. ```php echo Yii::getAlias('@foo'); // muestra: /path/to/foo -echo Yii::getAlias('@bar'); // muestra: http://www.example.com +echo Yii::getAlias('@bar'); // muestra: https://www.example.com echo Yii::getAlias('@foo/bar/file.php'); // muestra: /path/to/foo/bar/file.php ``` diff --git a/docs/guide-es/concept-behaviors.md b/docs/guide-es/concept-behaviors.md index f9347fcff8e..b46f35af0b5 100644 --- a/docs/guide-es/concept-behaviors.md +++ b/docs/guide-es/concept-behaviors.md @@ -2,7 +2,7 @@ Comportamientos =============== Comportamientos son instancias de [[yii\base\Behavior]] o sus clases "hija". Comportamientos, también conocido como -[mixins](https://en.wikipedia.org/wiki/Mixin), te permiten mejorar la funcionalidad de un [[yii\base\Component|componente]] +[mixins](https://es.wikipedia.org/wiki/Mixin), te permiten mejorar la funcionalidad de un [[yii\base\Component|componente]] existente sin necesidad de modificar su herencia de clases. Cuando un comportamiento se une a un componente, "inyectará" sus métodos y propiedades dentro del componente, y podrás acceder a esos métodos y propiedades como si hubieran estado definidos por la clase de componente. Además, un @@ -309,7 +309,7 @@ $user->touch('login_time'); Comparación con Traits ---------------------- -Mientras que los comportamientos son similares a [traits](https://www.php.net/traits) en cuanto que ambos "inyectan" sus +Mientras que los comportamientos son similares a [traits](https://www.php.net/manual/es/language.oop5.traits.php) en cuanto que ambos "inyectan" sus métodos y propiedades a la clase primaria, son diferentes en muchos aspectos. Tal y como se describe abajo, los dos tienen sus ventajas y desventajas. Son más como complementos el uno al otro en lugar de alternativas. diff --git a/docs/guide-es/db-dao.md b/docs/guide-es/db-dao.md index 38cebcec7f9..62d8487f6d1 100644 --- a/docs/guide-es/db-dao.md +++ b/docs/guide-es/db-dao.md @@ -396,7 +396,7 @@ En el momento de escribir esto, solo MSSQL y SQLite serán afectadas. puede especificar el nivel de aislamiento directamente cuando empieza la transacción. Se tiene que llamar a [[yii\db\Transaction::setIsolationLevel()]] después de que la transacción haya empezado. -[isolation levels]: https://en.wikipedia.org/wiki/Isolation_%28database_systems%29#Isolation_levels +[isolation levels]: https://es.wikipedia.org/wiki/Aislamiento_(ACID)#Niveles_de_aislamiento ### Transacciones Anidadas @@ -437,7 +437,7 @@ try { ## Replicación y División Lectura-Escritura -Muchos DBMS soportan [replicación de bases de datos](https://en.wikipedia.org/wiki/Replication_(computing)#Database_replication) para tener +Muchos DBMS soportan [replicación de bases de datos](https://es.wikipedia.org/wiki/Replicaci%C3%B3n_(inform%C3%A1tica)) para tener una mejor disponibilidad de la base de datos y un mejor tiempo de respuesta del servidor. Con la replicación de bases de datos, los datos están replicados en los llamados *servidores maestros* (master servers) y *servidores esclavos* (slave servers). Todas las escrituras y actualizaciones deben hacerse en el servidor maestro, mientras que las lecturas 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/helper-html.md b/docs/guide-es/helper-html.md index 17aeb525c01..99b556e697c 100644 --- a/docs/guide-es/helper-html.md +++ b/docs/guide-es/helper-html.md @@ -301,7 +301,7 @@ Si se quiere enlazar un estilo externo desde un archivo CSS: genera ``` @@ -353,7 +353,7 @@ Para generar una etiqueta de tipo imagen se puede usar el siguiente ejemplo: genera -My logo +My logo ``` Aparte de los [alias](concept-aliases.md) el primer argumento puede aceptar rutas, parámetros y URLs. Del mismo modo diff --git a/docs/guide-es/helper-url.md b/docs/guide-es/helper-url.md index ad5f923a619..27884fffb6f 100644 --- a/docs/guide-es/helper-url.md +++ b/docs/guide-es/helper-url.md @@ -78,7 +78,7 @@ echo Url::toRoute(['site/index', 'src' => 'ref1', '#' => 'name']); // /index.php?r=post%2Fedit&id=100 asume que el alias "@postEdit" se definió como "post/edit" echo Url::toRoute(['@postEdit', 'id' => 100]); -// http://www.example.com/index.php?r=site%2Findex +// https://www.example.com/index.php?r=site%2Findex echo Url::toRoute('site/index', true); // https://www.example.com/index.php?r=site%2Findex @@ -123,7 +123,7 @@ echo Url::to('@web/images/logo.gif'); // images/logo.gif echo Url::to('images/logo.gif'); -// http://www.example.com/images/logo.gif +// https://www.example.com/images/logo.gif echo Url::to('@web/images/logo.gif', true); // https://www.example.com/images/logo.gif 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/intro-yii.md b/docs/guide-es/intro-yii.md index 791b94eb473..5c57a80a2c6 100644 --- a/docs/guide-es/intro-yii.md +++ b/docs/guide-es/intro-yii.md @@ -51,7 +51,7 @@ Esta guía está basada principalmente en la versión 2.0. del framework. Requisitos y Prerequisitos -------------------------- -Yii 2.0 requiere PHP 5.4.0 o una versión posterior y corre de mejor manera en la última versión de PHP 7. Se pueden encontrar requisitos más detallados de características individuales +Yii 2.0 requiere PHP 5.4.0 o una versión posterior y corre de mejor manera en la última versión de PHP. Se pueden encontrar requisitos más detallados de características individuales ejecutando el script de comprobación incluido en cada lanzamiento de Yii. Para utilizar Yii se requieren conocimientos básicos de programación orientada a objetos (POO), porque el framework Yii se basa íntegramente en esta tecnología. diff --git a/docs/guide-es/output-client-scripts.md b/docs/guide-es/output-client-scripts.md index f74ddcae224..a21963fddc6 100644 --- a/docs/guide-es/output-client-scripts.md +++ b/docs/guide-es/output-client-scripts.md @@ -30,7 +30,7 @@ en vez de agregar uno nuevo. En caso de no proveerlo, el código JS en sí será Un script externo puede ser agregado de esta manera: ```php -$this->registerJsFile('http://example.com/js/main.js', ['depends' => [\yii\web\JqueryAsset::class]]); +$this->registerJsFile('https://example.com/js/main.js', ['depends' => [\yii\web\JqueryAsset::class]]); ``` Los argumentos para [[yii\web\View::registerJsFile()|registerJsFile()]] son similares a los de @@ -76,7 +76,7 @@ Si quieres especificar propiedades adicionales a la etiqueta style, pasa un arra Si necesitas asegurarte que haya sólo una etiqueta style utiliza el cuarto argumento como fue mencionado en las descripciones de meta etiquetas. ```php -$this->registerCssFile("http://example.com/css/themes/black-and-white.css", [ +$this->registerCssFile("https://example.com/css/themes/black-and-white.css", [ 'depends' => [BootstrapAsset::class], 'media' => 'print', ], 'css-print-theme'); diff --git a/docs/guide-es/rest-authentication.md b/docs/guide-es/rest-authentication.md index 53b070a43a1..3e23aedfecc 100644 --- a/docs/guide-es/rest-authentication.md +++ b/docs/guide-es/rest-authentication.md @@ -17,7 +17,7 @@ Hay muchas maneras de enviar una token (pieza) de acceso: `https://example.com/users?access-token=xxxxxxxx`. Debido que muchos servidores dejan los parámetros de consulta en los logs del servidor, esta aproximación suele ser usada principalmente para servir peticiones `JSONP` que no usen las cabeceras HTTP para enviar piezas de acceso. -* [OAuth 2](http://oauth.net/2/): la pieza de acceso es obtenida por el consumidor por medio de una autorización del servidor +* [OAuth 2](https://oauth.net/2/): la pieza de acceso es obtenida por el consumidor por medio de una autorización del servidor y enviada al API del servidor según el protocolo OAuth 2 [tokens HTTP del portador](https://datatracker.ietf.org/doc/html/rfc6750). 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/rest-versioning.md b/docs/guide-es/rest-versioning.md index 504b677d49a..b7dcedbca2b 100644 --- a/docs/guide-es/rest-versioning.md +++ b/docs/guide-es/rest-versioning.md @@ -9,7 +9,7 @@ de las APIs ha de ser mantenida siempre que sea posible. Si es necesario un camb para más información en el diseño del número de versión del API. Una manera común de implementar el versionado de la API es embeber el número de versión en las URLs de la API. -Por ejemplo, `http://example.com/v1/users` se refiere al punto final `/users` de la versión 1 de la API. +Por ejemplo, `https://example.com/v1/users` se refiere al punto final `/users` de la versión 1 de la API. Otro método de versionado de la API, la cual está ganando predominancia recientemente, es poner el número de versión en las cabeceras de la petición HTTP. Esto se suele hacer típicamente a través la cabecera `Accept`: @@ -90,8 +90,8 @@ return [ ]; ``` -Como consecuencia del código anterior, `http://example.com/v1/users` devolverá la lista de usuarios en la versión 1, mientras -`http://example.com/v2/users` devolverá la versión 2 de los usuarios. +Como consecuencia del código anterior, `https://example.com/v1/users` devolverá la lista de usuarios en la versión 1, mientras +`https://example.com/v2/users` devolverá la versión 2 de los usuarios. Gracias a los módulos, el código de las diferentes principales versiones puede ser aislado. Pero los módulos hacen posible reutilizar el código a través de los módulos vía clases base comunes y otros recursos compartidos. diff --git a/docs/guide-es/runtime-requests.md b/docs/guide-es/runtime-requests.md index 53366c36f47..52bb6d2c3f3 100644 --- a/docs/guide-es/runtime-requests.md +++ b/docs/guide-es/runtime-requests.md @@ -76,14 +76,14 @@ if ($request->isPut) { // el método de la request es PUT } El componente `request` proporciona muchas maneras de inspeccionar la URL solicitada actualmente. -Asumiendo que la URL que se está solicitando es `http://example.com/admin/index.php/product?id=100`, se pueden obtener +Asumiendo que la URL que se está solicitando es `https://example.com/admin/index.php/product?id=100`, se pueden obtener varias partes de la URL explicadas en los siguientes puntos: * [[yii\web\Request::url|url]]: devuelve `/admin/index.php/product?id=100`, que es la URL sin la parte de información del host. -* [[yii\web\Request::absoluteUrl|absoluteUrl]]: devuelve `http://example.com/admin/index.php/product?id=100`, que es +* [[yii\web\Request::absoluteUrl|absoluteUrl]]: devuelve `https://example.com/admin/index.php/product?id=100`, que es la URL entera, incluyendo la parte de información del host. -* [[yii\web\Request::hostInfo|hostInfo]]: devuelve `http://example.com`, que es la parte de información del host +* [[yii\web\Request::hostInfo|hostInfo]]: devuelve `https://example.com`, que es la parte de información del host dentro de la URL. * [[yii\web\Request::pathInfo|pathInfo]]: devuelve `/product`, que es la parte posterior al script de entrada y anterior al interrogante (query string) diff --git a/docs/guide-es/runtime-responses.md b/docs/guide-es/runtime-responses.md index d5a7ee9cadd..d24f7b7b90e 100644 --- a/docs/guide-es/runtime-responses.md +++ b/docs/guide-es/runtime-responses.md @@ -173,7 +173,7 @@ ejemplo: ```php public function actionOld() { - return $this->redirect('http://example.com/new', 301); + return $this->redirect('https://example.com/new', 301); } ``` @@ -185,7 +185,7 @@ seguido por una llamada al método [[yii\web\Response::send()]] para asegurar qu respuesta. ```php -\Yii::$app->response->redirect('http://example.com/new', 301)->send(); +\Yii::$app->response->redirect('https://example.com/new', 301)->send(); ``` > Info: De forma predeterminada, el método [[yii\web\Response::redirect()]] asigna el estado de respuesta al diff --git a/docs/guide-es/runtime-routing.md b/docs/guide-es/runtime-routing.md index 213312a820d..1a538183ab2 100644 --- a/docs/guide-es/runtime-routing.md +++ b/docs/guide-es/runtime-routing.md @@ -143,7 +143,7 @@ echo Url::to(['post/view', 'id' => 100]); // crea una URL interna: /index.php?r=post/view&id=100#contentecho Url::to(['post/view', 'id' => 100, '#' => 'content']); -// crea una URL absoluta: http://www.example.com/index.php?r=post/index +// crea una URL absoluta: https://www.example.com/index.php?r=post/index echo Url::to(['post/index'], true); // crea una URL absoluta usando el esquema https: https://www.example.com/index.php?r=post/index @@ -195,10 +195,10 @@ use yii\helpers\Url; // la URL solicitada actualmente: /index.php?r=admin/post/index echo Url::to(); -// una URL con alias: http://example.comYii::setAlias('@example', 'http://example.com/'); +// una URL con alias: https://example.comYii::setAlias('@example', 'https://example.com/'); echo Url::to('@example'); -// una URL absoluta: http://example.com/images/logo.gif +// una URL absoluta: https://example.com/images/logo.gif echo Url::to('/images/logo.gif', true);``` ``` @@ -427,18 +427,18 @@ Sin usar ningún parámetro opcional, se tendrían que crear 4 reglas para logra Es posible incluir nombres de servidores Web en los parámetros de las URLs. Esto es practico principalmente cuando una aplicación debe tener distintos comportamientos paro diferentes nombres de servidores Web. Por ejemplo, las siguientes -reglas convertirán la URL `http://admin.example.com/login` en la ruta `admin/user/login` y -`http://www.example.com/login` en `site/login`. +reglas convertirán la URL `https://admin.example.com/login` en la ruta `admin/user/login` y +`https://www.example.com/login` en `site/login`. ```php [ - 'http://admin.example.com/login' => 'admin/user/login', - 'http://www.example.com/login' => 'site/login', + 'https://admin.example.com/login' => 'admin/user/login', + 'https://www.example.com/login' => 'site/login', ] ``` También se pueden incrustar parámetros en los nombres de servidor para extraer información dinámica de ellas. Por -ejemplo, la siguiente regla convertirá la URL `http://en.example.com/posts` en la ruta `post/index` y el parámetro +ejemplo, la siguiente regla convertirá la URL `https://en.example.com/posts` en la ruta `post/index` y el parámetro `language=en`. ```php @@ -448,8 +448,8 @@ ejemplo, la siguiente regla convertirá la URL `http://en.example.com/posts` en ``` > Note: Las reglas con nombres de servidor NO deben incluir el subdirectorio del script de entrada (entry script) en - sus patrones. Por ejemplo, is la aplicación se encuentra en `http://www.example.com/sandbox/blog`, entonces se debe - usar el patrón `http://www.example.com/posts` en lugar de `http://www.example.com/sandbox/blog/posts`. Esto + sus patrones. Por ejemplo, is la aplicación se encuentra en `https://www.example.com/sandbox/blog`, entonces se debe + usar el patrón `https://www.example.com/posts` en lugar de `https://www.example.com/sandbox/blog/posts`. Esto permitirá que la aplicación se pueda desarrollar en cualquier directorio sin la necesidad de cambiar el código de la aplicación. diff --git a/docs/guide-es/start-databases.md b/docs/guide-es/start-databases.md index 6080cd31a5e..d12cf82db05 100644 --- a/docs/guide-es/start-databases.md +++ b/docs/guide-es/start-databases.md @@ -225,7 +225,7 @@ Probándolo Para ver cómo funciona, utiliza a la siguiente URL en tu navegador: ``` -http://hostname/index.php?r=country%2Findex +https://hostname/index.php?r=country%2Findex ``` ![Lista de Países](images/start-country-list.png) @@ -235,7 +235,7 @@ Si haces click en el botón "2", verás que la página muestra otros cinco país Observa más cuidadosamente y verás que la URL en el navegador cambia a ``` -http://hostname/index.php?r=country%2Findex&page=2 +https://hostname/index.php?r=country%2Findex&page=2 ``` Entre bastidores, [[yii\data\Pagination|Pagination]] está realizando su magia. diff --git a/docs/guide-es/start-forms.md b/docs/guide-es/start-forms.md index 64e58771b49..fceddd5836d 100644 --- a/docs/guide-es/start-forms.md +++ b/docs/guide-es/start-forms.md @@ -166,7 +166,7 @@ Probándolo Para ver cómo funciona, utiliza tu navegador para ir al siguiente URL: ``` -http://hostname/index.php?r=site/entry +https://hostname/index.php?r=site/entry ``` Verás una página que muestra un formulario con dos campos de input. Adelante de cada campo de input, será mostrada también diff --git a/docs/guide-es/start-gii.md b/docs/guide-es/start-gii.md index 281ffaac178..9c059c8058f 100644 --- a/docs/guide-es/start-gii.md +++ b/docs/guide-es/start-gii.md @@ -43,7 +43,7 @@ defined('YII_ENV') or define('YII_ENV', 'dev'); De esta manera, tu aplicación habrá habilitado Gii, y puedes acceder al módulo a través de la siguiente URL: ``` -http://hostname/index.php?r=gii +https://hostname/index.php?r=gii ``` ![Gii](images/start-gii.png) @@ -98,7 +98,7 @@ Probándolo Para ver cómo funciona, accede desde tu navegador a la siguiente URL: ``` -http://hostname/index.php?r=country/index +https://hostname/index.php?r=country/index ``` Verás una grilla de datos mostrando los países de la base de datos. Puedes ordenar la grilla diff --git a/docs/guide-es/start-hello.md b/docs/guide-es/start-hello.md index 84b3f969630..40eee8b8609 100644 --- a/docs/guide-es/start-hello.md +++ b/docs/guide-es/start-hello.md @@ -101,7 +101,7 @@ Probándolo Después de crear la acción y la vista, puedes acceder a la nueva página abriendo el siguiente URL: ``` -http://hostname/index.php?r=site%2Fsay&message=Hello+World +https://hostname/index.php?r=site%2Fsay&message=Hello+World ``` ![Hello World](images/start-hello-world.png) diff --git a/docs/guide-es/start-installation.md b/docs/guide-es/start-installation.md index be08e85fc52..ff67d897d88 100644 --- a/docs/guide-es/start-installation.md +++ b/docs/guide-es/start-installation.md @@ -97,7 +97,7 @@ Verificando las Instalación --------------------------- Una vez finalizada la instalación, o bien configura tu servidor web (mira la sección siguiente) o utiliza -el [servidor web incluido en PHP](https://www.php.net/manual/en/features.commandline.webserver.php) ejecutando el siguiente +el [servidor web incluido en PHP](https://www.php.net/manual/es/features.commandline.webserver.php) ejecutando el siguiente comando de consola estando parado en el directorio `web` de la aplicación: ```bash @@ -148,7 +148,7 @@ de Facebook. De todos modos, hay algunos casos donde HHVM se comporta diferente PHP oficial, por lo que tendrás que tener cuidados extra al utilizarlo. En un servidor de producción, podrías querer configurar el servidor Web para que la aplicación sea accedida -a través de la URL `http://www.example.com/index.php` en vez de `http://www.example.com/basic/web/index.php`. Tal configuración +a través de la URL `https://www.example.com/index.php` en vez de `https://www.example.com/basic/web/index.php`. Tal configuración require apuntar el document root de tu servidor Web a la carpeta `basic/web`. También podrías querer ocultar `index.php` de la URL, como se describe en la sección [Parseo y Generación de URLs](runtime-url-handling.md). En esta sub-sección, aprenderás a configurar tu servidor Apache o Nginx para alcanzar estos objetivos. @@ -187,7 +187,7 @@ DocumentRoot "path/to/basic/web" ### Configuración Recomendada de Nginx -Para utilizar [Nginx](https://wiki.nginx.org/), debes instalar PHP como un [FPM SAPI](https://www.php.net/install.fpm). +Para utilizar [Nginx](https://wiki.nginx.org/), debes instalar PHP como un [FPM SAPI](https://www.php.net/manual/es/install.fpm.php). Utiliza la siguiente configuración de Nginx, reemplazando `path/to/basic/web` con la ruta real a `basic/web` y `mysite.test` con el hostname real a servir. diff --git a/docs/guide-es/start-workflow.md b/docs/guide-es/start-workflow.md index c25a18091f1..e564b8f6978 100644 --- a/docs/guide-es/start-workflow.md +++ b/docs/guide-es/start-workflow.md @@ -2,12 +2,12 @@ Corriendo Aplicaciones ====================== Después de haber instalado Yii, tienes una aplicación totalmente funcional a la que se puede acceder a través de -la URL `http://hostname/basic/web/index.php` o `http://hostname/index.php`, dependiendo de tu configuración. +la URL `https://hostname/basic/web/index.php` o `https://hostname/index.php`, dependiendo de tu configuración. Esta sección será una introducción a la funcionalidad incluida de la aplicación, cómo se organiza el código, y cómo la aplicación maneja los requests en general. > Info: Por simplicidad, en el transcurso de este tutorial "Para Empezar", se asume que has definido `basic/web` - como el document root de tu servidor Web, y configurado la URL de acceso a tu aplicación para que sea `http://hostname/index.php` + como el document root de tu servidor Web, y configurado la URL de acceso a tu aplicación para que sea `https://hostname/index.php` o similar. Dependiendo de tus necesidades, por favor ajusta dichas URLs. @@ -20,7 +20,7 @@ Funcionalidad La aplicación básica contiene 4 páginas: -* página principal, mostrada cuando se accede a la URL `http://hostname/index.php`, +* página principal, mostrada cuando se accede a la URL `https://hostname/index.php`, * página "Acerca de (About)", * la página "Contacto (Contact)", que muestra un formulario de contacto que permite a los usuarios finales contactarse vía email, * y la página "Login", que muestra un formulario para loguearse que puede usarse para autenticar usuarios. @@ -42,7 +42,7 @@ Estructura de la aplicación Los archivos y directorios más importantes en tu aplicación son (asumiendo que la raíz de la aplicación es `basic`): -```js +``` basic/ base path de la aplicación composer.json archivo utilizado por Composer, describe información de sus paquetes y librerías config/ contiene la configuración de las aplicaciones (y otras) diff --git a/docs/guide-es/structure-controllers.md b/docs/guide-es/structure-controllers.md index bbb9a4bc55c..1c6ec53e455 100644 --- a/docs/guide-es/structure-controllers.md +++ b/docs/guide-es/structure-controllers.md @@ -83,7 +83,7 @@ o el siguiente formato si el controlador pertenece a un módulo: ModuleID/ControllerID/ActionID ``` -Entonces si un usuario solicita la URL `http://hostname/index.php?r=site/index`, la acción `index` del controlador `site` +Entonces si un usuario solicita la URL `https://hostname/index.php?r=site/index`, la acción `index` del controlador `site` será ejecutado. Para más detalles acerca de cómo las son resueltas en acciones, por favor consulta la sección [Routing](runtime-routing.md). @@ -178,7 +178,7 @@ Puedes configurar [[yii\base\Application::controllerMap|controller map]] en la Cada aplicación tiene un controlador por defecto especificado a través de la propiedad [[yii\base\Application::defaultRoute]]. Cuando un `request` no especifica una [ruta](#ids-routes), se utilizará la ruta especificada en esta propiedad. Para [[yii\web\Application|aplicaciones Web]], el valor es `'site'`, mientras que para [[yii\console\Application|aplicaciones de consola]] -es `help`. Por lo tanto, si la URL es `http://hostname/index.php`, significa que el `request` será manejado por el controlador `site`. +es `help`. Por lo tanto, si la URL es `https://hostname/index.php`, significa que el `request` será manejado por el controlador `site`. Puedes cambiar el controlador por defecto con la siguiente [configuración de la aplicación](structure-applications.md#application-configurations): @@ -323,8 +323,8 @@ un objeto `response`): ```php public function actionForward() { - // redirige el navegador del usuario a http://example.com - return $this->redirect('http://example.com'); + // redirige el navegador del usuario a https://example.com + return $this->redirect('https://example.com'); } ``` @@ -354,13 +354,13 @@ class PostController extends Controller Los parámetros de acción serán poblados como se muestra a continuación para distintos `requests`: -* `http://hostname/index.php?r=post/view&id=123`: el parámetro `$id` tomará el valor +* `https://hostname/index.php?r=post/view&id=123`: el parámetro `$id` tomará el valor `'123'`, mientras que `$version` queda como `null` debido a que no hay un parámetro `version` en la URL. -* `http://hostname/index.php?r=post/view&id=123&version=2`: los parámetros `$id` y `$version` serán llenados con +* `https://hostname/index.php?r=post/view&id=123&version=2`: los parámetros `$id` y `$version` serán llenados con `'123'` y `'2'`, respectivamente. -* `http://hostname/index.php?r=post/view`: se lanzará una excepción [[yii\web\BadRequestHttpException]] +* `https://hostname/index.php?r=post/view`: se lanzará una excepción [[yii\web\BadRequestHttpException]] dado que el parámetro `$id` es requerido pero no es provisto en el `request`. -* `http://hostname/index.php?r=post/view&id[]=123`: una excepción [[yii\web\BadRequestHttpException]] será lanzada +* `https://hostname/index.php?r=post/view&id[]=123`: una excepción [[yii\web\BadRequestHttpException]] será lanzada porque el parámetro `$id` está recibiendo un valor inesperado, el array `['123']`. Si quieres que un parámetro de acción acepte un array como valor, deberías utilizar el `type-hinting` (especificación de tipo) `array`, @@ -373,8 +373,8 @@ public function actionView(array $id, $version = null) } ``` -Ahora si el `request` es `http://hostname/index.php?r=post/view&id[]=123`, el parámetro `$id` tomará el valor -de `['123']`. Si el `request` es `http://hostname/index.php?r=post/view&id=123`, el parámetro `$id` recibirá aún +Ahora si el `request` es `https://hostname/index.php?r=post/view&id[]=123`, el parámetro `$id` tomará el valor +de `['123']`. Si el `request` es `https://hostname/index.php?r=post/view&id=123`, el parámetro `$id` recibirá aún el mismo array como valor ya que el valor escalar `'123'` será convertido automáticamente en array. Los ejemplos de arriba muestran principalmente como funcionan los parámetros de acción de una aplicación Web. Para aplicaciones de consola, diff --git a/docs/guide-es/structure-extensions.md b/docs/guide-es/structure-extensions.md index b157a9fbb83..e480af3edc5 100644 --- a/docs/guide-es/structure-extensions.md +++ b/docs/guide-es/structure-extensions.md @@ -435,6 +435,6 @@ se describe en la subsección [Uso de Extensiones](#using-extensions) [Sphinx](https://sphinxsearch.com). incluye características como consultas básicas, Active Record, code generation, etc. - [yiisoft/yii2-swiftmailer](https://github.com/yiisoft/yii2-swiftmailer): proporciona características de envío de - correos electrónicos basadas en [swiftmailer](http://swiftmailer.org/). + correos electrónicos basadas en [swiftmailer](https://swiftmailer.symfony.com/). - [yiisoft/yii2-twig](https://github.com/yiisoft/yii2-twig): proporciona un motor de plantillas basado en [Twig](https://twig.symfony.com/). diff --git a/docs/guide-es/structure-filters.md b/docs/guide-es/structure-filters.md index d096655ab1c..417465ee72d 100644 --- a/docs/guide-es/structure-filters.md +++ b/docs/guide-es/structure-filters.md @@ -322,7 +322,7 @@ public function behaviors() ### [[yii\filters\Cors|Cors]] -[CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS) es un mecanismo que permite a diferentes +[CORS](https://developer.mozilla.org/es/docs/Web/HTTP/CORS) es un mecanismo que permite a diferentes recursos (por ejemplo: fuentes, JavaScript, etc) de una pagina Web ser solicitados por otro dominio diferente al dominio que esta haciendo la petición. En particular las llamadas AJAX de JavaScript pueden utilizar el mecanismo XMLHttpRequest. De otro modo esta petición de dominio cruzado seria prohibida por los navegadores Web, por la misma @@ -348,7 +348,7 @@ public function behaviors() El filtrado CORS puede ser ajustado utilizando la propiedad 'cors'. * `cors['Origin']`: array utilizado para definir los orígenes permitidos. Puede ser `['*']` (everyone) o - `['http://www.myserver.net', 'http://www.myotherserver.com']`. Por defecto `['*']`. + `['https://www.myserver.net', 'https://www.myotherserver.com']`. Por defecto `['*']`. * `cors['Access-Control-Request-Method']`: array de los verbos permitidos como `['GET', 'OPTIONS', 'HEAD']`. Por defecto `['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS']`. * `cors['Access-Control-Request-Headers']`: array de las cabeceras permitidas. Puede ser `['*']` todas las cabeceras o @@ -356,7 +356,7 @@ El filtrado CORS puede ser ajustado utilizando la propiedad 'cors'. * `cors['Access-Control-Allow-Credentials']`: define si la petición actual puede hacer uso de credenciales. Puede ser `true`, `false` o `null` (not set). Por defecto `null`. * `cors['Access-Control-Max-Age']`: define el tiempo de vida del la petición pref-flight. Por defecto `86400`. Por - ejemplo, habilitar CORS para el origen: `http://www.myserver.net` con métodos `GET`, `HEAD` y `OPTIONS`: + ejemplo, habilitar CORS para el origen: `https://www.myserver.net` con métodos `GET`, `HEAD` y `OPTIONS`: ```php use yii\filters\Cors; @@ -368,7 +368,7 @@ public function behaviors() [ 'class' => Cors::class, 'cors' => [ - 'Origin' => ['http://www.myserver.net'], + 'Origin' => ['https://www.myserver.net'], 'Access-Control-Request-Method' => ['GET', 'HEAD', 'OPTIONS'], ], ], @@ -389,7 +389,7 @@ public function behaviors() [ 'class' => Cors::class, 'cors' => [ - 'Origin' => ['http://www.myserver.net'], + 'Origin' => ['https://www.myserver.net'], 'Access-Control-Request-Method' => ['GET', 'HEAD', 'OPTIONS'], ], 'actions' => [ diff --git a/docs/guide-es/structure-modules.md b/docs/guide-es/structure-modules.md index 19964295a73..5e7c282220e 100644 --- a/docs/guide-es/structure-modules.md +++ b/docs/guide-es/structure-modules.md @@ -14,7 +14,7 @@ módulo. Dentro de este directorio, hay subdirectorios tales como 'controllers', controladores, modelos, vistas y otro código, exactamente como una aplicación. El siguiente ejemplo muestra el contenido dentro de un módulo: -```js +``` forum/ Module.php archivo clase módulo controllers/ contiene archivos de la clase controlador diff --git a/docs/guide-es/test-environment-setup.md b/docs/guide-es/test-environment-setup.md index e016112b858..4cbe8ae5d28 100644 --- a/docs/guide-es/test-environment-setup.md +++ b/docs/guide-es/test-environment-setup.md @@ -4,7 +4,7 @@ Preparación del entorno de pruebas Yii 2 ha mantenido oficialmente integración con el _framework_ de testeo [`Codeception`](https://github.com/Codeception/Codeception), que le permite crear los siguientes tipos de tests: -- [Unitari](test-unit.md) - verifica que una unidad simple de código funciona como se espera; +- [Unitarias](test-unit.md) - verifica que una unidad simple de código funciona como se espera; - [Funcional](test-functional.md) - verifica escenarios desde la perspectiva de un usuario a través de la emulación de un navegador; - [De aceptación](test-acceptance.md) - verifica escenarios desde la perspectiva de un usuario en un navegador. 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/concept-aliases.md b/docs/guide-fr/concept-aliases.md index dabe0abe7a0..780651319e7 100644 --- a/docs/guide-fr/concept-aliases.md +++ b/docs/guide-fr/concept-aliases.md @@ -15,7 +15,7 @@ Vous pouvez définir un alias pour un chemin de fichier ou pour une URL en appel Yii::setAlias('@foo', '/path/to/foo'); // un alias pour une URL -Yii::setAlias('@bar', 'http://www.example.com'); +Yii::setAlias('@bar', 'https://www.example.com'); // un alias de fichier concrêt qui contient une classe \foo\Bar @@ -39,7 +39,7 @@ return [ // ... 'aliases' => [ '@foo' => '/path/to/foo', - '@bar' => 'http://www.example.com', + '@bar' => 'https://www.example.com', ], ]; ``` @@ -52,7 +52,7 @@ Vous pouvez appeler [[Yii::getAlias()]] pour résoudre un alias racine en le che ```php echo Yii::getAlias('@foo'); // affiche : /path/to/foo -echo Yii::getAlias('@bar'); // affiche : http://www.example.com +echo Yii::getAlias('@bar'); // affiche : https://www.example.com echo Yii::getAlias('@foo/bar/file.php'); // affiche : /path/to/foo/bar/file.php ``` diff --git a/docs/guide-fr/concept-autoloading.md b/docs/guide-fr/concept-autoloading.md index 4efca62dd72..812de5499b0 100644 --- a/docs/guide-fr/concept-autoloading.md +++ b/docs/guide-fr/concept-autoloading.md @@ -11,7 +11,7 @@ Utilisation du chargeur automatique de Yii @@ -299,7 +299,7 @@ Il existe plusieurs comportements pré-inclus et extérieurs disponibles : Comparaison des comportement et des traits ------------------------------------------ -Bien que les comportements soient similaires aux [traits](https://www.php.net/traits) par le fait qu'ils *injectent* tous deux leurs propriétés et leurs méthodes dans la classe primaire, ils diffèrent par de nombreux aspects. Comme nous l'expliquons ci-dessous, ils ont chacun leurs avantages et leurs inconvénients. Ils sont plus des compléments l'un envers l'autre, que des alternatives. +Bien que les comportements soient similaires aux [traits](https://www.php.net/manual/fr/language.oop5.traits.php) par le fait qu'ils *injectent* tous deux leurs propriétés et leurs méthodes dans la classe primaire, ils diffèrent par de nombreux aspects. Comme nous l'expliquons ci-dessous, ils ont chacun leurs avantages et leurs inconvénients. Ils sont plus des compléments l'un envers l'autre, que des alternatives. ### Raisons d'utiliser des comportements diff --git a/docs/guide-fr/concept-events.md b/docs/guide-fr/concept-events.md index 3170c6829ab..ecd1b31a6ff 100644 --- a/docs/guide-fr/concept-events.md +++ b/docs/guide-fr/concept-events.md @@ -9,7 +9,7 @@ Yii introduit une classe de base appelée [[yii\base\Component]] pour prendre en Gestionnaires d'événements -------------------------- -Un gestionnaire d'événement est une [fonction de rappel PHP](https://www.php.net/manual/en/language.types.callable.php) qui est exécutée lorsque l'événement à laquelle elle est attachée est déclenché. Vous pouvez utiliser n'importe laquelle des fonctions de rappel suivantes : +Un gestionnaire d'événement est une [fonction de rappel PHP](https://www.php.net/manual/fr/language.types.callable.php) qui est exécutée lorsque l'événement à laquelle elle est attachée est déclenché. Vous pouvez utiliser n'importe laquelle des fonctions de rappel suivantes : - une fonction PHP globale spécifiée sous forme de chaîne de caractères (sans les parenthèses) p. ex., `'trim'` ; - une méthode d'objet spécifiée sous forme de tableau constitué d'un nom d'objet et d'un nom de méthode sous forme de chaîne de caractères (sans les parenthèses), p. ex., `[$object, 'methodName']`; diff --git a/docs/guide-fr/db-active-record.md b/docs/guide-fr/db-active-record.md index c858040833f..d3e92113035 100644 --- a/docs/guide-fr/db-active-record.md +++ b/docs/guide-fr/db-active-record.md @@ -1,7 +1,7 @@ Enregistrement actif (*Active Record*) ===================================== -L'[enregistrement actif](https://en.wikipedia.org/wiki/Active_record_pattern) fournit une interface orientée objet pour accéder aux données stockées dans une base de données et les manipuler. +L'[enregistrement actif](https://fr.wikipedia.org/wiki/Active_record) fournit une interface orientée objet pour accéder aux données stockées dans une base de données et les manipuler. Une classe d'enregistrement actif (ActiveRecord) est associée à une table de base de données, une instance de cette classe représente une ligne de cette table, et un *attribut* d'une instance d'enregistrement actif représente la valeur d'une colonne particulière dans cette ligne. Au lieu d'écrire des instructions SQL brutes, vous pouvez accéder aux attributs de l'objet enregistrement actif et appeler ses méthodes pour accéder aux données stockées dans les tables de la base de données et les manipuler. @@ -472,9 +472,9 @@ ou la méthode [[yii\db\ActiveRecord::getOldAttribute()|getOldAttribute()]]. Cela est souvent le cas lorsque le modèle reçoit des entrées utilisateur de formulaires HTML ou chacune des valeurs est représentée par une chaîne de caractères. Pour garantir le type correct pour p. ex. des valeurs entières, vous devez appliquer un [filtre de validation](input-validation.md#data-filtering): > `['attributeName', 'filter', 'filter' => 'intval']`. -Cela fonctionne pour toutes les fonctions de transformation de type de PHP comme [intval()](https://www.php.net/manual/en/function.intval.php), -[floatval()](https://www.php.net/manual/en/function.floatval.php), -[boolval](https://www.php.net/manual/en/function.boolval.php), etc... +Cela fonctionne pour toutes les fonctions de transformation de type de PHP comme [intval()](https://www.php.net/manual/fr/function.intval.php), +[floatval()](https://www.php.net/manual/fr/function.floatval.php), +[boolval](https://www.php.net/manual/fr/function.boolval.php), etc... ### Valeurs d'attribut par défaut @@ -688,7 +688,7 @@ try { ``` > Note : dans le code précédent, nous utilisons deux blocs de capture pour être compatible avec PHP 5.x et PHP 7.x. -`\Exception` met en œuvre l'[interface `\Throwable`](https://www.php.net/manual/en/class.throwable.php) +`\Exception` met en œuvre l'[interface `\Throwable`](https://www.php.net/manual/fr/class.throwable.php) > à partir de PHP 7.0, c'est pourquoi vous pouvez sauter la partie avec `\Exception` si votre application utilise PHP 7.0 ou une version plus récente. La deuxième façon consiste à lister les opérations de base de données qui nécessitent une prise en charge transactionnelle dans la méthode [[yii\db\ActiveRecord::transactions()]]. diff --git a/docs/guide-fr/db-dao.md b/docs/guide-fr/db-dao.md index e99a01ad9a3..ff86e451f32 100644 --- a/docs/guide-fr/db-dao.md +++ b/docs/guide-fr/db-dao.md @@ -1,7 +1,7 @@ Objets d'accès aux bases de données =================================== -Construits au-dessus des [objets de bases de données PHP (PDO – PHP Data Objects)](https://www.php.net/manual/en/book.pdo.php), les objets d'accès aux bases de données de Yii (DAO – Database Access Objects) fournissent une API orientée objets pour accéder à des bases de données relationnelles. C'est la fondation pour d'autres méthodes d'accès aux bases de données plus avancées qui incluent le [constructeur de requêtes (*query builder*)](db-query-builder.md) et l'[enregistrement actif (*active record*)](db-active-record.md). +Construits au-dessus des [objets de bases de données PHP (PDO – PHP Data Objects)](https://www.php.net/manual/fr/book.pdo.php), les objets d'accès aux bases de données de Yii (DAO – Database Access Objects) fournissent une API orientée objets pour accéder à des bases de données relationnelles. C'est la fondation pour d'autres méthodes d'accès aux bases de données plus avancées qui incluent le [constructeur de requêtes (*query builder*)](db-query-builder.md) et l'[enregistrement actif (*active record*)](db-active-record.md). Lorsque vous utilisez les objets d'accès aux bases de données de Yii, vous manipulez des requêtes SQL et des tableaux PHP. En conséquence, cela reste le moyen le plus efficace pour accéder aux bases de données. Néanmoins, étant donné que la syntaxe du langage SQL varie selon le type de base de données, l'utilisation des objets d'accès aux bases de données de Yii signifie également que vous avez à faire un travail supplémentaire pour créer une application indifférente au type de base de données. @@ -59,7 +59,7 @@ Vous pouvez ensuite accéder à la base de données via l'expression `Yii::$app- > Tip: vous pouvez configurer plusieurs composants d'application « base de données » si votre application a besoin d'accéder à plusieurs bases de données. -Lorsque vous configurez une connexion à une base de données, vous devez toujours spécifier le nom de sa source de données (DSN – Data Source Name) via la propriété [[yii\db\Connection::dsn|dsn]]. Les formats des noms de source de données varient selon le type de base de données. Reportez-vous au [manuel de PHP](https://www.php.net/manual/en/pdo.construct.php) pour plus de détails. Ci-dessous, nous donnons quelques exemples : +Lorsque vous configurez une connexion à une base de données, vous devez toujours spécifier le nom de sa source de données (DSN – Data Source Name) via la propriété [[yii\db\Connection::dsn|dsn]]. Les formats des noms de source de données varient selon le type de base de données. Reportez-vous au [manuel de PHP](https://www.php.net/manual/fr/pdo.construct.php) pour plus de détails. Ci-dessous, nous donnons quelques exemples : * MySQL, MariaDB: `mysql:host=localhost;dbname=mydatabase` * SQLite: `sqlite:/path/to/database/file` @@ -164,7 +164,7 @@ $post = Yii::$app->db->createCommand('SELECT * FROM post WHERE id=:id AND status ->queryOne(); ``` -La liaison des paramètres est implémentée via des [instructions préparées](https://www.php.net/manual/en/mysqli.quickstart.prepared-statements.php). En plus d'empêcher les attaques par injection SQL, cela peut aussi améliorer la performance en préparant l'instruction SQL une seule fois et l'exécutant de multiples fois avec des paramètres différents. Par exemple : +La liaison des paramètres est implémentée via des [instructions préparées](https://www.php.net/manual/fr/mysqli.quickstart.prepared-statements.php). En plus d'empêcher les attaques par injection SQL, cela peut aussi améliorer la performance en préparant l'instruction SQL une seule fois et l'exécutant de multiples fois avec des paramètres différents. Par exemple : ```php $command = Yii::$app->db->createCommand('SELECT * FROM post WHERE id=:id'); @@ -237,7 +237,7 @@ Une autre méthode utile est [[yii\db\Command::upsert()|upsert()]]. Upsert est u ```php Yii::$app->db->createCommand()->upsert('pages', [ 'name' => 'Front page', - 'url' => 'http://example.com/', // url is unique + 'url' => 'https://example.com/', // url is unique 'visits' => 0, ], [ 'visits' => new \yii\db\Expression('visits + 1'), @@ -330,7 +330,7 @@ try { En appelant la méthode [[yii\db\Connection::beginTransaction()|beginTransaction()]], une nouvelle transaction est démarrée. La transaction est représentée sous forme d'objet [[yii\db\Transaction]] stocké dans la variable `$transaction`. Ensuite, les requêtes à exécuter sont placées dans un bloc `try...catch...`. Si toutes les requêtes réussissent, la méthode [[yii\db\Transaction::commit()|commit()]] est appelée pour entériner la transaction. Autrement, si une exception a été levée et capturée, la méthode [[yii\db\Transaction::rollBack()|rollBack()]] est appelée pour défaire les changements faits par les requêtes de la transaction antérieures à celle qui a échoué. `throw $e` est alors à nouveau exécutée comme si l'exception n'avait jamais été capturée, ce qui permet au processus normal de gestion des erreurs de s'en occuper. > Note: dans le code précédent nous avons deux blocs « catch » pour compatibilité -> avec PHP 5.x et PHP 7.x. `\Exception` met en œuvre l'[interface `\Throwable`](https://www.php.net/manual/en/class.throwable.php) +> avec PHP 5.x et PHP 7.x. `\Exception` met en œuvre l'[interface `\Throwable`](https://www.php.net/manual/fr/class.throwable.php) > depuis PHP 7.0, ainsi vous pouvez sauter la partie avec `\Exception` si votre application utilise seulement PHP 7.0 et plus récent. ### Spécification de niveaux d'isolation @@ -366,7 +366,7 @@ Notez que quelques systèmes de gestion de base de données autorisent la défin > Note: PostgreSQL n'autorise pas la définition du niveau d'isolation tant que la transaction n'a pas démarré, aussi ne pouvez-vous pas spécifier le niveau d'isolation directement en démarrant la transaction. Dans ce cas, vous devez appeler [[yii\db\Transaction::setIsolationLevel()]] après que la transaction a démarré. -[isolation levels]: https://en.wikipedia.org/wiki/Isolation_%28database_systems%29#Isolation_levels +[isolation levels]: https://fr.wikipedia.org/wiki/Isolation_(informatique) ### Imbrication des transactions @@ -415,7 +415,7 @@ try { ## Réplication et éclatement lecture-écriture -Beaucoup de systèmes de gestion de bases de données prennent en charge la [réplication de la base de données](https://en.wikipedia.org/wiki/Replication_(computing)#Database_replication) pour obtenir une meilleure disponibilité et des temps de réponse de serveur plus courts. Avec la réplication de la base de données, les données sont répliquées depuis les serveurs dits *serveurs maîtres* vers les serveurs dit *serveurs esclaves*. Toutes les écritures et les mises à jour ont lieu sur les serveurs maîtres, tandis que les lectures ont lieu sur les serveurs esclaves. +Beaucoup de systèmes de gestion de bases de données prennent en charge la [réplication de la base de données](https://fr.wikipedia.org/wiki/R%C3%A9plication_(informatique)) pour obtenir une meilleure disponibilité et des temps de réponse de serveur plus courts. Avec la réplication de la base de données, les données sont répliquées depuis les serveurs dits *serveurs maîtres* vers les serveurs dit *serveurs esclaves*. Toutes les écritures et les mises à jour ont lieu sur les serveurs maîtres, tandis que les lectures ont lieu sur les serveurs esclaves. Pour tirer parti de la réplication des bases de données et réaliser l'éclatement lecture-écriture, vous pouvez configurer un composant [[yii\db\Connection]] comme le suivant : diff --git a/docs/guide-fr/db-query-builder.md b/docs/guide-fr/db-query-builder.md index ecfdc9c8dd2..c953f54090e 100644 --- a/docs/guide-fr/db-query-builder.md +++ b/docs/guide-fr/db-query-builder.md @@ -771,7 +771,7 @@ foreach ($query->each() as $username => $user) { #### Limitations des requêtes par lots dans MySQL La mise en œuvre des requêtes par lots de MySQL s'appuie sur la bibliothèque du pilote PDO. Par défaut, les requêtes MySQL sont -[`mises en tampon`](https://www.php.net/manual/en/mysqlinfo.concepts.buffering.php). +[`mises en tampon`](https://www.php.net/manual/fr/mysqlinfo.concepts.buffering.php). Cela empêche d'utiliser le curseur pour obtenir les données, parce que cela n'empêche pas le jeu résultant complet d'être chargé dans la mémoire du client par le pilote. 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 2f3871d6431..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); @@ -326,7 +326,7 @@ Si vous désirez utiliser utiliser un style externe d'un fichier CSS : génère ``` @@ -373,7 +373,7 @@ Pour générer une balise image, utilisez le code suivant : qui génère -My logo +My logo ``` En plus des [alias](concept-aliases.md), le premier argument accepte les routes, les paramètres et les URL, tout comme [Url::to()](helper-url.md). diff --git a/docs/guide-fr/helper-url.md b/docs/guide-fr/helper-url.md index 17d2180e2ed..917877b1a91 100644 --- a/docs/guide-fr/helper-url.md +++ b/docs/guide-fr/helper-url.md @@ -68,7 +68,7 @@ echo Url::toRoute(['site/index', 'src' => 'ref1', '#' => 'name']); // /index.php?r=post%2Fedit&id=100 assume the alias "@postEdit" is defined as "post/edit" echo Url::toRoute(['@postEdit', 'id' => 100]); -// http://www.example.com/index.php?r=site%2Findex +// https://www.example.com/index.php?r=site%2Findex echo Url::toRoute('site/index', true); // https://www.example.com/index.php?r=site%2Findex @@ -108,7 +108,7 @@ echo Url::to('@web/images/logo.gif'); // images/logo.gif echo Url::to('images/logo.gif'); -// http://www.example.com/images/logo.gif +// https://www.example.com/images/logo.gif echo Url::to('@web/images/logo.gif', true); // https://www.example.com/images/logo.gif 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/input-forms.md b/docs/guide-fr/input-forms.md index d55d4e471a4..ff8b42a7e7a 100644 --- a/docs/guide-fr/input-forms.md +++ b/docs/guide-fr/input-forms.md @@ -141,7 +141,7 @@ Pjax::end(); Il y a des problèmes connus avec l'utilisation de `jQuery.serializeArray()` lorsqu'on manipule des [fichiers](https://github.com/jquery/jquery/issues/2321) et des [valeurs de boutons de soumission](https://github.com/jquery/jquery/issues/2321) qui ne peuvent être résolus et sont plutôt rendus obsolète en faveur de la classe `FormData` introduite en HTML5. -Cela siginifie que la seule prise en charge officielle pour les fichiers et les valeurs de boutons de soumission avec ajax, ou en utilisant le composant graphique [[yii\widgets\Pjax|Pjax]], dépend de la [prise en charge par le navigateur](https://developer.mozilla.org/en-US/docs/Web/API/FormData#Browser_compatibility) de la classe `FormData`. +Cela siginifie que la seule prise en charge officielle pour les fichiers et les valeurs de boutons de soumission avec ajax, ou en utilisant le composant graphique [[yii\widgets\Pjax|Pjax]], dépend de la [prise en charge par le navigateur](https://developer.mozilla.org/fr/docs/Web/API/FormData#compatibilit%C3%A9_des_navigateurs) de la classe `FormData`. Lectures d'approfondissement ---------------------------- diff --git a/docs/guide-fr/output-client-scripts.md b/docs/guide-fr/output-client-scripts.md index c45f4ce9474..0466ecf8d44 100644 --- a/docs/guide-fr/output-client-scripts.md +++ b/docs/guide-fr/output-client-scripts.md @@ -28,7 +28,7 @@ Le dernier argument est un identifiant unique du script utilisé pour identifier Un script externe peut être ajouté comme expliqué ci-dessous : ```php -$this->registerJsFile('http://example.com/js/main.js', ['depends' => [\yii\web\JqueryAsset::class]]); +$this->registerJsFile('https://example.com/js/main.js', ['depends' => [\yii\web\JqueryAsset::class]]); ``` Les arguments pour [[yii\web\View::registerJsFile()|registerJsFile()]] sont semblables à ceux utilisés pour [[yii\web\View::registerCssFile()|registerCssFile()]]. Dans l'exemple précédent, nous enregistrons le fichier `main.js` avec une dépendance sur `JqueryAsset`. Cela siginifie que le fichier `main.js` sera ajouté APRÈS `jquery.js`. Sans la spécification de cette dépendance, l'ordre relatif entre `main.js` et `jquery.js` resterait indéfini. @@ -64,7 +64,7 @@ body { background: #f00; } Si vous désirez spécifier des propriétés additionnelles du style balise, passez un tableau des paires nom-valeur en tant que troisième argument. Si vous avez besoin de vous assurer qu'il y a seulement une balise style unique, utilisez un quatrième argument comme cela a été mentionné dans la description des balises méta. ```php -$this->registerCssFile("http://example.com/css/themes/black-and-white.css", [ +$this->registerCssFile("https://example.com/css/themes/black-and-white.css", [ 'depends' => [BootstrapAsset::class], 'media' => 'print', ], 'css-print-theme'); diff --git a/docs/guide-fr/output-formatting.md b/docs/guide-fr/output-formatting.md index bfdef0316bb..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](http://userguide.icu-project.org/formatparse/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 @@ -107,7 +107,7 @@ echo Yii::$app->formatter->asTime('2014-10-06 12:41:00'); // 14:41:00 echo Yii::$app->formatter->asTime('2014-10-06 14:41:00 CEST'); // 14:41:00 ``` -> Note: comme les fuseaux horaires sont assujettis à des règles fixées par les gouvernements du monde entier, et que ces règles peuvent varier fréquemment, il est vraisemblable que vous n'ayez pas la dernière information dans la base de données des fuseaux horaires installée sur votre système. Vous pouvez vous reporter au [manuel d'ICU](http://userguide.icu-project.org/datetime/timezone#TOC-Updating-the-Time-Zone-Data) pour des informations sur la manière de mettre cette base de données à jour. Reportez-vous aussi au tutoriel [Configurer votre environnement PHP pour l'internationalisation](tutorial-i18n.md#setup-environment). +> Note: comme les fuseaux horaires sont assujettis à des règles fixées par les gouvernements du monde entier, et que ces règles peuvent varier fréquemment, il est vraisemblable que vous n'ayez pas la dernière information dans la base de données des fuseaux horaires installée sur votre système. Vous pouvez vous reporter au [manuel d'ICU](https://unicode-org.github.io/icu/userguide/datetime/timezone/#updating-the-time-zone-data) pour des informations sur la manière de mettre cette base de données à jour. Reportez-vous aussi au tutoriel [Configurer votre environnement PHP pour l'internationalisation](tutorial-i18n.md#setup-environment). ## Formatage des nombres @@ -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/runtime-requests.md b/docs/guide-fr/runtime-requests.md index e2bcdc726a9..ec0607f852f 100644 --- a/docs/guide-fr/runtime-requests.md +++ b/docs/guide-fr/runtime-requests.md @@ -76,12 +76,12 @@ if ($request->isPut) { /* la méthode de requête est requête PUT */ } Le composant `request` fournit plusieurs manières d'inspecter l'URL couramment requise. -En supposant que l'URL requise soit `http://example.com/admin/index.php/product?id=100`, vous pouvez obtenir différentes parties de cette URL comme c'est résumé ci-dessous : +En supposant que l'URL requise soit `https://example.com/admin/index.php/product?id=100`, vous pouvez obtenir différentes parties de cette URL comme c'est résumé ci-dessous : * [[yii\web\Request::url|url]]: retourne`/admin/index.php/product?id=100`, qui est l'URL sans la partie hôte. -* [[yii\web\Request::absoluteUrl|absoluteUrl]]: retourne `http://example.com/admin/index.php/product?id=100`, qui est l'URL complète y compris la partie hôte. -* [[yii\web\Request::hostInfo|hostInfo]]: retourne `http://example.com`, qui est la partie hôte de l'URL. +* [[yii\web\Request::absoluteUrl|absoluteUrl]]: retourne `https://example.com/admin/index.php/product?id=100`, qui est l'URL complète y compris la partie hôte. +* [[yii\web\Request::hostInfo|hostInfo]]: retourne `https://example.com`, qui est la partie hôte de l'URL. * [[yii\web\Request::pathInfo|pathInfo]]: retourne `/product`, qui est la partie après le script d'entrée et avant le point d'interrogation (chaîne de requête). * [[yii\web\Request::queryString|queryString]]: retourne `id=100`, qui est la partie après le point d'interrogation. diff --git a/docs/guide-fr/runtime-responses.md b/docs/guide-fr/runtime-responses.md index bd82c6559fa..d00297348d0 100644 --- a/docs/guide-fr/runtime-responses.md +++ b/docs/guide-fr/runtime-responses.md @@ -143,7 +143,7 @@ Vous pouvez rediriger le navigateur sur une URL en appelant la méthode [[yii\we ```php public function actionOld() { - return $this->redirect('http://example.com/new', 301); + return $this->redirect('https://example.com/new', 301); } ``` @@ -152,7 +152,7 @@ Dans le code précédent, la méthode d'action retourne le résultat de la méth Dans des endroits autres que les méthodes d'action, vous devez appeler la méthode [[yii\web\Response::redirect()]] directement, suivi d'un appel chaîné à la méthode [[yii\web\Response::send()]] pour garantir qu'aucun contenu supplémentaire ne sera ajouté à la réponse. ```php -\Yii::$app->response->redirect('http://example.com/new', 301)->send(); +\Yii::$app->response->redirect('https://example.com/new', 301)->send(); ``` > Info: par défaut la méthode [[yii\web\Response::redirect()]] définit le code d'état à 302 pour indiquer au navigateur que la ressource requise est *temporairement* située sous un URI différent. Vous pouvez passer un code 301 pour dire au navigateur que la ressource a été déplacée *de manière permanente*. diff --git a/docs/guide-fr/runtime-routing.md b/docs/guide-fr/runtime-routing.md index 310e4695d8c..05c59e09a51 100644 --- a/docs/guide-fr/runtime-routing.md +++ b/docs/guide-fr/runtime-routing.md @@ -156,7 +156,7 @@ echo Url::to(['post/view', 'id' => 100]); // crée une URL avec ancre : /index.php?r=post%2Fview&id=100#content echo Url::to(['post/view', 'id' => 100, '#' => 'content']); -// crée une URL absolue : http://www.example.com/index.php?r=post%2Findex +// crée une URL absolue : https://www.example.com/index.php?r=post%2Findex echo Url::to(['post/index'], true); // crée une URL absolue en utilisant le schéma https : https://www.example.com/index.php?r=post%2Findex @@ -214,11 +214,11 @@ use yii\helpers\Url; // URL couramment requise : /index.php?r=admin%2Fpost%2Findex echo Url::to(); -// un alias d'URL: http://example.com -Yii::setAlias('@example', 'http://example.com/'); +// un alias d'URL: https://example.com +Yii::setAlias('@example', 'https://example.com/'); echo Url::to('@example'); -// une URL absolue : http://example.com/images/logo.gif +// une URL absolue : https://example.com/images/logo.gif echo Url::to('/images/logo.gif', true); ``` @@ -235,7 +235,7 @@ echo Url::home(); echo Url::base(); // l'URL canonique de l'URL couramment requise -// voir https://en.wikipedia.org/wiki/Canonical_link_element +// voir https://fr.wikipedia.org/wiki/%C3%89l%C3%A9ment_de_lien_canonique echo Url::canonical(); // mémorise l'URL couramment requise et la retrouve dans les requêtes subséquentes @@ -442,18 +442,18 @@ le premier paramètre peut être omis seulement si tous les autres paramètres l ### Règles avec des noms de serveur Il est possible d'inclure des noms de serveur Web dans le motif d'une règle d'URL. Cela est principalement utilisé lorsque votre application doit se comporter différemment selon le nom du serveur Web. -Par exemple, les règles suivantes analysent et résolvent l'URL `http://admin.example.com/login` en la route `admin/user/login` -et `http://www.example.com/login` en la route `site/login`. +Par exemple, les règles suivantes analysent et résolvent l'URL `https://admin.example.com/login` en la route `admin/user/login` +et `https://www.example.com/login` en la route `site/login`. ```php [ - 'http://admin.example.com/login' => 'admin/user/login', - 'http://www.example.com/login' => 'site/login', + 'https://admin.example.com/login' => 'admin/user/login', + 'https://www.example.com/login' => 'site/login', ] ``` Vous pouvez aussi inclure des paramètres dans les noms de serveurs pour en extraire de l'information dynamique. -Par exemple, la règle suivante analyse et résout l'URL `http://en.example.com/posts` en la route `post/index` et le paramètre `language=en`. +Par exemple, la règle suivante analyse et résout l'URL `https://en.example.com/posts` en la route `post/index` et le paramètre `language=en`. ```php [ @@ -465,7 +465,7 @@ Depuis la version 2.0.11, vous pouvez également utiliser des motifs relatifs au La syntaxe est la même que ci-dessus mais en sautant la partie `http`, p. ex. `'//www.example.com/login' => 'site/login'`. > Note: les règles avec des noms de serveur ne doivent **pas** comprendre le sous-dossier du script d'entrée dans leur motif. -Par exemple, si l'application est sous `http://www.example.com/sandbox/blog`, alors vous devez utiliser le motif `http://www.example.com/posts` au lieu de `http://www.example.com/sandbox/blog/posts`. +Par exemple, si l'application est sous `https://www.example.com/sandbox/blog`, alors vous devez utiliser le motif `https://www.example.com/posts` au lieu de `https://www.example.com/sandbox/blog/posts`. Cela permet à votre application d'être déployée sous n'importe quel dossier sans avoir à changer son code. Yii détecte automatiquement l'URL de base de l'application. @@ -633,9 +633,9 @@ Et utilisez la nouvelle classe de règle dans la configuration de [[yii\web\UrlM Depuis la version 2.0.10, le [[yii\web\UrlManager|gestionnaire d'URL]] peut être configuré pour utiliser le [[yii\web\UrlNormalizer|normalisateur d'URL]] pour prendre en compte les variations de la même URL, p. ex. avec et sans la barre oblique de division de fin. -Parce que, techniquement, `http://example.com/path` -et `http://example.com/path/` sont des URL différentes, servir le même contenu pour chacune d'elles peut dégrader le classement SEO. -Par défaut, le normalisateur fusionne les barres obliques de division consécutives, ajoute ou retire des barres de division de fin selon que le suffixe comporte une barre de division de fin ou pas, et redirige vers la version normalisée de l'URL en utilisant la [redirection permanente](https://en.wikipedia.org/wiki/HTTP_301). +Parce que, techniquement, `https://example.com/path` +et `https://example.com/path/` sont des URL différentes, servir le même contenu pour chacune d'elles peut dégrader le classement SEO. +Par défaut, le normalisateur fusionne les barres obliques de division consécutives, ajoute ou retire des barres de division de fin selon que le suffixe comporte une barre de division de fin ou pas, et redirige vers la version normalisée de l'URL en utilisant la [redirection permanente](https://fr.wikipedia.org/wiki/HTTP_301). Le normalisateur peut être configuré globalement pour le gestionnaire d'URL ou individuellement pour chacune des règles — par défaut, chacune des règles utilise le normalisateur du gestionnaire d'URL. Vous pouvez définir [[yii\web\UrlRule::$normalizer|UrlRule::$normalizer]] à `false` pour désactiver la normalisation pour une règle d'URL particulière. 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-best-practices.md b/docs/guide-fr/security-best-practices.md index bf0cce4c6e1..b078741c0eb 100644 --- a/docs/guide-fr/security-best-practices.md +++ b/docs/guide-fr/security-best-practices.md @@ -119,9 +119,9 @@ Notez que le processus de HtmlPurifier est très lourd, c'est pourquoi vous dev La CSRF est une abréviation de cross-site request forgery (falsification de requête inter sites). L'idée est que beaucoup d'applications partent du principe que les requêtes provenant d'un navigateur sont fabriquées par l'utilisateur lui-même. Cela peut être faux. -Par exemple, un site web `an.example.com` a une URL `/logout`, qui, lorsqu'elle est accédée en utilisant une simple requête GET, déconnecte l'utilisateur. Tant qu'il s'agit d'une requête de l'utilisateur lui-même, tout va bien. Mais, un jour, des gens mal intentionnés, postent `` sur un forum que l'utilisateur visite fréquemment. Le navigateur ne fait pas de différence entre la requête d'une image et celle d'une page. C'est pourquoi, lorsque l'utilisateur ouvre une page avec une telle balise `img`, le navigateur envoie la requête GET vers cette URL, et l'utilisateur est déconnecté du site `an.example.com`. +Par exemple, un site web `an.example.com` a une URL `/logout`, qui, lorsqu'elle est accédée en utilisant une simple requête GET, déconnecte l'utilisateur. Tant qu'il s'agit d'une requête de l'utilisateur lui-même, tout va bien. Mais, un jour, des gens mal intentionnés, postent `` sur un forum que l'utilisateur visite fréquemment. Le navigateur ne fait pas de différence entre la requête d'une image et celle d'une page. C'est pourquoi, lorsque l'utilisateur ouvre une page avec une telle balise `img`, le navigateur envoie la requête GET vers cette URL, et l'utilisateur est déconnecté du site `an.example.com`. -C'est l'idée de base. D'aucuns diront que déconnecter un utilisateur n'a rien de très sérieux, mais les gens mal intentionnés peuvent faire bien plus, à partir de cette idée. Imaginez qu'un site web possède une URL `http://an.example.com/purse/transfer?to=anotherUser&amount=2000`. Accéder à cette URL en utilisant une requête GET, provoque le transfert de 2000 € d'un compte autorisé à l'utilisateur vers un autre compte `anotherUser`. Nous savons que le navigateur envoie toujours une requête GET pour charger une image. Nous pouvons donc modifier le code pour que seules des requêtes POST soient acceptées sur cette URL. Malheureusement, cela ne nous est pas d'un grand secours parce qu'un attaquant peut placer un peu le JavaScript à la place de la balise ``, ce qui permet d'envoyer des requêtes POST sur cette URL: +C'est l'idée de base. D'aucuns diront que déconnecter un utilisateur n'a rien de très sérieux, mais les gens mal intentionnés peuvent faire bien plus, à partir de cette idée. Imaginez qu'un site web possède une URL `https://an.example.com/purse/transfer?to=anotherUser&amount=2000`. Accéder à cette URL en utilisant une requête GET, provoque le transfert de 2000 € d'un compte autorisé à l'utilisateur vers un autre compte `anotherUser`. Nous savons que le navigateur envoie toujours une requête GET pour charger une image. Nous pouvons donc modifier le code pour que seules des requêtes POST soient acceptées sur cette URL. Malheureusement, cela ne nous est pas d'un grand secours parce qu'un attaquant peut placer un peu le JavaScript à la place de la balise ``, ce qui permet d'envoyer des requêtes POST sur cette URL: Afin d'éviter la falsification des requêtes inter-sites vous devez toujours : 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/start-databases.md b/docs/guide-fr/start-databases.md index 7746d4060da..67298866504 100644 --- a/docs/guide-fr/start-databases.md +++ b/docs/guide-fr/start-databases.md @@ -222,7 +222,7 @@ Essayer Pour voir comment tout le code ci-dessus fonctionne, pointez votre navigateur sur l'URL suivante : ``` -http://hostname/index.php?r=country/index +https://hostname/index.php?r=country/index ``` ![Liste de Pays](images/start-country-list.png) @@ -233,7 +233,7 @@ page d'enregistrements. Observez plus attentivement et vous noterez que l'URL dans le navigateur devient ``` -http://hostname/index.php?r=country/index&page=2 +https://hostname/index.php?r=country/index&page=2 ``` En coulisse, [[yii\data\Pagination|Pagination]] fournit toutes les fonctionnalités permettant de paginer un ensemble de données : diff --git a/docs/guide-fr/start-forms.md b/docs/guide-fr/start-forms.md index 1072663cd29..8bced19e09f 100644 --- a/docs/guide-fr/start-forms.md +++ b/docs/guide-fr/start-forms.md @@ -193,7 +193,7 @@ Essayer Pour voir comment ça fonctionne, utilisez votre navigateur pour accéder à l'URL suivante : ``` -http://hostname/index.php?r=site/entry +https://hostname/index.php?r=site/entry ``` Vous verrez une page affichant un formulaire comportant deux champs de saisie. Devant chaque champ de saisie, une diff --git a/docs/guide-fr/start-gii.md b/docs/guide-fr/start-gii.md index 5c99e6ffd0f..f624060616e 100644 --- a/docs/guide-fr/start-gii.md +++ b/docs/guide-fr/start-gii.md @@ -39,7 +39,7 @@ defined('YII_ENV') or define('YII_ENV', 'dev'); Grâce à cette ligne, votre application est en mode développement, et active Gii, suivant la configuration vue ci-dessus. Vous pouvez maintenant accéder à Gii via l’URL suivante : ``` -http://hostname/index.php?r=gii +https://hostname/index.php?r=gii ``` > Note : si vous accédez à Gii depuis une machine autre que localhost, l’accès sera refusé par défaut pour des raisons @@ -103,7 +103,7 @@ Essayer Pour voir comment ça fonctionne, utilisez votre navigateur pour accéder à l’URL suivant : ``` -http://hostname/index.php?r=country/index +https://hostname/index.php?r=country/index ``` Vous verrez une grille de données montrant les pays de la table de la base de données. Vous pouvez trier la table, ou lui appliquer des filtres en entrant des conditions de filtrage dans les entêtes de colonnes. diff --git a/docs/guide-fr/start-hello.md b/docs/guide-fr/start-hello.md index a7215af909a..fdb9110b23b 100644 --- a/docs/guide-fr/start-hello.md +++ b/docs/guide-fr/start-hello.md @@ -84,7 +84,7 @@ Essayer Après avoir créé l'action et la vue, vous pouvez accéder à la nouvelle page en accédant à l'URL suivant : ``` -http://hostname/index.php?r=site/dire&message=Hello+World +https://hostname/index.php?r=site/dire&message=Hello+World ``` ![Hello World](images/start-hello-world.png) diff --git a/docs/guide-fr/start-installation.md b/docs/guide-fr/start-installation.md index a989b7bd6bc..d406befa6b3 100644 --- a/docs/guide-fr/start-installation.md +++ b/docs/guide-fr/start-installation.md @@ -156,7 +156,7 @@ Configuration du serveur Web L'application installée selon les instructions ci-dessus devrait fonctionner *out of the box* (sans configuration supplémentaire) avec le [serveur HTTP Apache](https://httpd.apache.org/) ou le [serveur HTTP Nginx](https://nginx.org/), sous Windows, Mac OX X, ou Linux avec PHP 5.4 ou plus récent. Yii 2.0 est aussi compatible avec [HHVM](https://hhvm.com/) de Facebook. Cependant, il existe des cas marginaux pour lesquels HHVM se comporte différemment du PHP natif; c'est pourquoi vous devez faire plus attention en utilisant HHVM.. -Sur un serveur de production, vous pouvez configurer votre serveur Web afin que l'application soit accessible via l'URL `http://www.example.com/index.php` au lieu de `http://www.example.com/basic/web/index.php`. Cela implique que le dossier racine de votre serveur Web pointe vers le dossier `basic/web`. +Sur un serveur de production, vous pouvez configurer votre serveur Web afin que l'application soit accessible via l'URL `https://www.example.com/index.php` au lieu de `https://www.example.com/basic/web/index.php`. Cela implique que le dossier racine de votre serveur Web pointe vers le dossier `basic/web`. Vous pouvez également cacher `index.php` dans l'URL, comme décrit dans la partie [Génération et traitement des URL](runtime-url-handling.md), vous y apprendrez comment configurer votre serveur Apache ou Nginx pour atteindre ces objectifs. > Note: en utilisant `basic/web` comme dossier racine, vous empêchez également aux utilisateurs finaux d'accéder à votre code d'application privé et fichiers de données sensibles qui sont stockés dans le dossier `basic`. Refuser l'accès à ces ressources est une amélioration de la sécurité. @@ -194,7 +194,7 @@ DocumentRoot "path/to/basic/web" ### Configuration Nginx recommandée -Pour utiliser Nginx, vous devez avoir installé PHP en utilisant [FPM SAPI](https://www.php.net/install.fpm). +Pour utiliser Nginx, vous devez avoir installé PHP en utilisant [FPM SAPI](https://www.php.net/manual/fr/install.fpm.php). Utilisez la configuration Nginx suivante, en remplaçant `path/to/basic/web` par le chemin vers le dossier `basic/web` et `mysite.test` par le nom d'hôte de votre serveur. ```nginx diff --git a/docs/guide-fr/start-workflow.md b/docs/guide-fr/start-workflow.md index 545cd83085d..8eccb4d4613 100644 --- a/docs/guide-fr/start-workflow.md +++ b/docs/guide-fr/start-workflow.md @@ -1,13 +1,13 @@ Fonctionnement des applications =============================== -Après avoir installé Yii, vous obtenez une application Yii fonctionnelle accessible via l'URL `http://hostname/basic/web/index.php` ou `http://hostname/index.php`, en fonction +Après avoir installé Yii, vous obtenez une application Yii fonctionnelle accessible via l'URL `https://hostname/basic/web/index.php` ou `https://hostname/index.php`, en fonction de votre configuration. Cette section vous initiera aux fonctionnalités intégrées à l'application, à la manière dont le code est organisé et à la gestion des requêtes par l'application. > Info: pour simplifier, au long de ce tutoriel de démarrage, nous supposerons que `basic/web` est la racine de votre serveur Web, et que vous avez configuré l'URL pour accéder à votre application comme suit ou de façon similaire : - `http://hostname/index.php`. + `https://hostname/index.php`. Pour vos besoins, merci d'ajuster les URLs dans notre description comme il convient. Notez que contrairement au framework lui-même, après avoir installé un modèle de projet, vous êtes entièrement libre d'en disposer. Vous êtes libre d'ajouter ou de supprimer du code selon vos besoins. @@ -17,7 +17,7 @@ Fonctionnalité L'application basique installée contient quatre pages : -* La page d'accueil, affichée quand vous accédez à l'URL `http://hostname/index.php`, +* La page d'accueil, affichée quand vous accédez à l'URL `https://hostname/index.php`, * la page "About" (À Propos), * la page "Contact", qui présente un formulaire de contact permettant aux utilisateurs finaux de vous contacter par courriel, * et la page "Login" (Connexion), qui présente un formulaire de connexion qui peut être utilisé pour authentifier des utilisateurs finaux. Essayez de vous connecter @@ -37,7 +37,7 @@ Structure de l'application Les répertoires et fichiers les plus importants de votre application sont (en supposant que le répertoire racine de l'application est `basic`) : -```js +``` basic/ chemin de base de l'application composer.json utilisé par Composer, décrit les information de paquets config/ contient les configurations de l'application et autres diff --git a/docs/guide-fr/structure-applications.md b/docs/guide-fr/structure-applications.md index 2d93660f1d9..885932578cc 100644 --- a/docs/guide-fr/structure-applications.md +++ b/docs/guide-fr/structure-applications.md @@ -234,7 +234,7 @@ La valeur par défaut de cette propriété est `en`, pour anglais. Vous devez c La valeur de cette propriété détermine des aspects variés de l'[internationalisation](tutorial-i18n.md) tels que la traduction des messages, le formatage des dates et des nombres, etc. Par exemple, l'objet graphique [[yii\jui\DatePicker]] utilise la valeur de cette propriété pour déterminer dans quelle langue le calendrier doit être affiché et comment les dates doivent être formatées. -La spécification de la langue par une [étiquette IETF d'identification de langue ](https://en.wikipedia.org/wiki/IETF_language_tag) est recommandée. Par exemple, `en` signifie anglais, tandis que `en-US` signifie anglais (États-Unis).. +La spécification de la langue par une [étiquette IETF d'identification de langue ](https://fr.wikipedia.org/wiki/%C3%89tiquette_d%27identification_de_langues_IETF) est recommandée. Par exemple, `en` signifie anglais, tandis que `en-US` signifie anglais (États-Unis).. Pour plus d'informations sur cette propriété, reportez-vous à la section [Internationalisation](tutorial-i18n.md). @@ -296,7 +296,7 @@ Plus tard, si vous changez d'avis à propos de la taille de ces vignettes, il vo Cette propriété spécifie la langue dans laquelle l'application est écrite. La valeur par défaut est `'en-US'`, pour (anglais — États-Unis). Vous devriez configurer cette propriété si les textes dans votre code ne sont pas en anglais US. -Comme pour la propriété [language (langue)](#language), vous devez configurer cette propriété à l'aide d'une [étiquette IETF d'identification de langue](http://en.wikipedia.org/wiki/IETF_language_tag). Par exemple, `en` signifie `anglais`, +Comme pour la propriété [language (langue)](#language), vous devez configurer cette propriété à l'aide d'une [étiquette IETF d'identification de langue](https://fr.wikipedia.org/wiki/%C3%89tiquette_d%27identification_de_langues_IETF). Par exemple, `en` signifie `anglais`, tandis que `en-US` signifie for `anglais-États-Unis`). Pour plus d'informations sur cette propriété, reportez-vous à la section [Internationalisation](tutorial-i18n.md). @@ -306,7 +306,7 @@ Pour plus d'informations sur cette propriété, reportez-vous à la section [Int Cette propriété est fournie comme une manière alternative de définir le fuseau horaire par défaut au moment de l'exécution du script PHP. En configurant cette propriété, vous ne faites essentiellement qu'appeler la fonction PHP -[date_default_timezone_set()](https://www.php.net/manual/en/function.date-default-timezone-set.php). Par exemple : +[date_default_timezone_set()](https://www.php.net/manual/fr/function.date-default-timezone-set.php). Par exemple : ```php [ diff --git a/docs/guide-fr/structure-assets.md b/docs/guide-fr/structure-assets.md index df87aee7b19..b057c0c1258 100644 --- a/docs/guide-fr/structure-assets.md +++ b/docs/guide-fr/structure-assets.md @@ -468,7 +468,7 @@ Si votre code dépend de jQuery, jQuery UI ou Bootstrap, vous devriez utiliser l ## Conversion de ressources -Au lieu d'écrire directement leur code CSS et/ou JavaScript, les développeurs l'écrivent souvent dans une syntaxe étendue et utilisent des outils spéciaux pour le convertir en CSS/JavaScript. Par exemple, pour le code CSS vous pouvez utiliser [LESS](https://lesscss.org/) ou [SCSS](https://sass-lang.com/); et pour JavaScript, vous pouvez utiliser [TypeScript](http://www.typescriptlang.org/). +Au lieu d'écrire directement leur code CSS et/ou JavaScript, les développeurs l'écrivent souvent dans une syntaxe étendue et utilisent des outils spéciaux pour le convertir en CSS/JavaScript. Par exemple, pour le code CSS vous pouvez utiliser [LESS](https://lesscss.org/) ou [SCSS](https://sass-lang.com/); et pour JavaScript, vous pouvez utiliser [TypeScript](https://www.typescriptlang.org/). Vous pouvez lister les fichiers de ressources écrits dans une syntaxe étendue dans les propriétés [[yii\web\AssetBundle::css|css]] et [[yii\web\AssetBundle::js|js]] d'un paquet de ressources. @@ -522,7 +522,7 @@ return [ Dans la syntaxe précédente, nous spécifions les syntaxes étendues prises en charge via la propriété [[yii\web\AssetConverter::commands]]. Les clés du tableau sont les extensions de nom de fichier (sans le point de tête), et les valeurs sont les extensions des fichiers de ressources résultants ainsi que les commandes pour effectuer les conversions. Les valeurs à remplacer `{from}` et `{to}` dans les commandes doivent être remplacées par les chemins de fichiers de ressources sources et les chemins de fichiers de ressources cibles. -> Info: il y a d'autres manières de travailler avec les ressources en syntaxe étendue, en plus de celle décrite ci-dessus. Par exemple, vous pouvez utiliser des outils de compilation comme [grunt](http://gruntjs.com/) pour surveiller et convertir automatiquement des ressources écrites en syntaxe étendue. Dans ce cas, vous devez lister les fichiers CSS/JavaScript résultants dans des paquets de ressources plutôt que les fichiers originaux. +> Info: il y a d'autres manières de travailler avec les ressources en syntaxe étendue, en plus de celle décrite ci-dessus. Par exemple, vous pouvez utiliser des outils de compilation comme [grunt](https://gruntjs.com/) pour surveiller et convertir automatiquement des ressources écrites en syntaxe étendue. Dans ce cas, vous devez lister les fichiers CSS/JavaScript résultants dans des paquets de ressources plutôt que les fichiers originaux. ## Combinaison et compression de ressources @@ -664,7 +664,7 @@ yii asset assets.php config/assets-prod.php Le fichier de configuration peut être inclus dans la configuration de l'application comme décrit dans la dernière sous-section . -> Info: l'utilisation de la commande `asset` n'est pas la seule option pour automatiser la combinaison et la compression des ressources. Vous pouvez utiliser l'excellent outil d'exécution de tâches [grunt](http://gruntjs.com/) pour arriver au même résultat. +> Info: l'utilisation de la commande `asset` n'est pas la seule option pour automatiser la combinaison et la compression des ressources. Vous pouvez utiliser l'excellent outil d'exécution de tâches [grunt](https://gruntjs.com/) pour arriver au même résultat. ### Regroupement des paquets de ressources diff --git a/docs/guide-fr/structure-controllers.md b/docs/guide-fr/structure-controllers.md index aa9fea4f1e7..f52b2328b1a 100644 --- a/docs/guide-fr/structure-controllers.md +++ b/docs/guide-fr/structure-controllers.md @@ -1,7 +1,7 @@ Contrôleurs =========== -Les contrôleurs font partie du modèle d'architecture [MVC](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller) (Modèle Vue Contrôleur). Ce sont des objets dont la classe étend [[yii\base\Controller]]. Ils sont chargés de traiter les requêtes et de générer les réponses. En particulier, après que l'objet [application](structure-applications.md) leur a passé le contrôle, ils analysent les données de la requête entrante, les transmettent aux [modèles](structure-models.md), injectent le résultat des modèles dans les [vues](structure-views.md) et, pour finir, génèrent les réponses sortantes. +Les contrôleurs font partie du modèle d'architecture [MVC](https://fr.wikipedia.org/wiki/Mod%C3%A8le-vue-contr%C3%B4leur) (Modèle Vue Contrôleur). Ce sont des objets dont la classe étend [[yii\base\Controller]]. Ils sont chargés de traiter les requêtes et de générer les réponses. En particulier, après que l'objet [application](structure-applications.md) leur a passé le contrôle, ils analysent les données de la requête entrante, les transmettent aux [modèles](structure-models.md), injectent le résultat des modèles dans les [vues](structure-views.md) et, pour finir, génèrent les réponses sortantes. ## Actions @@ -72,7 +72,7 @@ ou dans le format suivant si le contrôleur appartient à un module : identifiant_de_module/identifiant_de_contrôleur/identifiant_d_action ``` -Ainsi si un utilisateur requiert l'URL `http://hostname/index.php?r=site/index`, l'action `index` dans le contrôleur `site` sera exécutée. Pour plus de détails sur la façon dont les routes sont résolues, reportez-vous à la section [Routage et génération d'URL](runtime-routing.md). +Ainsi si un utilisateur requiert l'URL `https://hostname/index.php?r=site/index`, l'action `index` dans le contrôleur `site` sera exécutée. Pour plus de détails sur la façon dont les routes sont résolues, reportez-vous à la section [Routage et génération d'URL](runtime-routing.md). ## Création des contrôleurs @@ -143,7 +143,7 @@ Vous pouvez configurer [[yii\base\Application::controllerMap|controller map]] da ### Contrôleur par défaut -Chaque application possède un contrôleur par défaut spécifié via la propriété [[yii\base\Application::defaultRoute]]. Lorsqu'une requête ne précise aucune [route](#routes), c'est la route spécifiée par cette propriété qui est utilisée. Pour les [[yii\web\Application|applications Web]], sa valeur est `'site'`, tandis que pour les [[yii\console\Application|applications de console]], c'est `help`. Par conséquent, si une URL est de la forme `http://hostname/index.php`, c'est le contrôleur `site` qui prend la requête en charge. +Chaque application possède un contrôleur par défaut spécifié via la propriété [[yii\base\Application::defaultRoute]]. Lorsqu'une requête ne précise aucune [route](#routes), c'est la route spécifiée par cette propriété qui est utilisée. Pour les [[yii\web\Application|applications Web]], sa valeur est `'site'`, tandis que pour les [[yii\console\Application|applications de console]], c'est `help`. Par conséquent, si une URL est de la forme `https://hostname/index.php`, c'est le contrôleur `site` qui prend la requête en charge. Vous pouvez changer de contrôleur par défaut en utilisant la [configuration d'application](structure-applications.md#application-configurations) suivante : @@ -263,8 +263,8 @@ Dans les exemples ci-dessus, les valeurs de retour des actions sont toutes des c ```php public function actionForward() { - // redirect the user browser to http://example.com - return $this->redirect('http://example.com'); + // redirect the user browser to https://example.com + return $this->redirect('https://example.com'); } ``` @@ -289,10 +289,10 @@ class PostController extends Controller En fonction de la requête, les paramètres de l'action seront établis comme suit : -* `http://hostname/index.php?r=post/view&id=123`: le paramètre `$id` reçoit la valeur `'123'`, tandis que le paramètre `$version` reste `null` (sa valeur par défaut) car la requête ne contient aucun paramètre `version`. -* `http://hostname/index.php?r=post/view&id=123&version=2`: les paramètres `$id` et `$version` reçoivent les valeurs `'123'` et `'2'`, respectivement. -* `http://hostname/index.php?r=post/view`: une exception [[yii\web\BadRequestHttpException]] est levée car le paramètre obligatoire `$id` n'est pas fourni par la requête. -* `http://hostname/index.php?r=post/view&id[]=123`: une exception [[yii\web\BadRequestHttpException]] est levée car le paramètre `$id` reçoit, de manière inattendue, un tableau (`['123']`). +* `https://hostname/index.php?r=post/view&id=123`: le paramètre `$id` reçoit la valeur `'123'`, tandis que le paramètre `$version` reste `null` (sa valeur par défaut) car la requête ne contient aucun paramètre `version`. +* `https://hostname/index.php?r=post/view&id=123&version=2`: les paramètres `$id` et `$version` reçoivent les valeurs `'123'` et `'2'`, respectivement. +* `https://hostname/index.php?r=post/view`: une exception [[yii\web\BadRequestHttpException]] est levée car le paramètre obligatoire `$id` n'est pas fourni par la requête. +* `https://hostname/index.php?r=post/view&id[]=123`: une exception [[yii\web\BadRequestHttpException]] est levée car le paramètre `$id` reçoit, de manière inattendue, un tableau (`['123']`). Si vous voulez que votre paramètre d'action accepte un tableau, il faut, dans la définition de la méthode, faire allusion à son type, avec `array`, comme ceci : @@ -303,7 +303,7 @@ public function actionView(array $id, $version = null) } ``` -Désormais, si la requête est `http://hostname/index.php?r=post/view&id[]=123`, le paramètre `$id` accepte la valeur `['123']`. Si la requête est `http://hostname/index.php?r=post/view&id=123`, le paramètre `$id` accepte également la valeur transmise par la requête parce que les valeurs scalaires sont automatiquement convertie en tableau (*array*). +Désormais, si la requête est `https://hostname/index.php?r=post/view&id[]=123`, le paramètre `$id` accepte la valeur `['123']`. Si la requête est `https://hostname/index.php?r=post/view&id=123`, le paramètre `$id` accepte également la valeur transmise par la requête parce que les valeurs scalaires sont automatiquement convertie en tableau (*array*). Les exemples qui précèdent montrent essentiellement comment les paramètres d'action fonctionnent dans les applications Web. Pour les applications de console, reportez-vous à la section [Commandes de console](tutorial-console.md) pour plus de détails. diff --git a/docs/guide-fr/structure-extensions.md b/docs/guide-fr/structure-extensions.md index 3331b25fd91..82e419072db 100644 --- a/docs/guide-fr/structure-extensions.md +++ b/docs/guide-fr/structure-extensions.md @@ -317,7 +317,7 @@ Yii fournit les extensions du noyau suivantes (ou ["les extensions officielles"] - [yiisoft/yii2-shell](https://www.yiiframework.com/extension/yiisoft/yii2-shell): fournit un interprète de commandes (shell) basé sur [psysh](https://psysh.org/). - [yiisoft/yii2-smarty](https://www.yiiframework.com/extension/yiisoft/yii2-smarty) : fournit un moteur de modèles basé sur [Smarty](https://www.smarty.net/). - [yiisoft/yii2-sphinx](https://github.com/yiisoft/yii2-sphinx) : fournit la prise en charge de [Sphinx](https://www.yiiframework.com/extension/yiisoft/yii2-sphinx). Elle inclut des fonctionnalités telles que les requêtes de base, les enregistrements actifs, la génération de code, etc. -- [yiisoft/yii2-swiftmailer](https://www.yiiframework.com/extension/yiisoft/yii2-swiftmailer) : fournit les fonctionnalités d'envoi de courriels basées sur [swiftmailer](http://swiftmailer.org/). +- [yiisoft/yii2-swiftmailer](https://www.yiiframework.com/extension/yiisoft/yii2-swiftmailer) : fournit les fonctionnalités d'envoi de courriels basées sur [swiftmailer](https://swiftmailer.symfony.com/). - [yiisoft/yii2-twig](https://www.yiiframework.com/extension/yiisoft/yii2-twig) : fournit un moteur de modèles basé sur [Twig](https://twig.symfony.com/). Les extensions officielles suivantes sont valables pour les versions Yii 2.1 et plus récentes. Vous n'avez pas besoin de les installer car elles sont incluse dans le cœur du framework. diff --git a/docs/guide-fr/structure-filters.md b/docs/guide-fr/structure-filters.md index 7b4a8737fc6..6e4d03517fe 100644 --- a/docs/guide-fr/structure-filters.md +++ b/docs/guide-fr/structure-filters.md @@ -279,7 +279,7 @@ public function behaviors() ### [[yii\filters\Cors|Cors]] -*Cross-origin resource sharing* [CORS](https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS) est un mécanisme qui permet à des ressource (e.g. fonts, JavaScript, etc.) d'être requises d'un autre domaine en dehors du domaine dont la ressource est originaire. En particulier, les appels AJAX de Javascript peuvent utiliser le mécanisme *XMLHttpRequest*. Autrement, de telles requêtes "cross-domain" (inter domaines) seraient interdites par les navigateurs, à cause de la politique de sécurité dite d'origine identique (*same origin*). *CORS* définit une manière par laquelle le navigateur et le serveur interagissent pour déterminer si, oui ou non, la requête *cross-origin* (inter-site) est autorisée. +*Cross-origin resource sharing* [CORS](https://developer.mozilla.org/fr/docs/Web/HTTP/CORS) est un mécanisme qui permet à des ressource (e.g. fonts, JavaScript, etc.) d'être requises d'un autre domaine en dehors du domaine dont la ressource est originaire. En particulier, les appels AJAX de Javascript peuvent utiliser le mécanisme *XMLHttpRequest*. Autrement, de telles requêtes "cross-domain" (inter domaines) seraient interdites par les navigateurs, à cause de la politique de sécurité dite d'origine identique (*same origin*). *CORS* définit une manière par laquelle le navigateur et le serveur interagissent pour déterminer si, oui ou non, la requête *cross-origin* (inter-site) est autorisée. Le [[yii\filters\Cors|filtre Cors]] doit être défini avant les filtres d'authentification et/ou d'autorisation pour garantir que les entêtes CORS sont toujours envoyés. @@ -302,13 +302,13 @@ Consultez également la section sur les [contrôleurs REST](rest-controllers.md# Les filtrages Cors peuvent être peaufinés via la propriété [[yii\filters\Cors::$cors|$cors]]. -* `cors['Origin']`: un tableau utilisé pour définir les origines autorisées. Peut être `['*']` (tout le monde) ou `['http://www.myserver.net', 'http://www.myotherserver.com']`. Valeur par défaut  `['*']`. +* `cors['Origin']`: un tableau utilisé pour définir les origines autorisées. Peut être `['*']` (tout le monde) ou `['https://www.myserver.net', 'https://www.myotherserver.com']`. Valeur par défaut  `['*']`. * `cors['Access-Control-Request-Method']`: un tableau des verbes autorisés tel que `['GET', 'OPTIONS', 'HEAD']`. Valeur par défaut `['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS']`. * `cors['Access-Control-Request-Headers']`: un tableau des entêtes autorisés. Peut être`['*']` tous les entêtes ou certains spécifiquement `['X-Request-With']`. Valeur par défaut `['*']`. * `cors['Access-Control-Allow-Credentials']`: définit si la requête courante peut être faite en utilisant des identifiants de connexion. Peut être `true` (vrai), `false` (faux) ou `null` (non défini). Valeur par défaut `null`. * `cors['Access-Control-Max-Age']`: définit la durée de vie des requêtes de pré-vérification (*preflight requests*). Valeur par défaut `86400`. -Par exemple, autoriser CORS pour l'origine `http://www.myserver.net` avec les méthodes `GET`, `HEAD` et `OPTIONS` : +Par exemple, autoriser CORS pour l'origine `https://www.myserver.net` avec les méthodes `GET`, `HEAD` et `OPTIONS` : ```php use yii\filters\Cors; @@ -320,7 +320,7 @@ public function behaviors() [ 'class' => Cors::class, 'cors' => [ - 'Origin' => ['http://www.myserver.net'], + 'Origin' => ['https://www.myserver.net'], 'Access-Control-Request-Method' => ['GET', 'HEAD', 'OPTIONS'], ], ], @@ -340,7 +340,7 @@ public function behaviors() [ 'class' => Cors::class, 'cors' => [ - 'Origin' => ['http://www.myserver.net'], + 'Origin' => ['https://www.myserver.net'], 'Access-Control-Request-Method' => ['GET', 'HEAD', 'OPTIONS'], ], 'actions' => [ diff --git a/docs/guide-fr/structure-models.md b/docs/guide-fr/structure-models.md index bf4f385a5d2..be3f459e4c2 100644 --- a/docs/guide-fr/structure-models.md +++ b/docs/guide-fr/structure-models.md @@ -1,7 +1,7 @@ Modèles ======= -Les modèles font partie du modèle d'architecture [MVC](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller) (Modèle Vue Contrôleur). +Les modèles font partie du modèle d'architecture [MVC](https://fr.wikipedia.org/wiki/Mod%C3%A8le-vue-contr%C3%B4leur) (Modèle Vue Contrôleur). Ces objets représentent les données à traiter, les règles et la logique de traitement. Vous pouvez créer des classes de modèle en étendant la classe [[yii\base\Model]] ou ses classe filles. La classe de base [[yii\base\Model]] prend en charge des fonctionnalités nombreuses et utiles : diff --git a/docs/guide-fr/structure-modules.md b/docs/guide-fr/structure-modules.md index 2e3f04e7cfc..d04e02b4706 100644 --- a/docs/guide-fr/structure-modules.md +++ b/docs/guide-fr/structure-modules.md @@ -8,7 +8,7 @@ Les modules sont des unités logicielles auto-suffisantes constituées de [modè Un module est organisé comme un dossier qui est appelé le [[yii\base\Module::basePath|dossier de base (*basePath*)]] du module. Dans ce dossier, se trouvent des sous-dossiers, tels que `controllers`, `models` et `views`, qui contiennent les contrôleurs, les modèles , les vues et d'autres parties de code, juste comme une application. L'exemple suivant présente le contenu d'un module : -```js +``` forum/ Module.php le fichier de classe du module controllers/ contient les fichiers de classe des contrôleurs diff --git a/docs/guide-fr/structure-overview.md b/docs/guide-fr/structure-overview.md index dd6e4ee94f2..1010e2a7318 100644 --- a/docs/guide-fr/structure-overview.md +++ b/docs/guide-fr/structure-overview.md @@ -2,7 +2,7 @@ Vue d'ensemble ======== Les applications Yii sont organisées suivant le modèle de conception -[model-view-controller (MVC)](https://wikipedia.org/wiki/Model-view-controller). Les [Modèles](structure-models.md) +[model-view-controller (MVC)](https://fr.wikipedia.org/wiki/Mod%C3%A8le-vue-contr%C3%B4leur). Les [Modèles](structure-models.md) représentent les données, la logique métier et les règles; les [vues](structure-views.md) sont les représentations visuelles des modèles, et les [contrôleurs](structure-controllers.md) prennent une entrée et la convertissent en commandes pour les [modèles](structure-models.md) et les [vues](structure-views.md). diff --git a/docs/guide-fr/structure-views.md b/docs/guide-fr/structure-views.md index 8f90ccc2000..51722c68f9c 100644 --- a/docs/guide-fr/structure-views.md +++ b/docs/guide-fr/structure-views.md @@ -1,7 +1,7 @@ Vues ===== -Les vues font partie du modèle d'architecture [MVC](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller) (Modèle Vue Contrôleur). +Les vues font partie du modèle d'architecture [MVC](https://fr.wikipedia.org/wiki/Mod%C3%A8le-vue-contr%C3%B4leur) (Modèle Vue Contrôleur). Elles sont chargées de présenter les données à l'utilisateur final. Dans une application Web, les vues sont ordinairement créées en termes de *modèles de vue* qui sont des script PHP contenant principalement du code HTML et du code PHP relatif à la présentation. Elles sont gérées par le [[yii\web\View|view]] [composant application](structure-application-components.md) qui fournit des méthodes d'usage courant pour faciliter la composition des vues et leur rendu. Par souci de simplicité, nous appellerons *vues* les modèles de vue et les fichiers de modèle de vue. @@ -42,7 +42,7 @@ En plus de `$this`, il peut aussi y avoir d'autres variables prédéfinies dans ### Sécurité -Lors de la création de vues qui génèrent des pages HTML, il est important que vous encodiez et/ou filtriez les données en provenance de l'utilisateur final avant des les présenter. Autrement, votre application serait sujette aux [attaques par injection de scripts (*cross-site scripting*)](https://en.wikipedia.org/wiki/Cross-site_scripting). +Lors de la création de vues qui génèrent des pages HTML, il est important que vous encodiez et/ou filtriez les données en provenance de l'utilisateur final avant des les présenter. Autrement, votre application serait sujette aux [attaques par injection de scripts (*cross-site scripting*)](https://fr.wikipedia.org/wiki/Cross-site_scripting). Pour afficher du texte simple, commencez par l'encoder en appelant la méthode [[yii\helpers\Html::encode()]]. Par exemple, le code suivant encode le nom d'utilisateur (*username*) avant de l'afficher : diff --git a/docs/guide-fr/structure-widgets.md b/docs/guide-fr/structure-widgets.md index ececdee2600..9157f894d95 100644 --- a/docs/guide-fr/structure-widgets.md +++ b/docs/guide-fr/structure-widgets.md @@ -52,7 +52,7 @@ use yii\helpers\Html; Notez que contrairement à la méthode [[yii\base\Widget::widget()]] qui retourne le résultat du rendu d'un objet graphique, la méthode [[yii\base\Widget::begin()]] retourne une instance de l'objet graphique que vous pouvez utiliser pour construire le contenu de l'objet d'interface. -> Note: quelques objets graphiques utilisent [la mise en tampon de sortie](https://www.php.net/manual/en/book.outcontrol.php) +> Note: quelques objets graphiques utilisent [la mise en tampon de sortie](https://www.php.net/manual/fr/book.outcontrol.php) > pour ajuster le contenu inclus quand la méthode [[yii\base\Widget::end()]] est appelée. > Pour cette raison, l'appel des méthodes [[yii\base\Widget::begin()]] et > [[yii\base\Widget::end()]] est attendu dans le même fichier de vue. 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-id/intro-upgrade-from-v1.md b/docs/guide-id/intro-upgrade-from-v1.md index 748e0913275..ea6c9a50106 100644 --- a/docs/guide-id/intro-upgrade-from-v1.md +++ b/docs/guide-id/intro-upgrade-from-v1.md @@ -1,5 +1,4 @@ -Upgrade dari Versi 1.1 -========================== +# Upgrade dari Versi 1.1 Ada banyak perbedaan antara versi 1.1 dan 2.0 karena Yii Framework benar-benar ditulis ulang di versi 2.0. Akibatnya, upgrade dari versi 1.1 tidak mudah seperti upgrade untuk versi minor. Dalam panduan ini Anda akan @@ -8,65 +7,53 @@ menemukan perbedaan utama antara dua versi. Jika Anda belum pernah menggunakan Yii 1.1 sebelumnya, Anda dapat dengan aman melewati bagian ini dan menuju ke "[Persiapan](start-installation.md)". Harap dicatat bahwa Yii 2.0 memperkenalkan lebih banyak fitur baru dari yang tercakup dalam ringkasan ini. Sangat dianjurkan -Anda membaca keseluruhan panduan definitif untuk mempelajari hal tersebut. Kemungkinannya adalah bahwa -beberapa fitur yang sebelumnya harus anda kembangkan sendiri kini menjadi bagian dari kode inti. +Anda membaca keseluruhan panduan definitif untuk mempelajari hal tersebut. Ada kemungkinan bahwa +beberapa fitur yang sebelumnya harus anda kembangkan sendiri, kini telah menjadi bagian dari kode inti. +## Instalasi -Instalasi ------------- +Yii 2.0 sepenuhnya menggunakan [composer](https://getcomposer.org/), yaitu dependency manager yang sudah diakui oleh PHP. -Yii 2.0 sepenuhnya menggunakan [composer](https://getcomposer.org/), yaitu dependency manager yang sudah diakui oleh PHP. Instalasi -dari kerangka inti serta ekstensi, ditangani melalui Composer. Silakan merujuk ke -bagian [Instalasi Yii](start-installation.md) untuk belajar cara menginstal Yii 2.0. Jika Anda menghendaki -membuat ekstensi baru, atau mengubah ekstensi 1.1 yang sudah ke ekstensi 2.0 yang kompatibel, silakan -merujuk panduan [Membuat Ekstensi](structure-extensions.md#menciptakan-ekstensi). +- Instalasi dari kerangka inti serta ekstensi, ditangani melalui Composer. +- Silakan merujuk ke bagian [Instalasi Yii](start-installation.md) untuk belajar cara menginstal Yii 2.0. +- Jika ingin membuat ekstensi baru, atau mengubah/memperbarui ekstensi 1.1 yang telah Anda buat ke ekstensi 2.0 (agar kompatibel), silakan merujuk pada panduan [Membuat Ekstensi](structure-extensions.md#menciptakan-ekstensi). +## Persyaratan PHP -Persyaratan PHP ----------------- +Yii 2.0 membutuhkan PHP 5.4 atau versi yang lebih tinggi, ini karena ada perubahan besar atas PHP versi 5.2 yang sebelumnya dibutuhkan oleh Yii 1.1. Akibatnya, ada banyak perbedaan pada tingkat bahasa yang harus Anda perhatikan. +Dibawah ini ringkasan perubahan utama mengenai PHP tersebut: -Yii 2.0 membutuhkan PHP 5.4 atau versi lebih tinggi, yang merupakan perbaikan besar atas PHP versi 5.2 yang dibutuhkan oleh Yii 1.1. -Akibatnya, ada banyak perbedaan pada tingkat bahasa yang harus Anda perhatikan. -Di bawah ini adalah ringkasan perubahan utama mengenai PHP: +- [Namespaces](https://www.php.net/manual/en/language.namespaces.php). +- [Anonymous fungsi](https://www.php.net/manual/en/functions.anonymous.php). +- Sintaks array pendek `[... elemen ...]` digunakan sebagai pengganti `array (... elemen ...)`. +- Tags echo pendek `<=` digunakan dalam tampilan file. Ini aman digunakan mulai dari PHP 5.4. +- [Class SPL dan interface](https://www.php.net/manual/en/book.spl.php). +- [Late Static Bindings](https://www.php.net/manual/en/language.oop5.late-static-bindings.php). +- [Tanggal dan Waktu](https://www.php.net/manual/en/book.datetime.php). +- [Traits](https://www.php.net/manual/en/language.oop5.traits.php). +- [Intl](https://www.php.net/manual/en/book.intl.php). Yii 2.0 menggunakan `ekstensi PHP intl` +   untuk mendukung fitur internasionalisasi. -- [Namespaces](https://www.php.net/manual/en/language.namespaces.php). -- [Anonymous fungsi](https://www.php.net/manual/en/functions.anonymous.php). -- Sintaks array pendek `[... elemen ...]` digunakan sebagai pengganti `array (... elemen ...)`. -- Tags echo pendek `<=` digunakan dalam tampilan file. Ini aman digunakan mulai dari PHP 5.4. -- [Class SPL dan interface](https://www.php.net/manual/en/book.spl.php). -- [Late Static Bindings](https://www.php.net/manual/en/language.oop5.late-static-bindings.php). -- [Tanggal dan Waktu](https://www.php.net/manual/en/book.datetime.php). -- [Traits](https://www.php.net/manual/en/language.oop5.traits.php). -- [Intl](https://www.php.net/manual/en/book.intl.php). Yii 2.0 menggunakan `ekstensi PHP intl` -  untuk mendukung fitur internasionalisasi. +## Namespace - -Namespace ---------- - -Perubahan yang paling jelas dalam Yii 2.0 adalah penggunaan namespace. Hampir setiap kelas inti -menggunakan namespace, misalnya, `yii\web\Request`. Awalan "C" tidak lagi digunakan dalam nama kelas. -Skema penamaan sekarang mengikuti struktur direktori. Misalnya, `yii\web\Request` -menunjukkan bahwa file kelas yang sesuai adalah `web/Request.php` bawah folder framework Yii. +Perubahan yang paling terlihat jelas dalam Yii 2.0 adalah penggunaan namespace. Hampir setiap kelas inti +menggunakan namespace, misalnya, `yii\web\Request`. Awalan yang sebelumnya menggunakan huruf "C" tidak lagi +digunakan dalam nama kelas. Skema penamaan sekarang mengikuti struktur direktori. Misalnya, `yii\web\Request` +mengindikasikan bahwa file kelasnya adalah `web/Request.php` sesuai dengan lokasi folder framework Yii yang ada. (Anda dapat menggunakan setiap kelas inti tanpa menyertakannya secara eksplisit berkat Yiiclass loader.) - -Komponen dan Object --------------------- +## Komponen dan Object Yii 2.0 membagi kelas `CComponent` di 1.1 menjadi dua kelas: [[yii\base\BaseObject]] dan [[yii\base\Component]]. Class [[yii\base\BaseObject|BaseObject]] adalah class dasar ringan yang memungkinkan mendefinisikan [objek properti](concept-properties.md) -melalui getter dan setter. Class [[yii\base\Component|Component]] adalah perluasan dari [[yii\base\BaseObject|BaseObject]] dengan dukungan -[Event](concept-events.md) dan [behavior](concept-behaviors.md). +melalui getter dan setter. Class [[yii\base\Component|Component]] adalah perluasan(extends) dari [[yii\base\BaseObject|BaseObject]] dengan dukungan [Event](concept-events.md) dan [Behavior](concept-behaviors.md). -Jika class Anda tidak perlu fitur event atau behavior, Anda harus mempertimbangkan menggunakan +Jika class Anda tidak memerlukan fitur event atau behavior, Anda harus mempertimbangkan menggunakan [[yii\base\BaseObject|BaseObject]] sebagai class dasar. Hal ini biasanya terjadi untuk class yang mewakili struktur data dasar. - -Konfigurasi objek --------------------- +## Konfigurasi objek Class [[yii\base\BaseObject|BaseObject]] memperkenalkan cara seragam untuk mengkonfigurasi objek. Setiap class turunan dari [[yii\base\BaseObject|BaseObject]] harus menyatakan konstruktor (jika diperlukan) dengan cara berikut agar @@ -91,12 +78,12 @@ class MyClass extends \yii\base\BaseObject } ``` -Dalam contoh di atas, parameter terakhir dari konstruktor harus mengambil array konfigurasi -yang berisi pasangan nama-nilai untuk menginisialisasi properti pada akhir konstruktor. -Anda dapat menimpa method [[yii\base\BaseObject::init()|init()]] untuk melakukan pekerjaan inisialisasi yang harus dilakukan setelah -konfigurasi telah diterapkan. +Dalam contoh diatas, parameter terakhir dari konstruktor harus mengambil array konfigurasi (`$config`) +yang berisi pasangan nama-nilai `[key => value]` untuk meng-inisialisasi properti pada akhir konstruktor. +Anda dapat mengganti method [[yii\base\BaseObject::init()|init()]] untuk melakukan inisialisasi yang harus dilakukan setelah +konfigurasi diterapkan. -Dengan mengikuti konvensi ini, Anda akan dapat membuat dan mengkonfigurasi objek baru menggunakan array konfigurasi: +Dengan mengikuti ketentuan ini, Anda akan dapat membuat dan mengkonfigurasi objek baru menggunakan array konfigurasi: ```php $object = Yii::createObject([ @@ -106,33 +93,29 @@ $object = Yii::createObject([ ], [$param1, $param2]); ``` -Rincian lebih lanjut tentang konfigurasi dapat ditemukan di bagian [Konfigurasi](concept-configurations.md). - +Rincian lebih lanjut mengenai konfigurasi dapat ditemukan pada bagian [Konfigurasi](concept-configurations.md). -Event ------- +## Event Di Yii 1, event dibuat dengan mendefinisikan method `on` (misalnya,`onBeforeSave`). Di Yii 2, Anda sekarang dapat menggunakan semua nama sebagai event. -Anda memicu suatu event dengan memanggil method [[yii\base\Component::trigger()|trigger()]]: +Untuk memicu suatu event, Anda dapat melakukannya dengan memanggil method [[yii\base\Component::trigger()|trigger()]]: ```php $event = new \yii\base\Event; $component->trigger($eventName, $event); ``` -Untuk melampirkan penanganan event, mengunakan method [[yii\base\Component::on()|on()]]: +Untuk melekatkan/memasang handler pada suatu event, dapat dilakukan dengan mengunakan method [[yii\base\Component::on()|on()]]: ```php $component->on($eventName, $handler); -// To detach the handler, use: +// Untuk mematikannya dapat dilakukan dengan cara: // $component->off($eventName, $handler); ``` -Ada banyak pengembangan dari fitur event. Untuk lebih jelasnya, silakan lihat bagian [Event](concept-events.md). - +Ada banyak pengembangan dari fitur event. Untuk lebih jelasnya, silakan lihat pada bagian [Event](concept-events.md). -Path Alias ------------- +## Path Alias Yii 2.0 memperluas penggunaan alias path baik untuk file/direktori maupun URL. Yii 2.0 juga sekarang mensyaratkan nama alias dimulai dengan karakter `@`. @@ -146,34 +129,29 @@ Misalnya, karena `@yii` mengacu pada direktori instalasi Yii, class seperti `yii Jika Anda menggunakan librari pihak ketiga seperti Zend Framework. Anda dapat menentukan alias path `@Zend` yang mengacu pada direktori instalasi framework direktori. Setelah Anda selesai melakukannya, Yii akan dapat menload setiap class dalam librari Zend Framework. -Lebih jauh tentang alias path dapat ditemukan di bagian [Alias](concept-aliases.md). +Lebih jauh tentang alias path dapat pelajari pada bagian [Alias](concept-aliases.md). - -View ------ +## View Perubahan yang paling signifikan tentang view di Yii 2 adalah bahwa variabel khusus `$this` dalam sebuah view tidak lagi mengacu -controller saat ini atau widget. Sebaliknya, `$this` sekarang mengacu pada objek *view*, konsep baru -yang diperkenalkan di 2.0. Objek *view* adalah [[yii\web\View]], yang merupakan bagian view +controller saat ini atau widget. Sebaliknya, `$this` sekarang mengacu pada objek _view_, konsep baru +yang diperkenalkan di 2.0. Objek _view_ adalah [[yii\web\View]], yang merupakan bagian view dari pola MVC. Jika Anda ingin mengakses controller atau widget di tampilan, Anda dapat menggunakan `$this->context`. Untuk membuat tampilan parsial dalam view lain, Anda menggunakan `$this->render()`, tidak lagi `$this->renderPartial()`. -Panggilan untuk `render` juga sekarang harus secara eksplisit *di-echo)*, mengingat method `render()` sekarang mengembalikan nilai -yang dirender, bukan langsung menampilkannya. Sebagai contoh: +Panggilan untuk `render` juga sekarang harus secara eksplisit _di-echo)-kan_, mengingat method `render()` sekarang mengembalikan nilai yang dirender, bukan langsung menampilkannya. Sebagai contoh: ```php echo $this->render('_item', ['item' => $item]); ``` -Selain menggunakan PHP sebagai bahasa template utama, Yii 2.0 juga dilengkapi dengan dukungan resmi -dua mesin template populer: Smarty dan Twig. Mesin template Prado tidak lagi didukung. +Selain menggunakan PHP sebagai bahasa template utama, Yii 2.0 juga dilengkapi dengan dukungan resmi +dua _template engine_ populer: Smarty dan Twig. _Template engine_ Prado tidak lagi didukung. Untuk menggunakan mesin template ini, Anda perlu mengkonfigurasi komponen aplikasi `view` dengan menetapkan properti [[yii\base\View::$renderers|View::$renderers]]. Silakan merujuk ke bagian [Template Engine](tutorial-template-engines.md) untuk lebih jelasnya. - -Model ------- +## Model Yii 2.0 menggunakan [[yii\base\Model]] sebagai model dasar, mirip dengan `CModel` di 1.1. class `CFormModel` telah dibuang seluruhnya. Sebaliknya, di Yii 2 Anda harus memperluas [[yii\base\Model]] untuk membuat class model formulir. @@ -205,9 +183,7 @@ atribut `unsafe`. Untuk mempelajari lebih lanjut tentang model, silakan merujuk ke bagian [Model](structure-models.md). - -Controller ------------ +## Controller Yii 2.0 menggunakan [[yii\web\Controller]] sebagai kelas dasar controller, yang mirip dengan `CController` di Yii 1.1. [[Yii\base\Action]] adalah kelas dasar untuk kelas action. @@ -229,13 +205,11 @@ public function actionView($id) Silakan merujuk ke bagian [Controller](structure-controllers.md) untuk rincian lebih lanjut tentang controller. - -widget -------- +## widget Yii 2.0 menggunakan [[yii\base\Widget]] sebagai kelas dasar widget, mirip dengan `CWidget` di Yii 1.1. -Untuk mendapatkan dukungan yang lebih baik untuk kerangka di IDE, Yii 2.0 memperkenalkan sintaks baru untuk menggunakan widget. +Untuk mendapatkan dukungan yang lebih baik untuk kerangka di IDE, Yii 2.0 memperkenalkan sintaks baru untuk menggunakan widget. Metode statis [[yii\base\Widget::begin()|begin()]], [[yii\base\Widget::end()|end()]], dan [[yii\base\Widget::widget()|widget()]] mulai diperkenalkan, yang akan digunakan seperti: @@ -243,7 +217,7 @@ mulai diperkenalkan, yang akan digunakan seperti: use yii\widgets\Menu; use yii\widgets\ActiveForm; -// Note that you have to "echo" the result to display it +// Perlu diingat bahwa "echo" tetap diperlukan untuk menampilkan hasilnya echo Menu::widget(['items' => $items]); // Passing an array to initialize the object properties @@ -257,24 +231,20 @@ ActiveForm::end(); Silakan merujuk ke bagian [Widget](structure-widgets.md) untuk lebih jelasnya. +## Tema -Tema ------- - -Tema bekerja benar-benar berbeda di 2.0. Mereka sekarang berdasarkan mekanisme pemetaan path yang memetakan +Tema benar-benar bekerja secara berbeda di 2.0. Kini tema telah berdasarkan mekanisme pemetaan path yang memetakan file sumber ke file tema. Misalnya, jika peta path untuk tema adalah `['/web/views' => '/web/themes/basic']`, maka versi tema dari file view `/web/views/site/index.php` akan menjadi `/web/themes/basic/site/index.php`. Untuk alasan ini, tema sekarang bisa -diterapkan untuk setiap file view, bahkan view diberikan di luar controller atau widget. +diterapkan untuk setiap file view, bahkan view diberikan di luar controller ataupun widget. Juga, tidak ada lagi komponen `CThemeManager`. Sebaliknya, `theme` adalah properti dikonfigurasi dari komponen `view` -aplikasi. +pada aplikasi. Silakan merujuk ke bagian [Theming](output-theming.md) untuk lebih jelasnya. - -Aplikasi konsol --------------------- +## Aplikasi konsol (CLI) Aplikasi konsol sekarang diatur sebagai controller seperti pada aplikasi Web. kontroler konsol harus diperluas dari [[yii\console\Controller]], mirip dengan `CConsoleCommand` di 1.1. @@ -288,9 +258,7 @@ Yii 2.0 mendukung pembuatan informasi bantuan command secara otomatis berdasarka Silakan lihat bagian [Console Commands](tutorial-console.md) untuk lebih jelasnya. - -I18N ----- +## I18N Yii 2,0 menghilangkan formater tanggal dan angka terpasang bagian dari [PECL modul intl PHP](https://pecl.php.net/package/intl). @@ -300,9 +268,7 @@ sumber berdasarkan kategori pesan. Silakan merujuk ke bagian [Internasionalisasi](tutorial-i18n.md) untuk rincian lebih lanjut. - -Action Filter --------------- +## Action Filter Action Filter sekarang diimplementasikan melalui behavior. Untuk membuat baru, filter diperluas dari [[yii\base\ActionFilter]]. Untuk menggunakan filter, pasang Kelas filter untuk controller sebagai behavior. Misalnya, untuk menggunakan filter [[yii\filters\AccessControl]], @@ -324,11 +290,9 @@ public function behaviors() Silakan merujuk ke bagian [Filtering](structure-filters.md) untuk lebih jelasnya. +## Aset -Aset ------- - -Yii 2.0 memperkenalkan konsep baru yang disebut *bundel aset* yang menggantikan konsep paket script di Yii 1.1. +Yii 2.0 memperkenalkan konsep baru yang disebut _bundel aset_ yang menggantikan konsep paket script di Yii 1.1. Bundel aset adalah kumpulan file asset (misalnya file JavaScript, file CSS, file gambar, dll) dalam direktori. Setiap bundel aset direpresentasikan sebagai kelas turunan dari [[yii\web\AssetBundle]]. @@ -338,24 +302,21 @@ berisi referensi ke JavaScript dan file CSS yang ditentukan dalam bundel itu. Silakan merujuk ke bagian [Managing Aset](structure-assets.md) untuk lebih jelasnya. - -Helper -------- +## Helper Yii 2.0 memperkenalkan banyak helper umum untuk digunakan, termasuk. -* [[yii\helpers\Html]] -* [[yii\helpers\ArrayHelper]] -* [[yii\helpers\StringHelper]] -* [[yii\helpers\FileHelper]] -* [[yii\helpers\Json]] +- [[yii\helpers\Html]] +- [[yii\helpers\ArrayHelper]] +- [[yii\helpers\StringHelper]] +- [[yii\helpers\FileHelper]] +- [[yii\helpers\Json]] Silakan lihat bagian [Tinjauan Helper](helper-overview.md) untuk lebih jelasnya. -Formulir --------- +## Formulir -Yii 2.0 memperkenalkan konsep *field* untuk membangun formulir menggunakan [[yii\widgets\ActiveForm]]. Field +Yii 2.0 memperkenalkan konsep _field_ untuk membangun formulir menggunakan [[yii\widgets\ActiveForm]]. Field adalah wadah yang terdiri dari label, masukan, pesan kesalahan, dan atau teks petunjuk. Field diwakili sebagai objek [[yii\widgets\ActiveField|ActiveField]]. Menggunakan field, Anda dapat membangun formulir yang lebih bersih dari sebelumnya: @@ -372,9 +333,7 @@ Menggunakan field, Anda dapat membangun formulir yang lebih bersih dari sebelumn Silakan merujuk ke bagian [Membuat Formulir](input-forms.md) untuk lebih jelasnya. - -Query Builder -------------- +## Query Builder Dalam 1.1, query builder itu tersebar di antara beberapa kelas, termasuk `CDbCommand`, `CDbCriteria`, dan` CDbCommandBuilder`. Yii 2.0 merepresentasikan sebuah query DB sebagai objek [[yii\db\Query|Query]] @@ -396,9 +355,7 @@ Yang terbaik dari semua itu adalah, query builder juga dapat digunakan ketika be Silakan lihat bagian [Query Builder](db-query-builder.md) untuk lebih jelasnya. - -Active Record -------------- +## Active Record Yii 2.0 memperkenalkan banyak perubahan [Active Record](db-active-record.md). Dua yang paling jelas melibatkan query builder dan penanganan permintaan relasional. @@ -465,9 +422,7 @@ versi 2.0. Perhatikan bahwa ketika menambahkan parameter ke constructor Anda mun Ada banyak perubahan lain dan perangkat tambahan untuk Rekaman Aktif. Silakan merujuk ke bagian [Rekaman Aktif](db-active-record.md) untuk rincian lebih lanjut. - -Active Record Behaviors ------------------------ +## Active Record Behaviors Dalam 2.0, kami telah membuang kelas behavior dasar `CActiveRecordBehavior`. Jika Anda ingin membuat behavior Active Record, Anda akan harus memperluasnya langsung dari `yii\base\Behavior`. Jika kelas behavior perlu menanggapi beberapa event @@ -497,20 +452,16 @@ class MyBehavior extends Behavior } ``` - -Pengguna dan IdentityInterface --------------------------- +## Pengguna dan IdentityInterface Kelas `CWebUser` di 1.1 kini digantikan oleh [[yii\web\User]], dan sekarang tidak ada lagi Kelas `CUserIdentity`. Sebaliknya, Anda harus menerapkan [[yii\web\IdentityInterface]] yang jauh lebih mudah untuk digunakan. Template proyek lanjutan memberikan contoh seperti itu. -Silakan merujuk ke bagian [Otentikasi](security-authentication.md), [Otorisasi](security-authorization.md), +Silakan merujuk ke bagian [Otentikasi](security-authentication.md), [Otorisasi](security-authorization.md), dan [Template Proyek Lanjutan](https://github.com/yiisoft/yii2-app-advanced/blob/master/docs/guide/README.md) untuk lebih jelasnya. - -Manajemen URL --------------- +## Manajemen URL Manajemen URL di Yii 2 mirip dengan yang di 1.1. Tambahan utamanya adalah, sekarang manajemen URL mendukung opsional parameter. Misalnya, jika Anda memiliki aturan dinyatakan sebagai berikut, maka akan cocok @@ -527,14 +478,12 @@ tujuan yang sama. Silakan merujuk ke bagian [docs manajer Url](runtime-routing.md) untuk lebih jelasnya. -Perubahan penting dalam konvensi penamaan untuk rute adalah bahwa nama-nama camelcase dari controller +Perubahan penting dalam konvensi penamaan untuk rute adalah bahwa nama-nama camelcase dari controller dan action sekarang dikonversi menjadi huruf kecil di mana setiap kata dipisahkan oleh hypen, misal controller id untuk `CamelCaseController` akan menjadi `camel-case`. Lihat bagian tentang [Kontroler ID](structure-controllers.md#controller-ids) dan [Action ID](structure-controllers.md#action-ids) untuk lebih jelasnya. +## Menggunakan Yii 1.1 dan 2.x bersama-sama -Menggunakan Yii 1.1 dan 2.x bersama-sama ------------------------------- - -Jika Anda memiliki warisan kode Yii 1.1 yang ingin Anda gunakan bersama-sama dengan Yii 2.0, silakan lihat +Jika Anda memiliki warisan kode Yii 1.1 yang ingin Anda gunakan bersama-sama dengan Yii 2.0, silakan lihat bagian [Menggunakan Yii 1.1 dan 2.0 Bersama](tutorial-yii-integration.md). diff --git a/docs/guide-id/intro-yii.md b/docs/guide-id/intro-yii.md index fef70078ee8..2b1ae4c91cc 100644 --- a/docs/guide-id/intro-yii.md +++ b/docs/guide-id/intro-yii.md @@ -1,52 +1,46 @@ -Apa Itu Yii -=========== +# Apa Itu Yii -Yii adalah kerangka kerja PHP berkinerja tinggi, berbasis komponen yang digunakan untuk mengembangkan aplikasi web modern dengan cepat. -Nama Yii (diucapkan `Yee` atau `[ji:]`) yang berarti "sederhana dan berevolusi" dalam bahasa Cina. Hal ini dapat juga -dianggap sebagai singkatan **Yes It Is (Ya, Itu Dia)**! +Yii merupakan kerangka kerja berbasis komponen yang berkecepatan tinggi (high performance) yang digunakan untuk kasus +pengembangan yang cepat pada aplikasi Web Modern. Disebut Yii (diucapkan `Yee` atau `[ji:]`) yang berarti "sederhana dan +berevolusi" dalam bahasa Cina. Bisa juga dianggap sebagai (akronim) singkatan dari **Yes It Is (Ya, Itu Dia)**! +## Yii Paling Cocok Digunakan untuk Apa? -Yii Terbaik untuk Apa? ---------------------- +Yii adalah kerangka kerja pemrograman web yg umum(general), ini berarti kita bisa menggunakannya untuk membangun berbagai +macam aplikasi berbasis web menggunakan PHP. Karena merupakan arsitektur berbasis komponen yang mana memiliki dukungan +caching yang canggih, Yii sangat cocok untuk pengembangan aplikasi skala besar seperti web portal, forum, CMS, e-commerce, +REST API dan lain sebagainnya. -Yii adalah kerangka kerja pemrograman web umum, yang berarti bahwa hal itu dapat digunakan untuk mengembangkan semua jenis -aplikasi Web yang menggunakan PHP. Karena arsitektur berbasis komponen dan dukungan caching yang canggih, Yii sangat cocok untuk mengembangkan aplikasi skala besar seperti portal, forum, sistem manajemen konten (CMS), proyek e-commerce, layanan web REST, dan sebagainya. +## Bagaimana jika Yii Dibandingkan dengan Frameworks lain? +Jika Anda sudah familiar dengan framework lain, Anda mungkin akan bersyukur ketika membandingkan Yii dengan yang lain: -Bagaimana jika Yii Dibandingkan dengan Frameworks lain? -------------------------------------------- - -Jika Anda sudah akrab dengan framework lain, Anda mungkin menghargai pengetahuan bagaimana Yii dibandingkan: - -- Seperti kebanyakan PHP framework, Yii mengimplementasikan pola arsitektur MVC (Model-View-Controller) dan mempromosikan kode organisasi berdasarkan pola itu. -- Yii mengambil filosofi bahwa kode harus ditulis dengan cara sederhana namun elegan. Yii tidak akan pernah mencoba untuk mendesain berlebihan terutama untuk mengikuti beberapa pola desain secara ketat. -- Yii adalah framework penuh yang menyediakan banyak fitur teruji dan siap pakai seperti: query builder dan ActiveRecord baik untuk relasional maupun NoSQL database; dukungan pengembangan API REST; dukungan caching banyak lapis dan masih banyak lagi. -- Yii sangat extensible. Anda dapat menyesuaikan atau mengganti hampir setiap bagian dari kode inti Yii. Anda juga bisa mengambil keuntungan dari arsitektur ekstensi Yii yang solid untuk menggunakan atau mengembangkan ekstensi untuk disebarkan kembali. -- Kinerja tinggi selalu menjadi tujuan utama dari Yii. +- Seperti kebanyakan PHP framework, Yii mengimplementasikan pola arsitektur MVC (Model-View-Controller) dan mempromosikan kode organisasi berdasarkan pola itu. +- Yii mengambil filosofi bahwa kode harus ditulis dengan cara sederhana namun elegan. Yii tidak akan pernah mencoba untuk mendesain berlebihan terutama untuk mengikuti beberapa pola desain secara ketat. +- Yii adalah fullstack framework yang menyediakan banyak fitur teruji dan siap pakai seperti: query builder dan ActiveRecord baik untuk relasional maupun NoSQL database; dukungan pengembangan REST API; dukungan caching berlapis dan masih banyak lagi. +- Yii sangat extensible. Anda dapat menyesuaikan atau mengganti hampir setiap bagian dari kode inti Yii. Anda juga bisa mengambil keuntungan dari arsitektur ekstensi Yii yang solid untuk menggunakan atau mengembangkan ekstensi untuk disebarkan kembali. +- Kinerja tinggi (High performance) selalu menjadi tujuan utama dari Yii. Yii tidak dikerjakan oleh satu orang, Yii didukung oleh [tim pengembang inti yang kuat][yii_team], serta komunitas besar -profesional yang terus memberikan kontribusi bagi pengembangan Yii. Tim pengembang Yii -terus mengamati perkembangan tren terbaru Web, pada penerapan terbaik serta fitur yang -ditemukan dalam framework dan proyek lain. Penerapan terbaik yang paling relevan dan fitur yang ditemukan di tempat lain secara teratur -dimasukkan ke dalam kerangka inti dan menampakkannya melalui antarmuka yang sederhana dan elegan. +profesional yang terus memberikan kontribusi bagi pengembangan Yii. Tim pengembang Yii terus mengamati perkembangan tren +terbaru Web, pada penerapan terbaik (best practices) serta fitur yang ditemukan dalam framework dan proyek lain. +Penerapan terbaik yang paling relevan dan fitur yang ditemukan di tempat lain secara teratur dimasukkan ke dalam kerangka inti +dan menampilkannya melalui antarmuka yang sederhana dan elegan. [yii_team]: https://www.yiiframework.com/team -Versi Yii ----------- +## Versi Yii Yii saat ini memiliki dua versi utama yang tersedia: 1.1 dan 2.0. Versi 1.1 adalah generasi lama dan sekarang dalam mode pemeliharaan. Versi 2.0 adalah penulisan ulang lengkap dari Yii, mengadopsi teknologi dan protokol terbaru, termasuk composer, PSR, namespace, trait, dan sebagainya. Versi 2.0 merupakan generasi framework yang sekarang dan terus menerima upaya pengembangan selama beberapa tahun ke depan. Panduan ini terutama tentang versi 2.0. - -Persyaratan dan Prasyarat --------------------------- +## Persyaratan dan Prasyarat Yii 2.0 memerlukan PHP 5.4.0 atau versi lebih tinggi. Anda dapat menemukan persyaratan yang lebih rinci untuk setiap fitur dengan menjalankan pengecek persyaratan yang diikutsertakan dalam setiap rilis Yii. Menggunakan Yii memerlukan pengetahuan dasar tentang pemrograman berorientasi objek (OOP), mengingat Yii adalah framework berbasis OOP murni. -Yii 2.0 juga memanfaatkan fitur terbaru dari PHP, seperti [namespace](https://www.php.net/manual/en/language.namespaces.php) dan [traits](https://www.php.net/manual/en/language.oop5.traits.php). +Yii 2.0 juga memanfaatkan fitur terbaru dari PHP, seperti [namespace](https://www.php.net/manual/en/language.namespaces.php) dan [traits](https://www.php.net/manual/en/language.oop5.traits.php). Memahami konsep-konsep ini akan membantu Anda lebih mudah memahami Yii 2.0. diff --git a/docs/guide-id/start-databases.md b/docs/guide-id/start-databases.md index e81ec91690d..89a4ab19f8a 100644 --- a/docs/guide-id/start-databases.md +++ b/docs/guide-id/start-databases.md @@ -225,7 +225,7 @@ Mari Kita Coba Untuk melihat bagaimana kode-kode di atas bekerja, gunakan browser anda untuk mengakses URL ini: ``` -http://hostname/index.php?r=country%2Findex +https://hostname/index.php?r=country%2Findex ``` ![Daftar Country](images/start-country-list.png) @@ -235,7 +235,7 @@ Jika anda mengklik tombol "2", anda akan melihat halaman tersebut menampilkan 5 Silahkan melakukan observasi secara perlahan-lahan dan anda akan mengetahui bahwa URL pada browser juga akan berganti menjadi ``` -http://hostname/index.php?r=country%2Findex&page=2 +https://hostname/index.php?r=country%2Findex&page=2 ``` Di belakang layar, [[yii\data\Pagination|Pagination]] menyediakan semua kebutuhkan untuk memecah data menjadi halaman per halaman: diff --git a/docs/guide-id/start-forms.md b/docs/guide-id/start-forms.md index 7d3497f0c31..80cb636692b 100644 --- a/docs/guide-id/start-forms.md +++ b/docs/guide-id/start-forms.md @@ -186,7 +186,7 @@ Mari kita uji Untuk melihat bagaimana prosesnya, gunakan browser anda untuk mengakses URL ini : ``` -http://hostname/index.php?r=site%2Fentry +https://hostname/index.php?r=site%2Fentry ``` Anda akan melihat halaman yang menampilkan form dengan dua field input. Dibagian atas dari semua input field, ada label yang menginformasikan data yang mana yang akan diinput. Jika anda menekan tombol pengiriman data tanpa diff --git a/docs/guide-id/start-gii.md b/docs/guide-id/start-gii.md index ca3b176b2c9..08fc2046cbe 100644 --- a/docs/guide-id/start-gii.md +++ b/docs/guide-id/start-gii.md @@ -42,7 +42,7 @@ defined('YII_ENV') or define('YII_ENV', 'dev'); Karna baris tersebut, aplikasi anda harusnya sudah berada pada mode _development_, dan secara otomatis mengaktifkan Gii karena konfigurasi sebelumnya. Anda dapat mengakses Gii melalui URL di bawah ini: ``` -http://hostname/index.php?r=gii +https://hostname/index.php?r=gii ``` > Note: Jika anda mengakses Gii melalui komputer diluar komputer localhost anda, secara default akses tidak akan diperbolehkan @@ -107,7 +107,7 @@ Mari kita coba Untuk melihat bagaimana proses kerjanya, gunakan browser anda untuk mengakses URL dibawah ini: ``` -http://hostname/index.php?r=country%2Findex +https://hostname/index.php?r=country%2Findex ``` Anda akan melihat tabel data yang menampilkan negara dari tabel pada database. Anda dapat mengurutkan tabel, diff --git a/docs/guide-id/start-hello.md b/docs/guide-id/start-hello.md index 12d227b50e7..af9d35307d8 100644 --- a/docs/guide-id/start-hello.md +++ b/docs/guide-id/start-hello.md @@ -102,7 +102,7 @@ Trying it Out Setelah membuat action dan view, Anda dapat mengakses halaman baru dengan mengakses URL berikut: ``` -http://hostname/index.php?r=site%2Fsay&message=Hello+World +https://hostname/index.php?r=site%2Fsay&message=Hello+World ``` ![Hello World](images/start-hello-world.png) diff --git a/docs/guide-id/start-installation.md b/docs/guide-id/start-installation.md index 88b1b61bb2a..7b2343682ff 100644 --- a/docs/guide-id/start-installation.md +++ b/docs/guide-id/start-installation.md @@ -148,7 +148,7 @@ Windows, Mac OS X, atau Linux yang menjalankan PHP 5.4 atau lebih tinggi. Yii 2. sehingga Anda harus mengambil beberapa perlakuan ekstra ketika menggunakan HHVM. Pada server produksi, Anda mungkin ingin mengkonfigurasi server Web Anda sehingga aplikasi dapat diakses -melalui URL `http://www.example.com/index.php` bukannya `http://www.example.com/dasar/web/index.php`. konfigurasi seperti itu +melalui URL `https://www.example.com/index.php` bukannya `https://www.example.com/dasar/web/index.php`. konfigurasi seperti itu membutuhkan root dokumen server Web Anda menunjuk ke folder `basic/web`. Anda mungkin juga ingin menyembunyikan `index.php` dari URL, seperti yang dijelaskan pada bagian [Routing dan Penciptaan URL](runtime-routing.md). Dalam bagian ini, Anda akan belajar bagaimana untuk mengkonfigurasi Apache atau Nginx server Anda untuk mencapai tujuan tersebut. diff --git a/docs/guide-id/start-prerequisites.md b/docs/guide-id/start-prerequisites.md new file mode 100644 index 00000000000..4dd5da292b0 --- /dev/null +++ b/docs/guide-id/start-prerequisites.md @@ -0,0 +1,18 @@ +# Apa yang perlu kamu ketahui + +Kurva pembelajaran Yii tidak setajam/sesulit kerangka kerja PHP lainnya, tapi masih ada beberapa hal yang harus kamu pelajari sebelum mulai menggunakan Yii + +## PHP + +Yii adalah kerangka kerja PHP jadi pastikan kamu telah [membaca dan memahami referensi dari bahasa ini](https://www.php.net/manual/en/langref.php). +Ketika membangun aplikasi menggunakan Yii, kamu akan menulis kode dengan gaya OOP (Bahasa Pemrograman Berbasis Objek), jadi pastikan juga kamu sudah cukup familiar dengan [Kelas and Objek](https://www.php.net/manual/en/language.oop5.basic.php) dan juga [namespaces](https://www.php.net/manual/en/language.namespaces.php). + +## Object oriented programming (Bahasa Pemrograman Berbasis Objek) + +Memahami dasar dari OOP sangat dibutuhkan. Jika kamu tidak cukup familiar dengan ini, silahkan pelajari salah satu dari banyak tutorial yang ada pada [tuts+ salah satunya](https://code.tutsplus.com/tutorials/object-oriented-php-for-beginners--net-12762). + +Perlu dicatat juga bahwa semakin kompleks aplikasi yang Anda buat, akan semakin dalam juga konsep OOP yang harus dipelajari untuk dapat berhasil mengelola kompleksitas tersebut. + +## Command line and composer + +Yii secara umum menggunakan pengelolaan paket PHP standar, [Composer](https://getcomposer.org/) jadi pastikan bahwa kamu telah membaca dan memahami apa itu composer [panduan](https://getcomposer.org/doc/01-basic-usage.md). Jika kamu tidak cukup familiar menggunakan perintah baris (CLI), ini waktunya untuk coba mempelajari itu. Ketika Anda sudah mempelajari dasarnya, anda tidak akan mau lagi kerja tanpa menggunakan itu. diff --git a/docs/guide-id/start-workflow.md b/docs/guide-id/start-workflow.md index 666c378935a..488539ee497 100644 --- a/docs/guide-id/start-workflow.md +++ b/docs/guide-id/start-workflow.md @@ -2,13 +2,13 @@ Menjalankan Aplikasi ==================== Setelah menginstal Yii, Anda memiliki aplikasi Yii yang dapat diakses melalui -URL `http://hostname/basic/web/index.php` atau `http://hostname/index.php`, tergantung +URL `https://hostname/basic/web/index.php` atau `https://hostname/index.php`, tergantung pada konfigurasi Anda. Bagian ini akan memperkenalkan fungsi built-in aplikasi, bagaimana kode ini disusun, dan bagaimana aplikasi menangani permintaan secara umum. > Info: Untuk mempermudah, selama tutorial "Mulai", itu diasumsikan bahwa Anda telah menetapkan `basic/web`   sebagai root dokumen server Web Anda, dan URL dikonfigurasi untuk mengakses -  aplikasi Anda untuk menjadi `http://hostname/index.php` atau sesuatu yang serupa. +  aplikasi Anda untuk menjadi `https://hostname/index.php` atau sesuatu yang serupa.   Untuk kebutuhan Anda, silakan menyesuaikan URL sesuai deskripsi kami.    Perhatikan bahwa tidak seperti framework itu sendiri, setelah template proyek diinstal, itu semua milikmu. Anda bebas untuk menambah atau menghapus @@ -20,7 +20,7 @@ Fungsi Aplikasi dasar diinstal berisi empat halaman: -* Homepage, ditampilkan saat Anda mengakses URL `http://hostname/index.php`, +* Homepage, ditampilkan saat Anda mengakses URL `https://hostname/index.php`, * Halaman "About", * Halaman "Contact", yang menampilkan formulir kontak yang memungkinkan pengguna akhir untuk menghubungi Anda melalui email, * Dan halaman "Login", yang menampilkan form login yang dapat digunakan untuk otentikasi pengguna akhir. Cobalah masuk @@ -43,7 +43,7 @@ Struktur aplikasi Direktori yang paling penting dan file dalam aplikasi Anda (dengan asumsi direktori root aplikasi adalah `basic`): -```js +``` basic/ path aplikasi dasar composer.json digunakan oleh Composer, package information config/ berisi konfigurasi aplikasi dan yang lain diff --git a/docs/guide-id/structure-overview.md b/docs/guide-id/structure-overview.md index f7cd7913a17..e31b27b02fc 100644 --- a/docs/guide-id/structure-overview.md +++ b/docs/guide-id/structure-overview.md @@ -1,7 +1,7 @@ Tinjauan ======== -Aplikasi Yii diorganisir berdasarkan pola arsitektur [model-view-controller (MVC)](https://wikipedia.org/wiki/Model-view-controller). +Aplikasi Yii diorganisir berdasarkan pola arsitektur [model-view-controller (MVC)](https://id.wikipedia.org/wiki/MVC). [Model](structure-models.md) merepresentasikan data, pengaturan dan proses bisnis; [view](structure-views.md) adalah output yang merepresentasikan model; dan [controller](structure-controllers.md) mengelola input dan merubahnya menjadi perintah-perintah untuk [model](structure-models.md) dan [view](structure-views.md). diff --git a/docs/guide-it/start-installation.md b/docs/guide-it/start-installation.md index bc766a88cf9..530c76d73ca 100644 --- a/docs/guide-it/start-installation.md +++ b/docs/guide-it/start-installation.md @@ -121,7 +121,7 @@ Yii 2.0 è anche compatibile con le librerie [HHVM](https://hhvm.com/) di Facebo comporta diversamente dal PHP nativo, quindi devi avere maggiore cura se intendi usare HHVM. Su un server di produzione vorrai probabilmente che la tua applicazione sia accessibile tramite l'url -`http://www.example.com/index.php` invece di `http://www.example.com/basic/web/index.php`. Questo risultato richiede che punti la +`https://www.example.com/index.php` invece di `https://www.example.com/basic/web/index.php`. Questo risultato richiede che punti la *document root* del tuo webserver nella directory `basic/web`. Vorrai magari anche nascondere `index.php` dall'URL, come descritto nella sezione [analizzare e generare URL](runtime-url-handling.md). In questa parte vedrai configurare il tuo server Apache o Nginx per ottenere questo risultato. 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-aliases.md b/docs/guide-ja/concept-aliases.md index fc91d52e63d..fdb539dd019 100644 --- a/docs/guide-ja/concept-aliases.md +++ b/docs/guide-ja/concept-aliases.md @@ -18,7 +18,7 @@ Yii はすでに利用可能な多くの事前定義エイリアスを持って Yii::setAlias('@foo', '/path/to/foo'); // URL のエイリアス -Yii::setAlias('@bar', 'http://www.example.com'); +Yii::setAlias('@bar', 'https://www.example.com'); // \foo\Bar クラスを保持する具体的なファイルのエイリアス Yii::setAlias('@foo/Bar.php', '/definitely/not/foo/Bar.php'); @@ -47,7 +47,7 @@ return [ // ... 'aliases' => [ '@foo' => '/path/to/foo', - '@bar' => 'http://www.example.com', + '@bar' => 'https://www.example.com', ], ]; ``` @@ -61,7 +61,7 @@ return [ ```php echo Yii::getAlias('@foo'); // /path/to/foo を表示 -echo Yii::getAlias('@bar'); // http://www.example.com を表示 +echo Yii::getAlias('@bar'); // https://www.example.com を表示 echo Yii::getAlias('@foo/bar/file.php'); // /path/to/foo/bar/file.php を表示 ``` @@ -116,7 +116,7 @@ Yii では、一般的に使用されるファイルのパスと URL を簡単 エントリス・クリプトを含むディレクトリによって決定されます。 - `@web`, 現在実行中のウェブ・アプリケーションのベース URL。これは、 [[yii\web\Request::baseUrl]] と同じ値を持ちます。 - `@vendor`, [[yii\base\Application::vendorPath|Composer のベンダー・ディレクトリ]] 。デフォルトは `@app/vendor` 。 -- `@bower`, [bower パッケージ](http://bower.io/) が含まれるルート・ディレクトリ。デフォルトは `@vendor/bower` 。 +- `@bower`, [bower パッケージ](https://bower.io/) が含まれるルート・ディレクトリ。デフォルトは `@vendor/bower` 。 - `@npm`, [npm パッケージ](https://www.npmjs.com/) が含まれるルート・ディレクトリ。デフォルトは `@vendor/npm` 。 `@yii` エイリアスは [エントリ・スクリプト](structure-entry-scripts.md) に `Yii.php` ファイルを読み込んだ時点で定義されます。 diff --git a/docs/guide-ja/concept-behaviors.md b/docs/guide-ja/concept-behaviors.md index 93534b53ef6..4389d7637ad 100644 --- a/docs/guide-ja/concept-behaviors.md +++ b/docs/guide-ja/concept-behaviors.md @@ -1,8 +1,8 @@ ビヘイビア ========== -ビヘイビアは [[yii\base\Behavior]] またその子クラスのインスタンスです。ビヘイビアは -[ミックスイン](http://en.wikipedia.org/wiki/Mixin) としても知られ、既存の [[yii\base\Component|component]] クラスの +ビヘイビアは [[yii\base\Behavior]] またその子クラスのインスタンスです。 +ビヘイビアは [ミックスイン](https://ja.wikipedia.org/wiki/Mixin) としても知られ、既存の [[yii\base\Component|component]] クラスの 機能を、クラスの継承を変更せずに拡張することができます。コンポーネントにビヘイビアをアタッチすると、その コンポーネントにはビヘイビアのメソッドとプロパティが "注入" され、それらのメソッドとプロパティは、 コンポーネント・クラス自体に定義されているかのようにアクセスできるようになります。また、ビヘイビアは、 @@ -329,7 +329,7 @@ $user->touch('login_time'); ビヘイビアとトレイトの比較 -------------------------- -ビヘイビアは、主となるクラスにそのプロパティやメソッドを「注入する」という点で [トレイト](https://www.php.net/traits) +ビヘイビアは、主となるクラスにそのプロパティやメソッドを「注入する」という点で [トレイト](https://www.php.net/manual/ja/language.oop5.traits.php) に似ていますが、これらは多くの面で異なります。以下に説明するように、それらは互いに長所と短所を持っています。 それらは代替手段というよりも、むしろ相互補完関係のようなものです。 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 8daac4fb214..c603b5cf615 100644 --- a/docs/guide-ja/concept-di-container.md +++ b/docs/guide-ja/concept-di-container.md @@ -2,7 +2,7 @@ ================ 依存注入 (DI) コンテナは、オブジェクトとそれが依存するすべてのオブジェクトを、インスタンス化し、設定する方法を知っているオブジェクトです。 -なぜ DI コンテナが便利なのかは、[Martin Fowler の記事](http://martinfowler.com/articles/injection.html) の説明がわかりやすいでしょう。 +なぜ DI コンテナが便利なのかは、[Martin Fowler の記事](https://martinfowler.com/articles/injection.html) の説明がわかりやすいでしょう。 ここでは、主に Yii の提供する DI コンテナの使用方法を説明します。 @@ -541,7 +541,7 @@ $reader = $container->get('app\storage\DocumentsReader'); 依存注入と [サービス・ロケータ](concept-service-locator.md) はともに、疎結合でよりテストしやすい方法でのソフトウェア構築を可能にする、 定番のデザインパターンです。 -依存注入とサービス・ロケータへのより深い理解を得るために、 [Martin の記事](http://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-active-record.md b/docs/guide-ja/db-active-record.md index 801a182ae8a..2d149e531d8 100644 --- a/docs/guide-ja/db-active-record.md +++ b/docs/guide-ja/db-active-record.md @@ -956,7 +956,7 @@ $orders = $customer->bigOrders; ### 中間テーブルによるリレーション データベースの設計において、二つの関連するテーブル間の多重性が多対多である場合は、通常、 -[中間テーブル](https://en.wikipedia.org/wiki/Junction_table) が導入されます。 +[中間テーブル](https://ja.wikipedia.org/wiki/%E9%80%A3%E6%83%B3%E3%82%A8%E3%83%B3%E3%83%86%E3%82%A3%E3%83%86%E3%82%A3) が導入されます。 例えば、`order` テーブルと `item` テーブルは、`order_item` と言う名前の中間テーブルによって関連付けることが出来ます。 このようにすれば、一つの注文を複数の商品に対応させ、また、一つの商品を複数の注文に対応させることが出来ます。 diff --git a/docs/guide-ja/db-dao.md b/docs/guide-ja/db-dao.md index f1e09ed1d68..a9388ead827 100644 --- a/docs/guide-ja/db-dao.md +++ b/docs/guide-ja/db-dao.md @@ -275,7 +275,7 @@ Yii::$app->db->createCommand()->batchInsert('user', ['name', 'age'], [ ```php Yii::$app->db->createCommand()->upsert('pages', [ 'name' => 'フロント・ページ', - 'url' => 'http://example.com/', // url はユニーク + 'url' => 'https://example.com/', // url はユニーク 'visits' => 0, ], [ 'visits' => new \yii\db\Expression('visits + 1'), @@ -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 ca850633ee9..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 クエリもあります。 - いくつかの例を [暗黙のコミット](http://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 a938a2f077f..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`](http://www.postgresql.org/docs/8.3/static/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/helper-html.md b/docs/guide-ja/helper-html.md index 6f200dc4365..9de5e12473d 100644 --- a/docs/guide-ja/helper-html.md +++ b/docs/guide-ja/helper-html.md @@ -349,7 +349,7 @@ CSS ファイルの外部スタイルをリンクしたい場合は、次のよ これは次の HTML を生成します。 ``` @@ -399,7 +399,7 @@ CSS と同じように、最初の引数はインクルードされるファイ これは次の HTML を生成します。 -私のロゴ +私のロゴ ``` 最初の引数は、[エイリアス](concept-aliases.md) 以外にも、ルートとパラメータ、または URL を受け入れることが出来ます。[Url::to()](helper-url.md) と同様です。 diff --git a/docs/guide-ja/helper-url.md b/docs/guide-ja/helper-url.md index 544a5460522..45d45c89845 100644 --- a/docs/guide-ja/helper-url.md +++ b/docs/guide-ja/helper-url.md @@ -78,7 +78,7 @@ echo Url::toRoute(['site/index', 'src' => 'ref1', '#' => 'name']); // /index.php?r=post%2Fedit&id=100 エイリアス "@postEdit" は "post/edit" と定義されていると仮定 echo Url::toRoute(['@postEdit', 'id' => 100]); -// http://www.example.com/index.php?r=site%2Findex +// https://www.example.com/index.php?r=site%2Findex echo Url::toRoute('site/index', true); // https://www.example.com/index.php?r=site%2Findex @@ -123,7 +123,7 @@ echo Url::to('@web/images/logo.gif'); // images/logo.gif echo Url::to('images/logo.gif'); -// http://www.example.com/images/logo.gif +// https://www.example.com/images/logo.gif echo Url::to('@web/images/logo.gif', true); // https://www.example.com/images/logo.gif diff --git a/docs/guide-ja/input-forms.md b/docs/guide-ja/input-forms.md index 07f0cf423a6..c955fbdda1d 100644 --- a/docs/guide-ja/input-forms.md +++ b/docs/guide-ja/input-forms.md @@ -241,7 +241,7 @@ Pjax::end(); このことは、すなわち、ajax または [[yii\widgets\Pjax|Pjax]] ウィジェットを使う場合、 ファイルと送信ボタンの値に対する唯一の公式なサポートは、 -`FormData` クラスに対する [ブラウザのサポート](https://developer.mozilla.org/en-US/docs/Web/API/FormData#Browser_compatibility) +`FormData` クラスに対する [ブラウザのサポート](https://developer.mozilla.org/ja/docs/Web/API/FormData#%E3%83%96%E3%83%A9%E3%82%A6%E3%82%B6%E5%AE%9F%E8%A3%85%E7%8A%B6%E6%B3%81) に依存しているということを意味します。 さらに読むべき文書 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 5847f003f45..b8826135377 100644 --- a/docs/guide-ja/input-validation.md +++ b/docs/guide-ja/input-validation.md @@ -748,7 +748,7 @@ JS; ### Deferred 検証 -非同期のクライアント・サイドの検証をサポートする必要がある場合は、[Defered オブジェクト](http://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/intro-yii.md b/docs/guide-ja/intro-yii.md index 494dddc6a2d..f2995b3e761 100644 --- a/docs/guide-ja/intro-yii.md +++ b/docs/guide-ja/intro-yii.md @@ -50,7 +50,7 @@ Yii は現在、利用可能な二つのメジャー・バージョン、すな 必要条件と前提条件 ------------------ -Yii 2.0 は PHP 5.4.0 以上を必要とし、PHP 7 の最新バージョンで最高の力を発揮します。 +Yii 2.0 は PHP 5.4.0 以上を必要とし、PHP の最新バージョンで最高の力を発揮します。 個々の機能に対する詳細な必要条件は、全ての Yii リリースに含まれている必要条件チェッカを走らせることによって知ることが出来ます。 Yii を使うためには、オブジェクト指向プログラミング (OOP) の基本的な知識が必要です。 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 951a1260bef..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 タイムスタンプ](http://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`。 @@ -85,7 +85,7 @@ return [ [[yii\i18n\Formatter::$timeFormat|$timeFormat]]、[[yii\i18n\Formatter::$datetimeFormat|$datetimeFormat]] を構成することで、 グローバルにカスタマイズすることが出来ます。 -日付と時刻のフォーマットは、[ICU 構文](http://userguide.icu-project.org/formatparse/datetime) によって指定することが出来ます。 +日付と時刻のフォーマットは、[ICU 構文](https://unicode-org.github.io/icu/userguide/format_parse/datetime/) によって指定することが出来ます。 また、ICU 構文と区別するために `php:` という接頭辞を付けて、[PHP の date() 構文](https://www.php.net/manual/ja/function.date.php) を使うことも出来ます。例えば、 @@ -167,7 +167,7 @@ echo Yii::$app->formatter->asTime('2014-10-06 14:41:00 CEST'); // 14:41:00 > Note: タイム・ゾーンは世界中のさまざまな政府によって作られる規則に従うものであり、頻繁に変更されるものであるため、 > あなたのシステムにインストールされたタイム・ゾーンのデータベースが最新の情報を持っていない可能性が大いにあります。 > タイム・ゾーン・データベースの更新についての詳細は、 -> [ICU マニュアル](http://userguide.icu-project.org/datetime/timezone#TOC-Updating-the-Time-Zone-Data) で参照することが出来ます。 +> [ICU マニュアル](https://unicode-org.github.io/icu/userguide/datetime/timezone/#updating-the-time-zone-data) で参照することが出来ます。 > [PHP 環境を国際化のために設定する](tutorial-i18n.md#setup-environment) も参照してください。 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 1273e2781b2..6a236cea835 100644 --- a/docs/guide-ja/rest-authentication.md +++ b/docs/guide-ja/rest-authentication.md @@ -10,14 +10,14 @@ アクセス・トークンを送信するには、いくつかの異なる方法があります。 -* [HTTP Basic 認証](http://ja.wikipedia.org/wiki/Basic%E8%AA%8D%E8%A8%BC): アクセス・トークンはユーザ名として送信されます。 +* [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` でクエリ・パラメータとして送信されます。 ほとんどのウェブ・サーバはクエリ・パラメータをサーバのログに記録するため、この手法は、 アクセス・トークンを HTTP ヘッダを使って送信することができない `JSONP` リクエストに応答するために主として使用されるべきです。 -* [OAuth 2](http://oauth.net/2/): OAuth2 プロトコルに従って、 +* [OAuth 2](https://oauth.net/2/): OAuth2 プロトコルに従って、 アクセス・トークンはコンシューマによって権限付与サーバから取得され、[HTTP Bearer Tokens](https://datatracker.ietf.org/doc/html/rfc6750) 経由で API サーバに送信されます。 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-quick-start.md b/docs/guide-ja/rest-quick-start.md index 79e4c6118e1..25d019d0889 100644 --- a/docs/guide-ja/rest-quick-start.md +++ b/docs/guide-ja/rest-quick-start.md @@ -9,7 +9,7 @@ Yii は、RESTful ウェブサービス API を実装する仕事を簡単にす * 出力フィールドの選択をサポートした、カスタマイズ可能なオブジェクトのシリアライゼーション * コレクション・データと検証エラーの適切な書式設定 * コレクションのページネーション、フィルタリングおよびソーティング -* [HATEOAS](http://en.wikipedia.org/wiki/HATEOAS) のサポート +* [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) のサポート * HTTP 動詞を適切にチェックする効率的なルーティング * `OPTIONS` および `HEAD` 動詞のサポートを内蔵 * 認証と権限付与 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 b121fa73c96..502d5707a08 100644 --- a/docs/guide-ja/rest-response-formatting.md +++ b/docs/guide-ja/rest-response-formatting.md @@ -3,8 +3,8 @@ RESTful API のリクエストを処理するとき、アプリケーションは、通常、レスポンス形式の設定に関して次のステップを踏みます。 -1. レスポンス形式に影響するさまざまな要因、例えば、メディア・タイプ、言語、バージョンなどを決定します。 - このプロセスは [コンテント・ネゴシエーション](http://en.wikipedia.org/wiki/Content_negotiation) としても知られるものです。 +1. レスポンス形式に影響しうるさまざまな要因、例えば、メディア・タイプ、言語、バージョンなどを決定します。 + このプロセスは [コンテント・ネゴシエーション](https://en.wikipedia.org/wiki/Content_negotiation) としても知られるものです。 2. リソース・オブジェクトを配列に変換します。 [リソース](rest-resources.md) のセクションで説明したように、この作業は [[yii\rest\Serializer]] によって実行されます。 3. 配列をコンテント・ネゴシエーションのステップで決定された形式の文字列に変換します。 diff --git a/docs/guide-ja/rest-versioning.md b/docs/guide-ja/rest-versioning.md index bfebad959b7..6b89c8e07ae 100644 --- a/docs/guide-ja/rest-versioning.md +++ b/docs/guide-ja/rest-versioning.md @@ -5,11 +5,11 @@ クライアント・サイドとサーバ・サイドの両方のコードを完全に制御できるウェブ・アプリケーションとは違って、API はあなたの制御が及ばないクライアントによって使用されることを想定したものです。このため、API の後方互換性 (BC) は、可能な限り保たれなければなりません。 BC を損なうかも知れない変更が必要な場合は、それを API の新しいバージョンにおいて導入し、バージョン番号を上げるべきです。そうすれば、既存のクライアントは、API の古いけれども動作するバージョンを使い続けることが出来ますし、新しいまたはアップグレードされたクライアントは、新しい API バージョンで新しい機能を使うことが出来ます。 -> Tip: API のバージョン番号の設計に関する詳細情報は - [Semantic Versioning](http://semver.org/) を参照してください。 +> Tip: API のバージョン番号の設計についての詳細な情報は + [Semantic Versioning](https://semver.org/) を参照してください。 API のバージョン管理を実装する方法としてよく使われるのは、バージョン番号を API の URL に埋め込む方法です。 -例えば、`http://example.com/v1/users` が API バージョン 1 の `/users` エンド・ボイントを指す、というものです。 +例えば、`https://example.com/v1/users` が API バージョン 1 の `/users` エンド・ボイントを指す、というものです。 API のバージョン管理のもう一つの方法は、最近流行しているものですが、バージョン番号を HTTP リクエスト・ヘッダに付ける方法です。 これは、典型的には、`Accept` ヘッダによって行われます。 @@ -90,8 +90,8 @@ return [ ]; ``` -上記のコードの結果として、`http://example.com/v1/users` はバージョン 1 のユーザ一覧を返し、 -`http://example.com/v2/users` はバージョン 2 のユーザ一覧を返すことになります。 +上記のコードの結果として、`https://example.com/v1/users` はバージョン 1 のユーザ一覧を返し、 +`https://example.com/v2/users` はバージョン 2 のユーザ一覧を返すことになります。 モジュール化のおかげで、異なるメジャー・バージョンのためのコードを綺麗に分離することが出来ます。 しかし、モジュール化しても、共通の基底クラスやその他の共有リソースを通じて、モジュール間でコードを再利用することは引き続いて可能です。 diff --git a/docs/guide-ja/runtime-requests.md b/docs/guide-ja/runtime-requests.md index e8f5fb829ff..fde78a39a99 100644 --- a/docs/guide-ja/runtime-requests.md +++ b/docs/guide-ja/runtime-requests.md @@ -76,13 +76,13 @@ if ($request->isPut) { /* リクエスト・メソッドは PUT */ } `request` コンポーネントは現在リクエストされている URL を調べるための方法を数多く提供しています。 -リクエストされた URL が `http://example.com/admin/index.php/product?id=100` であると仮定したとき、 +リクエストされた URL が `https://example.com/admin/index.php/product?id=100` であると仮定したとき、 次にまとめたように、この URL のさまざまな部分を取得することが出来ます。 * [[yii\web\Request::url|url]]: `/admin/index.php/product?id=100` を返します。ホスト情報の部分を省略した URL です。 -* [[yii\web\Request::absoluteUrl|absoluteUrl]]: `http://example.com/admin/index.php/product?id=100` を返します。 +* [[yii\web\Request::absoluteUrl|absoluteUrl]]: `https://example.com/admin/index.php/product?id=100` を返します。 ホスト情報の部分を含んだ URL です。 -* [[yii\web\Request::hostInfo|hostInfo]]: `http://example.com` を返します。URL のホスト情報の部分です。 +* [[yii\web\Request::hostInfo|hostInfo]]: `https://example.com` を返します。URL のホスト情報の部分です。 * [[yii\web\Request::pathInfo|pathInfo]]: `/product` を返します。 エントリ・スクリプトの後、疑問符 (クエリ文字列) の前の部分です。 * [[yii\web\Request::queryString|queryString]]: `id=100` を返します。疑問符の後の部分です。 @@ -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-responses.md b/docs/guide-ja/runtime-responses.md index b63a61fb15f..48786c40590 100644 --- a/docs/guide-ja/runtime-responses.md +++ b/docs/guide-ja/runtime-responses.md @@ -169,7 +169,7 @@ public function actionInfo() ```php public function actionOld() { - return $this->redirect('http://example.com/new', 301); + return $this->redirect('https://example.com/new', 301); } ``` @@ -180,7 +180,7 @@ public function actionOld() メソッド・チェーンで [[yii\web\Response::send()]] メソッドを呼んで、レスポンスに余計なコンテントが追加されないことを保証しなければなりません。 ```php -\Yii::$app->response->redirect('http://example.com/new', 301)->send(); +\Yii::$app->response->redirect('https://example.com/new', 301)->send(); ``` > Info: デフォルトでは、[[yii\web\Response::redirect()]] メソッドはレスポンスのステータス・コードを 302 にセットします。 diff --git a/docs/guide-ja/runtime-routing.md b/docs/guide-ja/runtime-routing.md index 67e8776fc68..e075d931021 100644 --- a/docs/guide-ja/runtime-routing.md +++ b/docs/guide-ja/runtime-routing.md @@ -156,7 +156,7 @@ echo Url::to(['post/view', 'id' => 100]); // アンカー付きの URL を生成する: /index.php?r=post%2Fview&id=100#content echo Url::to(['post/view', 'id' => 100, '#' => 'content']); -// 絶対 URL を生成する: http://www.example.com/index.php?r=post%2Findex +// 絶対 URL を生成する: https://www.example.com/index.php?r=post%2Findex echo Url::to(['post/index'], true); // https スキームを使って絶対 URL を生成する: https://www.example.com/index.php?r=post%2Findex @@ -214,11 +214,11 @@ use yii\helpers\Url; // 現在リクエストされている URL: /index.php?r=admin%2Fpost%2Findex echo Url::to(); -// エイリアス化された URL: http://example.com -Yii::setAlias('@example', 'http://example.com/'); +// エイリアス化された URL: https://example.com +Yii::setAlias('@example', 'https://example.com/'); echo Url::to('@example'); -// 絶対 URL: http://example.com/images/logo.gif +// 絶対 URL: https://example.com/images/logo.gif echo Url::to('/images/logo.gif', true); ``` @@ -443,17 +443,17 @@ URL 規則のルートにはパラメータ名を埋め込むことが出来ま URL 規則のパターンには、ウェブ・サーバ名を含むことが出来ます。 このことが役に立つのは、主として、あなたのアプリケーションがウェブ・サーバ名によって異なる動作をしなければならない場合です。 -例えば、次の規則は、`http://admin.example.com/login` という URL を `admin/user/login` のルートとして解析し、`http://www.example.com/login` を `site/login` として解析するものです。 +例えば、次の規則は、`https://admin.example.com/login` という URL を `admin/user/login` のルートとして解析し、`https://www.example.com/login` を `site/login` として解析するものです。 ```php 'rules' => [ - 'http://admin.example.com/login' => 'admin/user/login', - 'http://www.example.com/login' => 'site/login', + 'https://admin.example.com/login' => 'admin/user/login', + 'https://www.example.com/login' => 'site/login', ] ``` サーバ名にパラメータを埋め込んで、そこから動的な情報を抽出することも出来ます。 -例えば、次の規則は `http://en.example.com/posts` という URL を解析して、`post/index` というルートと `language=en` というパラメータを取得するものです。 +例えば、次の規則は `https://en.example.com/posts` という URL を解析して、`post/index` というルートと `language=en` というパラメータを取得するものです。 ```php 'rules' => [ @@ -465,7 +465,7 @@ URL 規則のパターンには、ウェブ・サーバ名を含むことが出 記法は上記と同じです、ただ、`http:` の部分を省略します。例えば、`'//www.example.com/login' => 'site/login'`。 > Note: サーバ名を持つ規則は、そのパターンに、エントリ・スクリプトのサブフォルダを**含まない**ようにすべきです。 -例えば、アプリケーションのエントリ・スクリプトが `http://www.example.com/sandbox/blog/index.php` である場合は、`http://www.example.com/sandbox/blog/posts` ではなく、`http://www.example.com/posts` というパターンを使うべきです。 +例えば、アプリケーションのエントリ・スクリプトが `https://www.example.com/sandbox/blog/index.php` である場合は、`https://www.example.com/sandbox/blog/posts` ではなく、`https://www.example.com/posts` というパターンを使うべきです。 こうすれば、アプリケーションをどのようなディレクトリに配置しても、URL 規則を変更する必要がなくなります。Yii はアプリケーションのベース URL を自動的に検出します。 @@ -632,7 +632,7 @@ class CarUrlRule extends BaseObject implements UrlRuleInterface バージョン 2.0.10 以降、[[yii\web\UrlManager|UrlManager]] で [[yii\web\UrlNormalizer|UrlNormalizer]] を使って、 同一 URL のバリエーション (例えば、末尾のスラッシュの有無) の問題を処理する出来るようになりました。 -技術的には `http://example.com/path` と `http://example.com/path/` は別の URL ですから、これらの両方に同一のコンテントを提供することは SEO ランキングを低下させる可能性があります。 +技術的には `https://example.com/path` と `https://example.com/path/` は別の URL ですから、これらの両方に同一のコンテントを提供することは SEO ランキングを低下させる可能性があります。 デフォルトでは、URL ノーマライザは、連続したスラッシュを畳み、サフィックスが末尾のスラッシュを持っているかどうかに従って末尾のスラッシュを追加または削除し、 正規化された URL に [恒久的な移動](https://en.wikipedia.org/wiki/HTTP_301) を使ってリダイレクトします。 ノーマライザは、URL マネージャのためにグローバルに構成することも、各規則のために個別に構成することも出来ます。 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 5e428433216..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 記事](http://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 e5f121dc558..d38e18faab9 100644 --- a/docs/guide-ja/security-best-practices.md +++ b/docs/guide-ja/security-best-practices.md @@ -162,13 +162,13 @@ CSRF は、クロス・サイト・リクエスト・フォージェリ (cross-s 例えば、`an.example.com` というウェブ・サイトが `/logout` という URL を持っており、 この URL を単純な GET でアクセスするとユーザをログアウトさせるようになっているとします。 -ユーザ自身によってこの URL がリクエストされる限りは何も問題はありませんが、ある日、悪い奴が、ユーザが頻繁に訪れるフォーラムに `` というリンクを含むコンテントを何らかの方法で投稿します。 +ユーザ自身によってこの URL がリクエストされる限りは何も問題はありませんが、ある日、悪い奴が、ユーザが頻繁に訪れるフォーラムに `` というリンクを含むコンテントを何らかの方法で投稿します。 ブラウザは画像のリクエストとページのリクエストの間に何ら区別を付けませんので、ユーザがそのような `img` タグを含むページを開くとブラウザはその URL に対して GET リクエストを送信します。 そして、ユーザが `an.example.com` からログアウトされてしまうことになる訳です。 これは CSRF 攻撃がどのように動作するかという基本的な考え方です。ユーザがログアウトされるぐらいは大したことではない、と言うことも出来るでしょう。 しかしこれは例に過ぎません。この考え方を使って、支払いを開始させたり、データを変更したりというような、もっとひどいことをすることも出来ます。 -`http://an.example.com/purse/transfer?to=anotherUser&amount=2000` という URL を持つウェブ・サイトがあると考えて見てください。この URL に GET リクエストを使ってアクセスすると、権限を持つユーザ・アカウントから `anotherUser` に $2000 が送金されるのです。 +`https://an.example.com/purse/transfer?to=anotherUser&amount=2000` という URL を持つウェブ・サイトがあると考えて見てください。この URL に GET リクエストを使ってアクセスすると、権限を持つユーザ・アカウントから `anotherUser` に $2000 が送金されるのです。 私たちは、ブラウザは画像をロードするのに常に GET リクエストを使う、ということを知っていますから、 この URL が POST リクエストだけを受け入れるようにコードを修正することは出来ます。 しかし残念なことに、それで問題が解決する訳ではありません。攻撃者は `` タグの代りに何らかの JavaScript コードを書いて、 @@ -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 検証を無効化する必要があることがあるでしょう。これは、そのプロパティを設定することによって達成することが出来ます。 @@ -330,11 +330,11 @@ H5BP プロジェクトが提供する構成例を参考にすることも出来 サーバの構成についての詳細な情報は、ウェブ・サーバのドキュメントを参照して下さい。 -- Apache 2: +- 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 a22fbaaaafc..933696b1757 100644 --- a/docs/guide-ja/start-databases.md +++ b/docs/guide-ja/start-databases.md @@ -51,7 +51,7 @@ INSERT INTO `country` VALUES ('US','United States',322976000); DB 接続を構成する ----------------- -先に進む前に、[PDO](https://www.php.net/manual/en/book.pdo.php) PHP 拡張および使用しているデータベースの PDO ドライバ +先に進む前に、[PDO](https://www.php.net/manual/ja/book.pdo.php) PHP 拡張および使用しているデータベースの PDO ドライバ (例えば、MySQL のための `pdo_mysql`) の両方をインストール済みであることを確認してください。 アプリケーションがリレーショナル・データベースを使う場合、これは基本的な必要条件です。 @@ -106,8 +106,8 @@ class Country extends ActiveRecord } ``` -`Country` クラスは [[yii\db\ActiveRecord]] を拡張しています。この中には一つもコードを書く必要はありません。 -単に上記のコードだけで、Yii は関連付けられたテーブル名をクラス名から推測します。 +`Country` クラスは [[yii\db\ActiveRecord]] を拡張しています。ここにコードを追加する必要は全くありません。 +上記のコードだけで、Yii は関連付けられたテーブル名をクラス名から推測します。 > Info: クラス名とテーブル名を直接に合致させることが出来ない場合は、[[yii\db\ActiveRecord::tableName()]] メソッドをオーバーライドして、関連づけられたテーブル名を明示的に指定することが出来ます。 @@ -231,7 +231,7 @@ use yii\widgets\LinkPager; 上記のコード全てがどのように動作するかを見るために、ブラウザで下記の URL をアクセスします。 ``` -http://hostname/index.php?r=country%2Findex +https://hostname/index.php?r=country%2Findex ``` ![国リスト](images/start-country-list.png) @@ -241,7 +241,7 @@ http://hostname/index.php?r=country%2Findex 注意深く観察すると、ブラウザの URL も次のように変ったことに気付くでしょう。 ``` -http://hostname/index.php?r=country%2Findex&page=2 +https://hostname/index.php?r=country%2Findex&page=2 ``` 舞台裏では、[[yii\data\Pagination|Pagination]] が、データ・セットをページ付けするのに必要な全ての機能を提供しています。 diff --git a/docs/guide-ja/start-forms.md b/docs/guide-ja/start-forms.md index 12e55f102c2..226b908e444 100644 --- a/docs/guide-ja/start-forms.md +++ b/docs/guide-ja/start-forms.md @@ -187,7 +187,7 @@ use yii\widgets\ActiveForm; どのように動作するかを見るために、ブラウザで下記の URL にアクセスしてください。 ``` -http://hostname/index.php?r=site%2Fentry +https://hostname/index.php?r=site%2Fentry ``` 二つのインプット・フィールドを持つフォームを表示するページが表示されるでしょう。それぞれのインプット・フィールドの前には、どんなデータを入力すべきかを示すラベルがあります。 diff --git a/docs/guide-ja/start-gii.md b/docs/guide-ja/start-gii.md index be49ca03ada..d6ffaa3729b 100644 --- a/docs/guide-ja/start-gii.md +++ b/docs/guide-ja/start-gii.md @@ -42,7 +42,7 @@ defined('YII_ENV') or define('YII_ENV', 'dev'); この行のおかげで、アプリケーションは開発モードになっており、上記の構成情報によって、Gii が既に有効になっています。これで、下記の URL によって Gii にアクセスすることが出来ます。 ``` -http://hostname/index.php?r=gii +https://hostname/index.php?r=gii ``` > Note: ローカルホスト以外のマシンから Gii にアクセスしようとすると、デフォルトではセキュリティ上の理由でアクセスが拒否されます。 @@ -107,7 +107,7 @@ CRUD は Create(作成)、Read(読出し)、Update(更新)、そして Delete( どのように動作するかを見るために、ブラウザを使って下記の URL にアクセスしてください。 ``` -http://hostname/index.php?r=country%2Findex +https://hostname/index.php?r=country%2Findex ``` データ・グリッドがデータベース・テーブルから取得した国を表示しているページが表示されます。 diff --git a/docs/guide-ja/start-hello.md b/docs/guide-ja/start-hello.md index 8806def5c61..5e66a4fd877 100644 --- a/docs/guide-ja/start-hello.md +++ b/docs/guide-ja/start-hello.md @@ -102,7 +102,7 @@ use yii\helpers\Html; アクションとビューを作成したら、下記の URL で新しいページにアクセスすることが出来ます。 ``` -http://hostname/index.php?r=site%2Fsay&message=Hello+World +https://hostname/index.php?r=site%2Fsay&message=Hello+World ``` ![Hello World](images/start-hello-world.png) diff --git a/docs/guide-ja/start-installation.md b/docs/guide-ja/start-installation.md index e7b674cbd9b..c04806dd143 100644 --- a/docs/guide-ja/start-installation.md +++ b/docs/guide-ja/start-installation.md @@ -114,7 +114,7 @@ composer create-project --prefer-dist yiisoft/yii2-app-basic basic アセットをインストールする -------------------------- -Yii は、アセット (CSS および JavaScript) ライブラリのインストールについて [Bower](http://bower.io/) および/または [NPM](https://www.npmjs.com/) のパッケージに依存しています。 +Yii は、アセット (CSS および JavaScript) ライブラリのインストールについて [Bower](https://bower.io/) および/または [NPM](https://www.npmjs.com/) のパッケージに依存しています。 Yii はこれらのライブラリを取得するのに Composer を使って、PHP と CSS/JavaScript のパッケージ・バージョンを同時に解決できるようにしています。 このことは、[asset-packagist.org](https://asset-packagist.org) または [composer asset plugin](https://github.com/fxpio/composer-asset-plugin) を使用することによって達成されます。 詳細は [アセットのドキュメント](structure-assets.md) を参照して下さい。 @@ -183,13 +183,13 @@ Yii の最低必要条件を満たすように PHP のインストールを構 > Info: もし Yii の試運転をしているだけで、本番サーバに配備する意図がないのであれば、 当面、この項は飛ばしても構いません。 -上記の説明に従ってインストールされたアプリケーションは、[Apache HTTP サーバ](http://httpd.apache.org/) -と [Nginx HTTP サーバ](http://nginx.org/) のどちらでも、また、Windows、Mac OS X、Linux のどれでも、 +上記の説明に従ってインストールされたアプリケーションは、[Apache HTTP サーバ](https://httpd.apache.org/) +と [Nginx HTTP サーバ](https://nginx.org/) のどちらでも、また、Windows、Mac OS X、Linux のどれでも、 PHP 5.4 以上を走らせている環境であれば、そのままの状態で動作するはずです。 -Yii 2.0 は、また、facebook の [HHVM](http://hhvm.com/) とも互換性があります。 +Yii 2.0 は、また、facebook の [HHVM](https://hhvm.com/) とも互換性があります。 ただし HHVM がネイティブの PHP とは異なる振舞いをする特殊なケースもいくつかありますので、HHVM を使うときはいくらか余分に注意を払う必要があります。 -本番用のサーバでは、`http://www.example.com/basic/web/index.php` の代りに `http://www.example.com/index.php` という +本番用のサーバでは、`https://www.example.com/basic/web/index.php` の代りに `https://www.example.com/index.php` という URL でアプリケーションにアクセス出来るようにウェブ・サーバを設定したいでしょう。 そういう設定をするためには、ウェブ・サーバのドキュメント・ルートを `basic/web` フォルダに向けることが必要になります。 また、[ルーティングと URL 生成](runtime-routing.md) のセクションで述べられているように、URL から `index.php` を隠したいとも思うでしょう。 @@ -236,7 +236,7 @@ DocumentRoot "path/to/basic/web" ### 推奨される Nginx の構成 -[Nginx](http://wiki.nginx.org/) を使うためには、PHP を [FPM SAPI](https://www.php.net/manual/ja/install.fpm.php) としてインストールしなければなりません。 +[Nginx](https://www.nginx.com/resources/wiki/) を使うためには、PHP を [FPM SAPI](https://www.php.net/manual/ja/install.fpm.php) としてインストールしなければなりません。 下記の Nginx の設定を使うことができます。 `path/to/basic/web` の部分を `basic/web` の実際のパスに置き換え、`mysite.test` を実際のサーバのホスト名に置き換えてください。 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/start-workflow.md b/docs/guide-ja/start-workflow.md index f922b421f94..b3db52b0ad6 100644 --- a/docs/guide-ja/start-workflow.md +++ b/docs/guide-ja/start-workflow.md @@ -2,13 +2,13 @@ ========================== Yii のインストールが終ると、実際に動く Yii のアプリケーションにアクセスすることが出来ます。 -その URL は、`http://hostname/basic/web/index.php` あるいは `http://hostname/index.php` など、設定によって異なります。 +その URL は、`https://hostname/basic/web/index.php` あるいは `https://hostname/index.php` など、設定によって異なります。 このセクションでは、アプリケーションに組み込み済みの機能を紹介し、コードがどのように編成されているか、 そして、一般にアプリケーションがリクエストをどのように処理するかを説明します。 > Info: 話を簡単にするために、この「始めよう」のチュートリアルを通じて、`basic/web` をウェブ・サーバのドキュメント・ルートとして設定したと仮定します。 - そして、アプリケーションにアクセスするための URL は `http://hostname/index.php` またはそれに似たものになるように設定したと仮定します。 + そして、アプリケーションにアクセスするための URL は `https://hostname/index.php` またはそれに似たものになるように設定したと仮定します。 必要に応じて、説明の中の URL を読み替えてください。 フレームワークそのものとは異なり、プロジェクト・テンプレートはインストール後は完全にあなたのものであることに注意してください。 @@ -20,7 +20,7 @@ Yii のインストールが終ると、実際に動く Yii のアプリケー インストールされたベーシック・アプリケーションは四つのページを持っています。 -* ホームページ: `http://hostname/index.php` の URL にアクセスすると表示されます。 +* ホームページ: `https://hostname/index.php` の URL にアクセスすると表示されます。 * 「について」のページ。 * 「コンタクト」のページ: エンド・ユーザがメールであなたに連絡を取ることが出来るコンタクト・フォームが表示されます。 * 「ログイン」ページ: エンド・ユーザを認証するためのログイン・フォームが表示されます。 @@ -42,7 +42,7 @@ Yii のインストールが終ると、実際に動く Yii のアプリケー アプリケーションにとって最も重要なディレクトリとファイルは (アプリケーションのルート・ディレクトリが `basic` だと仮定すると) 以下の通りです。 -```js +``` basic/ アプリケーションのベース・パス composer.json Composer によって使用される。パッケージ情報を記述 config/ アプリケーションその他の構成情報を格納 @@ -63,7 +63,7 @@ basic/ アプリケーションのベース・パス 一般に、アプリケーションのファイルは二種類に分けることが出来ます。すなわち、`basic/web` の下にあるファイルとその他のディレクトリの下にあるファイルです。 前者は HTTP で (すなわちブラウザで) 直接にアクセスすることが出来ますが、後者は直接のアクセスは出来ませんし、許可すべきでもありません。 -Yii は [モデル・ビュー・コントローラ (MVC)](http://wikipedia.org/wiki/Model-view-controller) アーキテクチャ・パターンを実装していますが、 +Yii は [モデル・ビュー・コントローラ (MVC)](https://wikipedia.org/wiki/Model-view-controller) アーキテクチャ・パターンを実装していますが、 それが上記のディレクトリ構成にも反映されています。 `models` ディレクトリが全ての [モデル・クラス](structure-models.md) を格納し、`views` ディレクトリが全ての [ビュー・スクリプト](structure-views.md) を格納し、 `controllers` ディレクトリが全ての [コントローラ・クラス](structure-controllers.md) を格納しています。 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 f509c21470c..c3c44b8ba9f 100644 --- a/docs/guide-ja/structure-applications.md +++ b/docs/guide-ja/structure-applications.md @@ -275,8 +275,8 @@ if (YII_ENV_DEV) { そして日付をどのように書式設定すべきかを、デフォルトでは、 このプロパティを使用して決定します。 -言語を指定するのには、[IETF 言語タグ](http://ja.wikipedia.org/wiki/IETF%E8%A8%80%E8%AA%9E%E3%82%BF%E3%82%B0) に従うことが推奨されます。 -例えば、`en` は英語を意味し、`en-US` はアメリカ合衆国の英語を意味します。 +言語を指定するのには、[IETF 言語タグ](https://ja.wikipedia.org/wiki/IETF%E8%A8%80%E8%AA%9E%E3%82%BF%E3%82%B0) に従うことが推奨されます。 +例えば、`en` は英語を意味しますが、`en-US` はアメリカ合衆国の英語を意味します。 このプロパティに関する詳細は [国際化](tutorial-i18n.md) のセクションで読むことが出来ます。 @@ -347,8 +347,8 @@ $width = \Yii::$app->params['thumbnail.size'][0]; あなたのコードのテキストのコンテントが英語以外で書かれているときは、このプロパティを構成しなければなりません。 [language](#language) プロパティと同様に、このプロパティは -[IETF 言語タグ](http://ja.wikipedia.org/wiki/IETF%E8%A8%80%E8%AA%9E%E3%82%BF%E3%82%B0) に従って構成しなければなりません。 -例えば、`en` は英語を意味し、`en-US` はアメリカ合衆国の英語を意味します。 +[IETF 言語タグ](https://ja.wikipedia.org/wiki/IETF%E8%A8%80%E8%AA%9E%E3%82%BF%E3%82%B0) に従って構成しなければなりません。 +例えば、`en` は英語を意味しますが、`en-US` はアメリカ合衆国の英語を意味します。 このプロパティに関する詳細は [国際化](tutorial-i18n.md) のセクションで読むことが出来ます。 diff --git a/docs/guide-ja/structure-assets.md b/docs/guide-ja/structure-assets.md index 7a96e7b8467..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 の構成を少し修正しなければなりません。二つの方法があります。 @@ -461,10 +461,10 @@ return [ 'assetManager' => [ 'bundles' => [ 'app\assets\LanguageAssetBundle' => [ - 'baseUrl' => 'http://some.cdn.com/files/i18n/en' // 効力を持たない! + 'baseUrl' => 'https://some.cdn.com/files/i18n/en' // 効力を持たない! ], 'app\assets\LargeFileAssetBundle' => [ - 'baseUrl' => 'http://some.cdn.com/files/large-files' // 効力を持たない! + 'baseUrl' => 'https://some.cdn.com/files/large-files' // 効力を持たない! ], ], ], @@ -579,8 +579,8 @@ return [ ## アセット変換 直接に CSS および/または JavaScript のコードを書く代りに、何らかの拡張構文を使って書いたものを特別なツールを使って CSS/JavaScript に変換する、ということを開発者はしばしば行います。 -例えば、CSS コードのためには、[LESS](http://lesscss.org/) や [SCSS](http://sass-lang.com/) を使うことが出来ます。 -また、JavaScript のためには、[TypeScript](http://www.typescriptlang.org/) を使うことが出来ます。 +例えば、CSS コードのためには、[LESS](https://lesscss.org/) や [SCSS](https://sass-lang.com/) を使うことが出来ます。 +また、JavaScript のためには、[TypeScript](https://www.typescriptlang.org/) を使うことが出来ます。 拡張構文を使ったアセット・ファイルをアセット・バンドルの中の [[yii\web\AssetBundle::css|css]] と [[yii\web\AssetBundle::js|js]] のリストに挙げることが出来ます。例えば、 @@ -644,7 +644,7 @@ return [ コマンドの中の `{from}` と `{to}` のトークンは、ソースのアセット・ファイルのパスとターゲットのアセット・ファイルのパスに置き換えられます。 > Info: 上記で説明した方法の他にも、拡張構文のアセットを扱う方法はあります。 - 例えば、[grunt](http://gruntjs.com/) のようなビルド・ツールを使って、拡張構文のアセットをモニターし、 + 例えば、[grunt](https://gruntjs.com/) のようなビルド・ツールを使って、拡張構文のアセットをモニターし、 自動的に変換することが出来ます。 この場合は、元のファイルではなく、結果として作られる CSS/JavaScript ファイルをアセット・バンドルのリストに挙げなければなりません。 @@ -840,7 +840,7 @@ yii asset assets.php config/assets-prod.php > Info: `asset` コマンドを使うことは、アセットの結合・圧縮のプロセスを自動化する唯一の選択肢ではありません。 - 優秀なタスク実行ツールである [grunt](http://gruntjs.com/) を使っても、同じ目的を達することが出来ます。 + 優秀なタスク実行ツールである [grunt](https://gruntjs.com/) を使っても、同じ目的を達することが出来ます。 ### アセット・バンドルをグループ化する diff --git a/docs/guide-ja/structure-controllers.md b/docs/guide-ja/structure-controllers.md index 84b78e100ea..d67367d42bf 100644 --- a/docs/guide-ja/structure-controllers.md +++ b/docs/guide-ja/structure-controllers.md @@ -1,7 +1,7 @@ コントローラ ============ -コントローラは [MVC](http://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) に引き渡して、 @@ -83,7 +83,7 @@ ControllerID/ActionID ModuleID/ControllerID/ActionID ``` -ですから、ユーザが `http://hostname/index.php?r=site/index` という URL でリクエストをした場合は、 +ですから、ユーザが `https://hostname/index.php?r=site/index` という URL でリクエストをした場合は、 `site` コントローラの中の `index` アクションが実行されます。 ルートがどのようにしてアクションとして解決されるかについての詳細は、[ルーティングと URL 生成](runtime-routing.md) のセクションを参照してください。 @@ -179,7 +179,7 @@ class SiteController extends Controller 全てのアプリケーションは、それぞれ、[[yii\base\Application::defaultRoute]] プロパティによって指定されるデフォルト・コントローラを持ちます。 リクエストが [ルート](#routes) を指定していない場合、このプロパティによって指定されたルートが使われます。 [[yii\web\Application|ウェブ・アプリケーション]] では、この値は `'site'` であり、一方、[[yii\console\Application|コンソール・アプリケーション]] では、`help` です。 -従って、URL が `http://hostname/index.php` である場合は、`site` コントローラがリクエストを処理することになります。 +従って、URL が `https://hostname/index.php` である場合は、`site` コントローラがリクエストを処理することになります。 次のように [アプリケーションの構成情報](structure-applications.md#application-configurations) を構成して、デフォルト・コントローラを変更することが出来ます。 @@ -323,8 +323,8 @@ class HelloWorldAction extends Action ```php public function actionForward() { - // ユーザのブラウザを http://example.com にリダイレクトする - return $this->redirect('http://example.com'); + // ユーザのブラウザを https://example.com にリダイレクトする + return $this->redirect('https://example.com'); } ``` @@ -354,13 +354,13 @@ class PostController extends Controller アクション・パラメータには、次のように、さまざまなリクエストに応じて異なる値が投入されます。 -* `http://hostname/index.php?r=post/view&id=123`: `$id` パラメータには `'123'` という値が入れられます。 +* `https://hostname/index.php?r=post/view&id=123`: `$id` パラメータには `'123'` という値が入れられます。 一方、`version` というクエリ・パラメータは無いので、`$version` は `null` のままになります。 -* `http://hostname/index.php?r=post/view&id=123&version=2`: `$id` および `$version` パラメータに、 +* `https://hostname/index.php?r=post/view&id=123&version=2`: `$id` および `$version` パラメータに、 それぞれ、`'123'` と `'2'` が入ります。 -* `http://hostname/index.php?r=post/view`: 必須の `$id` パラメータがリクエストで提供されていないため、 +* `https://hostname/index.php?r=post/view`: 必須の `$id` パラメータがリクエストで提供されていないため、 [[yii\web\BadRequestHttpException]] 例外が投げられます。 -* `http://hostname/index.php?r=post/view&id[]=123`: `$id` パラメータが予期しない配列値 `['123']` を受け取ろうとするため、 +* `https://hostname/index.php?r=post/view&id[]=123`: `$id` パラメータが予期しない配列値 `['123']` を受け取ろうとするため、 [[yii\web\BadRequestHttpException]] 例外が投げられます。 アクション・パラメータに配列値を受け取らせたい場合は、次のように、パラメータに `array` の型ヒントを付けなければなりません。 @@ -372,8 +372,8 @@ public function actionView(array $id, $version = null) } ``` -このようにすると、リクエストが `http://hostname/index.php?r=post/view&id[]=123` である場合は、`$id` パラメータは `['123']` という値を受け取ります。 -リクエストが `http://hostname/index.php?r=post/view&id=123` である場合も、スカラ値 `'123'` が自動的に配列に変換されるため、 +このようにすると、リクエストが `https://hostname/index.php?r=post/view&id[]=123` である場合は、`$id` パラメータは `['123']` という値を受け取ります。 +リクエストが `https://hostname/index.php?r=post/view&id=123` である場合も、スカラ値 `'123'` が自動的に配列に変換されるため、 `$id` パラメータは引き続き同じ配列値を受け取ります。 上記の例は主としてウェブ・アプリケーションでのアクション・パラメータの動作を示すものです。 diff --git a/docs/guide-ja/structure-extensions.md b/docs/guide-ja/structure-extensions.md index 49d9a152937..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` に依存パッケージをリストアップすることが簡単に出来ます。 @@ -432,10 +432,10 @@ Yii は下記のコア・エクステンション (または ["公式エクス - [yiisoft/yii2-smarty](https://github.com/yiisoft/yii2-smarty): [Smarty](https://www.smarty.net/) に基づいたテンプレート・エンジンを提供します。 - [yiisoft/yii2-sphinx](https://github.com/yiisoft/yii2-sphinx): - [Sphinx](http://sphinxsearch.com) の使用に対するサポートを提供します。 + [Sphinx](https://sphinxsearch.com/) の使用に対するサポートを提供します。 基本的なクエリ、アクティブ・レコード、コード生成などの機能を含みます。 - [yiisoft/yii2-swiftmailer](https://github.com/yiisoft/yii2-swiftmailer): - [swiftmailer](http://swiftmailer.org/) に基づいたメール送信機能を提供します。 + [swiftmailer](https://swiftmailer.symfony.com/) に基づいたメール送信機能を提供します。 - [yiisoft/yii2-twig](https://github.com/yiisoft/yii2-twig): [Twig](https://twig.symfony.com/) に基づいたテンプレート・エンジンを提供します。 diff --git a/docs/guide-ja/structure-filters.md b/docs/guide-ja/structure-filters.md index 8cfd9236ff5..701765ae8a8 100644 --- a/docs/guide-ja/structure-filters.md +++ b/docs/guide-ja/structure-filters.md @@ -141,8 +141,8 @@ public function behaviors() ### 認証メソッド・フィルタ -認証メソッド・フィルタは、[HTTP Basic 認証](http://ja.wikipedia.org/wiki/Basic%E8%AA%8D%E8%A8%BC)、 -[OAuth 2](http://oauth.net/2/) など、様々なメソッドを使ってユーザを認証するために使われるものです。 +認証メソッド・フィルタは、[HTTP Basic 認証](https://ja.wikipedia.org/wiki/Basic%E8%AA%8D%E8%A8%BC)、 +[OAuth 2](https://oauth.net/2/) などの様々なメソッドを使ってユーザを認証するために使われるものです。 これらのフィルタ・クラスはすべて `yii\filters\auth` 名前空間の下にあります。 次の例は、[[yii\filters\auth\HttpBasicAuth]] の使い方を示すもので、HTTP Basic 認証に基づくアクセス・トークンを使ってユーザを認証しています。 @@ -289,7 +289,7 @@ PageCache の使用に関する詳細は [ページ・キャッシュ](caching-p ### [[yii\filters\RateLimiter|RateLimiter]] -RateLimiter は [リーキー・バケット・アルゴリズム](http://ja.wikipedia.org/wiki/%E3%83%AA%E3%83%BC%E3%82%AD%E3%83%BC%E3%83%90%E3%82%B1%E3%83%83%E3%83%88) に基づいてレート制限のアルゴリズムを実装するものです。 +RateLimiter は [リーキー・バケット・アルゴリズム](https://ja.wikipedia.org/wiki/%E3%83%AA%E3%83%BC%E3%82%AD%E3%83%BC%E3%83%90%E3%82%B1%E3%83%83%E3%83%88) に基づいてレート制限のアルゴリズムを実装するものです。 主として RESTful API を実装するときに使用されます。 このフィルタの使用に関する詳細は [レート制限](rest-rate-limiting.md) のセクションを参照してください。 @@ -322,7 +322,7 @@ public function behaviors() ### [[yii\filters\Cors|Cors]] -クロス・オリジン・リソース共有 [CORS](https://developer.mozilla.org/ja/docs/HTTP_access_control) とは、ウェブ・ページにおいて、さまざまなリソース (例えば、フォントや JavaScript など) を、それを生成するドメイン以外のドメインからリクエストすることを可能にするメカニズムです。 +クロス・オリジン・リソース共有 [CORS](https://developer.mozilla.org/ja/docs/Web/HTTP/CORS) とは、ウェブ・ページにおいて、さまざまなリソース (例えば、フォントや JavaScript など) を、それを生成するドメイン以外のドメインからリクエストすることを可能にするメカニズムです。 特に言えば、JavaScript の AJAX 呼出しが使用することが出来る XMLHttpRequest メカニズムです。 このような「クロス・ドメイン」のリクエストは、このメカニズムに拠らなければ、 同一生成元のセキュリティ・ポリシーによって、ウェブ・ブラウザから禁止されるはずのものです。 @@ -350,13 +350,13 @@ public function behaviors() Cors のフィルタリングは [[yii\filters\Cors::$cors|$cors]] プロパティを使ってチューニングすることが出来ます。 -* `cors['Origin']`: 許可される生成元を定義するのに使われる配列。`['*']` (すべて) または `['http://www.myserver.net'、'http://www.myotherserver.com']` などが設定可能。デフォルトは `['*']`。 +* `cors['Origin']`: 許可される生成元を定義するのに使われる配列。`['*']` (すべて) または `['https://www.myserver.net'、'https://www.myotherserver.com']` などが設定可能。デフォルトは `['*']`。 * `cors['Access-Control-Request-Method']`: 許可される HTTP 動詞の配列。たとえば、`['GET', 'OPTIONS', 'HEAD']`。デフォルトは `['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS']`。 * `cors['Access-Control-Request-Headers']`: 許可されるヘッダの配列。全てのヘッダを意味する `['*']` または特定のヘッダを示す `['X-Request-With']` が設定可能。デフォルトは `['*']`。 * `cors['Access-Control-Allow-Credentials']`: 現在のリクエストをクレデンシャルを使ってすることが出来るかどうかを定義。`true`、`false` または `null` (設定なし) が設定可能。デフォルトは `null`。 * `cors['Access-Control-Max-Age']`: プリフライト・リクエストの寿命を定義。デフォルトは `86400`。 -次の例は、生成元 `http://www.myserver.net` に対する `GET`、`HEAD` および `OPTIONS` のメソッドによる CORS を許可するものです。 +次の例は、生成元 `https://www.myserver.net` に対する `GET`、`HEAD` および `OPTIONS` のメソッドによる CORS を許可するものです。 ```php use yii\filters\Cors; @@ -368,7 +368,7 @@ public function behaviors() [ 'class' => Cors::class, 'cors' => [ - 'Origin' => ['http://www.myserver.net'], + 'Origin' => ['https://www.myserver.net'], 'Access-Control-Request-Method' => ['GET', 'HEAD', 'OPTIONS'], ], ], @@ -389,7 +389,7 @@ public function behaviors() [ 'class' => Cors::class, 'cors' => [ - 'Origin' => ['http://www.myserver.net'], + 'Origin' => ['https://www.myserver.net'], 'Access-Control-Request-Method' => ['GET', 'HEAD', 'OPTIONS'], ], 'actions' => [ diff --git a/docs/guide-ja/structure-models.md b/docs/guide-ja/structure-models.md index 4993c6a5dac..80e65d07afa 100644 --- a/docs/guide-ja/structure-models.md +++ b/docs/guide-ja/structure-models.md @@ -1,7 +1,7 @@ モデル ====== -モデルは [MVC](http://ja.wikipedia.org/wiki/Model_View_Controller) アーキテクチャの一部を成すものです。 +モデルは [MVC](https://ja.wikipedia.org/wiki/Model_View_Controller) アーキテクチャの一部を成すものです。 これは、ビジネスのデータ、規則、ロジックを表現するオブジェクトです。 モデル・クラスは、[[yii\base\Model]] またはその子クラスを拡張することによって作成することが出来ます。 @@ -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/structure-modules.md b/docs/guide-ja/structure-modules.md index 99a16445222..f94f2bdd28f 100644 --- a/docs/guide-ja/structure-modules.md +++ b/docs/guide-ja/structure-modules.md @@ -14,7 +14,7 @@ このディレクトリの中に、ちょうどアプリケーションの場合と同じように、`controllers`、`models`、`views` のようなサブ・ディレクトリが存在して、コントローラ、モデル、ビュー、その他のコードを収納しています。 次の例は、モジュール内の中身を示すものです。 -```js +``` forum/ Module.php モジュール・クラス・ファイル controllers/ コントローラ・クラス・ファイルを含む diff --git a/docs/guide-ja/test-fixtures.md b/docs/guide-ja/test-fixtures.md index e7f1323f771..9a8bc4ed6d8 100644 --- a/docs/guide-ja/test-fixtures.md +++ b/docs/guide-ja/test-fixtures.md @@ -107,8 +107,8 @@ DB と関係しないフィクスチャ (例えば、何らかのファイルや ## フィクスチャを使用する -[Codeception](http://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 2d889108bda..9a08f90653c 100644 --- a/docs/guide-ja/test-functional.md +++ b/docs/guide-ja/test-functional.md @@ -9,10 +9,10 @@ POST や GET のパラメータなどの環境変数を設定しておいてか 経験則から言うと、特別なウェブ・サーバ設定や JavaScript による複雑な UI を持たない場合は、 機能テストの方を選ぶべきです。 -機能テストは Codeception フレームワークの助けを借りて実装されています。これにつては、優れたドキュメントがあります。 +機能テストは Codeception フレームワークの助けを借りて実装されています。これについては、優れたドキュメントがあります。 -- [Codeception for Yii framework](http://codeception.com/for/yii) -- [Codeception Functional Tests](http://codeception.com/docs/04-FunctionalTests) +- [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 6b0ba8c805a..2f6caca5cb1 100644 --- a/docs/guide-ja/test-unit.md +++ b/docs/guide-ja/test-unit.md @@ -7,9 +7,9 @@ Yii における単体テストは、PHPUnit と Codeception (こちらはオプションです) の上に構築されます。従って、それらのドキュメントを通読することが推奨されます。 -- [Codeception for Yii framework](http://codeception.com/for/yii) -- [Codeception Unit Tests](http://codeception.com/docs/05-UnitTests) -- [PHPUnit のドキュメントの第2章以降](http://phpunit.de/manual/current/en/writing-tests-for-phpunit.html). +- [Codeception for Yii framework](https://codeception.com/for/yii) +- [Codeception Unit Tests](https://codeception.com/docs/05-UnitTests) +- [第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 a54f7605961..50ba4bf163a 100644 --- a/docs/guide-ja/tutorial-i18n.md +++ b/docs/guide-ja/tutorial-i18n.md @@ -19,8 +19,8 @@ Yii は、全ての領域にわたる国際化機能を提供し、メッセー Yii アプリケーションで使用される全てのロケール ID は、一貫性のために、 `ll-CC` の形式に正規化されなければなりません。 -ここで `ll` は [ISO-639](http://www.loc.gov/standards/iso639-2/) に従った小文字二つまたは三つの言語コードであり、 -`CC` は [ISO-3166](http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html) に従った二文字の国コードです。 +ここで `ll` は [ISO-639](https://www.loc.gov/standards/iso639-2/) に従った小文字二つまたは三つの言語コードであり、 +`CC` は [ISO-3166](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) に従った二文字の国コードです。 ロケールに関する更なる詳細は [ICU プロジェクトのドキュメント](https://unicode-org.github.io/icu/userguide/locale/#the-locale-concept) に述べられています。 @@ -156,8 +156,8 @@ return [ ##### 他のストレージ・タイプ -翻訳メッセージを格納するのには、PHP ファイル以外に、 -次のメッセージ・ソースを使うことも可能です。 +翻訳メッセージを格納するのには、PHP ファイル以外に、次のメッセージ・ソースを +使うことも可能です。 - [[yii\i18n\GettextMessageSource]] - 翻訳メッセージを保持するのに GNU Gettext の MO ファイルまたは PO ファイルを使用する - [[yii\i18n\DbMessageSource]] - 翻訳メッセージを保存するのにデータベース・テーブルを使用する @@ -467,7 +467,7 @@ echo \Yii::t('app', 'There {n,plural,=0{are no cats} =1{is one cat} other{are # これら `other`、`few`、`many` などの特別な引数の名前は言語によって異なります。 特定のロケールに対してどんな引数を指定すべきかを学ぶためには、[https://intl.rmcreative.ru/](https://intl.rmcreative.ru/) の "Plural Rules, Cardinal" を参照してください。 -あるいは、その代りに、[unicode.org の規則のリファレンス](http://cldr.unicode.org/index/cldr-spec/plural-rules) を参照することも出来ます。 +あるいは、その代りに、[unicode.org の規則のリファレンス](https://cldr.unicode.org/index/cldr-spec/plural-rules) を参照することも出来ます。 > Note: 上記のロシア語のメッセージのサンプルは、主として翻訳メッセージとして使用されるものです。 > アプリケーションの [[yii\base\Application::$sourceLanguage|ソース言語]] を `ru-RU` にしてロシア語から他の言語に翻訳するという設定にしない限り、オリジナルのメッセージとしては使用されることはありません。 @@ -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-shared-hosting.md b/docs/guide-ja/tutorial-shared-hosting.md index e5dcaf94159..d06618c33e7 100644 --- a/docs/guide-ja/tutorial-shared-hosting.md +++ b/docs/guide-ja/tutorial-shared-hosting.md @@ -58,7 +58,7 @@ nginx の場合は、追加の構成ファイルは必要がない筈です。 Yii を走らせるためには、あなたのウェブ・サーバは Yii の必要条件を満たさなければなりません。最低限の必要条件は PHP 5.4 です。 必要条件をチェックするために、`requirements.php` をルート・ディレクトリからウェブ・ルート・ディレクトリにコピーして、 -`http://example.com/requirements.php` という URL を使ってブラウザ経由で走らせます。後でファイルを削除するのを忘れないでください。 +`https://example.com/requirements.php` という URL を使ってブラウザ経由で走らせます。後でファイルを削除するのを忘れないでください。 ## アドバンスト・プロジェクト・テンプレートを配備する diff --git a/docs/guide-ja/tutorial-template-engines.md b/docs/guide-ja/tutorial-template-engines.md index d57c7a2d0e3..39518d13ad1 100644 --- a/docs/guide-ja/tutorial-template-engines.md +++ b/docs/guide-ja/tutorial-template-engines.md @@ -2,7 +2,7 @@ ========================== デフォルトでは、Yii は PHP をテンプレート言語として使いますが、[Twig](https://twig.symfony.com/) や -[Smarty](http://www.smarty.net/) などの他のレンダリング・エンジンをサポートするように Yii を構成することが出来ます。 +[Smarty](https://www.smarty.net/) などの他のレンダリング・エンジンをサポートするように Yii を構成することが出来ます。 `view` コンポーネントがビューのレンダリングに責任を持っています。 このコンポーネントのビヘイビアを構成することによって、カスタム・テンプレート・エンジンを追加することが出来ます。 @@ -34,8 +34,8 @@ ] ``` -上記のコードにおいては、Smarty と Twig の両者がビュー・ファイルによって使用可能なものとして構成されています。 -しかし、これらのエクステンションをプロジェクトで使うためには、`composer.json` ファイルも修正して、これらのエクステンションを含める必要があります。 +上記のコードにおいては、Smarty と Twig の両者がビュー・ファイルによって使用可能なものとして構成されています。しかし、 +これらのエクステンションをプロジェクトで使うためには、`composer.json` ファイルも修正して、これらのエクステンションを含める必要があります。 ``` "yiisoft/yii2-smarty": "~2.0.0", diff --git a/docs/guide-ja/tutorial-yii-integration.md b/docs/guide-ja/tutorial-yii-integration.md index 18fcebd040d..b563f39f9e0 100644 --- a/docs/guide-ja/tutorial-yii-integration.md +++ b/docs/guide-ja/tutorial-yii-integration.md @@ -41,7 +41,7 @@ require __DIR__ . '/../vendor/yiisoft/yii2/Yii.php'; 複数のオートローダ・クラスの中で Yii のクラス・オートローダが優先されるように、 ライブラリのオートローダは `Yii.php` ファイルをインクルードする前にインストールすることを推奨します。 -ライブラリがクラスオートローダを提供していない場合でも、クラスの命名規約が [PSR-4](http://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/foo/bar` ディレクトリの下にインストールしたとしましょう。 そしてライブラリのクラスは `xyz` ルート名前空間の下にあるとします。 diff --git a/docs/guide-pl/concept-aliases.md b/docs/guide-pl/concept-aliases.md index 81b8f7ae5c8..097db52ad2b 100644 --- a/docs/guide-pl/concept-aliases.md +++ b/docs/guide-pl/concept-aliases.md @@ -16,7 +16,7 @@ Możesz zdefiniować alias do ścieżki pliku lub adresu URL wywołując [[Yii:: Yii::setAlias('@foo', '/path/to/foo'); // alias do adresu URL -Yii::setAlias('@bar', 'http://www.example.com'); +Yii::setAlias('@bar', 'https://www.example.com'); // alias istniejącego pliku, zawierającego klasę \foo\Bar Yii::setAlias('@foo/Bar.php', '/zdecydowanie/nie/foo/Bar.php'); @@ -43,7 +43,7 @@ return [ // ... 'aliases' => [ '@foo' => '/path/to/foo', - '@bar' => 'http://www.example.com', + '@bar' => 'https://www.example.com', ], ]; ``` @@ -57,7 +57,7 @@ Dotyczy to zarówno bazowych aliasów, jak i pochodnych: ```php echo Yii::getAlias('@foo'); // wyświetla: /ścieżka/do/foo -echo Yii::getAlias('@bar'); // wyświetla: http://www.example.com +echo Yii::getAlias('@bar'); // wyświetla: https://www.example.com echo Yii::getAlias('@foo/bar/file.php'); // wyświetla: /ścieżka/do/foo/bar/file.php ``` diff --git a/docs/guide-pl/input-forms.md b/docs/guide-pl/input-forms.md index 60b11d25fca..f50d7861a1d 100644 --- a/docs/guide-pl/input-forms.md +++ b/docs/guide-pl/input-forms.md @@ -228,7 +228,7 @@ wprowadzonej w HTML5. Oznacza to, że oficjalne wsparcie dla plików i wartości przycisku submit używanych w połączeniu z ajaxem lub widżetem [[yii\widgets\Pjax|Pjax]] zależy od -[[https://developer.mozilla.org/en-US/docs/Web/API/FormData#Browser_compatibility|wsparcia przeglądarki]] +[[https://developer.mozilla.org/en-US/docs/Web/API/FormData#browser_compatibility|wsparcia przeglądarki]] dla klasy `FormData`. Dalsza lektura diff --git a/docs/guide-pl/input-validation.md b/docs/guide-pl/input-validation.md index bc3b76aa2c1..333edffbef9 100644 --- a/docs/guide-pl/input-validation.md +++ b/docs/guide-pl/input-validation.md @@ -702,7 +702,7 @@ JS; ### Kolejkowa walidacja -Jeśli potrzebujesz przeprowadzić asynchroniczną walidację po stronie klienta, możesz utworzyć [obiekt kolejkujący](http://api.jquery.com/category/deferred-object/). +Jeśli potrzebujesz przeprowadzić asynchroniczną walidację po stronie klienta, możesz utworzyć [obiekt kolejkujący](https://api.jquery.com/category/deferred-object/). Dla przykładu, aby przeprowadzić niestandardową walidację AJAX, możesz użyć następującego kodu: ```php diff --git a/docs/guide-pl/intro-yii.md b/docs/guide-pl/intro-yii.md index facb8a57bc9..a70e448fcff 100644 --- a/docs/guide-pl/intro-yii.md +++ b/docs/guide-pl/intro-yii.md @@ -52,7 +52,7 @@ Ten przewodnik opisuje wersję 2.0. Wymagania i zależności ---------------------- -Yii 2.0 wymaga PHP w wersji 5.4.0 lub nowszej i pracuje najwydajniej na najnowszej wersji PHP 7. Aby otrzymać więcej +Yii 2.0 wymaga PHP w wersji 5.4.0 lub nowszej i pracuje najwydajniej na najnowszej wersji PHP. Aby otrzymać więcej informacji na temat wymagań i indywidualnych funkcjonalności, uruchom specjalny skrypt testujący system dołączony w każdym wydaniu Yii. Używanie Yii wymaga podstawowej wiedzy o programowaniu obiektowym w PHP (OOP), ponieważ Yii diff --git a/docs/guide-pl/output-client-scripts.md b/docs/guide-pl/output-client-scripts.md index 43576d1b2a1..f2162588f3a 100644 --- a/docs/guide-pl/output-client-scripts.md +++ b/docs/guide-pl/output-client-scripts.md @@ -29,7 +29,7 @@ Jeśli ten argument nie zostanie podany, kod JavaScript zostanie użyty jako ID. Skrypt zewnętrzny może zostać dodany następująco: ```php -$this->registerJsFile('http://example.com/js/main.js', ['depends' => [\yii\web\JqueryAsset::class]]); +$this->registerJsFile('https://example.com/js/main.js', ['depends' => [\yii\web\JqueryAsset::class]]); ``` Argumenty dla metod [[yii\web\View::registerCssFile()|registerCssFile()]] są podobne do [[yii\web\View::registerJsFile()|registerJsFile()]]. @@ -72,7 +72,7 @@ Jeśli chcesz określić dodatkowe właściwości dla tagu `style`, przekaż tab Jeśli chcesz się upewnić, że jest tylko jeden tag `style`, użyj trzeciego argumentu, tak jak zostało to opisane dla meta tagów. ```php -$this->registerCssFile("http://example.com/css/themes/black-and-white.css", [ +$this->registerCssFile("https://example.com/css/themes/black-and-white.css", [ 'depends' => [BootstrapAsset::class], 'media' => 'print', ], 'css-print-theme'); diff --git a/docs/guide-pl/rest-versioning.md b/docs/guide-pl/rest-versioning.md index 25e9d9fe8e1..efdffe6abc5 100644 --- a/docs/guide-pl/rest-versioning.md +++ b/docs/guide-pl/rest-versioning.md @@ -12,7 +12,7 @@ działającej wersji API, a nowe lub uaktualnione klienty mogą otrzymać nową numerów wersji. Jedną z często spotykanych implementacji wersjonowania API jest dodawanie numeru wersji w adresach URL API. -Dla przykładu `http://example.com/v1/users` oznacza punkt końcowy `/users` API w wersji 1. +Dla przykładu `https://example.com/v1/users` oznacza punkt końcowy `/users` API w wersji 1. Inną metodą wersjonowania API, która zyskuje ostatnio popularność, jest umieszczanie numeru wersji w nagłówkach HTTP żądania. Zwykle używa się do tego nagłówka `Accept`: @@ -92,8 +92,8 @@ return [ ]; ``` -Rezultatem powyższego kodu będzie skierowanie pod adresem `http://example.com/v1/users` do listy użytkowników w wersji 1, podczas gdy -`http://example.com/v2/users` pokaże użytkowników w wersji 2. +Rezultatem powyższego kodu będzie skierowanie pod adresem `https://example.com/v1/users` do listy użytkowników w wersji 1, podczas gdy +`https://example.com/v2/users` pokaże użytkowników w wersji 2. Dzięki podziałowi na moduły, kod różnych głównych wersji może być dobrze izolowany, ale jednocześnie wciąż możliwe jest ponowne wykorzystanie wspólnego kodu poprzez wspólną bazę klas i dzielonych zasobów. diff --git a/docs/guide-pl/start-databases.md b/docs/guide-pl/start-databases.md index 0a365845a4e..5f261ba8ce0 100644 --- a/docs/guide-pl/start-databases.md +++ b/docs/guide-pl/start-databases.md @@ -210,7 +210,7 @@ Sprawdź jak to działa Aby zobaczyć jak działa powyższy kod, użyj przeglądarki i przejdź pod podany adres URL: ``` -http://hostname/index.php?r=country%2Findex +https://hostname/index.php?r=country%2Findex ``` ![Lista krajów](images/start-country-list.png) @@ -220,7 +220,7 @@ Jeśli klikniesz przycisk "2", zobaczysz stronę wyświetlającą pięć innych Zauważ, że adres URL w przeglądarce również się zmienił na ``` -http://hostname/index.php?r=country%2Findex&page=2 +https://hostname/index.php?r=country%2Findex&page=2 ``` Za kulisami, [[yii\data\Pagination|Pagination]] dostarcza wszystkich niezbędnych funkcjonalności do stronicowania zbioru danych: diff --git a/docs/guide-pl/start-forms.md b/docs/guide-pl/start-forms.md index b550f1d7d3c..b9ce0ae06f7 100644 --- a/docs/guide-pl/start-forms.md +++ b/docs/guide-pl/start-forms.md @@ -177,7 +177,7 @@ Próba Aby zobaczyć jak to działa, użyj przeglądarki i przejdź pod dany adres: ``` -http://hostname/index.php?r=site%2Fentry +https://hostname/index.php?r=site%2Fentry ``` Zobaczysz stronę wyświetlającą formularz z dwoma polami. Przed każdym polem znajduje się etykieta opisująca to pole. Jeśli klikniesz przycisk "Wyślij" nie wpisując żadnych danych, lub diff --git a/docs/guide-pl/start-gii.md b/docs/guide-pl/start-gii.md index 60db8170e39..f2b82c62dfe 100644 --- a/docs/guide-pl/start-gii.md +++ b/docs/guide-pl/start-gii.md @@ -43,7 +43,7 @@ defined('YII_ENV') or define('YII_ENV', 'dev'); Dzięki temu Twoja aplikacja ustawiana jest w tryb rozwojowy, co uaktywnia moduł Gii. Możesz teraz uzyskać dostęp do Gii przez przejście pod podany adres URL: ``` -http://hostname/index.php?r=gii +https://hostname/index.php?r=gii ``` > Note: Jeśli próbujesz dostać się do Gii z maszyny innej niż localhost, dostęp domyślnie będzie zablokowany ze względów bezpieczeństwa. @@ -108,7 +108,7 @@ Sprawdzenie w działaniu Aby zobaczyć, jak działa nowo wygenerowany kod, użyj przeglądarki, aby uzyskać dostęp do podanego adresu URL: ``` -http://hostname/index.php?r=country%2Findex +https://hostname/index.php?r=country%2Findex ``` Zobaczysz tabelę prezentującą kraje z bazy danych. Możesz sortować tabelę, lub filtrować ją przez wpisanie odpowiednich warunków w nagłówkach kolumn. diff --git a/docs/guide-pl/start-hello.md b/docs/guide-pl/start-hello.md index c6040b37ca6..b5088189d6e 100644 --- a/docs/guide-pl/start-hello.md +++ b/docs/guide-pl/start-hello.md @@ -88,7 +88,7 @@ Próba Po utworzeniu akcji oraz widoku możesz uzyskać dostęp do nowej strony przez przejście pod podany adres URL: ``` -http://hostname/index.php?r=site%2Fsay&message=Hello+World +https://hostname/index.php?r=site%2Fsay&message=Hello+World ``` ![Witaj świecie](images/start-hello-world.png) diff --git a/docs/guide-pl/start-installation.md b/docs/guide-pl/start-installation.md index f96e60740dd..f374551a9ae 100644 --- a/docs/guide-pl/start-installation.md +++ b/docs/guide-pl/start-installation.md @@ -192,7 +192,7 @@ z [facebookowym HHVM](https://hhvm.com), są jednak przypadki, gdzie Yii zachowu dlatego powinieneś zachować szczególną ostrożność używając HHVM. Na serwerze produkcyjnym możesz skonfigurować swój host tak, aby aplikacja była dostępna pod adresem -`http://www.example.com/index.php` zamiast `http://www.example.com/basic/web/index.php`. Taka konfiguracja wymaga wskazania +`https://www.example.com/index.php` zamiast `https://www.example.com/basic/web/index.php`. Taka konfiguracja wymaga wskazania głównego katalogu serwera jako katalogu `basic/web`. Jeśli chcesz ukryć `index.php` w adresie URL, skorzystaj z informacji opisanych w dziale [routing i tworzenie adresów URL](runtime-routing.md). W tej sekcji dowiesz się, jak skonfigurować Twój serwer Apache lub Nginx, aby osiągnąć te cele. diff --git a/docs/guide-pl/start-workflow.md b/docs/guide-pl/start-workflow.md index 3e2ebc2ec57..a6f1e93b1c1 100644 --- a/docs/guide-pl/start-workflow.md +++ b/docs/guide-pl/start-workflow.md @@ -1,11 +1,11 @@ Uruchamianie aplikacji ==================== -Po zainstalowaniu Yii posiadasz działającą aplikację Yii dostępną pod adresem `http://hostname/basic/web/index.php` lub `http://hostname/index.php`, zależnie od Twojej konfiguracji. +Po zainstalowaniu Yii posiadasz działającą aplikację Yii dostępną pod adresem `https://hostname/basic/web/index.php` lub `https://hostname/index.php`, zależnie od Twojej konfiguracji. Ta sekcja wprowadzi Cię do wbudowanych funkcjonalności aplikacji, pokaże jak zorganizowany jest jej kod oraz jak aplikacja obsługuje żądania. > Info: Dla uproszczenia zakładamy, że ustawiłeś główny katalog serwera na `basic/web`, według poradnika "Instalacja Yii", oraz skonfigurowałeś adres URL tak, aby Twoja aplikacja była -> dostępna pod adresem `http://hostname/index.php`. +> dostępna pod adresem `https://hostname/index.php`. > Dla Twoich potrzeb dostosuj odpowiednio adres URL w naszych opisach. Należy pamiętać, że w przeciwieństwie do samego frameworka, po zainstalowaniu szablonu projektu należy on w całości do Ciebie. Możesz dowolnie dodawać, modyfikować lub usuwać kod, @@ -16,7 +16,7 @@ Funkcjonalność Zainstalowana podstawowa aplikacja posiada cztery strony: -* stronę główną, która jest wyświetlana przy wywołaniu adresu `http://hostname/index.php`, +* stronę główną, która jest wyświetlana przy wywołaniu adresu `https://hostname/index.php`, * strona informacyjna `About`, * strona kontaktowa `Contact`, gdzie wyświetlany jest formularz kontaktowy, pozwalający użytkownikowi skontaktować się z Tobą przez email, * strona logowania `Login`, gdzie wyświetlany jest formularz logowania, który może być użyty do uwierzytelniania użytkowników. Zaloguj się danymi "admin/admin", przez co pozycja @@ -36,7 +36,7 @@ Struktura aplikacji Najważniejsze katalogi oraz pliki w Twojej aplikacji to (zakładając, że główny katalog aplikacji to `basic`): -```js +``` basic/ bazowa ścieżka aplikacji composer.json plik używany przez Composer, opisuje informacje paczek config/ zawiera wszystkie konfiguracje, w tym aplikacji diff --git a/docs/guide-pl/tutorial-shared-hosting.md b/docs/guide-pl/tutorial-shared-hosting.md index 56dd9dc1b57..dbcf4c9d8ab 100644 --- a/docs/guide-pl/tutorial-shared-hosting.md +++ b/docs/guide-pl/tutorial-shared-hosting.md @@ -55,7 +55,7 @@ W przypadku serwera nginx nie powinieneś potrzebować dodatkowego pliku konfigu ### Sprawdzenie wymagań Aby uruchomić Yii, Twój serwer musi spełniać jego wymagania. Minimalnym wymaganiem jest PHP w wersji 5.4. Możesz sprawdzić wszystkie wymagania, kopiując plik -`requirements.php` z folderu root do folderu webroot i uruchamiając go w przeglądarce pod adresem `http://example.com/requirements.php`. +`requirements.php` z folderu root do folderu webroot i uruchamiając go w przeglądarce pod adresem `https://example.com/requirements.php`. Nie zapomnij o skasowaniu tego pliku po sprawdzeniu wymagań. 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/concept-aliases.md b/docs/guide-pt-BR/concept-aliases.md index 6b6e0ae42b9..047247d0d36 100644 --- a/docs/guide-pt-BR/concept-aliases.md +++ b/docs/guide-pt-BR/concept-aliases.md @@ -15,7 +15,7 @@ Você pode definir um alias para um caminho de arquivo ou URL chamando [[Yii::se Yii::setAlias('@foo', '/caminho/para/foo'); // um alias de uma URL -Yii::setAlias('@bar', 'http://www.exemplo.com.br'); +Yii::setAlias('@bar', 'https://www.exemplo.com.br'); ``` > Observação: O caminho do arquivo ou URL sendo *apelidado* (aliased) *não* necessariamente refere-se a um arquivo ou a recursos existentes. @@ -37,7 +37,7 @@ return [ // ... 'aliases' => [ '@foo' => '/caminho/para/foo', - '@bar' => 'http://www.exemplo.com.br', + '@bar' => 'https://www.exemplo.com.br', ], ]; ``` @@ -51,7 +51,7 @@ O mesmo método pode resolver também um alias derivado em seu caminho de arquiv ```php echo Yii::getAlias('@foo'); // exibe: /caminho/para/foo -echo Yii::getAlias('@bar'); // exibe: http://www.example.com +echo Yii::getAlias('@bar'); // exibe: https://www.example.com echo Yii::getAlias('@foo/bar/arquivo.php'); // exibe: /caminho/para/foo/bar/arquivo.php ``` @@ -101,7 +101,7 @@ O Yii já predefine uma gama de aliases para referenciar facilmente caminhos de - `@web`, a URL base da aplicacão sendo executada no momento. Esta tem o mesmo valor de [[yii\web\Request::baseUrl]]. - `@vendor`, o [[yii\base\Application::vendorPath|caminho da pasta vendor do Composer]]. Seu padrão é `@app/vendor`. -- `@bower`, o caminho raiz que contém os [pacotes bower](http://bower.io/). Seu padrão é `@vendor/bower`. +- `@bower`, o caminho raiz que contém os [pacotes bower](https://bower.io/). Seu padrão é `@vendor/bower`. - `@npm`, o caminho raiz que contém [pacotes npm](https://www.npmjs.com/). Seu padrão é `@vendor/npm`. O alias `@yii` é definido quando você inclui o arquivo `Yii.php` em seu [script de entrada](structure-entry-scripts.md). diff --git a/docs/guide-pt-BR/concept-autoloading.md b/docs/guide-pt-BR/concept-autoloading.md index 75aac87710f..7ea5a053ee1 100644 --- a/docs/guide-pt-BR/concept-autoloading.md +++ b/docs/guide-pt-BR/concept-autoloading.md @@ -12,7 +12,7 @@ Usando o Autoloader do Yii Para fazer uso da autoloader de classe do Yii, você deve seguir duas regras simples ao criar e nomear suas classes: -* Cada classe deve estar debaixo de um [namespace](https://www.php.net/manual/en/language.namespaces.php) (exemplo. `foo\bar\MyClass`) +* Cada classe deve estar debaixo de um [namespace](https://www.php.net/manual/pt_BR/language.namespaces.php) (exemplo. `foo\bar\MyClass`) * Cada classe deve ser salvo em um arquivo individual cujo caminho é determinado pelo seguinte algoritmo: ```php diff --git a/docs/guide-pt-BR/concept-behaviors.md b/docs/guide-pt-BR/concept-behaviors.md index 86d06326585..2e66e053f20 100644 --- a/docs/guide-pt-BR/concept-behaviors.md +++ b/docs/guide-pt-BR/concept-behaviors.md @@ -1,7 +1,7 @@ Behaviors (Comportamentos) ========= -Behaviors são instâncias de [[yii\base\Behavior]], ou de uma classe-filha, também conhecido como [mixins](http://en.wikipedia.org/wiki/Mixin), permite melhorar a funcionalidade de uma classe [[yii\base\Component|componente]] existente sem a necessidade de mudar a herança dela. +Behaviors são instâncias de [[yii\base\Behavior]], ou de uma classe-filha, também conhecido como [mixins](https://en.wikipedia.org/wiki/Mixin), permite melhorar a funcionalidade de uma classe [[yii\base\Component|componente]] existente sem a necessidade de mudar a herança dela. Anexar um behavior a um componente "introduz" os métodos e propriedades do behavior dentro do componente, tornando esses métodos e propriedades acessíveis como se estes fossem definidos na própria classe do componente. Além disso, um behavior pode responder a um [evento](concept-events.md) disparado pelo componente, o que permite a customização do código normal. @@ -291,7 +291,7 @@ $user->touch('login_time'); Comparando Behaviors com Traits ---------------------- -Apesar de behaviors serem semelhantes a [traits](https://www.php.net/traits) em que ambos "injetam" suas propriedades e métodos para a classe principal, eles diferem em muitos aspectos. Tal como explicado abaixo, ambos têm prós e contras. Eles funcionam mais como complemento um do outro. +Apesar de behaviors serem semelhantes a [traits](https://www.php.net/manual/pt_BR/language.oop5.traits.php) em que ambos "injetam" suas propriedades e métodos para a classe principal, eles diferem em muitos aspectos. Tal como explicado abaixo, ambos têm prós e contras. Eles funcionam mais como complemento um do outro. ### Razões para usar Behaviors diff --git a/docs/guide-pt-BR/concept-events.md b/docs/guide-pt-BR/concept-events.md index df33873fbd4..efad3c98809 100644 --- a/docs/guide-pt-BR/concept-events.md +++ b/docs/guide-pt-BR/concept-events.md @@ -9,7 +9,7 @@ Se sua classe precisar disparar eventos, ela deverá estender de [[yii\base\Comp Manipuladores de Evento -------------- -Um manipulador de evento é uma função [Callback do PHP] (https://www.php.net/manual/en/language.types.callable.php) que é executada quando o evento é disparado. Você pode usar qualquer um dos seguintes callbacks: +Um manipulador de evento é uma função [Callback do PHP] (https://www.php.net/manual/pt_BR/language.types.callable.php) que é executada quando o evento é disparado. Você pode usar qualquer um dos seguintes callbacks: - uma função global do PHP especificada como uma string (sem parênteses), por exemplo, `'trim'`; - Um método do objeto especificado como um array, informando o objeto e um nome do método como uma string (sem parênteses), por exemplo `[$object, 'methodName']`; - Um método estático da classe especificado como um array informando o nome da classe e nome do método como string (sem parênteses), por exemplo, `['ClassName', 'methodName']`; diff --git a/docs/guide-pt-BR/db-active-record.md b/docs/guide-pt-BR/db-active-record.md index db330813276..8f9176a82c4 100644 --- a/docs/guide-pt-BR/db-active-record.md +++ b/docs/guide-pt-BR/db-active-record.md @@ -1,7 +1,7 @@ Active Record ============= -O [Active Record](https://en.wikipedia.org/wiki/Active_record_pattern) fornece uma interface orientada a objetos para acessar e manipular dados armazenados em bancos de dados. Uma classe Active Record está associado a uma tabela da base de dados, uma instância do Active Record corresponde a uma linha desta tabela, e um *atributo* desta instância representa o valor de uma coluna desta linha. Em vez de escrever instruções SQL a mão, você pode acessar os atributos do Active Record e chamar os métodos do Active Record para acessar e manipular os dados armazenados nas tabelas do banco de dados. +O [Active Record](https://pt.wikipedia.org/wiki/Active_record) fornece uma interface orientada a objetos para acessar e manipular dados armazenados em bancos de dados. Uma classe Active Record está associado a uma tabela da base de dados, uma instância do Active Record corresponde a uma linha desta tabela, e um *atributo* desta instância representa o valor de uma coluna desta linha. Em vez de escrever instruções SQL a mão, você pode acessar os atributos do Active Record e chamar os métodos do Active Record para acessar e manipular os dados armazenados nas tabelas do banco de dados. Por exemplo, assumindo que `Customer` é uma classe Active Record que está associada com a tabela `customer` e `name` é uma coluna desta tabela. Você pode escrever o seguinte código para inserir uma nova linha na tabela `customer`: @@ -674,7 +674,7 @@ $orders = $customer->bigOrders; ### Relações Através de Tabela de Junção -Em uma modelagem de banco de dados, quando a multiplicidade entre duas tabelas relacionadas é `many-to-many`, geralmente é criada uma [tabela de junção](https://en.wikipedia.org/wiki/Junction_table). Por exemplo, a tabela `order` e a tabela `item` podem se relacionar através da tabela de junção chamada `order_item`. Um `order`, então, corresponderá a múltiplos `order items`, enquanto um `product item` também corresponderá a múltiplos `order items`. +Em uma modelagem de banco de dados, quando a multiplicidade entre duas tabelas relacionadas é `many-to-many`, geralmente é criada uma [tabela de junção](https://pt.wikipedia.org/wiki/Entidade_associativa). Por exemplo, a tabela `order` e a tabela `item` podem se relacionar através da tabela de junção chamada `order_item`. Um `order`, então, corresponderá a múltiplos `order items`, enquanto um `product item` também corresponderá a múltiplos `order items`. Ao declarar tais relações, você chamaria [[yii\db\ActiveQuery::via()|via()]] ou [[yii\db\ActiveQuery::viaTable()|viaTable()]] para especificar a tabela de junção. A diferença entre [[yii\db\ActiveQuery::via()|via()]] e [[yii\db\ActiveQuery::viaTable()|viaTable()]] é que o primeiro especifica a tabela de junção em função a uma relação existente enquanto o último faz referência diretamente a tabela de junção. Por exemplo, diff --git a/docs/guide-pt-BR/db-query-builder.md b/docs/guide-pt-BR/db-query-builder.md index e8e6d201396..b598c10fe6d 100644 --- a/docs/guide-pt-BR/db-query-builder.md +++ b/docs/guide-pt-BR/db-query-builder.md @@ -220,7 +220,7 @@ onde cada um dos operandos pode ser especificado no formato string, formato hash - `like`: o operando 1 deve ser uma coluna ou uma expressão DB, e o operando 2 deve ser uma string ou um array representando o valor que a coluna ou expressão DB devem atender. Por exemplo, `['like', 'name', 'tester']` irá gerar `name LIKE '%tester%'`. Quando a faixa de valor é dado como um array, múltiplos predicados `LIKE` serão gerados e concatenadas utilizando `AND`. Por exemplo, `['like', 'name', ['test', 'sample']]` irá gerar `name LIKE '%test%' AND name LIKE '%sample%'`. Você também pode fornecer um terceiro operando opcional para especificar como escapar caracteres especiais nos valores. O operando deve ser um array de mapeamentos de caracteres especiais. Se este operando não for fornecido, um mapeamento de escape padrão será usado. Você pode usar `false` ou um array vazio para indicar que os valores já estão escapados e nenhum escape deve ser aplicado. Note-se que ao usar um mapeamento de escape (ou o terceiro operando não é fornecido), os valores serão automaticamente fechado dentro de um par de caracteres percentuais. - > Observação: Ao utilizar o SGDB PostgreSQL você também pode usar [`ilike`](http://www.postgresql.org/docs/8.3/static/functions-matching.html#FUNCTIONS-LIKE) + > Observação: Ao utilizar o SGDB PostgreSQL você também pode usar [`ilike`](https://www.postgresql.org/docs/8.3/functions-matching.html#FUNCTIONS-LIKE) > em vez de `like` para diferenciar maiúsculas de minúsculas. - `or like`: similar ao operador `like` exceto pelo fato de que `OR` é usado para concatenar os predicados `LIKE` quando o operando 2 é um array. diff --git a/docs/guide-pt-BR/helper-url.md b/docs/guide-pt-BR/helper-url.md index debdd90995d..367b9e6ddfb 100644 --- a/docs/guide-pt-BR/helper-url.md +++ b/docs/guide-pt-BR/helper-url.md @@ -73,7 +73,7 @@ echo Url::toRoute(['site/index', 'src' => 'ref1', '#' => 'name']); // /index.php?r=post/edit&id=100 assume the alias "@postEdit" is defined as "post/edit" echo Url::toRoute(['@postEdit', 'id' => 100]); -// http://www.example.com/index.php?r=site/index +// https://www.example.com/index.php?r=site/index echo Url::toRoute('site/index', true); // https://www.example.com/index.php?r=site/index @@ -115,7 +115,7 @@ echo Url::to('@web/images/logo.gif'); // images/logo.gif echo Url::to('images/logo.gif'); -// http://www.example.com/images/logo.gif +// https://www.example.com/images/logo.gif echo Url::to('@web/images/logo.gif', true); // https://www.example.com/images/logo.gif diff --git a/docs/guide-pt-BR/intro-yii.md b/docs/guide-pt-BR/intro-yii.md index 2a4b6dabfdf..5ba072351c9 100644 --- a/docs/guide-pt-BR/intro-yii.md +++ b/docs/guide-pt-BR/intro-yii.md @@ -65,5 +65,5 @@ detalhados para recursos específicos executando o verificador de requisitos Utilizar o Yii requer conhecimentos básicos sobre programação orientada a objetos (OOP), uma vez que o Yii é um framework puramente OOP. -O Yii 2.0 também utiliza as funcionalides mais recentes do PHP, tais como [namespaces](https://www.php.net/manual/en/language.namespaces.php) e [traits](https://www.php.net/manual/en/language.oop5.traits.php). Compreender esses conceitos lhe ajudará a entender mais facilmente o Yii 2.0. +O Yii 2.0 também utiliza as funcionalides mais recentes do PHP, tais como [namespaces](https://www.php.net/manual/pt_BR/language.namespaces.php) e [traits](https://www.php.net/manual/pt_BR/language.oop5.traits.php). Compreender esses conceitos lhe ajudará a entender mais facilmente o Yii 2.0. diff --git a/docs/guide-pt-BR/rest-versioning.md b/docs/guide-pt-BR/rest-versioning.md index 5acd5e3d26b..5f36dadfbef 100644 --- a/docs/guide-pt-BR/rest-versioning.md +++ b/docs/guide-pt-BR/rest-versioning.md @@ -80,7 +80,7 @@ return [ ]; ``` -Como resultado do código acima, `http://example.com/v1/users` retornará a lista de usuários na versão 1, enquanto `http://example.com/v2/users` retornará a lista de usuários na versão 2. +Como resultado do código acima, `https://example.com/v1/users` retornará a lista de usuários na versão 1, enquanto `https://example.com/v2/users` retornará a lista de usuários na versão 2. Graças aos módulos, o código para diferentes versões principais pode ser bem isolado. Entretanto esta abordagem torna possível a reutilização de código entre os módulos através de classes bases comuns e outros recursos partilhados. diff --git a/docs/guide-pt-BR/runtime-requests.md b/docs/guide-pt-BR/runtime-requests.md index a40349c3d4b..91a46df6095 100644 --- a/docs/guide-pt-BR/runtime-requests.md +++ b/docs/guide-pt-BR/runtime-requests.md @@ -85,14 +85,14 @@ if ($request->isPut) { /* o método da requisição é PUT */ } ## URLs da Requisição O componente `request` fornece muitas formas de inspecionar a atual URL da requisição. -Assumindo que a URL da requisição seja `http://example.com/admin/index.php/product?id=100`, +Assumindo que a URL da requisição seja `https://example.com/admin/index.php/product?id=100`, você pode obter várias partes desta URL através das propriedades explicadas a seguir: * [[yii\web\Request::url|url]]: retorna `/admin/index.php/product?id=100`, que é a URL sem as informações de protocolo e de domínio. -* [[yii\web\Request::absoluteUrl|absoluteUrl]]: retorna `http://example.com/admin/index.php/product?id=100`, +* [[yii\web\Request::absoluteUrl|absoluteUrl]]: retorna `https://example.com/admin/index.php/product?id=100`, que é a URL completa, incluindo as informações de protocolo e de domínio. -* [[yii\web\Request::hostInfo|hostInfo]]: retorna `http://example.com`, que são +* [[yii\web\Request::hostInfo|hostInfo]]: retorna `https://example.com`, que são as informações de protocolo e de domínio da URL. * [[yii\web\Request::pathInfo|pathInfo]]: retorna `/product`, que é a informação depois do script de entrada e antes da interrogação (da query string). diff --git a/docs/guide-pt-BR/runtime-routing.md b/docs/guide-pt-BR/runtime-routing.md index 7357839bab5..b6353daecd7 100644 --- a/docs/guide-pt-BR/runtime-routing.md +++ b/docs/guide-pt-BR/runtime-routing.md @@ -173,7 +173,7 @@ echo Url::to(['post/view', 'id' => 100]); // cria uma URL ancorada: /index.php?r=post/view&id=100#content echo Url::to(['post/view', 'id' => 100, '#' => 'content']); -// cria uma URL absoluta: http://www.example.com/index.php?r=post/index +// cria uma URL absoluta: https://www.example.com/index.php?r=post/index echo Url::to(['post/index'], true); // cria uma URL absoluta usando https: https://www.example.com/index.php?r=post/index @@ -240,11 +240,11 @@ use yii\helpers\Url; // rota atual requerida: /index.php?r=admin/post/index echo Url::to(); -// uma alias da URL: http://example.com -Yii::setAlias('@example', 'http://example.com/'); +// uma alias da URL: https://example.com +Yii::setAlias('@example', 'https://example.com/'); echo Url::to('@example'); -// uma URL absoluta: http://example.com/images/logo.gif +// uma URL absoluta: https://example.com/images/logo.gif echo Url::to('/images/logo.gif', true); ``` @@ -501,19 +501,19 @@ mesmo resultado. É possível incluir domínios nos padrões das regras de URL. Isto é útil quando sua aplicação se comporta de forma diferente em diferentes domínios. Por exemplo, a regra a seguir obtém a rota `admin/user/login` pela análise da URL -`http://admin.example.com/login` e a rota `site/login` pela análise da URL -`http://www.example.com/login`. +`https://admin.example.com/login` e a rota `site/login` pela análise da URL +`https://www.example.com/login`. ```php [ - 'http://admin.example.com/login' => 'admin/user/login', - 'http://www.example.com/login' => 'site/login', + 'https://admin.example.com/login' => 'admin/user/login', + 'https://www.example.com/login' => 'site/login', ] ``` Você também pode incorporar parâmetros nos domínios para extrair informações dinamicamente a partir deles. Por exemplo, a regra a seguir obtém a rota -`post/index` e o parâmetro `language=en` pela análise da URL `http://en.example.com/posts` +`post/index` e o parâmetro `language=en` pela análise da URL `https://en.example.com/posts` ```php [ @@ -523,8 +523,8 @@ dinamicamente a partir deles. Por exemplo, a regra a seguir obtém a rota > Observação: Regras com domínios NÃO devem ser incluídos com subpastas do script de entrada em seus padrões. Por exemplo, se a aplicação estiver sob - `http://www.example.com/sandbox/blog`, você deve usar o padrão - `http://www.example.com/posts` ao invés de `http://www.example.com/sandbox/blog/posts`. + `https://www.example.com/sandbox/blog`, você deve usar o padrão + `https://www.example.com/posts` ao invés de `https://www.example.com/sandbox/blog/posts`. Isto permite que sua aplicação seja implantado sob qualquer diretório sem a necessidade de alterar o código da aplicação. diff --git a/docs/guide-pt-BR/security-authorization.md b/docs/guide-pt-BR/security-authorization.md index 9f312bafffd..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](http://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-databases.md b/docs/guide-pt-BR/start-databases.md index 8aa6ee658bf..a3be1c889ec 100644 --- a/docs/guide-pt-BR/start-databases.md +++ b/docs/guide-pt-BR/start-databases.md @@ -55,7 +55,7 @@ Configurando uma Conexão de BD ------------------------------ Antes de prosseguir, certifique-se de que você possui instalados tanto a -extensão [PDO](https://www.php.net/manual/en/book.pdo.php) do PHP quanto o driver +extensão [PDO](https://www.php.net/manual/pt_BR/book.pdo.php) do PHP quanto o driver PDO para o gerenciador de banco de dados que você está usando (por exemplo, `pdo_mysql` para o MySQL). Este é um requisito básico se a sua aplicação usa um banco de dados relacional. @@ -241,7 +241,7 @@ Conferindo Para ver se todo os códigos acima funcionam, use o seu navegador para acessar a seguinte URL: ``` -http://hostname/index.php?r=pais/index +https://hostname/index.php?r=pais/index ``` ![Lista de Países](images/start-country-list.png) @@ -253,7 +253,7 @@ página de registros. Observe mais cuidadosamente e você perceberá que a URL n browser mudou para ``` -http://hostname/index.php?r=pais/index&page=2 +https://hostname/index.php?r=pais/index&page=2 ``` Por trás das cortinas, [[yii\data\Pagination|Pagination]] está fornecendo toda diff --git a/docs/guide-pt-BR/start-forms.md b/docs/guide-pt-BR/start-forms.md index 3fa43f65e41..709eb858112 100644 --- a/docs/guide-pt-BR/start-forms.md +++ b/docs/guide-pt-BR/start-forms.md @@ -130,7 +130,7 @@ Se tudo estiver certo, a action renderizará a view chamada `confirmar-registro` e seu formulário HTML voltará a ser exibido mas, dessa vez, juntamente com as mensagens de erro de validação. > Nota: Neste exemplo muito simples, renderizamos a página de confirmação somente se os dados enviados eram válidos. Na prática, você deve considerar usar [[yii\web\Controller::refresh()|refresh()]] ou [[yii\web\Controller::redirect()|redirect()]] - para evitar [problemas de reenvio de formulário](http://en.wikipedia.org/wiki/Post/Redirect/Get). + para evitar [problemas de reenvio de formulário](https://en.wikipedia.org/wiki/Post/Redirect/Get). Criando Views @@ -186,7 +186,7 @@ Conferindo Para ver como funciona, utilize seu navegador para acessar a seguinte URL: ``` -http://hostname/index.php?r=site/registro +https://hostname/index.php?r=site/registro ``` Você verá uma página exibindo um formulário com dois campos. Na frente de cada campo, um *label* indica quais dados devem ser inseridos. Se você clicar diff --git a/docs/guide-pt-BR/start-gii.md b/docs/guide-pt-BR/start-gii.md index a31c24808bb..72c082c3e5f 100644 --- a/docs/guide-pt-BR/start-gii.md +++ b/docs/guide-pt-BR/start-gii.md @@ -38,7 +38,7 @@ defined('YII_ENV') or define('YII_ENV', 'dev'); Graças a essa linha, sua aplicação está em modo de desenvolvimento e terá o Gii habilitado, devido a configuração mais acima. Agora você pode acessar o Gii pela URL: ``` -http://hostname/index.php?r=gii +https://hostname/index.php?r=gii ``` > Note: Se você está acessando o Gii por um endereço IP que não seja o localhost, o acesso será negado por padrão, por questões de segurança. @@ -100,7 +100,7 @@ Conferindo Para ver como ficou, use seu navegador para acessar a seguinte URL: ``` -http://hostname/index.php?r=pais/index +https://hostname/index.php?r=pais/index ``` Você verá uma tabela mostrando os países do seu banco de dados. Você pode ordená-los ou filtrá-los inserindo condições nos cabeçalhos das colunas. diff --git a/docs/guide-pt-BR/start-hello.md b/docs/guide-pt-BR/start-hello.md index f23d75a59d8..c75956d2a69 100644 --- a/docs/guide-pt-BR/start-hello.md +++ b/docs/guide-pt-BR/start-hello.md @@ -108,7 +108,7 @@ Conferindo Após criar a action e a view, você pode acessar a nova página através da seguinte URL: ``` -http://hostname/index.php?r=site/cumprimentar&mensagem=Olá+Mundo! +https://hostname/index.php?r=site/cumprimentar&mensagem=Olá+Mundo! ``` ![Olá Mundo!](images/start-hello-world.png) diff --git a/docs/guide-pt-BR/start-installation.md b/docs/guide-pt-BR/start-installation.md index 3be27958b83..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. @@ -191,8 +191,8 @@ no Windows, Mac OS X ou Linux usando PHP 5.4 ou superior. O Yii 2.0 também é c com o [HHVM](https://hhvm.com/) do Facebook. No entanto, existem alguns casos extremos em que o HHVM se comporta diferentemente do PHP nativo, então você terá que ter um cuidado extra quando usar o HHVM. Em um servidor de produção, você pode querer configurar o seu servidor Web de -modo que a aplicação possa ser acessada pela URL `http://www.example.com/index.php` -ao invés de `http://www.example.com/basico/web/index.php`. Tal configuração requer que +modo que a aplicação possa ser acessada pela URL `https://www.example.com/index.php` +ao invés de `https://www.example.com/basico/web/index.php`. Tal configuração requer que você aponte a raiz dos documentos de seu servidor Web para o diretório `basico/web`. Você também pode querer ocultar o `index.php` da URL, conforme descrito na seção [Roteamento e Criação de URL](runtime-routing.md). Nessa sub-seção, você @@ -242,7 +242,7 @@ DocumentRoot "caminho/para/basico/web" ### Configuração do Nginx Recomendada -Para usar o [Nginx](https://wiki.nginx.org/), você deve ter instalado o PHP como um [FPM SAPI](https://www.php.net/install.fpm). Use a seguinte configuração do Nginx, +Para usar o [Nginx](https://wiki.nginx.org/), você deve ter instalado o PHP como um [FPM SAPI](https://www.php.net/manual/pt_BR/install.fpm.php). Use a seguinte configuração do Nginx, substituindo `caminho/para/basico/web` com o caminho real para `basico/web` e `mysite.test` com o nome de host real a servir. ```nginx diff --git a/docs/guide-pt-BR/start-workflow.md b/docs/guide-pt-BR/start-workflow.md index ae7025c6d4e..019be8b3ba9 100644 --- a/docs/guide-pt-BR/start-workflow.md +++ b/docs/guide-pt-BR/start-workflow.md @@ -2,13 +2,13 @@ Executando Aplicações ===================== Após instalar o Yii, você tem uma aplicação Yii funcional que pode ser acessada -pela URL `http://hostname/basico/web/index.php` ou `http://hostname/index.php`, +pela URL `https://hostname/basico/web/index.php` ou `https://hostname/index.php`, dependendo de sua configuração. Esta seção introduzirá a funcionalidade embutida da aplicação, como o código é organizado e como a aplicação trata as requisições em geral. > Info: Por questões de simplicidade, por todo este tutorial de "Primeiros Passos" assume-se que você definiu `basico/web` como a raiz de documentos do seu - servidor Web e configurou a URL de acesso de sua aplicação como `http://hostname/index.php` + servidor Web e configurou a URL de acesso de sua aplicação como `https://hostname/index.php` ou algo semelhante. Por favor, ajuste as URLs em nossas descrições conforme necessário. @@ -20,7 +20,7 @@ Funcionalidade O template básico de projetos instalado contém quatro páginas: -* A página inicial, exibida quando você acessa a URL `http://hostname/index.php`, +* A página inicial, exibida quando você acessa a URL `https://hostname/index.php`, * a página "About" (Sobre), * a página "Contact" (Contato), que exibe um formulário de contato que permite que usuários finais entrem em contato com você via e-mail, @@ -42,7 +42,7 @@ Estrutura da Aplicação Os diretórios e arquivos mais importantes em sua aplicação, assumindo que o diretório raiz dela é o `basico`, são: -```js +``` basico/ caminho base de sua aplicação composer.json usado pelo Composer, descreve informações de pacotes config/ contém as configurações da aplicação e outras diff --git a/docs/guide-pt-BR/structure-controllers.md b/docs/guide-pt-BR/structure-controllers.md index a77fb4dd803..3c5a9450d59 100644 --- a/docs/guide-pt-BR/structure-controllers.md +++ b/docs/guide-pt-BR/structure-controllers.md @@ -1,7 +1,7 @@ Controllers (Controladores) =========== -Os controllers (controladores) fazem parte da arquitetura [MVC](http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller). +Os controllers (controladores) fazem parte da arquitetura [MVC](https://pt.wikipedia.org/wiki/MVC). São objetos de classes que estendem de [[yii\base\Controller]] e são responsáveis pelo processamento das requisições e por gerar respostas. Em particular, após assumir o controle de [applications](structure-applications.md), controllers @@ -88,7 +88,7 @@ ou o seguinte formato se o controller estiver em um módulo: IDdoModule/IDdoController/IDdoAction ``` -Portanto, se um usuário fizer uma requisição com a URL `http://hostname/index.php?r=site/index`, +Portanto, se um usuário fizer uma requisição com a URL `https://hostname/index.php?r=site/index`, a ação `index` do controller `site` será executada. Para mais detalhes sobre como as ações são resolvidas pelas rotas, por favor consulte a seção [Roteamento e Criação de URL](runtime-routing.md). @@ -194,7 +194,7 @@ Quando uma requisição não especificar uma [rota](#id-da-rota), será utilizad rota especificada pela propriedade. Para as [[yii\web\Application|aplicações Web]], este valor é `'site'`, enquanto para as [[yii\console\Application|aplicações console]] é `help`. Portanto, se uma -URL for `http://hostname/index.php`, o controller `site` será utilizado nesta requisição. +URL for `https://hostname/index.php`, o controller `site` será utilizado nesta requisição. Você pode alterar o controller padrão como a seguinte [configuração da aplicação](structure-applications.md#application-configurations): @@ -349,8 +349,8 @@ retorna um objeto de resposta): ```php public function actionForward() { - // redireciona o navegador do usuário para http://example.com - return $this->redirect('http://example.com'); + // redireciona o navegador do usuário para https://example.com + return $this->redirect('https://example.com'); } ``` @@ -384,14 +384,14 @@ class PostController extends Controller A seguir, os parâmetros da ação serão populados em diferentes requisições: -* `http://hostname/index.php?r=post/view&id=123`: o parâmetro `$id` receberá +* `https://hostname/index.php?r=post/view&id=123`: o parâmetro `$id` receberá o valor `'123'`, enquanto o `$version` continuará com o valor nulo porque não existe o parâmetro `version` na URL. -* `http://hostname/index.php?r=post/view&id=123&version=2`: os parâmetros `$id` +* `https://hostname/index.php?r=post/view&id=123&version=2`: os parâmetros `$id` e `$version` serão receberão os valores `'123'` e `'2'`, respectivamente. -* `http://hostname/index.php?r=post/view`: uma exceção [[yii\web\BadRequestHttpException]] +* `https://hostname/index.php?r=post/view`: uma exceção [[yii\web\BadRequestHttpException]] será lançada porque o parâmetro obrigatório `$id` não foi informado na requisição. -* `http://hostname/index.php?r=post/view&id[]=123`: uma exceção [[yii\web\BadRequestHttpException]] +* `https://hostname/index.php?r=post/view&id[]=123`: uma exceção [[yii\web\BadRequestHttpException]] será lançada porque o parâmetro `$id` foi informado com um valor array `['123']` na qual não era esperado. @@ -405,9 +405,9 @@ public function actionView(array $id, $version = null) } ``` -Agora, se a requisição for `http://hostname/index.php?r=post/view&id[]=123`, o +Agora, se a requisição for `https://hostname/index.php?r=post/view&id[]=123`, o parâmetro `$id` receberá o valor `['123']`. Se a requisição for -`http://hostname/index.php?r=post/view&id=123`, o parâmetro `$id` ainda receberá +`https://hostname/index.php?r=post/view&id=123`, o parâmetro `$id` ainda receberá um array como valor pois o valor escalar `'123'` será convertido automaticamente em um array. diff --git a/docs/guide-pt-BR/structure-filters.md b/docs/guide-pt-BR/structure-filters.md index 6ae35f1dad1..a89ce956fd4 100644 --- a/docs/guide-pt-BR/structure-filters.md +++ b/docs/guide-pt-BR/structure-filters.md @@ -323,7 +323,7 @@ detalhes sobre o uso do PageCache. ### [[yii\filters\RateLimiter|RateLimiter]] O filtro RateLimiter implementa um limitador de acesso baseado no -[algoritmo do balde furado (leaky bucket)](https://en.wikipedia.org/wiki/Leaky_bucket). +[algoritmo do balde furado (leaky bucket)](https://pt.wikipedia.org/wiki/Leaky_Bucket). É usado principalmente na implementação de APIs RESTful. Por favor, consulte a seção [Limitador de Acesso](rest-rate-limiting.md) para mais detalhes sobre o uso deste filtro. @@ -359,7 +359,7 @@ public function behaviors() ### [[yii\filters\Cors|Cors]] O compartilhamento de recursos cross-origin -[CORS](https://developer.mozilla.org/fr/docs/HTTP/Access_control_CORS) é um +[CORS](https://developer.mozilla.org/pt-BR/docs/Web/HTTP/CORS) é um mecanismo que permite vários recursos (por exemplo, fontes, JavaScript, etc) na página Web sejam solicitados por outros domínios. Em particular, as chamadas AJAX do JavaScript podem usar o mecanismo XMLHttpRequest. Estas chamadas @@ -389,7 +389,7 @@ public function behaviors() A filtragem da classe Cors pode ser ajustado pela propriedade `cors`. * `cors['Origin']`: array usado para definir as origens permitidas. Pode ser - `['*']` (qualquer um) ou `['http://www.myserver.net', 'http://www.myotherserver.com']`. + `['*']` (qualquer um) ou `['https://www.myserver.net', 'https://www.myotherserver.com']`. O padrão é `['*']`. * `cors['Access-Control-Request-Method']`: array com os métodos de requisição permitidos, tais como `['GET', 'OPTIONS', 'HEAD']`. O padrão é @@ -403,7 +403,7 @@ A filtragem da classe Cors pode ser ajustado pela propriedade `cors`. * `cors['Access-Control-Max-Age']`: define o tempo de vida do pré-processamento (pre-flight) da requisição. O padrão é `86400`. -Por exemplo, permitindo CORS para a origem: `http://www.myserver.net` com os +Por exemplo, permitindo CORS para a origem: `https://www.myserver.net` com os métodos `GET`, `HEAD` e `OPTIONS`: ```php @@ -416,7 +416,7 @@ public function behaviors() [ 'class' => Cors::class, 'cors' => [ - 'Origin' => ['http://www.myserver.net'], + 'Origin' => ['https://www.myserver.net'], 'Access-Control-Request-Method' => ['GET', 'HEAD', 'OPTIONS'], ], ], @@ -438,7 +438,7 @@ public function behaviors() [ 'class' => Cors::class, 'cors' => [ - 'Origin' => ['http://www.myserver.net'], + 'Origin' => ['https://www.myserver.net'], 'Access-Control-Request-Method' => ['GET', 'HEAD', 'OPTIONS'], ], 'actions' => [ diff --git a/docs/guide-pt-BR/structure-models.md b/docs/guide-pt-BR/structure-models.md index 6516a6c3681..3096767fbef 100644 --- a/docs/guide-pt-BR/structure-models.md +++ b/docs/guide-pt-BR/structure-models.md @@ -1,7 +1,7 @@ Models (Modelos) ================ -Os models (modelos) fazem parte da arquitetura [MVC](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller). +Os models (modelos) fazem parte da arquitetura [MVC](https://pt.wikipedia.org/wiki/MVC). Eles representam os dados, as regras e a lógica de negócio. Você pode criar uma classe model estendendo de [[yii\base\Model]] ou de seus filhos. diff --git a/docs/guide-pt-BR/structure-modules.md b/docs/guide-pt-BR/structure-modules.md index 73de5703082..9186321108b 100644 --- a/docs/guide-pt-BR/structure-modules.md +++ b/docs/guide-pt-BR/structure-modules.md @@ -20,7 +20,7 @@ controllers (controladores), models (modelos), views (visões) e outros códigos assim como em uma aplicação. O exemplo a seguir mostra o conteúdo dentro de um módulo: -```js +``` forum/ Module.php o arquivo da classe do módulo controllers/ contém os arquivos da classe controller diff --git a/docs/guide-pt-BR/structure-views.md b/docs/guide-pt-BR/structure-views.md index b84f65dd1cd..cd26141465e 100644 --- a/docs/guide-pt-BR/structure-views.md +++ b/docs/guide-pt-BR/structure-views.md @@ -1,7 +1,7 @@ Visões (Views) =========== -As views fazem parte da arquitetura [MVC](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller). +As views fazem parte da arquitetura [MVC](https://pt.wikipedia.org/wiki/MVC). São a parte do código responsável por apresentar dados aos usuários finais. Em um aplicação Web, views geralmente são criadas em termos de *view templates* (modelos de view) que são arquivos PHP contendo principalmente códigos HTML e @@ -61,7 +61,7 @@ desencadeiam a [renderização da view ](#rendering-views). Ao criar views que geram páginas HTML, é importante que você codifique e/ou filtre os dados que vêm de usuários antes de exibí-los. Caso contrário, sua aplicação poderá estar sujeita a um ataque de -[cross-site scripting](https://en.wikipedia.org/wiki/Cross-site_scripting). +[cross-site scripting](https://pt.wikipedia.org/wiki/Cross-site_scripting). Para exibir um texto simples, codifique-o antes por chamar o método [[yii\helpers\Html::encode()]]. Por exemplo, o código a seguir codifica o nome do @@ -607,7 +607,7 @@ Componentes de view fornecem úteis recursos relacionados. Cada um deles está d * [manipulação de client scripts](output-client-scripts.md): permite que você registre e renderize CSS e JavaScript. * [manipulando asset bundle](structure-assets.md): permite que você registre e renderize [recursos estáticos (asset bundles)](structure-assets.md). * [template engines alternativos](tutorial-template-engines.md): permite que você use outros template engines, tais como o [Twig](https://twig.symfony.com/) - e [Smarty](http://www.smarty.net/). + e [Smarty](https://www.smarty.net/). Você também pode usar os seguintes recursos que, embora simples, são úteis quando estiver desenvolvendo suas páginas. 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-pt-BR/tutorial-shared-hosting.md b/docs/guide-pt-BR/tutorial-shared-hosting.md index 5074bb66d12..18af127343c 100644 --- a/docs/guide-pt-BR/tutorial-shared-hosting.md +++ b/docs/guide-pt-BR/tutorial-shared-hosting.md @@ -48,7 +48,7 @@ Se o seu servidor web é Nginx, você não precisa de nenhuma configuração ext ### Verifique os requisitos -Para executar Yii, o seu servidor web deve atender alguns requisitos. O requisito mínimo é PHP 5.4. Para verificar os requisitos copie o arquivo `requirements.php` da raíz da aplicação para o diretório raíz do servidor web e execute-o através do navegador usando o endereço `http://example.com/requirements.php`. Não se esqueça de apagar o arquivo depois. +Para executar Yii, o seu servidor web deve atender alguns requisitos. O requisito mínimo é PHP 5.4. Para verificar os requisitos copie o arquivo `requirements.php` da raíz da aplicação para o diretório raíz do servidor web e execute-o através do navegador usando o endereço `https://example.com/requirements.php`. Não se esqueça de apagar o arquivo depois. Implantação do Template Avançado --------------------------------- 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-aliases.md b/docs/guide-ru/concept-aliases.md index 6f38c73413d..d69c0b0331f 100644 --- a/docs/guide-ru/concept-aliases.md +++ b/docs/guide-ru/concept-aliases.md @@ -17,7 +17,7 @@ Yii framework, а `@web` можно использовать для получе Yii::setAlias('@foo', '/path/to/foo'); // псевдоним URL -Yii::setAlias('@bar', 'http://www.example.com'); +Yii::setAlias('@bar', 'https://www.example.com'); // псевдоним конкретного файла, содержащего класс \foo\Bar Yii::setAlias('@foo/Bar.php', '/definitely/not/foo/Bar.php'); @@ -46,7 +46,7 @@ return [ // ... 'aliases' => [ '@foo' => '/path/to/foo', - '@bar' => 'http://www.example.com', + '@bar' => 'https://www.example.com', ], ]; ``` @@ -60,7 +60,7 @@ return [ ```php echo Yii::getAlias('@foo'); // выведет: /path/to/foo -echo Yii::getAlias('@bar'); // выведет: http://www.example.com +echo Yii::getAlias('@bar'); // выведет: https://www.example.com echo Yii::getAlias('@foo/bar/file.php'); // выведет: /path/to/foo/bar/file.php ``` diff --git a/docs/guide-ru/concept-behaviors.md b/docs/guide-ru/concept-behaviors.md index 555b13a6920..966a871a7ca 100644 --- a/docs/guide-ru/concept-behaviors.md +++ b/docs/guide-ru/concept-behaviors.md @@ -2,7 +2,7 @@ ========= Поведения (behaviors) — это экземпляры класса [[yii\base\Behavior]] или класса, унаследованного от него. Поведения, -также известные как [примеси](http://ru.wikipedia.org/wiki/Примесь_(программирование)), позволяют расширять +также известные как [примеси](https://ru.wikipedia.org/wiki/%D0%9F%D1%80%D0%B8%D0%BC%D0%B5%D1%81%D1%8C_(%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%BC%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5)), позволяют расширять функциональность существующих [[yii\base\Component|компонентов]] без необходимости изменения дерева наследования. После прикрепления поведения к компоненту, его методы и свойства "внедряются" в компонент, и становятся доступными так же, как если бы они были объявлены в самом классе компонента. Кроме того, поведение может реагировать на 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-dao.md b/docs/guide-ru/db-dao.md index ae7275bad61..d38523812b3 100644 --- a/docs/guide-ru/db-dao.md +++ b/docs/guide-ru/db-dao.md @@ -435,7 +435,7 @@ try { ## Репликация и разделение запросов на чтение и запись -Многие СУБД поддерживают [репликацию баз данных](https://en.wikipedia.org/wiki/Replication_(computing)#Database_replication) +Многие СУБД поддерживают [репликацию баз данных](https://ru.wikipedia.org/wiki/%D0%A0%D0%B5%D0%BF%D0%BB%D0%B8%D0%BA%D0%B0%D1%86%D0%B8%D1%8F_(%D0%B2%D1%8B%D1%87%D0%B8%D1%81%D0%BB%D0%B8%D1%82%D0%B5%D0%BB%D1%8C%D0%BD%D0%B0%D1%8F_%D1%82%D0%B5%D1%85%D0%BD%D0%B8%D0%BA%D0%B0)) для лучшей доступности базы данных и уменьшения времени ответа сервера. С репликацией базы данных, данные копируются из *master servers* на *slave servers*. Все вставки и обновления должны происходить на основном сервере, хотя чтение может производится и с подчинённых серверов. diff --git a/docs/guide-ru/db-query-builder.md b/docs/guide-ru/db-query-builder.md index 89d049cf9ec..50bf94771ef 100644 --- a/docs/guide-ru/db-query-builder.md +++ b/docs/guide-ru/db-query-builder.md @@ -277,7 +277,7 @@ $query->where([$column => $value]); или пустой массив, чтоб указать что значения уже экранированы. Обратите внимание, что при использовании массива соответствия экранирования (или если третий операнд не передан), значения будут автоматически заключены в символы процентов. - > Note: При использовании PostgreSQL вы можете использовать также [`ilike`](http://www.postgresql.org/docs/8.3/static/functions-matching.html#FUNCTIONS-LIKE) + > Note: При использовании PostgreSQL вы можете использовать также [`ilike`](https://www.postgresql.org/docs/8.3/functions-matching.html#FUNCTIONS-LIKE) > вместо `like` для регистронезависимого поиска. - `or like`: похож на оператор `like`, только утверждения `LIKE` будут объединяться с помощью оператора `OR`, если @@ -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/helper-html.md b/docs/guide-ru/helper-html.md index 23291a292d3..7c389afd574 100644 --- a/docs/guide-ru/helper-html.md +++ b/docs/guide-ru/helper-html.md @@ -369,7 +369,7 @@ echo Html::getAttributeName('dates[0]'); В результате получится: ``` @@ -420,7 +420,7 @@ echo Html::getAttributeName('dates[0]'); в результате получится: -Наш логотип +Наш логотип ``` Помимо [псевдонимов](concept-aliases.md) первый аргумент может принимать маршруты, параметры и URL-адреса таким же образом diff --git a/docs/guide-ru/helper-url.md b/docs/guide-ru/helper-url.md index ac317fc0acf..a8e38d815db 100644 --- a/docs/guide-ru/helper-url.md +++ b/docs/guide-ru/helper-url.md @@ -78,7 +78,7 @@ echo Url::toRoute(['site/index', 'src' => 'ref1', '#' => 'name']); // /index.php?r=post/edit&id=100 псевдоним "@postEdit" задан как "post/edit" echo Url::toRoute(['@postEdit', 'id' => 100]); -// http://www.example.com/index.php?r=site/index +// https://www.example.com/index.php?r=site/index echo Url::toRoute('site/index', true); // https://www.example.com/index.php?r=site/index @@ -120,7 +120,7 @@ echo Url::to('@web/images/logo.gif'); // images/logo.gif echo Url::to('images/logo.gif'); -// http://www.example.com/images/logo.gif +// https://www.example.com/images/logo.gif echo Url::to('@web/images/logo.gif', true); // https://www.example.com/images/logo.gif diff --git a/docs/guide-ru/input-forms.md b/docs/guide-ru/input-forms.md index c2863607a7d..76718407d45 100644 --- a/docs/guide-ru/input-forms.md +++ b/docs/guide-ru/input-forms.md @@ -166,7 +166,7 @@ Pjax::end(); Это означет, что поддержка файлов и значений submit-кнопок через AJAX или виджет [[yii\widgets\Pjax|Pjax]] зависит от -[поддержки в браузере](https://developer.mozilla.org/en-US/docs/Web/API/FormData#Browser_compatibility) +[поддержки в браузере](https://developer.mozilla.org/ru/docs/Web/API/FormData#%D1%81%D0%BE%D0%B2%D0%BC%D0%B5%D1%81%D1%82%D0%B8%D0%BC%D0%BE%D1%81%D1%82%D1%8C) класса `FormData`. diff --git a/docs/guide-ru/intro-yii.md b/docs/guide-ru/intro-yii.md index ebfab478935..353ecaeac05 100644 --- a/docs/guide-ru/intro-yii.md +++ b/docs/guide-ru/intro-yii.md @@ -42,7 +42,7 @@ Yii — не проект одного человека. Он поддержив Требования к ПО и знаниям ------------------------- -Yii 2.0 требует PHP 5.4.0 и выше и наилучшим образом работает на последней версии PHP 7. Чтобы узнать требования для отдельных возможностей, вы можете запустить скрипт проверки +Yii 2.0 требует PHP 5.4.0 и выше и наилучшим образом работает на последней версии PHP. Чтобы узнать требования для отдельных возможностей, вы можете запустить скрипт проверки требований, который поставляется с каждым релизом фреймворка. Для разработки на Yii потребуется общее понимание ООП, так как фреймворк полностью следует этой парадигме. Также стоит 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/output-formatting.md b/docs/guide-ru/output-formatting.md index ddbcf8d7cf1..2a0933d7684 100644 --- a/docs/guide-ru/output-formatting.md +++ b/docs/guide-ru/output-formatting.md @@ -114,7 +114,7 @@ echo Yii::$app->formatter->asDate('2014-01-01'); // выведет: 1 январ Дополнительно вы можете задать специальный формат, используя синтаксис, заданный [ICU Project](https://icu.unicode.org/), который описан в руководстве ICU по следующему адресу: -. Также вы можете использовать синтаксис, который распознаётся +. Также вы можете использовать синтаксис, который распознаётся PHP-функцией [date()](https://www.php.net/manual/ru/function.date.php), используя строку с префиксом `php:`. ```php diff --git a/docs/guide-ru/rest-quick-start.md b/docs/guide-ru/rest-quick-start.md index 326a952cff0..04c31712935 100644 --- a/docs/guide-ru/rest-quick-start.md +++ b/docs/guide-ru/rest-quick-start.md @@ -9,7 +9,7 @@ Yii включает полноценный набор средств для у * Получение сериализованных объектов с нужной вам выборкой полей; * Надлежащее форматирование данных и ошибок при их валидации; * Коллекция пагинаций, фильтров и сортировок; -* Поддержка [HATEOAS](http://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/rest-response-formatting.md b/docs/guide-ru/rest-response-formatting.md index c8fdbd761b6..91e214de0bd 100644 --- a/docs/guide-ru/rest-response-formatting.md +++ b/docs/guide-ru/rest-response-formatting.md @@ -4,7 +4,7 @@ При обработке RESTful API запросов приложение обычно выполняет следующие шаги, связанные с форматированием ответа: 1. Определяет различные факторы, которые могут повлиять на формат ответа, такие как media type, язык, версия и т.д. - Этот процесс также известен как [согласование содержимого](http://en.wikipedia.org/wiki/Content_negotiation). + Этот процесс также известен как [согласование содержимого](https://en.wikipedia.org/wiki/Content_negotiation). 2. Конвертирует объекты ресурсов в массивы, как описано в секции [Ресурсы](rest-resources.md). Этим занимается [[yii\rest\Serializer]]. 3. Конвертирует массивы в строки исходя из формата, определенного на этапе согласование содержимого. Это задача для diff --git a/docs/guide-ru/rest-versioning.md b/docs/guide-ru/rest-versioning.md index 5a45dc266e8..b4b4e220a17 100644 --- a/docs/guide-ru/rest-versioning.md +++ b/docs/guide-ru/rest-versioning.md @@ -11,7 +11,7 @@ API используются клиентами, код которых вы не > Tip: Чтобы узнать больше о выборе версий обратитесь к [Semantic Versioning](https://semver.org/). Общей практикой при реализации версионирования API является включение номера версии в URL-адрес вызова API-метода. -Например, `http://example.com/v1/users` означает вызов API `/users` версии 1. Другой способ версионирования API, +Например, `https://example.com/v1/users` означает вызов API `/users` версии 1. Другой способ версионирования API, получивший недавно широкое распространение, состоит в добавлении номера версии в HTTP-заголовки запроса, обычно в заголовок `Accept`: @@ -91,8 +91,8 @@ return [ ]; ``` -В результате `http://example.com/v1/users` возвратит список пользователей API версии 1, в то время как -`http://example.com/v2/users` вернет список пользователей версии 2. +В результате `https://example.com/v1/users` возвратит список пользователей API версии 1, в то время как +`https://example.com/v2/users` вернет список пользователей версии 2. Благодаря использованию модулей код API различных мажорных версий может быть хорошо изолирован. И по-прежнему возможно повторное использование кода между модулями через общие базовые классы и другие разделяемые классы. 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/runtime-requests.md b/docs/guide-ru/runtime-requests.md index 3ba36bfe15b..99a952109fd 100644 --- a/docs/guide-ru/runtime-requests.md +++ b/docs/guide-ru/runtime-requests.md @@ -69,12 +69,12 @@ if ($request->isPut) { /* текущий запрос является PUT за Компонент `request` предоставляет множество способов изучения текущего запрашиваемого URL. -Если предположить, что URL запроса будет `http://example.com/admin/index.php/product?id=100`, то вы можете получить различные части этого адреса так как это показано ниже: +Если предположить, что URL запроса будет `https://example.com/admin/index.php/product?id=100`, то вы можете получить различные части этого адреса так как это показано ниже: * [[yii\web\Request::url|url]]: вернёт адрес `/admin/index.php/product?id=100`, который содержит URL без информации об имени хоста. -* [[yii\web\Request::absoluteUrl|absoluteUrl]]: вернёт адрес `http://example.com/admin/index.php/product?id=100`, +* [[yii\web\Request::absoluteUrl|absoluteUrl]]: вернёт адрес `https://example.com/admin/index.php/product?id=100`, который содержит полный URL, включая имя хоста. -* [[yii\web\Request::hostInfo|hostInfo]]: вернёт адрес `http://example.com`, который содержит только имя хоста. +* [[yii\web\Request::hostInfo|hostInfo]]: вернёт адрес `https://example.com`, который содержит только имя хоста. * [[yii\web\Request::pathInfo|pathInfo]]: вернёт адрес `/product`, который содержит часть между адресом начального скрипта и параметрами запроса, идущих после знака вопроса. * [[yii\web\Request::queryString|queryString]]: вернёт адрес `id=100`, который содержит часть URL после знака вопроса. * [[yii\web\Request::baseUrl|baseUrl]]: вернёт адрес `/admin`, который является частью URL после информации о хосте и перед именем входного скрипта. diff --git a/docs/guide-ru/runtime-responses.md b/docs/guide-ru/runtime-responses.md index bbf2ffd2660..aa81813b6ba 100644 --- a/docs/guide-ru/runtime-responses.md +++ b/docs/guide-ru/runtime-responses.md @@ -166,7 +166,7 @@ Yii имеет средства для её использования. ```php public function actionOld() { - return $this->redirect('http://example.com/new', 301); + return $this->redirect('https://example.com/new', 301); } ``` @@ -178,7 +178,7 @@ public function actionOld() содержимое. ```php -\Yii::$app->response->redirect('http://example.com/new', 301)->send(); +\Yii::$app->response->redirect('https://example.com/new', 301)->send(); ``` > Info: По умолчанию метод [[yii\web\Response::redirect()]] устанавливает код состояния ответа равным 302, сообщая diff --git a/docs/guide-ru/runtime-routing.md b/docs/guide-ru/runtime-routing.md index 578e868117c..534e344cecb 100644 --- a/docs/guide-ru/runtime-routing.md +++ b/docs/guide-ru/runtime-routing.md @@ -119,7 +119,7 @@ echo Url::to(['post/view', 'id' => 100]); // создает якорный URL: /index.php?r=post/view&id=100#content echo Url::to(['post/view', 'id' => 100, '#' => 'content']); -// создает абсолютный URL: http://www.example.com/index.php?r=post/index +// создает абсолютный URL: https://www.example.com/index.php?r=post/index echo Url::to(['post/index'], true); // создает абсолютный URL с использованием схемы https: https://www.example.com/index.php?r=post/index @@ -168,11 +168,11 @@ use yii\helpers\Url; // запрошенный URL: /index.php?r=admin/post/index echo Url::to(); -// URL из псевдонима: http://example.com -Yii::setAlias('@example', 'http://example.com/'); +// URL из псевдонима: https://example.com +Yii::setAlias('@example', 'https://example.com/'); echo Url::to('@example'); -// абсолютный URL: http://example.com/images/logo.gif +// абсолютный URL: https://example.com/images/logo.gif echo Url::to('/images/logo.gif', true); ``` @@ -338,16 +338,16 @@ echo Url::previous(); ### Правила с именами серверов -Существует возможность включать имена серверов в шаблон правил URL. Главным образом, это удобно, когда требуется разное поведение приложения, в зависимости от разных имен веб-серверов. Например, следующее правило позволит разобрать URL `http://admin.example.com/login` в маршрут `admin/user/login` и `http://www.example.com/login` в `site/login`. +Существует возможность включать имена серверов в шаблон правил URL. Главным образом, это удобно, когда требуется разное поведение приложения, в зависимости от разных имен веб-серверов. Например, следующее правило позволит разобрать URL `https://admin.example.com/login` в маршрут `admin/user/login` и `https://www.example.com/login` в `site/login`. ```php [ - 'http://admin.example.com/login' => 'admin/user/login', - 'http://www.example.com/login' => 'site/login', + 'https://admin.example.com/login' => 'admin/user/login', + 'https://www.example.com/login' => 'site/login', ] ``` -Также возможно комбинирование параметров и имени сервера для динамического извлечения данных из него. Например, следующее правило позволит разобрать URL `http://en.example.com/posts` на маршрут и параметр `language=en`. +Также возможно комбинирование параметров и имени сервера для динамического извлечения данных из него. Например, следующее правило позволит разобрать URL `https://en.example.com/posts` на маршрут и параметр `language=en`. ```php [ @@ -355,7 +355,7 @@ echo Url::previous(); ] ``` -> Note: Правила, содержащие имя сервера, НЕ должны содержать в шаблоне подкаталог пути ко входному скрипту. Например, если приложение расположено в `http://www.example.com/sandbox/blog`, шаблон должен быть `http://www.example.com/posts`, вместо `http://www.example.com/sandbox/blog/posts`. Это позволит изменять расположение приложения без необходимости внесения изменений в его код. +> Note: Правила, содержащие имя сервера, НЕ должны содержать в шаблоне подкаталог пути ко входному скрипту. Например, если приложение расположено в `https://www.example.com/sandbox/blog`, шаблон должен быть `https://www.example.com/posts`, вместо `https://www.example.com/sandbox/blog/posts`. Это позволит изменять расположение приложения без необходимости внесения изменений в его код. ### Суффиксы в URL @@ -411,7 +411,7 @@ echo Url::previous(); Начиная с версии 2.0.10 [[yii\web\UrlManager|UrlManager]] может быть настроен на использование [[yii\web\UrlNormalizer|UrlNormalizer]], что позволяет справиться с вариациями одного и того же URL с присутствующим или отсутствующим слешем в конце. -Технически `http://example.com/path` и `http://example.com/path/` являются разными URL, отдача одинакового содержимого +Технически `https://example.com/path` и `https://example.com/path/` являются разными URL, отдача одинакового содержимого в обоих вариантах может негативно повлиять на SEO. По умолчанию нормализатор заменяет повторяющиеся слеши на один и либо убирает, либо добавляет завершающие слеши в зависимости от суффикса и производит [редирект 301](https://ru.wikipedia.org/wiki/HTTP_301) на нормализованный URL. Нормализатор может быть настроен как глобально для менеджера URL, так и индивидуально для diff --git a/docs/guide-ru/security-best-practices.md b/docs/guide-ru/security-best-practices.md index e5e881b379a..a210e0b1a8d 100644 --- a/docs/guide-ru/security-best-practices.md +++ b/docs/guide-ru/security-best-practices.md @@ -142,10 +142,10 @@ CSRF - это аббревиатура для межсайтинговой по Например, сайт `an.example.com` имеет URL `/logout`, который, используя простой GET, разлогинивает пользователя. Пока это запрос выполняется самим пользователем - всё в порядке, но в один прекрасный день злоумышленники размещают код -`` на форуме с большой посещаемостью. Браузер не делает никаких отличий +`` на форуме с большой посещаемостью. Браузер не делает никаких отличий между запросом изображения и запросом страницы, так что когда пользователь откроет страницу с таким тегом `img`, браузер отправит GET запрос на указанный адрес, и пользователь будет разлогинен. -Вот основная идея. Можно сказать, что в разлогировании пользователя нет ничего серьёзного, но с помощью этой уязвимости, можно выполнять опасные операции. Представьте, что существует страница http://an.example.com/purse/transfer?to=anotherUser&amount=2000, обращение к которой с помощью GET запроса, приводит к перечислению 2000 единиц валюты со счета авторизированного пользователя на счет пользователя с логином anotherUser. Учитывая, что браузер для загрузки контента отправляет GET запросы, можно подумать, что разрешение на выполнение такой операции только POST запросом на 100% обезопасит от проблем. К сожалению, это не совсем правда. Учитывайте, что вместо тега , злоумышленник может внедрить JavaScript код, который будет отправлять нужные POST запросы на этот URL. +Вот основная идея. Можно сказать, что в разлогировании пользователя нет ничего серьёзного, но с помощью этой уязвимости, можно выполнять опасные операции. Представьте, что существует страница https://an.example.com/purse/transfer?to=anotherUser&amount=2000, обращение к которой с помощью GET запроса, приводит к перечислению 2000 единиц валюты со счета авторизированного пользователя на счет пользователя с логином anotherUser. Учитывая, что браузер для загрузки контента отправляет GET запросы, можно подумать, что разрешение на выполнение такой операции только POST запросом на 100% обезопасит от проблем. К сожалению, это не совсем правда. Учитывайте, что вместо тега , злоумышленник может внедрить JavaScript код, который будет отправлять нужные POST запросы на этот URL. Для того, чтоб избежать CSRF вы должны всегда: @@ -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: @@ -209,7 +209,7 @@ Yii предоставляет функции, которые зависят о Дополнительные сведения о конфигурации сервера смотрите в документации Вашего веб-сервера: -- Apache 2: +- Apache 2: - Nginx: Если у Вас нет доступа к конфигурации сервера, Вы можете настроить фильтр [[yii\filters\HostControl]] уровня приложения для защиты от такого рода атак: 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/start-databases.md b/docs/guide-ru/start-databases.md index 9889d89c3cf..26367d5cd25 100644 --- a/docs/guide-ru/start-databases.md +++ b/docs/guide-ru/start-databases.md @@ -201,7 +201,7 @@ View имеет 2 части относительно отображения д Чтобы увидеть, как работает весь вышеприведённый код, перейдите по следующей ссылке в своём браузере: ``` -http://hostname/index.php?r=country%2Findex +https://hostname/index.php?r=country%2Findex ``` ![Список Стран](images/start-country-list.png) @@ -210,7 +210,7 @@ http://hostname/index.php?r=country%2Findex Посмотрев внимательней, вы увидите, что URL в браузере тоже сменилось на ``` -http://hostname/index.php?r=country%2Findex&page=2 +https://hostname/index.php?r=country%2Findex&page=2 ``` За кадром [[yii\data\Pagination|Pagination]] предоставляет всю необходимую функциональность для постраничной разбивки набора данных: diff --git a/docs/guide-ru/start-forms.md b/docs/guide-ru/start-forms.md index 73a766038b7..93a1ddc7416 100644 --- a/docs/guide-ru/start-forms.md +++ b/docs/guide-ru/start-forms.md @@ -160,7 +160,7 @@ use yii\widgets\ActiveForm; Чтобы увидеть всё созданное в работе, откройте в браузере следующий URL: ``` -http://hostname/index.php?r=site%2Fentry +https://hostname/index.php?r=site%2Fentry ``` Вы увидите страницу с формой и двумя полями для ввода. Перед каждым полем имеется подпись, которая указывает, какую diff --git a/docs/guide-ru/start-gii.md b/docs/guide-ru/start-gii.md index bf0e4762e65..55365cf25f6 100644 --- a/docs/guide-ru/start-gii.md +++ b/docs/guide-ru/start-gii.md @@ -42,7 +42,7 @@ defined('YII_ENV') or define('YII_ENV', 'dev'); Благодаря этой строке ваше приложение находится в режиме разработки, и Gii уже активирован в соответствии с описанной выше конфигурацией. Теперь вы можете получить доступ к Gii по следующему адресу: ``` -http://hostname/index.php?r=gii +https://hostname/index.php?r=gii ``` > Note: Если вы пытаетесь получить доступ к Gii не с локального хоста, по умолчанию, в целях обеспечения безопасности, > доступ будет запрещён. Вы можете изменить настройки Gii, чтобы добавить разрешённые IP адреса, как указано ниже @@ -101,7 +101,7 @@ CRUD расшифровывается как Create, Read, Update и Delete, п Чтобы увидеть как всё это работает, перейдите по следующему URL, используя ваш браузер: ``` -http://hostname/index.php?r=country%2Findex +https://hostname/index.php?r=country%2Findex ``` Вы увидите таблицу, показывающую страны из таблицы БД. Вы можете сортировать, а также фильтровать данные, указывая условия фильтрации в заголовках столбцов. diff --git a/docs/guide-ru/start-hello.md b/docs/guide-ru/start-hello.md index 88050ddbaf6..32e42cc0a2b 100644 --- a/docs/guide-ru/start-hello.md +++ b/docs/guide-ru/start-hello.md @@ -94,7 +94,7 @@ use yii\helpers\Html; После создания действия и представления вы можете перейти на новую страницу по следующему URL: ``` -http://hostname/index.php?r=site%2Fsay&message=Привет+мир +https://hostname/index.php?r=site%2Fsay&message=Привет+мир ``` ![Привет, мир](images/start-hello-world.png) diff --git a/docs/guide-ru/start-installation.md b/docs/guide-ru/start-installation.md index 4d12c27890d..667df73a55c 100644 --- a/docs/guide-ru/start-installation.md +++ b/docs/guide-ru/start-installation.md @@ -137,8 +137,8 @@ php requirements.php [HHVM](https://hhvm.com/). Тем не менее, в некоторых случаях поведение при работе с HHVM отличается от обычного PHP. Будьте внимательны. -На рабочем сервере вам наверняка захочется изменить URL приложения с `http://www.example.com/basic/web/index.php` -на `http://www.example.com/index.php`. Для этого необходимо изменить корневую директорию в настройках веб сервера так, +На рабочем сервере вам наверняка захочется изменить URL приложения с `https://www.example.com/basic/web/index.php` +на `https://www.example.com/index.php`. Для этого необходимо изменить корневую директорию в настройках веб сервера так, чтобы та указывала на `basic/web`. Дополнительно можно спрятать `index.php` следуя описанию в разделе «[Разбор и генерация URL](runtime-routing.md)». Далее будет показано как настроить Apache и Nginx. diff --git a/docs/guide-ru/start-workflow.md b/docs/guide-ru/start-workflow.md index 6537d7772ca..65d2938e231 100644 --- a/docs/guide-ru/start-workflow.md +++ b/docs/guide-ru/start-workflow.md @@ -1,9 +1,9 @@ Запуск приложения ==================== - После установки Yii базовое приложение будет доступно либо по URL `http://hostname/basic/web/index.php`, либо по `http://hostname/index.php`, в зависимости от настроек Web сервера. Данный раздел - общее введение в организацию кода, встроенный функционал и обработку обращений приложением Yii. + После установки Yii базовое приложение будет доступно либо по URL `https://hostname/basic/web/index.php`, либо по `https://hostname/index.php`, в зависимости от настроек Web сервера. Данный раздел - общее введение в организацию кода, встроенный функционал и обработку обращений приложением Yii. -> Info: далее в данном руководстве предполагается, что Yii установлен в директорию `basic/web`, которая, в свою очередь, установлена как корневой каталог в настройках Web сервера. В результате, обратившись по URL `http://hostname/index.php`, Вы получите доступ к приложению, расположенному в `basic/web`. Детальнее с процессом начальной настройки можно познакомиться в разделе [Установка Yii](start-installation.md). +> Info: далее в данном руководстве предполагается, что Yii установлен в директорию `basic/web`, которая, в свою очередь, установлена как корневой каталог в настройках Web сервера. В результате, обратившись по URL `https://hostname/index.php`, Вы получите доступ к приложению, расположенному в `basic/web`. Детальнее с процессом начальной настройки можно познакомиться в разделе [Установка Yii](start-installation.md). Отметим, что в отличие от самого фреймворка как только приложение установлено, оно становится целиком вашим. Вы можете изменять его код как угодно. @@ -12,7 +12,7 @@ Установленный шаблон простого приложения состоит из четырех страниц: -* домашняя страница, отображается при переходе по URL `http://hostname/index.php` +* домашняя страница, отображается при переходе по URL `https://hostname/index.php` * страница "About" ("О нас") * на странице "Contact" находится форма обратной связи, на которой пользователь может обратиться к разработчику по e-mail * на странице "Login" отображается форма авторизации. Попытайтесь авторизоваться с логином/паролем "admin/admin". @@ -35,7 +35,7 @@ Ниже приведен список основных директорий и файлов вашего приложения (считаем, что приложение установлено в директорию `basic`): -```js +``` basic/ корневой каталог приложения composer.json используется Composer'ом, содержит описание приложения config/ конфигурационные файлы diff --git a/docs/guide-ru/structure-assets.md b/docs/guide-ru/structure-assets.md index 6ac1731ea85..19ffc02eacd 100644 --- a/docs/guide-ru/structure-assets.md +++ b/docs/guide-ru/structure-assets.md @@ -398,10 +398,10 @@ return [ 'assetManager' => [ 'bundles' => [ 'app\assets\LanguageAssetBundle' => [ - 'baseUrl' => 'http://some.cdn.com/files/i18n/en' // makes NO effect! + 'baseUrl' => 'https://some.cdn.com/files/i18n/en' // makes NO effect! ], 'app\assets\LargeFileAssetBundle' => [ - 'baseUrl' => 'http://some.cdn.com/files/large-files' // makes NO effect! + 'baseUrl' => 'https://some.cdn.com/files/large-files' // makes NO effect! ], ], ], diff --git a/docs/guide-ru/structure-controllers.md b/docs/guide-ru/structure-controllers.md index 59bf52ec148..5765f26c16a 100644 --- a/docs/guide-ru/structure-controllers.md +++ b/docs/guide-ru/structure-controllers.md @@ -81,7 +81,7 @@ ControllerID/ActionID ModuleID/ControllerID/ActionID ``` -Таким образом, если пользователь запрашивает URL `http://hostname/index.php?r=site/index`, то `index` действие в `site` контроллере будет вызвано. +Таким образом, если пользователь запрашивает URL `https://hostname/index.php?r=site/index`, то `index` действие в `site` контроллере будет вызвано. Секция [Маршрутизация](runtime-routing.md) содержит более подробную информацию о том как маршруты сопоставляются с действиями. @@ -175,7 +175,7 @@ ID контроллеров также могут содержать префи Каждое приложение имеет контроллер по умолчанию, указанный через свойство [[yii\base\Application::defaultRoute]]. Когда в запросе не указан [маршрут](#routes), тогда будет использован маршрут указанный в данном свойстве. Для [[yii\web\Application|Веб приложений]], это значение `'site'`, в то время как для [[yii\console\Application|консольных приложений]], -это `'help'`. Таким образом, если задан URL `http://hostname/index.php`, это означает, что контроллер `site` выполнит обработку запроса. +это `'help'`. Таким образом, если задан URL `https://hostname/index.php`, это означает, что контроллер `site` выполнит обработку запроса. Вы можете изменить контроллер по умолчанию следующим образом в [настройках приложения](structure-applications.md#application-configurations): @@ -310,14 +310,14 @@ class HelloWorldAction extends Action [[yii\console\Response::exitStatus|статус выхода]] исполнения команды. В вышеприведенных примерах, все результаты действий являются строками, которые будут использованы в качестве тела ответа, -высланного пользователю. Следующий пример, показывает действие может перенаправить браузер пользователя на новый URL, с помощью +высланного пользователю. Следующий пример, показывает как действие может перенаправить браузер пользователя на новый URL, с помощью возврата response объекта (т. к. [[yii\web\Controller::redirect()|redirect()]] метод возвращает response объект): ```php public function actionForward() { - // перенаправляем браузер пользователя на http://example.com - return $this->redirect('http://example.com'); + // перенаправляем браузер пользователя на https://example.com + return $this->redirect('https://example.com'); } ``` @@ -347,13 +347,13 @@ class PostController extends Controller Для разных запросов параметры действий будут определены следующим образом: -* `http://hostname/index.php?r=post/view&id=123`: параметр `$id` будет присвоено значение `'123'`, в то время +* `https://hostname/index.php?r=post/view&id=123`: параметр `$id` будет присвоено значение `'123'`, в то время как `$version` будет иметь значение `null`, т. к. строка запроса не содержит параметра `version`; -* `http://hostname/index.php?r=post/view&id=123&version=2`: параметрам `$id` и `$version` будут присвоены +* `https://hostname/index.php?r=post/view&id=123&version=2`: параметрам `$id` и `$version` будут присвоены значения `'123'` и `'2'` соответственно; -* `http://hostname/index.php?r=post/view`: будет брошено исключение [[yii\web\BadRequestHttpException]], т. к. +* `https://hostname/index.php?r=post/view`: будет брошено исключение [[yii\web\BadRequestHttpException]], т. к. обязательный параметр `$id` не был указан в запросе; -* `http://hostname/index.php?r=post/view&id[]=123`: будет брошено исключение [[yii\web\BadRequestHttpException]], т. к. +* `https://hostname/index.php?r=post/view&id[]=123`: будет брошено исключение [[yii\web\BadRequestHttpException]], т. к. параметр `$id` получил неверное значение `['123']`. Если вы хотите, чтобы параметр действия принимал массив значений, вы должны использовать type-hint значение `array`, как показано ниже: @@ -365,8 +365,8 @@ public function actionView(array $id, $version = null) } ``` -Теперь, если запрос будет содержать URL `http://hostname/index.php?r=post/view&id[]=123`, то параметр `$id` примет значение -`['123']`. Если запрос будет содержать URL `http://hostname/index.php?r=post/view&id=123`, то параметр `$id` все равно будет +Теперь, если запрос будет содержать URL `https://hostname/index.php?r=post/view&id[]=123`, то параметр `$id` примет значение +`['123']`. Если запрос будет содержать URL `https://hostname/index.php?r=post/view&id=123`, то параметр `$id` все равно будет содержать массив, т. к. скалярное значение `'123'` будет автоматически конвертировано в массив. Вышеприведенные примеры в основном показывают как параметры действий работают для Веб приложений. Больше информации diff --git a/docs/guide-ru/structure-filters.md b/docs/guide-ru/structure-filters.md index 957af264ade..d157f952764 100644 --- a/docs/guide-ru/structure-filters.md +++ b/docs/guide-ru/structure-filters.md @@ -285,7 +285,7 @@ public function behaviors() ### [[yii\filters\RateLimiter|RateLimiter]] Ограничитель количества запросов в единицу времени *(RateLimiter)* реализует алгоритм ограничения запросов, основанный на -[алгоритме leaky bucket](http://en.wikipedia.org/wiki/Leaky_bucket). В основном, он используется при создании RESTful API. +[алгоритме leaky bucket](https://en.wikipedia.org/wiki/Leaky_bucket). В основном, он используется при создании RESTful API. Подробнее об использовании данного фильтра можно прочитать в разделе [Ограничение запросов](rest-rate-limiting.md). @@ -317,7 +317,7 @@ public function behaviors() ### [[yii\filters\Cors|Cors]] -Совместное использование разными источниками [CORS](https://developer.mozilla.org/ru/docs/Web/HTTP/Access_control_CORS) +Совместное использование разными источниками [CORS](https://developer.mozilla.org/ru/docs/Web/HTTP/CORS) - это механизм, который позволяет использовать различные ресурсы (шрифты, скрипты, и т.д.) с отличных от основного сайта доменов. В частности, AJAX вызовы JavaScript могут использовать механизм XMLHttpRequest. В противном случае, такие "междоменные" запросы были бы запрещены из-за политики безопасности same origin. CORS задаёт способ взаимодействия @@ -346,7 +346,7 @@ public function behaviors() Фильтрация Cors может быть настроена с помощью свойства [[yii\filters\Cors::$cors|$cors]]. * `cors['Origin']`: массив, используемый для определения источников. Может принимать значение `['*']` (все) или - `['http://www.myserver.net', 'http://www.myotherserver.com']`. По умолчанию значение равно `['*']`. + `['https://www.myserver.net', 'https://www.myotherserver.com']`. По умолчанию значение равно `['*']`. * `cors['Access-Control-Request-Method']`: массив разрешенных типов запроса, таких как `['GET', 'OPTIONS', 'HEAD']`. Значение по умолчанию `['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS']`. * `cors['Access-Control-Request-Headers']`: массив разрешенных заголовков. Может быть `['*']` то есть все заголовки или @@ -355,7 +355,7 @@ public function behaviors() Может принимать значения `true`, `false` или `null` (не установлено). Значение по умолчанию `null`. * `cors['Access-Control-Max-Age']`: определяет *срок жизни запроса, перед его началом*. По умолчанию `86400`. -Например, разрешим CORS для источника : `http://www.myserver.net` с методами `GET`, `HEAD` и `OPTIONS` : +Например, разрешим CORS для источника : `https://www.myserver.net` с методами `GET`, `HEAD` и `OPTIONS` : ```php use yii\filters\Cors; @@ -367,7 +367,7 @@ public function behaviors() [ 'class' => Cors::class, 'cors' => [ - 'Origin' => ['http://www.myserver.net'], + 'Origin' => ['https://www.myserver.net'], 'Access-Control-Request-Method' => ['GET', 'HEAD', 'OPTIONS'], ], ], @@ -389,7 +389,7 @@ public function behaviors() [ 'class' => Cors::class, 'cors' => [ - 'Origin' => ['http://www.myserver.net'], + 'Origin' => ['https://www.myserver.net'], 'Access-Control-Request-Method' => ['GET', 'HEAD', 'OPTIONS'], ], 'actions' => [ diff --git a/docs/guide-ru/structure-models.md b/docs/guide-ru/structure-models.md index 2706a31c1fb..fc1b288ff62 100644 --- a/docs/guide-ru/structure-models.md +++ b/docs/guide-ru/structure-models.md @@ -1,7 +1,7 @@ Модели ====== -Модели являются частью архитектуры [MVC](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller) (Модель-Вид-Контроллер). Они представляют собой объекты бизнес данных, правил и логики. +Модели являются частью архитектуры [MVC](https://ru.wikipedia.org/wiki/Model-View-Controller) (Модель-Вид-Контроллер). Они представляют собой объекты бизнес данных, правил и логики. Вы можете создавать классы моделей путём расширения класса [[yii\base\Model]] или его дочерних классов. Базовый класс [[yii\base\Model]] поддерживает много полезных функций: diff --git a/docs/guide-ru/structure-modules.md b/docs/guide-ru/structure-modules.md index a8fc39ab042..8b1fce134f6 100644 --- a/docs/guide-ru/structure-modules.md +++ b/docs/guide-ru/structure-modules.md @@ -10,7 +10,7 @@ директории приложения, в этой директории существуют поддиректории `controllers`, `models`, `views` и другие, в которых размещаются контроллеры, модели, представления и другие элементы. В следующем примере показано примерное содержимое модуля: -```js +``` forum/ Module.php файл класса модуля controllers/ содержит файлы классов контроллеров 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-shared-hosting.md b/docs/guide-ru/tutorial-shared-hosting.md index 1a60b2a8834..51a2eb09084 100644 --- a/docs/guide-ru/tutorial-shared-hosting.md +++ b/docs/guide-ru/tutorial-shared-hosting.md @@ -48,7 +48,7 @@ RewriteRule . index.php ### Проверка требований -Для того чтобы запустить Yii, ваш веб-сервер должен соответствовать его требованиям. Минимальное требование к PHP - это его версия 5.4. Для того чтобы проверить требования, скопируйте `requirements.php` из корневого каталога в каталог webroot и запустите его с помощью браузера, используя url `http://example.com/requirements.php`. Не забудьте после проверки требований удалить файл `requirements.php`. +Для того чтобы запустить Yii, ваш веб-сервер должен соответствовать его требованиям. Минимальное требование к PHP - это его версия 5.4. Для того чтобы проверить требования, скопируйте `requirements.php` из корневого каталога в каталог webroot и запустите его с помощью браузера, используя url `https://example.com/requirements.php`. Не забудьте после проверки требований удалить файл `requirements.php`. Установка шаблона приложения Advanced --------------------------------- 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-tr/intro-yii.md b/docs/guide-tr/intro-yii.md index 7807853affc..069f690f91d 100644 --- a/docs/guide-tr/intro-yii.md +++ b/docs/guide-tr/intro-yii.md @@ -32,6 +32,6 @@ Bu kılavuz esas olarak sürüm 2.0 ile ilgilidir. Gereksinimler ve Önkoşullar ------------------------------ -Yii 2.0, PHP 5.4.0 veya üstü sürüm gerektirir ve PHP 7'nin en son sürümü ile en iyi şekilde çalışır. Her bir Yii sürümünde yer alan gereksinim denetleyicisini çalıştırarak, daha ayrıntılı gereksinimleri ayrı ayrı özellikler için bulabilirsiniz. +Yii 2.0, PHP 5.4.0 veya üstü sürüm gerektirir ve PHP 'nin en son sürümü ile en iyi şekilde çalışır. Her bir Yii sürümünde yer alan gereksinim denetleyicisini çalıştırarak, daha ayrıntılı gereksinimleri ayrı ayrı özellikler için bulabilirsiniz. Yii OOP temelli bir kütüphane olduğu için Yii'yi kullanmak, nesne yönelimli programlama (OOP) hakkında temel bilgi gerektirir. Yii 2.0 ayrıca PHP'nin [namespaceler](https://www.php.net/manual/en/language.namespaces.php) ve [traitler](https://www.php.net/manual/en/language.oop5.traits.php) gibi son özelliklerinden de yararlanır. Bu kavramları anlamak, Yii 2.0'ı daha kolay anlamanıza yardımcı olacaktır. diff --git a/docs/guide-uk/concept-aliases.md b/docs/guide-uk/concept-aliases.md index 9aba4b618f6..abedbc9b6ed 100644 --- a/docs/guide-uk/concept-aliases.md +++ b/docs/guide-uk/concept-aliases.md @@ -21,7 +21,7 @@ Yii::setAlias('@foo', '/path/to/foo'); // псевдонім URL -Yii::setAlias('@bar', 'http://www.example.com'); +Yii::setAlias('@bar', 'https://www.example.com'); ``` > Note: псевдонім шляху до файлу або URL *не* обовʼязково вказує на наявний файл або ресурс. @@ -47,7 +47,7 @@ return [ // ... 'aliases' => [ '@foo' => '/path/to/foo', - '@bar' => 'http://www.example.com', + '@bar' => 'https://www.example.com', ], ]; ``` @@ -61,7 +61,7 @@ return [ ```php echo Yii::getAlias('@foo'); // виведе: /path/to/foo -echo Yii::getAlias('@bar'); // виведе: http://www.example.com +echo Yii::getAlias('@bar'); // виведе: https://www.example.com echo Yii::getAlias('@foo/bar/file.php'); // виведе: /path/to/foo/bar/file.php ``` diff --git a/docs/guide-uk/rest-quick-start.md b/docs/guide-uk/rest-quick-start.md index b728ac436fa..16316c61644 100644 --- a/docs/guide-uk/rest-quick-start.md +++ b/docs/guide-uk/rest-quick-start.md @@ -9,7 +9,7 @@ Yii включає повноцінний набір засобів для сп * Отримання серіалізованих об'єктів із необхідною вам вибіркою полів; * Належне форматування даних та помилок при їх валідації; * Колекція пагінацій, фільтрів та сортувань; -* Підтримка [HATEOAS](http://en.wikipedia.org/wiki/HATEOAS); +* Підтримка [HATEOAS](https://uk.wikipedia.org/wiki/HATEOAS); * Ефективна маршрутизація з належною перевіркою методів HTTP; * Вбудована підтримка методів `OPTIONS` та `HEAD`; * Аутентифікація та авторизація; diff --git a/docs/guide-uk/start-databases.md b/docs/guide-uk/start-databases.md index dbbb4789e82..33a9d55993d 100644 --- a/docs/guide-uk/start-databases.md +++ b/docs/guide-uk/start-databases.md @@ -220,7 +220,7 @@ use yii\widgets\LinkPager; Щоб побачити як весь вищезазначений код працює, відкрийте в браузері наступний URL: ``` -http://hostname/index.php?r=country%2Findex +https://hostname/index.php?r=country%2Findex ``` ![Перелік країн](images/start-country-list.png) @@ -230,7 +230,7 @@ http://hostname/index.php?r=country%2Findex Придивившись більш уважно, ви побачите, що URL в браузері також змінюється на ``` -http://hostname/index.php?r=country%2Findex&page=2 +https://hostname/index.php?r=country%2Findex&page=2 ``` За лаштунками, [[yii\data\Pagination|Pagination]] надає всю необхідну функціональність для розділення набору даних на сторінки: diff --git a/docs/guide-uk/start-forms.md b/docs/guide-uk/start-forms.md index a957fb7697a..2845f74e53a 100644 --- a/docs/guide-uk/start-forms.md +++ b/docs/guide-uk/start-forms.md @@ -187,7 +187,7 @@ use yii\widgets\ActiveForm; Щоб побачити, як це працює, відкрийте в браузері наступний URL: ``` -http://hostname/index.php?r=site%2Fentry +https://hostname/index.php?r=site%2Fentry ``` Ви побачите сторінку з формою і двома полями для заповнення. Перед кожним полем є надпис, який вказує, яку саме diff --git a/docs/guide-uk/start-gii.md b/docs/guide-uk/start-gii.md index 1d1652663a0..4d753ab81c6 100644 --- a/docs/guide-uk/start-gii.md +++ b/docs/guide-uk/start-gii.md @@ -46,7 +46,7 @@ defined('YII_ENV') or define('YII_ENV', 'dev'); Тепер ви можете отримати доступ до Gii за наступною URL-адресою: ``` -http://hostname/index.php?r=gii +https://hostname/index.php?r=gii ``` > Note: Якщо ви звертаєтесь до Gii від не локальної машини, доступ буде заборонений за замовчуванням із міркувань @@ -112,7 +112,7 @@ CRUD - це акронім від англійських слів Create, Read, Щоб побачити як це працює, відкрийте в браузері наступний URL: ``` -http://hostname/index.php?r=country%2Findex +https://hostname/index.php?r=country%2Findex ``` Ви побачите таблицю даних, що показує країни з таблиці бази даних. Ви можете відсортувати дані, diff --git a/docs/guide-uk/start-hello.md b/docs/guide-uk/start-hello.md index 25cc4912539..4ea3fd4825e 100644 --- a/docs/guide-uk/start-hello.md +++ b/docs/guide-uk/start-hello.md @@ -102,7 +102,7 @@ use yii\helpers\Html; Після створення дії і представлення, ви можете перейти на нову сторінку по наступному URL: ``` -http://hostname/index.php?r=site%2Fsay&message=Привіт+світ +https://hostname/index.php?r=site%2Fsay&message=Привіт+світ ``` ![Привіт, світ](images/start-hello-world.png) diff --git a/docs/guide-uk/start-installation.md b/docs/guide-uk/start-installation.md index 96ff70732e4..4f7f91c627a 100644 --- a/docs/guide-uk/start-installation.md +++ b/docs/guide-uk/start-installation.md @@ -152,8 +152,8 @@ Windows, Mac OS X чи Linux із встановленим PHP 5.4 або вищ [HHVM](https://hhvm.com/), однак є деякі крайні випадки, де HHVM поводиться інакше, ніж рідний PHP, тому ви повинні бути дуже уважними при використанні HHVM. -На робочому сервері вам напевно захочеться змінити URL додатку з `http://www.example.com/basic/web/index.php` -на `http://www.example.com/index.php`. Для цього необхідно змінити кореневу директорію в налаштуваннях веб-сервера на `basic/web`. +На робочому сервері вам напевно захочеться змінити URL додатку з `https://www.example.com/basic/web/index.php` +на `https://www.example.com/index.php`. Для цього необхідно змінити кореневу директорію в налаштуваннях веб-сервера на `basic/web`. Додатково можна сховати `index.php` із URL, як це описано у розділі [Маршрутизація та створення URL](runtime-routing.md). Далі буде описано як налаштувати Apache або Nginx для цих цілей. diff --git a/docs/guide-uk/start-workflow.md b/docs/guide-uk/start-workflow.md index 97b59965f9a..44968eee94f 100644 --- a/docs/guide-uk/start-workflow.md +++ b/docs/guide-uk/start-workflow.md @@ -1,13 +1,13 @@ Виконання додатків ================== -Після встановлення Yii, базовий додаток буде доступний або по URL `http://hostname/basic/web/index.php`, -або по `http://hostname/index.php`, в залежності від налаштування веб-сервера. Даний розділ - загальне введення в +Після встановлення Yii, базовий додаток буде доступний або по URL `https://hostname/basic/web/index.php`, +або по `https://hostname/index.php`, в залежності від налаштування веб-сервера. Даний розділ - загальне введення в організацію коду, вбудований функціонал і опрацювання запитів додатком Yii. > Info: Для спрощення, далі в даному посібнику припускається, що Yii встановлений в директорію `basic/web`, яка, в свою чергу, встановлена, як коренева директорія в налаштуваннях веб-сервера. В результаті, звернувшись до URL - на зразок `http://hostname/index.php`, ви отримаєте доступ до додатку. + на зразок `https://hostname/index.php`, ви отримаєте доступ до додатку. Будь ласка, відредагуйте URL-адреси наведені у прикладах відповідно до ваших потреб. @@ -16,7 +16,7 @@ Встановлений базовий додаток складається з чотирьох сторінок: -* домашня сторінка, відображається при переході по URL `http://hostname/index.php`; +* домашня сторінка, відображається при переході по URL `https://hostname/index.php`; * сторінка "About" ("Про нас"); * сторінка "Contact", що відображає форму зворотнього зв’язку, через яку користувач може звернутися до розробника за допомогою електронної пошти; * сторінка "Login", на якій відображається форма для аутентифікації користувачів. Спробуйте увійти з логіном/паролем @@ -39,7 +39,7 @@ Нижче наведений перелік основних директорій і файлів вашого додатку (вважаємо, що додаток встановлений в директорію `basic`): -```js +``` basic/ базова директорія додатка composer.json використовується Composer'ом, містить опис додатку config/ містить конфігураційні файли diff --git a/docs/guide-uk/structure-controllers.md b/docs/guide-uk/structure-controllers.md index 88cb383f7f4..eae20d5df45 100644 --- a/docs/guide-uk/structure-controllers.md +++ b/docs/guide-uk/structure-controllers.md @@ -83,7 +83,7 @@ ControllerID/ActionID ModuleID/ControllerID/ActionID ``` -Таким чином, якщо користувач звертається до URL `http://hostname/index.php?r=site/index`, то буде викликано дію `index` +Таким чином, якщо користувач звертається до URL `https://hostname/index.php?r=site/index`, то буде викликано дію `index` у контролері `site`. Розділ [Маршрутизація та створення URL](runtime-routing.md) містить більш детальну інформацію про те, як маршрути співвідносяться із діями. @@ -179,7 +179,7 @@ class SiteController extends Controller Коли в запиті не вказано [маршрут](#routes), то буде використано маршрут із зазначеної властивості. Для [[yii\web\Application|веб-додатків]] це значення рівне `'site'`, у той час, як для [[yii\console\Application|консольних додатків]], це - `'help'`. Таким чином, якщо вказаний URL -`http://hostname/index.php`, це значить, що контролер `site` виконає обробку запиту. +`https://hostname/index.php`, це значить, що контролер `site` виконає обробку запиту. Ви можете змінити контролер за замовчуванням наступним чином в [налаштуваннях додатку](structure-applications.md#application-configurations): @@ -324,8 +324,8 @@ class HelloWorldAction extends Action ```php public function actionForward() { - // перенаправляємо браузер користувача на http://example.com - return $this->redirect('http://example.com'); + // перенаправляємо браузер користувача на https://example.com + return $this->redirect('https://example.com'); } ``` @@ -355,13 +355,13 @@ class PostController extends Controller Параметри дії будуть заповнені для різних запитів наступним чином: -* `http://hostname/index.php?r=post/view&id=123`: параметру `$id` буде присвоєне значення `'123'`, у той час, +* `https://hostname/index.php?r=post/view&id=123`: параметру `$id` буде присвоєне значення `'123'`, у той час, як `$version` буде мати значення `null`, бо рядок запиту не містить параметра `version`. -* `http://hostname/index.php?r=post/view&id=123&version=2`: параметрам `$id` і `$version` будуть присвоєні +* `https://hostname/index.php?r=post/view&id=123&version=2`: параметрам `$id` і `$version` будуть присвоєні значення `'123'` і `'2'` відповідно. -* `http://hostname/index.php?r=post/view`: буде отримане виключення [[yii\web\BadRequestHttpException]], оскільки +* `https://hostname/index.php?r=post/view`: буде отримане виключення [[yii\web\BadRequestHttpException]], оскільки обов’язковий параметр `$id` не було вказано у запиті. -* `http://hostname/index.php?r=post/view&id[]=123`: буде отримане виключення [[yii\web\BadRequestHttpException]], +* `https://hostname/index.php?r=post/view&id[]=123`: буде отримане виключення [[yii\web\BadRequestHttpException]], оскільки параметр `$id` отримав невірне значення `['123']`. Якщо ви хочете, щоб параметр дії приймав масив значень, ви повинні вказати тип `array` для параметра метода, як наведено нижче: @@ -373,8 +373,8 @@ public function actionView(array $id, $version = null) } ``` -Тепер, якщо запит буде містити URL `http://hostname/index.php?r=post/view&id[]=123`, то параметр `$id` отримає -значення `['123']`. Якщо запит буде містити URL `http://hostname/index.php?r=post/view&id=123`, то параметр +Тепер, якщо запит буде містити URL `https://hostname/index.php?r=post/view&id[]=123`, то параметр `$id` отримає +значення `['123']`. Якщо запит буде містити URL `https://hostname/index.php?r=post/view&id=123`, то параметр `$id` все одно отримає масив, оскільки скалярне значення `'123'` буде автоматично перетворено у масив. Вищенаведені приклади в основному показують як параметри дій працюють для веб-додатків. Більше інформації diff --git a/docs/guide-uz/start-databases.md b/docs/guide-uz/start-databases.md index ef35995e602..288cbec6a30 100644 --- a/docs/guide-uz/start-databases.md +++ b/docs/guide-uz/start-databases.md @@ -199,7 +199,7 @@ Keling sinab ko'raylik Yuqoridagi yozgan kodni ishlashini ko'rish uchun iltimos ushbu yo'l (url) bo'yicha o'ting: ``` -http://hostname/index.php?r=country%2Findex +https://hostname/index.php?r=country%2Findex ``` ![Список Стран](images/start-country-list.png) @@ -208,7 +208,7 @@ Boshida siz ma'lumotlar omboridan beshta ma'lumotni chiqarib berganini ko'rishin Etibor bilan qarasangiz, URLda ham quydagi "2" sahifa chiqti. ``` -http://hostname/index.php?r=country%2Findex&page=2 +https://hostname/index.php?r=country%2Findex&page=2 ``` [[yii\data\Pagination|Pagination]] Ma'lumotlarni sahifalarga bo'lib qisman chiqarish umumiy ishlash tartibi esa quydagicha: diff --git a/docs/guide-uz/start-forms.md b/docs/guide-uz/start-forms.md index df1752f305c..4841ecb8cff 100644 --- a/docs/guide-uz/start-forms.md +++ b/docs/guide-uz/start-forms.md @@ -154,7 +154,7 @@ Keling, sinab ko'raylik Ish jarayonida yaratilgan bor narsani ko'rish uchun, browserni ochib quydagi URLni kiritaylik: ``` -http://hostname/index.php?r=site%2Fentry +https://hostname/index.php?r=site%2Fentry ``` Siz ikkta maydoni o'z ichiga olgan shaklni ko'rishingiz mumkin. Har bir maydon oldida esa yorlig' bor, u yorlig'lar, qanaqa diff --git a/docs/guide-uz/start-hello.md b/docs/guide-uz/start-hello.md index 6b55482a2ce..82a91b335cf 100644 --- a/docs/guide-uz/start-hello.md +++ b/docs/guide-uz/start-hello.md @@ -84,7 +84,7 @@ Ishlatib ko'ramiz Yuqorida aytib o'tilgan amalrni va amalar ko'rinishlarini yaratib bo'ganingizdan so'ng siz usu URL bo'yicha o'tishingiz mumkin: ``` -http://hostname/index.php?r=site%2Fsay&message=Salom+dunyo +https://hostname/index.php?r=site%2Fsay&message=Salom+dunyo ``` ![Salom, dunyo](images/start-hello-world.png) diff --git a/docs/guide-uz/start-installation.md b/docs/guide-uz/start-installation.md index 77248878ff9..9cf9e865b2b 100644 --- a/docs/guide-uz/start-installation.md +++ b/docs/guide-uz/start-installation.md @@ -107,7 +107,7 @@ Web-server sozlamasi Yuqoridagi ko'rsatmalarga muvofiq o'rnatilgan ilovalar Windows va Linux ostida PHP 5.4 va undan yuqori taxrirlarda o'rnatilgan [Apache](https://httpd.apache.org/) va [Nginx](https://nginx.org/) bilan ishlaydi.Yii 2.0 [HHVM](https://hhvm.com/) bilan ham mos keladi. Etiborli bo'ling, ba'zi hollarda, HHVM bilan ishlashda odatdagi PHPdan farq qiladi. -Ish serverida siz `http://www.example.com/basic/web/index.php` dan `http://www.example.com/index.php` manziliga dastur URL manzilini o'zgartirishni xohlasangiz. +Ish serverida siz `https://www.example.com/basic/web/index.php` dan `https://www.example.com/index.php` manziliga dastur URL manzilini o'zgartirishni xohlasangiz. Buni amalga oshirish uchun veb-server parametrlarida ildiz katalogini `basic/web` ga o'zgartiring. Bundan tashqari, ["URL sozlamalari"](runtime-routing.md) qismidagi malumotga ko'ra, `index.php` yashirishi mumkin. Keyinchalik Apache va Nginx ni qanday sozlashni ko'rsatamiz. > Info: Veb-serverning `basic/web` ildiz katalogini o'rnatib, siz ruxsat berilmagan kirish kodidan va `basic/web` sahifadagi ma'lumotlardan himoya qilasiz. Bu ilovani yanada xavfsiz holga keltiradi. diff --git a/docs/guide-uz/start-workflow.md b/docs/guide-uz/start-workflow.md index 0474373e750..af2ff010232 100644 --- a/docs/guide-uz/start-workflow.md +++ b/docs/guide-uz/start-workflow.md @@ -1,9 +1,9 @@ Ilovani ishga tushirish ==================== -`http://hostname/basic/web/index.php` o'rnatganingizdan so'ng, asosiy dastur `http://hostname/basic/web/index.php` URL manzilida yoki `http://hostname/index.php` orqali Veb-server sozlamalariga qarab mavjud bo'ladi. Ushbu bo'lim - kodni tashkil qilishning umumiy ta'rifi, o'rnatilgan funksionallik va murojaatlar bilan ishlash. +`https://hostname/basic/web/index.php` o'rnatganingizdan so'ng, asosiy dastur `https://hostname/basic/web/index.php` URL manzilida yoki `https://hostname/index.php` orqali Veb-server sozlamalariga qarab mavjud bo'ladi. Ushbu bo'lim - kodni tashkil qilishning umumiy ta'rifi, o'rnatilgan funksionallik va murojaatlar bilan ishlash. -> Info: Ushbu qo'llanmada Yii `basic/web` katalogiga o'rnatilganini inobatga oladi va u o'z navbatida veb-server sozlamalaridagi ildiz katalogi sifatida o'rnatiladi. Natijada `http://hostname/index.php` URL manziliga kirish orqali `basic/web` joylashgan ilovaga kirishingiz mumkin. Boshlang'ich konfiguratsiya jarayonida batafsil ma'lumotni [Yii-ni o'rnatish bo'limida](start-installation.md) topishingiz mumkin. +> Info: Ushbu qo'llanmada Yii `basic/web` katalogiga o'rnatilganini inobatga oladi va u o'z navbatida veb-server sozlamalaridagi ildiz katalogi sifatida o'rnatiladi. Natijada `https://hostname/index.php` URL manziliga kirish orqali `basic/web` joylashgan ilovaga kirishingiz mumkin. Boshlang'ich konfiguratsiya jarayonida batafsil ma'lumotni [Yii-ni o'rnatish bo'limida](start-installation.md) topishingiz mumkin. Freymvorkdan farqli o'laroq, dastur o'rnatilgandan so'ng, u sizniki bolib qoladi. Siz o`zingizni kodingizni o'zingiz xohlagan tarzda o'zgartirishingiz mumkin. @@ -12,7 +12,7 @@ Funksionallik Oddiy dastur uchun o'rnatilgan shablon to'rtta sahifadan iborat: -* `http://hostname/index.php` URL manziliga `http://hostname/index.php` ko'rsatiladigan asosiy sahifa +* `https://hostname/index.php` URL manziliga `https://hostname/index.php` ko'rsatiladigan asosiy sahifa * "About" ("Biz haqimizda") sahifasi * "Kontakt" sahifasida qayta aloqa shakli joylashgan ushbu shakl orqali u dasturchiga murojaat qilishi mumkin * "Kirish" sahifasida avtorizatsiya shakl ko'rsatiladi. Foydalanuvchi nomi / parol bilan "login / admin" bilan tizimga kirishingiz mumkin. Asosiy menyu "Login" menyusi "Logout" menyusiga o`zgarishiga etibor bering. @@ -28,7 +28,7 @@ Yii web-ilovasi tuzilmasi Quyidagida veb-ilovaning tuzilmasi asosiy kataloglari va fayllari ro'yxati berilgan (ilovaning `basic` katalogga o'rnatilgan deb hisoblaymiz): -```js +``` basic/ ilovaning ildiz katalogi composer.json Composer ishlatadigan fayl config/ Sozlamalar (konfiguratsion) fayl diff --git a/docs/guide-uz/structure-controllers.md b/docs/guide-uz/structure-controllers.md index 365beea0a63..a0f9c8446f4 100644 --- a/docs/guide-uz/structure-controllers.md +++ b/docs/guide-uz/structure-controllers.md @@ -77,7 +77,7 @@ ControllerID/ActionID ModuleID/ControllerID/ActionID ``` -Таким образом, если пользователь запрашивает URL `http://hostname/index.php?r=site/index`, то `index` действие в `site` контроллере будет вызвано. +Таким образом, если пользователь запрашивает URL `https://hostname/index.php?r=site/index`, то `index` действие в `site` контроллере будет вызвано. Секция [Маршрутизация](runtime-routing.md) содержит более подробную информацию о том как маршруты сопоставляются с действиями. @@ -173,7 +173,7 @@ ID контроллеров также могут содержать префи Каждое приложение имеет контроллер по умолчанию, указанный через свойство [[yii\base\Application::defaultRoute]]. Когда в запросе не указан [маршрут](#routes), тогда будет использован маршрут указанный в данном свойстве. Для [[yii\web\Application|Веб приложений]], это значение `'site'`, в то время как для [[yii\console\Application|консольных приложений]], -это `'help'`. Таким образом, если задан URL `http://hostname/index.php`, это означает, что контроллер `site` выполнит обработку запроса. +это `'help'`. Таким образом, если задан URL `https://hostname/index.php`, это означает, что контроллер `site` выполнит обработку запроса. Вы можете изменить контроллер по умолчанию следующим образом в [настройках приложения](structure-applications.md#application-configurations): @@ -314,8 +314,8 @@ class HelloWorldAction extends Action ```php public function actionForward() { - // перенаправляем браузер пользователя на http://example.com - return $this->redirect('http://example.com'); + // перенаправляем браузер пользователя на https://example.com + return $this->redirect('https://example.com'); } ``` @@ -345,13 +345,13 @@ class PostController extends Controller Для разных запросов параметры действий будут определены следующим образом: -* `http://hostname/index.php?r=post/view&id=123`: параметр `$id` будет присвоено значение `'123'`, в то время +* `https://hostname/index.php?r=post/view&id=123`: параметр `$id` будет присвоено значение `'123'`, в то время как `$version` будет иметь значение `null`, т. к. строка запроса не содержит параметра `version`; -* `http://hostname/index.php?r=post/view&id=123&version=2`: параметрам `$id` и `$version` будут присвоены +* `https://hostname/index.php?r=post/view&id=123&version=2`: параметрам `$id` и `$version` будут присвоены значения `'123'` и `'2'` соответственно; -* `http://hostname/index.php?r=post/view`: будет брошено исключение [[yii\web\BadRequestHttpException]], т. к. +* `https://hostname/index.php?r=post/view`: будет брошено исключение [[yii\web\BadRequestHttpException]], т. к. обязательный параметр `$id` не был указан в запросе; -* `http://hostname/index.php?r=post/view&id[]=123`: будет брошено исключение [[yii\web\BadRequestHttpException]], т. к. +* `https://hostname/index.php?r=post/view&id[]=123`: будет брошено исключение [[yii\web\BadRequestHttpException]], т. к. параметр `$id` получил неверное значение `['123']`. Если вы хотите, чтобы параметр действия принимал массив значений, вы должны использовать type-hint значение `array`, как показано ниже: @@ -363,8 +363,8 @@ public function actionView(array $id, $version = null) } ``` -Теперь, если запрос будет содержать URL `http://hostname/index.php?r=post/view&id[]=123`, то параметр `$id` примет значение -`['123']`. Если запрос будет содержать URL `http://hostname/index.php?r=post/view&id=123`, то параметр `$id` все равно будет +Теперь, если запрос будет содержать URL `https://hostname/index.php?r=post/view&id[]=123`, то параметр `$id` примет значение +`['123']`. Если запрос будет содержать URL `https://hostname/index.php?r=post/view&id=123`, то параметр `$id` все равно будет содержать массив, т. к. скалярное значение `'123'` будет автоматически сконвертировано в массив. Вышеприведенные примеры в основном показывают как параметры действий работают для Веб приложений. Больше информации diff --git a/docs/guide-vi/start-databases.md b/docs/guide-vi/start-databases.md index d98a84dfb2b..186f48b81f5 100644 --- a/docs/guide-vi/start-databases.md +++ b/docs/guide-vi/start-databases.md @@ -216,7 +216,7 @@ Xem demo Truy cập vào Url sau và xem kết quả: ``` -http://hostname/index.php?r=country/index +https://hostname/index.php?r=country/index ``` ![Danh sách Country](images/start-country-list.png) @@ -226,7 +226,7 @@ Nếu bạn click vào button "2", bạn sẽ thấy 5 country khác trong CSDL: Bạn để ý rằng URL trong trình duyệt cũng thay đổi. ``` -http://hostname/index.php?r=country/index&page=2 +https://hostname/index.php?r=country/index&page=2 ``` Trong luồng xử lý này, đối tượng [[yii\data\Pagination|Pagination]] sẽ cung cấp tất cả những hàm cần thiết cho việc phân trang: diff --git a/docs/guide-vi/start-forms.md b/docs/guide-vi/start-forms.md index 7fdf1d93e16..b6b577a8f78 100644 --- a/docs/guide-vi/start-forms.md +++ b/docs/guide-vi/start-forms.md @@ -182,7 +182,7 @@ Thử xem kết quả Truy cập vào URL sau để xem kết quả: ``` -http://hostname/index.php?r=site/entry +https://hostname/index.php?r=site/entry ``` Bạn sẽ thấy trang Web cùng với việc hiển thị form chứa 2 trường để nhập dữ liệu . Trước mỗi trường nhập liệu, có nhãn được chỉ định những dữ liệu nhập vào . diff --git a/docs/guide-vi/start-gii.md b/docs/guide-vi/start-gii.md index 6a62670d091..403b1e28a1b 100644 --- a/docs/guide-vi/start-gii.md +++ b/docs/guide-vi/start-gii.md @@ -44,7 +44,7 @@ Dựa vào dòng này, ứng dụng sẽ được thiết lập ở chế độ Bây giờ bạn có thể truy cập Gii qua đường dẫn: ``` -http://hostname/index.php?r=gii +https://hostname/index.php?r=gii ``` > Lưu ý: Nếu bạn muốn truy cập Gii không chỉ từ localhost mà còn từ các máy khác, mặc định các truy cập sẽ bị từ chối @@ -107,7 +107,7 @@ Xem kết quả Xem kết quả, dùng trình duyệt truy cập vào đường dẫn sau: ``` -http://hostname/index.php?r=country/index +https://hostname/index.php?r=country/index ``` Bạn sẽ thấy dữ liệu bảng được hiển thị chứa các thông tin trong CSDL country. Bạn có thể sắp xếp các bảng, diff --git a/docs/guide-vi/start-hello.md b/docs/guide-vi/start-hello.md index 408dd3d1401..970fa54d9e5 100644 --- a/docs/guide-vi/start-hello.md +++ b/docs/guide-vi/start-hello.md @@ -101,7 +101,7 @@ Trying it Out Sau khi đã tạo action và view, bạn có thể truy cập vào trang bởi việc truy cập vào URL sau: ``` -http://hostname/index.php?r=site/say&message=Hello+World +https://hostname/index.php?r=site/say&message=Hello+World ``` ![Hello World](images/start-hello-world.png) diff --git a/docs/guide-vi/start-installation.md b/docs/guide-vi/start-installation.md index c59ccf91e6f..e162ac1d966 100644 --- a/docs/guide-vi/start-installation.md +++ b/docs/guide-vi/start-installation.md @@ -23,7 +23,7 @@ Cài đặt qua trinh quản lý gói Composer Mẫu ứng dụng *Basic Application* bao gồm 4 trang cơ bản: -* Trang chủ (homepage), được hiển thị khi bạn truy cập vào URL `http://hostname/index.php`, +* Trang chủ (homepage), được hiển thị khi bạn truy cập vào URL `https://hostname/index.php`, * Trang "About", * Trang "Contact", trang hiển thị form contact cho phép user liên hệ với bạn qua email, * Trang "Login", trang hiển thị form login cho phép bạn có thể xác thực user. Hãy thử đăng nhập với @@ -37,7 +37,7 @@ Cấu trúc ứng dụng (Application Structure) ---------------------- -虽然行为类似于 [traits](https://www.php.net/traits),它们都将自己的属性和方法“注入”到主类中, +虽然行为类似于 [traits](https://www.php.net/manual/zh/language.oop5.traits.php),它们都将自己的属性和方法“注入”到主类中, 但它们在许多方面有所不同。如下所述,他们都有优点和缺点。 它们更像互补类而非替代类。 diff --git a/docs/guide-zh-CN/concept-di-container.md b/docs/guide-zh-CN/concept-di-container.md index 81ebff6bbb5..306af9d2c3a 100644 --- a/docs/guide-zh-CN/concept-di-container.md +++ b/docs/guide-zh-CN/concept-di-container.md @@ -2,7 +2,7 @@ =========================================== 依赖注入(Dependency Injection,DI)容器就是一个对象,它知道怎样初始化并配置对象及其依赖的所有对象。 -[Martin 的文章](http://martinfowler.com/articles/injection.html) 已经解释了 DI 容器为什么很有用。 +[Martin 的文章](https://martinfowler.com/articles/injection.html) 已经解释了 DI 容器为什么很有用。 这里我们主要讲解 Yii 提供的 DI 容器的使用方法。 @@ -525,7 +525,7 @@ $reader = $container->get('app\storage\DocumentsReader'); 依赖注入和[服务定位器](concept-service-locator.md)都是流行的设计模式, 它们使你可以用充分解耦且更利于测试的风格构建软件。 -强烈推荐你阅读 [Martin 的文章](http://martinfowler.com/articles/injection.html) , +强烈推荐你阅读 [Martin 的文章](https://martinfowler.com/articles/injection.html) , 对依赖注入和服务定位器有个更深入的理解。 Yii 在依赖住入(DI)容器之上实现了它的[服务定位器](concept-service-locator.md)。 diff --git a/docs/guide-zh-CN/concept-events.md b/docs/guide-zh-CN/concept-events.md index e2ad8515ee4..ab6b580bc51 100644 --- a/docs/guide-zh-CN/concept-events.md +++ b/docs/guide-zh-CN/concept-events.md @@ -13,7 +13,7 @@ Yii 引入了名为 [[yii\base\Component]] 的基类以支持事件。 事件处理器(Event Handlers) ------------------------- -事件处理器是一个[PHP 回调函数](https://www.php.net/manual/en/language.types.callable.php), +事件处理器是一个[PHP 回调函数](https://www.php.net/manual/zh/language.types.callable.php), 当它所附加到的事件被触发时它就会执行。可以使用以下回调函数之一: - 字符串形式指定的 PHP 全局函数,如 `'trim'` ; diff --git a/docs/guide-zh-CN/db-active-record.md b/docs/guide-zh-CN/db-active-record.md index 6cac68139c0..fcd7e82edc7 100644 --- a/docs/guide-zh-CN/db-active-record.md +++ b/docs/guide-zh-CN/db-active-record.md @@ -1,7 +1,7 @@ 活动记录(Active Record) ====================== -[Active Record](http://zh.wikipedia.org/wiki/Active_Record) 提供了一个面向对象的接口, +[Active Record](https://zh.wikipedia.org/wiki/%E4%B8%BB%E5%8A%A8%E8%AE%B0%E5%BD%95) 提供了一个面向对象的接口, 用以访问和操作数据库中的数据。Active Record 类与数据库表关联, Active Record 实例对应于该表的一行, Active Record 实例的*属性*表示该行中特定列的值。 @@ -473,8 +473,8 @@ Active Record 自动维护脏属性列表。 它保存所有属性的旧值, > 其中每个值都表示为一个字符串类型。 > 为了确保正确的类型,比如,整型需要用[过滤验证器](input-validation.md#data-filtering): > `['attributeName', 'filter', 'filter' => 'intval']`。其他 PHP 类型转换函数一样适用,像 -> [intval()](https://www.php.net/manual/en/function.intval.php), [floatval()](https://www.php.net/manual/en/function.floatval.php), -> [boolval](https://www.php.net/manual/en/function.boolval.php),等等 +> [intval()](https://www.php.net/manual/zh/function.intval.php), [floatval()](https://www.php.net/manual/zh/function.floatval.php), +> [boolval](https://www.php.net/manual/zh/function.boolval.php),等等 ### 默认属性值(Default Attribute Values) @@ -689,7 +689,7 @@ try { ``` > Tip: 在上面的代码中,我们有两个catch块用于兼容 -> PHP 5.x 和 PHP 7.x。 `\Exception` 继承于 [`\Throwable` interface](https://www.php.net/manual/en/class.throwable.php) +> PHP 5.x 和 PHP 7.x。 `\Exception` 继承于 [`\Throwable` interface](https://www.php.net/manual/zh/class.throwable.php) > 由于 PHP 7.0 的改动,如果您的应用程序仅使用 PHP 7.0 及更高版本,您可以跳过 `\Exception` 部分。 第二种方法是在 [[yii\db\ActiveRecord::transactions()]] 方法中列出需要事务支持的 DB 操作。 @@ -954,7 +954,7 @@ $orders = $customer->bigOrders; ### 中间关联表(Relations via a Junction Table) 在数据库建模中,当两个关联表之间的对应关系是多对多时, -通常会引入一个[连接表](https://en.wikipedia.org/wiki/Junction_table)。例如,`order` 表 +通常会引入一个[连接表](https://zh.wikipedia.org/wiki/%E5%85%B3%E8%81%94%E5%AE%9E%E4%BD%93)。例如,`order` 表 和 `item` 表可以通过名为 `order_item` 的连接表相关联。一个 order 将关联多个 order items, 而一个 order item 也会关联到多个 orders。 diff --git a/docs/guide-zh-CN/db-dao.md b/docs/guide-zh-CN/db-dao.md index 22baef3256d..091d1b6adb6 100644 --- a/docs/guide-zh-CN/db-dao.md +++ b/docs/guide-zh-CN/db-dao.md @@ -68,7 +68,7 @@ return [ 配置数据库连接时, 你应该总是通过 [[yii\db\Connection::dsn|dsn]] 属性来指明它的数据源名称 (DSN) 。 不同的数据库有着不同的 DSN 格式。 -请参考 [PHP manual](https://www.php.net/manual/en/pdo.construct.php) 来获得更多细节。下面是一些例子: +请参考 [PHP manual](https://www.php.net/manual/zh/pdo.construct.php) 来获得更多细节。下面是一些例子: * MySQL, MariaDB: `mysql:host=localhost;dbname=mydatabase` * SQLite: `sqlite:/path/to/database/file` @@ -184,7 +184,7 @@ $post = Yii::$app->db->createCommand('SELECT * FROM post WHERE id=:id AND status ->queryOne(); ``` -绑定参数是通过 [预处理语句](https://www.php.net/manual/en/mysqli.quickstart.prepared-statements.php) 实现的。 +绑定参数是通过 [预处理语句](https://www.php.net/manual/zh/mysqli.quickstart.prepared-statements.php) 实现的。 除了防止 SQL 注入攻击,它也可以通过一次预处理 SQL 语句, 使用不同参数多次执行,来提升性能。例如: @@ -269,7 +269,7 @@ Yii::$app->db->createCommand()->batchInsert('user', ['name', 'age'], [ ```php Yii::$app->db->createCommand()->upsert('pages', [ 'name' => 'Front page', - 'url' => 'http://example.com/', // url is unique + 'url' => 'https://example.com/', // url is unique 'visits' => 0, ], [ 'visits' => new \yii\db\Expression('visits + 1'), @@ -421,7 +421,7 @@ Yii 为四个最常用的隔离级别提供了常量: 因此,你不能在开启事务时直接指定隔离级别。 你必须在事务开始后再调用 [[yii\db\Transaction::setIsolationLevel()]]。 -[隔离级别]: https://en.wikipedia.org/wiki/Isolation_%28database_systems%29#Isolation_levels +[隔离级别]: https://zh.wikipedia.org/wiki/%E4%BA%8B%E5%8B%99%E9%9A%94%E9%9B%A2#.E9.9A.94.E7.A6.BB.E7.BA.A7.E5.88.AB ### 嵌套事务(Nesting Transactions) diff --git a/docs/guide-zh-CN/db-migrations.md b/docs/guide-zh-CN/db-migrations.md index c9b47e10027..fef46add643 100644 --- a/docs/guide-zh-CN/db-migrations.md +++ b/docs/guide-zh-CN/db-migrations.md @@ -669,7 +669,7 @@ class m150101_185401_create_news_table extends Migration 我们首先删除那一行数据,然后才删除那张表。 > Note: 并不是所有的数据库都支持事务。有些数据库查询也是不能被放到事务里面的。 - 在 [implicit commit](http://dev.mysql.com/doc/refman/5.7/en/implicit-commit.html) 章节当中有相关的例子可以参考。 + 在 [implicit commit](https://dev.mysql.com/doc/refman/5.7/en/implicit-commit.html) 章节当中有相关的例子可以参考。 如果遇到这种情况的话,那么你应该使用 `up()` 和 `down()` 方法进行替代。 diff --git a/docs/guide-zh-CN/db-query-builder.md b/docs/guide-zh-CN/db-query-builder.md index 53ac0f56c9b..fae680ef5e8 100644 --- a/docs/guide-zh-CN/db-query-builder.md +++ b/docs/guide-zh-CN/db-query-builder.md @@ -297,7 +297,7 @@ $query->where([$column => $value]); 当使用转义映射(又或者没有提供第三个操作数的时候),第二个操作数的值的前后 将会被加上百分号。 -> Note: 当使用 PostgreSQL 的时候你还可以使用 [`ilike`](http://www.postgresql.org/docs/8.3/static/functions-matching.html#FUNCTIONS-LIKE), +> Note: 当使用 PostgreSQL 的时候你还可以使用 [`ilike`](https://www.postgresql.org/docs/8.3/functions-matching.html#FUNCTIONS-LIKE), > 该方法对大小写不敏感。 - `or like`:用法和 `like` 操作符类似,区别在于当第二个操作数为数组时, @@ -771,7 +771,7 @@ foreach ($query->each() as $username => $user) { #### MySQL中批量查询的局限性(Limitations of batch query in MySQL) -MySQL 是通过 PDO 驱动库实现批量查询的。默认情况下,MySQL 查询是 [`带缓存的`](https://www.php.net/manual/en/mysqlinfo.concepts.buffering.php), +MySQL 是通过 PDO 驱动库实现批量查询的。默认情况下,MySQL 查询是 [`带缓存的`](https://www.php.net/manual/zh/mysqlinfo.concepts.buffering.php), 这违背了使用游标(cursor)获取数据的目的, 因为它不阻止驱动程序将整个结果集加载到客户端的内存中。 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 664d9523f28..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 原生方法的封装: @@ -349,7 +349,7 @@ Gives you generates ``` @@ -399,7 +399,7 @@ generates generates -My logo +My logo ``` 除了 [aliases](concept-aliases.md) 之外,第一个参数可以接受 路由,查询,URLs。同 [Url::to()](helper-url.md) 一样。 diff --git a/docs/guide-zh-CN/helper-url.md b/docs/guide-zh-CN/helper-url.md index 42d01bee2a5..8353a7715f6 100644 --- a/docs/guide-zh-CN/helper-url.md +++ b/docs/guide-zh-CN/helper-url.md @@ -78,7 +78,7 @@ echo Url::toRoute(['site/index', 'src' => 'ref1', '#' => 'name']); // /index.php?r=post/edit&id=100     假设别名 "@postEdit" 被定义为 "post/edit" echo Url::toRoute(['@postEdit', 'id' => 100]); -// http://www.example.com/index.php?r=site/index +// https://www.example.com/index.php?r=site/index echo Url::toRoute('site/index', true); // https://www.example.com/index.php?r=site/index @@ -123,7 +123,7 @@ echo Url::to('@web/images/logo.gif'); // images/logo.gif echo Url::to('images/logo.gif'); -// http://www.example.com/images/logo.gif +// https://www.example.com/images/logo.gif echo Url::to('@web/images/logo.gif', true); // https://www.example.com/images/logo.gif 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/input-forms.md b/docs/guide-zh-CN/input-forms.md index 62314c95b2f..b4e640cbd17 100644 --- a/docs/guide-zh-CN/input-forms.md +++ b/docs/guide-zh-CN/input-forms.md @@ -242,7 +242,7 @@ Pjax::end(); 这意味着对 ajax 或使用 [[yii\widgets\Pjax|Pjax]] 小部件的文件和提交按钮值的唯一官方支持取决于 `FormData` 类的 -[浏览器支持](https://developer.mozilla.org/en-US/docs/Web/API/FormData#Browser_compatibility)。 +[浏览器支持](https://developer.mozilla.org/zh-CN/docs/Web/API/FormData#%E6%B5%8F%E8%A7%88%E5%99%A8%E5%85%BC%E5%AE%B9%E6%80%A7)。 延伸阅读 --------------- diff --git a/docs/guide-zh-CN/input-validation.md b/docs/guide-zh-CN/input-validation.md index 9940f328b99..ed17fff6be4 100644 --- a/docs/guide-zh-CN/input-validation.md +++ b/docs/guide-zh-CN/input-validation.md @@ -744,7 +744,7 @@ JS; ### Deferred 验证 -如果你需要执行异步客户端验证,你可以创建 [Deferred objects](http://api.jquery.com/category/deferred-object/)。 +如果你需要执行异步客户端验证,你可以创建 [Deferred objects](https://api.jquery.com/category/deferred-object/)。 比如要执行一段自定义的 AJAX 验证,可以使用下面的代码: ```php diff --git a/docs/guide-zh-CN/intro-yii.md b/docs/guide-zh-CN/intro-yii.md index 990f13b2010..d03e5ad9a14 100644 --- a/docs/guide-zh-CN/intro-yii.md +++ b/docs/guide-zh-CN/intro-yii.md @@ -54,7 +54,7 @@ Yii 2.0 需要 PHP 5.4.0 或以上版本支持。你可以通过运行任何 Yii 发行包中附带的系统要求检查器查看每个具体特性所需的 PHP 配置。 使用 Yii 需要对面向对象编程(OOP)有基本了解,因为 Yii 是一个纯面向对象的框架。Yii 2.0 还使用了 PHP 的最新特性, -例如[命名空间](https://www.php.net/manual/en/language.namespaces.php) -和[Trait(特质)](https://www.php.net/manual/en/language.oop5.traits.php)。 +例如[命名空间](https://www.php.net/manual/zh/language.namespaces.php) +和[Trait(特质)](https://www.php.net/manual/zh/language.oop5.traits.php)。 理解这些概念将有助于你更快地掌握 Yii 2.0。 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 d27841da950..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](http://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`。 @@ -85,8 +85,8 @@ return [ 你可以对他们进行一些自己的配置,只需在配置文件里配置 [[yii\i18n\Formatter::dateFormat|dateFormat]], [[yii\i18n\Formatter::timeFormat|timeFormat]], 和 [[yii\i18n\Formatter::datetimeFormat|datetimeFormat]] 即可。 -同时,你还可以配置它使用 [ICU syntax](http://userguide.icu-project.org/formatparse/datetime), -同时你也可以配置它使用 [PHP date() 语法](https://www.php.net/manual/en/function.date.php),只需要加上 `php:` 前缀即可。 +同时,你还可以配置它使用 [ICU syntax](https://unicode-org.github.io/icu/userguide/format_parse/datetime/), +同时你也可以配置它使用 [PHP date() 语法](https://www.php.net/manual/zh/function.date.php),只需要加上 `php:` 前缀即可。 例如, ```php @@ -150,7 +150,7 @@ echo Yii::$app->formatter->asTime('2014-10-06 14:41:00 CEST'); // 14:41:00 > 不同的政府和地区政策决定不同的时区, > 你在你的时区数据库中可能拿不到最新的数据。 -> 这时你可以戳 [ICU manual](http://userguide.icu-project.org/datetime/timezone#TOC-Updating-the-Time-Zone-Data) 来查看如何更新时区。 +> 这时你可以戳 [ICU manual](https://unicode-org.github.io/icu/userguide/datetime/timezone/#updating-the-time-zone-data) 来查看如何更新时区。 > 同时,这篇也可以作为参考 [Setting up your PHP environment for internationalization](tutorial-i18n.md#setup-environment)。 @@ -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 1b46c062ccb..d630b051380 100644 --- a/docs/guide-zh-CN/rest-authentication.md +++ b/docs/guide-zh-CN/rest-authentication.md @@ -10,14 +10,14 @@ 下面有几种方式来发送 access token: -* [HTTP 基本认证](http://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 请求参数发送,例如 `https://example.com/users?access-token=xxxxxxxx`, 由于大多数服务器都会保存请求参数到日志, 这种方式应主要用于`JSONP` 请求,因为它不能使用HTTP头来发送access token -* [OAuth 2](http://oauth.net/2/):使用者从认证服务器上获取基于 OAuth2 协议的 access token, +* [OAuth 2](https://oauth.net/2/):使用者从认证服务器上获取基于 OAuth2 协议的 access token, 然后通过 [HTTP Bearer Tokens](https://datatracker.ietf.org/doc/html/rfc6750) 发送到 API 服务器。 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 dd611b9e7e1..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](http://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 e5a9876f037..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](http://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/rest-versioning.md b/docs/guide-zh-CN/rest-versioning.md index a2e3ce631a1..d98b4bc24d1 100644 --- a/docs/guide-zh-CN/rest-versioning.md +++ b/docs/guide-zh-CN/rest-versioning.md @@ -5,11 +5,11 @@ 代码,APIs 是为了给超出控制的客户端使用。因此, 应该尽可能的保持向后兼容性,如果有一些变化不能向后兼容,你应该在新版本的 API 中采用它同时增加版本号。现有客户端可以继续使用旧版本的 API;新的或升级的客户端可以在新的 API 版本中获得新的功能。 -> Tip: 可以参考 [Semantic Versioning](http://semver.org/) +> Tip: 可以参考 [Semantic Versioning](https://semver.org/) 来获取更多关于设计 API 版本号的信息 关于如何实现 API 版本,一个常见的做法是在 API 的 URL 中嵌入版本号。例如, -`http://example.com/v1/users` 代表 `/users` 版本 1 的 API。 +`https://example.com/v1/users` 代表 `/users` 版本 1 的 API。 另一种 API 版本化的方法, 最近用的非常多的是把版本号放入 HTTP 请求头,通常是通过 `Accept` 头,如下: @@ -90,8 +90,8 @@ return [ ]; ``` -因此,`http://example.com/v1/users` 将返回版本 1 的用户列表, -而 `http://example.com/v2/users` 将返回版本 2 的用户。 +因此,`https://example.com/v1/users` 将返回版本 1 的用户列表, +而 `https://example.com/v2/users` 将返回版本 2 的用户。 使用模块, 将不同版本的代码隔离。 通过共用基类和其他类 跨模块重用代码也是有可能的。 diff --git a/docs/guide-zh-CN/runtime-requests.md b/docs/guide-zh-CN/runtime-requests.md index 2be3998abf4..71ae2ce4707 100644 --- a/docs/guide-zh-CN/runtime-requests.md +++ b/docs/guide-zh-CN/runtime-requests.md @@ -76,13 +76,13 @@ if ($request->isPut) { /* 请求方法是 PUT */ } `request` 组件提供了许多方式来检测当前请求的 URL。 -假设被请求的 URL 是 `http://example.com/admin/index.php/product?id=100`, +假设被请求的 URL 是 `https://example.com/admin/index.php/product?id=100`, 你可以像下面描述的那样获取 URL 的各个部分: * [[yii\web\Request::url|url]]:返回 `/admin/index.php/product?id=100`, 此 URL 不包括主机信息部分。 -* [[yii\web\Request::absoluteUrl|absoluteUrl]]:返回 `http://example.com/admin/index.php/product?id=100`, +* [[yii\web\Request::absoluteUrl|absoluteUrl]]:返回 `https://example.com/admin/index.php/product?id=100`, 包含host infode的整个URL。 -* [[yii\web\Request::hostInfo|hostInfo]]:返回 `http://example.com`, 只有主机信息部分。 +* [[yii\web\Request::hostInfo|hostInfo]]:返回 `https://example.com`, 只有主机信息部分。 * [[yii\web\Request::pathInfo|pathInfo]]:返回 `/product`, 这个是入口脚本之后,问号之前(查询字符串)的部分。 * [[yii\web\Request::queryString|queryString]]:返回 `id=100`,问号之后的部分。 diff --git a/docs/guide-zh-CN/runtime-responses.md b/docs/guide-zh-CN/runtime-responses.md index 70bf28f1cb3..ca0b2c225c8 100644 --- a/docs/guide-zh-CN/runtime-responses.md +++ b/docs/guide-zh-CN/runtime-responses.md @@ -169,7 +169,7 @@ Yii提供对它提供了特别的支持。 ```php public function actionOld() { - return $this->redirect('http://example.com/new', 301); + return $this->redirect('https://example.com/new', 301); } ``` @@ -180,7 +180,7 @@ public function actionOld() [[yii\web\Response::send()]] 方法来确保没有其他内容追加到响应中。 ```php -\Yii::$app->response->redirect('http://example.com/new', 301)->send(); +\Yii::$app->response->redirect('https://example.com/new', 301)->send(); ``` > Info: [[yii\web\Response::redirect()]] 方法默认会设置响应状态码为 302,该状态码会告诉浏览器请求的资源 diff --git a/docs/guide-zh-CN/runtime-routing.md b/docs/guide-zh-CN/runtime-routing.md index f1f2d1a2c9b..dffb2fa457e 100644 --- a/docs/guide-zh-CN/runtime-routing.md +++ b/docs/guide-zh-CN/runtime-routing.md @@ -156,7 +156,7 @@ echo Url::to(['post/view', 'id' => 100]); // 创建一个带锚定的URL:/index.php?r=post%2Fview&id=100#content echo Url::to(['post/view', 'id' => 100, '#' => 'content']); -// 创建一个绝对路径URL:http://www.example.com/index.php?r=post%2Findex +// 创建一个绝对路径URL:https://www.example.com/index.php?r=post%2Findex echo Url::to(['post/index'], true); // 创建一个带https协议的绝对路径URL:https://www.example.com/index.php?r=post%2Findex @@ -214,11 +214,11 @@ use yii\helpers\Url; // 当前请求URL:/index.php?r=admin%2Fpost%2Findex echo Url::to(); -// 设定了别名的URL:http://example.com -Yii::setAlias('@example', 'http://example.com/'); +// 设定了别名的URL:https://example.com +Yii::setAlias('@example', 'https://example.com/'); echo Url::to('@example'); -// 绝对URL:http://example.com/images/logo.gif +// 绝对URL:https://example.com/images/logo.gif echo Url::to('/images/logo.gif', true); ``` @@ -442,18 +442,18 @@ echo Url::previous(); ### 带服务名称的规则 可以在URL规则中设置Web服务的名称,如果你需要使你的应用程序在不同的Web服务名称下表现不同的话。 -例如,下面的规则将URL`http://admin.example.com/login`解析成路由`admin/user/login`, -URL`http://www.example.com/login`解析成路由`site/login`。 +例如,下面的规则将URL`https://admin.example.com/login`解析成路由`admin/user/login`, +URL`https://www.example.com/login`解析成路由`site/login`。 ```php [ - 'http://admin.example.com/login' => 'admin/user/login', - 'http://www.example.com/login' => 'site/login', + 'https://admin.example.com/login' => 'admin/user/login', + 'https://www.example.com/login' => 'site/login', ] ``` 你还可以在服务名称中嵌入参数用来动态的提取服务名称。例如,下面的规则 -将URL`http://en.example.com/posts`解析成路由`post/index`且参数`language=en`。 +将URL`https://en.example.com/posts`解析成路由`post/index`且参数`language=en`。 ```php [ @@ -464,8 +464,8 @@ URL`http://www.example.com/login`解析成路由`site/login`。 从版本 2.0.11 开始,你还可以使用不带协议类型的模式来同时匹配 `http` 和 `https`。 规则语法和上面相比只是忽略掉 `http:` 部分,例如:`'//www.example.com/login' => 'site/login'`。 -> Note: 带服务名称的规则**不应该**包含任何子目录。例如,如果程序入口脚本在 `http://www.example.com/sandbox/blog/index.php`, - 应该使用 `http://www.example.com/posts` 代替 `http://www.example.com/sandbox/blog/posts`。 +> Note: 带服务名称的规则**不应该**包含任何子目录。例如,如果程序入口脚本在 `https://www.example.com/sandbox/blog/index.php`, + 应该使用 `https://www.example.com/posts` 代替 `https://www.example.com/sandbox/blog/posts`。 这样才可以将你的应用部署到任何目录而不需要更改 URL 规则。Yii 将会自动的检测应用程序所在的根目录。 @@ -631,10 +631,10 @@ class CarUrlRule extends BaseObject implements UrlRuleInterface ## URL规范化 从 2.0.10 版开始[[yii\web\UrlManager|Url管理器]]可以配置用[[yii\web\UrlNormalizer|URL规范器]]来处理 -相同URL的不同格式,例如是否带结束斜线。因为技术上来说 `http://example.com/path` -和 `http://example.com/path/` 是完全不同的 URL,两个地址返回相同的内容会导致SEO排名降低。 +相同URL的不同格式,例如是否带结束斜线。因为技术上来说 `https://example.com/path` +和 `https://example.com/path/` 是完全不同的 URL,两个地址返回相同的内容会导致SEO排名降低。 默认情况下 URL 规范器会合并连续的斜线,根据配置决定是否添加或删除结尾斜线, -并且会使用[永久重定向](https://en.wikipedia.org/wiki/HTTP_301)将地址重新跳转到规范化后的URL。 +并且会使用[永久重定向](https://zh.wikipedia.org/wiki/HTTP_301)将地址重新跳转到规范化后的URL。 URL规范器可以针对URL管理器全局配置,也可以针对规则单独配置 - 默认每个规则都使用URL管理器中的规范器。 你可以针对特定的URL规则设置 [[yii\web\UrlRule::$normalizer|UrlRule::$normalizer]] 为 `false` 来关闭规范化。 diff --git a/docs/guide-zh-CN/security-authorization.md b/docs/guide-zh-CN/security-authorization.md index 3fa0e302826..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](http://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 3864ef9efe2..89ef2118274 100644 --- a/docs/guide-zh-CN/security-best-practices.md +++ b/docs/guide-zh-CN/security-best-practices.md @@ -161,14 +161,14 @@ CSRF 是跨站请求伪造的缩写。这个攻击思想源自许多应用程序 而事实并非如此。 例如,网站 `an.example.com` 有一个 `/logout` 网址,当使用简单的 GET 请求访问时, 记录用户退出。 -只要用户的请求一切正常,但是有一天坏人们故意在用户经常访问的论坛上放上 ``。 +只要用户的请求一切正常,但是有一天坏人们故意在用户经常访问的论坛上放上 ``。 浏览器在请求图像或请求页面之间没有任何区别, 所以当用户打开一个带有这样一个被操作过的 `` 标签的页面时, 浏览器将 GET 请求发送到该 URL,用户将从 `an.example.com` 注销。 这是 CSRF 攻击如何运作的基本思路。可以说用户退出并不是一件严重的事情, 然而这仅仅是一个例子,使用这种方法可以做更多的事情,例如触发付款或者是改变数据。 -想象一下如果某个网站有一个这样的 `http://an.example.com/purse/transfer?to=anotherUser&amount=2000` 网址。 +想象一下如果某个网站有一个这样的 `https://an.example.com/purse/transfer?to=anotherUser&amount=2000` 网址。 使用 GET 请求访问它会导致从授权用户账户转账 $2000 给 `anotherUser`。 我们知道,浏览器将始终发送 GET 请求来加载图像, 所以我们可以修改代码以仅接受该 URL 上的 POST 请求。 @@ -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。可以通过设置其属性来实现: @@ -321,7 +321,7 @@ Yii 提供依赖 cookie 和/或 PHP 会话的功能。如果您的连接受到 有关于服务器配置的更多信息,请参阅您的 web 服务器的文档: -- Apache 2: +- Apache 2: - Nginx: 如果您无权访问服务器配置,您可以在应用程序级别设置 [[yii\filters\HostControl]] 过滤器, 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/start-databases.md b/docs/guide-zh-CN/start-databases.md index 435fd8494d0..765b67bdd4d 100644 --- a/docs/guide-zh-CN/start-databases.md +++ b/docs/guide-zh-CN/start-databases.md @@ -51,7 +51,7 @@ INSERT INTO `country` VALUES ('US','United States',278357000); 配置数据库连接 --------------------------- -开始之前,请确保你已经安装了 PHP [PDO](https://www.php.net/manual/en/book.pdo.php) +开始之前,请确保你已经安装了 PHP [PDO](https://www.php.net/manual/zh/book.pdo.php) 扩展和你所使用的数据库的 PDO 驱动(例如 MySQL 的 `pdo_mysql`)。 对于使用关系型数据库来讲,这是基本要求。 @@ -228,7 +228,7 @@ use yii\widgets\LinkPager; 浏览器访问下面的 URL 看看能否工作: ``` -http://hostname/index.php?r=country/index +https://hostname/index.php?r=country/index ``` ![国家列表](images/start-country-list.png) @@ -238,7 +238,7 @@ http://hostname/index.php?r=country/index 也就是第二页记录。如果观察仔细点你还会看到浏览器的 URL 变成了: ``` -http://hostname/index.php?r=country/index&page=2 +https://hostname/index.php?r=country/index&page=2 ``` 在这个场景里,[[yii\data\Pagination|Pagination]] 提供了为数据结果集分页的所有功能: diff --git a/docs/guide-zh-CN/start-forms.md b/docs/guide-zh-CN/start-forms.md index a1e5a4d3d99..ca00cda618d 100644 --- a/docs/guide-zh-CN/start-forms.md +++ b/docs/guide-zh-CN/start-forms.md @@ -187,7 +187,7 @@ use yii\widgets\ActiveForm; 用浏览器访问下面的 URL 看它能否工作: ``` -http://hostname/index.php?r=site/entry +https://hostname/index.php?r=site/entry ``` 你会看到一个包含两个输入框的表单的页面。每个输入框的前面都有一个标签指明应该输入的数据类型。 diff --git a/docs/guide-zh-CN/start-gii.md b/docs/guide-zh-CN/start-gii.md index 1412baaf56f..a3db480178e 100644 --- a/docs/guide-zh-CN/start-gii.md +++ b/docs/guide-zh-CN/start-gii.md @@ -42,7 +42,7 @@ defined('YII_ENV') or define('YII_ENV', 'dev'); 鉴于这行代码的定义,应用处于开发模式下,按照上面的配置会打开 Gii 模块。你可以直接通过 URL 访问 Gii: ``` -http://hostname/index.php?r=gii +https://hostname/index.php?r=gii ``` > Info: 如果你通过本机以外的机器访问 Gii,请求会被出于安全原因拒绝。 @@ -107,7 +107,7 @@ CRUD 代表增,查,改,删操作,这是绝大多数 Web 站点常用的 用浏览器访问下面的 URL 查看生成代码的运行: ``` -http://hostname/index.php?r=country/index +https://hostname/index.php?r=country/index ``` 可以看到一个栅格显示着从数据表中读取的国家数据。支持在列头对数据进行排序, diff --git a/docs/guide-zh-CN/start-hello.md b/docs/guide-zh-CN/start-hello.md index b60c95ad4e4..d0eaf13f541 100644 --- a/docs/guide-zh-CN/start-hello.md +++ b/docs/guide-zh-CN/start-hello.md @@ -102,7 +102,7 @@ use yii\helpers\Html; 创建完动作和视图后,你就可以通过下面的 URL 访问新页面了: ``` -http://hostname/index.php?r=site/say&message=Hello+World +https://hostname/index.php?r=site/say&message=Hello+World ``` ![Hello World](images/start-hello-world.png) diff --git a/docs/guide-zh-CN/start-installation.md b/docs/guide-zh-CN/start-installation.md index c505cfdf3a3..fb28db8133a 100644 --- a/docs/guide-zh-CN/start-installation.md +++ b/docs/guide-zh-CN/start-installation.md @@ -1,7 +1,7 @@ 安装 Yii ============== -你可以通过两种方式安装 Yii:使用 [Composer](http://getcomposer.org/) 或下载一个归档文件。 +你可以通过两种方式安装 Yii:使用 [Composer](https://getcomposer.org/) 或下载一个归档文件。 推荐使用前者,这样只需执行一条简单的命令就可以安装新的[扩展](structure-extensions.md)或更新 Yii 了。 标准安装完Yii之后,框架和一个项目模板两者都下载并安装好了。 @@ -114,7 +114,7 @@ composer create-project --prefer-dist yiisoft/yii2-app-basic basic 安装 Assets ----------- -Yii依靠 [Bower](http://bower.io/) 和/或 [NPM](https://www.npmjs.com/) 软件包来安装 asset(CSS 和 JavaScript)库。 +Yii依靠 [Bower](https://bower.io/) 和/或 [NPM](https://www.npmjs.com/) 软件包来安装 asset(CSS 和 JavaScript)库。 它使用Composer来获取这些库,允许 PHP 和 CSS/JavaScript 包版本同时解析。 这可以通过使用 [asset-packagist.org](https://asset-packagist.org) 或 [composer asset plugin](https://github.com/fxpio/composer-asset-plugin) 来实现。 有关更多详细信息,请参阅 [Assets 文档](structure-assets.md)。 @@ -139,7 +139,7 @@ Yii依靠 [Bower](http://bower.io/) 和/或 [NPM](https://www.npmjs.com/) 软件 ------------ 当安装完成之后, -或配置你的Web服务器(看下面的文章)或使用[内置Web Server](https://www.php.net/manual/en/features.commandline.webserver.php), +或配置你的Web服务器(看下面的文章)或使用[内置Web Server](https://www.php.net/manual/zh/features.commandline.webserver.php), 当在项目 `web` 目录下可以通过下面的命令: ```bash @@ -184,13 +184,13 @@ http://localhost:8080/ 本小节可以跳过。 通过上述方法安装的应用程序在 Windows,Max OS X, -Linux 中的 [Apache HTTP 服务器](http://httpd.apache.org/) -或 [Nginx HTTP 服务器](http://nginx.org/)且PHP版本为5.4或更高都可以直接运行。 -Yii 2.0 也兼容 Facebook 公司的 [HHVM](http://hhvm.com/), +Linux 中的 [Apache HTTP 服务器](https://httpd.apache.org/) +或 [Nginx HTTP 服务器](https://nginx.org/)且PHP版本为5.4或更高都可以直接运行。 +Yii 2.0 也兼容 Facebook 公司的 [HHVM](https://hhvm.com/), 由于 HHVM 和标准 PHP 在边界案例上有些地方略有不同,在使用 HHVM 时需稍作处理。 在生产环境的服务器上,你可能会想配置服务器让应用程序可以通过 -URL `http://www.example.com/index.php` 访问而不是 `http://www.example.com/basic/web/index.php`。 +URL `https://www.example.com/index.php` 访问而不是 `https://www.example.com/basic/web/index.php`。 这种配置需要将 Web 服务器的文档根目录(document root)指向 `basic/web` 目录。 可能你还会想隐藏掉 URL 中的 `index.php`,具体细节在 [URL 解析和生成](runtime-url-handling.md)一章中有介绍, 你将学到如何配置 Apache 或 Nginx 服务器实现这些目标。 @@ -234,7 +234,7 @@ DocumentRoot "path/to/basic/web" ### 推荐使用的 Nginx 配置 -为了使用 [Nginx](http://wiki.nginx.org/),你应该已经将 PHP 安装为 [FPM SAPI](https://www.php.net/install.fpm) 了。 +为了使用 [Nginx](https://www.nginx.com/resources/wiki/),你应该已经将 PHP 安装为 [FPM SAPI](https://www.php.net/manual/zh/install.fpm.php) 了。 你可以使用如下 Nginx 配置,将 `path/to/basic/web` 替换为实际的 `basic/web` 目录, `mysite.local` 替换为实际的主机名以提供服务。 diff --git a/docs/guide-zh-CN/start-workflow.md b/docs/guide-zh-CN/start-workflow.md index 2ba8d445c24..4c949212faa 100644 --- a/docs/guide-zh-CN/start-workflow.md +++ b/docs/guide-zh-CN/start-workflow.md @@ -2,13 +2,13 @@ ==================== 安装 Yii 后,就有了一个可运行的 Yii 应用, -根据配置的不同,可以通过 `http://hostname/basic/web/index.php` 或 `http://hostname/index.php` 访问。 +根据配置的不同,可以通过 `https://hostname/basic/web/index.php` 或 `https://hostname/index.php` 访问。 本章节将介绍应用的内建功能,如何组织代码, 以及一般情况下应用如何处理请求。 > Info: 为简单起见,在整个“入门”板块都假定你已经把 `basic/web` 设为 Web 服务器根目录并配置完毕, - 你访问应用的地址会是 `http://hostname/index.php` 或类似的。 + 你访问应用的地址会是 `https://hostname/index.php` 或类似的。 请按需调整 URL。 注意项目模板和框架完全不同,安装完之后全都归你了。你可以根据你的需要自由的添加或删除代码和 @@ -20,7 +20,7 @@ 一个安装完的基本应用包含四页: -* 主页,当你访问 `http://hostname/index.php` 时显示, +* 主页,当你访问 `https://hostname/index.php` 时显示, * “About”页, * “Contact”页, 显示一个联系表单,允许终端用户通过 Email 联系你, * “Login”页, 显示一个登录表单,用来验证终端用户。试着用“admin/admin”登录, @@ -42,7 +42,7 @@ 应用中最重要的目录和文件(假设应用根目录是 `basic`): -```js +``` basic/ 应用根目录 composer.json Composer 配置文件, 描述包信息 config/ 包含应用配置及其它配置 @@ -63,7 +63,7 @@ basic/ 应用根目录 一般来说,应用中的文件可被分为两类:在 `basic/web` 下的和在其它目录下的。 前者可以直接通过 HTTP 访问(例如浏览器),后者不能也不应该被直接访问。 -Yii 实现了[模型-视图-控制器 (MVC)](http://wikipedia.org/wiki/Model-view-controller)设计模式,这点在上述目录结构中也得以体现。 +Yii 实现了[模型-视图-控制器 (MVC)](https://wikipedia.org/wiki/Model-view-controller)设计模式,这点在上述目录结构中也得以体现。 `models` 目录包含了所有[模型类](structure-models.md), `views` 目录包含了所有[视图脚本](structure-views.md), `controllers` 目录包含了所有[控制器类](structure-controllers.md)。 diff --git a/docs/guide-zh-CN/structure-applications.md b/docs/guide-zh-CN/structure-applications.md index 3fa407b4535..a4e69c582c0 100644 --- a/docs/guide-zh-CN/structure-applications.md +++ b/docs/guide-zh-CN/structure-applications.md @@ -275,7 +275,7 @@ Yii 遵循一个默认的 [规则](#controllerNamespace) 指定控制器 ID 到 例如 [[yii\jui\DatePicker]] 小部件会根据该属性 展示对应语言的日历以及日期格式。 -推荐遵循 [IETF language tag](http://en.wikipedia.org/wiki/IETF_language_tag) 来设置语言, +推荐遵循 [IETF language tag](https://zh.wikipedia.org/wiki/IETF%E8%AA%9E%E8%A8%80%E6%A8%99%E7%B1%A4) 来设置语言, 例如 `en` 代表英文, `en-US` 代表英文(美国). 该属性的更多信息可参考 [国际化](tutorial-i18n.md) 一节. @@ -347,7 +347,7 @@ $width = \Yii::$app->params['thumbnail.size'][0]; 如果应用不是英文请修改该属性。 和 [语言](#language) 属性类似,配置该属性需遵循 -[IETF language tag](http://en.wikipedia.org/wiki/IETF_language_tag). +[IETF language tag](https://zh.wikipedia.org/wiki/IETF%E8%AA%9E%E8%A8%80%E6%A8%99%E7%B1%A4). 例如 `en` 代表英文, `en-US` 代表英文(美国)。 该属性的更多信息可参考 [国际化](tutorial-i18n.md) 一节. @@ -356,7 +356,7 @@ $width = \Yii::$app->params['thumbnail.size'][0]; #### [[yii\base\Application::timeZone|timeZone]] 该属性提供一种方式修改 PHP 运行环境中的默认时区,配置该属性本质上就是调用 PHP 函数 -[date_default_timezone_set()](https://www.php.net/manual/en/function.date-default-timezone-set.php), +[date_default_timezone_set()](https://www.php.net/manual/zh/function.date-default-timezone-set.php), 例如: ```php diff --git a/docs/guide-zh-CN/structure-assets.md b/docs/guide-zh-CN/structure-assets.md index e7bf7e091be..21f025574ab 100644 --- a/docs/guide-zh-CN/structure-assets.md +++ b/docs/guide-zh-CN/structure-assets.md @@ -79,7 +79,7 @@ class AppAsset extends AssetBundle [[yii\web\AssetManager::basePath]],文件实际的 URL 在该路径前加上 [[yii\web\AssetManager::baseUrl]]。 - 绝对 URL 地址表示为外部 JavaScript 文件,如 - `http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js` 或 + `https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js` 或 `//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js`。 * [[yii\web\AssetBundle::depends|depends]]:一个列出该资源包依赖的 其他资源包(后两节有详细介绍)。 @@ -207,7 +207,7 @@ class FontAwesomeAsset extends AssetBundle ### Bower 和 NPM 资源安装 -大多数 JavaScript/CSS 包使用 [Bower](http://bower.io/) 或 [NPM](https://www.npmjs.com/) 来管理。 +大多数 JavaScript/CSS 包使用 [Bower](https://bower.io/) 或 [NPM](https://www.npmjs.com/) 来管理。 在 PHP 中,我们用 Composer 来管理 PHP 依赖。像 PHP 包一样, 也可以使用 `composer.json` 管理 Bower 和 NPM 包。 @@ -459,10 +459,10 @@ return [ 'assetManager' => [ 'bundles' => [ 'app\assets\LanguageAssetBundle' => [ - 'baseUrl' => 'http://some.cdn.com/files/i18n/en' // 这行代码不起作用! + 'baseUrl' => 'https://some.cdn.com/files/i18n/en' // 这行代码不起作用! ], 'app\assets\LargeFileAssetBundle' => [ - 'baseUrl' => 'http://some.cdn.com/files/large-files' // 这行代码不起作用! + 'baseUrl' => 'https://some.cdn.com/files/large-files' // 这行代码不起作用! ], ], ], @@ -577,8 +577,8 @@ Yii框架定义许多资源包,如下资源包是最常用, ## 资源转换 除了直接编写 CSS 或 JavaScript 代码,开发人员经常使用扩展语法来编写,再使用特殊的工具将它们转换成 CSS/JavaScript。 -例如,对于 CSS 代码可使用 [LESS](http://lesscss.org/) 或 [SCSS](http://sass-lang.com/), -对于 JavaScript 可使用 [TypeScript](http://www.typescriptlang.org/)。 +例如,对于 CSS 代码可使用 [LESS](https://lesscss.org/) 或 [SCSS](https://sass-lang.com/), +对于 JavaScript 可使用 [TypeScript](https://www.typescriptlang.org/)。 可将使用扩展语法的资源文件列到资源包的 [[yii\web\AssetBundle::css|css]] 和 [[yii\web\AssetBundle::js|js]] 中,如下所示: @@ -642,7 +642,7 @@ return [ 命令中的标记 `{from}` 和 `{to}` 会分别被源资源文件路径和目标资源文件路径替代。 > Info: 除了以上方式,也有其他的方式来处理扩展语法资源, - 例如,可使用编译工具如[grunt](http://gruntjs.com/) + 例如,可使用编译工具如[grunt](https://gruntjs.com/) 来监控并自动转换扩展语法资源,此时, 应使用资源包中编译后的CSS/JavaScript文件而不是原始文件。 @@ -838,7 +838,7 @@ yii asset assets.php config/assets-prod.php > Info: 使用 `asset` 命令并不是合并和压缩资源的唯一方法。 - 你也可以使用能够自动运行设定任务的项目构建工具 [grunt](http://gruntjs.com/) 来实现同样的目的。 + 你也可以使用能够自动运行设定任务的项目构建工具 [grunt](https://gruntjs.com/) 来实现同样的目的。 ### 资源包分组 diff --git a/docs/guide-zh-CN/structure-controllers.md b/docs/guide-zh-CN/structure-controllers.md index 93728320d80..355cbb2bb19 100644 --- a/docs/guide-zh-CN/structure-controllers.md +++ b/docs/guide-zh-CN/structure-controllers.md @@ -1,7 +1,7 @@ 控制器 =========== -控制器是 [MVC](http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller) 模式中的一部分, +控制器是 [MVC](https://zh.wikipedia.org/wiki/MVC) 模式中的一部分, 是继承[[yii\base\Controller]]类的对象,负责处理请求和生成响应。 具体来说,控制器从[应用主体](structure-applications.md) 接管控制后会分析请求数据并传送到[模型](structure-models.md), @@ -83,7 +83,7 @@ ControllerID/ActionID ModuleID/ControllerID/ActionID ``` -如果用户的请求地址为 `http://hostname/index.php?r=site/index`, +如果用户的请求地址为 `https://hostname/index.php?r=site/index`, 会执行`site` 控制器的`index` 操作。 更多关于处理路由的详情请参阅 [路由](runtime-routing.md) 一节。 @@ -179,7 +179,7 @@ class SiteController extends Controller 每个应用有一个由[[yii\base\Application::defaultRoute]]属性指定的默认控制器; 当请求没有指定 [路由](#ids-routes),该属性值作为路由使用。 对于[[yii\web\Application|Web applications]]网页应用,它的值为 `'site'`,对于 [[yii\console\Application|console applications]] -控制台应用,它的值为 `help`,所以URL为 `http://hostname/index.php` 表示由 `site` 控制器来处理。 +控制台应用,它的值为 `help`,所以URL为 `https://hostname/index.php` 表示由 `site` 控制器来处理。 可以在 [应用配置](structure-applications.md#application-configurations) 中修改默认控制器,如下所示: @@ -323,8 +323,8 @@ class HelloWorldAction extends Action ```php public function actionForward() { - // 用户浏览器跳转到 http://example.com - return $this->redirect('http://example.com'); + // 用户浏览器跳转到 https://example.com + return $this->redirect('https://example.com'); } ``` @@ -354,13 +354,13 @@ class PostController extends Controller 动作参数会被不同的参数填入,如下所示: -* `http://hostname/index.php?r=post/view&id=123`: `$id` 会填入`'123'`, +* `https://hostname/index.php?r=post/view&id=123`: `$id` 会填入`'123'`, `$version` 仍为 null 空因为没有`version`请求参数; -* `http://hostname/index.php?r=post/view&id=123&version=2`: +* `https://hostname/index.php?r=post/view&id=123&version=2`: $id` 和 `$version` 分别填入 `'123'` 和 `'2'`; -* `http://hostname/index.php?r=post/view`: 会抛出[[yii\web\BadRequestHttpException]] 异常 +* `https://hostname/index.php?r=post/view`: 会抛出[[yii\web\BadRequestHttpException]] 异常 因为请求没有提供参数给必须赋值参数`$id`; -* `http://hostname/index.php?r=post/view&id[]=123`: 会抛出[[yii\web\BadRequestHttpException]] 异常 +* `https://hostname/index.php?r=post/view&id[]=123`: 会抛出[[yii\web\BadRequestHttpException]] 异常 因为 `$id` 参数收到数组值 `['123']` 而不是字符串. 如果你想要一个动作参数来接受数组值,你应该使用 `array` 来提示它,如下所示: @@ -372,8 +372,8 @@ public function actionView(array $id, $version = null) } ``` -现在如果请求为 `http://hostname/index.php?r=post/view&id[]=123`, 参数 `$id` 会使用数组值 `['123']`, -如果请求为 `http://hostname/index.php?r=post/view&id=123`, +现在如果请求为 `https://hostname/index.php?r=post/view&id[]=123`, 参数 `$id` 会使用数组值 `['123']`, +如果请求为 `https://hostname/index.php?r=post/view&id=123`, 参数 `$id` 会获取相同数组值,因为无类型的 `'123'` 会自动转成数组。 上述例子主要描述网页应用的操作参数,对于控制台应用, diff --git a/docs/guide-zh-CN/structure-entry-scripts.md b/docs/guide-zh-CN/structure-entry-scripts.md index d89c98809c4..992a81e3452 100644 --- a/docs/guide-zh-CN/structure-entry-scripts.md +++ b/docs/guide-zh-CN/structure-entry-scripts.md @@ -16,7 +16,7 @@ Web 应用的入口脚本必须放在终端用户能够访问的目录下, 入口脚本主要完成以下工作: * 定义全局常量; -* 注册 [Composer 自动加载器](http://getcomposer.org/doc/01-basic-usage.md#autoloading); +* 注册 [Composer 自动加载器](https://getcomposer.org/doc/01-basic-usage.md#autoloading); * 包含 [[Yii]] 类文件; * 加载应用配置; * 创建一个[应用](structure-applications.md)实例并配置; diff --git a/docs/guide-zh-CN/structure-extensions.md b/docs/guide-zh-CN/structure-extensions.md index f80e6466c00..aefc711f4de 100644 --- a/docs/guide-zh-CN/structure-extensions.md +++ b/docs/guide-zh-CN/structure-extensions.md @@ -435,7 +435,7 @@ Yii 提供了下列核心扩展,由 Yii 开发团队开发和维护。这些 提供了对 [Sphinx](https://sphinxsearch.com) 的使用支持。它包含基本的 查询、活动记录、代码生成等特性。 - [yiisoft/yii2-swiftmailer](https://github.com/yiisoft/yii2-swiftmailer): - 提供了基于 [swiftmailer](http://swiftmailer.org/) 的邮件发送功能。 + 提供了基于 [swiftmailer](https://swiftmailer.symfony.com/) 的邮件发送功能。 - [yiisoft/yii2-twig](https://github.com/yiisoft/yii2-twig): 提供了一个基于 [Twig](https://twig.symfony.com/) 的模板引擎。 diff --git a/docs/guide-zh-CN/structure-filters.md b/docs/guide-zh-CN/structure-filters.md index 58ed3a58727..fadf136a4ff 100644 --- a/docs/guide-zh-CN/structure-filters.md +++ b/docs/guide-zh-CN/structure-filters.md @@ -141,8 +141,8 @@ public function behaviors() ### 认证方法过滤器 -认证方法过滤器通过 [HTTP Basic Auth](http://en.wikipedia.org/wiki/Basic_access_authentication) -或 [OAuth 2](http://oauth.net/2/) +认证方法过滤器通过 [HTTP Basic Auth](https://zh.wikipedia.org/wiki/HTTP%E5%9F%BA%E6%9C%AC%E8%AE%A4%E8%AF%81) +或 [OAuth 2](https://oauth.net/2/) 来认证一个用户,认证方法过滤器类在 `yii\filters\auth` 命名空间下。 如下示例表示可使用 [[yii\filters\auth\HttpBasicAuth]] 来认证一个用户, @@ -289,7 +289,7 @@ public function behaviors() ### [[yii\filters\RateLimiter|RateLimiter]] -RateLimiter 根据 [漏桶算法](http://en.wikipedia.org/wiki/Leaky_bucket) 来实现速率限制。 +RateLimiter 根据 [漏桶算法](https://en.wikipedia.org/wiki/Leaky_bucket) 来实现速率限制。 主要用在实现 RESTful APIs,更多关于该过滤器详情请参阅 [Rate Limiting](rest-rate-limiting.md) 一节。 @@ -322,7 +322,7 @@ public function behaviors() ### [[yii\filters\Cors|Cors]] -跨域资源共享 [CORS](https://developer.mozilla.org/fr/docs/HTTP/Access_control_CORS) +跨域资源共享 [CORS](https://developer.mozilla.org/zh-CN/docs/Web/HTTP/CORS) 机制允许一个网页的许多资源(例如字体、JavaScript等) 这些资源可以通过其他域名访问获取。 特别是 JavaScript 的 AJAX 调用可使用 XMLHttpRequest 机制, @@ -350,13 +350,13 @@ public function behaviors() CROS过滤器可以通过 [[yii\filters\Cors::$cors|$cors]] 属性进行调整。 -* `cors['Origin']`:定义允许来源的数组,可为 `['*']`(任何用户)或 `['http://www.myserver.net', 'http://www.myotherserver.com']`。 默认为 `['*']`。 +* `cors['Origin']`:定义允许来源的数组,可为 `['*']`(任何用户)或 `['https://www.myserver.net', 'https://www.myotherserver.com']`。 默认为 `['*']`。 * `cors['Access-Control-Request-Method']`:允许动作数组如 `['GET', 'OPTIONS', 'HEAD']`。默认为 `['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS']`。 * `cors['Access-Control-Request-Headers']`:允许请求头部数组,可为 `['*']` 所有类型头部 或 `['X-Request-With']` 指定类型头部。默认为 `['*']`。 * `cors['Access-Control-Allow-Credentials']`:定义当前请求是否使用证书,可为 `true`,`false` 或 `null`(不设置)。默认为 `null`。 * `cors['Access-Control-Max-Age']`: 定义请求的有效时间,默认为 `86400`。 -例如,允许来源为 `http://www.myserver.net` 和方式为 `GET`,`HEAD` 和 `OPTIONS` 的 CORS 如下: +例如,允许来源为 `https://www.myserver.net` 和方式为 `GET`,`HEAD` 和 `OPTIONS` 的 CORS 如下: ```php use yii\filters\Cors; @@ -368,7 +368,7 @@ public function behaviors() [ 'class' => Cors::class, 'cors' => [ - 'Origin' => ['http://www.myserver.net'], + 'Origin' => ['https://www.myserver.net'], 'Access-Control-Request-Method' => ['GET', 'HEAD', 'OPTIONS'], ], ], @@ -389,7 +389,7 @@ public function behaviors() [ 'class' => Cors::class, 'cors' => [ - 'Origin' => ['http://www.myserver.net'], + 'Origin' => ['https://www.myserver.net'], 'Access-Control-Request-Method' => ['GET', 'HEAD', 'OPTIONS'], ], 'actions' => [ diff --git a/docs/guide-zh-CN/structure-models.md b/docs/guide-zh-CN/structure-models.md index 1309d973458..242b8abcdc5 100644 --- a/docs/guide-zh-CN/structure-models.md +++ b/docs/guide-zh-CN/structure-models.md @@ -1,7 +1,7 @@ 模型 ====== -模型是 [MVC](http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller) 模式中的一部分, +模型是 [MVC](https://zh.wikipedia.org/wiki/MVC) 模式中的一部分, 是代表业务数据、规则和逻辑的对象。 可通过继承 [[yii\base\Model]] 或它的子类定义模型类, diff --git a/docs/guide-zh-CN/structure-modules.md b/docs/guide-zh-CN/structure-modules.md index 25c4d575c03..7c245fb873c 100644 --- a/docs/guide-zh-CN/structure-modules.md +++ b/docs/guide-zh-CN/structure-modules.md @@ -14,7 +14,7 @@ 在该目录中有子目录如 `controllers`,`models`,`views` 分别为对应控制器,模型,视图和其他代码,和应用非常类似。 如下例子显示一个模型的目录结构: -```js +``` forum/ Module.php 模块类文件 controllers/ 包含控制器类文件 diff --git a/docs/guide-zh-CN/structure-overview.md b/docs/guide-zh-CN/structure-overview.md index 186659cfd49..98ab52b6803 100644 --- a/docs/guide-zh-CN/structure-overview.md +++ b/docs/guide-zh-CN/structure-overview.md @@ -1,7 +1,7 @@ 总览 ======== -Yii 应用参照[模型-视图-控制器 (MVC)](https://wikipedia.org/wiki/Model-view-controller) +Yii 应用参照[模型-视图-控制器 (MVC)](https://zh.wikipedia.org/wiki/MVC) 设计模式来组织。 [模型](structure-models.md)代表数据、业务逻辑和规则; [视图](structure-views.md)展示模型的输出;[控制器](structure-controllers.md) 接受出入并将其转换为[模型](structure-models.md)和[视图](structure-views.md)命令。 diff --git a/docs/guide-zh-CN/structure-views.md b/docs/guide-zh-CN/structure-views.md index 7f6fa3d8998..b7634e758f2 100644 --- a/docs/guide-zh-CN/structure-views.md +++ b/docs/guide-zh-CN/structure-views.md @@ -1,7 +1,7 @@ 视图 ===== -视图是 [MVC](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller) 模式中的一部分。 +视图是 [MVC](https://zh.wikipedia.org/wiki/MVC) 模式中的一部分。 它是展示数据到终端用户的代码,在网页应用中, 根据*视图模板*来创建视图,视图模板为PHP脚本文件, 主要包含HTML代码和展示类PHP代码,通过[[yii\web\View|view]]应用组件来管理, @@ -52,7 +52,7 @@ $this->title = 'Login'; 当创建生成HTML页面的视图时,在显示之前将用户输入数据进行转码和过滤非常重要, 否则,你的应用可能会被 -[跨站脚本](https://en.wikipedia.org/wiki/Cross-site_scripting) 攻击。 +[跨站脚本](https://zh.wikipedia.org/wiki/%E8%B7%A8%E7%B6%B2%E7%AB%99%E6%8C%87%E4%BB%A4%E7%A2%BC) 攻击。 要显示纯文本,先调用 [[yii\helpers\Html::encode()]] 进行转码, 例如如下代码将用户名在显示前先转码: diff --git a/docs/guide-zh-CN/structure-widgets.md b/docs/guide-zh-CN/structure-widgets.md index 79cc680c6de..da70979826c 100644 --- a/docs/guide-zh-CN/structure-widgets.md +++ b/docs/guide-zh-CN/structure-widgets.md @@ -67,7 +67,7 @@ use yii\helpers\Html; 注意和调用 [[yii\base\Widget::widget()]] 返回渲染结果不同, 调用 [[yii\base\Widget::begin()]] 方法返回一个可组建小部件内容的小部件实例。 -> Note: 当调用 [[yii\base\Widget::end()]] 的时候,一些小部件将使用 [输出缓冲](https://www.php.net/manual/en/book.outcontrol.php) +> Note: 当调用 [[yii\base\Widget::end()]] 的时候,一些小部件将使用 [输出缓冲](https://www.php.net/manual/zh/book.outcontrol.php) > 来调整封闭的内容。因此,当调用 [[yii\base\Widget::begin()]] 和 > [[yii\base\Widget::end()]] 时,最好在同一个视图文件里。 > 不遵循这个规则可能会导致意外的输出。 diff --git a/docs/guide-zh-CN/test-fixtures.md b/docs/guide-zh-CN/test-fixtures.md index edaf5fb7710..1f21611c35c 100644 --- a/docs/guide-zh-CN/test-fixtures.md +++ b/docs/guide-zh-CN/test-fixtures.md @@ -108,7 +108,7 @@ class UserProfileFixture extends ActiveFixture 使用 Fixtures -------------- -如果你使用 [CodeCeption](http://codeception.com/) 作为你的 Yii 代码测试框架, +如果你使用 [CodeCeption](https://codeception.com/) 作为你的 Yii 代码测试框架, 你需要考虑使用 `yii2-codeception` 扩展,这个扩展包含内置的机制来支持加载和访问 Fixtures。 如果你使用其他的测试框架,为了达到加载和访问 Fixture 的目的, 你需要在你的测试用例中使用 [[yii\test\FixtureTrait]]。 diff --git a/docs/guide-zh-CN/test-functional.md b/docs/guide-zh-CN/test-functional.md index a0b7e638e29..08191012013 100644 --- a/docs/guide-zh-CN/test-functional.md +++ b/docs/guide-zh-CN/test-functional.md @@ -11,8 +11,8 @@ 功能测试是借助于具有良好文档的 Codeception 框架来实现的: -- [Codeception for Yii framework](http://codeception.com/for/yii) -- [Codeception 的功能测试](http://codeception.com/docs/04-FunctionalTests) +- [Codeception for Yii framework](https://codeception.com/for/yii) +- [Codeception 的功能测试](https://codeception.com/docs/04-FunctionalTests) ## 运行基本模板和高级模板的测试 diff --git a/docs/guide-zh-CN/test-unit.md b/docs/guide-zh-CN/test-unit.md index 15653510deb..dad28883c7f 100644 --- a/docs/guide-zh-CN/test-unit.md +++ b/docs/guide-zh-CN/test-unit.md @@ -7,9 +7,9 @@ Yii的单元测试框架 Codeception 基于 PHPUnit,Codeception 建议遵从 PHPUnit 的文档的进行开发: -- [Codeception for Yii framework](http://codeception.com/for/yii) -- [Codeception Unit Tests](http://codeception.com/docs/05-UnitTests) -- [PHPUnit docs starting from chapter 2](http://phpunit.de/manual/current/en/writing-tests-for-phpunit.html) +- [Codeception for Yii framework](https://codeception.com/for/yii) +- [Codeception Unit Tests](https://codeception.com/docs/05-UnitTests) +- [PHPUnit docs starting from chapter 2](https://phpunit.readthedocs.io/en/9.5/writing-tests-for-phpunit.html) ## 运行基本和高级模板测试 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 16ea7e12534..6775748f84b 100644 --- a/docs/guide-zh-CN/tutorial-i18n.md +++ b/docs/guide-zh-CN/tutorial-i18n.md @@ -19,8 +19,8 @@ Yii 提供的国际化功能支持全方位信息翻译, 在 Yii 应用程序中使用的所有区域 ID 应该规范化为 `ll-CC`, 其中 `ll` 是根据两个或三个字母的小写字母语言代码 -[ISO-639](http://www.loc.gov/standards/iso639-2/) 和 `CC` 是两个字母的国别代码 -[ISO-3166](http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html)。 +[ISO-639](https://www.loc.gov/standards/iso639-2/) 和 `CC` 是两个字母的国别代码 +[ISO-3166](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes)。 有关区域设置的更多细节可以看 [ICU 项目文档](https://unicode-org.github.io/icu/userguide/locale/#the-locale-concept)。 @@ -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-zh-CN/tutorial-shared-hosting.md b/docs/guide-zh-CN/tutorial-shared-hosting.md index c15806ab694..8932465d645 100644 --- a/docs/guide-zh-CN/tutorial-shared-hosting.md +++ b/docs/guide-zh-CN/tutorial-shared-hosting.md @@ -58,7 +58,7 @@ RewriteRule . index.php 为了运行 Yii,你的 web 服务器必须匹配它的环境要求。最低的要求必须是 PHP 5.4。 为了检查环境配置,将 `requirements.php` 从你的根目录拷贝到 webroot 目录, -并通过浏览器输入 URL `http://example.com/requirements.php` 运行它。最后,检查结束后别忘了删除这个文件哦! +并通过浏览器输入 URL `https://example.com/requirements.php` 运行它。最后,检查结束后别忘了删除这个文件哦! 部署一个高级应用程序模板 --------------------------------- diff --git a/docs/guide-zh-CN/tutorial-yii-integration.md b/docs/guide-zh-CN/tutorial-yii-integration.md index f068f3a951a..6d01116e496 100644 --- a/docs/guide-zh-CN/tutorial-yii-integration.md +++ b/docs/guide-zh-CN/tutorial-yii-integration.md @@ -41,7 +41,7 @@ require __DIR__ . '/../vendor/yiisoft/yii2/Yii.php'; 我们推荐你把它的安装代码置于`Yii.php` 的导入之前, 这样 Yii 的官方自动加载器可以拥有更高的优先级。 -若一个类库并没有提供自动加载器,但是他的类库命名方式符合 [PSR-4](http://www.php-fig.org/psr/psr-4/) 标准, +若一个类库并没有提供自动加载器,但是他的类库命名方式符合 [PSR-4](https://www.php-fig.org/psr/psr-4/) 标准, 你可以使用 Yii 官方的自动加载器来自动加载这些类。 你只需给他们的每个根命名空间声明一下[根路径别名](concept-aliases.md#defining-aliases)。 比如,假设说你已经在目录 `vendor/foo/bar` 里安装了一个类库,且这些类库的根命名空间为 `xyz`。 diff --git a/docs/guide/caching-data.md b/docs/guide/caching-data.md index 9665a609a27..1c712e801d0 100644 --- a/docs/guide/caching-data.md +++ b/docs/guide/caching-data.md @@ -58,7 +58,7 @@ such as memory, files, databases. Cache components are usually registered as [application components](structure-application-components.md) so that they can be globally configurable and accessible. The following code shows how to configure the `cache` application component to use -[memcached](http://memcached.org/) with two cache servers: +[memcached](https://memcached.org/) with two cache servers: ```php 'components' => [ @@ -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/caching-fragment.md b/docs/guide/caching-fragment.md index 5a5e9a1086c..d9e4b8c28ee 100644 --- a/docs/guide/caching-fragment.md +++ b/docs/guide/caching-fragment.md @@ -24,6 +24,11 @@ is called, the generated content will be captured and stored in the cache. Like [data caching](caching-data.md), a unique `$id` is needed to identify a content cache. +To delete fragment caching you can use +```php +Yii::$app->cache->delete(['yii\widgets\FragmentCache', $id]); +``` + ## Caching Options diff --git a/docs/guide/concept-aliases.md b/docs/guide/concept-aliases.md index 955468f9050..c80ab7a09c4 100644 --- a/docs/guide/concept-aliases.md +++ b/docs/guide/concept-aliases.md @@ -18,7 +18,7 @@ You can define an alias for a file path or URL by calling [[Yii::setAlias()]]: Yii::setAlias('@foo', '/path/to/foo'); // an alias of a URL -Yii::setAlias('@bar', 'http://www.example.com'); +Yii::setAlias('@bar', 'https://www.example.com'); // an alias of a concrete file that contains a \foo\Bar class Yii::setAlias('@foo/Bar.php', '/definitely/not/foo/Bar.php'); @@ -47,7 +47,7 @@ return [ // ... 'aliases' => [ '@foo' => '/path/to/foo', - '@bar' => 'http://www.example.com', + '@bar' => 'https://www.example.com', ], ]; ``` @@ -61,7 +61,7 @@ The same method can also resolve a derived alias into the corresponding file pat ```php echo Yii::getAlias('@foo'); // displays: /path/to/foo -echo Yii::getAlias('@bar'); // displays: http://www.example.com +echo Yii::getAlias('@bar'); // displays: https://www.example.com echo Yii::getAlias('@foo/bar/file.php'); // displays: /path/to/foo/bar/file.php ``` diff --git a/docs/guide/concept-configurations.md b/docs/guide/concept-configurations.md index ef361c0d13f..4a903bf14d9 100644 --- a/docs/guide/concept-configurations.md +++ b/docs/guide/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/concept-di-container.md b/docs/guide/concept-di-container.md index b48790a647b..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. @@ -163,7 +163,7 @@ $container->set('yii\db\Connection'); // register an interface // When a class depends on the interface, the corresponding class // will be instantiated as the dependent object -$container->set('yii\mail\MailInterface', 'yii\swiftmailer\Mailer'); +$container->set('yii\mail\MailInterface', 'yii\symfonymailer\Mailer'); // register an alias name. You can use $container->get('foo') // to create an instance of Connection 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 81026ddf48b..9ecf8d799d0 100644 --- a/docs/guide/db-dao.md +++ b/docs/guide/db-dao.md @@ -275,7 +275,7 @@ a database table if they do not already exist (matching unique constraints), or ```php Yii::$app->db->createCommand()->upsert('pages', [ 'name' => 'Front page', - 'url' => 'http://example.com/', // url is unique + 'url' => 'https://example.com/', // url is unique 'visits' => 0, ], [ 'visits' => new \yii\db\Expression('visits + 1'), @@ -427,7 +427,7 @@ Usage of other levels will result in an exception being thrown. specify the isolation level directly when starting the transaction. You have to call [[yii\db\Transaction::setIsolationLevel()]] in this case after the transaction has started. -[isolation levels]: http://en.wikipedia.org/wiki/Isolation_%28database_systems%29#Isolation_levels +[isolation levels]: https://en.wikipedia.org/wiki/Isolation_%28database_systems%29#Isolation_levels ### Nesting Transactions @@ -477,7 +477,7 @@ try { ## Replication and Read-Write Splitting -Many DBMS support [database replication](http://en.wikipedia.org/wiki/Replication_(computing)#Database_replication) +Many DBMS support [database replication](https://en.wikipedia.org/wiki/Replication_(computing)#Database_replication) to get better database availability and faster server response time. With database replication, data are replicated from the so-called *master servers* to *slave servers*. All writes and updates must take place on the master servers, while reads may also take place on the slave servers. @@ -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 f2d4248479c..ed7bf4b82dc 100644 --- a/docs/guide/db-query-builder.md +++ b/docs/guide/db-query-builder.md @@ -879,10 +879,10 @@ Using the operator format, it would look like the following: ```php [ 'and', - '>', 'posts', $minLimit, - '>', 'comments', $minLimit, - '>', 'reactions', $minLimit, - '>', 'subscriptions', $minLimit + ['>', 'posts', $minLimit], + ['>', 'comments', $minLimit], + ['>', 'reactions', $minLimit], + ['>', 'subscriptions', $minLimit] ] ``` @@ -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/helper-html.md b/docs/guide/helper-html.md index aba121a72ab..40757cc3af5 100644 --- a/docs/guide/helper-html.md +++ b/docs/guide/helper-html.md @@ -349,7 +349,7 @@ If you want to use an external style in a CSS file: generates ``` @@ -399,7 +399,7 @@ In order to generate an image tag, use the following: generates -My logo +My logo ``` Besides [aliases](concept-aliases.md), the first argument can accept routes, parameters and URLs, in the same way [Url::to()](helper-url.md) does. diff --git a/docs/guide/helper-url.md b/docs/guide/helper-url.md index dd6978f9c7a..110226cefbb 100644 --- a/docs/guide/helper-url.md +++ b/docs/guide/helper-url.md @@ -78,7 +78,7 @@ echo Url::toRoute(['site/index', 'src' => 'ref1', '#' => 'name']); // /index.php?r=post%2Fedit&id=100 assume the alias "@postEdit" is defined as "post/edit" echo Url::toRoute(['@postEdit', 'id' => 100]); -// http://www.example.com/index.php?r=site%2Findex +// https://www.example.com/index.php?r=site%2Findex echo Url::toRoute('site/index', true); // https://www.example.com/index.php?r=site%2Findex @@ -123,7 +123,7 @@ echo Url::to('@web/images/logo.gif'); // images/logo.gif echo Url::to('images/logo.gif'); -// http://www.example.com/images/logo.gif +// https://www.example.com/images/logo.gif echo Url::to('@web/images/logo.gif', true); // https://www.example.com/images/logo.gif diff --git a/docs/guide/input-forms.md b/docs/guide/input-forms.md index 990fd667e1b..b7712f56201 100644 --- a/docs/guide/input-forms.md +++ b/docs/guide/input-forms.md @@ -241,7 +241,7 @@ introduced in HTML5. That means the only official support for files and submit button values with ajax or using the [[yii\widgets\Pjax|Pjax]] widget depends on the -[browser support](https://developer.mozilla.org/en-US/docs/Web/API/FormData#Browser_compatibility) +[browser support](https://developer.mozilla.org/en-US/docs/Web/API/FormData#browser_compatibility) for the `FormData` class. Further Reading diff --git a/docs/guide/input-tabular-input.md b/docs/guide/input-tabular-input.md index 5a2e0824f9d..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 @@ -92,7 +92,7 @@ public function actionCreate() { $settings = []; if ($this->request->isPost) { - $count = count($this->request->post($setting->tableName())) - 1; + $count = count($this->request->post($setting->tableName())); for ($i = 0; $i < $count; $i++) { $settings[$i] = new Setting(); } 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/intro-yii.md b/docs/guide/intro-yii.md index 6a15660cc3f..ea493cf2b8d 100644 --- a/docs/guide/intro-yii.md +++ b/docs/guide/intro-yii.md @@ -50,7 +50,7 @@ This guide is mainly about version 2.0. Requirements and Prerequisites ------------------------------ -Yii 2.0 requires PHP 5.4.0 or above and runs best with the latest version of PHP 7. You can find more detailed +Yii 2.0 requires PHP 5.4.0 or above and runs best with the latest version of PHP. You can find more detailed requirements for individual features by running the requirement checker included in every Yii release. Using Yii requires basic knowledge of object-oriented programming (OOP), as Yii is a pure OOP-based framework. 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-data-widgets.md b/docs/guide/output-data-widgets.md index ea9c253aa95..da43b234d88 100644 --- a/docs/guide/output-data-widgets.md +++ b/docs/guide/output-data-widgets.md @@ -777,4 +777,4 @@ Which generates a [[yii\widgets\Pjax|Pjax]] widget wrapping the Further reading --------------- -- [Rendering Data in Yii 2 with GridView and ListView](http://www.sitepoint.com/rendering-data-in-yii-2-with-gridview-and-listview/) by Arno Slatius. +- [Rendering Data in Yii 2 with GridView and ListView](https://www.sitepoint.com/rendering-data-in-yii-2-with-gridview-and-listview/) by Arno Slatius. diff --git a/docs/guide/output-formatting.md b/docs/guide/output-formatting.md index 7db8ec9d36a..53996820771 100644 --- a/docs/guide/output-formatting.md +++ b/docs/guide/output-formatting.md @@ -85,7 +85,7 @@ and [[yii\i18n\Formatter::asDatetime()|datetime]] methods can be customized glob [[yii\i18n\Formatter::dateFormat|dateFormat]], [[yii\i18n\Formatter::timeFormat|timeFormat]], and [[yii\i18n\Formatter::datetimeFormat|datetimeFormat]]. -You can specify date and time formats using the [ICU syntax](http://userguide.icu-project.org/formatparse/datetime). +You can specify date and time formats using the [ICU syntax](https://unicode-org.github.io/icu/userguide/format_parse/datetime/). You can also use the [PHP date() syntax](https://www.php.net/manual/en/function.date.php) with a prefix `php:` to differentiate it from ICU syntax. For example, @@ -150,7 +150,7 @@ as set in the PHP configuration. > Note: As time zones are subject to rules made by the governments around the world and may change frequently, it is > likely that you do not have the latest information in the time zone database installed on your system. -> You may refer to the [ICU manual](http://userguide.icu-project.org/datetime/timezone#TOC-Updating-the-Time-Zone-Data) +> You may refer to the [ICU manual](https://unicode-org.github.io/icu/userguide/datetime/timezone/#updating-the-time-zone-data) > for details on updating the time zone database. Please also read > [Setting up your PHP environment for internationalization](tutorial-i18n.md#setup-environment). 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/rest-filtering-collections.md b/docs/guide/rest-filtering-collections.md index f5934da1d86..ab9c7b92ead 100644 --- a/docs/guide/rest-filtering-collections.md +++ b/docs/guide/rest-filtering-collections.md @@ -148,7 +148,7 @@ keyword `like` and an attribute named `like`, specifying condition for such attr ## Handling The Null Values -While it is easy to use `null` inside the JSON statement, it is not possible to sent it using the GET query without +While it is easy to use `null` inside the JSON statement, it is not possible to send it using the GET query without confusing the literal `null` with the string `"null"`. Since 2.0.40 you can use [[yii\data\DataFilter::$nullValue]] option to configure the word that will be used as a replacement for literal `null` (by default it's `"NULL"`). diff --git a/docs/guide/rest-versioning.md b/docs/guide/rest-versioning.md index 4a90c3e57ca..c35628f80bb 100644 --- a/docs/guide/rest-versioning.md +++ b/docs/guide/rest-versioning.md @@ -9,7 +9,7 @@ compatibility (BC) of the APIs should be maintained whenever possible. If a chan for more information on designing API version numbers. One common way to implement API versioning is to embed the version number in the API URLs. -For example, `http://example.com/v1/users` stands for the `/users` endpoint of API version 1. +For example, `https://example.com/v1/users` stands for the `/users` endpoint of API version 1. Another method of API versioning, which has gained momentum recently, is to put the version number in the HTTP request headers. This is typically done through the `Accept` header: @@ -90,8 +90,8 @@ return [ ]; ``` -As a result of the above code, `http://example.com/v1/users` will return the list of users in version 1, while -`http://example.com/v2/users` will return version 2 users. +As a result of the above code, `https://example.com/v1/users` will return the list of users in version 1, while +`https://example.com/v2/users` will return version 2 users. Thanks to modules, the code for different major versions can be well isolated. But modules make it still possible to reuse code across the modules via common base classes and other shared resources. diff --git a/docs/guide/runtime-requests.md b/docs/guide/runtime-requests.md index c11d52a78ce..d134f1863fd 100644 --- a/docs/guide/runtime-requests.md +++ b/docs/guide/runtime-requests.md @@ -76,13 +76,13 @@ if ($request->isPut) { /* the request method is PUT */ } The `request` component provides many ways of inspecting the currently requested URL. -Assuming the URL being requested is `http://example.com/admin/index.php/product?id=100`, you can get various +Assuming the URL being requested is `https://example.com/admin/index.php/product?id=100`, you can get various parts of this URL as summarized in the following: * [[yii\web\Request::url|url]]: returns `/admin/index.php/product?id=100`, which is the URL without the host info part. -* [[yii\web\Request::absoluteUrl|absoluteUrl]]: returns `http://example.com/admin/index.php/product?id=100`, +* [[yii\web\Request::absoluteUrl|absoluteUrl]]: returns `https://example.com/admin/index.php/product?id=100`, which is the whole URL including the host info part. -* [[yii\web\Request::hostInfo|hostInfo]]: returns `http://example.com`, which is the host info part of the URL. +* [[yii\web\Request::hostInfo|hostInfo]]: returns `https://example.com`, which is the host info part of the URL. * [[yii\web\Request::pathInfo|pathInfo]]: returns `/product`, which is the part after the entry script and before the question mark (query string). * [[yii\web\Request::queryString|queryString]]: returns `id=100`, which is the part after the question mark. @@ -151,8 +151,9 @@ You should not blindly trust headers provided by proxies unless you explicitly t Since 2.0.13 Yii supports configuring trusted proxies via the [[yii\web\Request::trustedHosts|trustedHosts]], [[yii\web\Request::secureHeaders|secureHeaders]], -[[yii\web\Request::ipHeaders|ipHeaders]] and -[[yii\web\Request::secureProtocolHeaders|secureProtocolHeaders]] +[[yii\web\Request::ipHeaders|ipHeaders]], +[[yii\web\Request::secureProtocolHeaders|secureProtocolHeaders]] and +[[yii\web\Request::portHeaders|portHeaders]] (since 2.0.46) properties of the `request` component. The following is a request config for an application that runs behind an array of reverse proxies, @@ -184,6 +185,7 @@ In case your proxies are using different headers you can use the request configu 'X-Forwarded-For', 'X-Forwarded-Host', 'X-Forwarded-Proto', + 'X-Forwarded-Port', 'X-Proxy-User-Ip', 'Front-End-Https', ], diff --git a/docs/guide/runtime-responses.md b/docs/guide/runtime-responses.md index 9e8efd075e6..0ac6e1af164 100644 --- a/docs/guide/runtime-responses.md +++ b/docs/guide/runtime-responses.md @@ -169,7 +169,7 @@ you can call its shortcut version [[yii\web\Controller::redirect()]]. For exampl ```php public function actionOld() { - return $this->redirect('http://example.com/new', 301); + return $this->redirect('https://example.com/new', 301); } ``` @@ -180,7 +180,7 @@ In places other than an action method, you should call [[yii\web\Response::redir a chained call to the [[yii\web\Response::send()]] method to ensure no extra content will be appended to the response. ```php -\Yii::$app->response->redirect('http://example.com/new', 301)->send(); +\Yii::$app->response->redirect('https://example.com/new', 301)->send(); ``` > Info: By default, the [[yii\web\Response::redirect()]] method sets the response status code to be 302 which instructs @@ -234,7 +234,7 @@ for some popular Web servers: - Lighttpd v1.4: [X-LIGHTTPD-send-file](https://redmine.lighttpd.net/projects/lighttpd/wiki/X-LIGHTTPD-send-file) - Lighttpd v1.5: [X-Sendfile](https://redmine.lighttpd.net/projects/lighttpd/wiki/X-LIGHTTPD-send-file) - Nginx: [X-Accel-Redirect](https://www.nginx.com/resources/wiki/start/topics/examples/xsendfile/) -- Cherokee: [X-Sendfile and X-Accel-Redirect](http://www.cherokee-project.com/doc/other_goodies.html#x-sendfile) +- Cherokee: [X-Sendfile and X-Accel-Redirect](https://www.cherokee-project.com/doc/other_goodies.html#x-sendfile) ## Sending Response diff --git a/docs/guide/runtime-routing.md b/docs/guide/runtime-routing.md index 80a9ea24075..8cb24bf8366 100644 --- a/docs/guide/runtime-routing.md +++ b/docs/guide/runtime-routing.md @@ -156,7 +156,7 @@ echo Url::to(['post/view', 'id' => 100]); // creates an anchored URL: /index.php?r=post%2Fview&id=100#content echo Url::to(['post/view', 'id' => 100, '#' => 'content']); -// creates an absolute URL: http://www.example.com/index.php?r=post%2Findex +// creates an absolute URL: https://www.example.com/index.php?r=post%2Findex echo Url::to(['post/index'], true); // creates an absolute URL using the https scheme: https://www.example.com/index.php?r=post%2Findex @@ -214,11 +214,11 @@ use yii\helpers\Url; // currently requested URL: /index.php?r=admin%2Fpost%2Findex echo Url::to(); -// an aliased URL: http://example.com -Yii::setAlias('@example', 'http://example.com/'); +// an aliased URL: https://example.com +Yii::setAlias('@example', 'https://example.com/'); echo Url::to('@example'); -// an absolute URL: http://example.com/images/logo.gif +// an absolute URL: https://example.com/images/logo.gif echo Url::to('/images/logo.gif', true); ``` @@ -443,29 +443,29 @@ Without using optional parameters, you would have to create 4 rules to achieve t It is possible to include Web server names in the patterns of URL rules. This is mainly useful when your application should behave differently for different Web server names. For example, the following rules will parse the URL -`http://admin.example.com/login` into the route `admin/user/login` and `http://www.example.com/login` into `site/login`. +`https://admin.example.com/login` into the route `admin/user/login` and `https://www.example.com/login` into `site/login`. ```php 'rules' => [ - 'http://admin.example.com/login' => 'admin/user/login', - 'http://www.example.com/login' => 'site/login', + 'https://admin.example.com/login' => 'admin/user/login', + 'https://www.example.com/login' => 'site/login', ] ``` You can also embed parameters in the server names to extract dynamic information from them. For example, the following rule -will parse the URL `http://en.example.com/posts` into the route `post/index` and the parameter `language=en`. +will parse the URL `https://en.example.com/posts` into the route `post/index` and the parameter `language=en`. ```php 'rules' => [ - 'http://.example.com/posts' => 'post/index', + 'https://.example.com/posts' => 'post/index', ] ``` Since version 2.0.11, you may also use protocol relative patterns that work for both, `http` and `https`. The syntax is the same as above but skipping the `http:` part, e.g.: `'//www.example.com/login' => 'site/login'`. -> Note: Rules with server names should **not** include the subfolder of the entry script in their patterns. For example, if the applications entry script is at `http://www.example.com/sandbox/blog/index.php`, then you should use the pattern - `http://www.example.com/posts` instead of `http://www.example.com/sandbox/blog/posts`. This will allow your application +> Note: Rules with server names should **not** include the subfolder of the entry script in their patterns. For example, if the applications entry script is at `https://www.example.com/sandbox/blog/index.php`, then you should use the pattern + `https://www.example.com/posts` instead of `https://www.example.com/sandbox/blog/posts`. This will allow your application to be deployed under any directory without the need to change your url rules. Yii will automatically detect the base url of the application. @@ -631,8 +631,8 @@ And use the new rule class in the [[yii\web\UrlManager::rules]] configuration: ## URL normalization Since version 2.0.10 [[yii\web\UrlManager|UrlManager]] can be configured to use [[yii\web\UrlNormalizer|UrlNormalizer]] for dealing -with variations of the same URL, for example with and without a trailing slash. Because technically `http://example.com/path` -and `http://example.com/path/` are different URLs, serving the same content for both of them can degrade SEO ranking. +with variations of the same URL, for example with and without a trailing slash. Because technically `https://example.com/path` +and `https://example.com/path/` are different URLs, serving the same content for both of them can degrade SEO ranking. By default normalizer collapses consecutive slashes, adds or removes trailing slashes depending on whether the suffix has a trailing slash or not, and redirects to the normalized version of the URL using [permanent redirection](https://en.wikipedia.org/wiki/HTTP_301). The normalizer can be configured globally for the URL manager or individually for each rule - by default each rule will use the normalizer 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 1fb59e467e6..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 @@ -162,14 +162,14 @@ from a user browser are made by the user themselves. This assumption could be fa For example, the website `an.example.com` has a `/logout` URL that, when accessed using a simple GET request, logs the user out. As long as it's requested by the user themselves everything is OK, but one day bad guys are somehow posting -`` on a forum the user visits frequently. The browser doesn't make any difference between +`` on a forum the user visits frequently. The browser doesn't make any difference between requesting an image or requesting a page so when the user opens a page with such a manipulated `` tag, the browser will send the GET request to that URL and the user will be logged out from `an.example.com`. That's the basic idea of how a CSRF attack works. One can say that logging out a user is not a serious thing, however this was just an example, there are much more things one could do using this approach, for example triggering payments or changing data. Imagine that some website has an URL -`http://an.example.com/purse/transfer?to=anotherUser&amount=2000`. Accessing it using GET request, causes transfer of $2000 +`https://an.example.com/purse/transfer?to=anotherUser&amount=2000`. Accessing it using GET request, causes transfer of $2000 from authorized user account to user `anotherUser`. We know, that the browser will always send GET request to load an image, so we can modify code to accept only POST requests on that URL. Unfortunately, this will not save us, because an attacker can put some JavaScript code instead of `` tag, which allows to send POST requests to that URL as well. @@ -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 4b0c41ca281..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 @@ -231,7 +231,7 @@ Trying it Out To see how all of the above code works, use your browser to access the following URL: ``` -http://hostname/index.php?r=country%2Findex +https://hostname/index.php?r=country%2Findex ``` ![Country List](images/start-country-list.png) @@ -241,7 +241,7 @@ If you click on the button "2", you will see the page display another five count Observe more carefully and you will find that the URL in the browser also changes to ``` -http://hostname/index.php?r=country%2Findex&page=2 +https://hostname/index.php?r=country%2Findex&page=2 ``` Behind the scenes, [[yii\data\Pagination|Pagination]] is providing all of the necessary functionality to paginate a data set: diff --git a/docs/guide/start-forms.md b/docs/guide/start-forms.md index ea4aaa90173..93612c7e232 100644 --- a/docs/guide/start-forms.md +++ b/docs/guide/start-forms.md @@ -187,7 +187,7 @@ Trying it Out To see how it works, use your browser to access the following URL: ``` -http://hostname/index.php?r=site%2Fentry +https://hostname/index.php?r=site%2Fentry ``` You will see a page displaying a form with two input fields. In front of each input field, a label indicates what data is to be entered. If you click the submit button without diff --git a/docs/guide/start-gii.md b/docs/guide/start-gii.md index e4adf4590bc..17814997aff 100644 --- a/docs/guide/start-gii.md +++ b/docs/guide/start-gii.md @@ -42,7 +42,7 @@ defined('YII_ENV') or define('YII_ENV', 'dev'); Thanks to that line, your application is in development mode, and will have already enabled Gii, per the above configuration. You can now access Gii via the following URL: ``` -http://hostname/index.php?r=gii +https://hostname/index.php?r=gii ``` > Note: If you are accessing Gii from a machine other than localhost, the access will be denied by default @@ -107,7 +107,7 @@ Trying it Out To see how it works, use your browser to access the following URL: ``` -http://hostname/index.php?r=country%2Findex +https://hostname/index.php?r=country%2Findex ``` You will see a data grid showing the countries from the database table. You may sort the grid, diff --git a/docs/guide/start-hello.md b/docs/guide/start-hello.md index 8a44845f246..579735f20d3 100644 --- a/docs/guide/start-hello.md +++ b/docs/guide/start-hello.md @@ -102,7 +102,7 @@ Trying it Out After creating the action and the view, you may access the new page by accessing the following URL: ``` -http://hostname/index.php?r=site%2Fsay&message=Hello+World +https://hostname/index.php?r=site%2Fsay&message=Hello+World ``` ![Hello World](images/start-hello-world.png) diff --git a/docs/guide/start-installation.md b/docs/guide/start-installation.md index 727c7f4cd4d..030af28951e 100644 --- a/docs/guide/start-installation.md +++ b/docs/guide/start-installation.md @@ -190,7 +190,7 @@ Windows, Mac OS X, or Linux running PHP 5.4 or higher. Yii 2.0 is also compatibl PHP, so you have to take some extra care when using HHVM. On a production server, you may want to configure your Web server so that the application can be accessed -via the URL `http://www.example.com/index.php` instead of `http://www.example.com/basic/web/index.php`. Such configuration +via the URL `https://www.example.com/index.php` instead of `https://www.example.com/basic/web/index.php`. Such configuration requires pointing the document root of your Web server to the `basic/web` folder. You may also want to hide `index.php` from the URL, as described in the [Routing and URL Creation](runtime-routing.md) section. In this subsection, you'll learn how to configure your Apache or Nginx server to achieve these goals. 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/start-workflow.md b/docs/guide/start-workflow.md index 07db9e5aa3e..8784211b0df 100644 --- a/docs/guide/start-workflow.md +++ b/docs/guide/start-workflow.md @@ -2,13 +2,13 @@ Running Applications ==================== After installing Yii, you have a working Yii application that can be accessed via -the URL `http://hostname/basic/web/index.php` or `http://hostname/index.php`, depending +the URL `https://hostname/basic/web/index.php` or `https://hostname/index.php`, depending upon your configuration. This section will introduce the application's built-in functionality, how the code is organized, and how the application handles requests in general. > Info: For simplicity, throughout this "Getting Started" tutorial, it's assumed that you have set `basic/web` as the document root of your Web server, and configured the URL for accessing - your application to be `http://hostname/index.php` or something similar. + your application to be `https://hostname/index.php` or something similar. For your needs, please adjust the URLs in our descriptions accordingly. Note that unlike framework itself, after project template is installed it's all yours. You're free to add or delete @@ -20,7 +20,7 @@ Functionality The basic application installed contains four pages: -* the homepage, displayed when you access the URL `http://hostname/index.php`, +* the homepage, displayed when you access the URL `https://hostname/index.php`, * the "About" page, * the "Contact" page, which displays a contact form that allows end users to contact you via email, * and the "Login" page, which displays a login form that can be used to authenticate end users. Try logging in 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-assets.md b/docs/guide/structure-assets.md index 8dc397611d8..25b4b8fdfd3 100644 --- a/docs/guide/structure-assets.md +++ b/docs/guide/structure-assets.md @@ -207,7 +207,7 @@ the `only` publishing option, only the `fonts` and `css` subdirectories will be ### Bower and NPM Assets installation -Most JavaScript/CSS packages are managed by [Bower](http://bower.io/) and/or [NPM](https://www.npmjs.com/) package +Most JavaScript/CSS packages are managed by [Bower](https://bower.io/) and/or [NPM](https://www.npmjs.com/) package managers. In PHP world we have Composer, that manages PHP dependencies, but it is possible to load both Bower and NPM packages using `composer.json` just as PHP packages. @@ -461,10 +461,10 @@ return [ 'assetManager' => [ 'bundles' => [ 'app\assets\LanguageAssetBundle' => [ - 'baseUrl' => 'http://some.cdn.com/files/i18n/en' // makes NO effect! + 'baseUrl' => 'https://some.cdn.com/files/i18n/en' // makes NO effect! ], 'app\assets\LargeFileAssetBundle' => [ - 'baseUrl' => 'http://some.cdn.com/files/large-files' // makes NO effect! + 'baseUrl' => 'https://some.cdn.com/files/large-files' // makes NO effect! ], ], ], @@ -579,8 +579,8 @@ as described in the [Customizing Asset Bundle](#customizing-asset-bundles) subse ## Asset Conversion Instead of directly writing CSS and/or JavaScript code, developers often write them in some extended syntax and -use special tools to convert it into CSS/JavaScript. For example, for CSS code you may use [LESS](http://lesscss.org/) -or [SCSS](http://sass-lang.com/); and for JavaScript you may use [TypeScript](http://www.typescriptlang.org/). +use special tools to convert it into CSS/JavaScript. For example, for CSS code you may use [LESS](https://lesscss.org/) +or [SCSS](https://sass-lang.com/); and for JavaScript you may use [TypeScript](https://www.typescriptlang.org/). You can list the asset files in extended syntax in the [[yii\web\AssetBundle::css|css]] and [[yii\web\AssetBundle::js|js]] properties of an asset bundle. For example, @@ -644,7 +644,7 @@ asset file extension names and the commands for performing the asset conversion. in the commands will be replaced with the source asset file paths and the target asset file paths. > Info: There are other ways of working with assets in extended syntax, besides the one described above. - For example, you can use build tools such as [grunt](http://gruntjs.com/) to monitor and automatically + For example, you can use build tools such as [grunt](https://gruntjs.com/) to monitor and automatically convert assets in extended syntax. In this case, you should list the resulting CSS/JavaScript files in asset bundles rather than the original files. @@ -840,7 +840,7 @@ the last subsection. > Info: Using the `asset` command is not the only option to automate the asset combining and compressing process. - You can use the excellent task runner tool [grunt](http://gruntjs.com/) to achieve the same goal. + You can use the excellent task runner tool [grunt](https://gruntjs.com/) to achieve the same goal. ### Grouping Asset Bundles diff --git a/docs/guide/structure-controllers.md b/docs/guide/structure-controllers.md index 7bee33d30fd..d7a8b9b917d 100644 --- a/docs/guide/structure-controllers.md +++ b/docs/guide/structure-controllers.md @@ -83,7 +83,7 @@ or the following format if the controller belongs to a module: ModuleID/ControllerID/ActionID ``` -So if a user requests with the URL `http://hostname/index.php?r=site/index`, the `index` action in the `site` controller +So if a user requests with the URL `https://hostname/index.php?r=site/index`, the `index` action in the `site` controller will be executed. For more details on how routes are resolved into actions, please refer to the [Routing and URL Creation](runtime-routing.md) section. @@ -179,7 +179,7 @@ You may configure the [[yii\base\Application::controllerMap|controller map]] in Each application has a default controller specified via the [[yii\base\Application::defaultRoute]] property. When a request does not specify a [route](#routes), the route specified by this property will be used. For [[yii\web\Application|Web applications]], its value is `'site'`, while for [[yii\console\Application|console applications]], -it is `help`. Therefore, if a URL is `http://hostname/index.php`, then the `site` controller will handle the request. +it is `help`. Therefore, if a URL is `https://hostname/index.php`, then the `site` controller will handle the request. You may change the default controller with the following [application configuration](structure-applications.md#application-configurations): @@ -323,8 +323,8 @@ a response object): ```php public function actionForward() { - // redirect the user browser to http://example.com - return $this->redirect('http://example.com'); + // redirect the user browser to https://example.com + return $this->redirect('https://example.com'); } ``` @@ -354,13 +354,13 @@ class PostController extends Controller The action parameters will be populated as follows for different requests: -* `http://hostname/index.php?r=post/view&id=123`: the `$id` parameter will be filled with the value +* `https://hostname/index.php?r=post/view&id=123`: the `$id` parameter will be filled with the value `'123'`, while `$version` is still `null` because there is no `version` query parameter. -* `http://hostname/index.php?r=post/view&id=123&version=2`: the `$id` and `$version` parameters will +* `https://hostname/index.php?r=post/view&id=123&version=2`: the `$id` and `$version` parameters will be filled with `'123'` and `'2'`, respectively. -* `http://hostname/index.php?r=post/view`: a [[yii\web\BadRequestHttpException]] exception will be thrown +* `https://hostname/index.php?r=post/view`: a [[yii\web\BadRequestHttpException]] exception will be thrown because the required `$id` parameter is not provided in the request. -* `http://hostname/index.php?r=post/view&id[]=123`: a [[yii\web\BadRequestHttpException]] exception will be thrown +* `https://hostname/index.php?r=post/view&id[]=123`: a [[yii\web\BadRequestHttpException]] exception will be thrown because `$id` parameter is receiving an unexpected array value `['123']`. If you want an action parameter to accept array values, you should type-hint it with `array`, like the following: @@ -372,8 +372,8 @@ public function actionView(array $id, $version = null) } ``` -Now if the request is `http://hostname/index.php?r=post/view&id[]=123`, the `$id` parameter will take the value -of `['123']`. If the request is `http://hostname/index.php?r=post/view&id=123`, the `$id` parameter will still +Now if the request is `https://hostname/index.php?r=post/view&id[]=123`, the `$id` parameter will take the value +of `['123']`. If the request is `https://hostname/index.php?r=post/view&id=123`, the `$id` parameter will still receive the same array value because the scalar value `'123'` will be automatically turned into an array. The above examples mainly show how action parameters work for Web applications. For console applications, diff --git a/docs/guide/structure-extensions.md b/docs/guide/structure-extensions.md index 6409c91cc0d..bc94fe9412e 100644 --- a/docs/guide/structure-extensions.md +++ b/docs/guide/structure-extensions.md @@ -75,7 +75,7 @@ To do so, you should: 2. install the class autoloaders provided by the extensions, if any. 3. download and install all dependent extensions as instructed. -If an extension does not have a class autoloader but follows the [PSR-4 standard](http://www.php-fig.org/psr/psr-4/), +If an extension does not have a class autoloader but follows the [PSR-4 standard](https://www.php-fig.org/psr/psr-4/), you may use the class autoloader provided by Yii to autoload the extension classes. All you need to do is just to declare a [root alias](concept-aliases.md#defining-aliases) for the extension root directory. For example, assuming you have installed an extension in the directory `vendor/mycompany/myext`, and the extension classes @@ -184,7 +184,7 @@ If your extension also depends on other extensions or third-party libraries, you Make sure you also list appropriate version constraints (e.g. `1.*`, `@stable`) for each dependent package. Use stable dependencies when your extension is released in a stable version. -Most JavaScript/CSS packages are managed using [Bower](http://bower.io/) and/or [NPM](https://www.npmjs.com/), +Most JavaScript/CSS packages are managed using [Bower](https://bower.io/) and/or [NPM](https://www.npmjs.com/), instead of Composer. Yii uses the [Composer asset plugin](https://github.com/fxpio/composer-asset-plugin) to enable managing these kinds of packages through Composer. If your extension depends on a Bower package, you can simply list the dependency in `composer.json` like the following: @@ -240,8 +240,8 @@ we introduce some common and recommended practices in creating high quality exte #### Namespaces To avoid name collisions and make the classes in your extension autoloadable, you should use namespaces and -name the classes in your extension by following the [PSR-4 standard](http://www.php-fig.org/psr/psr-4/) or -[PSR-0 standard](http://www.php-fig.org/psr/psr-0/). +name the classes in your extension by following the [PSR-4 standard](https://www.php-fig.org/psr/psr-4/) or +[PSR-0 standard](https://www.php-fig.org/psr/psr-0/). Your class namespaces should start with `vendorName\extensionName`, where `extensionName` is similar to the project name in the package name except that it should not contain the `yii2-` prefix. For example, for the `yiisoft/yii2-imagine` @@ -351,7 +351,7 @@ acceptance tests and functionality tests. For more details, please refer to the #### Versioning You should give each release of your extension a version number (e.g. `1.0.1`). We recommend you follow the -[semantic versioning](http://semver.org) practice when determining what version numbers should be used. +[semantic versioning](https://semver.org) practice when determining what version numbers should be used. #### Releasing @@ -367,7 +367,7 @@ In the releases of your extension, in addition to code files, you should also co help other people learn about and use your extension: * A readme file in the package root directory: it describes what your extension does and how to install and use it. - We recommend you write it in [Markdown](http://daringfireball.net/projects/markdown/) format and name the file + We recommend you write it in [Markdown](https://daringfireball.net/projects/markdown/) format and name the file as `readme.md`. * A changelog file in the package root directory: it lists what changes are made in each release. The file may be written in Markdown format and named as `changelog.md`. @@ -398,7 +398,7 @@ registered on [Packagist](https://packagist.org/) and can be easily installed as - [yiisoft/yii2-authclient](https://www.yiiframework.com/extension/yiisoft/yii2-authclient): provides a set of commonly used auth clients, such as Facebook OAuth2 client, GitHub OAuth2 client. - [yiisoft/yii2-bootstrap](https://www.yiiframework.com/extension/yiisoft/yii2-bootstrap): - provides a set of widgets that encapsulate the [Bootstrap](http://getbootstrap.com/) components and plugins. + provides a set of widgets that encapsulate the [Bootstrap](https://getbootstrap.com/) components and plugins. - [yiisoft/yii2-debug](https://www.yiiframework.com/extension/yiisoft/yii2-debug): provides debugging support for Yii applications. When this extension is used, a debugger toolbar will appear at the bottom of every page. The extension also provides a set of standalone pages to display more detailed @@ -415,9 +415,9 @@ registered on [Packagist](https://packagist.org/) and can be easily installed as - [yiisoft/yii2-httpclient](https://www.yiiframework.com/extension/yiisoft/yii2-httpclient): provides an HTTP client. - [yiisoft/yii2-imagine](https://www.yiiframework.com/extension/yiisoft/yii2-imagine): - provides commonly used image manipulation functions based on [Imagine](http://imagine.readthedocs.org/). + provides commonly used image manipulation functions based on [Imagine](https://imagine.readthedocs.org/). - [yiisoft/yii2-jui](https://www.yiiframework.com/extension/yiisoft/yii2-jui): - provides a set of widgets that encapsulate the [JQuery UI](http://jqueryui.com/) interactions and widgets. + provides a set of widgets that encapsulate the [JQuery UI](https://jqueryui.com/) interactions and widgets. - [yiisoft/yii2-mongodb](https://www.yiiframework.com/extension/yiisoft/yii2-mongodb): provides the support for using [MongoDB](https://www.mongodb.com/). It includes features such as basic query, Active Record, migrations, caching, code generation, etc. @@ -425,17 +425,17 @@ registered on [Packagist](https://packagist.org/) and can be easily installed as provides the supports for running tasks asynchronously via queues. It supports queues based on DB, Redis, RabbitMQ, AMQP, Beanstalk and Gearman. - [yiisoft/yii2-redis](https://www.yiiframework.com/extension/yiisoft/yii2-redis): - provides the support for using [redis](http://redis.io/). It includes features such as basic query, + provides the support for using [redis](https://redis.io/). It includes features such as basic query, Active Record, caching, etc. - [yiisoft/yii2-shell](https://www.yiiframework.com/extension/yiisoft/yii2-shell): - provides an interactive shell based on [psysh](http://psysh.org/). + provides an interactive shell based on [psysh](https://psysh.org/). - [yiisoft/yii2-smarty](https://www.yiiframework.com/extension/yiisoft/yii2-smarty): - provides a template engine based on [Smarty](http://www.smarty.net/). + provides a template engine based on [Smarty](https://www.smarty.net/). - [yiisoft/yii2-sphinx](https://www.yiiframework.com/extension/yiisoft/yii2-sphinx): - provides the support for using [Sphinx](http://sphinxsearch.com). It includes features such as basic query, + provides the support for using [Sphinx](https://sphinxsearch.com/). It includes features such as basic query, Active Record, code generation, etc. -- [yiisoft/yii2-swiftmailer](https://www.yiiframework.com/extension/yiisoft/yii2-swiftmailer): - provides email sending features based on [swiftmailer](http://swiftmailer.org/). +- [yiisoft/yii2-symfonymailer](https://www.yiiframework.com/extension/yiisoft/yii2-symfonymailer): + provides email sending features based on [Symfony Mailer](https://symfony.com/doc/current/mailer.html). - [yiisoft/yii2-twig](https://www.yiiframework.com/extension/yiisoft/yii2-twig): provides a template engine based on [Twig](https://twig.symfony.com/). @@ -447,7 +447,7 @@ You don't need to install them for Yii 2.0, since they are included in the core - [yiisoft/yii2-jquery](https://www.yiiframework.com/extension/yiisoft/yii2-jquery): provides a support for [jQuery](https://jquery.com/). - [yiisoft/yii2-maskedinput](https://www.yiiframework.com/extension/yiisoft/yii2-maskedinput): - provides a masked input widget based on [jQuery Input Mask plugin](http://robinherbots.github.io/Inputmask/). + provides a masked input widget based on [jQuery Input Mask plugin](https://robinherbots.github.io/Inputmask/). - [yiisoft/yii2-mssql](https://www.yiiframework.com/extension/yiisoft/yii2-mssql): provides the support for using [MSSQL](https://www.microsoft.com/sql-server/). - [yiisoft/yii2-oracle](https://www.yiiframework.com/extension/yiisoft/yii2-oracle): diff --git a/docs/guide/structure-filters.md b/docs/guide/structure-filters.md index 8fb6d376ffe..c136c92ed31 100644 --- a/docs/guide/structure-filters.md +++ b/docs/guide/structure-filters.md @@ -322,7 +322,7 @@ public function behaviors() ### [[yii\filters\Cors|Cors]] -Cross-origin resource sharing [CORS](https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS) is a mechanism that allows many resources (e.g. fonts, JavaScript, etc.) +Cross-origin resource sharing [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) is a mechanism that allows many resources (e.g. fonts, JavaScript, etc.) on a Web page to be requested from another domain outside the domain the resource originated from. In particular, JavaScript's AJAX calls can use the XMLHttpRequest mechanism. Such "cross-domain" requests would otherwise be forbidden by Web browsers, per the same origin security policy. @@ -350,13 +350,13 @@ Also check the section on [REST Controllers](rest-controllers.md#cors) if you wa The Cors filtering could be tuned using the [[yii\filters\Cors::$cors|$cors]] property. -* `cors['Origin']`: array used to define allowed origins. Can be `['*']` (everyone) or `['http://www.myserver.net', 'http://www.myotherserver.com']`. Default to `['*']`. +* `cors['Origin']`: array used to define allowed origins. Can be `['*']` (everyone) or `['https://www.myserver.net', 'https://www.myotherserver.com']`. Default to `['*']`. * `cors['Access-Control-Request-Method']`: array of allowed verbs like `['GET', 'OPTIONS', 'HEAD']`. Default to `['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS']`. * `cors['Access-Control-Request-Headers']`: array of allowed headers. Can be `['*']` all headers or specific ones `['X-Request-With']`. Default to `['*']`. * `cors['Access-Control-Allow-Credentials']`: define if current request can be made using credentials. Can be `true`, `false` or `null` (not set). Default to `null`. * `cors['Access-Control-Max-Age']`: define lifetime of pre-flight request. Default to `86400`. -For example, allowing CORS for origin : `http://www.myserver.net` with method `GET`, `HEAD` and `OPTIONS` : +For example, allowing CORS for origin : `https://www.myserver.net` with method `GET`, `HEAD` and `OPTIONS` : ```php use yii\filters\Cors; @@ -368,7 +368,7 @@ public function behaviors() [ 'class' => Cors::class, 'cors' => [ - 'Origin' => ['http://www.myserver.net'], + 'Origin' => ['https://www.myserver.net'], 'Access-Control-Request-Method' => ['GET', 'HEAD', 'OPTIONS'], ], ], @@ -389,7 +389,7 @@ public function behaviors() [ 'class' => Cors::class, 'cors' => [ - 'Origin' => ['http://www.myserver.net'], + 'Origin' => ['https://www.myserver.net'], 'Access-Control-Request-Method' => ['GET', 'HEAD', 'OPTIONS'], ], 'actions' => [ 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/test-fixtures.md b/docs/guide/test-fixtures.md index 85a191c0f59..414a3db9e3f 100644 --- a/docs/guide/test-fixtures.md +++ b/docs/guide/test-fixtures.md @@ -80,7 +80,7 @@ values into the rows when the fixture is being loaded. > Tip: You may customize the location of the data file by setting the [[yii\test\ActiveFixture::dataFile]] property. > You may also override [[yii\test\ActiveFixture::getData()]] to provide the data. -As we described earlier, a fixture may depend on other fixtures. For example, a `UserProfileFixture` may need to depends on `UserFixture` +As we described earlier, a fixture may depend on other fixtures. For example, a `UserProfileFixture` may need to depend on `UserFixture` because the user profile table contains a foreign key pointing to the user table. The dependency is specified via the [[yii\test\Fixture::depends]] property, like the following, @@ -96,7 +96,7 @@ class UserProfileFixture extends ActiveFixture } ``` -The dependency also ensures, that the fixtures are loaded and unloaded in a well defined order. In the above example `UserFixture` will +The dependency also ensures, that the fixtures are loaded and unloaded in a well-defined order. In the above example `UserFixture` will always be loaded before `UserProfileFixture` to ensure all foreign key references exist and will be unloaded after `UserProfileFixture` has been unloaded for the same reason. @@ -243,7 +243,7 @@ Fixture classes name should not be plural. ### Loading fixtures -Fixture classes should be suffixed by `Fixture`. By default fixtures will be searched under `tests\unit\fixtures` namespace, you can +Fixture classes should be suffixed by `Fixture`. By default, fixtures will be searched under `tests\unit\fixtures` namespace, you can change this behavior with config or command options. You can exclude some fixtures due load or unload by specifying `-` before its name like `-User`. To load fixture, run the following command: @@ -309,7 +309,7 @@ Same command options like: `namespace`, `globalFixtures` also can be applied to ### Configure Command Globally While command line options allow us to configure the fixture command -on-the-fly, sometimes we may want to configure the command once for all. For example you can configure +on-the-fly, sometimes we may want to configure the command once for all. For example, you can configure different fixture path as follows: ``` diff --git a/docs/guide/test-overview.md b/docs/guide/test-overview.md index 1bbfe853a58..5a8a44b7662 100644 --- a/docs/guide/test-overview.md +++ b/docs/guide/test-overview.md @@ -61,7 +61,7 @@ There's nothing wrong in creating tests covering behavior of existing implementa In some cases any form of automated testing could be overkill: -- Project is simple and isn't getting anymore complex. +- Project is simple and isn't getting any more complex. - It's a one-time project that will no longer be worked on. Still if you have time it's good to automate testing in these cases as well. diff --git a/docs/guide/tutorial-console.md b/docs/guide/tutorial-console.md index 6df5b39bedd..fe4843511f3 100644 --- a/docs/guide/tutorial-console.md +++ b/docs/guide/tutorial-console.md @@ -1,7 +1,7 @@ Console applications ==================== -Besides the rich features for building web applications, Yii also has full-featured support for console applications +Besides, the rich features for building web applications, Yii also has full-featured support for console applications which are mainly used to create background and maintenance tasks that need to be performed for a website. The structure of console applications is very similar to a Yii web application. It consists of one @@ -113,11 +113,11 @@ Console command completion --------------- Auto-completion of command arguments is a useful thing when working with the shell. -Since version 2.0.11, the `./yii` command provides auto completion for the Bash and ZSH out of the box. +Since version 2.0.11, the `./yii` command provides auto-completion for the Bash and ZSH out of the box. ### Bash completion -Make sure bash completion is installed. For most of installations it is available by default. +Make sure bash completion is installed. For most of the installations it is available by default. Place the completion script in `/etc/bash_completion.d/`: diff --git a/docs/guide/tutorial-core-validators.md b/docs/guide/tutorial-core-validators.md index 3b63fa2689d..7a80507717c 100644 --- a/docs/guide/tutorial-core-validators.md +++ b/docs/guide/tutorial-core-validators.md @@ -53,7 +53,7 @@ This validator checks if the input value is a boolean. This validator is usually used together with [[yii\captcha\CaptchaAction]] and [[yii\captcha\Captcha]] to make sure an input is the same as the verification code displayed by [[yii\captcha\Captcha|CAPTCHA]] widget. -- `caseSensitive`: whether the comparison of the verification code is case sensitive. Defaults to `false`. +- `caseSensitive`: whether the comparison of the verification code is case-sensitive. Defaults to `false`. - `captchaAction`: the [route](structure-controllers.md#routes) corresponding to the [[yii\captcha\CaptchaAction|CAPTCHA action]] that renders the CAPTCHA image. Defaults to `'site/captcha'`. - `skipOnEmpty`: whether the validation can be skipped if the input is empty. Defaults to `false`, @@ -114,7 +114,7 @@ you can use a combination of compare and date validator like the following: ``` As validators are executed in the order they are specified this will first validate that the values entered in -`fromDate` and `toDate` are valid date values and if so, they will be converted into a machine readable format. +`fromDate` and `toDate` are valid date values and if so, they will be converted into a machine-readable format. Afterwards these two values are compared with the compare validator. Client validation is not enabled as this will only work on the server-side because the date validator currently does not provide client validation, so [[yii\validators\CompareValidator::$enableClientValidation|$enableClientValidation]] @@ -162,7 +162,7 @@ specified via [[yii\validators\DateValidator::timestampAttribute|timestampAttrib [[yii\validators\DateValidator::$max|maximum]] timestamp. In case the input is optional you may also want to add a [default value filter](#default) in addition to the date validator -to ensure empty input is stored as `null`. Otherwise you may end up with dates like `0000-00-00` in your database +to ensure empty input is stored as `null`. Otherwise, you may end up with dates like `0000-00-00` in your database or `1970-01-01` in the input field of a date picker. ```php @@ -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. @@ -418,7 +420,7 @@ back to the attribute being validated. - `filter`: a PHP callback that defines a filter. This can be a global function name, an anonymous function, etc. The function signature must be `function ($value) { return $newValue; }`. This property must be set. - `skipOnArray`: whether to skip the filter if the input value is an array. Defaults to `false`. - Note that if the filter cannot handle array input, you should set this property to be `true`. Otherwise some + Note that if the filter cannot handle array input, you should set this property to be `true`. Otherwise, some PHP error might occur. > Tip: If you want to trim input values, you may directly use the [trim](#trim) validator. @@ -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-docker.md b/docs/guide/tutorial-docker.md index 1ad01b07212..8849c6682ed 100644 --- a/docs/guide/tutorial-docker.md +++ b/docs/guide/tutorial-docker.md @@ -24,7 +24,7 @@ CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS This means your Docker daemon is up and running. -Additionally run `docker-compose version`, your output should look like this +Additionally, run `docker-compose version`, your output should look like this ``` docker-compose version 1.20.0, build unknown diff --git a/docs/guide/tutorial-i18n.md b/docs/guide/tutorial-i18n.md index 1bfbb566272..f74104a0823 100644 --- a/docs/guide/tutorial-i18n.md +++ b/docs/guide/tutorial-i18n.md @@ -156,7 +156,7 @@ However, without this configuration the category would be mapped to `@app/messag ##### Other storage types -Besides storing the messages in PHP files, you may also use the following message sources to store translated messages +Besides, storing the messages in PHP files, you may also use the following message sources to store translated messages in different storage: - [[yii\i18n\GettextMessageSource]] uses GNU Gettext MO or PO files to maintain translated messages. @@ -197,7 +197,7 @@ You can use either *named placeholders* or *positional placeholders*, but not bo The previous example shows how you can use named placeholders. That is, each placeholder is written in the format of `{name}`, and you provide an associative array whose keys are the placeholder names -(without the curly brackets) and whose values are the corresponding values placeholder to be replaced with. +(without the curly brackets) and whose values are the corresponding values' placeholder to be replaced with. Positional placeholders use zero-based integer sequence as names which are replaced by the provided values according to their positions in the call of `Yii::t()`. In the following example, the positional placeholders @@ -337,7 +337,7 @@ The parameter value should be treated as a number and formatted as a spellout. F echo \Yii::t('app', '{n,number} is spelled as {n,spellout}', ['n' => 42]); ``` -By default the number is spelled out as cardinal. It could be changed: +By default, the number is spelled out as cardinal. It could be changed: ```php // may produce "I am forty-seventh agent" @@ -683,7 +683,7 @@ If [[yii\i18n\MissingTranslationEvent::translatedMessage]] is set by the event h Translations can be stored in [[yii\i18n\PhpMessageSource|php files]], [[yii\i18n\GettextMessageSource|.po files]] or in a [[yii\i18n\DbMessageSource|database]]. See specific classes for additional options. -First of all you need to create a configuration file. Decide where you want to store it and then issue the command +First you need to create a configuration file. Decide where you want to store it and then issue the command ```bash ./yii message/config-template path/to/config.php diff --git a/docs/guide/tutorial-mailing.md b/docs/guide/tutorial-mailing.md index 98ee1e82981..71b543f43a7 100644 --- a/docs/guide/tutorial-mailing.md +++ b/docs/guide/tutorial-mailing.md @@ -8,7 +8,7 @@ only the content composition functionality and basic interface. Actual mail send be provided by the extension, because different projects may require its different implementation and it usually depends on the external services and libraries. -For the most common cases you can use [yii2-swiftmailer](https://www.yiiframework.com/extension/yiisoft/yii2-swiftmailer) official extension. +For the most common cases you can use [yii2-symfonymailer](https://www.yiiframework.com/extension/yiisoft/yii2-symfonymailer) official extension. Configuration @@ -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/tutorial-performance-tuning.md b/docs/guide/tutorial-performance-tuning.md index 104a055fb31..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). @@ -132,7 +132,7 @@ You may also store session data in a cache by using [[yii\web\CacheSession]]. In when the storage limit is reached. For this reason, you should mainly use those cache storage that do not enforce storage limit. -If you have [Redis](http://redis.io/) on your server, it is highly recommended you use it as session storage by using +If you have [Redis](https://redis.io/) on your server, it is highly recommended you use it as session storage by using [[yii\redis\Session]]. @@ -218,7 +218,7 @@ The following profiling tools may be useful: - [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) -- [XDebug profiler](http://xdebug.org/docs/profiler) +- [XDebug profiler](https://xdebug.org/docs/profiler) ## Prepare application for scaling diff --git a/docs/guide/tutorial-shared-hosting.md b/docs/guide/tutorial-shared-hosting.md index 5e93fdd2a5f..9b3109a15ff 100644 --- a/docs/guide/tutorial-shared-hosting.md +++ b/docs/guide/tutorial-shared-hosting.md @@ -58,7 +58,7 @@ In case of nginx you should not need any extra config files. In order to run Yii, your webserver must meet its requirements. The very minimum requirement is PHP 5.4. In order to check the requirements copy `requirements.php` from your root directory into the webroot directory and run it via -browser using `http://example.com/requirements.php` URL. Don't forget to delete the file afterwards. +browser using `https://example.com/requirements.php` URL. Don't forget to delete the file afterwards. ## Deploying an advanced project template 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 5561df9c450..496f6aa121a 100644 --- a/framework/BaseYii.php +++ b/framework/BaseYii.php @@ -1,8 +1,8 @@ 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) +- Bug #14388: Fixed fixture loading order in output message (manchenkoff) +- 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 #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 +---------------------- + - Bug #19235: Fix return type compatibility of `yii\web\SessionIterator` class methods for PHP 8.1 (virtual-designer) +- Bug #19237: Fix OCI PHP 8.1 passing `null` to trim() (longthanhtran) +- Bug #19243: Handle `finfo_open` for tar.xz as `application/octet-stream` on PHP 8.1 (longthanhtran) - Bug #19256: Pass missed `$view` to user's callback in `yii\validators\InlineValidator::clientValidateAttribute()` (WinterSilence) -- Enh #19270: Replace deprecated `scss` converter in `yii\web\AssetConverter::$commands` (WinterSilence) -- Enh #19254: Support specifying custom characters for `yii.validation.trim()` and replace deprecated `jQuery.trim()` (WinterSilence) +- Bug #19259: Fix `yii\log\FileTarget` locking and always rotate files only by copy (bizley, mikehaertl) +- Bug #19272: Fix bug in dirty attributes check on multidimensional array (speedplli) - Bug #19291: Reset errors and validators in `yii\base\Model::__clone()` (WinterSilence) -- Bug #19290: Fix `Request::getHostInfo()` doesn’t return the port if a Host header is used (lesha724) -- Enh #19295: Added alias `text/rtf` for mime-type `application/rtf` (lesha724) -- Enh #19308: Add `yii\web\UploadedFile::$fullPath` represents 'full_path' key added in PHP 8.1 (WinterSilence) - Bug #19303: Fix serialization in `yii\caching\Dependency::generateReusableHash()` (WinterSilence) -- Enh #19304: Add filtering validator `yii\validators\TrimValidator` (WinterSilence) -- Enh #19309: Optimize `yii\base\Model::attributes()` (WinterSilence) +- Bug #19312: Fix PHP 8.1 error when passing null to `yii\helpers\BaseInflector` (WinterSilence) - Bug #19322: Revert force setting value to empty string in case it's `null` in `yii\validators\FilterValidator::validateAttribute()` (bizley) - Bug #19324: Fix `yii\helpers\BaseHtml::renderSelectOptions()` giving wrong selection for boolean attributes (adnandautovic) -- Bug #19329: Fix `yii\web\GroupUrlRule` to properly normalize prefix (bizley) - Bug #19328: Passing null to parameter #1 ($string) of type string is deprecated in `yii\db\oci\Schema` (Arkeins) -- Bug #19237: Fix OCI PHP 8.1 passing `null` to trim() (longthanhtran) -- Bug #19312: Fix PHP 8.1 error when passing null to `yii\helpers\BaseInflector` (WinterSilence) +- Bug #19329: Fix `yii\web\GroupUrlRule` to properly normalize prefix (bizley) +- Bug #19349: Fix PHP 8.1 error when attribute and label of `yii\grid\DataColumn` are empty (githubjeka) - Bug #19368: Fix PHP 8.1 error when `$fileMimeType` is `null` in `yii\validators\FileValidator::validateMimeType()` (bizley) +- Bug #19380: Fix PHP 8.1 passing non string to trim() in `yii\db\Query` (wa1kb0y) +- Bug #19386: Fix recursive calling `yii\helpers\BaseArrayHelper::htmlDecode()` (WinterSilence) +- Bug #19400: Fix passing null in `yii\web\Response::redirect()` (bizley) +- Bug #19402: Add shutdown event and fix working directory in `yii\base\ErrorHandler` (WinterSilence) +- Bug #19403: Fix types in `yii\web\SessionIterator` (WinterSilence) +- Bug #19407: Fix `yii\validators\UniqueValidator` and `yii\validators\ExistValidator` to respect `skipOnError` option for target attributes (bizley) +- Bug #19418: Fix `yii\filters\auth\CompositeAuth` ignoring `only` and `except` options (lesha724) +- Bug #19445: Fix caching in `yii\i18n\Formatter::getUnitMessage()` (WinterSilence) +- Bug #19454: Fix PDO exception code not properly passed to `yii\db\Exception` (Roguyt) +- Bug #19462: Fix validator client options to encode HTML tags (bizley) +- Bug #19467: Revert changes in `Inflector::camel2words()` introduced in #19204 (samdark) +- Bug #19469: Fix a virtual relation not working because of new isset checks in `\yii\db\ActiveRelationTrait` (wvanheumen) +- Bug #19471: Enable console commands on hosting with disabled `exec()` function (WinterSilence, lubosdz) +- Bug #19477: Cast shell_exec() output to string (schmunk42) +- Bug #19481: Exception is always empty in ErrorHandler when handling fatal error (Renkas) +- Enh #19254: Support specifying custom characters for `yii.validation.trim()` and replace deprecated `jQuery.trim()` (WinterSilence) +- Enh #19270: Replace deprecated `scss` converter in `yii\web\AssetConverter::$commands` (WinterSilence) +- Enh #19295: Add alias `text/rtf` for mime-type `application/rtf` (lesha724) +- Enh #19304: Add filtering validator `yii\validators\TrimValidator` (WinterSilence) +- Enh #19308: Add `yii\web\UploadedFile::$fullPath` represents 'full_path' key added in PHP 8.1 (WinterSilence) +- Enh #19309: Optimize `yii\base\Model::attributes()` (WinterSilence) +- Enh #19318: Add support for typecasting PHP 8.1 enums (EtienneBruines) +- Enh #19384: Normalize `setBodyParams()` and `getBodyParam()` in `yii\web\Request` (WinterSilence, albertborsos) +- Enh #19401: Delay `exit(1)` in `yii\base\ErrorHandler::handleFatalError` (arrilot) +- Enh #19416: Update and improve configurations for `yii\console\controllers\MessageController` (WinterSilence) +- Enh #19420: Update list of JS callbacks in `yii\widgets\MaskedInput` (WinterSilence) +- Enh #19437: Add support to specify request port by trusted proxies in `\yii\web\Request::getServerPort()` (rhertogh) 2.0.45 February 11, 2022 @@ -2605,14 +2750,14 @@ Yii Framework 2 Change Log - Bug: `yii\helpers\Json::encode()`` did not handle objects that implement `JsonSerializable` interface correctly (cebe) - Bug: Fixed issue with tabular input on `yii\widgets\ActiveField::radio()` and `yii\widgets\ActiveField::checkbox()` (jom) - Bug: Fixed the issue that query cache returns the same data for the same SQL but different query methods (qiangxue) -- Bug: Fixed URL parsing so it's now properly giving 404 for URLs like `http://example.com//////site/about` (samdark) +- Bug: Fixed URL parsing so it's now properly giving 404 for URLs like `https://example.com//////site/about` (samdark) - Bug: Fixed `yii\console\controllers\HelpController::getModuleCommands()` issue where it attempts to scan a module's controller directory when it doesn't exist (jom) - Bug: Fixed an issue with FileHelper and not accessible directories which resulted in endless loop (cebe) - Bug: Fixed `yii\base\Model::load()` returned `true` if `$data` and `formName` were empty (samdark) - Bug: Fixed issue with `yii\db\ActiveRelationTrait` preventing `yii\db\ActiveQuery` from clearing events and behaviors on clone (jom) - Bug: `yii\db\Query::queryScalar()` wasn't making `SELECT DISTINCT` queries subqueries (jom) - Bug: Fixed use `$files` instead of `self::$_files[$key]` to allow inheritance (pgaultier) -- Enh #46: Added Image extension based on [Imagine library](http://imagine.readthedocs.org) (tonydspaniard) +- Enh #46: Added Image extension based on [Imagine library](https://imagine.readthedocs.io/) (tonydspaniard) - Enh #364: Improve `yii\helpers\Inflector::slug()` with `intl` transliteration. Improved transliteration char map. (tonydspaniard) - Enh #497: Removed `yii\log\Target::logUser` and added `yii\log\Target::prefix` to support customizing message prefix (qiangxue) - Enh #499: Decoupled `Rule` from RBAC `Item` (samdark, qiangxue) diff --git a/framework/README.md b/framework/README.md index 161f8d13a01..4ff5e6d5a28 100644 --- a/framework/README.md +++ b/framework/README.md @@ -10,7 +10,7 @@ For license information check the [LICENSE](LICENSE.md)-file. Installation ------------ -The preferred way to install the Yii framework is through [composer](http://getcomposer.org/download/). +The preferred way to install the Yii framework is through [composer](https://getcomposer.org/download/). Refer to [Bower and NPM Assets installation](https://www.yiiframework.com/doc/guide/2.0/en/structure-assets#bower-npm-assets) to select an asset installation method. diff --git a/framework/UPGRADE.md b/framework/UPGRADE.md index 81a09a6ad0c..3a9569a9822 100644 --- a/framework/UPGRADE.md +++ b/framework/UPGRADE.md @@ -12,7 +12,7 @@ Upgrading in general is as simple as updating your dependency in your composer.j running `composer update`. In a big application however there may be more things to consider, which are explained in the following. -> Note: This document assumes you have composer [installed globally](http://www.yiiframework.com/doc-2.0/guide-start-installation.html#installing-composer) +> Note: This document assumes you have composer [installed globally](https://www.yiiframework.com/doc-2.0/guide-start-installation.html#installing-composer) so that you can run the `composer` command. If you have a `composer.phar` file inside of your project you need to replace `composer` with `php composer.phar` in the following. @@ -51,6 +51,61 @@ 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 +----------------------- + +* Changes in `Inflector::camel2words()` introduced in 2.0.45 were reverted, so it works as in pre-2.0.45. If you need + 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 ----------------------- @@ -78,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 ----------------------- @@ -459,7 +517,7 @@ Upgrade from Yii 2.0.13 * `yii\db\QueryBuilder::conditionBuilders` property and method-based condition builders are no longer used. Class-based conditions and builders are introduced instead to provide more flexibility, extensibility and space to customization. In case you rely on that property or override any of default condition builders, follow the - special [guide article](http://www.yiiframework.com/doc-2.0/guide-db-query-builder.html#adding-custom-conditions-and-expressions) + special [guide article](https://www.yiiframework.com/doc-2.0/guide-db-query-builder.html#adding-custom-conditions-and-expressions) to update your code. * Protected method `yii\db\ActiveQueryTrait::createModels()` does not apply indexes as defined in `indexBy` property anymore. @@ -490,7 +548,7 @@ Upgrade from Yii 2.0.12 was insecure as the header could have been set by a malicious client on a non-HTTPS connection. With 2.0.13 Yii adds support for configuring trusted proxies. If your application runs behind a reverse proxy and relies on `getIsSecureConnection()` to return the value form the `X-Forwarded-Proto` header you need to explicitly allow - this in the Request configuration. See the [guide](http://www.yiiframework.com/doc-2.0/guide-runtime-requests.html#trusted-proxies) for more information. + this in the Request configuration. See the [guide](https://www.yiiframework.com/doc-2.0/guide-runtime-requests.html#trusted-proxies) for more information. This setting also affects you when Yii is running on IIS webserver, which sets the `X-Rewrite-Url` header. This header is now filtered by default and must be listed in trusted hosts to be detected by Yii: @@ -683,7 +741,7 @@ Upgrade from Yii 2.0.6 initialization to support wider range of allowed characters. Because of this change: - You are required to flush your application cache to remove outdated `UrlRule` serialized objects. - See the [Cache Flushing Guide](http://www.yiiframework.com/doc-2.0/guide-caching-data.html#cache-flushing) + See the [Cache Flushing Guide](https://www.yiiframework.com/doc-2.0/guide-caching-data.html#cache-flushing) - If you implement `parseRequest()` or `createUrl()` and rely on parameter names, call `substitutePlaceholderNames()` in order to replace temporary IDs with parameter names after doing matching. @@ -759,7 +817,7 @@ If you've extended `yii\base\Security` to override any of the config constants y Upgrade from Yii 2.0.0 ---------------------- -* Upgraded Twitter Bootstrap to [version 3.3.x](http://blog.getbootstrap.com/2014/10/29/bootstrap-3-3-0-released/). +* Upgraded Twitter Bootstrap to [version 3.3.x](https://blog.getbootstrap.com/2014/10/29/bootstrap-3-3-0-released/). If you need to use an older version (i.e. stick with 3.2.x) you can specify that in your `composer.json` by adding the following line in the `require` section: diff --git a/framework/Yii.php b/framework/Yii.php index 4226770df37..d02b95a231a 100644 --- a/framework/Yii.php +++ b/framework/Yii.php @@ -1,8 +1,8 @@ * @since 2.0 */ @@ -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.captcha.js b/framework/assets/yii.captcha.js index 7293183e76d..930d43d7e83 100644 --- a/framework/assets/yii.captcha.js +++ b/framework/assets/yii.captcha.js @@ -3,9 +3,9 @@ * * This is the JavaScript widget used by the yii\captcha\Captcha widget. * - * @link http://www.yiiframework.com/ + * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC - * @license http://www.yiiframework.com/license/ + * @license https://www.yiiframework.com/license/ * @author Qiang Xue * @since 2.0 */ diff --git a/framework/assets/yii.gridView.js b/framework/assets/yii.gridView.js index 25ff9600e10..f02d4d95e94 100644 --- a/framework/assets/yii.gridView.js +++ b/framework/assets/yii.gridView.js @@ -3,9 +3,9 @@ * * This is the JavaScript widget used by the yii\grid\GridView widget. * - * @link http://www.yiiframework.com/ + * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC - * @license http://www.yiiframework.com/license/ + * @license https://www.yiiframework.com/license/ * @author Qiang Xue * @since 2.0 */ @@ -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/assets/yii.js b/framework/assets/yii.js index b22c364c6fc..6384d07d172 100644 --- a/framework/assets/yii.js +++ b/framework/assets/yii.js @@ -1,9 +1,9 @@ /** * Yii JavaScript module. * - * @link http://www.yiiframework.com/ + * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC - * @license http://www.yiiframework.com/license/ + * @license https://www.yiiframework.com/license/ * @author Qiang Xue * @since 2.0 */ @@ -511,7 +511,7 @@ window.yii = (function ($) { return false; } - // http://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex + // https://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex/6969486#6969486 function escapeRegExp(str) { return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); } diff --git a/framework/assets/yii.validation.js b/framework/assets/yii.validation.js index c4185f91849..2cae037e3c1 100644 --- a/framework/assets/yii.validation.js +++ b/framework/assets/yii.validation.js @@ -3,9 +3,9 @@ * * This JavaScript module provides the validation methods for the built-in validators. * - * @link http://www.yiiframework.com/ + * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC - * @license http://www.yiiframework.com/license/ + * @license https://www.yiiframework.com/license/ * @author Qiang Xue * @since 2.0 */ diff --git a/framework/base/Action.php b/framework/base/Action.php index 0088f908d33..45d95c59cbf 100644 --- a/framework/base/Action.php +++ b/framework/base/Action.php @@ -1,8 +1,8 @@ name` and `$model->email`. * @@ -46,31 +48,26 @@ * ->validate(); * ``` * - * DynamicModel implements the above ad-hoc data validation feature by supporting the so-called - * "dynamic attributes". It basically allows an attribute to be defined dynamically through its constructor - * or [[defineAttribute()]]. - * * @author Qiang Xue * @since 2.0 */ class DynamicModel extends Model { + /** + * @var mixed[] dynamic attribute values (name => value). + */ private $_attributes = []; /** - * Array of the dynamic attribute labels. - * Used to as form field labels and in validation errors. - * - * @see attributeLabels() - * @see setAttributeLabels() - * @see setAttributeLabel() + * @var string[] dynamic attribute labels (name => label). + * Used as form field labels and in validation error messages. * @since 2.0.35 */ private $_attributeLabels = []; /** - * Constructors. - * @param array $attributes the dynamic attributes (name-value pairs, or names) being defined + * Constructor. + * @param array $attributes the attributes (name-value pairs, or names) being defined. * @param array $config the configuration array to be applied to this object. */ public function __construct(array $attributes = [], $config = []) @@ -151,7 +148,7 @@ public function canSetProperty($name, $checkVars = true, $checkBehaviors = true) /** * Returns a value indicating whether the model has an attribute with the specified name. - * @param string $name the name of the attribute + * @param string $name the name of the attribute. * @return bool whether the model has an attribute with the specified name. * @since 2.0.16 */ @@ -162,8 +159,8 @@ public function hasAttribute($name) /** * Defines an attribute. - * @param string $name the attribute name - * @param mixed $value the attribute value + * @param string $name the attribute name. + * @param mixed $value the attribute value. */ public function defineAttribute($name, $value = null) { @@ -172,7 +169,7 @@ public function defineAttribute($name, $value = null) /** * Undefines an attribute. - * @param string $name the attribute name + * @param string $name the attribute name. */ public function undefineAttribute($name) { @@ -183,15 +180,15 @@ public function undefineAttribute($name) * Adds a validation rule to this model. * You can also directly manipulate [[validators]] to add or remove validation rules. * This method provides a shortcut. - * @param string|array $attributes the attribute(s) to be validated by the rule + * @param string|array $attributes the attribute(s) to be validated by the rule. * @param string|Validator|\Closure $validator the validator. This can be either: * * a built-in validator name listed in [[builtInValidators]]; * * a method name of the model class; * * an anonymous function; * * a validator class name. * * a Validator. - * @param array $options the options (name-value pairs) to be applied to the validator - * @return $this the model itself + * @param array $options the options (name-value pairs) to be applied to the validator. + * @return $this */ public function addRule($attributes, $validator, $options = []) { @@ -204,6 +201,7 @@ public function addRule($attributes, $validator, $options = []) } $validators->append($validator); + $this->defineAttributesByValidator($validator); return $this; } @@ -212,9 +210,9 @@ public function addRule($attributes, $validator, $options = []) * Validates the given data with the specified validation rules. * This method will create a DynamicModel instance, populate it with the data to be validated, * create the specified validation rules, and then validate the data using these rules. - * @param array $data the data (name-value pairs) to be validated + * @param array $data the data (name-value pairs) to be validated. * @param array $rules the validation rules. Please refer to [[Model::rules()]] on the format of this parameter. - * @return static the model instance that contains the data being validated + * @return static the model instance that contains the data being validated. * @throws InvalidConfigException if a validation rule is not specified correctly. */ public static function validateData(array $data, $rules = []) @@ -226,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.'); } @@ -240,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} */ @@ -249,13 +262,10 @@ public function attributes() } /** - * Sets the attribute labels in a massive way. - * - * @see attributeLabels() - * @since 2.0.35 - * - * @param array $labels Array of attribute labels + * Sets the labels for all attributes. + * @param string[] $labels attribute labels. * @return $this + * @since 2.0.35 */ public function setAttributeLabels(array $labels = []) { @@ -265,14 +275,11 @@ public function setAttributeLabels(array $labels = []) } /** - * Sets a label for an attribute. - * - * @see attributeLabels() - * @since 2.0.35 - * - * @param string $attribute Attribute name - * @param string $label Attribute label value + * Sets a label for a single attribute. + * @param string $attribute attribute name. + * @param string $label attribute label value. * @return $this + * @since 2.0.35 */ public function setAttributeLabel($attribute, $label) { @@ -282,10 +289,10 @@ public function setAttributeLabel($attribute, $label) } /** - * {@inheritDoc} + * {@inheritdoc} */ public function attributeLabels() { - return array_merge(parent::attributeLabels(), $this->_attributeLabels); + return $this->_attributeLabels; } } diff --git a/framework/base/ErrorException.php b/framework/base/ErrorException.php index 24fdb6e8d7d..8f051a57e1c 100644 --- a/framework/base/ErrorException.php +++ b/framework/base/ErrorException.php @@ -1,8 +1,8 @@ memoryReserveSize > 0) { $this->_memoryReserve = str_repeat('x', $this->memoryReserveSize); } + // to restore working directory in shutdown handler + if (PHP_SAPI !== 'cli') { + $this->_workingDirectory = getcwd(); + } register_shutdown_function([$this, 'handleFatalError']); $this->_registered = true; } @@ -97,6 +112,8 @@ public function register() public function unregister() { if ($this->_registered) { + $this->_memoryReserve = null; + $this->_workingDirectory = null; restore_error_handler(); restore_exception_handler(); $this->_registered = false; @@ -264,36 +281,59 @@ public function handleFatalError() { unset($this->_memoryReserve); + if (isset($this->_workingDirectory)) { + // fix working directory for some Web servers e.g. Apache + chdir($this->_workingDirectory); + // flush memory + unset($this->_workingDirectory); + } + + $error = error_get_last(); + if ($error === null) { + return; + } + // load ErrorException manually here because autoloading them will not work // when error occurs while autoloading a class if (!class_exists('yii\\base\\ErrorException', false)) { require_once __DIR__ . '/ErrorException.php'; } + if (!ErrorException::isFatalError($error)) { + return; + } - $error = error_get_last(); + if (!empty($this->_hhvmException)) { + $this->exception = $this->_hhvmException; + } else { + $this->exception = new ErrorException( + $error['message'], + $error['type'], + $error['type'], + $error['file'], + $error['line'] + ); + } + unset($error); - if (ErrorException::isFatalError($error)) { - if (!empty($this->_hhvmException)) { - $exception = $this->_hhvmException; - } else { - $exception = new ErrorException($error['message'], $error['type'], $error['type'], $error['file'], $error['line']); - } - $this->exception = $exception; + $this->logException($this->exception); - $this->logException($exception); + if ($this->discardExistingOutput) { + $this->clearOutput(); + } + $this->renderException($this->exception); - if ($this->discardExistingOutput) { - $this->clearOutput(); - } - $this->renderException($exception); + // need to explicitly flush logs because exit() next will terminate the app immediately + Yii::getLogger()->flush(true); + if (defined('HHVM_VERSION')) { + flush(); + } - // need to explicitly flush logs because exit() next will terminate the app immediately - Yii::getLogger()->flush(true); - if (defined('HHVM_VERSION')) { - flush(); - } + $this->trigger(static::EVENT_SHUTDOWN); + + // ensure it is called after user-defined shutdown functions + register_shutdown_function(function () { exit(1); - } + }); } /** @@ -337,6 +377,7 @@ public function clearOutput() * This method can be used to convert exceptions inside of methods like `__toString()` * to PHP errors because exceptions cannot be thrown inside of them. * @param \Throwable $exception the exception to convert to a PHP error. + * @return never */ public static function convertExceptionToError($exception) { diff --git a/framework/base/Event.php b/framework/base/Event.php index 9fd94367d15..ac2fdc43466 100644 --- a/framework/base/Event.php +++ b/framework/base/Event.php @@ -1,8 +1,8 @@ [ 'Email address is invalid.', ] ] ``` . * @property-read array $firstErrors The first errors. The array keys are the attribute names, and the array * values are the corresponding error messages. An empty array will be returned if there is no error. - * @property-read ArrayIterator $iterator An iterator for traversing the items in the list. * @property string $scenario The scenario that this model is in. Defaults to [[SCENARIO_DEFAULT]]. * @property-read ArrayObject|\yii\validators\Validator[] $validators All the validators declared in the * model. @@ -268,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; } /** @@ -780,6 +787,7 @@ public function setScenario($value) /** * Returns the attribute names that are safe to be massively assigned in the current scenario. + * * @return string[] safe attribute names */ public function safeAttributes() @@ -791,7 +799,11 @@ public function safeAttributes() } $attributes = []; foreach ($scenarios[$scenario] as $attribute) { - if (strncmp($attribute, '!', 1) !== 0 && !in_array('!' . $attribute, $scenarios[$scenario])) { + if ( + $attribute !== '' + && strncmp($attribute, '!', 1) !== 0 + && !in_array('!' . $attribute, $scenarios[$scenario]) + ) { $attributes[] = $attribute; } } diff --git a/framework/base/ModelEvent.php b/framework/base/ModelEvent.php index fffcfe19994..7e45bfb49b6 100644 --- a/framework/base/ModelEvent.php +++ b/framework/base/ModelEvent.php @@ -1,8 +1,8 @@ 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/behaviors/AttributesBehavior.php b/framework/behaviors/AttributesBehavior.php index e1b0f874ea5..df093864a34 100644 --- a/framework/behaviors/AttributesBehavior.php +++ b/framework/behaviors/AttributesBehavior.php @@ -1,8 +1,8 @@ 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/CacheInterface.php b/framework/caching/CacheInterface.php index 996dfe1b4ce..0ff387eff1c 100644 --- a/framework/caching/CacheInterface.php +++ b/framework/caching/CacheInterface.php @@ -1,8 +1,8 @@ isVarbinaryDataField() ? 'convert(nvarchar(max),[data]) data' : 'data'; + return $this->isVarbinaryDataField() ? 'CONVERT(VARCHAR(MAX), [[data]]) data' : 'data'; } /** diff --git a/framework/caching/DbDependency.php b/framework/caching/DbDependency.php index f16ef4a1be0..43a51d9266e 100644 --- a/framework/caching/DbDependency.php +++ b/framework/caching/DbDependency.php @@ -1,8 +1,8 @@ db->driverName === 'mysql') { - // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci + // https://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; } diff --git a/framework/caching/migrations/schema-mssql.sql b/framework/caching/migrations/schema-mssql.sql index fc6670fe613..1ef982b1e6b 100644 --- a/framework/caching/migrations/schema-mssql.sql +++ b/framework/caching/migrations/schema-mssql.sql @@ -3,9 +3,9 @@ * * @author Qiang Xue * @author Misbahul D Munir - * @link http://www.yiiframework.com/ + * @link https://www.yiiframework.com/ * @copyright 2008 Yii Software LLC - * @license http://www.yiiframework.com/license/ + * @license https://www.yiiframework.com/license/ * @since 2.0.7 */ if object_id('[cache]', 'U') is not null diff --git a/framework/caching/migrations/schema-mysql.sql b/framework/caching/migrations/schema-mysql.sql index b1ba454a038..b45b033bcde 100644 --- a/framework/caching/migrations/schema-mysql.sql +++ b/framework/caching/migrations/schema-mysql.sql @@ -3,9 +3,9 @@ * * @author Qiang Xue * @author Misbahul D Munir - * @link http://www.yiiframework.com/ + * @link https://www.yiiframework.com/ * @copyright 2008 Yii Software LLC - * @license http://www.yiiframework.com/license/ + * @license https://www.yiiframework.com/license/ * @since 2.0.7 */ diff --git a/framework/caching/migrations/schema-oci.sql b/framework/caching/migrations/schema-oci.sql index bc5178008a9..6c4e9447cc8 100644 --- a/framework/caching/migrations/schema-oci.sql +++ b/framework/caching/migrations/schema-oci.sql @@ -3,9 +3,9 @@ * * @author Qiang Xue * @author Misbahul D Munir - * @link http://www.yiiframework.com/ + * @link https://www.yiiframework.com/ * @copyright 2008 Yii Software LLC - * @license http://www.yiiframework.com/license/ + * @license https://www.yiiframework.com/license/ * @since 2.0.7 */ diff --git a/framework/caching/migrations/schema-pgsql.sql b/framework/caching/migrations/schema-pgsql.sql index 8d510b9af0a..2d699e67453 100644 --- a/framework/caching/migrations/schema-pgsql.sql +++ b/framework/caching/migrations/schema-pgsql.sql @@ -3,9 +3,9 @@ * * @author Qiang Xue * @author Misbahul D Munir - * @link http://www.yiiframework.com/ + * @link https://www.yiiframework.com/ * @copyright 2008 Yii Software LLC - * @license http://www.yiiframework.com/license/ + * @license https://www.yiiframework.com/license/ * @since 2.0.7 */ diff --git a/framework/caching/migrations/schema-sqlite.sql b/framework/caching/migrations/schema-sqlite.sql index 63349d3d026..59d44f4c9e1 100644 --- a/framework/caching/migrations/schema-sqlite.sql +++ b/framework/caching/migrations/schema-sqlite.sql @@ -3,9 +3,9 @@ * * @author Qiang Xue * @author Misbahul D Munir - * @link http://www.yiiframework.com/ + * @link https://www.yiiframework.com/ * @copyright 2008 Yii Software LLC - * @license http://www.yiiframework.com/license/ + * @license https://www.yiiframework.com/license/ * @since 2.0.7 */ diff --git a/framework/captcha/Captcha.php b/framework/captcha/Captcha.php index b85843f4422..a86fd188ec1 100644 --- a/framework/captcha/Captcha.php +++ b/framework/captcha/Captcha.php @@ -1,8 +1,8 @@ getClientOptions($model, $attribute); - return 'yii.validation.captcha(value, messages, ' . json_encode($options, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) . ');'; + return 'yii.validation.captcha(value, messages, ' . Json::htmlEncode($options) . ');'; } /** diff --git a/framework/captcha/SpicyRice.md b/framework/captcha/SpicyRice.md index 7049bd127a5..563f75453da 100644 --- a/framework/captcha/SpicyRice.md +++ b/framework/captcha/SpicyRice.md @@ -1,11 +1,11 @@ ## Spicy Rice font * **Author:** Brian J. Bonislawsky, Astigmatic (AOETI, Astigmatic One Eye Typographic Institute) -* **License:** SIL Open Font License (OFL), version 1.1, [notes and FAQ](http://scripts.sil.org/OFL) +* **License:** SIL Open Font License (OFL), version 1.1, [notes and FAQ](https://scripts.sil.org/OFL) ## Links * [Astigmatic](http://www.astigmatic.com/) -* [Google WebFonts](http://www.google.com/webfonts/specimen/Spicy+Rice) -* [fontsquirrel.com](http://www.fontsquirrel.com/fonts/spicy-rice) -* [fontspace.com](http://www.fontspace.com/astigmatic-one-eye-typographic-institute/spicy-rice) +* [Google WebFonts](https://fonts.google.com/specimen/Spicy+Rice) +* [fontsquirrel.com](https://www.fontsquirrel.com/fonts/spicy-rice) +* [fontspace.com](https://www.fontspace.com/astigmatic-one-eye-typographic-institute/spicy-rice) diff --git a/framework/classes.php b/framework/classes.php index 028210c63d4..46741e3180d 100644 --- a/framework/classes.php +++ b/framework/classes.php @@ -5,9 +5,9 @@ * This file is automatically generated by the "build classmap" command under the "build" folder. * Do not modify it directly. * - * @link http://www.yiiframework.com/ + * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC - * @license http://www.yiiframework.com/license/ + * @license https://www.yiiframework.com/license/ */ return [ @@ -345,6 +345,7 @@ '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\ValidationAsset' => YII2_PATH . '/validators/ValidationAsset.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/Application.php b/framework/console/Application.php index d8058603f9e..1ec070a55d2 100644 --- a/framework/console/Application.php +++ b/framework/console/Application.php @@ -1,8 +1,8 @@ ` 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. - * @property Request $request - * @property Response $response * * @author Qiang Xue * @since 2.0 @@ -402,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; } /** @@ -680,7 +685,7 @@ public function getActionOptionsHelp($action) /** * @param Action $action - * @return \ReflectionMethod + * @return \ReflectionFunctionAbstract */ protected function getActionMethodReflection($action) { @@ -697,13 +702,13 @@ protected function getActionMethodReflection($action) /** * Parses the comment block into tags. - * @param \Reflector $reflection the comment block + * @param \ReflectionClass|\ReflectionProperty|\ReflectionFunctionAbstract $reflection the comment block * @return array the parsed tags */ protected function parseDocCommentTags($reflection) { $comment = $reflection->getDocComment(); - $comment = "@description \n" . strtr(trim(preg_replace('/^\s*\**( |\t)?/m', '', trim($comment, '/'))), "\r", ''); + $comment = "@description \n" . strtr(trim(preg_replace('/^\s*\**([ \t])?/m', '', trim($comment, '/'))), "\r", ''); $parts = preg_split('/^\s*@/m', $comment, -1, PREG_SPLIT_NO_EMPTY); $tags = []; foreach ($parts as $part) { @@ -725,7 +730,7 @@ protected function parseDocCommentTags($reflection) /** * Returns the first line of docblock. * - * @param \Reflector $reflection + * @param \ReflectionClass|\ReflectionProperty|\ReflectionFunctionAbstract $reflection * @return string */ protected function parseDocCommentSummary($reflection) @@ -741,12 +746,12 @@ protected function parseDocCommentSummary($reflection) /** * Returns full description from the docblock. * - * @param \Reflector $reflection + * @param \ReflectionClass|\ReflectionProperty|\ReflectionFunctionAbstract $reflection * @return string */ protected function parseDocCommentDetail($reflection) { - $comment = strtr(trim(preg_replace('/^\s*\**( |\t)?/m', '', trim($reflection->getDocComment(), '/'))), "\r", ''); + $comment = strtr(trim(preg_replace('/^\s*\**([ \t])?/m', '', trim($reflection->getDocComment(), '/'))), "\r", ''); if (preg_match('/^\s*@\w+/m', $comment, $matches, PREG_OFFSET_CAPTURE)) { $comment = trim(substr($comment, 0, $matches[0][1])); } diff --git a/framework/console/ErrorHandler.php b/framework/console/ErrorHandler.php index f06b82f918f..c2a976d0429 100644 --- a/framework/console/ErrorHandler.php +++ b/framework/console/ErrorHandler.php @@ -1,8 +1,8 @@ * @author Alexander Makarov - * @see http://man.openbsd.org/sysexits + * @see https://man.openbsd.org/sysexits * @since 2.0.13 */ class ExitCode diff --git a/framework/console/Markdown.php b/framework/console/Markdown.php index 0e62a812279..c67626affac 100644 --- a/framework/console/Markdown.php +++ b/framework/console/Markdown.php @@ -1,8 +1,8 @@ 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), ]))); @@ -544,7 +544,7 @@ protected function compressCssFiles($inputFiles, $outputFile) if (is_string($this->cssCompressor)) { $tmpFile = $outputFile . '.tmp'; $this->combineCssFiles($inputFiles, $tmpFile); - $this->stdout(shell_exec(strtr($this->cssCompressor, [ + $this->stdout((string)shell_exec(strtr($this->cssCompressor, [ '{from}' => escapeshellarg($tmpFile), '{to}' => escapeshellarg($outputFile), ]))); @@ -677,7 +677,7 @@ protected function adjustCssUrl($cssContent, $inputFilePath, $outputFilePath) return str_replace($inputUrl, $outputUrl, $fullMatch); }; - $cssContent = preg_replace_callback('/url\(["\']?([^)^"^\']*)["\']?\)/i', $callback, $cssContent); + $cssContent = preg_replace_callback('/url\(["\']?([^)^"\']*)["\']?\)/i', $callback, $cssContent); return $cssContent; } diff --git a/framework/console/controllers/BaseMigrateController.php b/framework/console/controllers/BaseMigrateController.php index 3cbfa91010e..88792516a27 100644 --- a/framework/console/controllers/BaseMigrateController.php +++ b/framework/console/controllers/BaseMigrateController.php @@ -1,8 +1,8 @@ * @author Mark Jebri diff --git a/framework/console/controllers/FixtureController.php b/framework/console/controllers/FixtureController.php index 667c2a56bcf..caba5d271cd 100644 --- a/framework/console/controllers/FixtureController.php +++ b/framework/console/controllers/FixtureController.php @@ -1,8 +1,8 @@ unloadFixtures($fixturesObjects); $this->loadFixtures($fixturesObjects); - $this->notifyLoaded($fixtures); + $this->notifyLoaded($fixturesObjects); return ExitCode::OK; } @@ -247,13 +248,20 @@ private function printHelpMessage() /** * Notifies user that fixtures were successfully loaded. - * @param array $fixtures + * @param Fixture[] $fixtures array of loaded fixtures */ private function notifyLoaded($fixtures) { $this->stdout("Fixtures were successfully loaded from namespace:\n", Console::FG_YELLOW); $this->stdout("\t\"" . Yii::getAlias($this->namespace) . "\"\n\n", Console::FG_GREEN); - $this->outputList($fixtures); + + $fixtureClassNames = []; + + foreach ($fixtures as $fixture) { + $fixtureClassNames[] = $fixture::className(); + } + + $this->outputList($fixtureClassNames); } /** diff --git a/framework/console/controllers/HelpController.php b/framework/console/controllers/HelpController.php index 30e3d53e53c..b7d5db7a936 100644 --- a/framework/console/controllers/HelpController.php +++ b/framework/console/controllers/HelpController.php @@ -1,8 +1,8 @@ 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/MigrateController.php b/framework/console/controllers/MigrateController.php index 9b82cc800c0..17b6a76389a 100644 --- a/framework/console/controllers/MigrateController.php +++ b/framework/console/controllers/MigrateController.php @@ -1,8 +1,8 @@ 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 537bd31fbcf..c0ece4d4d89 100644 --- a/framework/console/widgets/Table.php +++ b/framework/console/widgets/Table.php @@ -1,8 +1,8 @@ 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/ActiveDataFilter.php b/framework/data/ActiveDataFilter.php index 5c46d0a449b..be5704aa675 100644 --- a/framework/data/ActiveDataFilter.php +++ b/framework/data/ActiveDataFilter.php @@ -1,8 +1,8 @@ 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/ArrayDataProvider.php b/framework/data/ArrayDataProvider.php index 17c90981757..657bcd2a1c3 100644 --- a/framework/data/ArrayDataProvider.php +++ b/framework/data/ArrayDataProvider.php @@ -1,8 +1,8 @@ _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/data/SqlDataProvider.php b/framework/data/SqlDataProvider.php index a179d9bca6d..5a8f9631de5 100644 --- a/framework/data/SqlDataProvider.php +++ b/framework/data/SqlDataProvider.php @@ -1,8 +1,8 @@ 30 * $customers = Customer::find()->where('age>30')->all(); + * ``` * * @return ActiveQueryInterface the newly created [[ActiveQueryInterface]] instance. */ diff --git a/framework/db/ActiveRelationTrait.php b/framework/db/ActiveRelationTrait.php index fc09be8376c..42d02ad9666 100644 --- a/framework/db/ActiveRelationTrait.php +++ b/framework/db/ActiveRelationTrait.php @@ -1,8 +1,8 @@ * @since 2.0 * - * @method ActiveRecordInterface one($db = null) See [[ActiveQueryInterface::one()]] for more info. + * @method ActiveRecordInterface|array|null one($db = null) See [[ActiveQueryInterface::one()]] for more info. * @method ActiveRecordInterface[] all($db = null) See [[ActiveQueryInterface::all()]] for more info. * @property ActiveRecord $modelClass */ @@ -456,8 +456,9 @@ private function buildBuckets($models, $link, $viaModels = null, $viaQuery = nul private function mapVia($map, $viaMap) { $resultMap = []; foreach ($map as $key => $linkKeys) { + $resultMap[$key] = []; foreach (array_keys($linkKeys) as $linkKey) { - $resultMap[$key] = $viaMap[$linkKey]; + $resultMap[$key] += $viaMap[$linkKey]; } } return $resultMap; @@ -528,7 +529,7 @@ private function filterByModels($models) // single key $attribute = reset($this->link); foreach ($models as $model) { - $value = isset($model[$attribute]) ? $model[$attribute] : null; + $value = isset($model[$attribute]) || (is_object($model) && property_exists($model, $attribute)) ? $model[$attribute] : null; if ($value !== null) { if (is_array($value)) { $values = array_merge($values, $value); @@ -586,7 +587,7 @@ private function getModelKey($model, $attributes) { $key = []; foreach ($attributes as $attribute) { - if (isset($model[$attribute])) { + if (isset($model[$attribute]) || (is_object($model) && property_exists($model, $attribute))) { $key[] = $this->normalizeModelKey($model[$attribute]); } } diff --git a/framework/db/AfterSaveEvent.php b/framework/db/AfterSaveEvent.php index 516cc28918e..3efccc10ec1 100644 --- a/framework/db/AfterSaveEvent.php +++ b/framework/db/AfterSaveEvent.php @@ -1,8 +1,8 @@ column value) is - * returned if the primary key is composite. A string is returned otherwise (null will be returned if the key - * value is null). + * returned if the primary key is composite or `$asArray` is `true`. A string is returned otherwise (null will be + * returned if the key value is null). * @property-read mixed $primaryKey The primary key value. An array (column name => column value) is returned - * if the primary key is composite. A string is returned otherwise (null will be returned if the key value is - * null). + * if the primary key is composite or `$asArray` is `true`. A string is returned otherwise (null will be returned + * if the key value is null). * @property-read array $relatedRecords An array of related records indexed by relation names. * * @author Qiang Xue @@ -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; } } @@ -990,7 +1001,7 @@ public function beforeSave($insert) * * Note that no automatic type conversion performed by default. You may use * [[\yii\behaviors\AttributeTypecastBehavior]] to facilitate attribute typecasting. - * See http://www.yiiframework.com/doc-2.0/guide-db-active-record.html#attributes-typecasting. + * See https://www.yiiframework.com/doc-2.0/guide-db-active-record.html#attributes-typecasting. */ public function afterSave($insert, $changedAttributes) { @@ -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/BatchQueryResult.php b/framework/db/BatchQueryResult.php index c45d3f1afb5..db8e8c28946 100644 --- a/framework/db/BatchQueryResult.php +++ b/framework/db/BatchQueryResult.php @@ -1,8 +1,8 @@ = 80100 && is_object($value) && $value instanceof \BackedEnum) { + return (string) $value->value; + } + return (string) $value; case 'integer': + if (PHP_VERSION_ID >= 80100 && is_object($value) && $value instanceof \BackedEnum) { + return (int) $value->value; + } return (int) $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/ColumnSchemaBuilder.php b/framework/db/ColumnSchemaBuilder.php index b049c4b456d..756b4b8aa8b 100644 --- a/framework/db/ColumnSchemaBuilder.php +++ b/framework/db/ColumnSchemaBuilder.php @@ -1,8 +1,8 @@ db->getSchema()->isReadQuery($sql)) { - $pdo = $this->db->getSlavePdo(); + $pdo = $this->db->getSlavePdo(true); } else { $pdo = $this->db->getMasterPdo(); } @@ -269,10 +269,10 @@ public function prepare($forRead = null) } catch (\Exception $e) { $message = $e->getMessage() . "\nFailed to prepare SQL: $sql"; $errorInfo = $e instanceof \PDOException ? $e->errorInfo : null; - throw new Exception($message, $errorInfo, (int) $e->getCode(), $e); + throw new Exception($message, $errorInfo, $e->getCode(), $e); } catch (\Throwable $e) { $message = $e->getMessage() . "\nFailed to prepare SQL: $sql"; - throw new Exception($message, null, (int) $e->getCode(), $e); + throw new Exception($message, null, $e->getCode(), $e); } } @@ -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; @@ -533,7 +540,7 @@ public function batchInsert($table, $columns, $rows) * ```php * $sql = $queryBuilder->upsert('pages', [ * 'name' => 'Front page', - * 'url' => 'http://example.com/', // url is unique + * 'url' => 'https://example.com/', // url is unique * 'visits' => 0, * ], [ * 'visits' => new \yii\db\Expression('visits + 1'), @@ -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 a6f81ff6581..4df8f3af62f 100644 --- a/framework/db/Connection.php +++ b/framework/db/Connection.php @@ -1,8 +1,8 @@ 'yii\db\Command', // CUBRID ]; /** - * @var bool whether to enable [savepoint](http://en.wikipedia.org/wiki/Savepoint). + * @var bool whether to enable [savepoint](https://en.wikipedia.org/wiki/Savepoint). * Note that if the underlying DBMS does not support savepoint, setting this property to be true will have no effect. */ public $enableSavepoint = true; @@ -644,7 +645,7 @@ public function open() Yii::endProfile($token, __METHOD__); } - throw new Exception($e->getMessage(), $e->errorInfo, (int) $e->getCode(), $e); + throw new Exception($e->getMessage(), $e->errorInfo, $e->getCode(), $e); } } @@ -1012,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/Constraint.php b/framework/db/Constraint.php index 88a4c28e4d4..6f210969694 100644 --- a/framework/db/Constraint.php +++ b/framework/db/Constraint.php @@ -1,8 +1,8 @@ '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/MigrationInterface.php b/framework/db/MigrationInterface.php index e86c79b8f38..220264e5876 100644 --- a/framework/db/MigrationInterface.php +++ b/framework/db/MigrationInterface.php @@ -1,8 +1,8 @@ $columnDefinition) { @@ -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 3e8e8756105..114116e67c5 100644 --- a/framework/db/QueryBuilder.php +++ b/framework/db/QueryBuilder.php @@ -1,8 +1,8 @@ upsert('pages', [ * 'name' => 'Front page', - * 'url' => 'http://example.com/', // url is unique + * 'url' => 'https://example.com/', // url is unique * 'visits' => 0, * ], [ * 'visits' => new \yii\db\Expression('visits + 1'), @@ -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/QueryExpressionBuilder.php b/framework/db/QueryExpressionBuilder.php index 3186d2b91cf..e811c053c99 100644 --- a/framework/db/QueryExpressionBuilder.php +++ b/framework/db/QueryExpressionBuilder.php @@ -1,8 +1,8 @@ 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 e29585e253f..53c0af9882d 100644 --- a/framework/db/Schema.php +++ b/framework/db/Schema.php @@ -1,8 +1,8 @@ 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]); } /** @@ -371,7 +371,7 @@ public function getLastInsertID($sequenceName = '') } /** - * @return bool whether this DBMS supports [savepoint](http://en.wikipedia.org/wiki/Savepoint). + * @return bool whether this DBMS supports [savepoint](https://en.wikipedia.org/wiki/Savepoint). */ public function supportsSavepoint() { @@ -411,7 +411,7 @@ public function rollBackSavepoint($name) * This can be one of [[Transaction::READ_UNCOMMITTED]], [[Transaction::READ_COMMITTED]], [[Transaction::REPEATABLE_READ]] * and [[Transaction::SERIALIZABLE]] but also a string containing DBMS specific syntax to be used * after `SET TRANSACTION ISOLATION LEVEL`. - * @see http://en.wikipedia.org/wiki/Isolation_%28database_systems%29#Isolation_levels + * @see https://en.wikipedia.org/wiki/Isolation_%28database_systems%29#Isolation_levels */ public function setTransactionIsolationLevel($level) { @@ -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/SchemaBuilderTrait.php b/framework/db/SchemaBuilderTrait.php index 6b273d7f3ce..371a48ff977 100644 --- a/framework/db/SchemaBuilderTrait.php +++ b/framework/db/SchemaBuilderTrait.php @@ -1,8 +1,8 @@ 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/conditions/NotCondition.php b/framework/db/conditions/NotCondition.php index f176620b8d9..c06530187af 100644 --- a/framework/db/conditions/NotCondition.php +++ b/framework/db/conditions/NotCondition.php @@ -1,8 +1,8 @@ hasLimit($limit)) { $sql = 'LIMIT ' . $limit; @@ -181,7 +181,7 @@ public function selectExists($rawSql) /** * {@inheritdoc} - * @see http://www.cubrid.org/manual/93/en/sql/schema/table.html#drop-index-clause + * @see https://www.cubrid.org/manual/en/9.3.0/sql/schema/table.html#drop-index-clause */ public function dropIndex($name, $table) { diff --git a/framework/db/cubrid/Schema.php b/framework/db/cubrid/Schema.php index 73a06c4d130..65b6c11b9d4 100644 --- a/framework/db/cubrid/Schema.php +++ b/framework/db/cubrid/Schema.php @@ -1,12 +1,13 @@ 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]); } /** @@ -345,7 +346,7 @@ public function getPdoType($data) /** * {@inheritdoc} - * @see http://www.cubrid.org/manual/91/en/sql/transaction.html#database-concurrency + * @see https://www.cubrid.org/manual/en/9.3.0/sql/transaction.html#database-concurrency */ public function setTransactionIsolationLevel($level) { @@ -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/cubrid/conditions/LikeConditionBuilder.php b/framework/db/cubrid/conditions/LikeConditionBuilder.php index c6ea75ed774..80cd27173ea 100644 --- a/framework/db/cubrid/conditions/LikeConditionBuilder.php +++ b/framework/db/cubrid/conditions/LikeConditionBuilder.php @@ -1,8 +1,8 @@ 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) { @@ -519,7 +525,7 @@ public function insert($table, $columns, &$params) /** * {@inheritdoc} * @see https://docs.microsoft.com/en-us/sql/t-sql/statements/merge-transact-sql - * @see http://weblogs.sqlteam.com/dang/archive/2009/01/31/UPSERT-Race-Condition-With-MERGE.aspx + * @see https://weblogs.sqlteam.com/dang/2009/01/31/upsert-race-condition-with-merge/ */ public function upsert($table, $insertColumns, $updateColumns, &$params) { diff --git a/framework/db/mssql/Schema.php b/framework/db/mssql/Schema.php index cb451e68d12..db7f07c87cb 100644 --- a/framework/db/mssql/Schema.php +++ b/framework/db/mssql/Schema.php @@ -1,12 +1,13 @@ 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/mssql/SqlsrvPDO.php b/framework/db/mssql/SqlsrvPDO.php index d7fe600d1d6..4285e220df0 100644 --- a/framework/db/mssql/SqlsrvPDO.php +++ b/framework/db/mssql/SqlsrvPDO.php @@ -1,8 +1,8 @@ hasOffset($offset)) { // limit is not optional in MySQL - // http://stackoverflow.com/a/271650/1106908 - // http://dev.mysql.com/doc/refman/5.0/en/select.html#idm47619502796240 + // https://stackoverflow.com/questions/255517/mysql-offset-infinite-rows/271650#271650 + // https://dev.mysql.com/doc/refman/5.7/en/select.html#idm46193796386608 $sql = "LIMIT $offset, 18446744073709551615"; // 2^64-1 } @@ -259,10 +259,17 @@ protected function prepareInsertValues($table, $columns, $params = []) if (!$columns instanceof Query && empty($names)) { $tableSchema = $this->db->getSchema()->getTableSchema($table); if ($tableSchema !== null) { - $columns = !empty($tableSchema->primaryKey) ? $tableSchema->primaryKey : [reset($tableSchema->columns)->name]; + if (!empty($tableSchema->primaryKey)) { + $columns = $tableSchema->primaryKey; + $defaultValue = 'NULL'; + } else { + $columns = [reset($tableSchema->columns)->name]; + $defaultValue = 'DEFAULT'; + } + foreach ($columns as $name) { $names[] = $this->db->quoteColumnName($name); - $placeholders[] = 'DEFAULT'; + $placeholders[] = $defaultValue; } } } @@ -403,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 babb7d2aa9a..fa2270eb77d 100644 --- a/framework/db/mysql/Schema.php +++ b/framework/db/mysql/Schema.php @@ -1,12 +1,13 @@ 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]); } /** @@ -293,7 +301,7 @@ protected function loadColumnSchema($info) * * See details here: https://mariadb.com/kb/en/library/now/#description */ - if (($column->type === 'timestamp' || $column->type === 'datetime') + if (in_array($column->type, ['timestamp', 'datetime', 'date', 'time']) && isset($info['default']) && preg_match('/^current_timestamp(?:\(([0-9]*)\))?$/i', $info['default'], $matches)) { $column->defaultValue = new Expression('CURRENT_TIMESTAMP' . (!empty($matches[1]) ? '(' . $matches[1] . ')' : '')); @@ -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/ColumnSchemaBuilder.php b/framework/db/oci/ColumnSchemaBuilder.php index 545d34606ca..dcb5ff21ef8 100644 --- a/framework/db/oci/ColumnSchemaBuilder.php +++ b/framework/db/oci/ColumnSchemaBuilder.php @@ -1,8 +1,8 @@ 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/oci/conditions/InConditionBuilder.php b/framework/db/oci/conditions/InConditionBuilder.php index e3f87a7b63f..bb6b2bf0709 100644 --- a/framework/db/oci/conditions/InConditionBuilder.php +++ b/framework/db/oci/conditions/InConditionBuilder.php @@ -1,8 +1,8 @@ db->getTableSchema($tableName); if ($table !== null && $table->sequenceName !== null) { - // c.f. http://www.postgresql.org/docs/8.1/static/functions-sequence.html + // c.f. https://www.postgresql.org/docs/8.1/functions-sequence.html $sequence = $this->db->quoteTableName($table->sequenceName); $tableName = $this->db->quoteTableName($tableName); if ($value === null) { @@ -253,7 +253,7 @@ public function alterColumn($table, $column, $type) $tableName = $this->db->quoteTableName($table); // https://github.com/yiisoft/yii2/issues/4492 - // http://www.postgresql.org/docs/9.1/static/sql-altertable.html + // https://www.postgresql.org/docs/9.1/sql-altertable.html if (preg_match('/^(DROP|SET|RESET)\s+/i', $type)) { return "ALTER TABLE {$tableName} ALTER COLUMN {$columnName} {$type}"; } diff --git a/framework/db/pgsql/Schema.php b/framework/db/pgsql/Schema.php index 7f6b9d018cc..154e01a3808 100644 --- a/framework/db/pgsql/Schema.php +++ b/framework/db/pgsql/Schema.php @@ -1,12 +1,13 @@ self::TYPE_INTEGER, @@ -288,7 +289,7 @@ protected function loadTableDefaultValues($tableName) */ public function createQueryBuilder() { - return new QueryBuilder($this->db); + return Yii::createObject(QueryBuilder::className(), [$this->db]); } /** @@ -339,7 +340,7 @@ protected function findConstraints($table) $tableSchema = $this->quoteValue($table->schemaName); //We need to extract the constraints de hard way since: - //http://www.postgresql.org/message-id/26677.1086673982@sss.pgh.pa.us + //https://www.postgresql.org/message-id/26677.1086673982@sss.pgh.pa.us $sql = <<[:][a-zA-Z0-9_]+)/', $statement->getSql(), $matches, PREG_SET_ORDER); + preg_match_all('/(?P:\w+)/', $statement->getSql(), $matches, PREG_SET_ORDER); $result = []; foreach ($matches as $match) { $phName = ltrim($match['placeholder'], ':'); diff --git a/framework/db/sqlite/QueryBuilder.php b/framework/db/sqlite/QueryBuilder.php index 8670f1af407..18abffa8ebd 100644 --- a/framework/db/sqlite/QueryBuilder.php +++ b/framework/db/sqlite/QueryBuilder.php @@ -1,8 +1,8 @@ db->open(); // ensure pdo is not null if (version_compare($this->db->getServerVersion(), '3.7.11', '>=')) { return parent::batchInsert($table, $columns, $rows, $params); @@ -472,7 +472,7 @@ public function buildLimit($limit, $offset) } } elseif ($this->hasOffset($offset)) { // limit is not optional in SQLite - // http://www.sqlite.org/syntaxdiagrams.html#select-stmt + // https://www.sqlite.org/syntaxdiagrams.html#select-stmt $sql = "LIMIT 9223372036854775807 OFFSET $offset"; // 2^63-1 } diff --git a/framework/db/sqlite/Schema.php b/framework/db/sqlite/Schema.php index 7f608399d0b..32b209b2254 100644 --- a/framework/db/sqlite/Schema.php +++ b/framework/db/sqlite/Schema.php @@ -1,12 +1,13 @@ 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]); } /** @@ -362,7 +363,7 @@ protected function loadColumnSchema($info) * This can be either [[Transaction::READ_UNCOMMITTED]] or [[Transaction::SERIALIZABLE]]. * @throws NotSupportedException when unsupported isolation levels are used. * SQLite only supports SERIALIZABLE and READ UNCOMMITTED. - * @see http://www.sqlite.org/pragma.html#pragma_read_uncommitted + * @see https://www.sqlite.org/pragma.html#pragma_read_uncommitted */ public function setTransactionIsolationLevel($level) { diff --git a/framework/db/sqlite/SqlTokenizer.php b/framework/db/sqlite/SqlTokenizer.php index 7a8aecb6ab8..fe92680dc75 100644 --- a/framework/db/sqlite/SqlTokenizer.php +++ b/framework/db/sqlite/SqlTokenizer.php @@ -1,8 +1,8 @@ * @since 2.0.13 diff --git a/framework/db/sqlite/conditions/InConditionBuilder.php b/framework/db/sqlite/conditions/InConditionBuilder.php index db980c346d5..7c381b9164d 100644 --- a/framework/db/sqlite/conditions/InConditionBuilder.php +++ b/framework/db/sqlite/conditions/InConditionBuilder.php @@ -1,8 +1,8 @@ request->headers->has('If-None-Match')) { // HTTP_IF_NONE_MATCH takes precedence over HTTP_IF_MODIFIED_SINCE - // http://tools.ietf.org/html/rfc7232#section-3.3 + // https://datatracker.ietf.org/doc/html/rfc7232#section-3.3 return $etag !== null && in_array($etag, Yii::$app->request->getETags(), true); } elseif (Yii::$app->request->headers->has('If-Modified-Since')) { return $lastModified !== null && @strtotime(Yii::$app->request->headers->get('If-Modified-Since')) >= $lastModified; diff --git a/framework/filters/PageCache.php b/framework/filters/PageCache.php index 6fd7e9d8f4a..b9f02ba4ec4 100644 --- a/framework/filters/PageCache.php +++ b/framework/filters/PageCache.php @@ -1,12 +1,13 @@ 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/RateLimitInterface.php b/framework/filters/RateLimitInterface.php index 7a3ee3f73f2..23dc295ce01 100644 --- a/framework/filters/RateLimitInterface.php +++ b/framework/filters/RateLimitInterface.php @@ -1,8 +1,8 @@ owner instanceof Controller + && ( + !isset($this->owner->action) + || ( + $auth instanceof ActionFilter + && !$auth->isActive($this->owner->action) + ) + ) + ) { + continue; + } + $identity = $auth->authenticate($user, $request, $response); if ($identity !== null) { return $identity; @@ -85,7 +100,7 @@ public function authenticate($user, $request, $response) public function challenge($response) { foreach ($this->authMethods as $method) { - /* @var $method AuthInterface */ + /** @var AuthInterface $method */ $method->challenge($response); } } diff --git a/framework/filters/auth/HttpBasicAuth.php b/framework/filters/auth/HttpBasicAuth.php index 03420efd70c..d7969a696a9 100644 --- a/framework/filters/auth/HttpBasicAuth.php +++ b/framework/filters/auth/HttpBasicAuth.php @@ -1,8 +1,8 @@ filter)) { - $options = array_merge(['prompt' => ''], $this->filterInputOptions); + $options = array_merge(['prompt' => '', 'strict' => true], $this->filterInputOptions); return Html::activeDropDownList($model, $this->filterAttribute, $this->filter, $options) . $error; } elseif ($this->format === 'boolean') { - $options = array_merge(['prompt' => ''], $this->filterInputOptions); + $options = array_merge(['prompt' => '', 'strict' => true], $this->filterInputOptions); return Html::activeDropDownList($model, $this->filterAttribute, [ 1 => $this->grid->formatter->booleanFormat[1], 0 => $this->grid->formatter->booleanFormat[0], diff --git a/framework/grid/GridView.php b/framework/grid/GridView.php index c1b6a6b386f..7ee0e06bbc0 100644 --- a/framework/grid/GridView.php +++ b/framework/grid/GridView.php @@ -1,8 +1,8 @@ = 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()]] @@ -726,12 +734,14 @@ public static function htmlEncode($data, $valuesOnly = true, $charset = null) /** * Decodes HTML entities into the corresponding characters in an array of strings. + * * Only array values will be decoded by default. * If a value is an array, this method will also decode it recursively. * Only string values will be decoded. + * * @param array $data data to be decoded - * @param bool $valuesOnly whether to decode array values only. If false, - * both the array keys and array values will be decoded. + * @param bool $valuesOnly whether to decode array values only. If `false`, + * then both the array keys and array values will be decoded. * @return array the decoded data * @see https://www.php.net/manual/en/function.htmlspecialchars-decode.php */ @@ -740,12 +750,12 @@ public static function htmlDecode($data, $valuesOnly = true) $d = []; foreach ($data as $key => $value) { if (!$valuesOnly && is_string($key)) { - $key = htmlspecialchars_decode($key, ENT_QUOTES); + $key = htmlspecialchars_decode($key, ENT_QUOTES | ENT_SUBSTITUTE); } if (is_string($value)) { - $d[$key] = htmlspecialchars_decode($value, ENT_QUOTES); + $d[$key] = htmlspecialchars_decode($value, ENT_QUOTES | ENT_SUBSTITUTE); } elseif (is_array($value)) { - $d[$key] = static::htmlDecode($value); + $d[$key] = static::htmlDecode($value, $valuesOnly); } else { $d[$key] = $value; } @@ -769,7 +779,7 @@ public static function htmlDecode($data, $valuesOnly = true) */ public static function isAssociative($array, $allStrings = true) { - if (!is_array($array) || empty($array)) { + if (empty($array) || !is_array($array)) { return false; } @@ -835,8 +845,9 @@ public static function isIndexed($array, $consecutive = false) * * This method does the same as the PHP function [in_array()](https://www.php.net/manual/en/function.in-array.php) * but additionally works for objects that implement the [[Traversable]] interface. + * * @param mixed $needle The value to look for. - * @param array|Traversable $haystack The set of values to search. + * @param iterable $haystack The set of values to search. * @param bool $strict Whether to enable strict (`===`) comparison. * @return bool `true` if `$needle` was found in `$haystack`, `false` otherwise. * @throws InvalidArgumentException if `$haystack` is neither traversable nor an array. @@ -845,18 +856,20 @@ public static function isIndexed($array, $consecutive = false) */ public static function isIn($needle, $haystack, $strict = false) { - if ($haystack instanceof Traversable) { - foreach ($haystack as $value) { - if ($needle == $value && (!$strict || $needle === $value)) { - return true; - } - } - } elseif (is_array($haystack)) { - return in_array($needle, $haystack, $strict); - } else { + if (!static::isTraversable($haystack)) { throw new InvalidArgumentException('Argument $haystack must be an array or implement Traversable'); } + if (is_array($haystack)) { + return in_array($needle, $haystack, $strict); + } + + foreach ($haystack as $value) { + if ($strict ? $needle === $value : $needle == $value) { + return true; + } + } + return false; } @@ -880,26 +893,27 @@ public static function isTraversable($var) * * This method will return `true`, if all elements of `$needles` are contained in * `$haystack`. If at least one element is missing, `false` will be returned. - * @param array|Traversable $needles The values that must **all** be in `$haystack`. - * @param array|Traversable $haystack The set of value to search. + * + * @param iterable $needles The values that must **all** be in `$haystack`. + * @param iterable $haystack The set of value to search. * @param bool $strict Whether to enable strict (`===`) comparison. - * @throws InvalidArgumentException if `$haystack` or `$needles` is neither traversable nor an array. * @return bool `true` if `$needles` is a subset of `$haystack`, `false` otherwise. + * @throws InvalidArgumentException if `$haystack` or `$needles` is neither traversable nor an array. * @since 2.0.7 */ public static function isSubset($needles, $haystack, $strict = false) { - if (is_array($needles) || $needles instanceof Traversable) { - foreach ($needles as $needle) { - if (!static::isIn($needle, $haystack, $strict)) { - return false; - } - } + if (!static::isTraversable($needles)) { + throw new InvalidArgumentException('Argument $needles must be an array or implement Traversable'); + } - return true; + foreach ($needles as $needle) { + if (!static::isIn($needle, $haystack, $strict)) { + return false; + } } - throw new InvalidArgumentException('Argument $needles must be an array or implement Traversable'); + return true; } /** @@ -938,7 +952,7 @@ public static function isSubset($needles, $haystack, $strict = false) * ``` * * @param array $array Source array - * @param array $filters Rules that define array keys which should be left or removed from results. + * @param iterable $filters Rules that define array keys which should be left or removed from results. * Each rule is: * - `var` - `$array['var']` will be left in result. * - `var.key` = only `$array['var']['key'] will be left in result. @@ -1005,7 +1019,7 @@ public static function filter($array, $filters) /** * Sorts array recursively. * - * @param array $array An array passing by reference. + * @param array $array An array passing by reference. * @param callable|null $sorter The array sorter. If omitted, sort index array by values, sort assoc array by keys. * @return array */ @@ -1013,7 +1027,7 @@ public static function recursiveSort(array &$array, $sorter = null) { foreach ($array as &$value) { if (is_array($value)) { - self::recursiveSort($value, $sorter); + static::recursiveSort($value, $sorter); } } unset($value); diff --git a/framework/helpers/BaseConsole.php b/framework/helpers/BaseConsole.php index ab4d1bfecdf..febeed313b1 100644 --- a/framework/helpers/BaseConsole.php +++ b/framework/helpers/BaseConsole.php @@ -1,8 +1,8 @@ ['color' => 'black'], self::FG_BLUE => ['color' => 'blue'], self::FG_CYAN => ['color' => 'aqua'], self::FG_GREEN => ['color' => 'lime'], self::FG_GREY => ['color' => 'silver'], - // http://meyerweb.com/eric/thoughts/2014/06/19/rebeccapurple/ - // http://dev.w3.org/csswg/css-color/#valuedef-rebeccapurple + // https://meyerweb.com/eric/thoughts/2014/06/19/rebeccapurple/ + // https://drafts.csswg.org/css-color/#valuedef-rebeccapurple self::FG_PURPLE => ['color' => 'rebeccapurple'], self::FG_RED => ['color' => 'red'], self::FG_YELLOW => ['color' => 'yellow'], @@ -688,10 +688,19 @@ public static function isRunningOnWindows() public static function getScreenSize($refresh = false) { static $size; - if ($size !== null && !$refresh) { + static $execDisabled; + + if ($size !== null && ($execDisabled || !$refresh)) { return $size; } + if ($execDisabled === null) { + $execDisabled = !function_exists('ini_get') || preg_match('/(\bexec\b)/i', ini_get('disable_functions')); + if ($execDisabled) { + return $size = false; + } + } + if (static::isRunningOnWindows()) { $output = []; exec('mode con', $output); @@ -939,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) { @@ -953,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 dc2d965bbb7..55445aec009 100644 --- a/framework/helpers/BaseFileHelper.php +++ b/framework/helpers/BaseFileHelper.php @@ -1,8 +1,8 @@ [ @@ -49,7 +49,7 @@ class BaseFormatConverter ]; /** * @var array the jQuery UI fallback definition to use for the ICU short patterns `short`, `medium`, `long` and `full`. - * This is used as fallback when the intl extension is not installed. + * This is used as fallback when the `intl` extension is not installed. */ public static $juiFallbackDatePatterns = [ 'short' => [ @@ -83,7 +83,8 @@ class BaseFormatConverter /** - * Converts a date format pattern from [ICU format][] to [php date() function format][]. + * Converts a date format pattern from [ICU format](https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax) + * to [PHP `date()` function format](https://www.php.net/manual/en/function.date). * * The conversion is limited to date patterns that do not use escaped characters. * Patterns like `d 'of' MMMM yyyy` which will result in a date like `1 of December 2014` may not be converted correctly @@ -91,35 +92,23 @@ class BaseFormatConverter * * Pattern constructs that are not supported by the PHP format will be removed. * - * [php date() function format]: https://www.php.net/manual/en/function.date.php - * [ICU format]: http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax - * * @param string $pattern date format pattern in ICU format. * @param string $type 'date', 'time', or 'datetime'. * @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]; } } - // http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax + // https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax // escaped text $escaped = []; if (preg_match_all('/(? "''''", // single `'` should be encoded as `''`, which internally should be encoded as `''''` // Day @@ -344,39 +331,28 @@ public static function convertDatePhpToIcu($pattern) } /** - * Converts a date format pattern from [ICU format][] to [jQuery UI date format][]. + * Converts a date format pattern from [ICU format](https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax) + * to [jQuery UI date format](https://api.jqueryui.com/datepicker/#utility-formatDate). * * Pattern constructs that are not supported by the jQuery UI format will be removed. * - * [jQuery UI date format]: http://api.jqueryui.com/datepicker/#utility-formatDate - * [ICU format]: http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax - * * @param string $pattern date format pattern in ICU format. * @param string $type 'date', 'time', or 'datetime'. * @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]; } } - // http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax + // https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax // escaped text $escaped = []; if (preg_match_all('/(? 'dd', // Day of the month, 2 digits with leading zeros 01 to 31 @@ -553,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 1e0d8702dd6..4f17fa670ea 100644 --- a/framework/helpers/BaseHtml.php +++ b/framework/helpers/BaseHtml.php @@ -1,8 +1,8 @@ 1) - * @see http://www.w3.org/TR/html-markup/syntax.html#void-element + * @see https://html.spec.whatwg.org/multipage/syntax.html#void-element */ public static $voidElements = [ 'area' => 1, @@ -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) { @@ -1932,7 +1962,7 @@ public static function renderSelectOptions($selection, $items, &$tagOptions = [] * Renders the HTML tag attributes. * * Attributes whose values are of boolean type will be treated as - * [boolean attributes](http://www.w3.org/TR/html5/infrastructure.html#boolean-attributes). + * [boolean attributes](https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#boolean-attributes). * * Attributes whose values are null will not be rendered. * @@ -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/BaseHtmlPurifier.php b/framework/helpers/BaseHtmlPurifier.php index 3c748a09b94..2397bff57ad 100644 --- a/framework/helpers/BaseHtmlPurifier.php +++ b/framework/helpers/BaseHtmlPurifier.php @@ -1,8 +1,8 @@ x Y) // and any uppercase letter preceded by an uppercase letter and followed by a lowercase letter (XYz => X Yz) - $label = preg_replace('/(?<=\p{Ll})\p{Lu}|(?<=[\p{L}\d])\p{Lu}(?=\p{Ll})|(\d+)/u', ' \0', $name); + $label = preg_replace('/(?<=\p{Ll})\p{Lu}|(?<=\p{L})\p{Lu}(?=\p{Ll})/u', ' \0', $name); $label = mb_strtolower(trim(str_replace(['-', '_', '.'], ' ', $label)), self::encoding()); @@ -528,7 +528,7 @@ public static function slug($string, $replacement = '-', $lowercase = true) $string = trim(implode($replacement, $replaced), $replacement); if ((string)$replacement !== '') { - $string = preg_replace('#' . preg_quote($replacement) . '+#', $replacement, $string); + $string = preg_replace('#' . preg_quote($replacement, '#') . '+#', $replacement, $string); } return $lowercase ? strtolower($string) : $string; diff --git a/framework/helpers/BaseIpHelper.php b/framework/helpers/BaseIpHelper.php index 57f7a4dfeb9..5ab73a63106 100644 --- a/framework/helpers/BaseIpHelper.php +++ b/framework/helpers/BaseIpHelper.php @@ -1,8 +1,8 @@ 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/BaseMarkdown.php b/framework/helpers/BaseMarkdown.php index 8975c476396..b0c7117330f 100644 --- a/framework/helpers/BaseMarkdown.php +++ b/framework/helpers/BaseMarkdown.php @@ -1,8 +1,8 @@ 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, '/'); @@ -108,6 +110,10 @@ public static function dirname($path) /** * Truncates a string to the number of characters specified. * + * In order to truncate for an exact length, the $suffix char length must be counted towards the $length. For example + * to have a string which is exactly 255 long with $suffix `...` of 3 chars, then `StringHelper::truncate($string, 252, '...')` + * must be used to ensure you have 255 long string afterwards. + * * @param string $string The string to truncate. * @param int $length How many characters from original string to include into truncated string. * @param string $suffix String to append to the end of truncated string. @@ -118,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'; } @@ -229,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; } @@ -253,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; } @@ -472,7 +486,7 @@ public static function mb_ucwords($string, $encoding = 'UTF-8') return $string; } - $parts = preg_split('/(\s+[^\w]+\s+|^[^\w]+\s+|\s+)/u', $string, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); + $parts = preg_split('/(\s+\W+\s+|^\W+\s+|\s+)/u', $string, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); $ucfirstEven = trim(mb_substr($parts[0], -1, 1, $encoding)) === ''; foreach ($parts as $key => $value) { $isEven = (bool)($key % 2); @@ -483,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 e65a52a754c..864dbc63c48 100644 --- a/framework/helpers/BaseUrl.php +++ b/framework/helpers/BaseUrl.php @@ -1,8 +1,8 @@ 'ref1', '#' => 'name']); * - * // http://www.example.com/index.php?r=site%2Findex + * // https://www.example.com/index.php?r=site%2Findex * echo Url::toRoute('site/index', true); * * // https://www.example.com/index.php?r=site%2Findex @@ -186,7 +186,7 @@ protected static function normalizeRoute($route) * // images/logo.gif * echo Url::to('images/logo.gif'); * - * // http://www.example.com/images/logo.gif + * // https://www.example.com/images/logo.gif * echo Url::to('@web/images/logo.gif', true); * * // https://www.example.com/images/logo.gif @@ -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/BaseVarDumper.php b/framework/helpers/BaseVarDumper.php index 5cb57ce2ec5..070a42278df 100644 --- a/framework/helpers/BaseVarDumper.php +++ b/framework/helpers/BaseVarDumper.php @@ -1,8 +1,8 @@ '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 1a63a105540..f895e8d0728 100644 --- a/framework/helpers/mimeTypes.php +++ b/framework/helpers/mimeTypes.php @@ -5,10 +5,14 @@ * This file contains most commonly used MIME types * according to file extension names. * Its content is generated from the apache http mime.types file. - * http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/conf/mime.types?view=markup + * 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/DbMessageSource.php b/framework/i18n/DbMessageSource.php index e2048c20354..0686291d2a7 100644 --- a/framework/i18n/DbMessageSource.php +++ b/framework/i18n/DbMessageSource.php @@ -1,8 +1,8 @@ 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"); @@ -639,7 +639,7 @@ public function asBoolean($value) * If null, [[dateFormat]] will be used. * * This can be "short", "medium", "long", or "full", which represents a preset format of different lengths. - * It can also be a custom format as specified in the [ICU manual](http://userguide.icu-project.org/formatparse/datetime). + * It can also be a custom format as specified in the [ICU manual](https://unicode-org.github.io/icu/userguide/format_parse/datetime/). * * Alternatively this can be a string prefixed with `php:` representing a format that can be recognized by the * PHP [date()](https://www.php.net/manual/en/function.date.php)-function. @@ -676,7 +676,7 @@ public function asDate($value, $format = null) * If null, [[timeFormat]] will be used. * * This can be "short", "medium", "long", or "full", which represents a preset format of different lengths. - * It can also be a custom format as specified in the [ICU manual](http://userguide.icu-project.org/formatparse/datetime). + * It can also be a custom format as specified in the [ICU manual](https://unicode-org.github.io/icu/userguide/format_parse/datetime/). * * Alternatively this can be a string prefixed with `php:` representing a format that can be recognized by the * PHP [date()](https://www.php.net/manual/en/function.date.php)-function. @@ -713,7 +713,7 @@ public function asTime($value, $format = null) * If null, [[datetimeFormat]] will be used. * * This can be "short", "medium", "long", or "full", which represents a preset format of different lengths. - * It can also be a custom format as specified in the [ICU manual](http://userguide.icu-project.org/formatparse/datetime). + * It can also be a custom format as specified in the [ICU manual](https://unicode-org.github.io/icu/userguide/format_parse/datetime/). * * Alternatively this can be a string prefixed with `php:` representing a format that can be recognized by the * PHP [date()](https://www.php.net/manual/en/function.date.php)-function. @@ -1403,7 +1403,7 @@ public function asOrdinal($value) * * This is the short form of [[asSize]]. * - * If [[sizeFormatBase]] is 1024, [binary prefixes](http://en.wikipedia.org/wiki/Binary_prefix) (e.g. kibibyte/KiB, mebibyte/MiB, ...) + * If [[sizeFormatBase]] is 1024, [binary prefixes](https://en.wikipedia.org/wiki/Binary_prefix) (e.g. kibibyte/KiB, mebibyte/MiB, ...) * are used in the formatting result. * * @param string|int|float|null $value value in bytes to be formatted. @@ -1459,7 +1459,7 @@ public function asShortSize($value, $decimals = null, $options = [], $textOption /** * Formats the value in bytes as a size in human readable form, for example `12 kilobytes`. * - * If [[sizeFormatBase]] is 1024, [binary prefixes](http://en.wikipedia.org/wiki/Binary_prefix) (e.g. kibibyte/KiB, mebibyte/MiB, ...) + * If [[sizeFormatBase]] is 1024, [binary prefixes](https://en.wikipedia.org/wiki/Binary_prefix) (e.g. kibibyte/KiB, mebibyte/MiB, ...) * are used in the formatting result. * * @param string|int|float|null $value value in bytes to be formatted. @@ -1643,8 +1643,8 @@ private function formatUnit($unitType, $unitFormat, $value, $decimals, $options, */ private function getUnitMessage($unitType, $unitFormat, $system, $position) { - if (isset($this->_unitMessages[$unitType][$system][$position])) { - return $this->_unitMessages[$unitType][$system][$position]; + if (isset($this->_unitMessages[$unitType][$unitFormat][$system][$position])) { + return $this->_unitMessages[$unitType][$unitFormat][$system][$position]; } if (!$this->_intlLoaded) { throw new InvalidConfigException('Format of ' . $unitType . ' is only supported when PHP intl extension is installed.'); @@ -1676,7 +1676,7 @@ private function getUnitMessage($unitType, $unitFormat, $system, $position) $message[] = "$key{{$value}}"; } - return $this->_unitMessages[$unitType][$system][$position] = '{n, plural, ' . implode(' ', $message) . '}'; + return $this->_unitMessages[$unitType][$unitFormat][$system][$position] = '{n, plural, ' . implode(' ', $message) . '}'; } /** @@ -1738,7 +1738,7 @@ protected function formatNumber($value, $decimals, $maxPosition, $formatBase, $o $params = [ // this is the unformatted number used for the plural rule // abs() to make sure the plural rules work correctly on negative numbers, intl does not cover this - // http://english.stackexchange.com/questions/9735/is-1-singular-or-plural + // https://english.stackexchange.com/questions/9735/is-1-followed-by-a-singular-or-plural-noun 'n' => abs($value), // this is the formatted number used for display 'nFormatted' => $this->asDecimal($value, $decimals, $options, $textOptions), diff --git a/framework/i18n/GettextFile.php b/framework/i18n/GettextFile.php index 57f2e90f642..6e320348c31 100644 --- a/framework/i18n/GettextFile.php +++ b/framework/i18n/GettextFile.php @@ -1,8 +1,8 @@ charset : 'UTF-8'; $param = trim($token[0]); if (isset($args[$param])) { @@ -374,7 +374,7 @@ private function parseToken($token, $args, $locale) case 'none': return $arg; case 'select': - /* http://icu-project.org/apiref/icu4c/classicu_1_1SelectFormat.html + /* https://unicode-org.github.io/icu-docs/#/icu4c/classicu_1_1SelectFormat.html selectStyle = (selector '{' message '}')+ */ if (!isset($token[2])) { @@ -397,7 +397,7 @@ private function parseToken($token, $args, $locale) } break; case 'plural': - /* http://icu-project.org/apiref/icu4c/classicu_1_1PluralFormat.html + /* https://unicode-org.github.io/icu-docs/#/icu4c/classicu_1_1PluralFormat.html pluralStyle = [offsetValue] (selector '{' message '}')+ offsetValue = "offset:" number selector = explicitValue | keyword diff --git a/framework/i18n/MessageSource.php b/framework/i18n/MessageSource.php index 6f33bed06bb..9725158636f 100644 --- a/framework/i18n/MessageSource.php +++ b/framework/i18n/MessageSource.php @@ -1,8 +1,8 @@ db->driverName === 'mysql') { - // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci + // https://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; } diff --git a/framework/i18n/migrations/schema-mssql.sql b/framework/i18n/migrations/schema-mssql.sql index 261f807cf78..5b79c8e137a 100644 --- a/framework/i18n/migrations/schema-mssql.sql +++ b/framework/i18n/migrations/schema-mssql.sql @@ -2,9 +2,9 @@ * Database schema required by \yii\i18n\DbMessageSource. * * @author Dmitry Naumenko - * @link http://www.yiiframework.com/ + * @link https://www.yiiframework.com/ * @copyright 2008 Yii Software LLC - * @license http://www.yiiframework.com/license/ + * @license https://www.yiiframework.com/license/ * @since 2.0.7 */ diff --git a/framework/i18n/migrations/schema-mysql.sql b/framework/i18n/migrations/schema-mysql.sql index dec180c7f0f..c6b706357ed 100644 --- a/framework/i18n/migrations/schema-mysql.sql +++ b/framework/i18n/migrations/schema-mysql.sql @@ -2,9 +2,9 @@ * Database schema required by \yii\i18n\DbMessageSource. * * @author Dmitry Naumenko - * @link http://www.yiiframework.com/ + * @link https://www.yiiframework.com/ * @copyright 2008 Yii Software LLC - * @license http://www.yiiframework.com/license/ + * @license https://www.yiiframework.com/license/ * @since 2.0.7 */ diff --git a/framework/i18n/migrations/schema-oci.sql b/framework/i18n/migrations/schema-oci.sql index edd9c0f0867..bd01b96a846 100644 --- a/framework/i18n/migrations/schema-oci.sql +++ b/framework/i18n/migrations/schema-oci.sql @@ -2,9 +2,9 @@ * Database schema required by \yii\i18n\DbMessageSource. * * @author Dmitry Naumenko - * @link http://www.yiiframework.com/ + * @link https://www.yiiframework.com/ * @copyright 2008 Yii Software LLC - * @license http://www.yiiframework.com/license/ + * @license https://www.yiiframework.com/license/ * @since 2.0.7 */ @@ -30,4 +30,4 @@ CREATE TABLE "message" ); CREATE INDEX idx_message_language ON "message"("language"); -CREATE INDEX idx_source_message_category ON "source_message"("category"); \ No newline at end of file +CREATE INDEX idx_source_message_category ON "source_message"("category"); diff --git a/framework/i18n/migrations/schema-pgsql.sql b/framework/i18n/migrations/schema-pgsql.sql index 4e447d31c50..5513c86bc03 100644 --- a/framework/i18n/migrations/schema-pgsql.sql +++ b/framework/i18n/migrations/schema-pgsql.sql @@ -2,9 +2,9 @@ * Database schema required by \yii\i18n\DbMessageSource. * * @author Dmitry Naumenko - * @link http://www.yiiframework.com/ + * @link https://www.yiiframework.com/ * @copyright 2008 Yii Software LLC - * @license http://www.yiiframework.com/license/ + * @license https://www.yiiframework.com/license/ * @since 2.0.7 */ diff --git a/framework/i18n/migrations/schema-sqlite.sql b/framework/i18n/migrations/schema-sqlite.sql index 24db67acabe..aba511932a2 100644 --- a/framework/i18n/migrations/schema-sqlite.sql +++ b/framework/i18n/migrations/schema-sqlite.sql @@ -2,9 +2,9 @@ * Database schema required by \yii\i18n\DbMessageSource. * * @author Dmitry Naumenko - * @link http://www.yiiframework.com/ + * @link https://www.yiiframework.com/ * @copyright 2008 Yii Software LLC - * @license http://www.yiiframework.com/license/ + * @license https://www.yiiframework.com/license/ * @since 2.0.7 */ diff --git a/framework/log/DbTarget.php b/framework/log/DbTarget.php index bef9c50c771..c2c3d6a6245 100644 --- a/framework/log/DbTarget.php +++ b/framework/log/DbTarget.php @@ -1,8 +1,8 @@ * @since 2.0 */ @@ -60,7 +63,7 @@ class FileTarget extends Target public $dirMode = 0775; /** * @var bool Whether to rotate log files by copy and truncate in contrast to rotation by - * renaming files. Defaults to `true` to be more compatible with log tailers and is windows + * renaming files. Defaults to `true` to be more compatible with log tailers and windows * systems which do not play well with rename on open files. Rotation by renaming however is * a bit faster. * @@ -68,7 +71,9 @@ class FileTarget extends Target * function does not work with files that are opened by some process is described in a * [comment by Martin Pelletier](https://www.php.net/manual/en/function.rename.php#102274) in * the PHP documentation. By setting rotateByCopy to `true` you can work - * around this problem. + * around this. + * @deprecated since 2.0.46 and setting it to false has no effect anymore + * since rotating is now always done by copy. */ public $rotateByCopy = true; @@ -101,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}"); } @@ -117,31 +127,21 @@ public function export() clearstatcache(); } if ($this->enableRotation && @filesize($this->logFile) > $this->maxFileSize * 1024) { - @flock($fp, LOCK_UN); - @fclose($fp); $this->rotateFiles(); - $writeResult = @file_put_contents($this->logFile, $text, FILE_APPEND | LOCK_EX); - if ($writeResult === false) { - $error = error_get_last(); - throw new LogRuntimeException("Unable to export log through file ({$this->logFile})!: {$error['message']}"); - } - $textSize = strlen($text); - if ($writeResult < $textSize) { - throw new LogRuntimeException("Unable to export whole log through file ({$this->logFile})! Wrote $writeResult out of $textSize bytes."); - } - } else { - $writeResult = @fwrite($fp, $text); - if ($writeResult === false) { - $error = error_get_last(); - throw new LogRuntimeException("Unable to export log through file ({$this->logFile})!: {$error['message']}"); - } - $textSize = strlen($text); - if ($writeResult < $textSize) { - throw new LogRuntimeException("Unable to export whole log through file ({$this->logFile})! Wrote $writeResult out of $textSize bytes."); - } - @flock($fp, LOCK_UN); - @fclose($fp); } + $writeResult = @fwrite($fp, $text); + if ($writeResult === false) { + $error = error_get_last(); + throw new LogRuntimeException("Unable to export log through file ({$this->logFile})!: {$error['message']}"); + } + $textSize = strlen($text); + if ($writeResult < $textSize) { + throw new LogRuntimeException("Unable to export whole log through file ({$this->logFile})! Wrote $writeResult out of $textSize bytes."); + } + @fflush($fp); + @flock($fp, LOCK_UN); + @fclose($fp); + if ($this->fileMode !== null) { @chmod($this->logFile, $this->fileMode); } @@ -163,7 +163,7 @@ protected function rotateFiles() continue; } $newFile = $this->logFile . '.' . ($i + 1); - $this->rotateByCopy ? $this->rotateByCopy($rotateFile, $newFile) : $this->rotateByRename($rotateFile, $newFile); + $this->rotateByCopy($rotateFile, $newFile); if ($i === 0) { $this->clearLogFile($rotateFile); } @@ -195,14 +195,4 @@ private function rotateByCopy($rotateFile, $newFile) @chmod($newFile, $this->fileMode); } } - - /** - * Renames rotated file into new file - * @param string $rotateFile - * @param string $newFile - */ - private function rotateByRename($rotateFile, $newFile) - { - @rename($rotateFile, $newFile); - } } diff --git a/framework/log/LogRuntimeException.php b/framework/log/LogRuntimeException.php index 888e2f50414..609f3cde478 100644 --- a/framework/log/LogRuntimeException.php +++ b/framework/log/LogRuntimeException.php @@ -1,8 +1,8 @@ db->driverName === 'mysql') { - // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci + // https://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; } diff --git a/framework/log/migrations/schema-mssql.sql b/framework/log/migrations/schema-mssql.sql index 28358e32164..7bbcf90af74 100644 --- a/framework/log/migrations/schema-mssql.sql +++ b/framework/log/migrations/schema-mssql.sql @@ -6,9 +6,9 @@ * want to create additional indexes (e.g. index on `log_time`). * * @author Alexander Makarov - * @link http://www.yiiframework.com/ + * @link https://www.yiiframework.com/ * @copyright 2008 Yii Software LLC - * @license http://www.yiiframework.com/license/ + * @license https://www.yiiframework.com/license/ * @since 2.0.1 */ diff --git a/framework/log/migrations/schema-mysql.sql b/framework/log/migrations/schema-mysql.sql index e1d70dd6e65..79140784c88 100644 --- a/framework/log/migrations/schema-mysql.sql +++ b/framework/log/migrations/schema-mysql.sql @@ -6,9 +6,9 @@ * want to create additional indexes (e.g. index on `log_time`). * * @author Alexander Makarov - * @link http://www.yiiframework.com/ + * @link https://www.yiiframework.com/ * @copyright 2008 Yii Software LLC - * @license http://www.yiiframework.com/license/ + * @license https://www.yiiframework.com/license/ * @since 2.0.1 */ diff --git a/framework/log/migrations/schema-oci.sql b/framework/log/migrations/schema-oci.sql index a49c489f11e..8ac0e2a5dc0 100644 --- a/framework/log/migrations/schema-oci.sql +++ b/framework/log/migrations/schema-oci.sql @@ -6,9 +6,9 @@ * want to create additional indexes (e.g. index on `log_time`). * * @author Alexander Makarov - * @link http://www.yiiframework.com/ + * @link https://www.yiiframework.com/ * @copyright 2008 Yii Software LLC - * @license http://www.yiiframework.com/license/ + * @license https://www.yiiframework.com/license/ * @since 2.0.1 */ diff --git a/framework/log/migrations/schema-pgsql.sql b/framework/log/migrations/schema-pgsql.sql index ba77ca13dff..bcfe70a6709 100644 --- a/framework/log/migrations/schema-pgsql.sql +++ b/framework/log/migrations/schema-pgsql.sql @@ -6,9 +6,9 @@ * want to create additional indexes (e.g. index on `log_time`). * * @author Alexander Makarov - * @link http://www.yiiframework.com/ + * @link https://www.yiiframework.com/ * @copyright 2008 Yii Software LLC - * @license http://www.yiiframework.com/license/ + * @license https://www.yiiframework.com/license/ * @since 2.0.1 */ @@ -25,4 +25,4 @@ create table "log" ); create index "idx_log_level" on "log" ("level"); -create index "idx_log_category" on "log" ("category"); \ No newline at end of file +create index "idx_log_category" on "log" ("category"); diff --git a/framework/log/migrations/schema-sqlite.sql b/framework/log/migrations/schema-sqlite.sql index 0ca66cf7f32..302df02fbb1 100644 --- a/framework/log/migrations/schema-sqlite.sql +++ b/framework/log/migrations/schema-sqlite.sql @@ -6,9 +6,9 @@ * want to create additional indexes (e.g. index on `log_time`). * * @author Alexander Makarov - * @link http://www.yiiframework.com/ + * @link https://www.yiiframework.com/ * @copyright 2008 Yii Software LLC - * @license http://www.yiiframework.com/license/ + * @license https://www.yiiframework.com/license/ * @since 2.0.1 */ @@ -25,4 +25,4 @@ create table "log" ); create index "idx_log_level" on "log" ("level"); -create index "idx_log_category" on "log" ("category"); \ No newline at end of file +create index "idx_log_category" on "log" ("category"); diff --git a/framework/mail/BaseMailer.php b/framework/mail/BaseMailer.php index d564ae8708e..c5f76fb7538 100644 --- a/framework/mail/BaseMailer.php +++ b/framework/mail/BaseMailer.php @@ -1,8 +1,8 @@ ' 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 b5144bdc07b..a2b19347e06 100644 --- a/framework/messages/ar/yii.php +++ b/framework/messages/ar/yii.php @@ -1,8 +1,8 @@ '', + '"{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 8af3b7fd0d9..a283d5501e4 100644 --- a/framework/messages/az/yii.php +++ b/framework/messages/az/yii.php @@ -1,8 +1,8 @@ '', + '"{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 4d17ee704d1..c2771f47385 100644 --- a/framework/messages/be/yii.php +++ b/framework/messages/be/yii.php @@ -1,8 +1,8 @@ ' і ', '"{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 bb738174771..d12f3e03169 100644 --- a/framework/messages/bg/yii.php +++ b/framework/messages/bg/yii.php @@ -1,8 +1,8 @@ ' и ', '"{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 6d3ad8ba184..c4013f58cf1 100644 --- a/framework/messages/bs/yii.php +++ b/framework/messages/bs/yii.php @@ -1,8 +1,8 @@ '', + '"{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 43aa50d0808..9e359a0dd5d 100644 --- a/framework/messages/ca/yii.php +++ b/framework/messages/ca/yii.php @@ -1,8 +1,8 @@ '', + '"{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 7f8db2d41c1..21ba4310a5c 100644 --- a/framework/messages/config.php +++ b/framework/messages/config.php @@ -1,8 +1,8 @@ __DIR__, // array, required, list of language codes that the extracted messages // should be translated to. For example, ['zh-CN', 'de']. - 'languages' => ['af', 'ar', 'az', 'be', 'bg', 'bs', 'ca', 'cs', 'da', 'de', 'el', 'es', 'et', 'fa', 'fi', 'fr', 'he', 'hi', 'hr', 'hu', 'hy', 'id', 'it', 'ja', 'ka', 'kk', 'ko', 'kz', 'lt', 'lv', 'ms', 'nb-NO', 'nl', 'pl', 'pt', 'pt-BR', 'ro', 'ru', 'sk', 'sl', 'sr', 'sr-Latn', 'sv', 'tg', 'th', 'tr', 'uk', 'uz', 'vi', 'zh-CN', 'zh-TW'], + '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', '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 // translated. You may use a string for single function name or an array for // multiple function names. - 'translator' => 'Yii::t', + 'translator' => ['\Yii::t', 'Yii::t'], // 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, @@ -39,13 +43,13 @@ // Note, the '/' characters in a pattern matches both '/' and '\'. // See helpers/FileHelper::findFiles() description for more details on pattern matching rules. 'except' => [ - '.svn', - '.git', - '.gitignore', - '.gitkeep', - '.hgignore', - '.hgkeep', + '.*', + '/.*', '/messages', + '/tests', + '/runtime', + '/vendor', + '/BaseYii.php', ], // array, list of patterns that specify which files (not directories) should be processed. // If empty or not set, all files will be processed. @@ -53,9 +57,9 @@ // If a file/directory matches both a pattern in "only" and "except", it will NOT be processed. 'only' => ['*.php'], 'phpFileHeader' => '/** - * @link http://www.yiiframework.com/ + * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC - * @license http://www.yiiframework.com/license/ + * @license https://www.yiiframework.com/license/ */ ', diff --git a/framework/messages/cs/yii.php b/framework/messages/cs/yii.php index 06eb020cd1b..5520301c14b 100644 --- a/framework/messages/cs/yii.php +++ b/framework/messages/cs/yii.php @@ -1,8 +1,8 @@ ' 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 a26abc7833e..6f074dd60be 100644 --- a/framework/messages/da/yii.php +++ b/framework/messages/da/yii.php @@ -1,8 +1,8 @@ '(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 823f85354f7..96f36ac4374 100644 --- a/framework/messages/de/yii.php +++ b/framework/messages/de/yii.php @@ -1,8 +1,8 @@ ' 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 ed579516535..fddd64d8212 100644 --- a/framework/messages/el/yii.php +++ b/framework/messages/el/yii.php @@ -1,8 +1,8 @@ ' και ', '"{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}" πρέπει να είναι είτε τιμή είτε προδιαγραφή έγκυρου τελεστή.', @@ -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}' => 'Διαθέσιμες επιλογές: {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 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{αρχείο} 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, =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{# λεπτά}}', @@ -142,7 +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}}', - 'Action not found.' => 'Δε βρέθηκε η ενέργεια.', - 'Aliases available: {aliases}' => 'Διαθέσιμα ψευδώνυμα: {aliases}', - 'Options available: {options}' => 'Διαθέσιμες επιλογές: {options}', ]; diff --git a/framework/messages/es/yii.php b/framework/messages/es/yii.php index 8c4802aa148..af60f0767ed 100644 --- a/framework/messages/es/yii.php +++ b/framework/messages/es/yii.php @@ -1,8 +1,8 @@ ' 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 4ae31877020..950274fa961 100644 --- a/framework/messages/et/yii.php +++ b/framework/messages/et/yii.php @@ -1,8 +1,8 @@ ' 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 084a44a23d1..e9213b3482f 100644 --- a/framework/messages/fa/yii.php +++ b/framework/messages/fa/yii.php @@ -1,8 +1,8 @@ ' و ', + '"{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 64bee1e119d..531a44214e7 100644 --- a/framework/messages/fi/yii.php +++ b/framework/messages/fi/yii.php @@ -1,8 +1,8 @@ '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 0d2920adee9..8e1bfda3cd4 100644 --- a/framework/messages/fr/yii.php +++ b/framework/messages/fr/yii.php @@ -1,8 +1,8 @@ ' 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 7e49173ce54..b3eef1b535c 100644 --- a/framework/messages/he/yii.php +++ b/framework/messages/he/yii.php @@ -1,8 +1,8 @@ '', + '"{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 e43b4bff7ee..0276c2d8728 100644 --- a/framework/messages/hi/yii.php +++ b/framework/messages/hi/yii.php @@ -1,8 +1,8 @@ ' और ', + '"{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 772ef9493e4..73e5c656fb0 100644 --- a/framework/messages/hr/yii.php +++ b/framework/messages/hr/yii.php @@ -1,8 +1,8 @@ '', + '"{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 5500ec02066..db42e0f2926 100644 --- a/framework/messages/hu/yii.php +++ b/framework/messages/hu/yii.php @@ -1,8 +1,8 @@ '(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 63739dd7d52..b62094573e1 100644 --- a/framework/messages/hy/yii.php +++ b/framework/messages/hy/yii.php @@ -1,13 +1,12 @@ + * 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 c0661f8ad1b..785f29f43b2 100644 --- a/framework/messages/id/yii.php +++ b/framework/messages/id/yii.php @@ -1,8 +1,8 @@ '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 249f1edce81..e2d7eff4165 100644 --- a/framework/messages/it/yii.php +++ b/framework/messages/it/yii.php @@ -1,8 +1,8 @@ '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 f71563ff806..c885e6bd951 100644 --- a/framework/messages/ka/yii.php +++ b/framework/messages/ka/yii.php @@ -1,8 +1,8 @@ '', + '"{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 8d77b9422d7..fb43703aa89 100644 --- a/framework/messages/kk/yii.php +++ b/framework/messages/kk/yii.php @@ -1,8 +1,8 @@ '', + '"{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 cfc91dbd4bf..bf0a51babb4 100644 --- a/framework/messages/ko/yii.php +++ b/framework/messages/ko/yii.php @@ -1,8 +1,8 @@ '', + '"{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 bc6fa54b84a..72d8d5b3081 100644 --- a/framework/messages/lt/yii.php +++ b/framework/messages/lt/yii.php @@ -1,8 +1,8 @@ '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 b94c28c594e..d1ad194b9d4 100644 --- a/framework/messages/lv/yii.php +++ b/framework/messages/lv/yii.php @@ -1,8 +1,8 @@ '{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 562ed357a7f..3850dcaa6fe 100644 --- a/framework/messages/ms/yii.php +++ b/framework/messages/ms/yii.php @@ -1,8 +1,8 @@ '', + '"{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 af345e3c273..7aebeffa60f 100644 --- a/framework/messages/nb-NO/yii.php +++ b/framework/messages/nb-NO/yii.php @@ -1,8 +1,8 @@ '', + '"{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 3a4b0ae1090..a647a96df31 100644 --- a/framework/messages/nl/yii.php +++ b/framework/messages/nl/yii.php @@ -1,8 +1,8 @@ '', + '"{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 e42445ee38e..53d609ba0b5 100644 --- a/framework/messages/pl/yii.php +++ b/framework/messages/pl/yii.php @@ -1,8 +1,8 @@ ' 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 b82a6595c0a..c71b5b4ac27 100644 --- a/framework/messages/pt-BR/yii.php +++ b/framework/messages/pt-BR/yii.php @@ -1,8 +1,8 @@ '"{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 93aebcbe090..9cc4999d438 100644 --- a/framework/messages/pt/yii.php +++ b/framework/messages/pt/yii.php @@ -1,8 +1,8 @@ ' 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 c34064c0d32..7d62653f784 100644 --- a/framework/messages/ro/yii.php +++ b/framework/messages/ro/yii.php @@ -1,8 +1,8 @@ '', + '"{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 4cbcf38f98a..44bced6a49d 100644 --- a/framework/messages/ru/yii.php +++ b/framework/messages/ru/yii.php @@ -1,8 +1,8 @@ ' и ', '"{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 3ca97ad6342..50ff8e981b2 100644 --- a/framework/messages/sk/yii.php +++ b/framework/messages/sk/yii.php @@ -1,8 +1,8 @@ ' 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 53031adb582..5b15a08321c 100644 --- a/framework/messages/sl/yii.php +++ b/framework/messages/sl/yii.php @@ -1,8 +1,8 @@ '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 5a5e047c4e0..768dbd8eacd 100644 --- a/framework/messages/sr-Latn/yii.php +++ b/framework/messages/sr-Latn/yii.php @@ -1,8 +1,8 @@ '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 2edf790189b..7262ded5773 100644 --- a/framework/messages/sr/yii.php +++ b/framework/messages/sr/yii.php @@ -1,8 +1,8 @@ 'управо сада', - '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 d416aa7d25c..4be34190894 100644 --- a/framework/messages/sv/yii.php +++ b/framework/messages/sv/yii.php @@ -1,8 +1,8 @@ '', + '"{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 bd7894a6faa..7c9d9fc884e 100644 --- a/framework/messages/tg/yii.php +++ b/framework/messages/tg/yii.php @@ -1,8 +1,8 @@ 'Дар {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 a9859e299a4..6ce740fde16 100644 --- a/framework/messages/th/yii.php +++ b/framework/messages/th/yii.php @@ -1,8 +1,8 @@ '', + '"{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 e1ecb7e6414..f17530b26ca 100644 --- a/framework/messages/tr/yii.php +++ b/framework/messages/tr/yii.php @@ -1,8 +1,8 @@ '', + '"{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 927b8a7479c..1a61ec73c2b 100644 --- a/framework/messages/uk/yii.php +++ b/framework/messages/uk/yii.php @@ -1,8 +1,8 @@ 'Значення "{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 new file mode 100644 index 00000000000..3d8d03ad5bb --- /dev/null +++ b/framework/messages/uz-Cy/yii.php @@ -0,0 +1,147 @@ + '', + '"{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 1d3a94d8a81..cf1a2f612f3 100644 --- a/framework/messages/uz/yii.php +++ b/framework/messages/uz/yii.php @@ -1,8 +1,8 @@ '{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 d56cf296a78..947442e6d21 100644 --- a/framework/messages/vi/yii.php +++ b/framework/messages/vi/yii.php @@ -1,8 +1,8 @@ ' 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 a4b500bfb96..c9bc82152c1 100644 --- a/framework/messages/zh-TW/yii.php +++ b/framework/messages/zh-TW/yii.php @@ -1,8 +1,8 @@ '未知的別名: -{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 97% rename from framework/messages/zh-CN/yii.php rename to framework/messages/zh/yii.php index 00be4349e40..7f1f3de35d9 100644 --- a/framework/messages/zh-CN/yii.php +++ b/framework/messages/zh/yii.php @@ -1,8 +1,8 @@ ' 与 ', '"{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/DbMutex.php b/framework/mutex/DbMutex.php index b47188f8a55..593cff4e08a 100644 --- a/framework/mutex/DbMutex.php +++ b/framework/mutex/DbMutex.php @@ -1,8 +1,8 @@ db->driverName !== 'mysql') { throw new InvalidConfigException('In order to use MysqlMutex connection must be configured to use MySQL database.'); } + if ($this->keyPrefix === null) { + $this->keyPrefix = new Expression('DATABASE()'); + } } /** @@ -52,15 +63,19 @@ public function init() * @param string $name of the lock to be acquired. * @param int $timeout time (in seconds) to wait for lock to become released. * @return bool acquiring result. - * @see http://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html#function_get-lock + * @see https://dev.mysql.com/doc/refman/8.0/en/miscellaneous-functions.html#function_get-lock */ 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(:name, :timeout)', - [':name' => $this->hashLockName($name), ':timeout' => $timeout] + $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(); }); } @@ -69,19 +84,39 @@ protected function acquireLock($name, $timeout = 0) * Releases lock by given name. * @param string $name of the lock to be released. * @return bool release result. - * @see http://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html#function_release-lock + * @see https://dev.mysql.com/doc/refman/8.0/en/miscellaneous-functions.html#function_release-lock */ protected function releaseLock($name) { return $this->db->useMaster(function ($db) use ($name) { /** @var \yii\db\Connection $db */ - return (bool) $db->createCommand( - 'SELECT RELEASE_LOCK(:name)', - [':name' => $this->hashLockName($name)] + $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. * @@ -90,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/mutex/OracleMutex.php b/framework/mutex/OracleMutex.php index 6edfdee758c..1e15876edd8 100644 --- a/framework/mutex/OracleMutex.php +++ b/framework/mutex/OracleMutex.php @@ -1,8 +1,8 @@ @@ -51,7 +51,7 @@ class OracleMutex extends DbMutex /** * @var string lock mode to be used. - * @see http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_lock.htm#CHDBCFDI + * @see https://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_lock.htm#ARPLS021#CHDBCFDI */ public $lockMode = self::MODE_X; /** @@ -74,7 +74,7 @@ public function init() /** * Acquires lock by given name. - * @see http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_lock.htm + * @see https://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_lock.htm#ARPLS021 * @param string $name of the lock to be acquired. * @param int $timeout time (in seconds) to wait for lock to become released. * @return bool acquiring result. @@ -110,7 +110,7 @@ protected function acquireLock($name, $timeout = 0) * Releases lock by given name. * @param string $name of the lock to be released. * @return bool release result. - * @see http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_lock.htm + * @see https://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_lock.htm#ARPLS021 */ protected function releaseLock($name) { diff --git a/framework/mutex/PgsqlMutex.php b/framework/mutex/PgsqlMutex.php index 900ac5ff391..3f1c045a1a9 100644 --- a/framework/mutex/PgsqlMutex.php +++ b/framework/mutex/PgsqlMutex.php @@ -1,8 +1,8 @@ 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/rbac/Item.php b/framework/rbac/Item.php index 5149b38daed..69738026d98 100644 --- a/framework/rbac/Item.php +++ b/framework/rbac/Item.php @@ -1,8 +1,8 @@ db->driverName === 'mysql') { - // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci + // https://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; } diff --git a/framework/rbac/migrations/m170907_052038_rbac_add_index_on_auth_assignment_user_id.php b/framework/rbac/migrations/m170907_052038_rbac_add_index_on_auth_assignment_user_id.php index 061da00f8cc..4fee2611bce 100644 --- a/framework/rbac/migrations/m170907_052038_rbac_add_index_on_auth_assignment_user_id.php +++ b/framework/rbac/migrations/m170907_052038_rbac_add_index_on_auth_assignment_user_id.php @@ -1,8 +1,8 @@ * @author Alexander Kochetov - * @link http://www.yiiframework.com/ + * @link https://www.yiiframework.com/ * @copyright 2008 Yii Software LLC - * @license http://www.yiiframework.com/license/ + * @license https://www.yiiframework.com/license/ * @since 2.0 */ diff --git a/framework/rbac/migrations/schema-mysql.sql b/framework/rbac/migrations/schema-mysql.sql index 42ff6c35213..a96d7195bac 100644 --- a/framework/rbac/migrations/schema-mysql.sql +++ b/framework/rbac/migrations/schema-mysql.sql @@ -3,9 +3,9 @@ * * @author Qiang Xue * @author Alexander Kochetov - * @link http://www.yiiframework.com/ + * @link https://www.yiiframework.com/ * @copyright 2008 Yii Software LLC - * @license http://www.yiiframework.com/license/ + * @license https://www.yiiframework.com/license/ * @since 2.0 */ diff --git a/framework/rbac/migrations/schema-oci.sql b/framework/rbac/migrations/schema-oci.sql index 252c2194220..2753629703f 100644 --- a/framework/rbac/migrations/schema-oci.sql +++ b/framework/rbac/migrations/schema-oci.sql @@ -3,9 +3,9 @@ * * @author Qiang Xue * @author Alexander Kochetov - * @link http://www.yiiframework.com/ + * @link https://www.yiiframework.com/ * @copyright 2008 Yii Software LLC - * @license http://www.yiiframework.com/license/ + * @license https://www.yiiframework.com/license/ * @since 2.0 */ diff --git a/framework/rbac/migrations/schema-pgsql.sql b/framework/rbac/migrations/schema-pgsql.sql index 11aee39d38a..bf441c6b2dd 100644 --- a/framework/rbac/migrations/schema-pgsql.sql +++ b/framework/rbac/migrations/schema-pgsql.sql @@ -3,9 +3,9 @@ * * @author Qiang Xue * @author Alexander Kochetov - * @link http://www.yiiframework.com/ + * @link https://www.yiiframework.com/ * @copyright 2008 Yii Software LLC - * @license http://www.yiiframework.com/license/ + * @license https://www.yiiframework.com/license/ * @since 2.0 */ diff --git a/framework/rbac/migrations/schema-sqlite.sql b/framework/rbac/migrations/schema-sqlite.sql index 15f4a59972d..eb7e7b43db4 100644 --- a/framework/rbac/migrations/schema-sqlite.sql +++ b/framework/rbac/migrations/schema-sqlite.sql @@ -3,9 +3,9 @@ * * @author Qiang Xue * @author Alexander Kochetov - * @link http://www.yiiframework.com/ + * @link https://www.yiiframework.com/ * @copyright 2008 Yii Software LLC - * @license http://www.yiiframework.com/license/ + * @license https://www.yiiframework.com/license/ * @since 2.0 */ diff --git a/framework/requirements/YiiRequirementChecker.php b/framework/requirements/YiiRequirementChecker.php index 612083684a0..45675cd716c 100644 --- a/framework/requirements/YiiRequirementChecker.php +++ b/framework/requirements/YiiRequirementChecker.php @@ -1,8 +1,8 @@ 'PHP version', 'mandatory' => true, 'condition' => version_compare(PHP_VERSION, '5.4.0', '>='), - 'by' => 'Yii Framework', + 'by' => 'Yii Framework', 'memo' => 'PHP 5.4.0 or higher is required.', ), array( 'name' => 'Reflection extension', 'mandatory' => true, 'condition' => class_exists('Reflection', false), - 'by' => 'Yii Framework', + 'by' => 'Yii Framework', ), array( 'name' => 'PCRE extension', 'mandatory' => true, 'condition' => extension_loaded('pcre'), - 'by' => 'Yii Framework', + 'by' => 'Yii Framework', ), array( 'name' => 'SPL extension', 'mandatory' => true, 'condition' => extension_loaded('SPL'), - 'by' => 'Yii Framework', + 'by' => 'Yii Framework', ), array( 'name' => 'Ctype extension', 'mandatory' => true, 'condition' => extension_loaded('ctype'), - 'by' => 'Yii Framework' + 'by' => 'Yii Framework' ), array( 'name' => 'MBString extension', @@ -54,7 +54,7 @@ 'name' => 'OpenSSL extension', 'mandatory' => false, 'condition' => extension_loaded('openssl'), - 'by' => 'Security Component', + 'by' => 'Security Component', 'memo' => 'Required by encrypt and decrypt methods.' ), array( @@ -74,7 +74,7 @@ 'by' => 'Internationalization support', 'memo' => 'ICU 49.0 or higher is required when you want to use # placeholder in plural rules (for example, plural in - + Formatter::asRelativeTime()) in the yii\i18n\Formatter class. Your current ICU version is ' . (defined('INTL_ICU_VERSION') ? INTL_ICU_VERSION : '(ICU is missing)') . '.' ), @@ -85,7 +85,7 @@ 'by' => 'Internationalization support', 'memo' => 'ICU Data 49.1 or higher is required when you want to use # placeholder in plural rules (for example, plural in - + Formatter::asRelativeTime()) in the yii\i18n\Formatter class. Your current ICU Data version is ' . (defined('INTL_ICU_DATA_VERSION') ? INTL_ICU_DATA_VERSION : '(ICU Data is missing)') . '.' ), @@ -107,9 +107,16 @@ 'name' => 'IPv6 support', 'mandatory' => false, 'condition' => strlen(@inet_pton('2001:db8::1')) === 16, - 'by' => 'IPv6 expansion in IpValidator', - 'memo' => 'When IpValidator::expandIPv6 + 'by' => 'IPv6 expansion in IpValidator', + '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/requirements/views/console/index.php b/framework/requirements/views/console/index.php index 68c4cb543e1..acf912698a9 100644 --- a/framework/requirements/views/console/index.php +++ b/framework/requirements/views/console/index.php @@ -1,8 +1,8 @@ diff --git a/framework/rest/Action.php b/framework/rest/Action.php index 6afafca4502..c700d665c8f 100644 --- a/framework/rest/Action.php +++ b/framework/rest/Action.php @@ -1,8 +1,8 @@ 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/rest/UpdateAction.php b/framework/rest/UpdateAction.php index a299679cddc..c307144231f 100644 --- a/framework/rest/UpdateAction.php +++ b/framework/rest/UpdateAction.php @@ -1,8 +1,8 @@ getClientOptions($model, $attribute); - return 'yii.validation.boolean(value, messages, ' . json_encode($options, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) . ');'; + return 'yii.validation.boolean(value, messages, ' . Json::htmlEncode($options) . ');'; } /** diff --git a/framework/validators/CompareValidator.php b/framework/validators/CompareValidator.php index fbe4d2cbe2b..4c786c4e551 100644 --- a/framework/validators/CompareValidator.php +++ b/framework/validators/CompareValidator.php @@ -1,8 +1,8 @@ compareAttribute === null ? $attribute . '_repeat' : $this->compareAttribute; $compareValue = $model->$compareAttribute; $compareLabel = $compareValueOrAttribute = $model->getAttributeLabel($compareAttribute); + + if (!$this->skipOnError && $model->hasErrors($compareAttribute)) { + $this->addError( + $model, + $attribute, + Yii::t('yii', '{compareAttribute} is invalid.'), + ['compareAttribute' => $compareLabel] + ); + + return; + } } if (!$this->compareValues($this->operator, $this->type, $value, $compareValue)) { @@ -234,7 +246,7 @@ public function clientValidateAttribute($model, $attribute, $view) ValidationAsset::register($view); $options = $this->getClientOptions($model, $attribute); - return 'yii.validation.compare(value, messages, ' . json_encode($options, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) . ', $form);'; + return 'yii.validation.compare(value, messages, ' . Json::htmlEncode($options) . ', $form);'; } /** diff --git a/framework/validators/DateValidator.php b/framework/validators/DateValidator.php index 3df5018b321..c0f66454120 100644 --- a/framework/validators/DateValidator.php +++ b/framework/validators/DateValidator.php @@ -1,8 +1,8 @@ on supported formats. @@ -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/DefaultValueValidator.php b/framework/validators/DefaultValueValidator.php index 098754d27bf..862acd22951 100644 --- a/framework/validators/DefaultValueValidator.php +++ b/framework/validators/DefaultValueValidator.php @@ -1,8 +1,8 @@ $/'; /** * @var string the regular expression used to validate the part before the @ symbol, used if ASCII conversion fails to validate the address. - * @see http://www.regular-expressions.info/email.html + * @see https://www.regular-expressions.info/email.html * @since 2.0.42 */ public $patternASCII = '/^[a-zA-Z0-9!#$%&\'*+\\/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&\'*+\\/=?^_`{|}~-]+)*$/'; @@ -105,7 +105,7 @@ protected function validateValue($value) if (strlen($matches['local']) > 64) { // The maximum total length of a user name or other local-part is 64 octets. RFC 5322 section 4.5.3.1.1 - // http://tools.ietf.org/html/rfc5321#section-4.5.3.1.1 + // https://datatracker.ietf.org/doc/html/rfc5321#section-4.5.3.1.1 $valid = false; } elseif (strlen($matches['local'] . '@' . $matches['domain']) > 254) { // There is a restriction in RFC 2821 on the length of an address in MAIL and RCPT commands @@ -113,7 +113,7 @@ protected function validateValue($value) // upper limit on address lengths should normally be considered to be 254. // // Dominic Sayers, RFC 3696 erratum 1690 - // http://www.rfc-editor.org/errata_search.php?eid=1690 + // https://www.rfc-editor.org/errata_search.php?eid=1690 $valid = false; } else { $valid = preg_match($this->pattern, $value) || ($this->allowName && preg_match($this->fullPattern, $value)); diff --git a/framework/validators/ExistValidator.php b/framework/validators/ExistValidator.php index 5388b11f634..faea7b55d47 100644 --- a/framework/validators/ExistValidator.php +++ b/framework/validators/ExistValidator.php @@ -1,8 +1,8 @@ targetAttribute === null ? $attribute : $this->targetAttribute; + if ($this->skipOnError) { + foreach ((array)$targetAttribute as $k => $v) { + if ($model->hasErrors(is_int($k) ? $v : $k)) { + return; + } + } + } + $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) { @@ -256,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); } @@ -282,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(); } @@ -320,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/FileValidator.php b/framework/validators/FileValidator.php index 2d67ac60cb8..28d97f9c972 100644 --- a/framework/validators/FileValidator.php +++ b/framework/validators/FileValidator.php @@ -1,8 +1,8 @@ getClientOptions($model, $attribute); - return 'yii.validation.file(attribute, messages, ' . Json::encode($options) . ');'; + return 'yii.validation.file(attribute, messages, ' . Json::htmlEncode($options) . ');'; } /** diff --git a/framework/validators/FilterValidator.php b/framework/validators/FilterValidator.php index d24131a9711..a08b0b51d29 100644 --- a/framework/validators/FilterValidator.php +++ b/framework/validators/FilterValidator.php @@ -1,13 +1,14 @@ getClientOptions($model, $attribute); - return 'value = yii.validation.trim($form, attribute, ' . json_encode($options, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) . ', value);'; + return 'value = yii.validation.trim($form, attribute, ' . Json::htmlEncode($options) . ', value);'; } /** diff --git a/framework/validators/ImageValidator.php b/framework/validators/ImageValidator.php index 0a06dd75f4d..fbac2516a73 100644 --- a/framework/validators/ImageValidator.php +++ b/framework/validators/ImageValidator.php @@ -1,13 +1,14 @@ getClientOptions($model, $attribute); - return 'yii.validation.image(attribute, messages, ' . json_encode($options, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) . ', deferred);'; + return 'yii.validation.image(attribute, messages, ' . Json::htmlEncode($options) . ', deferred);'; } /** diff --git a/framework/validators/InlineValidator.php b/framework/validators/InlineValidator.php index 86924826415..800046d7081 100644 --- a/framework/validators/InlineValidator.php +++ b/framework/validators/InlineValidator.php @@ -1,8 +1,8 @@ * @since 2.0 */ diff --git a/framework/validators/IpValidator.php b/framework/validators/IpValidator.php index 02ac99eb0b7..c4a9555bf8a 100644 --- a/framework/validators/IpValidator.php +++ b/framework/validators/IpValidator.php @@ -1,8 +1,8 @@ true], // expands IPv6 address to a full notation format * ``` * - * @property array $ranges The IPv4 or IPv6 ranges that are allowed or forbidden. See [[setRanges()]] for - * detailed description. Note that the type of this property differs in getter and setter. See [[getRanges()]] - * and [[setRanges()]] for details. + * @property array $ranges The IPv4 or IPv6 ranges that are allowed or forbidden. Note that the type of this + * property differs in getter and setter. See [[getRanges()]] and [[setRanges()]] for details. * * @author Dmitry Naumenko * @since 2.0.7 @@ -116,11 +115,11 @@ class IpValidator extends Validator /** * @var string Regexp-pattern to validate IPv4 address */ - public $ipv4Pattern = '/^(?:(?:2(?:[0-4][0-9]|5[0-5])|[0-1]?[0-9]?[0-9])\.){3}(?:(?:2([0-4][0-9]|5[0-5])|[0-1]?[0-9]?[0-9]))$/'; + public $ipv4Pattern = '/^(?:(?:2(?:[0-4]\d|5[0-5])|[0-1]?\d?\d)\.){3}(?:(?:2([0-4]\d|5[0-5])|[0-1]?\d?\d))$/'; /** * @var string Regexp-pattern to validate IPv6 address */ - public $ipv6Pattern = '/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/'; + public $ipv6Pattern = '/^(([\da-fA-F]{1,4}:){7}[\da-fA-F]{1,4}|([\da-fA-F]{1,4}:){1,7}:|([\da-fA-F]{1,4}:){1,6}:[\da-fA-F]{1,4}|([\da-fA-F]{1,4}:){1,5}(:[\da-fA-F]{1,4}){1,2}|([\da-fA-F]{1,4}:){1,4}(:[\da-fA-F]{1,4}){1,3}|([\da-fA-F]{1,4}:){1,3}(:[\da-fA-F]{1,4}){1,4}|([\da-fA-F]{1,4}:){1,2}(:[\da-fA-F]{1,4}){1,5}|[\da-fA-F]{1,4}:((:[\da-fA-F]{1,4}){1,6})|:((:[\da-fA-F]{1,4}){1,7}|:)|fe80:(:[\da-fA-F]{0,4}){0,4}%[\da-zA-Z]+|::(ffff(:0{1,4})?:)?((25[0-5]|(2[0-4]|1?\d)?\d)\.){3}(25[0-5]|(2[0-4]|1?\d)?\d)|([\da-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1?[\d])?\d)\.){3}(25[0-5]|(2[0-4]|1?\d)?\d))$/'; /** * @var string user-defined error message is used when validation fails due to the wrong IP address format. * diff --git a/framework/validators/NumberValidator.php b/framework/validators/NumberValidator.php index 99972cefaa2..074af8cf45f 100644 --- a/framework/validators/NumberValidator.php +++ b/framework/validators/NumberValidator.php @@ -1,8 +1,8 @@ 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/PunycodeAsset.php b/framework/validators/PunycodeAsset.php index 1f65b8d6400..8d928838ce9 100644 --- a/framework/validators/PunycodeAsset.php +++ b/framework/validators/PunycodeAsset.php @@ -1,8 +1,8 @@ getClientOptions($model, $attribute); - return 'yii.validation.range(value, messages, ' . json_encode($options, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) . ');'; + return 'yii.validation.range(value, messages, ' . Json::htmlEncode($options) . ');'; } /** diff --git a/framework/validators/RegularExpressionValidator.php b/framework/validators/RegularExpressionValidator.php index bdc54ed9dac..747c4d2a9ee 100644 --- a/framework/validators/RegularExpressionValidator.php +++ b/framework/validators/RegularExpressionValidator.php @@ -1,8 +1,8 @@ getClientOptions($model, $attribute); - return 'yii.validation.required(value, messages, ' . json_encode($options, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) . ');'; + return 'yii.validation.required(value, messages, ' . Json::htmlEncode($options) . ');'; } /** diff --git a/framework/validators/SafeValidator.php b/framework/validators/SafeValidator.php index 2b0a3c5dd7f..f2944076766 100644 --- a/framework/validators/SafeValidator.php +++ b/framework/validators/SafeValidator.php @@ -1,8 +1,8 @@ getClientOptions($model, $attribute); - return 'yii.validation.string(value, messages, ' . json_encode($options, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) . ');'; + return 'yii.validation.string(value, messages, ' . Json::htmlEncode($options) . ');'; } /** diff --git a/framework/validators/TrimValidator.php b/framework/validators/TrimValidator.php index 2e32db69c49..022369810b5 100644 --- a/framework/validators/TrimValidator.php +++ b/framework/validators/TrimValidator.php @@ -1,12 +1,14 @@ getClientOptions($model, $attribute); - return 'value = yii.validation.trim($form, attribute, ' . json_encode($options) . ', value);'; + return 'value = yii.validation.trim($form, attribute, ' . Json::htmlEncode($options) . ', value);'; } /** diff --git a/framework/validators/UniqueValidator.php b/framework/validators/UniqueValidator.php index 3a9623627d9..74edcfd661c 100644 --- a/framework/validators/UniqueValidator.php +++ b/framework/validators/UniqueValidator.php @@ -1,8 +1,8 @@ getTargetClass($model); $targetAttribute = $this->targetAttribute === null ? $attribute : $this->targetAttribute; + if ($this->skipOnError) { + foreach ((array)$targetAttribute as $k => $v) { + if ($model->hasErrors(is_int($k) ? $v : $k)) { + return; + } + } + } + $rawConditions = $this->prepareConditions($targetAttribute, $model, $attribute); $conditions = [$this->targetAttributeJunction === 'or' ? 'or' : 'and']; @@ -136,6 +142,8 @@ public function validateAttribute($model, $attribute) $conditions[] = [$key => $value]; } + /* @var $targetClass ActiveRecordInterface */ + $targetClass = $this->getTargetClass($model); $db = $targetClass::getDb(); $modelExists = false; @@ -181,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 { @@ -320,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/validators/UrlValidator.php b/framework/validators/UrlValidator.php index b4fae1f7f8a..463e01f4f65 100644 --- a/framework/validators/UrlValidator.php +++ b/framework/validators/UrlValidator.php @@ -1,8 +1,8 @@ * @since 2.0 diff --git a/framework/views/errorHandler/exception.php b/framework/views/errorHandler/exception.php index 4601e7c42bd..e22498984a1 100644 --- a/framework/views/errorHandler/exception.php +++ b/framework/views/errorHandler/exception.php @@ -393,7 +393,7 @@
      Copied! - + Copy Stacktrace @@ -451,7 +451,7 @@ Yii Framework

      createServerInformationLink() ?>

      -

      Yii Framework/createFrameworkVersionLink() ?>

      +

      Yii Framework/createFrameworkVersionLink() ?>