Просмотр исходного кода

Neo: feed label for profile events ("joined" instead of item_bx_persons) (#5817)

A profile-created event showed "added a item_bx_persons": the feed builds
"added a <type>" from item_<type> keys and has none for bx_persons.

- feed_type_bx_persons "joined" and feed_type_bx_organizations
  "created an Organization", in en, de, ru, fr and es.
- A type with no item_* label now shows no action text instead of the
  raw key.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Andrey Yasko 1 неделя назад
Родитель
Сommit
381c63f2d2

+ 4 - 1
neo/packages/app/components/elements/feed-item-parts.js

@@ -292,7 +292,10 @@ export const ItemInfo = memo(({ data, t }) => {
         let l = t(typeKey)
        
         if (l === typeKey) {
-            l = t('added a') + ' <b>' + t('item_' + data.type) + '</b>'
+            // A type with no `item_*` label shows no action text rather than its raw key.
+            const itemKey = 'item_' + data.type
+            const item = t(itemKey)
+            l = item === itemKey ? '' : t('added a') + ' <b>' + item + '</b>'
         }
         if (data.type == 'timeline_common_repost') {
             l += ' <b>' + data.content.owner_name + "'s " + data.content.parse_type + '</b>'

+ 2 - 0
neo/packages/app/default/translations/de.json

@@ -68,6 +68,8 @@
     "feed_type_bx_courses": "hat einen <b>Kurs</b> hinzugefügt",
     "feed_type_bx_spaces": "hat einen <b>Space</b> hinzugefügt",
     "feed_type_bx_polls": "hat eine <b>Umfrage</b> hinzugefügt",
+    "feed_type_bx_persons": "ist beigetreten",
+    "feed_type_bx_organizations": "hat eine <b>Organisation</b> erstellt",
     "splash_page_title": "Willkommen bei",
     "splash_page_text": "NEO ist der Open-Source-Netzwerk-Organizer. Verbinde dich mit Freunden und Communities. Kommuniziere, arbeite zusammen und baue dein eigenes Netzwerk auf.",
     "splash_page_account": "Noch kein Konto?",

+ 2 - 0
neo/packages/app/default/translations/en.json

@@ -71,6 +71,8 @@
     "feed_type_timeline_common_repost": "Reposted",
     "feed_type_bx_events": "added an <b>Event</b>",
     "feed_type_bx_ads": "added an <b>Ad</b>",
+    "feed_type_bx_persons": "joined",
+    "feed_type_bx_organizations": "created an <b>Organization</b>",
     "splash_page_title": "Welcome to",
     "splash_page_text": "NEO is the open-source networking organiser. Connect with your friends and communities. Communicate, collaborate and build your own network.",
     "splash_page_account": "Don't have an account?",

+ 2 - 0
neo/packages/app/default/translations/es.json

@@ -68,6 +68,8 @@
     "feed_type_bx_courses": "añadió un <b>curso</b>",
     "feed_type_bx_spaces": "añadió un <b>espacio</b>",
     "feed_type_bx_polls": "añadió una <b>encuesta</b>",
+    "feed_type_bx_persons": "se unió",
+    "feed_type_bx_organizations": "creó una <b>organización</b>",
     "splash_page_title": "Bienvenido a",
     "splash_page_text": "NEO es el organizador de redes de código abierto. Conéctate con amigos y comunidades. Comunícate, colabora y construye tu propia red.",
     "splash_page_account": "¿No tienes una cuenta?",

+ 2 - 0
neo/packages/app/default/translations/fr.json

@@ -68,6 +68,8 @@
     "feed_type_bx_courses": "a ajouté un <b>cours</b>",
     "feed_type_bx_spaces": "a ajouté un <b>espace</b>",
     "feed_type_bx_polls": "a ajouté un <b>sondage</b>",
+    "feed_type_bx_persons": "a rejoint",
+    "feed_type_bx_organizations": "a créé une <b>organisation</b>",
     "splash_page_title": "Bienvenue sur",
     "splash_page_text": "NEO est l’organisateur de réseaux open source. Connectez-vous avec vos amis et vos communautés. Communiquez, collaborez et construisez votre propre réseau.",
     "splash_page_account": "Vous n’avez pas de compte ?",

+ 2 - 0
neo/packages/app/default/translations/ru.json

@@ -68,6 +68,8 @@
     "feed_type_bx_courses": "добавил(а) <b>курс</b>",
     "feed_type_bx_spaces": "добавил(а) <b>пространство</b>",
     "feed_type_bx_polls": "добавил(а) <b>опрос</b>",
+    "feed_type_bx_persons": "присоединился(-ась)",
+    "feed_type_bx_organizations": "создал(а) <b>организацию</b>",
     "splash_page_title": "Добро пожаловать в",
     "splash_page_text": "NEO — открытый сетевой органайзер. Общайтесь с друзьями и сообществами. Сотрудничайте и стройте свою сеть.",
     "splash_page_account": "Нет аккаунта?",