Skip to content

Commit 79a9c4c

Browse files
committed
wip(fields,i18n): register the notification-topic/channel faces and their words
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzyvUbUU6pC3x3Amrx
1 parent 0535333 commit 79a9c4c

14 files changed

Lines changed: 97 additions & 0 deletions

File tree

‎ui/packages/fields/src/FieldEditWidget.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ export const INLINE_EXCLUDED_FIELD_TYPES = new Set<string>([
190190
// sibling fields / a loaded object catalog), not inline in a grid cell.
191191
'object-ref', 'filter-condition', 'recipient-picker',
192192
'position-ref', 'permission-ref',
193+
'notification-topic', 'notification-channel',
193194
]);
194195

195196
/** Field types whose value is chosen in one discrete gesture (no free typing). */

‎ui/packages/fields/src/index.tsx‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4890,6 +4890,14 @@ const fieldWidgetMap = {
48904890
// permission-ref → a permission set (sys_user_permission_set.permission_set)
48914891
'position-ref': () => import('./widgets/RegistryRefField.js').then(m => ({ default: m.PositionRefField })),
48924892
'permission-ref': () => import('./widgets/RegistryRefField.js').then(m => ({ default: m.PermissionRefField })),
4893+
// The fillable arm of the same widget (#30208 row 6, ruling E on #30527): a
4894+
// notification preference's `topic` / `channel` and a template's `topic`,
4895+
// offered from `GET /api/v1/messaging/preference-options` and still taking
4896+
// any typed value, which the server stores as written.
4897+
// notification-topic → a notification topic, `*` for all
4898+
// notification-channel → a notification channel, `*` for all
4899+
'notification-topic': () => import('./widgets/RegistryRefField.js').then(m => ({ default: m.NotificationTopicField })),
4900+
'notification-channel': () => import('./widgets/RegistryRefField.js').then(m => ({ default: m.NotificationChannelField })),
48934901
} satisfies Record<string, FieldWidgetLoader>;
48944902

