🎉 Launch "flatten threads" feature

Fixed: twpowertools:153
Change-Id: I09eb246a4b6de130d5bed81cefe9109995aaf43b
diff --git a/docs/features.es.md b/docs/features.es.md
index 15d6b77..8688182 100644
--- a/docs/features.es.md
+++ b/docs/features.es.md
@@ -228,7 +228,7 @@
 
 Una imagen vale más que mil palabras:
 
-![Animated GIF showing the feature](resources/per_forum_activity_chart.gif)
+![GIF animado que muestra la función](resources/per_forum_activity_chart.gif)
 
 ### Diseño de los hilos en la Consola de la Comnuidad
 > **Opción:** _Muestra el diseño viejo/nuevo de los hilos en la Consola de
@@ -252,6 +252,17 @@
 
 ![Imagen mostrando cómo se reduce el espacio en blanco en la página de la lista de hilos en móvil](resources/ui_spacing_2.png)
 
+### Allana los hilos
+> **Opción:** _Muestra un selector para activar/desactivar la vista anidada en
+los hilos._
+
+Esta opción añade un selector en los hilos justo debajo del post principal que
+te permite cambiar entre la vista anidada que hay por defecto y una nueva vista
+que muestra todas las respuestas en una vista lineal y no anidada, como
+anteriormente.
+
+![GIF animado que muestra cómo se usa la función](resources/flatten_threads.gif)
+
 ## Punto indicador
 > **Opciones:** _Muestra si el autor del hilo ha participado en otros hilos_,
 _Muestra el número de preguntas y respuestas escritas por el autor del hilo
diff --git a/docs/features.md b/docs/features.md
index 815a62c..573ccca 100644
--- a/docs/features.md
+++ b/docs/features.md
@@ -252,6 +252,15 @@
 
 ![Picture showing how whitespace is reduced in the thread list page in mobile](resources/ui_spacing_2.png)
 
+### Flatten threads
+> **Option name:** _Show a toggle to enable/disable nested view in threads._
+
+This option shows a toggle in threads just below the main post which lets you
+switch between the vanilla nested view and a new view which shows all replies
+in a linear non-nested view, just like before.
+
+![Animated GIF showing how the feature is used](resources/flatten_threads.gif)
+
 ## Indicator dot
 > **Option names:** _Show whether the OP has participated in other threads_,
 _Show the number of questions and replies written by the OP within the last `n`
diff --git a/docs/resources/flatten_threads.gif b/docs/resources/flatten_threads.gif
new file mode 100644
index 0000000..b129143
--- /dev/null
+++ b/docs/resources/flatten_threads.gif
Binary files differ
diff --git a/src/common/optionsPrototype.json5 b/src/common/optionsPrototype.json5
index 8bcc0da..79569aa 100644
--- a/src/common/optionsPrototype.json5
+++ b/src/common/optionsPrototype.json5
@@ -139,6 +139,11 @@
     context: 'options',
     killSwitchType: 'option',
   },
+  'flattenthreads': {
+    defaultVale: false,
+    context: 'options',
+    killSwitchType: 'option',
+  },
 
   // Experiments:
   'workflows': {
@@ -156,11 +161,6 @@
     context: 'experiments',
     killSwitchType: 'experiment',
   },
-  'flattenthreads': {
-    defaultVale: false,
-    context: 'experiments',
-    killSwitchType: 'experiment',
-  },
 
   // Internal options:
   'ccdarktheme_switch_enabled': {
diff --git a/src/options/optionsPage.json5 b/src/options/optionsPage.json5
index 1b4f4d3..9435ece 100644
--- a/src/options/optionsPage.json5
+++ b/src/options/optionsPage.json5
@@ -11,6 +11,7 @@
         {codename: 'threadall'},
         {codename: 'ccdarktheme'},
         {codename: 'threadlistavatars'},
+        {codename: 'flattenthreads'},
         {codename: 'history'},
         {codename: 'perforumstats'},
         {codename: 'batchlock'},
diff --git a/src/static/_locales/ca/messages.json b/src/static/_locales/ca/messages.json
index c9c294c..8604bf8 100644
--- a/src/static/_locales/ca/messages.json
+++ b/src/static/_locales/ca/messages.json
@@ -179,6 +179,10 @@
     "message": "Redueix l'espai en blanc a la Consola de la Comunitat i TW.",
     "description": "Feature checkbox in the options page"
   },
+  "options_flattenthreads": {
+    "message": "Mostra un selector per activar/desactivar la vista anidada als fils.",
+    "description": "Feature checkbox in the options page"
+  },
   "options_save": {
     "message": "Desa",
     "description": "Button in the options page to save the settings"
diff --git a/src/static/_locales/en/messages.json b/src/static/_locales/en/messages.json
index 94fd093..7f6b213 100644
--- a/src/static/_locales/en/messages.json
+++ b/src/static/_locales/en/messages.json
@@ -179,6 +179,10 @@
     "message": "Reduce the whitespace in the Community Console and TW.",
     "description": "Feature checkbox in the options page"
   },
+  "options_flattenthreads": {
+    "message": "Show a toggle to enable/disable nested view in threads.",
+    "description": "Feature checkbox in the options page"
+  },
   "options_save": {
     "message": "Save",
     "description": "Button in the options page to save the settings"
diff --git a/src/static/_locales/es/messages.json b/src/static/_locales/es/messages.json
index b4574cf..23a1167 100644
--- a/src/static/_locales/es/messages.json
+++ b/src/static/_locales/es/messages.json
@@ -179,6 +179,10 @@
     "message": "Reduce el espacio en blanco en la Consola de la Comunidad y TW.",
     "description": "Feature checkbox in the options page"
   },
+  "options_flattenthreads": {
+    "message": "Muestra un selector para activar/desactivar la vista anidada en los hilos.",
+    "description": "Feature checkbox in the options page"
+  },
   "options_save": {
     "message": "Guardar",
     "description": "Button in the options page to save the settings"
diff --git a/src/static/options/experiments.html b/src/static/options/experiments.html
index 18fa34d..615d5ec 100644
--- a/src/static/options/experiments.html
+++ b/src/static/options/experiments.html
@@ -16,7 +16,6 @@
         <div class="option"><input type="checkbox" id="workflows"> <label for="workflows" data-i18n="workflows"></label> <button id="manage-workflows" data-i18n="workflows_manage"></button></div>
         <div class="option"><input type="checkbox" id="extrainfo"> <label for="extrainfo" data-i18n="extrainfo"></label></div>
         <div class="option"><input type="checkbox" id="nestedreplies"> <label for="nestedreplies" data-i18n="nestedreplies"></label></div>
-        <div class="option"><input type="checkbox" id="flattenthreads"> <label for="flattenthreads">Flatten threads (feature name TBD)</label></div>
         <div class="actions"><button id="save" data-i18n="save"></button></div>
       </form>
       <div id="save-indicator"></div>