Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/plugin-slots/UnitTitleSlot/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ const UnitTitleSlot = ({
}) => {
const { formatMessage } = useIntl();
const isProcessing = unit.bookmarkedUpdateState === 'loading';
// Chrome Translate (Chinese Traditional) corrupts Tibetan complex-script shaping.
// Opt Tibetan titles out of browser translation; leave other titles translatable.
const hasTibetan = /[\u0F00-\u0FFF]/.test(unit.title);

return (
<PluginSlot
Expand All @@ -26,7 +29,12 @@ const UnitTitleSlot = ({
>
<div className="unit-title-header">
<div className="unit-title-container mb-0 mt-3 mt-xl-0">
<h3 className="h3 mb-0">{unit.title}</h3>
<h3
className={hasTibetan ? 'h3 mb-0 notranslate' : 'h3 mb-0'}
{...(hasTibetan ? { lang: 'bo', translate: 'no' } : {})}
>
{unit.title}
</h3>
Comment on lines -29 to +37

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please test with different possible scenarios to make sure this fix can work in all the cases.
And it would be nice if you could list the scenarios that you test.

</div>
<div className="unit-title-nav">
{renderUnitNavigation(true)}
Expand Down
Loading