48954903
/** The registered field widget keys, as a literal union (objectui#4857). */
@@ -5072,6 +5080,8 @@ const FIELD_TYPES_SKIP_FALLBACK = new Set([
50725080
'recipient-picker',
50735081
'position-ref',
50745082
'permission-ref',
5083+
'notification-topic',
5084+
'notification-channel',
50755085
// ── Retired bare node keys (objectui#10859 batch 8) ───────────────────────
50765086
// Each was registered bare only as this loop's fallback: no other package
50775087
// owns the name, no form path reads it, and no document authors it as a

‎ui/packages/fields/src/widgets/useFieldTranslation.ts‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,15 @@ const FIELD_DEFAULTS: Record<string, string> = {
103103
// the `en` pack.
104104
'fields.registryRef.loadFailed': 'The list could not be loaded. You can still type the name.',
105105
'fields.registryRef.notFound': '{{name}} (not found)',
106+
// #30208 row 6 — the fillable arm (`notification-topic` /
107+
// `notification-channel`): the `*` entry's two faces, a channel the
108+
// deployment cannot send on, a value the list does not hold, and the row
109+
// that commits the typed text as written. Same values as the `en` pack.
110+
'fields.preferenceOption.allTopics': 'All topics ({{value}})',
111+
'fields.preferenceOption.allChannels': 'All channels ({{value}})',
112+
'fields.preferenceOption.notConfigured': '{{value}} (not configured)',
113+
'fields.preferenceOption.notInList': '{{value}} (not in the list)',
114+
'fields.preferenceOption.useTyped': 'Use "{{value}}"',
106115
'fields.recipient.selectTypeFirst': 'Select a recipient type first.',
107116
'fields.recipient.loading': 'Loading…',
108117
'fields.recipient.search': 'Search…',

‎ui/packages/i18n/src/locales/ar.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,13 @@ const ar = {
348348
loadFailed: "تعذّر تحميل القائمة. لا يزال بإمكانك كتابة الاسم.",
349349
notFound: "{{name}} (غير موجود)",
350350
},
351+
preferenceOption: {
352+
allTopics: "كل الموضوعات ({{value}})",
353+
allChannels: "كل القنوات ({{value}})",
354+
notConfigured: "{{value}} (غير مُهيّأة)",
355+
notInList: "{{value}} (ليست في القائمة)",
356+
useTyped: "استخدام «{{value}}»",
357+
},
351358
recipient: {
352359
selectTypeFirst: "اختر نوع المستلم أولاً.",
353360
loading: "جارٍ التحميل…",

‎ui/packages/i18n/src/locales/de.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,13 @@ const de = {
330330
loadFailed: "Die Liste konnte nicht geladen werden. Sie können den Namen weiterhin eingeben.",
331331
notFound: "{{name}} (nicht gefunden)",
332332
},
333+
preferenceOption: {
334+
allTopics: "Alle Themen ({{value}})",
335+
allChannels: "Alle Kanäle ({{value}})",
336+
notConfigured: "{{value}} (nicht konfiguriert)",
337+
notInList: "{{value}} (nicht in der Liste)",
338+
useTyped: "„{{value}}“ verwenden",
339+
},
333340
recipient: {
334341
selectTypeFirst: "Wählen Sie zuerst einen Empfängertyp.",
335342
loading: "Wird geladen…",

‎ui/packages/i18n/src/locales/en.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,13 @@ const en = {
475475
loadFailed: 'The list could not be loaded. You can still type the name.',
476476
notFound: '{{name}} (not found)',
477477
},
478+
preferenceOption: {
479+
allTopics: 'All topics ({{value}})',
480+
allChannels: 'All channels ({{value}})',
481+
notConfigured: '{{value}} (not configured)',
482+
notInList: '{{value}} (not in the list)',
483+
useTyped: 'Use "{{value}}"',
484+
},
478485
recipient: {
479486
selectTypeFirst: 'Select a recipient type first.',
480487
loading: 'Loading…',

‎ui/packages/i18n/src/locales/es.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,13 @@ const es = {
338338
loadFailed: "No se pudo cargar la lista. Todavía puede escribir el nombre.",
339339
notFound: "{{name}} (no encontrado)",
340340
},
341+
preferenceOption: {
342+
allTopics: "Todos los temas ({{value}})",
343+
allChannels: "Todos los canales ({{value}})",
344+
notConfigured: "{{value}} (no configurado)",
345+
notInList: "{{value}} (no está en la lista)",
346+
useTyped: "Usar «{{value}}»",
347+
},
341348
recipient: {
342349
selectTypeFirst: "Selecciona primero un tipo de destinatario.",
343350
loading: "Cargando…",

‎ui/packages/i18n/src/locales/fr.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,13 @@ const fr = {
333333
loadFailed: "La liste n'a pas pu être chargée. Vous pouvez toujours saisir le nom.",
334334
notFound: "{{name}} (introuvable)",
335335
},
336+
preferenceOption: {
337+
allTopics: "Tous les sujets ({{value}})",
338+
allChannels: "Tous les canaux ({{value}})",
339+
notConfigured: "{{value}} (non configuré)",
340+
notInList: "{{value}} (absent de la liste)",
341+
useTyped: "Utiliser « {{value}} »",
342+
},
336343
recipient: {
337344
selectTypeFirst: "Sélectionnez d'abord un type de destinataire.",
338345
loading: "Chargement…",

‎ui/packages/i18n/src/locales/ja.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,13 @@ const ja = {
330330
loadFailed: "一覧を読み込めませんでした。名前を直接入力できます。",
331331
notFound: "{{name}}(見つかりません)",
332332
},
333+
preferenceOption: {
334+
allTopics: "すべてのトピック({{value}})",
335+
allChannels: "すべてのチャネル({{value}})",
336+
notConfigured: "{{value}}(未設定)",
337+
notInList: "{{value}}(一覧にありません)",
338+
useTyped: "「{{value}}」を使用",
339+
},
333340
recipient: {
334341
selectTypeFirst: "先に受信者タイプを選択してください。",
335342
loading: "読み込み中…",

‎ui/packages/i18n/src/locales/ko.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,13 @@ const ko = {
330330
loadFailed: "목록을 불러오지 못했습니다. 이름을 직접 입력할 수 있습니다.",
331331
notFound: "{{name}} (찾을 수 없음)",
332332
},
333+
preferenceOption: {
334+
allTopics: "모든 주제 ({{value}})",
335+
allChannels: "모든 채널 ({{value}})",
336+
notConfigured: "{{value}} (구성되지 않음)",
337+
notInList: "{{value}} (목록에 없음)",
338+
useTyped: '"{{value}}" 사용',
339+
},
333340
recipient: {
334341
selectTypeFirst: "먼저 수신자 유형을 선택하세요.",
335342
loading: "로딩 중…",

0 commit comments

Comments
 (0)