plone.restapi/i18n-improvements: Add more i18n improvements
"Leonardo J. Caballero G" <jenkins-z4DKO/[email protected]> Mon, 09 Dec 2019 03:23:03 -0800 (PST)
| Newsgroups | gmane.comp.web.zope.plone.cvs |
|---|---|
| Message-ID | <[email protected]> |
Repository: plone.restapi Branch: refs/heads/i18n-improvements Date: 2019-12-09T07:16:28-04:00 Author: Leonardo J. Caballero G (macagua) <[email protected]> Commit: https://github.com/plone/plone.restapi/commit/cae8e3c04b909956e79ef1d29dde06169b1e5ca0 Add more i18n improvements Files changed: M CHANGES.rst M CONTRIBUTORS.rst M src/plone/restapi/behaviors.py M src/plone/restapi/demo/angular.pt M src/plone/restapi/locales/de/LC_MESSAGES/plone.restapi.po M src/plone/restapi/locales/plone.restapi.pot M src/plone/restapi/pas/add_plugin.zpt M src/plone/restapi/pas/config.zpt b'diff --git a/CHANGES.rst b/CHANGES.rst\nindex 4d7d7b84..7319fe31 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -8,6 +8,16 @@ Changelog\n \n .. towncrier release notes start\n \n+\n+5.1.1 (unreleased)\n+------------------\n+\n+New Features:\n+\n+- Add more i18n improvements\n+ [macagua]\n+\n+\n 5.1.0 (2019-12-07)\n ------------------\n \ndiff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst\nindex 394ca5ae..50de4f95 100644\n--- a/CONTRIBUTORS.rst\n+++ b/CONTRIBUTORS.rst\n@@ -16,3 +16,5 @@\n - Yann Fouillat, alias Gagaro\n - Sune Br\xc3\xb8ndum W\xc3\xb8ller\n - Philippe Gross\n+- Leonardo J. Caballero G.\n+\ndiff --git a/src/plone/restapi/behaviors.py b/src/plone/restapi/behaviors.py\nindex e2911e1a..35474129 100644\n--- a/src/plone/restapi/behaviors.py\n+++ b/src/plone/restapi/behaviors.p y\n@@ -24,16 +24,16 @@ class IBlocks(model.Schema):\n model.fieldset("layout", label=_(u"Layout"), fields=["blocks", "blocks_layout"])\n \n blocks = JSONField(\n- title=u"Blocks",\n- description=u"The JSON representation of the object blocks information. Must be a JSON object.", # noqa\n+ title=_(u"Blocks"),\n+ description=_(u"The JSON representation of the object blocks information. Must be a JSON object."), # noqa\n schema=BLOCKS_SCHEMA,\n default={},\n required=False,\n )\n \n blocks_layout = JSONField(\n- title=u"Blocks Layout",\n- description=u"The JSON representation of the object blocks layout. Must be a JSON array.", # noqa\n+ title=_(u"Blocks Layout"),\n+ description=_(u"The JSON r epresentation of the object blocks layout. Must be a JSON array."), # noqa\n schema=LAYOUT_SCHEMA,\n default={"items": []},\n required=False,\ndiff --git a/src/plone/restapi/demo/angular.pt b/src/plone/restapi/demo/angular.pt\nindex b668a35e..7698d226 100644\n--- a/src/plone/restapi/demo/angular.pt\n+++ b/src/plone/restapi/demo/angular.pt\n@@ -34,7 +34,7 @@\n \n function($scope, $http) {\n var someText = {};\n- someText.message = \'Plone REST API - Demo - Angular\';\n+ someText.message = \'Plone REST API - Demo - Angular\'; // TODO: Add i18n support\n $scope.someText = someText;\n $scope.get = \'\';\n $scope.get_successful = \'\';\n@@ -97,14 +97,15 @@\n </script>\n </head>\n <body ng-controller="TextController">\n- <p>{{so meText.message}}</p>\n- <h4>GET /front-page</h4>\n+ <p i18n:ignore="">{{someText.message}}</p>\n+ <h4 i18n:ignore="">GET /front-page</h4>\n <pre ng-bind="get_successful"></pre>\n- <h4>GET /non-existing-resource</h4>\n+ <h4 i18n:ignore="">GET /non-existing-resource</h4>\n <pre ng-bind="get"></pre>\n- <h4>GET /private</h4>\n+ <h4 i18n:ignore="">GET /private</h4>\n <pre ng-bind="get_unauthorized"></pre>\n- <h4>GET /500-internal-server-error</h4>\n+ <h4 i18n:ignore="">GET /500-internal-server-error</h4>\n <pre ng-bind="get_internal_server_error"></pre>\n </body>\n </html>\n+\ndiff --git a/src/plone/restapi/locales/de/LC_MESSAGES/plone.restapi.po b/src/plone/restapi/locales/de/LC_MESSAGES/plone.restapi.po\nindex 8fe0e060..03ea27f4 100644\n--- a/src/plone/restapi/locales/de/LC _MESSAGES/plone.restapi.po\n+++ b/src/plone/restapi/locales/de/LC_MESSAGES/plone.restapi.po\n@@ -1,7 +1,7 @@\n msgid ""\n msgstr ""\n "Project-Id-Version: PACKAGE VERSION\\n"\n-"POT-Creation-Date: 2018-03-02 15:33+0000\\n"\n+"POT-Creation-Date: 2019-12-09 10:14+0000\\n"\n "PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\\n"\n "Last-Translator: Timo Stollenwerk <tisto-z4DKO/[email protected]>\\n"\n "Language-Team: German <[email protected]>\\n"\n@@ -14,50 +14,92 @@ msgstr ""\n "Preferred-Encodings: utf-8 latin1\\n"\n "Domain: plone.restapi\\n"\n \n-#: plone/restapi/services/email_send/post.py:81\n+#: plone/restapi/services/email_send/post.py:82\n msgid "${sender_fullname} via ${portal_title}"\n msgstr "${sender_fullname} via ${portal_title}"\n \n-#: plone/restapi/services/email_send/post.py:76\n+#: plone/restapi/serv ices/email_send/post.py:75\n msgid "A portal user via ${portal_title}"\n msgstr "Ein Portal Nutzer via ${portal_title}"\n \n-#: plone/restapi/configure.zcml:39\n+#: plone/restapi/configure.zcml:46\n msgid "Adds sample content for performance testing"\n msgstr ""\n \n-#: plone/restapi/configure.zcml:31\n+#: plone/restapi/configure.zcml:38\n msgid "Adds sample content types for testing"\n msgstr ""\n \n-#: plone/restapi/configure.zcml:55\n+#: plone/restapi/behaviors.py:27\n+#: plone/restapi/configure.zcml:90\n+msgid "Blocks"\n+msgstr ""\n+\n+#: plone/restapi/behaviors.py:35\n+msgid "Blocks Layout"\n+msgstr ""\n+\n+#: plone/restapi/configure.zcml:90\n+msgid "Enables Volto Blocks support"\n+msgstr ""\n+\n+#: plone/restapi/configure.zcml:54\n+msgid "Enables blocks on the Document content type "\n+msgstr ""\n+\n+#: plone/restapi/behaviors.py:24\n+msgid "Layout"\n+msgstr ""\n+\n+#: plone/restapi/configure.zcml:70\n msgid "RESTful hypermedia API for Plone - Uninstall"\n msgstr ""\n \n-#: plone/restapi/configure.zcml:22\n+#: plone/restapi/configure.zcml:29\n msgid "RESTful hypermedia API for Plone."\n msgstr ""\n \n-#: plone/restapi/services/history/patch.py:30\n+#: plone/restapi/services/history/patch.py:31\n msgid "Reverted to revision ${version}"\n msgstr ""\n \n-#: plone/restapi/services/email_send/post.py:88\n+#: plone/restapi/behaviors.py:28\n+msgid "The JSON representation of the object blocks information. Must be a JSON object."\n+msgstr ""\n+\n+#: plone/restapi/behaviors.py:36\n+msgid "The JSON representation of the object blocks layout. Must be a JSON array."\n+msgstr " "\n+\n+#: plone/restapi/configure.zcml:54\n+msgid "Volto Blocks"\n+msgstr ""\n+\n+#: plone/restapi/services/email_send/post.py:92\n msgid "You are receiving this mail because ${sender_fullname} sent this message via the site ${portal_title}:"\n msgstr "Sie erhalten diese E-Mail, weil Ihnen ${sender_fullname} diese Nachricht \xc3\xbcber die Webseite ${portal_title} geschickt hat:"\n \n-#: plone/restapi/configure.zcml:22\n+#. Default: "default message"\n+#: plone/restapi/tests/test_serializer_converters.py:221\n+msgid "message_id"\n+msgstr ""\n+\n+#: plone/restapi/configure.zcml:29\n msgid "plone.restapi"\n msgstr ""\n \n-#: plone/restapi/configure.zcml:39\n+#: plone/restapi/configure.zcml:46\n msgid "plone.restapi performance testing"\n msgstr ""\n \n-#: plone/restapi/configure.zcml:31\n+ #: plone/restapi/configure.zcml:38\n msgid "plone.restapi testing"\n msgstr ""\n \n #: plone/restapi/upgrades/configure.zcml:23\n msgid "plone.restapi.upgrades.0002"\n msgstr ""\n+\n+#: plone/restapi/upgrades/configure.zcml:42\n+msgid "plone.restapi.upgrades.0004"\n+msgstr ""\ndiff --git a/src/plone/restapi/locales/plone.restapi.pot b/src/plone/restapi/locales/plone.restapi.pot\nindex d93b93f0..62c2c82e 100644\n--- a/src/plone/restapi/locales/plone.restapi.pot\n+++ b/src/plone/restapi/locales/plone.restapi.pot\n@@ -4,7 +4,7 @@\n msgid ""\n msgstr ""\n "Project-Id-Version: PACKAGE VERSION\\n"\n-"POT-Creation-Date: 2018-03-02 15:33+0000\\n"\n+"POT-Creation-Date: 2019-12-09 10:14+0000\\n"\n "PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\\n"\n "Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n"\n "La nguage-Team: LANGUAGE <[email protected]>\\n"\n@@ -17,50 +17,92 @@ msgstr ""\n "Preferred-Encodings: utf-8 latin1\\n"\n "Domain: plone.restapi\\n"\n \n-#: plone/restapi/services/email_send/post.py:81\n+#: plone/restapi/services/email_send/post.py:82\n msgid "${sender_fullname} via ${portal_title}"\n msgstr ""\n \n-#: plone/restapi/services/email_send/post.py:76\n+#: plone/restapi/services/email_send/post.py:75\n msgid "A portal user via ${portal_title}"\n msgstr ""\n \n-#: plone/restapi/configure.zcml:39\n+#: plone/restapi/configure.zcml:46\n msgid "Adds sample content for performance testing"\n msgstr ""\n \n-#: plone/restapi/configure.zcml:31\n+#: plone/restapi/configure.zcml:38\n msgid "Adds sample content types for testing"\n msgstr ""\n \n-#: plone/restapi/configure.zcml:55\n+#: plone/resta pi/behaviors.py:27\n+#: plone/restapi/configure.zcml:90\n+msgid "Blocks"\n+msgstr ""\n+\n+#: plone/restapi/behaviors.py:35\n+msgid "Blocks Layout"\n+msgstr ""\n+\n+#: plone/restapi/configure.zcml:90\n+msgid "Enables Volto Blocks support"\n+msgstr ""\n+\n+#: plone/restapi/configure.zcml:54\n+msgid "Enables blocks on the Document content type"\n+msgstr ""\n+\n+#: plone/restapi/behaviors.py:24\n+msgid "Layout"\n+msgstr ""\n+\n+#: plone/restapi/configure.zcml:70\n msgid "RESTful hypermedia API for Plone - Uninstall"\n msgstr ""\n \n-#: plone/restapi/configure.zcml:22\n+#: plone/restapi/configure.zcml:29\n msgid "RESTful hypermedia API for Plone."\n msgstr ""\n \n-#: plone/restapi/services/history/patch.py:30\n+#: plone/restapi/services/history/patch.py:31\n msgid "Reverted to revision ${vers ion}"\n msgstr ""\n \n-#: plone/restapi/services/email_send/post.py:88\n+#: plone/restapi/behaviors.py:28\n+msgid "The JSON representation of the object blocks information. Must be a JSON object."\n+msgstr ""\n+\n+#: plone/restapi/behaviors.py:36\n+msgid "The JSON representation of the object blocks layout. Must be a JSON array."\n+msgstr ""\n+\n+#: plone/restapi/configure.zcml:54\n+msgid "Volto Blocks"\n+msgstr ""\n+\n+#: plone/restapi/services/email_send/post.py:92\n msgid "You are receiving this mail because ${sender_fullname} sent this message via the site ${portal_title}:"\n msgstr ""\n \n-#: plone/restapi/configure.zcml:22\n+#. Default: "default message"\n+#: plone/restapi/tests/test_serializer_converters.py:221\n+msgid "message_id"\n+msgstr ""\n+\n+#: plone/restapi/configure.zcml: 29\n msgid "plone.restapi"\n msgstr ""\n \n-#: plone/restapi/configure.zcml:39\n+#: plone/restapi/configure.zcml:46\n msgid "plone.restapi performance testing"\n msgstr ""\n \n-#: plone/restapi/configure.zcml:31\n+#: plone/restapi/configure.zcml:38\n msgid "plone.restapi testing"\n msgstr ""\n \n #: plone/restapi/upgrades/configure.zcml:23\n msgid "plone.restapi.upgrades.0002"\n msgstr ""\n+\n+#: plone/restapi/upgrades/configure.zcml:42\n+msgid "plone.restapi.upgrades.0004"\n+msgstr ""\ndiff --git a/src/plone/restapi/pas/add_plugin.zpt b/src/plone/restapi/pas/add_plugin.zpt\nindex c960d9ba..6289e103 100644\n--- a/src/plone/restapi/pas/add_plugin.zpt\n+++ b/src/plone/restapi/pas/add_plugin.zpt\n@@ -6,28 +6,29 @@\n <h2 tal:define="form_title string:JWT Authentication Plugin"\n tal:replace="structure here/manage_form_title">Form Title</h2>\n \n- <p class="form-help">\n+ <p class="form-help" i18n:ignore="">\n Plone PAS plugin for authentication with JSON web tokens (JWT)\n </p>\n \n <form action="addJWTAuthenticationPlugin" method="post">\n <table>\n <tr>\n- <td class="form-label">Id</td>\n+ <td class="form-label" i18n:ignore="">Id</td>\n <td><input type="text" name="id_" tal:attributes="value request/id|string:jwt_auth"/></td>\n </tr>\n <tr>\n- <td class="form-label">Title</td>\n+ <td class="form-label" i18n:ignore="">Title</td>\n <td><input type="text" name="title"/></td>\n </tr>\n <tr>\n <td colspan="2">\n <div class= "form-element">\n- <input type="submit" value="Add"/>\n+ <input type="submit" value="Add" i18n:ignore-attributes="value" />\n </div>\n </td>\n </tr>\n </table>\n </form>\n </body>\n-</html>\n\\ No newline at end of file\n+</html>\n+\ndiff --git a/src/plone/restapi/pas/config.zpt b/src/plone/restapi/pas/config.zpt\nindex 46e5fd61..64f710f1 100644\n--- a/src/plone/restapi/pas/config.zpt\n+++ b/src/plone/restapi/pas/config.zpt\n@@ -1,17 +1,17 @@\n <h1 tal:replace="structure here/manage_page_header"> PAGE HEADER </h1>\n <h2 tal:replace="structure here/manage_tabs"> PAGE HEADER </h2>\n \n-<h3>JWT Authentication</h3>\n+<h3 i18n:ignore="">JWT Authentication</h3>\n \n- <p class="form-help">\n+ <p class="form-help" i18n:ign ore="">\n Plone PAS plugin for authentication with JSON web tokens (JWT).\n </p>\n \n <form action="manage_updateConfig" method="post">\n <table>\n <tr valign="top">\n- <td><div class="form-label">Token Validity Timeout (in seconds)</div>\n- <div class="form-help">After this, the token is invalid and the user\n+ <td><div class="form-label" i18n:ignore="">Token Validity Timeout (in seconds)</div>\n+ <div class="form-help" i18n:ignore="">After this, the token is invalid and the user\n must login again. Set to 0 for the token to remain valid indefinitely.</div>\n </td>\n <td><input type="text" name="token_timeout"\n@@ -20,23 +20,23 @@\n <tr>\n <td align="left" valign="top">\n <input type="checkbox" name="use_keyring" id="use-keyring"\n- tal:attributes="checked python: context.use_keyring and \'checked\'"/> <label class="form-label" for="use-keyring">Use Keyring</label>\n- <div class="form-help">If enabled, tokens are signed with a secret from\n+ tal:attributes="checked python: context.use_keyring and \'checked\'"/> <label class="form-label" for="use-keyring" i18n:ignore="">Use Keyring</label>\n+ <div class="form-help" i18n:ignore="">If enabled, tokens are signed with a secret from\n Plone\'s keyring. If you want tokens that remain valid indefinitely you should disable this.</div>\n </td>\n </tr>\n <tr>\n <td align="left" valign="top">\n <input type="checkbox" name="store_tokens" id="store-tokens"\n- tal:attributes="checked python: context.store_tokens and \'checked\'"/> <label class="form-label" for="store-tokens">Store tokens</label>\n- <div class="form-help">By default tokens are not stored on the server and\n+ tal:attributes="checked python: context.store_tokens and \'checked\'"/> <label class="form-label" for="store-tokens" i18n:ignore="">Store tokens</label>\n+ <div class="form-help" i18n:ignore="">By default tokens are not stored on the server and\n thus can\'t be invalidated. If enabled, tokens that don\'t expire can be invalidated.</div>\n </td>\n </tr>\n <tr>\n <td colspan="2">\n <div class="form-element">\n- <input type="submit" value="Update"/>\n+ <input type="submit" value="Update" i18n:ignore-attributes="value" />\n </div>\n </td>\n </tr>\n@@ -44,4 +44,5 @@\n </form>\n \n \n-<h1 tal:replace="structure here/manage_page_footer"> PAGE FOOTER </h1>\n\\ No newline at end of file\n+<h1 tal:replace="structure here/manage_page_footer"> PAGE FOOTER </h1>\n+\n'