Dear module developers!
Can you enclose text output strings in .("Some String") function symbols?
Only in *.b.R files.
This makes it easier to translate your modules into other languages.
P.S. I think Jonathon will agree with me.
Strings for translation
Re: Strings for translation
Hi Yuri,
Yes, in order to translate modules, you can surround your text with the .() function as you describe.
Is that what your asking? I feel like i'm not answering your question, sorry!
jonathon
Yes, in order to translate modules, you can surround your text with the .() function as you describe.
Is that what your asking? I feel like i'm not answering your question, sorry!
jonathon
Re: Strings for translation
I just ask other module developers to do this
Re: Strings for translation
Would you please give an example.
Re: Strings for translation
For example (in *.b.R file):
matrix$addFootnote(rowNo=i, paste0(colVarName, '[r]'), .('Pearson correlation cannot be calculated for non-numeric values'))
or
nm <- jmvcore::format(.('Matrix #{i}'), i=nCl)
You need to add importFrom(jmvcore,.) to NAMESPACE file first
+ If you want make a translation file:
jmvtools::i18nCreate("langcode")
and
jmvtools::i18nUpdate("langcode")
after making changes
matrix$addFootnote(rowNo=i, paste0(colVarName, '[r]'), .('Pearson correlation cannot be calculated for non-numeric values'))
or
nm <- jmvcore::format(.('Matrix #{i}'), i=nCl)
You need to add importFrom(jmvcore,.) to NAMESPACE file first
+ If you want make a translation file:
jmvtools::i18nCreate("langcode")
and
jmvtools::i18nUpdate("langcode")
after making changes
Re: Strings for translation
Thank you
Re: Strings for translation
Seems like a good idea. I've been trying to do exactly that but have struggled with it as I could not find any information on how to add translation to a module. It would be immensely helpful if this topic would be explained in the official jamovi documentation on module development: https://docs.jamovi.org/_pages/developer-hub.html. I'm sure yurismol or someone else from the community could help with writing the documentation?
Re: Strings for translation
I can, but I think Jonathon would do it better.DStuder wrote: ↑Thu Apr 24, 2025 1:22 pm Seems like a good idea. I've been trying to do exactly that but have struggled with it as I could not find any information on how to add translation to a module. It would be immensely helpful if this topic would be explained in the official jamovi documentation on module development: https://docs.jamovi.org/_pages/developer-hub.html. I'm sure yurismol or someone else from the community could help with writing the documentation?