Преглед изворни кода

chore(whatsnew): keep the changelog url in one place

gnacho пре 2 недеља
родитељ
комит
bc2ee65188
2 измењених фајлова са 18 додато и 1 уклоњено
  1. 9 1
      app/src/pages/WhatsNew.tsx
  2. 9 0
      docs/releases/README.md

+ 9 - 1
app/src/pages/WhatsNew.tsx

@@ -19,6 +19,14 @@ import { markWhatsNewSeen } from '@/whatsnew/useWhatsNewSeen'
 /** Autor propio: sus tarjetas no llevan agradecimiento, es lo esperado. */
 const OWN_AUTHOR = 'gnacho'
 
+/**
+ * Changelog completo de la app. Hoy vive en el repositorio, y cuando la web
+ * tenga su página de cambios multilingüe este es el ÚNICO sitio que cambia:
+ * pasará a una función de `i18n.language` que devuelva la ruta del idioma en
+ * netpulse.cloudless.club (es en la raíz, el resto en /<lang>/changelog/).
+ */
+const CHANGELOG_URL = 'https://github.com/gnacho/netpulse/blob/main/CHANGELOG.md'
+
 function Card({ card }: { card: WhatsNewCard }) {
   const { t } = useTranslation()
   const Icon = card.icon
@@ -97,7 +105,7 @@ export function WhatsNew() {
       <p className="pt-2 text-[11px] text-text-muted">{t('whatsnew.footnote')}</p>
       {/* Todavía en GitHub: la web tendrá su propia página de cambios. */}
       <a
-        href="https://github.com/gnacho/netpulse/blob/main/CHANGELOG.md"
+        href={CHANGELOG_URL}
         target="_blank"
         rel="noreferrer"
         className="inline-flex items-center gap-1 text-caption font-medium text-accent transition-colors hover:text-accent/80"

+ 9 - 0
docs/releases/README.md

@@ -92,6 +92,15 @@ writes its changelog from commit messages and that is fine for its own output,
 but the release body is the curated one: commits say "stop emitting the cable
 twice", the notes say what the operator was seeing.
 
+## Where the changelog link goes
+
+The notes and the What's new page end with a link to the complete changelog.
+Today it points at `CHANGELOG.md` in the repository. When the site has its own
+changelog page, translated like the rest of `netpulse.cloudless.club`, only the
+href changes: in the app it is `CHANGELOG_URL` in `app/src/pages/WhatsNew.tsx`,
+and this file says where that should point (Spanish at the root, the other
+languages under `/<lang>/changelog/`).
+
 ## Checklist
 
 - [ ] One capture per headline change, generated from the app, not recorded.