You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 6, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,14 +46,17 @@ We would be grateful to get your help to translate our apps!
46
46
47
47
### Editor
48
48
49
-
The selection or detection of the language is not yet implemented in our editor. As soon as someone contributes with a language other than English, we will be happy to develop such function.
49
+
The online editor ([studio](https://github.com/deckgo/deckdeckgo/tree/master/studio)) can be translated as following:
50
50
51
-
Meanwhile, the online editor ([studio](https://github.com/deckgo/deckdeckgo/tree/master/studio)) can be translated as following:
51
+
1. Copy [en.json](https://github.com/deckgo/deckdeckgo/blob/master/studio/src/assets/i18n/en.json) to a new filename reflecting the language (such as for example `fr.json` for French)
52
+
2. Translate each keys of the newly created file
53
+
3. Provide a PR
52
54
53
-
1. Translate each keys in [en.json](https://github.com/deckgo/deckdeckgo/blob/master/studio/src/assets/i18n/en.json)
54
-
2. Once finished, copy this file to a new filename reflecting the language (such as for example `fr.json` for French)
55
-
3. Revert the changes in `en.json`
56
-
4. Provide a PR
55
+
If you would like to test your translations, either test these by overwriting temporarily [en.json](https://github.com/deckgo/deckdeckgo/blob/master/studio/src/assets/i18n/en.json) or add the new language as following:
56
+
57
+
1. Add it the to the list of supported languages in [languages.d.ts](https://github.com/deckgo/deckdeckgo/blob/main/studio/src/app/definitions/languages.d.ts)
58
+
2. Add a related dynamic import in the state management [i18n.store.ts](https://github.com/deckgo/deckdeckgo/blob/bdc79b9cd1f52171bab2f772fa6905c710f3b2e0/studio/src/app/stores/i18n.store.ts#L11)
59
+
3. Add it to the default language detection list in [lang.service.ts](https://github.com/deckgo/deckdeckgo/blob/bdc79b9cd1f52171bab2f772fa6905c710f3b2e0/studio/src/app/services/lang/lang.service.ts#L36)
57
60
58
61
Translations are handled in JSON files but, as we are consuming these through a store, their representation have to exist as interfaces.
59
62
To ease the process we have developed a script which extract the declarations automatically.
0 commit comments