From dbef630f44f76b63eb5343a06f8df1ef7e71b539 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Thu, 1 Oct 2020 05:15:27 -0400 Subject: [PATCH] i18n: Localize `/admin` pages (#4380) Not every string was localized: * `/admin/plugins` has some CSS magic to draw the tables of plugins differently on narrow (mobile) screens, and the l10n library we use does not support that particular magic. The strings that were not localized are "Name", "Description", "Version", and "Time". These strings are only stuck in English when the page is viewed on a narrow screen; normal desktop users will see translated strings. The CSS magic ought to be replaced with something more robust (lots of nested `div`s); those remaining strings can be localized whenever that happens. * Strings from external sources such as plugin descriptions, error messages, and `settings.json` comments are not localized. --- src/locales/en.json | 34 +++++++++++++++++++++ src/templates/admin/index.html | 11 ++++--- src/templates/admin/plugins-info.html | 27 +++++++++-------- src/templates/admin/plugins.html | 43 ++++++++++++++------------- src/templates/admin/settings.html | 22 +++++++------- 5 files changed, 91 insertions(+), 46 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index 4e9fb33de..ec861b772 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1,4 +1,38 @@ { + "admin.page-title": "Admin Dashboard - Etherpad", + "admin_plugins": "Plugin manager", + "admin_plugins.available": "Available plugins", + "admin_plugins.available_not-found": "No plugins found.", + "admin_plugins.available_fetching": "Fetching…", + "admin_plugins.available_install.value": "Install", + "admin_plugins.available_search.placeholder": "Search for plugins to install", + "admin_plugins.description": "Description", + "admin_plugins.installed": "Installed plugins", + "admin_plugins.installed_fetching": "Fetching installed plugins…", + "admin_plugins.installed_nothing": "You haven't installed any plugins yet.", + "admin_plugins.installed_uninstall.value": "Uninstall", + "admin_plugins.last-update": "Last update", + "admin_plugins.name": "Name", + "admin_plugins.page-title": "Plugin manager - Etherpad", + "admin_plugins.version": "Version", + "admin_plugins_info": "Troubleshooting information", + "admin_plugins_info.hooks": "Installed hooks", + "admin_plugins_info.hooks_client": "Client-side hooks", + "admin_plugins_info.hooks_server": "Server-side hooks", + "admin_plugins_info.parts": "Installed parts", + "admin_plugins_info.plugins": "Installed plugins", + "admin_plugins_info.page-title": "Plugin information - Etherpad", + "admin_plugins_info.version": "Etherpad version", + "admin_plugins_info.version_latest": "Latest available version", + "admin_plugins_info.version_number": "Version number", + "admin_settings": "Settings", + "admin_settings.current": "Current configuration", + "admin_settings.current_example-devel": "Example development settings template", + "admin_settings.current_example-prod": "Example production settings template", + "admin_settings.current_restart.value": "Restart Etherpad", + "admin_settings.current_save.value": "Save Settings", + "admin_settings.page-title": "Settings - Etherpad", + "index.newPad": "New Pad", "index.createOpenPad": "or create/open a Pad with the name:", "index.openPad": "open an existing Pad with the name:", diff --git a/src/templates/admin/index.html b/src/templates/admin/index.html index 01724f500..efed7f801 100644 --- a/src/templates/admin/index.html +++ b/src/templates/admin/index.html @@ -1,11 +1,14 @@ - Admin Dashboard - Etherpad + Admin Dashboard - Etherpad + + +
@@ -13,9 +16,9 @@

Etherpad

diff --git a/src/templates/admin/plugins-info.html b/src/templates/admin/plugins-info.html index fe0f69f7b..b960ff32f 100644 --- a/src/templates/admin/plugins-info.html +++ b/src/templates/admin/plugins-info.html @@ -4,9 +4,12 @@ - Plugin information - Etherpad + Plugin information - Etherpad + + +
@@ -14,30 +17,30 @@

Etherpad

-

Etherpad version

-

Version number: <%= epVersion %>

-

Latest available version: <%= latestVersion %>

+

Etherpad version

+

Version number: <%= epVersion %>

+

Latest available version: <%= latestVersion %>

Git sha: <%= gitCommit %>

-

Installed plugins

+

Installed plugins

<%- plugins.formatPlugins().replace(/, /g,"\n") %>
-

Installed parts

+

Installed parts

<%= plugins.formatParts() %>
-

Installed hooks

-

Server side hooks

+

Installed hooks

+

Server-side hooks

<%- plugins.formatHooks() %>
-

Client side hooks

+

Client-side hooks

<%- plugins.formatHooks("client_hooks") %>
diff --git a/src/templates/admin/plugins.html b/src/templates/admin/plugins.html index 0fff78437..204e74735 100644 --- a/src/templates/admin/plugins.html +++ b/src/templates/admin/plugins.html @@ -1,12 +1,15 @@ - Plugin manager - Etherpad + Plugin manager - Etherpad + + +
@@ -23,21 +26,21 @@

Etherpad

-

Installed plugins

+

Installed plugins

- - - + + + @@ -48,7 +51,7 @@ @@ -58,8 +61,8 @@
NameDescriptionVersionNameDescriptionVersion
- +

-

You haven't installed any plugins yet.

-


Fetching installed plugins...

+

You haven't installed any plugins yet.

+


Fetching installed plugins…

@@ -67,18 +70,18 @@
-

Available plugins

+

Available plugins

- +
- - - - + + + + @@ -90,7 +93,7 @@ @@ -102,8 +105,8 @@ diff --git a/src/templates/admin/settings.html b/src/templates/admin/settings.html index 74f35521a..74e259ffb 100644 --- a/src/templates/admin/settings.html +++ b/src/templates/admin/settings.html @@ -1,7 +1,7 @@ - Settings - Etherpad + Settings - Etherpad @@ -9,7 +9,9 @@ - + + +
@@ -27,22 +29,22 @@

Etherpad

NameDescriptionVersionLast updateNameDescriptionVersionLast update
- +

 

-

No plugins found.

-


Fetching...

+

No plugins found.

+


Fetching…