Skip to content

Commit

Permalink
fix(topic editor): display disambiguation in brackets also for non-pr…
Browse files Browse the repository at this point in the history
…imary titles
  • Loading branch information
yonadavGit committed Jul 22, 2024
1 parent baf430f commit 0307f73
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion static/js/Misc.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,10 @@ const ReorderEditorWrapper = ({toggle, type, data}) => {

const EditorForExistingTopic = ({ toggle, data }) => {
const prepAltTitles = (lang) => { // necessary for use with TitleVariants component
return data.titles.filter(x => !x.primary && x.lang === lang).map((item, i) => ({["name"]: item.text, ["id"]: i}))
return data.titles.filter(x => !x.primary && x.lang === lang).map((item, i) => ({
name: item.disambiguation ? `${item.text} (${item.disambiguation})` : item.text,
id: i
}))
}
const initCatSlug = TopicToCategorySlug(data);
const origData = {
Expand Down

0 comments on commit 0307f73

Please sign in to comment.