This post is for technical discussion among SuttaCentral developers. If you have a general question or comment, please create another thread for it. Thanks!
Bilara is SuttaCentral’s in-house translation app, and it lives here:
With the deprecation of Pootle, the translation engine on which I made my nikaya translations, we were in need of a new Computer Assisted Translation (CAT) tool. determining that available options did not suffice, Blake proposed that we build our own as a thin client for Github. We christened it “Bilara”, which is Pali for “cat”.
I am using bilara for my Dhammapada translation, and now that @brahmali’s Vinaya translation is there, he can start using it too.
The guiding philosophy is: Thou shalt not build into bilara anything that can be done on Github.
So a lot of things like user accounts, data storage, version history, statistics, and so on, all of which were built in to Pootle, can be offloaded to Github and we can keep our client simple.
We keep development simple by only actively supporting modern Chrome. Other browsers may well work, but we are not testing for them. Same applies to mobiles and tablets.
State of the app
Currently bilara is an Minimal Viable Product (MVP). It does the essential things that a CAT must do, but no more. Assume everything is broken and you won’t be disappointed.
- Edit translations.
- Add/remove texts
- Offer translation suggestions.
- Sync data with Github.
- User accounts via Github.
- Navigation is primitive but works fine.
- There’s no search.
Apart from basic editing/data sync, good find-replace is my number one priority:
Here are the outstanding issues if you are interested, or if you want to add your own!
- Make an account on Github. If possible use something like your real name, it helps to remember who is who!
- Request write access to the bilara-data repo.
- Hopefully that will be all. See above re “assume everything is broken”.
- Click on nav items to open and see what’s there.
- On translation pages, click on right hand column to edit a segment.
- Click on translation suggestion to accept it.
- Press enter to commit a segment.
- If you click away without pressing enter, a warning sign will appear. the text exists in your browser but has not been committed.
- Once you press enter, the text is committed and a check mark appears.
- There’s a bit of a weird bug where the app works too fast for some browsers, so the text fetching doesn’t happen. If you click on a text page and nothing appears, just go back and then return, it should load.
Search: introduction to the Dark Arts
For now, search has to be done with workarounds.
Refine queries using advanced search, eg. if you want to search only your own translations. Further details.
Note, queries with whitespace must “be quoted”.
Pull the repo locally and use whatever you want to search. I use Sublime Text, it searches rapidly over the whole corpus and allows regex, whole word, match case, etc.
The biggest limitation of both these approaches is that you only see the text or translation, not both side by side. You then can search using the segment ID to get both at once, but that is clumsy. Until this is fixed properly, the only way I know to easily get text and translation together is to use Pootle. Not very helpful, I know, but can be useful sometimes.
Since the data is just JSON files in Github, you can easily sync it locally, make changes there, and push it back. IN THEORY!
This is especially useful for bulk find/replace. Use Sublime or other text editor to make the changes, and push them all at once, voila!
But! There has been some instability in terms of managing merge conflicts. It can still be done, but use with caution until we are confident this has been resolved.
There is currently no support for “suggestions” and other proofing tools. If anyone wants to do proofing, we’ll have to work out an ad hoc solution for now. Two possible approaches:
- lo-tech: make a thread here on D&D and just paste in text.
- hi-tech: make a branch on Github and use pull requests.