fix: la app no arrancaba en Android por una expresion regular de 0.9.5

Diagnosticado en el emulador. El backend moria al cargar backend.js:

  SyntaxError: Invalid regular expression: /^#([\p{L}\p{N}_-]+)/:
  Invalid property name in character class

libnode.so de nodejs-mobile viene sin ICU completo, asi que las propiedades Unicode
en expresiones regulares no existen y el fichero ni siquiera compila. La rama ya lo
habia resuelto con un rango explicito; al integrar 0.9.5 se reintrodujo la forma de
upstream y con ella el fallo. Afectaba a backend.js y a data_model.js.

Tras el arreglo el emulador arranca: 'Backend started on port 3000', 991 modulos,
285 ms de warmup.

Y se devuelven al overlay los nombres de tres categorias. Upstream los renombro en
0.9.5 (Network -> Community, Media -> Library, Fediverse -> Multiverse) y al
restaurar los ficheros de traduccion se colaron los suyos, cambiando las etiquetas
de los hexagonos. Lo destapo una captura de pantalla del usuario, no el codigo.
This commit is contained in:
SITO 2026-08-19 08:24:12 +02:00
parent f354069af7
commit 0bf4a8fcb9
3 changed files with 35 additions and 2 deletions

View file

@ -6155,7 +6155,7 @@ router
const raw = String(ctx.request.body?.q || ctx.request.body?.prompt || '').trim();
if (!raw) { ctx.redirect('/'); return; }
const ssbRefLib = require('../server/node_modules/ssb-ref');
const hashtagMatch = raw.match(/^#([\p{L}\p{N}_-]+)/u);
const hashtagMatch = raw.match(/^#([0-9A-Za-z_À-￿-]+)/); // sin \p{}: nodejs-mobile no lleva ICU completo
if (hashtagMatch) {
ctx.redirect('/search?query=' + encodeURIComponent('#' + hashtagMatch[1]));
return;

View file

@ -11,6 +11,9 @@
module.exports = {
en: {
menuNetwork: "Network",
menuMedia: "Media",
fediverse: "Fediverse",
modulesKarvanLabel: "Karvan",
modulesKarvanDescription: "Ephemeral rooms: messages live only in memory and self-destruct.",
chatReply: "Reply",
@ -57,6 +60,9 @@ module.exports = {
spreadMore: "more"
},
es: {
menuNetwork: "Red",
menuMedia: "Medios",
fediverse: "Fediverso",
modulesKarvanLabel: "Karvan",
modulesKarvanDescription: "Salas efimeras: los mensajes viven solo en memoria y se autodestruyen.",
chatReply: "Responder",
@ -108,6 +114,9 @@ module.exports = {
totalspreads: "Replicas totales"
},
fr: {
menuNetwork: "Network",
menuMedia: "Media",
fediverse: "Fediverse",
modulesKarvanLabel: "Karvan",
modulesKarvanDescription: "Ephemeral rooms: messages live only in memory and self-destruct.",
chatReply: "Reply",
@ -154,6 +163,9 @@ module.exports = {
spreadMore: "plus"
},
eu: {
menuNetwork: "Network",
menuMedia: "Media",
fediverse: "Fediverse",
modulesKarvanLabel: "Karvan",
modulesKarvanDescription: "Ephemeral rooms: messages live only in memory and self-destruct.",
chatReply: "Reply",
@ -200,6 +212,9 @@ module.exports = {
spreadMore: "gehiago"
},
de: {
menuNetwork: "Network",
menuMedia: "Media",
fediverse: "Fediverse",
modulesKarvanLabel: "Karvan",
modulesKarvanDescription: "Ephemeral rooms: messages live only in memory and self-destruct.",
chatReply: "Reply",
@ -246,6 +261,9 @@ module.exports = {
spreadMore: "mehr"
},
it: {
menuNetwork: "Network",
menuMedia: "Media",
fediverse: "Fediverse",
modulesKarvanLabel: "Karvan",
modulesKarvanDescription: "Ephemeral rooms: messages live only in memory and self-destruct.",
chatReply: "Reply",
@ -292,6 +310,9 @@ module.exports = {
spreadMore: "altro"
},
pt: {
menuNetwork: "Network",
menuMedia: "Media",
fediverse: "Fediverse",
modulesKarvanLabel: "Karvan",
modulesKarvanDescription: "Ephemeral rooms: messages live only in memory and self-destruct.",
chatReply: "Reply",
@ -338,6 +359,9 @@ module.exports = {
spreadMore: "mais"
},
zh: {
menuNetwork: "Network",
menuMedia: "Media",
fediverse: "Fediverse",
modulesKarvanLabel: "Karvan",
modulesKarvanDescription: "Ephemeral rooms: messages live only in memory and self-destruct.",
chatReply: "Reply",
@ -384,6 +408,9 @@ module.exports = {
spreadMore: "更多"
},
ar: {
menuNetwork: "Network",
menuMedia: "Media",
fediverse: "Fediverse",
modulesKarvanLabel: "Karvan",
modulesKarvanDescription: "Ephemeral rooms: messages live only in memory and self-destruct.",
chatReply: "Reply",
@ -430,6 +457,9 @@ module.exports = {
spreadMore: "المزيد"
},
hi: {
menuNetwork: "Network",
menuMedia: "Media",
fediverse: "Fediverse",
modulesKarvanLabel: "Karvan",
modulesKarvanDescription: "Ephemeral rooms: messages live only in memory and self-destruct.",
chatReply: "Reply",
@ -476,6 +506,9 @@ module.exports = {
spreadMore: "और"
},
ru: {
menuNetwork: "Network",
menuMedia: "Media",
fediverse: "Fediverse",
modulesKarvanLabel: "Karvan",
modulesKarvanDescription: "Ephemeral rooms: messages live only in memory and self-destruct.",
chatReply: "Reply",

View file

@ -49,7 +49,7 @@ const TITLE_STOPWORDS = new Set([
const titleTerms = (c) => String(c.title || c.name || c.question || c.concept || '')
.toLowerCase()
.split(/[^\p{L}\p{N}]+/u)
.split(/[^0-9A-Za-zÀ-￿]+/) // sin \p{}: nodejs-mobile no lleva ICU completo
.filter(w => w.length >= 3 && !TITLE_STOPWORDS.has(w) && !/^\d+$/.test(w));
const termsOf = (kind, c) => {