Skip to content

Use short_title in compute_navigation#1586

Open
jochenklar wants to merge 4 commits into2.4.5/releasefrom
2.4.5/fix/navigation
Open

Use short_title in compute_navigation#1586
jochenklar wants to merge 4 commits into2.4.5/releasefrom
2.4.5/fix/navigation

Conversation

@jochenklar
Copy link
Copy Markdown
Member

Shot titles where accidentally removed in RDMO 2.4.0. This restores there use in the sidebar of the interview. Draft for now since I don't know if we want to have an extra release for this.

@jochenklar jochenklar requested a review from MyPyDavid April 16, 2026 12:21
@jochenklar jochenklar self-assigned this Apr 16, 2026
@coveralls
Copy link
Copy Markdown

coveralls commented Apr 16, 2026

Coverage Status

Coverage is 94.905%2.4.5/fix/navigation into 2.4.5/release. No base build found for 2.4.5/release.

@jochenklar jochenklar changed the base branch from main to 2.4.5/release April 19, 2026 11:16
@jochenklar jochenklar added this to the RDMO 2.4.5 milestone Apr 19, 2026
@MyPyDavid
Copy link
Copy Markdown
Member

I though it would be easy to add a simple test for this but I think that the TranslationMixin is broken somehow and we need to add a fix for that as well.

(Pdb)  django.utils.translation.get_language()
'en-us'
(Pdb) rdmo.core.utils.get_languages()
[('en', 'English', 'lang1'), ('de', 'German', 'lang2')]

and we try to compare 'en' == 'en-us'....

if lang_code == current_language:

(Pdb) section.short_title_lang1
'SectionShorty'
(Pdb) section.short_title
''

🤯 ❓

@MyPyDavid MyPyDavid linked an issue Apr 27, 2026 that may be closed by this pull request
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
@MyPyDavid
Copy link
Copy Markdown
Member

Still the new tests (without the fix for TranslationMixin) did not fail in the CI somehow, maybe some leaky tests were setting the locale to en for the rest of the tests?! Because from the rdmo core default settings it should be set to LANGUAGE_CODE = 'en-us' ??
When the tests now pass than there was no problem at all (or something else is leaky) 😶‍🌫️

@MyPyDavid
Copy link
Copy Markdown
Member

If these tests in #1590 also pass then I give up. 🎤-drop

Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Copy link
Copy Markdown
Member

@MyPyDavid MyPyDavid left a comment

Choose a reason for hiding this comment

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

Fixed and tested.

The two other changes to translations in the tests are unrelated but I don't want to force-push the branch right now so..

@MyPyDavid MyPyDavid marked this pull request as ready for review April 29, 2026 15:37

# ARRANGE: clear the normal titles and set short titles
section.title_lang1 = ""
section.short_title_lang1 = 'SectionShorty'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this was the test that was simply broken somehow on my machine because I had en-us as the locale language

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

short title missing from navigation

3 participants