wip(lab): Work on i18n-next
This commit is contained in:
parent
491913e288
commit
4c17255a58
26 changed files with 170 additions and 105 deletions
|
@ -1,9 +1,12 @@
|
|||
import { useTranslation } from 'next-i18next'
|
||||
|
||||
const TextOnPath = (props) => {
|
||||
const { t } = useTranslation(['app'])
|
||||
const text = []
|
||||
// Handle translation (and spaces)
|
||||
let translated = ''
|
||||
for (let string of props.path.attributes.getAsArray('data-text')) {
|
||||
translated += props.app.t(string, false, props.locale).replace(/"/g, '"') + ' '
|
||||
translated += t(string).replace(/"/g, '"') + ' '
|
||||
}
|
||||
const textPathProps = {
|
||||
xlinkHref: '#' + props.pathId,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue