Skip to content

Commit

Permalink
update the translation override instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt committed Feb 26, 2025
1 parent 421439d commit e9111c1
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 14 deletions.
27 changes: 13 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,22 +221,21 @@ docker composer up -d ssp-hub.local
## Overriding translations / dictionaries

If you use this Docker image but want to change some of the translations, you
can do so by providing identically-named dictionary files into an "overrides"
subfolder with just the desired changes, then running the
"apply-dictionaries-overrides.php" script.
can do so by appending the translations on the end of the base image's files.
Use the modules/material/locales/en/LC_MESSAGES/material.po file for reference.
Reference the [GNU gettext PO Files](https://www.gnu.org/software/gettext/manual/gettext.html#PO-Files)
documentation for more information about the file format.

Example Dockerfile (overriding text in the MFA module's material theme):
Example Dockerfile excerpt (overriding text in the MFA module's material theme):
```dockerfile
FROM silintl/ssp-base:7.1.0
# ... do your other custom Docker stuff...
# Copy your translation changes into an "overrides" subfolder:
COPY ./dictionaries/* /data/vendor/simplesamlphp/simplesamlphp/modules/material/dictionaries/overrides/
# Merge those changes into the existing translation files:
RUN cd /data/vendor/simplesamlphp/simplesamlphp/modules/material/dictionaries/overrides/ \
&& php /data/apply-dictionaries-overrides.php
# Copy your translation changes into the working folder:
COPY locales/* /data
# Append those changes onto the existing translation files:
RUN cat /data/en.material.po >> $SSP_PATH/modules/material/locales/en/LC_MESSAGES/material.po
RUN cat /data/es.material.po >> $SSP_PATH/modules/material/locales/es/LC_MESSAGES/material.po
RUN cat /data/fr.material.po >> $SSP_PATH/modules/material/locales/fr/LC_MESSAGES/material.po
RUN cat /data/ko.material.po >> $SSP_PATH/modules/material/locales/ko/LC_MESSAGES/material.po
```

## Custom Modules
Expand Down
3 changes: 3 additions & 0 deletions modules/material/locales/en/LC_MESSAGES/material.po
Original file line number Diff line number Diff line change
Expand Up @@ -364,3 +364,6 @@ msgstr "%idpName% coming soon"

msgid "{selectidp-links:help}"
msgstr "Help"

# leave an extra empty line to separate the last non-empty line in this file from the first line in an override file

3 changes: 3 additions & 0 deletions modules/material/locales/es/LC_MESSAGES/material.po
Original file line number Diff line number Diff line change
Expand Up @@ -364,3 +364,6 @@ msgstr "%idpName% próximamente"

msgid "{selectidp-links:help}"
msgstr "Ayuda"

# leave an extra empty line to separate the last non-empty line in this file from the first line in an override file

3 changes: 3 additions & 0 deletions modules/material/locales/fr/LC_MESSAGES/material.po
Original file line number Diff line number Diff line change
Expand Up @@ -364,3 +364,6 @@ msgstr "%idpName% à venir"

msgid "{selectidp-links:help}"
msgstr "Aidez-moi"

# leave an extra empty line to separate the last non-empty line in this file from the first line in an override file

3 changes: 3 additions & 0 deletions modules/material/locales/ko/LC_MESSAGES/material.po
Original file line number Diff line number Diff line change
Expand Up @@ -364,3 +364,6 @@ msgstr "%idpName% 곧 제공됨"

msgid "{selectidp-links:help}"
msgstr "도움"

# leave an extra empty line to separate the last non-empty line in this file from the first line in an override file

0 comments on commit e9111c1

Please sign in to comment.