From dcd8209d1291fe84351e8d19483c260218f430b7 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 21 Sep 2026 11:12:45 -0400 Subject: 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) --- org/default_paths.org | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'org/default_paths.org') diff --git a/org/default_paths.org b/org/default_paths.org index 9bf56d5..27caf8b 100644 --- a/org/default_paths.org +++ b/org/default_paths.org @@ -277,6 +277,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) { -- cgit v1.2.3