diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index a763859..2138e04 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -156,4 +156,17 @@ jobs: - name: "php cs fixer dry run" env: PHP_CS_FIXER_IGNORE_ENV: 1 - run: "php-cs-fixer fix --dry-run --format=checkstyle | cs2pr" \ No newline at end of file + run: "php-cs-fixer fix --dry-run --format=checkstyle | cs2pr" + + markdownlint: + runs-on: "ubuntu-latest" + name: markdown lint + + steps: + - name: "checkout" + uses: "actions/checkout@v4" + + - name: "markdown lint" + uses: "bewuethr/mdl-action@v1" + with: + style-file: ".mdl_style.rb" \ No newline at end of file diff --git a/.mdl_style.rb b/.mdl_style.rb new file mode 100644 index 0000000..9eb6080 --- /dev/null +++ b/.mdl_style.rb @@ -0,0 +1,3 @@ +all +# no limitations on line length +exclude_rule 'MD013' diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 25f31a8..508ffd7 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1 +1,3 @@ -don't be a dick \ No newline at end of file +# code of conduct + +don't be a dick diff --git a/README.md b/README.md index a3dde91..88e2adf 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ composer require wickedone/phrase-translation-provider ```dotenv PHRASE_DSN=phrase://PROJECT_ID:API_TOKEN@default?userAgent=myProject ``` - + ### dsn elements - `PROJECT_ID`: can be retrieved in phrase from `project settings > API > Project ID` @@ -39,6 +39,7 @@ see [fine tuning your phrase api calls](#fine-tuning-your-phrase-api-calls) for ## service phrase provider in your `services.yaml` add the following to enable the phrase provider. + ```yaml Symfony\Component\Translation\Bridge\Phrase\PhraseProviderFactory: tags: ['translation.provider_factory'] @@ -48,7 +49,9 @@ Symfony\Component\Translation\Bridge\Phrase\PhraseProviderFactory: $xliffFileDumper: '@translation.dumper.xliff' $cache: '@cache.app' ``` + and in your `translations.yaml` you can add: + ```yaml framework: translator: @@ -72,7 +75,7 @@ if you define a locale in your `translation.yaml` which is not configured in you ## domains as tags translations will be tagged in phrase with the symfony translation domain they belong to. -check the [wickedone/phrase-tag-bundle](https://github.com/wickedOne/phrase-tag-bundle) if you need help managing your tags in phrase +check the [wickedone/phrase-tag-bundle](https://github.com/wickedOne/phrase-tag-bundle) if you need help managing your tags in phrase ## cache @@ -85,7 +88,7 @@ to enable you to perform post-processing on translation values and / or keys, tw ### PhraseReadEvent -_after_ reading the catalogue from phrase, the resulting `TranslatorBag` is dispatched in a `PhraseReadEvent` prior to being returned from the read method. +_after_ reading the catalogue from phrase, the resulting `TranslatorBag` is dispatched in a `PhraseReadEvent` prior to being returned from the read method. ### PhraseWriteEvent @@ -111,11 +114,11 @@ in order to read translations from phrase the [download locale](https://develope | `exclude_empty_zero_forms` | bool | | | | `include_translated_keys` | bool | | | | `keep_notranslate_tags` | bool | | | -| `format_options` | array | enclose_in_cdata | | | -| `encoding` | string | | | | -| `skip_unverified_translations` | bool | | | | -| `include_unverified_translations` | bool | | | | -| `use_last_reviewed_version` | bool | | | | +| `format_options` | array | enclose_in_cdata | | +| `encoding` | string | | | +| `skip_unverified_translations` | bool | | | +| `include_unverified_translations` | bool | | | +| `use_last_reviewed_version` | bool | | | | `fallback_locale_enabled` | bool | 0 | when the fallback locale is enabled, caching responses from phrase will be disabled | ### write