Open zbiki opened 5 years ago
Hi @zbiki,
this is a rather complex topic. My Mind is, unfortunately, completely without localization support. Adding said feature is a non-trivial task.
One way to achieve this is to follow a gettext-like approach. I would start with replacing all string literals (english labels) with a call to a _
function. So the current
label: {value: "Edit item"}
would become:
label: {value: _("Edit item")}
The initial implementation of _
would be easy:
function _(key) { return key; }
Once the code is completely refactored, we can
_()
to extract used keys,_
function so it returns a localized value, based on the current language preference.I am, unfortunately, out of time to implement this. I would be happy to accept it as a pull request, though.
hello ondras, which way is the best way to translate label into mymind? I would like to try a solution that can be used in mymind as an additional feature. any suggestions?
i want to translate:
MM.Command.Edit = Object.create(MM.Command, { label: {value: "**Knoten bearbeiten**"}, keys: { value: [ {keyCode: 32}, {keyCode: 113} ] } });
is to create a new issue the right way for communictaion about this thinks?
mfg Christian