This suggestion follows on from previous discussion here:
That proposal envisages a UI on Bilara for managing publication. We are still some way off of doing that, so I would like to propose a more minimal solution for now. This can be a stepping-stone towards a fuller solution.
_publication.json we have a Boolean field
is_published. This creates a potential issue, as “published” status is also (in principle) indicated by the git branch.
More subtly, it confuses the perspective of the data. A translator should not decide when a text is published: that is for a publisher to decide, i.e. the apps that consume bilara-data. A translator, rather, should indicate when a translation is ready for publication. That should then trigger an action on behalf of an app.
In addition, we still do not have a clear model for representing incremental translations. A translator may work either by translating a whole text at a time and then publishing it (as I did), or by publishing as they go (as Sabbamitta is).
To keep the logic manageable, let us require that incremental translation is on a per-sutta basis. Thus you can either publish the “Anguttara Nikaya” or “AN 1.7”, but you can’t publish “the second vagga of the AN Twos”.
So my proposal is this. In bilara-data we have two fields. Please let me know if my JSON is incorrect!
is_ready_for_publication: true/false, is_completed: "true/false/[list, of, completed, sutta, IDs]"
Let us consider each combination of these.
is_ready_for_publication: false, is_completed: false,
In this case, all translations are kept on the
is_ready_for_publication: true, is_completed: true,
In this case, once
is_ready_for_publication is set to
true, it sends a message to the developers on bilara-data, (Blake and myself) that this translation project (usually a nikaya or similar) is ready to be promoted to
published branch. This will be handled manually for the time being, and possibly automated in due course. Subsequent edits will be to the
Apps should consume data from
published branch. This can be automated or manual, that is up to the app developer.
So much for the simple cases!
What happens when:
is_ready_for_publication: false, is_completed: true,
In this case, nothing need be done. We wait for a signal from the translator that they are ready.
is_ready_for_publication: true, is_completed: false,
This should trigger a UI change on Bilara. The translator sees a “Publish” button on each sutta in the translation project. When they click that button, the relevant ID is added to
is_ready_for_publication: true, is_completed: ["mn1", "mn2", "mn3"],
This sends a signal to bilara-data developers that the stated texts are ready be promoted to the
One disadvantage of this approach is that we will end up with thousands of sutta IDs in
publication.json. I’m not sure if there is a more elegant solution to this, but this is the best I can think of. At least it is simple and clear!
I am envisaging that for the time being,
publication.json is still hand-edited, except for this one function. But we should move to GUI editing sooner rather than later.
Slightly related: Bilara should indicate the publication status of each sutta.