Import Across abbreviations or language segmentation rules

XMLWordPrintable

    • High
    • None
    • OKAPI: Add CLI command to import Across Segmentation Settings regarding Abbrevation ("terms") to an SRX as used in translate5
    • None

      Problem
      Some customer do have a lot of abbreviations defined in their Across. And they want this abbreviations also in Translate5 to avoid unwanted segmentation.
      These configurations are made in Across under "Tools -> System-Settings" under "General -> Language Settings"

      Solution
      We develop a T5 CLI command called:
      okapi:across:patchabbrevations
      This command will extract Abbreviations from a language.xml exported from Across and use it for "no-break rules" in SRX. You can find such an language.xml attached here:
      LanguageSettings.xml

      Inside this file are definitions for multiple different languages. These languages are organised in 2 level:
      1. level: langset sample: <langset name="Standard language set">..</langset>
      2. level: language, sample: <language lcid="7">..</language>
      So you see that we can get the language-name by searching the lcid in LEK_languages table. Hopefully the resulting name fits to the ones used in SRX to separate the different language.

      But we need to match SRX <languagerule languagerulename="German">
      with lcid=7 from LEK_languages => "Deutsch"

      How The command works:

      • Add a Across language-Settings "xml" file to the folder APPLICATION_ROOT/data/across/
      • Add a SRX-file file to that folder as well (e.g. by downloading it from the file-format-settings management)
      • call the CLI-command okapi:across:patchabbrevations which will transfer the abbrevations ("terms") from the across-settings to the SRX file (with basic checking for duplicates!)

      Frontend-Testing
      See the developer-comment

        1. Bildschirmfoto 2026-03-26 um 16.02.03.png
          169 kB
          Stephan Bergmann
        2. Gornik-languages-source.srx
          705 kB
          Axel Becher
        3. Gornik-Standard.bconf
          1.39 MB
          Axel Becher
        4. LanguageSettings.xml
          181 kB
          Stephan Bergmann

            Assignee:
            Axel Becher
            Reporter:
            Stephan Bergmann
            None
            None
            Thomas Lauria
            Stephan Bergmann
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None