From 04e9ebaeee6aed9b91606ec2b358f2466f133eb0 Mon Sep 17 00:00:00 2001 From: Philip Durbin Date: Wed, 4 Dec 2024 11:56:22 -0500 Subject: [PATCH 1/2] comment out /dev/lang to prevent verbose logging #11043 --- .../source/container/running/demo.rst | 18 ++++++++++++------ docker-compose-dev.yml | 2 +- docker/compose/demo/compose.yml | 2 +- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/doc/sphinx-guides/source/container/running/demo.rst b/doc/sphinx-guides/source/container/running/demo.rst index 2e404e7a09a..fe094bb3449 100644 --- a/doc/sphinx-guides/source/container/running/demo.rst +++ b/doc/sphinx-guides/source/container/running/demo.rst @@ -140,19 +140,25 @@ One you make this change it should be visible in the copyright in the bottom lef Multiple Languages ++++++++++++++++++ -Generally speaking, you'll want to follow :ref:`i18n` in the Installation Guide to set up multiple languages such as English and French. +Generally speaking, you'll want to follow :ref:`i18n` in the Installation Guide to set up multiple languages. (You need to create your own "languages.zip" file, for example.) Here will give you guidance specific to this demo tutorial. We'll be setting up a toggle between English and French. -To set up the toggle between English and French, we'll use a slight variation on the command in the instructions above, adding the unblock key we created above: +First, edit the ``compose.yml`` file and uncomment the following line: -``curl "http://localhost:8080/api/admin/settings/:Languages?unblock-key=unblockme" -X PUT -d '[{"locale":"en","title":"English"},{"locale":"fr","title":"Français"}]'`` +.. code-block:: text + + #-Ddataverse.lang.directory=/dv/lang -Similarly, when loading the "languages.zip" file, we'll add the unblock key: +Next, upload "languages.zip" to the "loadpropertyfiles" API endpoint as shown below. This should place files ending in ".properties" into the ``/dv/lang`` directory configured above. + +Please note that we are using a slight variation on the command in the instructions above, adding the unblock key we created above: ``curl "http://localhost:8080/api/admin/datasetfield/loadpropertyfiles?unblock-key=unblockme" -X POST --upload-file /tmp/languages/languages.zip -H "Content-Type: application/zip"`` -Stop and start the Dataverse container in order for the language toggle to work. +Next, set up the UI toggle between English and French, again using the unblock key: -Note that ``dataverse.lang.directory=/dv/lang`` has already been configured for you in the ``compose.yml`` file. The step where you loaded "languages.zip" should have populated the ``/dv/lang`` directory with files ending in ".properties". +``curl "http://localhost:8080/api/admin/settings/:Languages?unblock-key=unblockme" -X PUT -d '[{"locale":"en","title":"English"},{"locale":"fr","title":"Français"}]'`` + +Stop and start the Dataverse container in order for the language toggle to work. Next Steps ---------- diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index 384b70b7a7b..c8515f43136 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -57,7 +57,7 @@ services: -Ddataverse.pid.fake.label=FakeDOIProvider -Ddataverse.pid.fake.authority=10.5072 -Ddataverse.pid.fake.shoulder=FK2/ - -Ddataverse.lang.directory=/dv/lang + #-Ddataverse.lang.directory=/dv/lang ports: - "8080:8080" # HTTP (Dataverse Application) - "4949:4848" # HTTPS (Payara Admin Console) diff --git a/docker/compose/demo/compose.yml b/docker/compose/demo/compose.yml index f03d81f5957..60ed130612e 100644 --- a/docker/compose/demo/compose.yml +++ b/docker/compose/demo/compose.yml @@ -26,7 +26,7 @@ services: -Ddataverse.pid.fake.label=FakeDOIProvider -Ddataverse.pid.fake.authority=10.5072 -Ddataverse.pid.fake.shoulder=FK2/ - -Ddataverse.lang.directory=/dv/lang + #-Ddataverse.lang.directory=/dv/lang ports: - "8080:8080" # HTTP (Dataverse Application) - "4848:4848" # HTTP (Payara Admin Console) From d9214a32396e490d918e7e18c9eb7cf696e2a1f1 Mon Sep 17 00:00:00 2001 From: Philip Durbin Date: Wed, 4 Dec 2024 14:27:28 -0500 Subject: [PATCH 2/2] reword #11043 --- doc/sphinx-guides/source/container/running/demo.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sphinx-guides/source/container/running/demo.rst b/doc/sphinx-guides/source/container/running/demo.rst index fe094bb3449..b1945070714 100644 --- a/doc/sphinx-guides/source/container/running/demo.rst +++ b/doc/sphinx-guides/source/container/running/demo.rst @@ -148,7 +148,7 @@ First, edit the ``compose.yml`` file and uncomment the following line: #-Ddataverse.lang.directory=/dv/lang -Next, upload "languages.zip" to the "loadpropertyfiles" API endpoint as shown below. This should place files ending in ".properties" into the ``/dv/lang`` directory configured above. +Next, upload "languages.zip" to the "loadpropertyfiles" API endpoint as shown below. This will place files ending in ".properties" into the ``/dv/lang`` directory configured above. Please note that we are using a slight variation on the command in the instructions above, adding the unblock key we created above: