Compile the UI translation files - bookfere/Ebook-Translator-Calibre-Plugin GitHub Wiki
Here are some scripts for compiling .po files to .mo files. Please replace the /path/to/project
with the real plugin project path.
PowerShell script on Windows
$project_path = "/path/to/project"
Set-Location $project_path
Get-ChildItem -Filter *.po | ForEach-Object {
$poFile = $_.FullName
$moFile = $_.BaseName + '.mo'
msgfmt -o $moFile $poFile
}
Bash script on macOS/Linux
#!/bin/bash
project_path=/path/to/project
for i in $(ls $project_path/translations/*.po); do
name=${i##*/}
echo "$name => ${name/%po/mo}"
msgfmt $i -o ${i%.*}.mo
done
You can also use other translation editors such as Poedit to compile .po file to .mo file.