Chinese lookup not working

I’ve tried in both Safari and Vivaldi (chrome-like) on Mac sequoia 15.7.4

When I click on a Chinese character, nothing happens. I’ve tried toggling the Chinese lookup in the view menu, several times.

Is it working for others?

3 Likes

When I go to https://suttacentral.net/da1/lzh/taisho?lang=en&reference=none&highlight=false and click on the first letter 長 and nothing happens on the front end. This is in the console:

Uncaught TypeError: t.getSentenceText is not a function
    _setSCBottomSheet https://suttacentral.net/7877.js:2806
    onclick https://suttacentral.net/7877.js:2806
7877.js:2806:9641
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://sentry.io/api/358981/store/. (Reason: CORS request did not succeed). Status code: (null).

Win11, FF

3 Likes

Yep, I’ve got a similar message in my console in Saf. Version 26.3 (20623.2.7.18.1)

[Error] TypeError: t.getSentenceText is not a function. (In 't.getSentenceText()', 't.getSentenceText' is undefined)
	_setSCBottomSheet (7877.js:2806:9657)
	(anonymous function) (7877.js:2806:9285)
3 Likes

I can reproduce this on Chrome 143.0.7499.192 for Android too. It highlights single characters and then does nothing.

This looks like a “legacy” text, right?
If so, here’s the relevant line in the codebase.
The implementation does differ from Bilara texts, so if it works on Bilara, then something in the diff between the two is broken. I can’t tell at a glance.

Or rather, this is a root text - I’m not sure what those are rendered as actually.
When I go to MA1’s root text instead it works (and highlights multiple characters). MA1 root is SC Taisho vs DA1 root is plain Taisho. MA1 also has a Bilara translation available. I imagine the bug is due to one of those differences

Separate bug I noticed is if you switch to simplified (I think that’s what that button is? I can’t read Chinese :sweat_smile:), the lookup breaks, and if you switch back, it does not repair itself. I have a feeling it’s only run once on initialization

1 Like

As I understand it, the distinction “aligned” or “legacy” only applies to translations, not to root texts. However, I believe that not all non-Pali root texts have been segmented so far, so they might technically come close to legacy translations. (?)

@HongDa ?

Yes, I think that might be the difference. A segmented root seems to be rendered with the same component as an aligned translation and an unsegmented root as a legacy translation.
And I think if a Bilara/aligned translation exists, then a segmented root text does too, but I’m not sure

So this bug is likely specific to unsegmented texts

1 Like

Certainly. Bilara translations require a segmented root text. But also the other way around: When a Chinese root text has a C.D. Patton translation in legacy format, it is certainly not segmented.

1 Like

thanks @Pasanna @sabbamitta @agilgur5 @Snowbird

I have fixed the bug, but due to recent changes to Docker configurations, the new configuration is incompatible with the server’s Docker version. Currently, an OS upgrade and a Docker upgrade are required to resolve the container rebuild issue.

3 Likes

I have already deployed the latest code on the production server, so this problem should be resolved.

4 Likes

Can confirm this has been fixed for me. For reference, here’s the corresponding PR. Thanks for the quick fix!

3 Likes