-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
904 additions
and
324 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,5 @@ node_modules | |
.env | ||
build/ | ||
\.php_cs\.cache | ||
/wdes-php-i18n-l10n-*.tar | ||
/.phpunit.result.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,129 @@ | ||
dist: trusty | ||
|
||
language: php | ||
|
||
php: | ||
- "7.1" | ||
- "7.2" | ||
|
||
sudo: required | ||
|
||
env: | ||
matrix: | ||
- CI_TYPE=phpunit | ||
|
||
before_script: | ||
- ./scripts/ci/install-reporters.sh | ||
- ./scripts/ci/install.sh | ||
|
||
- "./scripts/ci/install-reporters.sh" | ||
- "./scripts/ci/install.sh" | ||
script: | ||
- ./scripts/ci/ci-$CI_TYPE.sh | ||
|
||
install: | ||
# flags to pass to install | ||
- flags="--ansi --prefer-dist --no-interaction --optimize-autoloader --no-suggest --no-progress" | ||
# install dependencies using system provided composer binary | ||
- composer install $flags | ||
|
||
after_success: | ||
- bash <(curl -s https://codecov.io/bash) | ||
- if [ "$CI_COMPOSER" = "yes" ]; then composer install --ansi --prefer-dist --no-interaction --optimize-autoloader --no-suggest --no-progress; fi | ||
|
||
after_script: | ||
- ./codacy-coverage.phar clover build/logs/clover.xml | ||
- if [ "$TRAVIS_BUILD_STAGE_NAME" = "tests" ]; then ./codacy-coverage.phar clover build/logs/clover.xml; else echo "skipped codacy"; fi | ||
|
||
matrix: | ||
fast_finish: true | ||
include: | ||
- php: "7.2" | ||
env: CI_TYPE=phpstan | ||
|
||
- php: "7.2" | ||
env: CI_TYPE=phpcs | ||
stages: | ||
- name: lint | ||
- name: tests | ||
|
||
- os: osx | ||
language: generic | ||
jobs: | ||
include: | ||
- stage: tests | ||
php: "7.1" | ||
env: | ||
- CI_TYPE=phpunit | ||
- CI_COMPOSER=yes | ||
name: "PHPUNIT - PHP 7.1" | ||
after_success: | ||
- bash <(curl -s https://codecov.io/bash) -cF php | ||
- stage: tests | ||
php: "7.2" | ||
env: CI_TYPE=phpunit | ||
env: | ||
- CI_TYPE=phpunit | ||
- CI_COMPOSER=yes | ||
name: "PHPUNIT - PHP 7.2" | ||
after_success: | ||
- bash <(curl -s https://codecov.io/bash) -cF php | ||
- stage: tests | ||
php: "7.3" | ||
env: | ||
- CI_TYPE=phpunit | ||
- CI_COMPOSER=yes | ||
name: "PHPUNIT - PHP 7.3" | ||
after_success: | ||
- bash <(curl -s https://codecov.io/bash) -cF php | ||
- stage: tests | ||
os: osx | ||
language: node_js | ||
node_js: "10" | ||
env: | ||
- CI_TYPE=phpunit | ||
- CI_COMPOSER=yes | ||
name: "PHPUNIT - PHP 7.1" | ||
addons: | ||
homebrew: | ||
packages: | ||
- [email protected] | ||
- composer | ||
before_install: | ||
- ./scripts/ci/install-osx.sh | ||
- mkdir ~/.homebrew_logs | ||
- export HOMEBREW_LOGS="~/.homebrew_logs" | ||
- export HOMEBREW_TEMP="/tmp" | ||
- export HOMEBREW_INSTALL_BADGE="🌻" | ||
after_success: | ||
- bash <(curl -s https://codecov.io/bash) -cF php | ||
- stage: tests | ||
os: osx | ||
language: node_js | ||
node_js: "10" | ||
env: | ||
- CI_TYPE=phpunit | ||
- CI_COMPOSER=yes | ||
name: "PHPUNIT - PHP 7.2" | ||
addons: | ||
homebrew: | ||
packages: | ||
- [email protected] | ||
- composer | ||
before_install: | ||
- mkdir ~/.homebrew_logs | ||
- export HOMEBREW_LOGS="~/.homebrew_logs" | ||
- export HOMEBREW_TEMP="/tmp" | ||
- export HOMEBREW_INSTALL_BADGE="🌻" | ||
after_success: | ||
- bash <(curl -s https://codecov.io/bash) -cF php | ||
- stage: tests | ||
os: osx | ||
language: node_js | ||
node_js: "10" | ||
env: | ||
- CI_TYPE=phpunit | ||
- CI_COMPOSER=yes | ||
name: "PHPUNIT - PHP 7.3" | ||
addons: | ||
homebrew: | ||
packages: | ||
- [email protected] | ||
- composer | ||
before_install: | ||
- mkdir ~/.homebrew_logs | ||
- export HOMEBREW_LOGS="~/.homebrew_logs" | ||
- export HOMEBREW_TEMP="/tmp" | ||
- export HOMEBREW_INSTALL_BADGE="🌻" | ||
after_success: | ||
- bash <(curl -s https://codecov.io/bash) -cF php | ||
- stage: lint | ||
php: "7.3" | ||
env: | ||
- CI_TYPE=phpstan | ||
- CI_COMPOSER=yes | ||
name: "PHPSTAN - PHP 7.3" | ||
- stage: lint | ||
php: "7.3" | ||
env: | ||
- CI_TYPE=phpcs | ||
- CI_COMPOSER=yes | ||
name: "PHPCS - PHP 7.3" | ||
|
||
cache: | ||
apt: true | ||
ccache: true | ||
directories: | ||
- $HOME/.composer/cache/ | ||
- $HOME/.cache/bower | ||
- $HOME/.npm | ||
- $HOME/.cache/ci | ||
- /var/cache/apt | ||
- ~/Library/Caches/Homebrew | ||
- $HOME/Library/Caches/Homebrew | ||
|
||
before_cache: | ||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew cleanup; fi | ||
|
||
addons: | ||
apt: | ||
update: false | ||
packages: | ||
- git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,12 +5,48 @@ | |
"type": "library", | ||
"readme": "https://github.com/wdes/php-I18n-l10n/blob/master/README.md", | ||
"license": "MPL-2.0", | ||
"version": "1.0.0-alpha1", | ||
"version": "1.0.0", | ||
"support": { | ||
"email": "[email protected]", | ||
"issues": "https://github.com/wdes/php-I18n-l10n/issues", | ||
"source": "https://github.com/wdes/php-I18n-l10n" | ||
}, | ||
"scripts": { | ||
"phpcs": "phpcs --standard=phpcs.xml --no-cache --colors -p -n", | ||
"phpcbf": "phpcbf --standard=phpcs.xml", | ||
"phpstan": "phpstan analyse src tests --configuration=phpstan.neon --level=max", | ||
"phpunit": "phpunit --configuration ./tests/phpunit.xml", | ||
"update:example": "./scripts/update-example.sh" | ||
}, | ||
"non-feature-branches": ["dev"], | ||
"archive": { | ||
"exclude": [ | ||
"/tests", | ||
"/scripts/ci", | ||
"/.npmignore", | ||
"/.editorconfig", | ||
"/.gitmodules", | ||
"/CODEOWNERS", | ||
"/wdes-php-i18n-l10n-*.tar", | ||
"/docs", | ||
"/.gitignore", | ||
"/phpcs.xml", | ||
"/phpstan.neon", | ||
"/.travis.yml", | ||
"/codecov.yml", | ||
"/.phpunit.result.cache" | ||
] | ||
}, | ||
"keywords": [ | ||
"i18n", | ||
"l10n", | ||
"mo", | ||
"gettext", | ||
"pot-generator", | ||
"twig", | ||
"library", | ||
"composer-package" | ||
], | ||
"authors": [ | ||
{ | ||
"name": "William Desportes", | ||
|
@@ -28,14 +64,14 @@ | |
} | ||
}, | ||
"require": { | ||
"php": "^7.1" | ||
"php": "^7.1", | ||
"twig/twig": "^2.11", | ||
"twig/extensions": "^1.5" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "^7.2", | ||
"squizlabs/php_codesniffer": "^3.3", | ||
"slevomat/coding-standard": "^4.6", | ||
"phpstan/phpstan": "^0.9.2", | ||
"twig/twig": "^2.0", | ||
"twig/extensions": "^1.5" | ||
"slevomat/coding-standard": "^5.0", | ||
"phpstan/phpstan": "^0.11.8" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Wdes example. | ||
# Copyright (C) 2019 William Desportes | ||
# This file is distributed under the license http://unlicense.org/UNLICENSE | ||
# William Desportes <[email protected]> | ||
# | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: 1.0.0\n" | ||
"Report-Msgid-Bugs-To: [email protected]\n" | ||
"POT-Creation-Date: 2019-06-08 16:28+0200\n" | ||
"PO-Revision-Date: 2019-MO-DA HO:MI+ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
"Language: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=CHARSET\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" | ||
|
||
#. l10n: The title of the page | ||
#: example/templates/homepage.twig:2 | ||
#: example/templates/homepage.twig:5 | ||
msgid "Homepage" | ||
msgstr "" | ||
|
||
#: example/templates/homepage.twig:6 | ||
msgid "Another format" | ||
msgstr "" | ||
|
||
#: example/templates/homepage.twig:7 | ||
msgid "A filter" | ||
msgstr "" | ||
|
||
#: example/templates/homepage.twig:8 | ||
#, php-format | ||
msgid "With \"%s\" apples" | ||
msgstr "" | ||
|
||
#: example/templates/homepage.twig:10 | ||
#, php-format | ||
msgid "1 database" | ||
msgid_plural "%count% databases" | ||
msgstr[0] "" | ||
msgstr[1] "" | ||
|
||
#. l10n: The number of files | ||
#: example/templates/homepage.twig:17 | ||
#, php-format | ||
msgid "1 file" | ||
msgid_plural "%count% files" | ||
msgstr[0] "" | ||
msgstr[1] "" |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Test\n" | ||
"Report-Msgid-Bugs-To: [email protected]\n" | ||
"POT-Creation-Date: 2019-06-08 16:28+0200\n" | ||
"PO-Revision-Date: \n" | ||
"Last-Translator: \n" | ||
"Language-Team: Wdes\n" | ||
"Language: fr_FR\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: nplurals=2; plural=(n > 1);\n" | ||
"X-Generator: Poedit 2.1.1\n" | ||
"X-Poedit-SourceCharset: UTF-8\n" | ||
|
||
#. l10n: The title of the page | ||
#: example/templates/homepage.twig:2 | ||
#: example/templates/homepage.twig:5 | ||
msgid "Homepage" | ||
msgstr "Page d'accueil" | ||
|
||
#: example/templates/homepage.twig:6 | ||
msgid "Another format" | ||
msgstr "Un autre format" | ||
|
||
#: example/templates/homepage.twig:7 | ||
msgid "A filter" | ||
msgstr "Un filtre" | ||
|
||
#: example/templates/homepage.twig:8 | ||
#, php-format | ||
msgid "With \"%s\" apples" | ||
msgstr "Avec des \"%s\" pommes" | ||
|
||
#: example/templates/homepage.twig:10 | ||
#, php-format | ||
msgid "1 database" | ||
msgid_plural "%count% databases" | ||
msgstr[0] "Une base de données" | ||
msgstr[1] "%count% bases de données" | ||
|
||
#. l10n: The number of files | ||
#: example/templates/homepage.twig:17 | ||
#, php-format | ||
msgid "1 file" | ||
msgid_plural "%count% files" | ||
msgstr[0] "Un fichier" | ||
msgstr[1] "%count% fichiers" |
Oops, something went wrong.