Summary
This page describes the technical details of the selected implementation.Data structure
- tiki_pages_translation_bits
- translation_bit_id
- page_id
- version
- source_translation_bit
- original_translation_bit
- flags
For each new contribution to the page, a translation bit will be recorded. Bits may have special flags, such as critical. In the case of a new contribution, source and original translation bits will be left null.
When a translation update is performed, all translation bits from the source page will be added to the target page by specifying the source translation bit. The original translation bit will always refer to the translation bit first appeared.
The resulting data collected is very similar to a directed graph. The graph is simplified by the fact that there will never be loops in the paths.
Fetching information
The simple structure above allows to get all the information required. Here is how to proceed.Determine if the page requires a critical update
If the current page's translation set contain a translation bit flagged as critical which is not available for the current page, the page must advertise it's innaccuracy.Determine if the page requires translation
If the current set of translations contains translation bits that are not in the current page, the page needs translation.In a pivot language model, the pivot language could look for translation bits in all other languages of the set. Other languages would only look for bits in the pivot language.
Quality assessment
A page with too many missing translation bits could be marked as out of date. The age of the oldest missing translation bit could also be used as an indicator.Various statistics
The source of content contribution and their propagation paths can be obtained.Collecting information
For the translation bits to be propagated properly, the page saving process must be hooked in multiple ways:- Creating a new page or saving an update, create a new blank translation bit
- Saving an update with the critical flag, the created translation bit must have the critical flag
- Creating a new page translation, propagate all translation bits from the source
- Updating a translation, propagate all translation bits from the source up to the selected version