The aim of this project is to assist in translating the XML UI into another language, other than english.
- Create a new
message_xx.xml
file by combining data frommessage.xml
and an oldermessage_xx.xml
file. The output of this is an xml language file with all messages keys of the latest messages.xml, where all translation from an older messages_xx.xml have been ported over. You are left translating of only the newly added keys, without having to check them one by one. - Convert a translation xml file to XLSX format. This allows for editing translation strings in Office, and give the ability to a non-programmer to do the translation.
- Convert the exported XLSX file back to the native xml file for usage by DSpace.
- Edit the value of
incomplete_translation_file
and set the filename of your old translation file. - Place the base
message.xml
and the old translation filemessage_xx.xml
in the same folder aslang-util.py
. - Issue the command
python3 lang-util.py migrate
to generate a new xml file where translation strings from the old translation file are migrated to the latest xml file format. - Issue the command
python3 lang-util.py export
to convert your desired xml file translation to XLSX and open it in a spreadsheet editor. - Issue the command
python3 lang-util.py import
to convert your previously exported XLSX file back to the DSpace XMLUI xml file.
- You can use non-default filename by parsing variables with each command.
Use
python3 lang-util.py {migrate | export | import} -h
to see available options. - Use
python3 lang-util.py -h
for help.