diff --git a/app/app.js b/app/app.js index b6416366d..8703d09c7 100644 --- a/app/app.js +++ b/app/app.js @@ -100,13 +100,14 @@ angular.module('portainer', [ 'outsideClick': 'outsideClick' }); - $translateProvider.useSanitizeValueStrategy('sanitize'); + $translateProvider.useSanitizeValueStrategy('sanitizeParameters'); $translateProvider .useStaticFilesLoader({ 'prefix': 'i18n/', 'suffix': '.json' }); $translateProvider.preferredLanguage('en'); + $translateProvider.fallbackLanguage('en'); $stateProvider .state('root', { diff --git a/app/components/templates/templates.html b/app/components/templates/templates.html index 4d2e0dd71..f052fefdd 100644 --- a/app/components/templates/templates.html +++ b/app/components/templates/templates.html @@ -1,11 +1,13 @@ - - + + - Templates + + +
@@ -14,7 +16,9 @@
- +
@@ -23,7 +27,7 @@
- Information +
@@ -33,11 +37,13 @@
- Configuration +
- +
@@ -45,10 +51,11 @@
- +
@@ -58,10 +65,14 @@
@@ -73,10 +84,10 @@ @@ -84,13 +95,15 @@
- + - map additional port +
- Portainer will automatically assign a port if you leave the host port empty. +
@@ -99,7 +112,7 @@
- host +
@@ -108,7 +121,7 @@
- container +
@@ -131,13 +144,15 @@
- + - map additional volume +
- Portainer will automatically create and map a local volume when using the auto option. +
@@ -145,16 +160,16 @@
- container +
- - - + + +
+ - - When using Swarm, we recommend deploying containers in a shared network. Looks like you don't have any shared network, head over the networks view to create one. + + - App templates cannot be deployed as Swarm Mode services for the moment. You can still use them to quickly deploy containers on the Docker host. + + + {{ state.formValidationError }}
@@ -223,9 +240,9 @@
- Category +
@@ -235,15 +252,15 @@
@@ -288,10 +305,10 @@
- Loading... +
- No templates available. +
diff --git a/app/directives/translation/por-translation.js b/app/directives/translation/por-translation.js index 8df162747..84f1fb229 100644 --- a/app/directives/translation/por-translation.js +++ b/app/directives/translation/por-translation.js @@ -1,6 +1,7 @@ angular.module('portainer').component('porTranslation', { bindings: { - 'key': '@' + 'key': '@', + 'compile': '@' }, - template: '{{ $ctrl.key }}' + template: '{{ $ctrl.key }}' }); diff --git a/assets/i18n/en.json b/assets/i18n/en.json index f49fde244..3ffb1d3e3 100644 --- a/assets/i18n/en.json +++ b/assets/i18n/en.json @@ -1,4 +1,20 @@ { + "COMMON": { + "VERBS": { + "CREATE": "Create", + "REFRESH": "Refresh", + "HIDE": "Hide" + }, + "DOCKER": { + "CONTAINER": "container", + "VOLUME": "volume", + "HOST": "host", + }, + "UI": { + "LOADING": "Loading...", + "ALL": "All" + } + }, "WIDGETS": { "HEADER_CONTENT": { "USER_PREFERENCES": "my account", @@ -37,6 +53,60 @@ } } }, + "TEMPLATES": { + "HEADER": { + "TITLE": "Application templates list", + "CONTENT": "Templates" + }, + "SELECTED_TEMPLATE": { + "TITLE_INFORMATION": "Information", + "TITLE_CONFIGURATION": "Configuration", + "FORM": { + "NAME": "Name", + "NETWORK": "Network", + "SELECT_CONTAINER": "Select a container", + "SHOW_ADVANCED_OPTIONS": "Show advanced options", + "HIDE_ADVANCED_OPTIONS": "Hide advanced options", + "ADVANCED_OPTIONS": { + "PORT_MAPPING": { + "LABEL": "Port mapping", + "MAP_PORT": "map additional port", + "NOTE": "Portainer will automatically assign a port if you leave the host port empty.", + "HOST": "host" + }, + "VOLUME_MAPPING": { + "LABEL": "Volume mapping", + "MAP_VOLUME": "map additional volume", + "NOTE": "Portainer will automatically create and map a local volume when using the auto option.", + "TYPE": { + "AUTO": "Auto", + "VOLUME": "Volume", + "BIND": "Bind" + }, + "SELECT_VOLUME": "Select a volume", + "WRITABLE": "Writable", + "READONLY": "Read-only" + } + }, + "ACTIONS": { + "SWARM_NOTE_NETWORK": "When using Swarm, we recommend deploying containers in a shared network. Looks like you don't have any shared network, head over the networks view to create one.", + "SWARM_NOTE_STACK": "App templates cannot be deployed as Swarm Mode services for the moment. You can still use them to quickly deploy containers on the Docker host." + } + } + }, + "WIDGET_TEMPLATE_LIST": { + "HEADER": { + "CATEGORY": "Category", + "PLATFORM_FILTERS": { + "WINDOWS": "Windows", + "LINUX": "Linux" + } + }, + "LIST": { + "EMPTY": "No templates available." + } + } + }, "DASHBOARD": { "HEADER": { "TITLE": "Home", diff --git a/assets/i18n/fr.json b/assets/i18n/fr.json index 7546b5622..3c26cd924 100644 --- a/assets/i18n/fr.json +++ b/assets/i18n/fr.json @@ -1,4 +1,20 @@ { + "COMMON": { + "VERBS": { + "CREATE": "Créer", + "REFRESH": "Rafraîchir", + "HIDE": "Cacher" + }, + "DOCKER": { + "CONTAINER": "conteneur", + "VOLUME": "volume", + "HOST": "hôte" + }, + "UI": { + "LOADING": "Chargement...", + "ALL": "Tous" + } + }, "WIDGETS": { "HEADER_CONTENT": { "USER_PREFERENCES": "mon compte", @@ -37,6 +53,59 @@ } } }, + "TEMPLATES": { + "HEADER": { + "TITLE": "Liste de templates applicatifs", + "CONTENT": "Templates" + }, + "SELECTED_TEMPLATE": { + "TITLE_INFORMATION": "Information", + "TITLE_CONFIGURATION": "Configuration", + "FORM": { + "NAME": "Nom", + "NETWORK": "Réseau", + "SELECT_CONTAINER": "Choisir un conteneur", + "SHOW_ADVANCED_OPTIONS": "Afficher les options avancées", + "HIDE_ADVANCED_OPTIONS": "Cacher les options avancées", + "ADVANCED_OPTIONS": { + "PORT_MAPPING": { + "LABEL": "Associer port", + "MAP_PORT": "associer un port supplémentaire", + "NOTE": "Portainer va automatiquement assigner un port quand le port hôte est vide." + }, + "VOLUME_MAPPING": { + "LABEL": "Associer volume", + "MAP_VOLUME": "associer un volume supplémentaire", + "NOTE": "Portainer va automatiquement créer et associer un volume local quand l'option auto est sélectionnée.", + "TYPE": { + "AUTO": "Auto", + "VOLUME": "Volume", + "BIND": "Bind" + }, + "SELECT_VOLUME": "Choisir un volume", + "WRITABLE": "Ecriture", + "READONLY": "Lecture seule" + } + }, + "ACTIONS": { + "SWARM_NOTE_NETWORK": "Vous utilisez Swarm, nous recommandons le deployment de vos conteneurs dans un réseau partagé. Vous pouvez en créer un dans la vue réseaux.", + "SWARM_NOTE_STACK": "Les App Templates ne peuvent pas être déployés en tant que services Swarm pour le moment. Vous pouvez toujours les utiliser pour déployer des conteneurs sur cet hôte." + } + } + }, + "WIDGET_TEMPLATE_LIST": { + "HEADER": { + "CATEGORY": "Catégorie", + "PLATFORM_FILTERS": { + "WINDOWS": "Windows", + "LINUX": "Linux" + } + }, + "LIST": { + "EMPTY": "Aucun template disponible." + } + } + }, "DASHBOARD": { "HEADER": { "TITLE": "Accueil",