Sutta navigation doesn't switch to the selected language

Hi,
I notice that when I switch to Bahasa Indonesia, Japanese or Chinese, the sutta navigation buttons at the bottom of the page doesn’t switch to the selected language.


Somehow, it works with Deutsch.

Any idea?

I think the reason is that there are German translations of all these texts. As soon as a title is associated with a text, that title can be shown in the footer. Or else, all the respective “name” files have a name in that language.

1 Like

But the relevant (next and previous) suttas have been translated to the respective languages. Perhaps, Ayya mean ALL in the literal sense: All suttas in the sutta pitaka need to be available in German translations for this feature to work properly?

1 Like

No, that’s not what I meant. Even for German which has quite a wide coverage this is not the case.

But then we should have to ask @HongDa to inquire what the problem is.

1 Like

He is probably enjoying his Chinese New Year break right now :grinning:

2 Likes

Let’s grant him this! He’s working so much all year round!

1 Like

It doesn’t matter if the suttas is translated. It matters if the name of the suttas is translated in the giant json file of all the names.

I think German is one of the few that has this file translated. It is a huge project.

It appears that if there is no translation in the names Jason it defaults to the Pali.

If anyone would like to work on translating the names file, please send me a DM. No need to translate the whole file.

2 Likes

That can’t be it. By far not all suttas have their titles in the English “name” files, and yet, you see the “previous” and “next” buttons with English text.

Neither for the previous (MN64) nor for the next sutta (MN66) is there an entry in the English “name” file.

So I am really not sure how the system works exactly.

1 Like

And I always thought it was because the German language was so loved by everybody :blush:

2 Likes

Yes, especially by Mark Twain The Awful German Language - Wikipedia
:grin:

2 Likes

Ah, I think I know the file that Bhante refers to. It was the one that I raised a week or so ago. It’s the one that causes the discrepancy of the titles in the book where we have Guaranteed and Unfailing as the titles for MN60

It’s this file, isn’t it?

Because the navigation button shows MN60 as Guaranteed too.

I’ll DM Bhante to translate those files for Chinese.

1 Like

Well, I’m less confident that I was a minute ago. :cry:

We probably need to wait for HongDa to return and set us all straight.

2 Likes

An absolute treasure !!

It should be those files under names folder because I can see that the names of the suttas in Itivuttaka and Udana are translated in bilara and they show up on suttacentral Chinese interface.

We really just need to wait for HongDa to answer all these questions and give instructions on translation I think.

1 Like

Sorry for not replying in time. I am traveling with my family these days and expect to return the day after tomorrow. I will deal with related issues in time.

3 Likes

Hi @HongDa,
Any update on this matter? Let us know if there is anything that we can do. Thank you

I actually tried looking at the code to see how that text is filled but I couldn’t figure it out.

HongDa, do you know exactly how that text (the sutta titles themselves) is generated?

My current theory is that there are only two possible sources for that data. As long as one or the other has a title, it will appear in the navigation:

  1. The names json file, e.g. translation\de\site\name\sutta\mn-name_translation-de-site.json
  2. Sutta translated using Bilara

So the Japanese, Bhasa Indonesia, and Chinese neither have a Bilara translation, nor a completed name_translation file for the suttas shown in the example.

For example, The only Bilara sutta translated into Suomi (Finnish/fi) is the very first sutta in AN1. So I navigate to a translation of an1.11-20 which is the second “sutta”. Doesn’t matter whose. I set the language to Suomi and here is what we have:

You can see that the “previous” sutta title is translated but the “next” is not.

I’m guessing that during a build process new name jsons are built by scraping the Bilara text translation data.

If my theory is correct, then everything is acting as to be expected. If you can find a title not translated in the navigation where the sutta is in fact translated in Bilara or where the title is translated in the respective name file, then please do report.

1 Like

Correct me if I misrepresent what Bhante said. If I understand you correctly, then if a sutta is aligned, then it should have a properly translated title in the navigation button because the build pipeline will automatically extract the sutta name from bilara and fill in the name into the corresponding name_translation file.

So, in the case of legacy sutta, the only way to make the title appear properly is to manually fill in the name_translation file in bilara. Is that correct?

Exactly so. At least that is my theory at this point. Hopefully when HongDa gets caught up he can chime in and clarify.

The data in the legacy texts is far more haphazard so would not be a suitable source for scraping title data.

1 Like