MS–DPD Update Process - sc-voice/ms-dpd GitHub Wiki

Overview

The Digital Pali Dictionary (DPD) is updated regularly. In particular, MS-DPD relies on the dpd.db.tar.bz2 SQLite3 database as the source of its own content updates for EN/RU. Those changes are then propagated into the multilingual MS–DPD Definition Files for all untranslated EN headwords. This document describes the MS-DPD update process.

DPD Updates

To update the MS-DPD library from a new DPD release open a Linux prompt. In the following, replace DPD_VERSION with the actual DPD version (e.g., 2025-01-13).

./scripts/dpd-install
./scripts/build-dpd
./scripts/merge-lang HEAD
git add .
git -am commit DPD_VERSION
./scripts/publish

dpd-install

This script will prompt you to download the dpd.db.tar.bz2 file from DPD Releases. It will then decompress the downloaded file into a date-stamped SQLite database file such as local/dpd.db.250116. Finally, script will re-bind the symbolic link local/dpd.db to point to the new SQLite database file.

build-dpd

After the SQLite database has been updated, the information contained must be extracted and converted into a Javascript format for MS-DPD itself.
The build-dpd script updates the following files:

        modified:   dpd/definition-pali.mjs
        modified:   dpd/en/abbreviation-en.mjs
        modified:   dpd/en/definition-en.mjs
        modified:   dpd/index.mjs
        modified:   dpd/ru/abbreviation-ru.mjs
        modified:   dpd/ru/definition-ru.mjs

merge-lang

This script examines the changes to the EN definition files and applies those changes to unmodified lines in the language-dependent (e.g., DE/ES/FR/PT) definition files. The script also creates date-stamped merge result files (e.g., dpd/de/merged-de-2501161320.json) that allow translators to deal with any merge conflicts with translated text. In the following example, a conflict is reported for headword Key Afh. The EN text has changed (srcNew) with the addition of "; assented (to)". The DE translator will then be able to update the DE text to include any further translations as required.

  "conflicts": {
    "AFh": {
      "dstHead": "antwortete (+ Dat.); stimmte zu (+ Dat.)||",
      "srcNew": "replied (to); agreed (with); ||",
      "srcBase": "replied (to); agreed (with)||"
    }
  },

To complete this step, be sure to add the new files and commit them with a comment that includes the DPD release name.

publish

The final script publishes a new version of the MS-DPD library, which comprises one library for the shared code and definitions as well as a package for each language-dependent translation.

MS-DPD Translators

The DPD is updated regularly, so merge files may accumulate. MS-DPD translators may update the merge files comment field as they wish to help them manage their own translations of the merged files. Alternatively, MS-DPD translators may also simply delete old merge files once the merge conflicts are translated.

  "comment": "(replace this text as desired)",