Skip to content

Commit

Permalink
comment out /dev/lang to prevent verbose logging #11043
Browse files Browse the repository at this point in the history
  • Loading branch information
pdurbin committed Dec 4, 2024
1 parent a36db2d commit 04e9eba
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
18 changes: 12 additions & 6 deletions doc/sphinx-guides/source/container/running/demo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
----------
Expand Down
2 changes: 1 addition & 1 deletion docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion docker/compose/demo/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 04e9eba

Please sign in to comment.