User:APatro (WMF)/Mark page for translation - Process flow

Glossary
See - Help:Extension:Translate/Glossary

Please ensure that you are familiar with the following terminology:


 * 1) message collection
 * 2) message group
 * 3) message handle
 * 4) message index
 * 5) source page
 * 6) state
 * 7) translatable page
 * 8) translatable page source
 * 9) translation page
 * 10) translation unit
 * 11) translation unit identifier
 * 12) translation unit marker
 * 13) translation unit page
 * 14) translation unit source

Page is marked for translation
During this process no changes are made to the translation unit pages of the non-source translation pages.
 * 1)  - Majority of work is done in the function:.
 * 2) Identify sections and section markers in the page.
 * 3) Saves the content in the source page along with the section markers
 * 4) Identify sections that have been marked as fuzzy by the user.
 * 5) Delete all the existing sections from the.
 * 6) Re-insert the identified sections into the.
 * 7) Save the   and page syntax   in.
 * 8) Add the     to the page.
 * 9) Re-cache the Message group definitions -   to update the list of groups in the cache.
 * 10) Store the new page section names in the interim cache. This is done to avoid issues caused due to delays caused in updating the message index.
 * 11) Push a   to the  . Pass it the page title, and all the serialized sections.
 * 12) Handle priority languages; save that information in the   table.
 * 13) Add a manual log entry
 * 14) Invalidate the page title cache; update the   for the title.
 * 15) Create a   for each unit page in the source language. Eg: Main_Page/1/en, Main_Page/2/en etc.
 * 16) Run the  s to update the contents of the translation unit page.
 * 17) Wait for replication lag.
 * 18) Clear the   process cache.
 * 19) Clear the   cache which removes the definitions.
 * 20) Update group stats for the page's.
 * 21) Add   for all the translation pages including the source language translation page to the job queue.
 * 22) Add   to the job queue.
 * 23)  (Multiple based on language codes)
 * 24) Identify the language code.
 * 25) Load the   with the given group and language code.
 * 26) Get the translation page text.
 * 27) Save / Update the translation page.
 * 1) Save / Update the translation page.

Section is translated

 * 1) Check if the content is , and the handle is valid.
 * 2) Check and mark the translation as fuzzy incase it fails validation
 * 3) If it is a non-source language; update the translation status.
 * 4) Update the message group state.
 * 5) Create   to update the translation memory.
 * 6) Call
 * 7) Ensure that it is NOT FuzzyBot making the translation.
 * 8) Ensure that the Title belongs to the.
 * 9) Ensure that it is NOT message documentation.
 * 10) Create a   to update the translation page.
 * 11) Purge the cache for all the translation pages in order to update the language bar.
 * 1) Create a   to update the translation page.
 * 2) Purge the cache for all the translation pages in order to update the language bar.
 * 1) Purge the cache for all the translation pages in order to update the language bar.

Jobs in Translate
This section describes the relevant jobs involved when a page is marked for translation or a section is translated.

TranslationsUpdateJob

 * 1) Creates and runs the   to update the translation unit pages in the source language.
 * 2) Regenerates the group stats for the page.
 * 3) Create the   for all the translation pages and add them to the job queue.
 * 4) Add a   to the job queue.

Added to the job queue by  when a page is marked for translation.

MessageUpdateJob
Updates the translation unit pages with the new translation text.

Added to the job queue by.

TranslateRenderJob
When a page is marked for translation, s are created for each existing translation pages. They update the translation pages with the latest content of page that was marked for translation.

When a section is translated, a  is created to update the translation page for the language that was just updated.


 * Added to the job queue by  when a section is saved.
 * Added to the job queue by  when a page is marked for translation.

MessageIndexRebuildJob
Used to rebuild the  with information regarding the latest page marked for translation. De-duplication is in place for this job to ensure that only once instance of this job is present in the job queue at any given time.

Added to the job queue by.

MessageGroupStatesUpdaterJob
Handles automatic state changes for message groups for a specific language.

Added to the job queue by  when a section is saved.