Skip to content

Commit

Permalink
use markdown lint
Browse files Browse the repository at this point in the history
implementing markdown lint
  • Loading branch information
wickedOne committed Nov 28, 2024
1 parent e74c35e commit 076777b
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 10 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
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"
3 changes: 3 additions & 0 deletions .mdl_style.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
all
# no limitations on line length
exclude_rule 'MD013'
4 changes: 3 additions & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
don't be a dick
# code of conduct

don't be a dick
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -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']
Expand All @@ -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:
Expand All @@ -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

Expand All @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 076777b

Please sign in to comment.