amilenkov's picture

It is very useful new possibility to have possibility to change Author/date format by tokens.

But I can not find a way to translate for example default [node:created:medium] by [node:author] with User interface translation / Edit string in another installed and active language despite there are nodes that are already translated .

How is that possible? I tried many and many times after visiting related translated nodes.

Comments

klonos's picture

Hey  👋,

I believe that this would need to be a configuration translation. AFAIK in order to have it show up as available for translation, it would need to be implemented in some way similar to this (notice the _config_translatables section at the top of that config file). It would need to be done for each content type separately.

Now, I have not done this before, but the difference in the content type settings compared to things like site_name and site_slogan in the system.core.json file is that node_submitted_format is nested within the settings section.

That's all I have for you right now, but I'll ask in our chat and see if others have done this before, and then will come back with more details.

klonos's picture

...turns out that we have an open issue for this . See https://github.com/backdrop/backdrop-issues/issues/3515

As a workaround, I imagine the you should be able to get this working by manually adding a _config_translatables section in the config files of each content type. Tedious (and also risky), I know, but there is currently no support for this. Sorry 😓

amilenkov's picture

Thank you!

I tried many times to edit the file node.type.post.json by adding

"_config_translatables": [

"node_submitted_format"

],

in a variety of ways, but all attempts ended with a syntax error message, probably because I make a mistake with the rules for writing json files.

In User interface translation there is a string "[node:created:medium] by [node:author]" even without editing node.type.post.json - even before I wrote yesterday in the forum about this problem I tried to translate the string as usual.

User interface translation shows that this string has been translated, the translation is visible in the respective language, more precisely the translation of "by", the rest are tokens, but on the page of the post this translation is not visible and only the English version of Author / date format is visible - "by" but not its translation.

I refuse to make more attempts, I will wait for future versions of the system to resolve this issue. Thanks for taking the time to check my question.