Skip to content

Instantly share code, notes, and snippets.

@fmfpereira
Last active September 17, 2019 08:28
Show Gist options
  • Save fmfpereira/ab278ed35363814f71a58c5d0c113d54 to your computer and use it in GitHub Desktop.
Save fmfpereira/ab278ed35363814f71a58c5d0c113d54 to your computer and use it in GitHub Desktop.
Update TFA help text to be translatable and allow to translate settings
diff --git a/config/schema/tfa.schema.yml b/config/schema/tfa.schema.yml
index 0b52d63..483335a 100644
--- a/config/schema/tfa.schema.yml
+++ b/config/schema/tfa.schema.yml
@@ -62,7 +62,7 @@ tfa.settings:
type: integer
label: 'TFA Flood Threshold'
help_text:
- type: string
+ type: label
label: 'Text to display on help page. Plain text only.'
mail:
type: config_object
diff --git a/tfa.config_translation.yml b/tfa.config_translation.yml
new file mode 100644
index 0000000..7d4c4e3
--- /dev/null
+++ b/tfa.config_translation.yml
@@ -0,0 +1,5 @@
+tfa.settings:
+ title: 'TFA Settings'
+ base_route_name: tfa.settings
+ names:
+ - tfa.settings
diff --git a/tfa.links.task.yml b/tfa.links.task.yml
index 0671215..e8e6915 100644
--- a/tfa.links.task.yml
+++ b/tfa.links.task.yml
@@ -3,3 +3,8 @@ tfa.overview:
base_route: entity.user.canonical
weight: 9
title: 'Security'
+
+tfa.settings:
+ route_name: tfa.settings
+ title: 'TFA Settings'
+ base_route: tfa.settings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment