From 88b9dfb3dd0308dceb4d307205b7fe604133975a Mon Sep 17 00:00:00 2001 From: Andrey Helldar Date: Wed, 7 May 2025 02:56:08 +0300 Subject: [PATCH] Update docs for Config 2.x support --- docs/topics/configuration.topic | 289 ++++++++++++------------- docs/topics/library-descriptions.topic | 6 - docs/v.list | 14 +- 3 files changed, 151 insertions(+), 158 deletions(-) diff --git a/docs/topics/configuration.topic b/docs/topics/configuration.topic index 5efcb2d..3f4cc61 100644 --- a/docs/topics/configuration.topic +++ b/docs/topics/configuration.topic @@ -14,142 +14,140 @@

- Optionally, you can publish the config file with: + Optionally, you can publish the config files with:

php artisan vendor:publish --tag="%package-vendor-tag%"

- This is the contents of the published %config-filename% file: + This command will publish the configuration files for all projects. To publish settings for specific packages, use the console commands:

- -
- - -

- The inline option determines what type of files to use when updating language files. -

- - -
  • true means inline files will be used.
  • -
  • false means that default files will be used.
  • -
    - -

    - For example, the difference between them can be seen here: -

    - - - The :attribute must be accepted. // default - This field must be accepted. // inline + + php artisan vendor:publish --tag="%package-vendor-tag-main%" + php artisan vendor:publish --tag="%package-vendor-tag-models%" + php artisan vendor:publish --tag="%package-vendor-tag-routes%" + php artisan vendor:publish --tag="%package-vendor-tag-punctuation%" + php artisan vendor:publish --tag="%package-vendor-tag-translators%" - - - -
    - -

    - The align option defines the alignment of values relative - to each other when processing localization files. -

    - -

    - When updating files, all comments from the final files are automatically deleted. - Unfortunately, var_export - does not know how to work with comments. -

    -

    - Your file example: -

    - -

    - An updated file like this: -

    - -

    - and example of validation.php file: -

    - -

    - This is what it will look like after the update: -

    - - - + + + Config filename is %config-filename-main%. + - - -

    - If you want to name codes differently, such as de-DE instead of de or - de-CH instead of de_CH, you can define - aliases in the configuration file. -

    -

    - After that, all adding, updating, and deleting actions will automatically use the specified aliases in - the %config-filename% config file: -

    - - - -

    - If the - %config-filename% file already exists, then you can add the aliases key in it and specify the - desired - aliases using a data array. -

    -

    - After this, you can, for example, add new localizations by specifying both the main code and its alias: -

    - - + +

    + The inline option determines what type of files to use when updating language files. +

    + + +
  • true means inline files will be used.
  • +
  • false means that default files will be used.
  • +
    + +

    + For example, the difference between them can be seen here: +

    + + + The :attribute must be accepted. // default + This field must be accepted. // inline + +
    + + +

    + The align option defines the alignment of values relative + to each other when processing localization files. +

    + +

    + When updating files, all comments from the final files are automatically deleted. + Unfortunately, var_export + does not know how to work with comments. +

    +

    + Your file example: +

    + +

    + An updated file like this: +

    + +

    + and example of validation.php file: +

    + +

    + This is what it will look like after the update: +

    + +
    + + +

    + If you want to name codes differently, such as de-DE instead of de or + de-CH instead of de_CH, you can define + aliases in the configuration file. +

    +

    + After that, all adding, updating, and deleting actions will automatically use the specified aliases in + the %config-filename-main% config file: +

    + + + +

    + If the + %config-filename-main% file already exists, then you can add the aliases key in it and specify the + desired + aliases using a data array. +

    +

    + After this, you can, for example, add new localizations by specifying both the main code and its alias: +

    + + %command-add% de de_CH -

    - Installed locales will use the specified aliases as folder names for PHP translations and file names for - JSON translations: -

    - - - lang - de-CH - de-DE - +

    + Installed locales will use the specified aliases as folder names for PHP translations and file names for + JSON translations: +

    + + + lang + de-CH + de-DE + +
    +
    - + + + Config filename is %config-filename-punctuation%. + - -

    When updating translation keys, you can also enable intelligent converts ASCII quotes, dashes, and ellipses to their Unicode. @@ -167,16 +165,6 @@ - - - -

    You can also set different rules for any localization.

    @@ -186,37 +174,39 @@
    + + Config filename is %config-filename-routes%. + + + +

    When using the package to work with routing , you can override the default values of key names.

    +
    + + + + Config filename is %config-filename-models%. + -

    - This option is enabled in the %config-filename% file: -

    -
    -

    You can define default parameter values when using the %repository-title-models% package.

    -

    - This setting available in the %config-filename% file: -

    - -

    The suffix parameter is used to specify the suffix of the models to which the translation repository belongs. @@ -231,20 +221,21 @@ - + + + Config filename is %config-filename-translators%. + + + +

    Here you can not only activate default translators, but also create your own. You can read more about this on the %repository-title-translator% package information page.

    - -

    - This setting available in the %config-filename% file: -

    -
    diff --git a/docs/topics/library-descriptions.topic b/docs/topics/library-descriptions.topic index b149404..51ea1c3 100644 --- a/docs/topics/library-descriptions.topic +++ b/docs/topics/library-descriptions.topic @@ -35,12 +35,6 @@
    - -

    - This option is available in the %config-filename% file: -

    -
    -

    diff --git a/docs/v.list b/docs/v.list index 57d189a..02fcc31 100644 --- a/docs/v.list +++ b/docs/v.list @@ -22,9 +22,11 @@ - - - + + + + + @@ -66,6 +68,12 @@ + + + + + +