Freedombone Blog

Freedom in the Cloud

Speeding up Translations

The way that translations happens in Freedombone is maybe not optimal but it's good enough, especially considering that changing the language of the web interface is something which is only going to happen once after setup for the first time. Previously this was quite slow, because behind the scenes what was really occurring was the running of a lot of sed commands on each screen.

To speed things up the script which changes language has been rewritten in python and loads the translation table into memory. This reduces the amount of time to translate all strings on all pages down from multiple minutes to thirty seconds on a Cubieboard with an SSD. That's still an appreciable duration and so additional "please wait" screens have been added. The wait screens make changes of language or theme much nicer and a lot less confusing. Possibly this might also be an opportunity to show some informational images during the wait, similar to installing Ubuntu or some other distros. Without wait screens there is a twilight zone in which some things have changed and some things havn't.

Image description

These changes currently only apply to the unreleased buster branch. With the release of Debian 10 expected soon (within a couple of months) the buster branch is where most of the action is happening.

Tag: freedombone