Skip to content

Dependencies and localization

Two pack-time composition tools exist today. Neither is a general “included publication overrides this URN’s text” feature. That composition model is part of the annotations feature review (notes/task-annotations-feature-review.md in the vyasa toolchain repo).

Each stream may ship localization.vy (or context.vy) with vocabulary maps. A derived stream can inherit another stream’s labels and override keys:

`localization { extend = "primary" }
`structure [
"verse" = "śloka"
]

extend = "primary" is the URN-spine alias. Pack rewrites it to the packed folder name (e.g. mula) before it is stored. Child keys win; missing keys are copied from the base stream into the child’s vocabulary rows.

This overlays UI labels (structure words, entity display names), not html_blocks.

[dependencies.bg]
package = "vedabase-bg"

At pack time vyasac looks for a sibling .vyview / .sqlite (typical paths: ../<package>/build/<package>.vyview, then a few dist/ fallbacks). It ATTACHes that database and copies:

  • streams, renamed to dependency.<key>.<original-stream-name>
  • html_blocks for those new stream ids (INSERT; conflicts ignored)
  • block_attributes (INSERT OR IGNORE)

The dependency does not replace the current work’s spine blobs. It does not merge graph_edges. Catalog tree still comes only from the primary = true stream of this pack.

If the file cannot be found, pack errors. Build the dependency first.