Closed Mokkapps closed 5 years ago
The translations in Docs missing, but we can easily add it as much as possible.
Do you need help with the translations? I can help to implement them but I am no native speaker
It'd be cool! I have some problems with grammar in English, so I am in no hurry to translate.
Or does it maybe make sense to just link to: https://rete.readthedocs.io/en/latest/
I'm not planning to maintain this
Thanks, I am currently working on that.
One question: How would you structure the translation files, for example for the route docs/editor
?
@Mokkapps I think docs/editor.js
with import to index.js will be enough
I don't get it to work...
I have a docs/editor.js
:
export default [
["Редактор", {
en: "Editor",
ua: "Редактор"
}],
["Редактор представляет собой область с узлами и соединениями между их сокетами", {
en: "The editor is an area with nodes and connections between their sockets",
ua: "Редактор представляет собой область с узлами и соединениями между их сокетами"
}]
]
and this is the index.js
:
import { assignSection } from '@/i18n';
import main from './main';
import editor from './editor';
export default () => assignSection([
...main,
...editor
], 'docs');
but the translations are not shown for the /docs/editor
route.
Do you have any idea what I am doing wrong?
@Mokkapps the v-t9n.deep="'docs'"
directive should be added to the root element of component
Example components/Docs/Editor/index.vue
:
<template lang="pug">
.editor(v-t9n.deep="'docs'")
h1 Редактор
I'll add it to all of components
Done, now it should works properly
@Ni55aN Yes, now it works. Thanks!
Okay, I stumbled upon the next issue:
I cannot get this text in docs/engine
translated:
В общем случае при каждом изиенении в схеме (узлы, соединения, данные узла) необходимо выполнять обработку
I tried it this way:
["В общем случае при каждом изиенении в схеме (узлы, соединения, данные узла) необходимо выполнять обработку", {
en: "Consider the situation when, while working in the editor, you need to immediately receive the results of changes (this is easy to do with the 'process' event):",
ua: "Рассмотрим ситуацию, когда во время работы в редакторе нужно сразу получать результаты изменений (это легко сделать с событием 'process')"
}],
Also, all of translations before the mentioned line work fine. The whole file at the moment:
export default [
["Этот класс позволяет обрабатывать данные на основе потоков в узлах и передавать их из выходных данных во входные", {
en: "This class allows you to process data based on streams in nodes and transfer them from the output data to the input",
ua: "Этот класс позволяет обрабатывать данные на основе потоков в узлах и передавать их из выходных данных во входные"
}],
["Движок не зависит от других компонентов редактора", {
en: "The engine does not depend on other components of the editor",
ua: "Движок не зависит от других компонентов редактора"
}],
["Все, что ему нужно - это идентификатор, воркеры Компонентов и JSON данные", {
en: "All he needs is an identifier, component workers and JSON data",
ua: "Все, что ему нужно - это идентификатор, воркеры Компонентов и JSON данные"
}],
["Он может работать независимо от Редактора", {
en: "It can work independently from the Editor.",
ua: "Он может работать независимо от Редактора"
}],
["Обработка", {
en: "Treatment",
ua: "Обработка"
}],
["Обход узлов выполняется следующим образом:", {
en: "Bypassing the nodes is performed as follows:",
ua: "Обход узлов выполняется следующим образом:"
}],
["Рассмотрим ситуацию, когда во время работы в редакторе нужно сразу получать результаты изменений (это легко сделать с событием 'process')", {
en: "Consider the situation when, while working in the editor, you need to immediately receive the results of changes (this is easy to do with the 'process' event):",
ua: "Рассмотрим ситуацию, когда во время работы в редакторе нужно сразу получать результаты изменений (это легко сделать с событием 'process')"
}],
["В общем случае при каждом изиенении в схеме (узлы, соединения, данные узла) необходимо выполнять обработку", {
en: "Consider the situation when, while working in the editor, you need to immediately receive the results of changes (this is easy to do with the 'process' event):",
ua: "Рассмотрим ситуацию, когда во время работы в редакторе нужно сразу получать результаты изменений (это легко сделать с событием 'process')"
}]
]
Any idea why it does not work?
@Mokkapps did you pull my last commits?
I've checked it locally
Yes, this translations on the screenshot works fine but the following lines make problems, as mentioned in my previous comment
Yeah, I reproduced it. I'll investigate the issue later, for now I don’t know the reason
I've fixed it. It was problem with multi line strings
@Ni55aN Thanks, now I could finish and I have created a PR
Another issue that I found:a period and a colon at the end of the sentence were required in translation. Now they are not required
Before:
["Lorem ipsum:", {}]
After:
["Lorem ipsum", {}]
The English translations on the website are not shown correctly, especially in the "Learning" section:
Do you need help with the translations? I can help to implement them but I am no native speaker ;-)
Or does it maybe make sense to just link to: https://rete.readthedocs.io/en/latest/
This is the maintained docs version, or?