aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2026-09-21 11:12:45 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2026-09-22 14:37:34 -0400
commitdcd8209d1291fe84351e8d19483c260218f430b7 (patch)
tree4df97f91a8e383a451e0cd6253ebfbe8930e8f30 /src
parentocda db: the schema gains doc_id (diff)
paths: doc_uid_out_no_lang, doc name sans language
doc_uid_out ends in ".{lng}", which is right for an artefact written per language and wrong for one that holds every language of a document. Rather than strip the suffix at each place that needs the bare name, build it by the same branches without the language, so the two names cannot drift apart. (assisted by Claude-Code)
Diffstat (limited to 'src')
-rw-r--r--src/sisudoc/ocda/io_in/paths_source.d17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/sisudoc/ocda/io_in/paths_source.d b/src/sisudoc/ocda/io_in/paths_source.d
index c0f526a..125d6f1 100644
--- a/src/sisudoc/ocda/io_in/paths_source.d
+++ b/src/sisudoc/ocda/io_in/paths_source.d
@@ -265,6 +265,23 @@ template PathMatters() {
}
return _uid;
}
+ /+ ↓ doc_uid_out without the trailing ".{lng}", for the artefacts
+ that hold every language of a document in one file rather
+ than one file per language (the .ocda.db)
+ +/
+ string doc_uid_out_no_lang() {
+ string _uid;
+ if (is_pod && !(pod_name_with_path.empty)) {
+ if (pod_name_with_path.baseName == filename_base) {
+ _uid = filename_base;
+ } else {
+ _uid = pod_name_with_path.baseName ~ mkup.uid_sep ~ filename_base;
+ }
+ } else {
+ _uid = "_" ~ filename_base;
+ }
+ return _uid;
+ }
string docname_composite_unique_per_src_doc() {
string _fn;
if (pod_name_with_path.baseName == filename_base) {