Skip to content

Commit cf391d0

Browse files
committed
Copilot instructions and more fixes
1 parent cb7b882 commit cf391d0

File tree

4 files changed

+22
-12
lines changed

4 files changed

+22
-12
lines changed

.github/copilot-instructions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Edits are permitted only in `cookbook/en`, `guide/en` and `.md` files in root directory.
2+
- Conform to `014-docs.md` except translations part.

001-yii-values.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ We seek a balance between flexibility, discipline and simplicity that meets comm
3232

3333
We prefer practice to theory. For example:
3434

35-
- Solutions for known use cases should avoid excess complexity by providing only needed flexibility.
35+
- Solutions for known use cases should avoid excess complexity by providing only necessary flexibility.
3636
- Standard implementations should take practical use into account.
3737
- Experience is at least as useful as theory in guiding design.
3838
- Context is critical in determining appropriateness.
@@ -43,7 +43,7 @@ This value guides technical decisions as well as community activity.
4343
Consideration of how software features help users should guide development.
4444
Community-wise, we value any helpful contribution, be it a pull request or an answer in the forum.
4545

46-
When the other principles could conflict, we choose a solution that's more helpful to the community.
46+
When the other principles conflict, we choose a solution that's more helpful to the community.
4747

4848
### Be simple
4949

@@ -57,7 +57,7 @@ Solutions should be simple and expressive:
5757

5858
We prefer explicit, obvious solutions and code. Solutions should clearly express exactly what they do. For example:
5959

60-
- A straightforward solution is better than an abstract one unless the abstraction has practical purpose.
60+
- A straightforward solution is better than an abstract one unless the abstraction has a practical purpose.
6161
- Loud fails are better than silent fails or masking errors.
6262
- Explicit casts are better than PHP type juggling, type hints are good.
6363
- No magic unless necessary.

014-docs.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,28 @@ The guide should follow [Micosoft style guide](https://learn.microsoft.com/en-us
2525

2626
### Translation
2727

28-
The definitive guide uses [po4a](https://github.com/mquinson/po4a) in Github Action for translations.
28+
The definitive guide uses [po4a](https://github.com/mquinson/po4a) in GitHub Action for translations.
29+
2930
Translation algorithm:
30-
- Install an application for working with `.po` translation files. For example, [Poedit](https://poedit.net/), [Lokalize](https://apps.kde.org/ru/lokalize/), [Gtranslator](https://wiki.gnome.org/Apps/Gtranslator) or another.
31-
- Find folder with the name of the file you want to translate in `/guide/po`. Note that if the source file is in a subfolder, the subfolder name is appended to the folder and separated by an underscore, for example: for translating `guide/en/concept/aliases.md` file find `guide/po/concept_aliases.md` folder.
32-
- Open the file with the `.po` extension in `Poedit` from the folder with the desired localization, for example `guide/po/intro_what-is-yii.md/ru/intro_what-is-yii.md.ru.po`. If there is no localization yet, create an issue.
31+
32+
- Install an application for working with `.po` translation files. For example, [Poedit](https://poedit.net/), [Lokalize](https://apps.kde.org/ru/lokalize/),
33+
[Gtranslator](https://wiki.gnome.org/Apps/Gtranslator) or another.
34+
- Find folder with the name of the file you want to translate in `/guide/po`. Note that if the source file
35+
is in a subfolder, the subfolder name is appended to the folder and separated by an underscore, for example,
36+
for translating `guide/en/concept/aliases.md` file find `guide/po/concept_aliases.md` folder.
37+
- Open the file with the `.po` extension in `Poedit` from the folder with the desired localization,
38+
for example `guide/po/intro_what-is-yii.md/ru/intro_what-is-yii.md.ru.po`. If there is no localization yet,
39+
create an issue.
3340
- Translate necessary strings and push the changes
34-
- Open pull request to main repository
41+
- Open a pull request to the main repository
3542

3643
> [!CAUTION]
3744
> Do not change the translation in files in `/guide/{lang}` manually.
3845
39-
If you have changed English documentation:
40-
- Open pull request to main repository
41-
- Pull updated branch after successful completion of workflow `Update docs translation` in Github Action
46+
If you have changed English and want to update translations:
47+
48+
- Open a pull request to the main repository
49+
- Pull updated branch after successful completion of workflow `Update docs translation` in GitHub Action
4250
- Update translation in `.po` files by `Poedit`
4351
- Push changes
4452

016-security-workflow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ It usually takes several days.
3939
- Merge the patch pull request right before tagging the next package release.
4040
- Publish security advisory.
4141
- Add CVE to [FriendsOfPHP/security-advisories](https://github.com/FriendsOfPHP/security-advisories).
42-
See [#488](https://github.com/FriendsOfPHP/security-advisories/pull/488) as example.
42+
See [#488](https://github.com/FriendsOfPHP/security-advisories/pull/488) as an example.

0 commit comments

Comments
 (0)