Issue #3029839 by shaal, smaz, Gábor Hojtsy, mcannon, Eli-T, alexpott: Multilingual functionality - enable English and Spanish as part of Umami installation

merge-requests/1119/head
Gábor Hojtsy 2019-03-08 00:44:31 +01:00
parent 61a86b38a0
commit afbdd37f72
44 changed files with 154 additions and 6 deletions

View File

@ -17,6 +17,12 @@ function content_translation_install() {
// hook_module_implements_alter() is run among the last ones. // hook_module_implements_alter() is run among the last ones.
module_set_weight('content_translation', 10); module_set_weight('content_translation', 10);
// Skip the guidance messages about enabling translation features if the
// module was installed in the Drupal installation process.
if (drupal_installation_attempted()) {
return;
}
// Translation works when at least two languages are added. // Translation works when at least two languages are added.
if (count(\Drupal::languageManager()->getLanguages()) < 2) { if (count(\Drupal::languageManager()->getLanguages()) < 2) {
$t_args = [ $t_args = [

View File

@ -56,5 +56,12 @@ content:
size: 60 size: 60
placeholder: '' placeholder: ''
third_party_settings: { } third_party_settings: { }
langcode:
type: language_select
weight: 2
region: content
settings:
include_locked: true
third_party_settings: { }
hidden: hidden:
moderation_state: true moderation_state: true

View File

@ -28,5 +28,12 @@ content:
size: 60 size: 60
placeholder: '' placeholder: ''
third_party_settings: { } third_party_settings: { }
langcode:
type: language_select
weight: 2
region: content
settings:
include_locked: true
third_party_settings: { }
hidden: hidden:
moderation_state: true moderation_state: true

View File

@ -36,5 +36,12 @@ content:
size: 60 size: 60
placeholder: '' placeholder: ''
third_party_settings: { } third_party_settings: { }
langcode:
type: language_select
weight: 2
region: content
settings:
include_locked: true
third_party_settings: { }
hidden: hidden:
moderation_state: true moderation_state: true

View File

@ -56,5 +56,12 @@ content:
size: 60 size: 60
placeholder: '' placeholder: ''
third_party_settings: { } third_party_settings: { }
langcode:
type: language_select
weight: 2
region: content
settings:
include_locked: true
third_party_settings: { }
hidden: hidden:
moderation_state: true moderation_state: true

View File

@ -13,6 +13,13 @@ content:
region: content region: content
settings: { } settings: { }
third_party_settings: { } third_party_settings: { }
langcode:
type: language_select
weight: 2
region: content
settings:
include_locked: true
third_party_settings: { }
mail: mail:
weight: 1 weight: 1
region: content region: content

View File

@ -25,6 +25,13 @@ content:
third_party_settings: { } third_party_settings: { }
type: file_generic type: file_generic
region: content region: content
langcode:
type: language_select
weight: 2
region: content
settings:
include_locked: true
third_party_settings: { }
path: path:
type: path type: path
weight: 30 weight: 30

View File

@ -25,6 +25,13 @@ content:
type: file_generic type: file_generic
weight: 0 weight: 0
region: content region: content
langcode:
type: language_select
weight: 2
region: content
settings:
include_locked: true
third_party_settings: { }
path: path:
type: path type: path
weight: 4 weight: 4

View File

@ -27,6 +27,13 @@ content:
type: image_image type: image_image
weight: 0 weight: 0
region: content region: content
langcode:
type: language_select
weight: 2
region: content
settings:
include_locked: true
third_party_settings: { }
path: path:
type: path type: path
weight: 4 weight: 4

View File

@ -26,6 +26,13 @@ content:
placeholder: '' placeholder: ''
third_party_settings: { } third_party_settings: { }
region: content region: content
langcode:
type: language_select
weight: 2
region: content
settings:
include_locked: true
third_party_settings: { }
path: path:
type: path type: path
weight: 30 weight: 30

View File

@ -25,6 +25,13 @@ content:
third_party_settings: { } third_party_settings: { }
type: file_generic type: file_generic
region: content region: content
langcode:
type: language_select
weight: 2
region: content
settings:
include_locked: true
third_party_settings: { }
path: path:
type: path type: path
weight: 30 weight: 30

View File

@ -50,6 +50,13 @@ content:
size: 60 size: 60
placeholder: '' placeholder: ''
third_party_settings: { } third_party_settings: { }
langcode:
type: language_select
weight: 2
region: content
settings:
include_locked: true
third_party_settings: { }
moderation_state: moderation_state:
type: moderation_state_default type: moderation_state_default
weight: 10 weight: 10

View File

@ -29,6 +29,13 @@ content:
region: content region: content
settings: { } settings: { }
third_party_settings: { } third_party_settings: { }
langcode:
type: language_select
weight: 2
region: content
settings:
include_locked: true
third_party_settings: { }
moderation_state: moderation_state:
type: moderation_state_default type: moderation_state_default
weight: 8 weight: 8

View File

@ -108,6 +108,13 @@ content:
third_party_settings: { } third_party_settings: { }
type: entity_reference_autocomplete_tags type: entity_reference_autocomplete_tags
region: content region: content
langcode:
type: language_select
weight: 2
region: content
settings:
include_locked: true
third_party_settings: { }
moderation_state: moderation_state:
type: moderation_state_default type: moderation_state_default
weight: 18 weight: 18

View File

@ -32,4 +32,5 @@ content:
third_party_settings: { } third_party_settings: { }
weight: -1 weight: -1
region: content region: content
hidden: { } hidden:
langcode: true

View File

@ -52,4 +52,5 @@ content:
third_party_settings: { } third_party_settings: { }
type: string type: string
region: content region: content
hidden: { } hidden:
langcode: true

View File

@ -18,4 +18,5 @@ content:
region: content region: content
settings: { } settings: { }
third_party_settings: { } third_party_settings: { }
hidden: { } hidden:
langcode: true

View File

@ -26,4 +26,5 @@ content:
third_party_settings: { } third_party_settings: { }
type: text_default type: text_default
region: content region: content
hidden: { } hidden:
langcode: true

View File

@ -52,4 +52,5 @@ content:
third_party_settings: { } third_party_settings: { }
type: string type: string
region: content region: content
hidden: { } hidden:
langcode: true

View File

@ -24,6 +24,7 @@ content:
region: content region: content
hidden: hidden:
created: true created: true
langcode: true
name: true name: true
thumbnail: true thumbnail: true
uid: true uid: true

View File

@ -20,6 +20,7 @@ content:
region: content region: content
hidden: hidden:
created: true created: true
langcode: true
name: true name: true
thumbnail: true thumbnail: true
uid: true uid: true

View File

@ -22,6 +22,7 @@ content:
region: content region: content
hidden: hidden:
created: true created: true
langcode: true
name: true name: true
thumbnail: true thumbnail: true
uid: true uid: true

View File

@ -22,6 +22,7 @@ content:
region: content region: content
hidden: hidden:
created: true created: true
langcode: true
name: true name: true
thumbnail: true thumbnail: true
uid: true uid: true

View File

@ -27,6 +27,7 @@ content:
region: content region: content
hidden: hidden:
created: true created: true
langcode: true
name: true name: true
thumbnail: true thumbnail: true
uid: true uid: true

View File

@ -29,4 +29,5 @@ hidden:
body: true body: true
content_moderation_control: true content_moderation_control: true
field_tags: true field_tags: true
langcode: true
links: true links: true

View File

@ -29,4 +29,5 @@ hidden:
body: true body: true
content_moderation_control: true content_moderation_control: true
field_tags: true field_tags: true
langcode: true
links: true links: true

View File

@ -29,4 +29,5 @@ hidden:
body: true body: true
content_moderation_control: true content_moderation_control: true
field_tags: true field_tags: true
langcode: true
links: true links: true

View File

@ -47,3 +47,4 @@ content:
third_party_settings: { } third_party_settings: { }
hidden: hidden:
content_moderation_control: true content_moderation_control: true
langcode: true

View File

@ -48,3 +48,4 @@ content:
third_party_settings: { } third_party_settings: { }
hidden: hidden:
content_moderation_control: true content_moderation_control: true
langcode: true

View File

@ -22,3 +22,4 @@ hidden:
content_moderation_control: true content_moderation_control: true
field_image: true field_image: true
field_tags: true field_tags: true
langcode: true

View File

@ -49,3 +49,4 @@ content:
third_party_settings: { } third_party_settings: { }
hidden: hidden:
content_moderation_control: true content_moderation_control: true
langcode: true

View File

@ -24,3 +24,4 @@ content:
region: content region: content
hidden: hidden:
content_moderation_control: true content_moderation_control: true
langcode: true

View File

@ -26,3 +26,4 @@ content:
region: content region: content
hidden: hidden:
content_moderation_control: true content_moderation_control: true
langcode: true

View File

@ -50,4 +50,5 @@ hidden:
field_recipe_instruction: true field_recipe_instruction: true
field_summary: true field_summary: true
field_tags: true field_tags: true
langcode: true
links: true links: true

View File

@ -43,4 +43,5 @@ hidden:
field_recipe_instruction: true field_recipe_instruction: true
field_summary: true field_summary: true
field_tags: true field_tags: true
langcode: true
links: true links: true

View File

@ -43,4 +43,5 @@ hidden:
field_recipe_instruction: true field_recipe_instruction: true
field_summary: true field_summary: true
field_tags: true field_tags: true
langcode: true
links: true links: true

View File

@ -112,3 +112,4 @@ content:
third_party_settings: { } third_party_settings: { }
hidden: hidden:
content_moderation_control: true content_moderation_control: true
langcode: true

View File

@ -108,4 +108,5 @@ content:
region: content region: content
hidden: hidden:
content_moderation_control: true content_moderation_control: true
langcode: true
links: true links: true

View File

@ -36,3 +36,4 @@ hidden:
field_recipe_instruction: true field_recipe_instruction: true
field_summary: true field_summary: true
field_tags: true field_tags: true
langcode: true

View File

@ -23,4 +23,5 @@ content:
third_party_settings: { } third_party_settings: { }
label: hidden label: hidden
hidden: hidden:
langcode: true
member_for: true member_for: true

View File

@ -24,4 +24,5 @@ content:
image_link: content image_link: content
third_party_settings: { } third_party_settings: { }
label: hidden label: hidden
hidden: { } hidden:
langcode: true

View File

@ -0,0 +1,8 @@
langcode: en
status: true
dependencies: { }
id: es
label: Spanish
direction: ltr
weight: 1
locked: false

View File

@ -0,0 +1,11 @@
session:
parameter: language
url:
source: path_prefix
prefixes:
en: en
es: es
domains:
en: ''
es: ''
selected_langcode: site_default

View File

@ -42,7 +42,12 @@ install:
- responsive_image - responsive_image
- content_moderation - content_moderation
- workflows - workflows
- language
- locale
- config_translation
- content_translation
- demo_umami_tour - demo_umami_tour
themes: themes:
- seven - seven
- umami - umami
keep_english: true