Content translation/V2

Content translation version 2 is a revamp of the translation system with OOJS based code organization and OOUI based front end. This will also have the editor component enhanced using Visual Editor.

The plan is to gradually replace version 1 with version 2. Version 2 won't be an incremental update to version 1. But the translations created using version 1 should work with version 2 too.

Rationale
CX was developed iteratively for last 2+ years. During that time, features were added in several stage of product development. In the beginning of the project, there was a highlevel understanding of features but not the details. So the architecture was a flexible one where modules can be plugged and get this done. This worked very well for us and we were able to add features fast. But the approach caused code duplication, less organized hierarchy of similar usecases. So a consolidation and reorganization of these use cases is much needed.

The general direction in which CX is moving is to align with the MediaWiki extension good practices which includes OOUI based standardised frondend. Also CX need much improved editing experience with the help of VE. OOJS and obvioulsly VE follow object oriented architecture heavily. CX's plugin based and global hooks based architecture is ill suited to mix with them. So the above mentioned organization should follow OO architecture for the best match.

The patched up CX code showed some shortcomings recently and we can solve it during this reorganization.

Major features
A general CX2 roadmap describes the planned interventions in more detail. The main areas of intervention are:
 * Align with the Wikimedia standards in technology and design
 * Visual Editor's editing surface with more editing tools to insert and edit templates, tables, multimedia, etc.
 * Reliable undo/redo support.
 * UI revamp based on UI Standardisation initiative and OOUI components
 * A great way to contribute for newcomers
 * Machine translation support for Template params, reference texts and practically all kind of elements in screen. In version 1, machine translation was limited to paragraphs alone.
 * Better support for References and Templates
 * Ability to add and remove categories
 * Solid and reliable
 * Fixing lots of bugs that was too difficult to handle with previous version

What will be missing from the current version?
CX2 is expected to improve the experience of translators compared to CX1 overall. The new version will bring many new features that are possible with the new technology architecture. However, in order to be able to deliver those improvements soon, we have to limit the efforts of rewriting all the existing tools CX1 has. Thus, some of the existing tools won't be available in CX2 initially. We are looking for your feedback during this process.

These are the tools currently in CX1 that will be missing initially for CX2:
 * Custom template translation editor. CX1 added support for a side-by-side editor of templates that allowed translators to map their parameters. Rewriting this for CX2 will require significant effort. Initially, the standard template editor dialog provided by Visual Editor will be available in CX2. this allows to edit all parameters of a template in the translation (although they are not presented next to those of the original template).
 * Dictionaries. CX1 had experimental support for dictionary information lookup for a few language pairs. Dictionaries are a very relevant tool for translators, and we'll keep track the progress of Wikimedia projects in this area that will enable their integration in the future.
 * Progress indicator in the editor. A progress bar showed in CX1 how much of the article was translated and how much was missing. This information will be still visible from the dashboard, but based on our observations from users, having it on the editor was not providing them much value.

Status
The new version is always available in production and can be accessed using version=2 in the normal CX translation view. At present this is highly unstable.The progress is tracked using

Rollout plan
A rough plan is to enable version 2 is smaller wikis or subset of wikis to do QA and gradually rollout to more wikis.

Backwards compatibility
Versions 1 and 2 will coexist during a transition period. Given that the translations each version produce are not expected to be compatible, the following steps are considered to avoid issues related to breaking backwards compatibility:
 * 1) Translations started with one version of the editor will be alway opened with the same version, regardless of which is the current default editor. That is, when version 2 is the default, old translations started with the version1 will still be opened with version 1.
 * 2) Once version 2 is considered the stable default, creating new translations with older versions will be prevented. That is, version 1 will not be available to create new translations, but it will be still available to edit the old ones.
 * 3) With a process in place to automatically discard translations after one year, version 1 could be safely removed after such period pases since no new articles can be started with it.