Sphinx Internationalization....

Published: 07/25/2019

So, after the first phase was over, I was really happy that I had got some work done on my project, and finally could move on to the biggest issue that I was going to face for completing the project - Internationalization. Before that, I had to first readjust the videos in the lecture files according to the subtopics, and I had that done quickly, and made the web build with that update as well. Now, it was time for translating the lecture files and the assignments , which were in Portuguese, to Spanish. Initially, I had a major concern as I didn't know any of those languages, but finally I decided that I would take help of Google Translate and my intuition as much as I can to translate the files.

I started with making sphinx quickstart projects in each clone of the master branch of the repository on my local system. Created the po files. And now, I had to translate all the strings that had been recognized, to Spanish. I started working on that, and it was tiresome, because I had to also make sure that I don't disturb the syntax of the Runestone components that made a big part of the files. I took care, and finally managed to translate all the po files using Google Translate. I had to tweak around with the rst files in between a lot. After that, I went on to making the mo files, and remove any syntax errors that might be present. However, there was a problem. The assignment files consisted majorly of Runestone components, and the text inside them was not getting detected by Sphinx. I kept that issue aside, and concentrated on the lectures.

Finally, it was now the turn to make the final web build in order to get the translated rst files, and then use them in the project and move on forward. But again, there was an issue. A problem popped up related to duplicate key ids, and I was not able to convert the po and mo files to translated documents. I then filed an issue in the Sphinx repository for help.

I started work on the remaining issues, which consisted of making automated subtitles and creating advanced assignments that can incorporate within them advanced Python libraries like Tkinter and Pygame.

I hope to make some headway this week.