| 12 | import store from '../store.js' |
| 13 | |
| 14 | const setContextTranslation = context => { |
| 15 | if (!container) return |
| 16 | |
| 17 | const translation = container.translation?.() || container.translation |
| 18 | const contexts = translation?.value?.('contexts') |
| 19 | |
| 20 | if (contexts) { |
| 21 | for (const key of Object.keys(contexts)) { |
| 22 | if (context[key]) { |
| 23 | context[contexts[key]] = context[key] |
| 24 | } |
| 25 | } |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | /** |
| 30 | * Codecept-style interface: |
no test coverage detected