diff options
Diffstat (limited to 'support')
-rw-r--r-- | support/doc/api/openapi.yaml | 3 | ||||
-rw-r--r-- | support/doc/development/localization.md | 2 | ||||
-rw-r--r-- | support/doc/development/server.md | 10 | ||||
-rw-r--r-- | support/doc/plugins/guide.md | 4 |
4 files changed, 9 insertions, 10 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml index 5d54a7a51..bb11c3d4e 100644 --- a/support/doc/api/openapi.yaml +++ b/support/doc/api/openapi.yaml | |||
@@ -53,7 +53,7 @@ info: | |||
53 | } | 53 | } |
54 | ``` | 54 | ``` |
55 | 55 | ||
56 | We provide error `type` values for [a growing number of cases](https://github.com/Chocobozzz/PeerTube/blob/develop/packages/models/server/server-error-code.enum.ts), | 56 | We provide error `type` values for [a growing number of cases](https://github.com/Chocobozzz/PeerTube/blob/develop/packages/models/src/server/server-error-code.enum.ts), |
57 | but it is still optional. Types are used to disambiguate errors that bear the same status code | 57 | but it is still optional. Types are used to disambiguate errors that bear the same status code |
58 | and are non-obvious: | 58 | and are non-obvious: |
59 | 59 | ||
@@ -8752,7 +8752,6 @@ components: | |||
8752 | password: | 8752 | password: |
8753 | $ref: '#/components/schemas/password' | 8753 | $ref: '#/components/schemas/password' |
8754 | UpdateMe: | 8754 | UpdateMe: |
8755 | # see packages/models/users/user-update-me.model.ts: | ||
8756 | properties: | 8755 | properties: |
8757 | password: | 8756 | password: |
8758 | $ref: '#/components/schemas/password' | 8757 | $ref: '#/components/schemas/password' |
diff --git a/support/doc/development/localization.md b/support/doc/development/localization.md index 4aca9b18b..7c9ef0172 100644 --- a/support/doc/development/localization.md +++ b/support/doc/development/localization.md | |||
@@ -26,7 +26,7 @@ Nothing to do here, Github will automatically send a webhook to Weblate that wil | |||
26 | 26 | ||
27 | ## Support a new language | 27 | ## Support a new language |
28 | 28 | ||
29 | * Add it to [/packages/models/i18n/i18n.ts](/packages/models/i18n/i18n.ts) | 29 | * Add it to [/packages/models/i18n/i18n.ts](/packages/core-utils/src/i18n/i18n.ts) |
30 | * Add it to [/scripts/build/client.sh](/scripts/build/client.sh) | 30 | * Add it to [/scripts/build/client.sh](/scripts/build/client.sh) |
31 | * Add it to [/client/angular.json](/client/angular.json) | 31 | * Add it to [/client/angular.json](/client/angular.json) |
32 | * Add it to [/scripts/i18n/update.sh](/scripts/i18n/update.sh) | 32 | * Add it to [/scripts/i18n/update.sh](/scripts/i18n/update.sh) |
diff --git a/support/doc/development/server.md b/support/doc/development/server.md index 5c83af704..70734ec3e 100644 --- a/support/doc/development/server.md +++ b/support/doc/development/server.md | |||
@@ -20,10 +20,10 @@ Some of these may be optional (for example your new endpoint may not need to sen | |||
20 | - Check new configuration keys are set in `server/server/initializers/checker-before-init.ts` | 20 | - Check new configuration keys are set in `server/server/initializers/checker-before-init.ts` |
21 | - You can also ensure configuration consistency in `server/server/initializers/checker-after-init.ts` | 21 | - You can also ensure configuration consistency in `server/server/initializers/checker-after-init.ts` |
22 | - If you want your configuration to be available in the client: | 22 | - If you want your configuration to be available in the client: |
23 | + Add your field in `packages/models/server/server/server-config.model.ts` | 23 | + Add your field in `packages/models/src/server/server/server-config.model.ts` |
24 | + Update `server/server/lib/server-config-manager.ts` to include your new configuration | 24 | + Update `server/server/lib/server-config-manager.ts` to include your new configuration |
25 | - If you want your configuration to be updatable by the web admin in the client: | 25 | - If you want your configuration to be updatable by the web admin in the client: |
26 | + Add your field in `packages/models/server/server/custom-config.model.ts` | 26 | + Add your field in `packages/models/src/server/server/custom-config.model.ts` |
27 | + Add the configuration to the config object in the `server/server/controllers/api/config.ts` controller | 27 | + Add the configuration to the config object in the `server/server/controllers/api/config.ts` controller |
28 | * Controllers: | 28 | * Controllers: |
29 | - Create the controller file and fill it with your REST API routes | 29 | - Create the controller file and fill it with your REST API routes |
@@ -57,7 +57,7 @@ Some of these may be optional (for example your new endpoint may not need to sen | |||
57 | * Create the migration file in `initializers/migrations` using Sequelize Query Interface (`.addColumn`, `.dropTable`, `.changeColumn`) | 57 | * Create the migration file in `initializers/migrations` using Sequelize Query Interface (`.addColumn`, `.dropTable`, `.changeColumn`) |
58 | * Update `LAST_MIGRATION_VERSION` in `server/server/initializers/constants.ts` | 58 | * Update `LAST_MIGRATION_VERSION` in `server/server/initializers/constants.ts` |
59 | * Notifications: | 59 | * Notifications: |
60 | - Create the new notification model in `packages/models/users/user-notification.model.ts` | 60 | - Create the new notification model in `packages/models/src/users/user-notification.model.ts` |
61 | - Create the notification logic in `server/server/lib/notifier/shared`: | 61 | - Create the notification logic in `server/server/lib/notifier/shared`: |
62 | + Email subject has a common prefix (defined by the admin in PeerTube configuration) | 62 | + Email subject has a common prefix (defined by the admin in PeerTube configuration) |
63 | - Add your notification to `server/server/lib/notifier/notifier.ts` | 63 | - Add your notification to `server/server/lib/notifier/notifier.ts` |
@@ -66,14 +66,14 @@ Some of these may be optional (for example your new endpoint may not need to sen | |||
66 | + The template usually extends `../common/grettings` that already says "Hi" and "Cheers". You just have to write the title and the content blocks that will be inserted in the appropriate places in the HTML template | 66 | + The template usually extends `../common/grettings` that already says "Hi" and "Cheers". You just have to write the title and the content blocks that will be inserted in the appropriate places in the HTML template |
67 | - If you need to associate a new table with `userNotification`: | 67 | - If you need to associate a new table with `userNotification`: |
68 | + Associate the new table in `UserNotificationModel` (don't forget the index) | 68 | + Associate the new table in `UserNotificationModel` (don't forget the index) |
69 | + Add the object property in the API model definition (`packages/models/users/user-notification.model.ts`) | 69 | + Add the object property in the API model definition (`packages/models/src/users/user-notification.model.ts`) |
70 | + Add the object in `UserNotificationModel.toFormattedJSON` | 70 | + Add the object in `UserNotificationModel.toFormattedJSON` |
71 | + Handle this new notification type in client (`UserNotificationsComponent`) | 71 | + Handle this new notification type in client (`UserNotificationsComponent`) |
72 | + Handle the new object property in client model (`UserNotification`) | 72 | + Handle the new object property in client model (`UserNotification`) |
73 | * Tests: | 73 | * Tests: |
74 | - Create your command class in `packages/server-commands/` that will wrap HTTP requests to your new endpoint | 74 | - Create your command class in `packages/server-commands/` that will wrap HTTP requests to your new endpoint |
75 | - Add your command file in `index.ts` of current directory | 75 | - Add your command file in `index.ts` of current directory |
76 | - Instantiate your command class in `packages/server-commands/server/server/server.ts` | 76 | - Instantiate your command class in `packages/server-commands/src/server/server.ts` |
77 | - Create your test file in `server/server/tests/api/check-params` to test middleware validators/authentification/user rights (offensive tests) | 77 | - Create your test file in `server/server/tests/api/check-params` to test middleware validators/authentification/user rights (offensive tests) |
78 | - Add it to `server/server/tests/api/check-params/index.ts` | 78 | - Add it to `server/server/tests/api/check-params/index.ts` |
79 | - Create your test file in `server/server/tests/api` to test your new endpoints | 79 | - Create your test file in `server/server/tests/api` to test your new endpoints |
diff --git a/support/doc/plugins/guide.md b/support/doc/plugins/guide.md index 07f484934..147c5fcaf 100644 --- a/support/doc/plugins/guide.md +++ b/support/doc/plugins/guide.md | |||
@@ -387,7 +387,7 @@ function register (...) { | |||
387 | displayName: 'User display name', | 387 | displayName: 'User display name', |
388 | 388 | ||
389 | // Custom admin flags (bypass video auto moderation etc.) | 389 | // Custom admin flags (bypass video auto moderation etc.) |
390 | // https://github.com/Chocobozzz/PeerTube/blob/develop/packages/models/users/user-flag.model.ts | 390 | // https://github.com/Chocobozzz/PeerTube/blob/develop/packages/models/src/users/user-flag.model.ts |
391 | // PeerTube >= 5.1 | 391 | // PeerTube >= 5.1 |
392 | adminFlags: 0, | 392 | adminFlags: 0, |
393 | // Quota in bytes | 393 | // Quota in bytes |
@@ -1032,7 +1032,7 @@ If you want to translate strings of your plugin (like labels of your registered | |||
1032 | } | 1032 | } |
1033 | ``` | 1033 | ``` |
1034 | 1034 | ||
1035 | The key should be one of the locales defined in [i18n.ts](https://github.com/Chocobozzz/PeerTube/blob/develop/packages/models/i18n/i18n.ts). | 1035 | The key should be one of the locales defined in [i18n.ts](https://github.com/Chocobozzz/PeerTube/blob/develop/packages/core-utils/src/i18n/i18n.ts). |
1036 | 1036 | ||
1037 | Translation files are just objects, with the english sentence as the key and the translation as the value. | 1037 | Translation files are just objects, with the english sentence as the key and the translation as the value. |
1038 | `fr.json` could contain for example: | 1038 | `fr.json` could contain for example: |