From e9229cb162fe8393e13e8a4a7b002dbcae91fa3b Mon Sep 17 00:00:00 2001
From: 4gray <4gray@users.noreply.github.com>
Date: Sat, 11 Feb 2023 10:47:13 +0100
Subject: [PATCH] refactor(settings): extract hardcoded text to i18n string
this commit is related to GUI translation issues #226
---
src/app/settings/settings.component.html | 19 +++++++++----------
src/assets/i18n/en.json | 11 +++++++++--
2 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/src/app/settings/settings.component.html b/src/app/settings/settings.component.html
index 6f5d0a54c..5561ffbad 100644
--- a/src/app/settings/settings.component.html
+++ b/src/app/settings/settings.component.html
@@ -68,7 +68,7 @@
{{ 'SETTINGS.VIDEO_PLAYER_LABEL' | translate }}
-
Select default video player
+
{{ 'SETTINGS.VIDEO_PLAYER_DESCRIPTION' | translate }}
@@ -93,7 +93,7 @@
{{ 'SETTINGS.LANGUAGE' | translate }}
-
Select language of the application
+
{{ 'SETTINGS.LANGUAGE_DESCRIPTION' | translate }}
@@ -120,7 +120,7 @@
{{ 'SETTINGS.THEME' | translate }}
-
Select visual theme of the application
+
{{ 'SETTINGS.THEME_DESCRIPTION' | translate }}
@@ -147,7 +147,7 @@
{{ 'SETTINGS.SHOW_CAPTIONS' | translate }}
-
Show or hide subtitles by default
+
{{ 'SETTINGS.SHOW_CAPTIONS_DESCRIPTION' | translate }}
{{ 'SETTINGS.VERSION' | translate }}
-
Current version of the application
+
{{ 'SETTINGS.VERSION_DESCRIPTION' | translate }}
{{ version }}
@@ -169,11 +169,10 @@
diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json
index 0ec570891..da593a328 100644
--- a/src/assets/i18n/en.json
+++ b/src/assets/i18n/en.json
@@ -62,7 +62,7 @@
"SETTINGS": {
"TITLE": "Settings / IPTVnator",
"SUBTITLE": "Change the configuration of the application",
- "DESCRIPTION": "Please adapt the options from the list below and confirm with a save button",
+ "DESCRIPTION": "Please adapt the options from the list below and confirm with the save changes button",
"EPG_URL_LABEL": "EPG Url (*.xml or *.xml.gz)",
"EPG_URL_PLACEHOLDER": "Enter an URL",
"REFRESH_EPG": "Refresh EPG",
@@ -78,7 +78,14 @@
"THEME": "Visual theme",
"SHOW_CAPTIONS": "Show subtitles",
"ADD_EPG_SOURCE": "Add EPG source",
- "EPG_URL_ERROR": "The value is not a valid URL"
+ "EPG_URL_ERROR": "The value is not a valid URL",
+ "VIDEO_PLAYER_DESCRIPTION": "Select default video player",
+ "LANGUAGE_DESCRIPTION": "Select language of the application",
+ "THEME_DESCRIPTION": "Select visual theme of the application",
+ "SHOW_CAPTIONS_DESCRIPTION": "Show or hide subtitles by default",
+ "VERSION_DESCRIPTION": "Current version of the application",
+ "EPG_NOTE": "Currently EPG is available only in the electron-based version of IPTVnator.",
+ "EPG_NOTE_URL_TEXT": "Check it here"
},
"THEMES": {
"DARK_THEME": "Dark theme",