Skip to content

Commit

Permalink
Merge pull request #13681 from opf/documentation/fixes#
Browse files Browse the repository at this point in the history
documentation/fixes
  • Loading branch information
as-op committed Sep 11, 2023
2 parents e9a401b + ae61b9e commit 3c3dbb2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/development/concepts/translations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ You should prefix your string unless its something very generic:
# ...
work_packages:
my_specific_page:
my_button: "My localized button label"
my_button: "My localized button label"
```



You can then use the `t()` helper method in the Rails erb view to translate the string:

```html
```erb
<%= styled_button_tag t('work_packages.my_specific_page.my_button') %>
```

Expand All @@ -79,7 +79,7 @@ The Rails guide on translations will give advanced examples on variable interpol

## Using I18n in your frontend code

The frontend receives all translations prefixed with `js.` (see above) through compiled javascript files from `frontend/src/locales/{language}.js` folder generated by I18n.js. These locales are loaded early on in the application in [frontend/src/main.ts](https://github.com/opf/openproject/blob/dev/frontend/src/main.ts) to ensure they are present when the page loads. The import happens dynamically so only the language the user has selected is going to be loaded by webpack.
The frontend receives all translations prefixed with `js-` (see above) through compiled javascript files from `frontend/src/locales/{language}.js` folder generated by I18n.js. These locales are loaded early on in the application in [frontend/src/main.ts](https://github.com/opf/openproject/blob/dev/frontend/src/main.ts) to ensure they are present when the page loads. The import happens dynamically so only the language the user has selected is going to be loaded by webpack.



Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/boards-introduction/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This document provides an initial introduction to the boards in OpenProject, i.e

To find out more about the detailed functionalities of Boards, please visit our [user guide for boards](../../user-guide/agile-boards).

Agile boards is only one of OpenProject's features. Find a comprehensive comparison between OpenProject and Trello [here](https://www.openproject.org/alternatives/best-trello-alternative/).
Agile boards is only one of OpenProject's features. Find a comprehensive comparison between OpenProject and Trello [here](https://www.openproject.org/project-management-software-alternatives/best-trello-alternative/).


| Topic | Content |
Expand Down

0 comments on commit 3c3dbb2

Please sign in to comment.