Created 3 years ago
Maintained by jaaf64
Copy docbookXMl text and transform before past
Members 1
jaaf64 committed 3 years ago


Copy docbookXMl text and transform before past

Fedora documentation recently changed from docbookXML format to asciidoc. In order to facilitate the recovery of memorized strings in Zanata a sh script has been created to:

1– get the part (or totality) of a string the user has selected in the translation memory

2– apply this script to replace the old tags (docbookXML) with new tags(asciidoc) and place the result into the clip board

3– middle-clic into the translation field in order to paste the transformed content into it

The use of this script requires some preparation of your system assuming the web browser you are using is Firefox

1— install the xclip package into you Fedora system

$ su -c 'dnf install xclip'

2— install the Firefox AppLauncher extension

3— create a command to be added to Firefox lets'say with the following content

xclip -o | source /home/jaaf/zanata-scripts/| xclip -i

4— add this command into Firefox (Menu -> Modules and in front of the AppLauncher line Preferences, then clic Add and fill the form with a name and a path to the transform command

WARNING: don't forget to make both sh file executable

Once this preparation has been done, simply select a string into the translation field, right clic and choose AppLauncher->transform then clic into the translation field where the transformed string should be added and middle clic (clic with the central wheel). The transformed string will be pasted into the field.