From 214cf527d43b7e4027d67c80204e82e691b04668 Mon Sep 17 00:00:00 2001 From: Florian Scholdei Date: Wed, 16 Dec 2020 11:24:13 +0100 Subject: [PATCH] Feature/harmonize translation keys (#1478) Harmonize translation keys Co-authored-by: Eduard Heimbuch --- docs/de/user/profile/index.md | 2 +- .../main/resources/locales/en/plugins.json | 16 ++-- .../main/resources/locales/en/plugins.json | 10 +-- .../main/resources/locales/en/plugins.json | 2 +- .../ui-webapp/public/locales/de/config.json | 39 ++++---- scm-ui/ui-webapp/public/locales/de/repos.json | 3 +- scm-ui/ui-webapp/public/locales/de/users.json | 2 +- scm-ui/ui-webapp/public/locales/en/admin.json | 20 ++--- .../ui-webapp/public/locales/en/commons.json | 10 +-- .../ui-webapp/public/locales/en/config.json | 39 ++++---- .../ui-webapp/public/locales/en/groups.json | 2 +- .../public/locales/en/permissions.json | 2 +- scm-ui/ui-webapp/public/locales/en/repos.json | 60 ++++++------- scm-ui/ui-webapp/public/locales/en/users.json | 18 ++-- .../ui-webapp/public/locales/es/config.json | 39 ++++---- scm-ui/ui-webapp/public/locales/es/repos.json | 3 +- .../admin/components/form/ProxySettings.tsx | 31 +++---- .../components/table/ProxyExcludesTable.tsx | 6 +- .../components/PermissionsTable.tsx | 89 +++++++++++++++++++ .../permissions/containers/Permissions.tsx | 40 +-------- 20 files changed, 251 insertions(+), 182 deletions(-) create mode 100644 scm-ui/ui-webapp/src/repos/permissions/components/PermissionsTable.tsx diff --git a/docs/de/user/profile/index.md b/docs/de/user/profile/index.md index 29018292d1..dd507a5a7e 100644 --- a/docs/de/user/profile/index.md +++ b/docs/de/user/profile/index.md @@ -13,7 +13,7 @@ eingegeben werden. Danach muss das neue Passwort zweimal eingegeben werden. ## Öffentliche Schlüssel -Zum Prüfen von Signaturen für z. B. Commits können hier die entsprechenden öffentlichen GPG Schlüssel hinterlegt werden. +Zum Prüfen von Signaturen für z. B. Commits können hier die entsprechenden öffentlichen GPG-Schlüssel hinterlegt werden. Zudem können hier die vom SCM-Manager erstellten Signaturschlüssel heruntergeladen werden. ## API Schlüssel diff --git a/scm-plugins/scm-git-plugin/src/main/resources/locales/en/plugins.json b/scm-plugins/scm-git-plugin/src/main/resources/locales/en/plugins.json index f894d1dbf6..432f0e6608 100644 --- a/scm-plugins/scm-git-plugin/src/main/resources/locales/en/plugins.json +++ b/scm-plugins/scm-git-plugin/src/main/resources/locales/en/plugins.json @@ -1,14 +1,14 @@ { "scm-git-plugin": { "information": { - "clone": "Clone the repository", - "create": "Create a new repository", - "replace": "Push an existing repository", - "fetch": "Get remote changes", - "checkout": "Switch branch", - "checkoutTag": "Checkout tag as new branch", + "clone": "Clone the Repository", + "create": "Create a New Repository", + "replace": "Push an Existing Repository", + "fetch": "Get Remote Changes", + "checkout": "Switch Branch", + "checkoutTag": "Checkout Tag as New Branch", "merge": { - "heading": "How to merge source branch into target branch", + "heading": "How to Merge Source Branch into Target Branch", "checkout": "1. Make sure your workspace is clean and checkout target branch", "update": "2. Update workspace", "merge": "3. Merge source branch", @@ -34,7 +34,7 @@ "repo-config": { "link": "Configuration", "title": "Git Settings", - "default-branch": "Default branch", + "default-branch": "Default Branch", "submit": "Submit", "error": { "title": "Error", diff --git a/scm-plugins/scm-hg-plugin/src/main/resources/locales/en/plugins.json b/scm-plugins/scm-hg-plugin/src/main/resources/locales/en/plugins.json index 9082862174..ed488876d5 100644 --- a/scm-plugins/scm-hg-plugin/src/main/resources/locales/en/plugins.json +++ b/scm-plugins/scm-hg-plugin/src/main/resources/locales/en/plugins.json @@ -2,11 +2,11 @@ "scm-hg-plugin": { "information": { "clone" : "Clone the repository", - "create" : "Create a new repository", - "replace" : "Push an existing repository", - "fetch": "Get remote changes", - "checkout": "Switch branch", - "checkoutTag": "Checkout tag" + "create" : "Create a New Repository", + "replace" : "Push an Existing Repository", + "fetch": "Get Remote Changes", + "checkout": "Switch Branch", + "checkoutTag": "Checkout Tag" }, "config": { "link": "Mercurial", diff --git a/scm-plugins/scm-svn-plugin/src/main/resources/locales/en/plugins.json b/scm-plugins/scm-svn-plugin/src/main/resources/locales/en/plugins.json index 0d487e1f3d..e1421ad1dd 100644 --- a/scm-plugins/scm-svn-plugin/src/main/resources/locales/en/plugins.json +++ b/scm-plugins/scm-svn-plugin/src/main/resources/locales/en/plugins.json @@ -1,7 +1,7 @@ { "scm-svn-plugin": { "information": { - "checkout": "Checkout repository" + "checkout": "Checkout Repository" }, "config": { "link": "Subversion", diff --git a/scm-ui/ui-webapp/public/locales/de/config.json b/scm-ui/ui-webapp/public/locales/de/config.json index 04cf9ff4c1..9a167dbec2 100644 --- a/scm-ui/ui-webapp/public/locales/de/config.json +++ b/scm-ui/ui-webapp/public/locales/de/config.json @@ -11,18 +11,27 @@ "no-write-permission-notification": "Hinweis: Es fehlen Berechtigungen zum Bearbeiten der Einstellungen!" } }, - "proxy-settings": { - "name": "Proxy Einstellungen", - "proxy-password": "Proxy Passwort", - "proxy-port": "Proxy Port", - "proxy-server": "Proxy Server", - "proxy-user": "Proxy Benutzer", - "enable-proxy": "Proxy aktivieren", - "proxy-excludes": "Proxy Excludes", - "remove-proxy-exclude-button": "Proxy Exclude löschen", - "add-proxy-exclude-error": "Der Proxy Exclude ist ungültig", - "add-proxy-exclude-textfield": "Neue Proxy Excludes hinzufügen", - "add-proxy-exclude-button": "Proxy Exclude hinzufügen" + "proxySettings": { + "subtitle": "Proxy Einstellungen", + "enable": "Proxy aktivieren", + "enableHelpText": "Proxy aktivieren", + "password": "Proxy Passwort", + "passwordHelpText": "Das Passwort für die Proxy Server Anmeldung.", + "port": "Proxy Port", + "portHelpText": "Der Proxy Port", + "server": "Proxy Server", + "serverHelpText": "Der Proxy Server", + "user": "Proxy Benutzer", + "userHelpText": "Der Benutzername für die Proxy Server Anmeldung.", + "noExcludes": "Es wurden keine Proxy Excludes gefunden.", + "excludesTable": { + "label": "Proxy Excludes", + "helpText": "Glob patterns für Hostnamen, die von den Proxy-Einstellungen ausgeschlossen werden sollen.", + "deleteButton": "Proxy Exclude löschen" + }, + "addExclude": "Neue Proxy Excludes hinzufügen", + "addExcludeButton": "Proxy Exclude hinzufügen", + "addExcludeError": "Der Proxy Exclude ist ungültig" }, "base-url-settings": { "name": "Base URL Einstellungen", @@ -75,12 +84,6 @@ "baseUrlHelpText": "Die URL der Applikation mit Kontextpfad, z.B. http://localhost:8080/scm", "loginAttemptLimitHelpText": "Maximale Anzahl von Anmeldeversuchen. Durch Verwendung von -1 wird die Begrenzung der Anmeldeversuche deaktiviert.", "loginAttemptLimitTimeoutHelpText": "Timeout in Sekunden für Benutzer, die vorübergehend wegen zu vieler fehlgeschlagener Anmeldeversuche, deaktiviert wurden.", - "enableProxyHelpText": "Proxy aktivieren", - "proxyPortHelpText": "Der Proxy Port", - "proxyPasswordHelpText": "Das Passwort für die Proxy Server Anmeldung.", - "proxyServerHelpText": "Der Proxy Server", - "proxyUserHelpText": "Der Benutzername für die Proxy Server Anmeldung.", - "proxyExcludesHelpText": "Glob patterns für Hostnamen, die von den Proxy-Einstellungen ausgeschlossen werden sollen.", "enableXsrfProtectionHelpText": "Xsrf Cookie Protection aktivieren. Hinweis: Dieses Feature befindet sich noch im Experimentalstatus.", "enabledUserConverterHelpText": "Benutzer Konverter aktivieren. Interne Benutzer werden beim Einloggen über ein Fremdsystem zu externen Benutzern konvertiert.", "nameSpaceStrategyHelpText": "Strategie für Namespaces.", diff --git a/scm-ui/ui-webapp/public/locales/de/repos.json b/scm-ui/ui-webapp/public/locales/de/repos.json index b7a182f4d3..7234d52c40 100644 --- a/scm-ui/ui-webapp/public/locales/de/repos.json +++ b/scm-ui/ui-webapp/public/locales/de/repos.json @@ -278,7 +278,8 @@ "moreFilesAvailable": "Es werden nur die ersten {{count}} Dateien angezeigt. Es sind weitere Dateien vorhanden." }, "permission": { - "title": "Berechtigungen bearbeiten", + "title": "Berechtigungen", + "noPermissions": "Keine Berechtigungen gefunden.", "user": "Benutzer", "group": "Gruppe", "error-title": "Fehler", diff --git a/scm-ui/ui-webapp/public/locales/de/users.json b/scm-ui/ui-webapp/public/locales/de/users.json index cb2a599aac..9925209635 100644 --- a/scm-ui/ui-webapp/public/locales/de/users.json +++ b/scm-ui/ui-webapp/public/locales/de/users.json @@ -80,7 +80,7 @@ }, "publicKey": { "subtitle": "Öffentliche Schlüssel", - "description": "Zum Prüfen von Signaturen für z. B. Commits können hier die entsprechenden öffentlichen GPG Schlüssel hinterlegt werden. Zudem können hier die vom SCM-Manager erstellten Signaturschlüssel heruntergeladen werden.", + "description": "Zum Prüfen von Signaturen für z. B. Commits können hier die entsprechenden öffentlichen GPG-Schlüssel hinterlegt werden. Zudem können hier die vom SCM-Manager erstellten Signaturschlüssel heruntergeladen werden.", "noStoredKeys": "Es wurden keine Schlüssel gefunden.", "displayName": "Anzeigename", "created": "Eingetragen an", diff --git a/scm-ui/ui-webapp/public/locales/en/admin.json b/scm-ui/ui-webapp/public/locales/en/admin.json index dfce59e70a..6261b51ade 100644 --- a/scm-ui/ui-webapp/public/locales/en/admin.json +++ b/scm-ui/ui-webapp/public/locales/en/admin.json @@ -9,16 +9,16 @@ "info": { "title": "Administration", "currentAppVersion": "Current Application Version", - "newAppVersion": "New SCM-Manager version available", + "newAppVersion": "New SCM-Manager Version Available", "newRelease": { - "title": "New SCM-Manager version available", + "title": "New SCM-Manager Version Available", "description": "Download the latest SCM-Manager version {{version}} from the official homepage.", - "downloadButton": "Get latest version" + "downloadButton": "Get Latest Version" }, "communityTitle": "Community Support", "communityIconAlt": "Community Support Icon", "communityInfo": "Contact the SCM-Manager support team for questions about SCM-Manager, to report bugs or to request features through the official channels.", - "communityButton": "Contact our Team", + "communityButton": "Contact Our Team", "enterpriseTitle": "Enterprise Support", "enterpriseIconAlt": "Enterprise Support Icon", "enterpriseInfo": "You require support with the integration of SCM-Manager into your processes, with the customization of the tool or simply a service level agreement (SLA)?", @@ -36,12 +36,12 @@ "installedNavLink": "Installed", "availableNavLink": "Available" }, - "showPending": "Show changes", - "executePending": "Execute changes", - "outdatedPlugins": "Update {{count}} plugin", - "outdatedPlugins_plural": "Update {{count}} plugins", - "updateAll": "Update all plugins", - "cancelPending": "Cancel changes", + "showPending": "Show Changes", + "executePending": "Execute Changes", + "outdatedPlugins": "Update {{count}} Plugin", + "outdatedPlugins_plural": "Update {{count}} Plugins", + "updateAll": "Update All Plugins", + "cancelPending": "Cancel Changes", "noPlugins": "No plugins found.", "modal": { "title": { diff --git a/scm-ui/ui-webapp/public/locales/en/commons.json b/scm-ui/ui-webapp/public/locales/en/commons.json index 9ed828035f..a1f7aef481 100644 --- a/scm-ui/ui-webapp/public/locales/en/commons.json +++ b/scm-ui/ui-webapp/public/locales/en/commons.json @@ -14,7 +14,7 @@ }, "logout": { "error": { - "title": "Logout failed", + "title": "Logout Failed", "subtitle": "Something went wrong during logout" } }, @@ -87,10 +87,10 @@ }, "password": { "label": "Password", - "newPassword": "New password", - "currentPassword": "Current password", + "newPassword": "New Password", + "currentPassword": "Current Password", "currentPasswordHelpText": "The password currently in use", - "confirmPassword": "Confirm password", + "confirmPassword": "Confirm Password", "passwordInvalid": "Password has to be between 6 and 32 characters", "passwordConfirmFailed": "Passwords have to be identical", "submit": "Submit", @@ -113,6 +113,6 @@ "lastDivider": "and" }, "fileUpload": { - "label": "Upload file" + "label": "Upload File" } } diff --git a/scm-ui/ui-webapp/public/locales/en/config.json b/scm-ui/ui-webapp/public/locales/en/config.json index 9b332a2013..394312e049 100644 --- a/scm-ui/ui-webapp/public/locales/en/config.json +++ b/scm-ui/ui-webapp/public/locales/en/config.json @@ -11,18 +11,27 @@ "no-write-permission-notification": "Please note: You do not have the permission to edit the config!" } }, - "proxy-settings": { - "name": "Proxy Settings", - "proxy-password": "Proxy Password", - "proxy-port": "Proxy Port", - "proxy-server": "Proxy Server", - "proxy-user": "Proxy User", - "enable-proxy": "Enable Proxy", - "proxy-excludes": "Proxy Excludes", - "remove-proxy-exclude-button": "Remove Proxy Exclude", - "add-proxy-exclude-error": "The proxy exclude you want to add is not valid", - "add-proxy-exclude-textfield": "Add proxy exclude you want to add to proxy excludes here", - "add-proxy-exclude-button": "Add Proxy Exclude" + "proxySettings": { + "subtitle": "Proxy Settings", + "enable": "Enable Proxy", + "enableHelpText": "Enable Proxy", + "password": "Proxy Password", + "passwordHelpText": "The password for the proxy server authentication.", + "port": "Port", + "portHelpText": "The proxy port", + "server": "Proxy Server", + "serverHelpText": "The proxy server", + "user": "Proxy User", + "userHelpText": "The username for the proxy server authentication.", + "noExcludes": "No proxy excludes found.", + "excludesTable": { + "label": "Proxy Excludes", + "helpText": "Glob patterns for hostnames, which should be excluded from proxy settings.", + "deleteButton": "Remove Proxy Exclude" + }, + "addExclude": "Add Proxy Exclude", + "addExcludeButton": "Add Proxy Exclude", + "addExcludeError": "The proxy exclude you want to add is not valid." }, "base-url-settings": { "name": "Base URL Settings", @@ -75,12 +84,6 @@ "baseUrlHelpText": "The url of the application (with context path), i.e. http://localhost:8080/scm", "loginAttemptLimitHelpText": "Maximum allowed login attempts. Use -1 to disable the login attempt limit.", "loginAttemptLimitTimeoutHelpText": "Timeout in seconds for users which are temporary disabled, because of too many failed login attempts.", - "enableProxyHelpText": "Enable Proxy", - "proxyPortHelpText": "The proxy port", - "proxyPasswordHelpText": "The password for the proxy server authentication.", - "proxyServerHelpText": "The proxy server", - "proxyUserHelpText": "The username for the proxy server authentication.", - "proxyExcludesHelpText": "Glob patterns for hostnames, which should be excluded from proxy settings.", "enableXsrfProtectionHelpText": "Enable XSRF Cookie Protection. Note: This feature is still experimental.", "enabledUserConverterHelpText": "Enable User Converter. Internal users will automatically be converted to external on their first login using an external system.", "nameSpaceStrategyHelpText": "The namespace strategy.", diff --git a/scm-ui/ui-webapp/public/locales/en/groups.json b/scm-ui/ui-webapp/public/locales/en/groups.json index 944d271071..51b421deb4 100644 --- a/scm-ui/ui-webapp/public/locales/en/groups.json +++ b/scm-ui/ui-webapp/public/locales/en/groups.json @@ -51,7 +51,7 @@ }, "groupForm": { "subtitle": "Edit Group", - "externalSubtitle": "Edit external group", + "externalSubtitle": "Edit External Group", "submit": "Submit", "nameError": "Group name is invalid", "descriptionError": "Description is invalid", diff --git a/scm-ui/ui-webapp/public/locales/en/permissions.json b/scm-ui/ui-webapp/public/locales/en/permissions.json index 9c3663e77b..32c7157a51 100644 --- a/scm-ui/ui-webapp/public/locales/en/permissions.json +++ b/scm-ui/ui-webapp/public/locales/en/permissions.json @@ -1,6 +1,6 @@ { "setPermissions": { - "button": "Set permissions", + "button": "Set Permissions", "setPermissionsSuccessful": "Permissions set successfully" } } diff --git a/scm-ui/ui-webapp/public/locales/en/repos.json b/scm-ui/ui-webapp/public/locales/en/repos.json index ecfe7ba46c..6946c1b832 100644 --- a/scm-ui/ui-webapp/public/locales/en/repos.json +++ b/scm-ui/ui-webapp/public/locales/en/repos.json @@ -60,12 +60,11 @@ }, "create": { "title": "Add Repository", - "subtitle": "Create a new repository", - "createButton": "Create new repository" + "subtitle": "Create a new repository" }, "import": { "subtitle": "Import existing repository", - "importUrl": "Remote repository url", + "importUrl": "Remote Repository Url", "username": "Username", "password": "Password", "compressed": { @@ -73,7 +72,7 @@ "helpText": "Check if your dump file is compressed." }, "bundle": { - "title": "Select your dump file", + "title": "Dump File", "helpText": "Select your dump file from which the repository should be imported." }, "pending": { @@ -94,7 +93,7 @@ }, "branches": { "overview": { - "title": "Overview of all branches", + "title": "Overview of All Branches", "noBranches": "No branches found.", "createButton": "Create Branch", "lastCommit": "Last commit" @@ -118,13 +117,13 @@ "commits": "Commits", "sources": "Sources", "defaultTag": "Default", - "dangerZone": "Delete branch", + "dangerZone": "Delete Branch", "delete": { - "button": "Delete branch", - "subtitle": "Delete branch", + "button": "Delete Branch", + "subtitle": "Delete Branch", "description": "Deleted branches cannot be restored.", "confirmAlert": { - "title": "Delete branch", + "title": "Delete Branch", "message": "Do you really want to delete the branch \"{{branch}}\"?", "cancel": "No", "submit": "Yes" @@ -133,7 +132,7 @@ }, "tags": { "overview": { - "title": "Overview of all tags", + "title": "Overview of All Tags", "noTags": "No tags found.", "created": "Created" }, @@ -152,7 +151,7 @@ } } }, - "title": "Create a new tag", + "title": "Create a New Tag", "hint": "The tag will be automatically signed with your default key by the SCM-Manager.", "confirm": "Create Tag", "cancel": "Cancel" @@ -162,13 +161,13 @@ "name": "Name", "commit": "Commit", "sources": "Sources", - "dangerZone": "Delete tag", + "dangerZone": "Delete Tag", "delete": { - "button": "Delete tag", - "subtitle": "Delete tag", + "button": "Delete Tag", + "subtitle": "Delete Tag", "description": "Deleted tag can not be restored.", "confirmAlert": { - "title": "Delete tag", + "title": "Delete Tag", "message": "Do you really want to delete the tag \"{{tag}}\"?", "cancel": "No", "submit": "Yes" @@ -238,16 +237,16 @@ "subtitle": "Edit Repository", "submitCreate": "Save", "submitImport": "Import", - "initializeRepository": "Initialize repository", - "dangerZone": "Rename, archive and delete", + "initializeRepository": "Initialize Repository", + "dangerZone": "Rename, Archive and Delete", "createButton": "Create Repository", - "importButton": "Import repository" + "importButton": "Import Repository" }, "sources": { "fileTree": { "name": "Name", "length": "Length", - "commitDate": "Commit date", + "commitDate": "Commit Date", "description": "Description", "notYetComputed": "Not yet computed, will be updated in a short while", "computationAborted": "The computation took too long and was aborted", @@ -266,7 +265,7 @@ }, "path": "Path", "branch": "Branch", - "commitDate": "Commit date", + "commitDate": "Commit Date", "description": "Description", "size": "Size", "copyPermalink": "Copy Permalink to Clipboard" @@ -279,12 +278,13 @@ "moreFilesAvailable": "These are just the first {{count}} files. There are more files available." }, "permission": { - "title": "Edit Permissions", + "title": "Permissions", + "noPermissions": "No permissions found.", "user": "User", "group": "Group", "error-title": "Error", "error-subtitle": "Unknown permissions error", - "name": "User or group", + "name": "User or Group", "role": "Role", "custom": "CUSTOM", "permissions": "Permissions", @@ -300,14 +300,14 @@ "delete-permission-button": { "label": "Delete", "confirm-alert": { - "title": "Delete permission", + "title": "Delete Permission", "message": "Do you really want to delete the permission?", "submit": "Yes", "cancel": "No" } }, "add-permission": { - "add-permission-heading": "Add new Permission", + "add-permission-heading": "Add New Permission", "submit-button": "Submit", "name-input-invalid": "Permission is not allowed to be empty! If it is not empty, your input name is invalid or it already exists!" }, @@ -327,10 +327,10 @@ }, "deleteRepo": { "button": "Delete Repository", - "subtitle": "Delete repository", + "subtitle": "Delete Repository", "description": "Deleted repositories can not be restored.", "confirmAlert": { - "title": "Delete repository", + "title": "Delete Repository", "message": "Do you really want to delete the repository?", "submit": "Yes", "cancel": "No" @@ -338,14 +338,14 @@ }, "renameRepo": { "button": "Rename Repository", - "subtitle": "Renames this repository", + "subtitle": "Rename this Repository", "description1": "The repository can only be accessed by its new name.", "description2": "Namespace Permissions must be set again if the namespace is changed.", "modal": { - "title": "Rename repository", + "title": "Rename Repository", "label": { - "repoName": "Repository name", - "repoNamespace": "Repository namespace" + "repoName": "Repository Name", + "repoNamespace": "Repository Namespace" }, "button": { "rename": "Rename", diff --git a/scm-ui/ui-webapp/public/locales/en/users.json b/scm-ui/ui-webapp/public/locales/en/users.json index eb145f440e..9feb0753a6 100644 --- a/scm-ui/ui-webapp/public/locales/en/users.json +++ b/scm-ui/ui-webapp/public/locales/en/users.json @@ -70,12 +70,12 @@ "userIsExternal": "This user is managed by an external system", "button": { "submit": "Submit", - "convertToExternal": "Convert user to external", - "convertToInternal": "Convert user to internal" + "convertToExternal": "Convert User to External", + "convertToInternal": "Convert User to Internal" }, "modal": { - "passwordRequired": "Set new password for internal user", - "convertToInternal": "Convert to internal" + "passwordRequired": "Set New Password for Internal User", + "convertToInternal": "Convert to Internal" } }, "publicKey": { @@ -87,8 +87,8 @@ "raw": "Key", "download": "Download", "delete": "Delete", - "addSubtitle": "Add new key", - "addKey": "Add key" + "addSubtitle": "Add New Key", + "addKey": "Add Key" }, "apiKey": { "subtitle": "API Keys", @@ -102,12 +102,12 @@ "help": "The api key will be restricted to permissions of this role" }, "created": "Created on", - "addSubtitle": "Add new key", - "addKey": "Add key", + "addSubtitle": "Add New Key", + "addKey": "Add Key", "delete": "Delete", "download": "Download", "modal": { - "title": "Key created", + "title": "Key Created", "text1": "Your new API key is ready. You can use it as a bearer token for REST calls or as a password for SCM clients.", "text2": "Store your API key in a safe place now! It is only displayed now and cannot be recovered later.", "clipboard": "Copy to clipboard", diff --git a/scm-ui/ui-webapp/public/locales/es/config.json b/scm-ui/ui-webapp/public/locales/es/config.json index 4749546a22..0286663e9f 100644 --- a/scm-ui/ui-webapp/public/locales/es/config.json +++ b/scm-ui/ui-webapp/public/locales/es/config.json @@ -11,18 +11,27 @@ "no-write-permission-notification": "Por favor, tenga en cuenta: ¡No tiene permiso para editar la configuración!" } }, - "proxy-settings": { - "name": "Ajustes del proxy", - "proxy-password": "Contraseña del proxy", - "proxy-port": "Puerto del proxy", - "proxy-server": "Servidor proxy", - "proxy-user": "Usuario del proxy", - "enable-proxy": "Habilitar proxy", - "proxy-excludes": "Excepciones del proxy", - "remove-proxy-exclude-button": "Eliminar las excepciones del proxy", - "add-proxy-exclude-error": "La excepción que desea añadir al proxy es incorrecta", - "add-proxy-exclude-textfield": "Añada aquí las excepciones que desee incluir al proxy", - "add-proxy-exclude-button": "Añadir excepción al proxy" + "proxySettings": { + "subtitle": "Ajustes del proxy", + "enable": "Habilitar proxy", + "enableHelpText": "Habilitar proxy", + "password": "Contraseña del proxy", + "passwordHelpText": "La contraseña para la autenticación del servidor proxy.", + "port": "Puerto del proxy", + "portHelpText": "El puerto del proxy", + "server": "Servidor proxy", + "serverHelpText": "El servidor proxy", + "user": "Usuario del proxy", + "userHelpText": "El nombre de usuario para la autenticación del servidor proxy.", + "noExcludes": "No se encontraron exclusiones del proxy.", + "excludesTable": { + "label": "Excepciones del proxy", + "helpText": "Patrones globales para hostnames que deben excluirse de la configuración del proxy.", + "deleteButton": "Eliminar las excepciones del proxy" + }, + "addExclude": "Añada aquí las excepciones que desee incluir al proxy", + "addExcludeButton": "Añadir excepción al proxy", + "addExcludeError": "La excepción que desea añadir al proxy es incorrecta" }, "base-url-settings": { "name": "Ajustes de la URL base", @@ -65,12 +74,6 @@ "baseUrlHelpText": "La URL de la aplicación (con la ruta del contexto), por ejemplo: http://localhost:8080/scm", "loginAttemptLimitHelpText": "Máximo número permitido de intentos de inicio de sesión. Use -1 para deshabilitar este límite.", "loginAttemptLimitTimeoutHelpText": "Tiempo de espera en segundos para los usuarios que están deshabilitados temporalmente debido a demasiado intentos fallidos de inicio de sesión.", - "enableProxyHelpText": "Habilitar proxy", - "proxyPortHelpText": "El puerto del proxy", - "proxyPasswordHelpText": "La contraseña para la autenticación del servidor proxy.", - "proxyServerHelpText": "El servidor proxy", - "proxyUserHelpText": "El nombre de usuario para la autenticación del servidor proxy.", - "proxyExcludesHelpText": "Patrones globales para hostnames que deben excluirse de la configuración del proxy.", "enableXsrfProtectionHelpText": "Habilitar la protección de cookies XSRF. Nota: Esta funcionalidad todavía es experimental.", "nameSpaceStrategyHelpText": "La estrategia para el espacio de nombres.", "loginInfoUrlHelpText": "URL para la información en el inicio de sesión (consejos sobre complementos y funcionalidades en la página de inicio de sesión). Si esto se omite, no se mostrará información de inicio de sesión." diff --git a/scm-ui/ui-webapp/public/locales/es/repos.json b/scm-ui/ui-webapp/public/locales/es/repos.json index 013d31edad..2b456e627e 100644 --- a/scm-ui/ui-webapp/public/locales/es/repos.json +++ b/scm-ui/ui-webapp/public/locales/es/repos.json @@ -134,7 +134,8 @@ } }, "permission": { - "title": "Editar permisos", + "title": "Permisos", + "noPermissions": "No se han encontrado permisos.", "user": "Usuario", "group": "Grupo", "error-title": "Error", diff --git a/scm-ui/ui-webapp/src/admin/components/form/ProxySettings.tsx b/scm-ui/ui-webapp/src/admin/components/form/ProxySettings.tsx index 8e21afd494..484cb6bfc9 100644 --- a/scm-ui/ui-webapp/src/admin/components/form/ProxySettings.tsx +++ b/scm-ui/ui-webapp/src/admin/components/form/ProxySettings.tsx @@ -47,61 +47,61 @@ class ProxySettings extends React.Component { proxyUser, enableProxy, proxyExcludes, - hasUpdatePermission + hasUpdatePermission, } = this.props; return (
- +
@@ -115,9 +115,10 @@ class ProxySettings extends React.Component {
diff --git a/scm-ui/ui-webapp/src/admin/components/table/ProxyExcludesTable.tsx b/scm-ui/ui-webapp/src/admin/components/table/ProxyExcludesTable.tsx index e823800331..c439d047b1 100644 --- a/scm-ui/ui-webapp/src/admin/components/table/ProxyExcludesTable.tsx +++ b/scm-ui/ui-webapp/src/admin/components/table/ProxyExcludesTable.tsx @@ -39,11 +39,11 @@ class ProxyExcludesTable extends React.Component { return ( ); } diff --git a/scm-ui/ui-webapp/src/repos/permissions/components/PermissionsTable.tsx b/scm-ui/ui-webapp/src/repos/permissions/components/PermissionsTable.tsx new file mode 100644 index 0000000000..43a3116d93 --- /dev/null +++ b/scm-ui/ui-webapp/src/repos/permissions/components/PermissionsTable.tsx @@ -0,0 +1,89 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import React, { FC } from "react"; +import { useTranslation } from "react-i18next"; +import { LabelWithHelpIcon, Notification } from "@scm-manager/ui-components"; +import SinglePermission from "../containers/SinglePermission"; +import { PermissionCollection, RepositoryRole } from "@scm-manager/ui-types"; + +type Props = { + availableRepositoryRoles: RepositoryRole[]; + availableVerbs: string[]; + namespace: string; + repoName?: string; + permissions: PermissionCollection; +}; + +const PermissionsTable: FC = ({ + availableRepositoryRoles, + availableVerbs, + namespace, + repoName, + permissions, +}) => { + const [t] = useTranslation("repos"); + + if (permissions?.length === 0) { + return {t("permission.noPermissions")}; + } + + return ( + + + + + + + + + + {permissions.map((permission) => { + return ( + + ); + })} + +
+ + + + + + +
+ ); +}; + +export default PermissionsTable; diff --git a/scm-ui/ui-webapp/src/repos/permissions/containers/Permissions.tsx b/scm-ui/ui-webapp/src/repos/permissions/containers/Permissions.tsx index 3ab269db50..40eebbc3ec 100644 --- a/scm-ui/ui-webapp/src/repos/permissions/containers/Permissions.tsx +++ b/scm-ui/ui-webapp/src/repos/permissions/containers/Permissions.tsx @@ -45,9 +45,8 @@ import { isFetchPermissionsPending, modifyPermissionReset } from "../modules/permissions"; -import { ErrorPage, LabelWithHelpIcon, Loading, Subtitle } from "@scm-manager/ui-components"; +import { ErrorPage, Loading, Subtitle } from "@scm-manager/ui-components"; import { Permission, PermissionCollection, PermissionCreateEntry, RepositoryRole } from "@scm-manager/ui-types"; -import SinglePermission from "./SinglePermission"; import CreatePermissionForm from "./CreatePermissionForm"; import { History } from "history"; import { getPermissionsLink } from "../../modules/repos"; @@ -57,6 +56,7 @@ import { getRepositoryVerbsLink, getUserAutoCompleteLink } from "../../../modules/indexResource"; +import PermissionsTable from "../components/PermissionsTable"; type Props = WithTranslation & { availablePermissions: boolean; availableRepositoryRoles: RepositoryRole[]; @@ -147,7 +147,7 @@ class Permissions extends React.Component { this.createPermission(permission)} + createPermission={(permission) => this.createPermission(permission)} loading={loadingCreatePermission} currentPermissions={permissions} userAutocompleteLink={userAutocompleteLink} @@ -158,39 +158,7 @@ class Permissions extends React.Component { return (
- - - - - - - - - - {permissions.map(permission => { - return ( - - ); - })} - -
- - - - - - -
+ {createPermissionForm}
);