Files
twenty/packages/twenty-docs/l/ar/developers/contribute/capabilities/backend-development/feature-flags.mdx
T
Félix Malfait 3dd858c91e i18n - docs translations (#16774)
Created by Github action

Pulls the latest documentation translations from Crowdin for all
supported languages:
- French (fr)
- Arabic (ar)  
- Czech (cs)
- German (de)
- Spanish (es)
- Italian (it)
- Japanese (ja)
- Korean (ko)
- Portuguese (pt)
- Romanian (ro)
- Russian (ru)
- Turkish (tr)
- Chinese (zh-CN)

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-12-23 14:26:11 +01:00

47 lines
1.2 KiB
Plaintext

---
title: Feature Flags
---
تُستخدم أعلام الميزات لإخفاء الميزات التجريبية. For Twenty, they are set on workspace level and not on a user level.
## إضافة علم ميزة جديد
في ملف `FeatureFlagKey.ts` أضف علم الميزة:
```ts
type FeatureFlagKey =
| 'IS_FEATURENAME_ENABLED'
| ...;
```
أيضًا أضفه إلى التعداد في `feature-flag.entity.ts`:
```ts
enum FeatureFlagKeys {
IsFeatureNameEnabled = 'IS_FEATURENAME_ENABLED',
...
}
```
لتطبيق علم ميزة على ميزة **الخلفية** استخدم:
```ts
@Gate({
featureFlag: 'IS_FEATURENAME_ENABLED',
})
```
لتطبيق علم ميزة على ميزة **الواجهة الأمامية** استخدم:
```ts
const isFeatureNameEnabled = useIsFeatureEnabled('IS_FEATURENAME_ENABLED');
```
## تكوين أعلام الميزات للنشر
تغيير السجل المعني في جدول `core.featureFlag`:
| المُعرّف | المفتاح | معرف مساحة العمل | القيمة |
| -------- | ------------------------ | ---------------- | ------ |
| عشوائي | `IS_FEATURENAME_ENABLED` | معرف مساحة العمل | `صحيح` |