Repository navigation
feat(formatos): libros guía de los archivos de idioma como libro - #38
Conversation
Las claves de libros de Patchouli con i18n y de Modonomicon se traducen como libro, con el título de la entrada y el texto anterior como contexto, y entran en la revisión. El tono de libro ya no pide escribir de forma natural: esa frase empujaba a reescribir y sin ella el chrF de libros sube 1,45 (IC 0,80 a 2,12).
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 647bb2fa30
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for ambito, del_ambito in por_ambito(piezas, modulo.ambito).items(): | ||
| hecho = self._traducir_ambito(pasada, informe, grupo, ambito, del_ambito, solo_memoria) | ||
| pendientes += hecho[0] | ||
| traducciones.update(hecho[1]) |
There was a problem hiding this comment.
Preserve translations for duplicate strings across scopes
When the same English string is pending under both a book key and a regular UI key, each scope produces a translation keyed only by that source string. This update overwrites the UI result with the book result, and Mods.escribir then applies that one value to both keys, losing the scope-specific translation. Preserve the per-key scope association or otherwise resolve the shared value intentionally.
Useful? React with 👍 / 👎.
| ) | ||
| for pieza in con_contexto: | ||
| piezas.append(Pieza(pieza.texto, pieza.pista, AMBITO_LIBRO)) | ||
| self._ambitos[pieza.texto] = AMBITO_LIBRO |
There was a problem hiding this comment.
Count pending work separately for each scope
When the same English string is pending under both a book key and a regular UI key, _ambitos can store only one scope for that string, and pendientes_de receives only the strings. It therefore checks the book scope for both occurrences and misses pending UI work, underreporting the analysis and estimated translation cost even though execution translates both scopes.
Useful? React with 👍 / 👎.
Primera parte de la ola 7 del plan de calidad (segmentación): los libros guía que viven en los archivos de idioma.
Qué cambia
Los libros guía se traducen como libro. Desde Patchouli 1.20 casi todos los libros usan claves de idioma (
"i18n": true), igual que Modonomicon, y la app los mandaba al motor como textos de interfaz.mods.es_clave_de_libroreconoce sus claves («…book…», «…guide…», «…lexicon…»…). Quedan fuera los nombres de objetos y los textos de menús, configuración y tooltips.con_vecindad).Pieza.ambitopermite que un módulo tenga textos de más de un ámbito.base.por_ambitoypendientes_dehacen que el proceso, el análisis, «Qué cambió» y el paquete traduzcan y cuenten cada ámbito por separado.El tono de libro ya no dice «Escribe de forma clara y natural». La frase empujaba a reescribir en vez de traducir. Vale para todos los libros guía, también los de Patchouli en JSON.
Medición
Gemini 3.8 Flash, banco de 116 textos de libros, dos corridas por condición (US$ 0,15).
Verificación
scripts/verificar.pycompleto: 1372 pruebas pasan, cobertura del 94 %. Las pruebas nuevas están entests/test_libros_por_clave.py.Lo que queda de la ola 7
Los componentes JSON como frase entera y las descripciones de FTB Quests en bloque.