Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Public translations interface #1323

Open
wants to merge 3 commits into
base: 3.6
Choose a base branch
from

Conversation

phorward
Copy link
Member

@phorward phorward commented Nov 15, 2024

This interface was already implemented in some projects, and was now cleaned and standardised. It allows to set translate()-objects to public, so that an unauthorized client can request them without further authentication.

The function /json/_translate/get_public was made available to dump translations.

Example calls:

  • /json/_translation/get_public get public translations for current language
  • /json/_translation/get_public?languages=en for english translations
  • /json/_translation/get_public?languages=en&languages=de for english and german translations
  • /json/_translation/get_public?languages=* for all available languages

This interface was already implemented in some projects, and was now cleaned and standardised. It allows to set translate()-objects to public, so and unauthorized client is allowed to dump them without further authentication.

The function /json/_translate/get_public was made available to dump translations.

Example calls:

- `/json/_translation/get_public` get public translations for current language
- `/json/_translation/get_public?languages=en` for english translations
- `/json/_translation/get_public?languages=en&languages=de` for english and german translations
- `/json/_translation/get_public?languages=*` for all available languages
@phorward phorward added Priority: High After critical issues are fixed, these should be dealt with before any further issues. feature New feature or request labels Nov 15, 2024
@phorward phorward added this to the ViUR-core v3.6 milestone Nov 15, 2024
@phorward phorward linked an issue Nov 15, 2024 that may be closed by this pull request
@phorward phorward requested a review from akelch November 18, 2024 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request Priority: High After critical issues are fixed, these should be dealt with before any further issues.
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

Expose public translations to the client
2 participants