-
Notifications
You must be signed in to change notification settings - Fork 283
Feature/custom translations frontend #857
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
Open
rvveber
wants to merge
4
commits into
suitenumerique:main
Choose a base branch
from
rvveber:feature/custom-translations-frontend
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
44cab3c
✨(frontend) adds customization for translations
rvveber d93f8ca
✨(backend) adds customization for translations
rvveber d525490
✅(tests) adds customization for translations
rvveber af92119
📝(documentation) adds customization for translations
rvveber File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# Application Customization 🛠️ | ||
This document outlines the various ways you can customize our application to suit your specific needs without modifying the core codebase. | ||
#### Available Customization Options | ||
> 1. [Runtime Theming 🎨](#runtime-theming-🎨) | ||
> 1. [Runtime Internationalization 🌐](#runtime-internationalization-🌐) | ||
|
||
<br> | ||
|
||
# Runtime Theming 🎨 | ||
|
||
### How to Use | ||
|
||
To customize the application's appearance, set the `FRONTEND_CSS_URL` environment variable to the URL of your custom CSS file: | ||
|
||
```javascript | ||
FRONTEND_CSS_URL=http://example.com/custom-style.css | ||
``` | ||
|
||
Once you've set this variable, our application will load your custom CSS file and apply the styles to our frontend application. | ||
|
||
### Benefits | ||
|
||
- **Easy customization** 🔄: Customize the look and feel of our application without requiring any code changes. | ||
- **Flexibility** 🌈: Use any CSS styles to create a custom theme that meets your needs. | ||
- **Runtime theming** ⏱️: Change the theme of our application at runtime, without requiring a restart or recompilation. | ||
|
||
### Example Use Case | ||
|
||
Let's say you want to change the background color of our application to a custom color. Create a custom CSS file with the following contents: | ||
|
||
```css | ||
body { | ||
background-color: #3498db; | ||
} | ||
``` | ||
|
||
Then, set the `FRONTEND_CSS_URL` environment variable to the URL of your custom CSS file. Once you've done this, our application will load your custom CSS file and apply the styles, changing the background color to the custom color you specified. | ||
|
||
<br> | ||
|
||
# Runtime Internationalization 🌐 | ||
|
||
### How to Use | ||
|
||
To provide custom translations, set the `FRONTEND_CUSTOM_TRANSLATIONS_URL` environment variable to the URL of your custom translations JSON file: | ||
|
||
```javascript | ||
FRONTEND_CUSTOM_TRANSLATIONS_URL=http://example.com/custom-translations.json | ||
``` | ||
|
||
Once you've set this variable, our application will load your custom translations and apply them to the user interface. | ||
|
||
### Benefits | ||
|
||
- **Language control** 🌐: Customize terminology to match your organization's vocabulary. | ||
- **Context-specific language** 📝: Adapt text for your specific use case or industry. | ||
|
||
### Example Use Case | ||
|
||
Let's say you want to customize some key phrases in the application. Create a JSON file with your custom translations: | ||
|
||
```json | ||
{ | ||
"en": { | ||
"translation": { | ||
"Docs": "MyApp", | ||
"Create New Document": "+" | ||
} | ||
}, | ||
"de": { | ||
"translation": { | ||
"Docs": "MeineApp", | ||
"Create New Document": "+" | ||
} | ||
} | ||
} | ||
``` | ||
|
||
Then set the `FRONTEND_CUSTOM_TRANSLATIONS_URL` environment variable to the URL of this JSON file. The application will load these translations and override the default ones where specified. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.